/* Audit de fiche Google — plusdavis
   Retouche selon unslop (Damir Sokolovsky, @heydamir, CC BY 4.0) :
   fonds neutres, un seul accent (bleu plusdavis), l'or réservé aux étoiles,
   la carte des positions et les avis par année comme seuls moments en couleur. */
:root {
  --bleu: #0077f8; --bleu-fonce: #0062cc; --bleu-fond: #eef5ff;
  --texte: #1d1d1f; --texte-2: #55555a; --texte-3: #6e6e73;
  --trait: rgba(29, 29, 31, .08); --trait-2: rgba(29, 29, 31, .14);
  --fond: #f5f5f7; --surface: #ffffff; --releve: #f4f4f5;
  --or: #fbbc04;
  --ok: #15803d; --ok-pt: #16a34a;
  --warn: #a16207; --warn-pt: #d97706;
  --ko: #c92a2a; --ko-pt: #dc2626;
  --rang-1: #16a34a; --rang-2: #d99a00; --rang-3: #ea6a0c; --rang-4: #dc2626;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --r-carte: 16px; --r-panneau: 20px; --r-ctrl: 10px; --r-tag: 6px;
  --ombre: 0 1px 2px rgba(0, 0, 0, .05);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 128px; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif; color: var(--texte); background: var(--fond); -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.5; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--bleu-fonce); }
h1, h2, h3 { margin: 0; font-weight: 600; }
:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }

/* En-tête */
.entete { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 32px; background: rgba(245, 245, 247, .9); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--trait); }
.marque { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--texte); font-weight: 600; font-size: 17px; }
.marque-logo { height: 22px; width: auto; display: block; mix-blend-mode: multiply; }
.marque-sep { width: 1px; height: 16px; background: var(--trait-2); }
.marque-outil { font-weight: 400; color: var(--texte-3); font-size: 14px; }
.badge-demo { margin-left: auto; background: #fdf3dc; color: var(--warn); font-weight: 500; font-size: 13px; padding: 4px 8px; border-radius: var(--r-tag); }

/* Accueil */
.accueil { max-width: 760px; margin: 0 auto; padding: 96px 24px 80px; text-align: center; }
.sur-titre { color: var(--bleu-fonce); font-weight: 500; font-size: 14px; }
.accueil h1 { font-size: clamp(36px, 5.4vw, 60px); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; margin: 12px 0 16px; }
.accueil h1 em { font-style: normal; color: var(--bleu); background: linear-gradient(90deg, #1aa3ff 0%, #0077f8 55%, #0058cc 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding-bottom: .08em; }
.accueil .chapo { color: var(--texte-2); font-size: 18px; line-height: 28px; max-width: 34rem; margin: 0 auto 40px; }
.recherche { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 14px; padding: 8px 8px 8px 20px; border: 1px solid var(--trait-2); box-shadow: 0 8px 24px rgba(0, 0, 0, .06); transition: border-color .15s var(--ease); }
.recherche:focus-within { border-color: var(--bleu); }
.recherche svg { flex: none; color: var(--texte-3); }
.recherche input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 17px; padding: 12px 4px; background: transparent; }
.pays { display: flex; background: var(--releve); border-radius: var(--r-ctrl); padding: 2px; }
.pays button { border: 0; background: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 13px; color: var(--texte-3); cursor: pointer; transition: background-color .15s var(--ease), color .15s var(--ease); }
.pays button[aria-pressed="true"] { background: var(--surface); color: var(--texte); box-shadow: var(--ombre); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border: 0; border-radius: var(--r-ctrl); padding: 0 20px; font-weight: 500; font-size: 15px; cursor: pointer; transition: background-color .15s var(--ease), transform .12s var(--ease); white-space: nowrap; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-bleu { background: var(--bleu); color: #fff; }
.btn-bleu:hover { background: var(--bleu-fonce); }
.btn-bleu:disabled { opacity: .5; cursor: default; }
.btn-gris { background: var(--surface); color: var(--texte); border: 1px solid var(--trait-2); }
.btn-gris:hover { background: var(--releve); }
.btn-petit { height: 36px; padding: 0 16px; font-size: 14px; }
.astuce { color: var(--texte-3); font-size: 14px; margin-top: 16px; }

.recents { margin-top: 64px; text-align: left; }
.recents-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.recents h2 { font-size: 14px; color: var(--texte-3); font-weight: 500; }
@media (pointer: coarse) { .recent-suppr { opacity: 1; } }
.recents-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.recent { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 12px; padding: 12px; text-decoration: none; color: var(--texte); border: 1px solid var(--trait); transition: border-color .15s var(--ease); position: relative; }
.recent:hover { border-color: var(--trait-2); }
.recent-score { flex: none; width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; font-weight: 600; font-size: 15px; background: var(--releve); font-variant-numeric: tabular-nums; }
.recent-titre { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-sous { color: var(--texte-3); font-size: 13px; }
.recent-suppr { position: absolute; top: 4px; right: 4px; border: 0; background: none; color: var(--texte-3); cursor: pointer; font-size: 16px; opacity: 0; padding: 4px 8px; border-radius: var(--r-tag); transition: opacity .15s var(--ease); }
.recent:hover .recent-suppr, .recent-suppr:focus-visible { opacity: 1; }

/* Résultats de recherche */
.resultats { max-width: 960px; margin: 0 auto; padding: 40px 24px 80px; }
.resultats-tete { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.resultats-tete h2 { font-size: 28px; letter-spacing: -0.01em; }
.liste-etab { display: grid; gap: 8px; }
.etab { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--surface); border-radius: var(--r-carte); border: 1px solid var(--trait); cursor: pointer; text-align: left; width: 100%; transition: border-color .15s var(--ease); }
.etab:hover { border-color: var(--trait-2); }
.etab[aria-pressed="true"] { border-color: var(--bleu); }
.vignette { flex: none; width: 64px; height: 64px; border-radius: 12px; background: var(--releve); color: var(--texte-3); display: grid; place-items: center; font-weight: 600; font-size: 24px; overflow: hidden; }
.vignette img { width: 100%; height: 100%; object-fit: cover; }
.etab-nom { font-weight: 600; font-size: 16px; }
.etab-info { color: var(--texte-3); font-size: 14px; }
.etoiles { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; font-size: 14px; }
.etoiles-svg { display: inline-flex; gap: 1px; }

.config { margin-top: 12px; background: var(--surface); border-radius: var(--r-carte); padding: 24px; border: 1px solid var(--trait); }
.config h3 { font-size: 18px; margin-bottom: 4px; }
.config p { color: var(--texte-2); margin: 0 0 20px; font-size: 14px; }
.config-grille { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin-top: 16px; }
.champ label { display: block; font-size: 13px; font-weight: 500; color: var(--texte-2); margin-bottom: 8px; }
.champ input, .champ select { width: 100%; height: 44px; border: 1px solid var(--trait-2); border-radius: var(--r-ctrl); padding: 0 12px; font-size: 15px; background: #fff; outline: 0; transition: border-color .15s var(--ease); }
.champ input:focus, .champ select:focus { border-color: var(--bleu); }
.config-pied { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.estimation { color: var(--texte-3); font-size: 13px; }

.segments { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segments button { text-align: left; border: 1px solid var(--trait-2); background: var(--surface); border-radius: var(--r-ctrl); padding: 12px 16px; cursor: pointer; transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.segments button b { display: block; font-weight: 600; font-size: 15px; }
.segments button small { color: var(--texte-3); font-size: 13px; }
.segments button[aria-pressed="true"] { border-color: var(--bleu); background: var(--bleu-fond); }
.villes { display: flex; flex-wrap: wrap; gap: 8px; }
.ville { border: 1px solid var(--trait-2); background: var(--surface); border-radius: var(--r-tag); padding: 6px 10px; font-size: 14px; cursor: pointer; color: var(--texte-3); transition: border-color .15s var(--ease), color .15s var(--ease), background-color .15s var(--ease); }
.ville[aria-pressed="true"] { border-color: var(--bleu); color: var(--texte); background: var(--bleu-fond); }
.pin-ville { display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: auto; }
.pin-ville span { font-size: 12px; font-weight: 600; color: var(--texte); background: rgba(255, 255, 255, .9); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }

/* Chargement */
.chargement { max-width: 600px; margin: 0 auto; padding: 96px 24px 80px; text-align: center; }
.chargement h2 { font-size: 32px; letter-spacing: -0.02em; margin: 16px 0 8px; }
.chargement .sous { color: var(--texte-2); margin: 0 0 32px; }
.etapes { text-align: left; background: var(--surface); border-radius: var(--r-carte); padding: 4px 20px; border: 1px solid var(--trait); }
.etape { display: flex; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--trait); }
.etape:last-child { border-bottom: 0; }
.etape-ico { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--releve); font-size: 11px; font-weight: 600; }
.etape[data-statut="en_cours"] .etape-ico { background: none; border: 2px solid var(--trait-2); border-top-color: var(--bleu); animation: tourne .8s linear infinite; }
.etape[data-statut="ok"] .etape-ico { background: var(--ok-pt); color: #fff; }
.etape[data-statut="erreur"] .etape-ico { background: var(--ko-pt); color: #fff; }
.etape-label { font-weight: 500; }
.etape[data-statut="attente"] .etape-label { color: var(--texte-3); }
.etape-detail { margin-left: auto; color: var(--texte-3); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.mini-grille { display: grid; gap: 4px; margin: 32px auto 0; width: max-content; }
.mini-grille span { width: 12px; height: 12px; border-radius: 50%; background: var(--trait-2); transition: background-color .3s var(--ease); }
.mini-grille span.on { background: var(--bleu); }
.chrono { margin-top: 16px; color: var(--texte-3); font-size: 13px; font-variant-numeric: tabular-nums; }
@keyframes tourne { to { transform: rotate(360deg); } }
@keyframes apparait { from { opacity: 0; } to { opacity: 1; } }

/* Rapport */
.rapport { max-width: 1180px; margin: 0 auto; padding: 0 32px 96px; }
.nav-rapport { position: sticky; top: 56px; z-index: 900; display: flex; align-items: center; gap: 4px; height: 56px; background: rgba(245, 245, 247, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); overflow-x: auto; }
.nav-rapport a:not(.btn) { text-decoration: none; color: var(--texte-3); font-weight: 500; font-size: 14px; padding: 0 12px; height: 32px; display: inline-flex; align-items: center; border-radius: 8px; white-space: nowrap; transition: background-color .15s var(--ease), color .15s var(--ease); }
.nav-rapport a:not(.btn):hover { color: var(--texte); }
.nav-rapport a.actif { background: var(--surface); color: var(--texte); box-shadow: var(--ombre); }
.nav-rapport .espace { flex: 1; }
.nav-rapport .btn { margin-left: 4px; }
.nav-rapport a.btn-bleu, .nav-rapport a.btn-bleu:hover { color: #fff; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; background: var(--surface); border-radius: var(--r-panneau); padding: 32px; border: 1px solid var(--trait); margin-top: 8px; }
.hero-id { display: flex; gap: 20px; align-items: center; }
.hero-id .vignette { width: 88px; height: 88px; border-radius: 16px; font-size: 32px; }
.hero h1 { font-size: clamp(28px, 3.2vw, 36px); letter-spacing: -0.02em; line-height: 1.15; }
.hero-cat { color: var(--texte-3); font-weight: 500; font-size: 14px; margin-bottom: 4px; }
.hero-adr { color: var(--texte-2); font-size: 14px; margin-top: 4px; }
.hero-note { margin-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero-note .grosse-note { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-note .sous { color: var(--texte-2); font-size: 14px; margin-right: 8px; }
.lien-discret { color: var(--texte-3); font-size: 13px; text-decoration: none; }
.lien-discret:hover { color: var(--bleu-fonce); text-decoration: underline; }

.hero-score { display: grid; grid-template-columns: auto 240px; gap: 32px; align-items: center; }
.jauge { position: relative; width: 168px; height: 168px; flex: none; }
.jauge svg { transform: rotate(-90deg); }
.jauge-centre { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.jauge-valeur { font-size: 52px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.jauge-sur { color: var(--texte-3); font-size: 13px; }
.jauge-label { margin-top: 4px; font-weight: 500; font-size: 13px; }
.sous-scores { display: grid; gap: 12px; }
.sous-score { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; text-decoration: none; color: var(--texte); font-size: 14px; }
.sous-score-label { color: var(--texte-2); }
.sous-score b { font-weight: 600; font-variant-numeric: tabular-nums; }
.sous-score-barre { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--releve); overflow: hidden; }
.sous-score-barre i { display: block; height: 100%; border-radius: 2px; }
.sous-score:hover .sous-score-label { color: var(--texte); }

.constats { margin-top: 12px; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-panneau); padding: 24px 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 40px; }
.constats h3 { grid-column: 1 / -1; font-size: 15px; color: var(--texte-3); font-weight: 500; }
.constat { display: grid; grid-template-columns: 8px 1fr; gap: 12px; align-items: baseline; font-size: 17px; line-height: 1.45; }
.pastille { width: 8px; height: 8px; border-radius: 50%; transform: translateY(-2px); }
.pastille.ko { background: var(--ko-pt); } .pastille.warn { background: var(--warn-pt); } .pastille.ok { background: var(--ok-pt); }

.section { margin-top: 64px; }
.section-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.section-tete h2 { font-size: 32px; letter-spacing: -0.02em; line-height: 1.15; }
.section-tete p { color: var(--texte-2); margin: 8px 0 0; max-width: 40rem; }
.score-pilule { font-size: 14px; color: var(--texte-3); font-variant-numeric: tabular-nums; }
.score-pilule b { color: var(--texte); font-weight: 600; font-size: 20px; }

.carte { background: var(--surface); border-radius: var(--r-carte); padding: 24px; border: 1px solid var(--trait); min-width: 0; }
.carte h3 { font-size: 16px; }
.carte .legende-carte { color: var(--texte-3); font-size: 13px; margin: 4px 0 16px; }
.grille-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.grille-large { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.mt { margin-top: 12px; }

.tuiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r-carte); }
.tuile { padding: 20px 24px; border-left: 1px solid var(--trait); }
.tuile:first-child { border-left: 0; }
.tuile-label { color: var(--texte-3); font-size: 13px; }
.tuile-valeur { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.tuile-valeur small { font-size: 15px; color: var(--texte-3); font-weight: 400; letter-spacing: 0; }
.tuile-delta { font-size: 13px; margin-top: 4px; color: var(--texte-3); }
.tuile-delta .ko { color: var(--ko); font-weight: 500; } .tuile-delta .ok { color: var(--ok); font-weight: 500; } .tuile-delta .warn { color: var(--warn); font-weight: 500; }

/* Graphiques */
.graph { width: 100%; display: block; overflow: visible; }
.graph text { font-family: inherit; fill: var(--texte-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.graph .axe { stroke: var(--trait-2); stroke-width: 1; }
.graph .grille-ligne { stroke: var(--trait); stroke-width: 1; }
.graph .barre { fill: var(--bleu); transition: opacity .15s var(--ease); }
.graph .barre.en-cours { fill: url(#hachure); }
.graph .barre.gris { fill: #c7c7cc; }
.graph .valeur { fill: var(--texte); font-weight: 500; font-size: 12px; }
.graph .cible { cursor: default; fill: transparent; }
.graph .ligne { fill: none; stroke: var(--bleu); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.graph .point { fill: var(--bleu); stroke: #fff; stroke-width: 2; }
.graph .survol .barre { opacity: .75; }
.infobulle { position: fixed; z-index: 3000; pointer-events: none; background: var(--texte); color: #fff; border-radius: 8px; padding: 8px 12px; font-size: 13px; line-height: 1.45; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); max-width: 260px; }
.infobulle b { font-weight: 600; }

.etoiles-barres { display: grid; gap: 12px; }
.eb { display: grid; grid-template-columns: 32px 1fr 48px; align-items: center; gap: 12px; font-size: 14px; }
.eb-label { font-weight: 500; display: flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.eb-piste { height: 8px; background: var(--releve); border-radius: 4px; overflow: hidden; }
.eb-remp { height: 100%; background: var(--or); border-radius: 4px; transform-origin: left; transform: scaleX(0); transition: transform .5s var(--ease); }
.eb-val { text-align: right; color: var(--texte-3); font-variant-numeric: tabular-nums; }

.compare { display: grid; gap: 8px; }
.cmp { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 12px; align-items: center; font-size: 14px; }
.cmp-nom { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--texte-2); }
.cmp.moi .cmp-nom { font-weight: 600; color: var(--texte); }
.cmp-piste { display: flex; align-items: center; gap: 8px; }
.cmp-barre { height: 16px; border-radius: 0 4px 4px 0; background: #d1d1d6; min-width: 3px; transform-origin: left; transform: scaleX(0); transition: transform .5s var(--ease); }
.cmp.moi .cmp-barre { background: var(--bleu); }
.cmp-val { font-variant-numeric: tabular-nums; color: var(--texte-3); white-space: nowrap; font-size: 13px; }
.cmp-val b { color: var(--texte); font-weight: 500; }
.vu .eb-remp, .vu .cmp-barre { transform: none; }

.objectifs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.objectif { border-radius: var(--r-ctrl); background: var(--releve); padding: 16px; }
.objectif-cible { font-weight: 500; display: flex; align-items: center; gap: 4px; font-size: 14px; }
.objectif-besoin { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.objectif-sous { color: var(--texte-3); font-size: 13px; }

.ecart { display: flex; flex-direction: column; justify-content: center; }
.ecart .grand { font-size: 56px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.ecart p { margin: 12px 0 0; color: var(--texte-2); font-size: 15px; }
.ecart p b { color: var(--texte); font-weight: 600; }
.ecart small { display: block; margin-top: 16px; color: var(--texte-3); font-size: 12px; }

.sujets { display: flex; flex-wrap: wrap; gap: 8px; }
.sujet { background: var(--releve); border-radius: var(--r-tag); padding: 4px 8px; font-size: 14px; }
.sujet span { color: var(--texte-3); margin-left: 4px; font-variant-numeric: tabular-nums; }

.avis-liste { display: grid; gap: 8px; }
.avis-item { border-radius: var(--r-ctrl); background: var(--releve); padding: 12px 16px; font-size: 14px; }
.avis-tete { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.avis-auteur { font-weight: 500; }
.avis-date { color: var(--texte-3); font-size: 13px; }
.tag { font-size: 13px; font-weight: 500; white-space: nowrap; }
.tag.ok { color: var(--ok); } .tag.ko { color: var(--ko); } .tag.warn { color: var(--warn); } .tag.bleu { color: var(--bleu-fonce); }
.statut { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--texte-2); white-space: nowrap; }
.statut::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.statut.ok::before { background: var(--ok-pt); } .statut.warn::before { background: var(--warn-pt); } .statut.ko::before { background: var(--ko-pt); }

/* Carte géographique : le moment fort du rapport */
.geo { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; }
.geo-carte { height: 600px; border-radius: var(--r-panneau); overflow: hidden; border: 1px solid var(--trait); background: #e9eef3; position: relative; }
.geo-carte .leaflet-container { height: 100%; font-family: inherit; }
.geo-carte .leaflet-tile-pane { filter: grayscale(.85) contrast(.92) brightness(1.06); }
.geo-cote { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.geo-stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.geo-stat { background: var(--releve); border-radius: var(--r-ctrl); padding: 12px; }
.geo-stat b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.geo-stat span { font-size: 13px; color: var(--texte-3); }
.choix-entite { display: grid; gap: 2px; max-height: 340px; overflow: auto; }
.entite { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: center; text-align: left; border: 1px solid transparent; background: none; padding: 8px; border-radius: 8px; cursor: pointer; font-size: 14px; transition: background-color .15s var(--ease); }
.entite:hover { background: var(--releve); }
.entite[aria-pressed="true"] { background: var(--releve); border-color: var(--trait-2); }
.entite-rang { width: 20px; text-align: center; font-size: 12px; color: var(--texte-3); font-variant-numeric: tabular-nums; }
.entite-rang.moi::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bleu); }
.entite-nom { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entite-sous { color: var(--texte-3); font-size: 12px; }
.entite-val { font-weight: 500; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; color: var(--texte-2); }
.legende-rangs { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--texte-3); }
.legende-rangs i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.pin-rang { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 13px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); font-family: Inter, sans-serif; font-variant-numeric: tabular-nums; }
.pin-rang.anime { animation: apparait .3s var(--ease) backwards; }
.pin-etab { width: 14px; height: 14px; border-radius: 50%; background: var(--texte); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--texte); }
.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau th { text-align: left; color: var(--texte-3); font-weight: 500; font-size: 13px; padding: 8px 12px; border-bottom: 1px solid var(--trait); }
.tableau td { padding: 12px; border-bottom: 1px solid var(--trait); font-variant-numeric: tabular-nums; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau tr.moi td { background: var(--bleu-fond); font-weight: 600; }
.tableau .droite { text-align: right; white-space: nowrap; }

/* Fiche */
.checks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 32px; }
.check { display: grid; grid-template-columns: 20px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--trait); }
.check-ico { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 600; margin-top: 1px; }
.check-ico.ok { background: var(--ok-pt); } .check-ico.warn { background: var(--warn-pt); } .check-ico.ko { background: var(--ko-pt); }
.check-label { font-weight: 500; font-size: 15px; }
.check-valeur { color: var(--texte-3); font-size: 14px; }
.check-conseil { font-size: 14px; color: var(--texte-2); margin-top: 4px; }
.bloc-texte { background: var(--releve); border-radius: var(--r-ctrl); padding: 12px 16px; font-size: 15px; margin: 12px 0 16px; white-space: pre-wrap; }
.bloc-texte.nom { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.bloc-texte .coupe { background: linear-gradient(transparent 62%, rgba(0, 119, 248, .16) 62%); }
.puces { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; color: var(--texte-2); }
.puces li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; }
.puces li::before { content: "–"; color: var(--texte-3); }
.compteur { height: 4px; border-radius: 2px; background: var(--releve); overflow: hidden; margin-top: 8px; }
.compteur div { height: 100%; background: var(--texte-3); border-radius: 2px; }

.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.post { background: var(--releve); border-radius: var(--r-ctrl); overflow: hidden; font-size: 14px; }
.post img { width: 100%; height: 140px; object-fit: cover; display: block; }
.post div { padding: 12px 16px; }
.post .date { color: var(--texte-3); font-size: 13px; margin-bottom: 4px; }
.vide { color: var(--texte-3); text-align: center; padding: 32px; background: var(--releve); border-radius: var(--r-ctrl); font-size: 14px; }

/* Plan d'actions */
.plan { display: grid; gap: 8px; counter-reset: action; }
.action { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 16px; background: var(--surface); border-radius: var(--r-carte); padding: 20px 24px; border: 1px solid var(--trait); counter-increment: action; }
.action::before { content: counter(action); font-weight: 600; font-size: 20px; color: var(--texte-3); font-variant-numeric: tabular-nums; line-height: 1.3; }
.action-tete { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.action h3 { font-size: 17px; flex-basis: 100%; margin-top: 4px; }
.action-meta { color: var(--texte-3); font-size: 13px; }
.action-pourquoi { color: var(--texte); font-size: 15px; margin: 0 0 4px; }
.action-comment { color: var(--texte-2); font-size: 14px; margin: 0; }
.cta-final { margin-top: 24px; border-radius: var(--r-panneau); padding: 40px; background: var(--surface); border: 1px solid var(--trait); display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.cta-final h2 { font-size: 32px; letter-spacing: -0.02em; line-height: 1.15; }
.cta-final h2 span { color: var(--bleu); }
.cta-final p { color: var(--texte-2); margin: 12px 0 0; font-size: 16px; }
.cta-final ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.cta-final li { display: grid; grid-template-columns: 16px 1fr; gap: 12px; font-size: 15px; }
.cta-final li::before { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--bleu); border-bottom: 2px solid var(--bleu); transform: rotate(-45deg) translate(2px, 4px); }

.pied-rapport { margin-top: 40px; color: var(--texte-3); font-size: 13px; text-align: center; }
.alerte { background: #fdf3dc; color: var(--warn); border-radius: var(--r-ctrl); padding: 12px 16px; font-size: 14px; margin-top: 8px; }
.erreur-msg { background: #fdecec; color: var(--ko); border-radius: var(--r-ctrl); padding: 12px 16px; margin-top: 16px; }

@media (max-width: 980px) {
  .rapport { padding: 0 16px 80px; }
  .hero, .hero-score { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .hero { padding: 24px 20px; }
  .hero-id { flex-direction: column; }
  .hero-note { justify-content: center; }
  .sous-scores { width: 100%; text-align: left; }
  .marque-outil, .marque-sep { display: none; }
  .tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grille-2, .grille-large, .geo, .checks, .posts, .cta-final, .constats, .config-grille { grid-template-columns: minmax(0, 1fr); }
  .geo-carte { height: 440px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .entete { padding: 0 16px; }
  /* Accueil : le champ prend toute la largeur, pays + bouton en dessous */
  .accueil { padding: 48px 16px 64px; }
  .accueil .chapo { font-size: 16px; line-height: 24px; margin-bottom: 28px; }
  .recherche { flex-wrap: wrap; padding: 8px; gap: 8px; }
  .recherche svg { display: none; }
  .recherche input { flex: 1 1 100%; padding: 8px; font-size: 16px; }
  .recherche .pays { flex: 1; }
  .recherche .pays button { flex: 1; }
  .recherche .btn { flex: 1; }
  .recents { margin-top: 48px; }
  /* Résultats et paramètres */
  .resultats { padding: 24px 16px 64px; }
  .resultats-tete { gap: 12px; }
  .resultats-tete h2 { font-size: 22px; }
  .etab { padding: 12px; gap: 12px; }
  .vignette { width: 52px; height: 52px; }
  .config { padding: 20px 16px; }
  .config-pied .btn { width: 100%; }
  .chargement { padding: 48px 16px 64px; }
  .chargement h2 { font-size: 24px; }
  .etapes { padding: 4px 16px; }
  .etape { flex-wrap: wrap; padding: 12px 0; gap: 4px 12px; }
  .etape-detail { margin-left: 32px; text-align: left; flex-basis: 100%; }
  /* Rapport : barre en deux lignes, boutons toujours visibles */
  .nav-rapport { position: static; flex-wrap: wrap; height: auto; padding: 8px 0; gap: 8px 4px; }
  .nav-rapport .espace { flex-basis: 100%; height: 0; }
  .nav-rapport .btn { flex: 1 1 40%; margin-left: 0; }
  html { scroll-padding-top: 72px; }
  .hero { padding: 24px 16px; }
  .hero-score { gap: 24px; }
  .constats { padding: 20px; gap: 12px; }
  .constat { font-size: 16px; }
  .section { margin-top: 48px; }
  .section-tete h2 { font-size: 26px; }
  .carte { padding: 20px 16px; }
  .tuile { padding: 16px; border-left: 0; border-top: 1px solid var(--trait); }
  .tuile:nth-child(-n+2) { border-top: 0; }
  .tuile:nth-child(even) { border-left: 1px solid var(--trait); }
  .tuile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .tuile-valeur { font-size: 26px; }
  .cmp { grid-template-columns: minmax(0, 110px) 1fr; }
  .ecart .grand { font-size: 44px; }
  .geo-carte { height: 380px; }
  .tableau .cache-mobile { display: none; }
  .tableau td, .tableau th { padding: 10px 8px; }
  .action { grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 16px; }
  .cta-final { padding: 24px 20px; gap: 24px; }
  .cta-final h2 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .eb-remp, .cmp-barre { transform: none; }
  html { scroll-behavior: auto; }
}
@media print {
  @page { margin: 12mm; }
  body { background: #fff; font-size: 12px; }
  .entete, .nav-rapport, .interne, .no-print { display: none !important; }
  .rapport { padding: 0; max-width: none; }
  .section { margin-top: 28px; }
  .carte, .action, .tuiles, .hero { break-inside: avoid; }
  .eb-remp, .cmp-barre { transform: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .geo { grid-template-columns: minmax(0, 1fr) 260px; }
  .geo-carte { height: 420px; }
}
