/* Sonde — direction « Sonar / échos ». Tous les styles passent par les jetons ci-dessous. */
@font-face { font-family: 'Schibsted Grotesk'; src: url('/fonts/schibsted-grotesk-latin-wght-normal.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --fond: #07161c; --surface: #0d2630; --surface-2: #123240; --ligne: #3a7a8f;
  --texte: #d7ecec; --texte-doux: #93b8bd;
  --echo: #3ee6b8; --alerte: #ffb454; --critique: #ff6b5e; --mineur: #7fb8ff;
  --sur-echo: #03211a;
  --titre: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --r: 10px; --r-lg: 18px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --t-petit: 0.8125rem; --t-base: 1rem; --t-grand: 1.25rem;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 400 var(--t-base)/1.6 var(--titre); }
a { color: var(--echo); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--echo); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--titre); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 7.5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 4.5vw, 1.9rem); font-weight: 700; }
h3 { font-size: var(--t-grand); font-weight: 600; }
p { margin: 0; }
code, .mono { font-family: var(--mono); }
.wrap { width: min(100% - 2 * var(--s4), 62rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--echo); color: var(--sur-echo); padding: var(--s3) var(--s4); z-index: 10; }
.skip:focus { left: var(--s4); top: var(--s4); }

/* En-tête */
.top { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding-block: var(--s4); }
.brand { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 700; font-size: var(--t-grand); color: var(--texte); text-decoration: none; min-height: 44px; }
.brand svg { width: 28px; height: 28px; }
.top nav { display: flex; gap: var(--s4); }
.top nav a { color: var(--texte-doux); text-decoration: none; font-size: var(--t-petit); min-height: 44px; display: inline-flex; align-items: center; }
.top nav a:hover { color: var(--texte); }

/* Accueil */
.hero { position: relative; padding-block: var(--s7) var(--s6); overflow: hidden; }
.hero .sonar { position: absolute; right: -9rem; top: -3rem; width: 24rem; height: 24rem; opacity: 0.16; pointer-events: none; z-index: 0; }
.hero > * { position: relative; z-index: 1; }
.kicker { font: 500 var(--t-petit)/1.5 var(--mono); color: var(--echo); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: var(--s4); }
.hero h1 { max-width: 16ch; }
.hero .promesse { margin-top: var(--s4); max-width: 36rem; color: var(--texte-doux); font-size: var(--t-grand); }
form.sonde { margin-top: var(--s6); display: grid; gap: var(--s3); max-width: 38rem; }
form.sonde label { font: 500 var(--t-petit)/1 var(--mono); color: var(--texte-doux); letter-spacing: 0.04em; }
.champ { display: flex; flex-direction: column; gap: var(--s3); }
input[type=text] { width: 100%; min-height: 52px; padding: 0 var(--s4); background: var(--surface); color: var(--texte); border: 2px solid var(--ligne); border-radius: var(--r); font: 400 var(--t-grand)/1 var(--mono); }
input[type=text]::placeholder { color: var(--texte-doux); opacity: 0.8; }
input[type=text]:focus-visible { border-color: var(--echo); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--echo) 35%, transparent); }
button, .btn { min-height: 52px; padding: 0 var(--s5); border: 0; border-radius: var(--r); background: var(--echo); color: var(--sur-echo); font: 700 var(--t-base)/1 var(--titre); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); text-decoration: none; }
button:hover:not(:disabled) { filter: brightness(1.08); }
button:disabled { opacity: 0.6; cursor: progress; }
button.discret { background: transparent; color: var(--texte); border: 2px solid var(--ligne); min-height: 44px; padding: 0 var(--s4); font-weight: 600; }
button.discret:hover:not(:disabled) { border-color: var(--echo); filter: none; }
.aide { font-size: var(--t-petit); color: var(--texte-doux); }
.preuves { display: grid; gap: var(--s3); margin-top: var(--s6); padding: 0; list-style: none; }
.preuves li { padding: var(--s3) var(--s4); border-left: 3px solid var(--echo); background: var(--surface); border-radius: 0 var(--r) var(--r) 0; font-size: var(--t-petit); color: var(--texte-doux); }
.preuves b { display: block; color: var(--texte); font: 500 var(--t-base)/1.3 var(--mono); }

/* État : attente et erreur */
.etat { margin-top: var(--s5); padding: var(--s4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--ligne); max-width: 38rem; }
.etat.erreur { border-color: var(--critique); }
.etat.erreur strong { color: var(--critique); }
.attente { display: flex; gap: var(--s3); align-items: center; }
.ping { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--echo); animation: ping 1.6s ease-out infinite; flex: none; }
@keyframes ping { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.sweep { transform-origin: 50% 50%; animation: balayage 7s linear infinite; }
@keyframes balayage { to { transform: rotate(360deg); } }

/* Sections génériques */
section.bloc { padding-block: var(--s6); border-top: 1px solid var(--ligne); }
section.bloc > h2 { margin-bottom: var(--s4); }
.etapes { display: grid; gap: var(--s4); padding: 0; list-style: none; counter-reset: e; }
.etapes li { counter-increment: e; padding-left: 3.2rem; position: relative; color: var(--texte-doux); }
.etapes li::before { content: counter(e, decimal-leading-zero); position: absolute; left: 0; top: 0; font: 500 var(--t-grand)/1.4 var(--mono); color: var(--echo); }
.etapes b { color: var(--texte); }
ul.limites { padding-left: var(--s5); color: var(--texte-doux); display: grid; gap: var(--s2); }

/* Rapport */
.rapport-tete { padding-block: var(--s6) var(--s4); display: grid; gap: var(--s3); }
.rapport-tete .hote { font: 500 var(--t-grand)/1.3 var(--mono); overflow-wrap: anywhere; }
.rapport-tete .meta { color: var(--texte-doux); font-size: var(--t-petit); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s2); }
.scores { display: grid; gap: var(--s5); padding-block: var(--s5); align-items: center; }
.radar { width: min(100%, 24rem); margin-inline: auto; display: block; }
.radar .anneau { fill: none; stroke: var(--ligne); stroke-width: 1; }
.radar .axe { stroke: var(--ligne); stroke-width: 1; }
.radar .zone { fill: color-mix(in srgb, var(--echo) 22%, transparent); stroke: var(--echo); stroke-width: 2.5; stroke-linejoin: round; }
.radar .pt { fill: var(--echo); stroke: var(--fond); stroke-width: 2; }
.radar text { fill: var(--texte-doux); font: 500 11px var(--mono); }
.radar .global { fill: var(--texte); font: 700 54px var(--titre); }
.radar .global-sub { fill: var(--texte-doux); font: 500 12px var(--mono); }
.familles { display: grid; gap: var(--s3); padding: 0; margin: 0; list-style: none; }
.famille { display: grid; grid-template-columns: 1fr auto; gap: var(--s1) var(--s3); align-items: baseline; }
.famille .nom { font-weight: 600; }
.famille .val { font: 500 var(--t-grand)/1 var(--mono); }
.barre { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.barre i { display: block; height: 100%; background: var(--echo); border-radius: 4px; }
.barre i.m { background: var(--alerte); } .barre i.b { background: var(--critique); }
.synthese { color: var(--texte-doux); font-size: var(--t-petit); }

.groupe { margin-top: var(--s6); }
.groupe > h2 { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s4); }
.groupe > h2 .n { font: 500 var(--t-base)/1 var(--mono); color: var(--texte-doux); }
.echo, .fichier, .scores > * { min-width: 0; }
.echo { background: var(--surface); border: 1px solid var(--ligne); border-left-width: 5px; border-radius: var(--r); padding: var(--s4); margin-bottom: var(--s3); display: grid; gap: var(--s3); }
.echo.critique { border-left-color: var(--critique); } .echo.important { border-left-color: var(--alerte); } .echo.mineur { border-left-color: var(--mineur); }
.echo .ligne1 { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: baseline; }
.badge { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 8px; border-radius: 4px; background: var(--surface-2); }
.critique .badge { color: var(--critique); } .important .badge { color: var(--alerte); } .mineur .badge { color: var(--mineur); }
.echo h3 { font-size: 1.05rem; flex: 1 1 14rem; }
.echo .id { font: 400 0.75rem/1 var(--mono); color: var(--texte-doux); }
.echo p { color: var(--texte-doux); }
.echo details { font-size: var(--t-petit); color: var(--texte-doux); }
.echo summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.echo details ul { margin: 0; padding-left: var(--s5); overflow-wrap: anywhere; font-family: var(--mono); }
.correction { position: relative; }
.correction pre, .fichier pre { margin: 0; padding: var(--s3) var(--s4); background: var(--surface-2); border-radius: var(--r); overflow-x: auto; font: 400 var(--t-petit)/1.5 var(--mono); color: var(--texte); white-space: pre-wrap; overflow-wrap: anywhere; }
.correction .label, .fichier .label { font: 500 0.75rem/1 var(--mono); color: var(--texte-doux); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: var(--s2); display: block; }
.copier { margin-top: var(--s2); }
.fichier { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--r); padding: var(--s4); margin-bottom: var(--s3); display: grid; gap: var(--s3); }
.fichier header { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: space-between; align-items: center; }
.fichier header b { font: 500 var(--t-base)/1 var(--mono); }
.fichier pre { max-height: 14rem; overflow: auto; }
.tableau { overflow-x: auto; border: 1px solid var(--ligne); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: var(--t-petit); }
th, td { text-align: left; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--ligne); white-space: nowrap; }
th { color: var(--texte-doux); font-weight: 500; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; }
td.mono, td:first-child { font-family: var(--mono); }
td:first-child { white-space: normal; overflow-wrap: anywhere; min-width: 12rem; }
tr:last-child td { border-bottom: 0; }
.duo { display: grid; gap: var(--s3); margin-bottom: var(--s4); }
.mesure { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--r); padding: var(--s4); }
.mesure b { display: block; font: 500 2rem/1.1 var(--mono); }
.mesure span { color: var(--texte-doux); font-size: var(--t-petit); }
.vide { padding: var(--s5); border: 1px dashed var(--ligne); border-radius: var(--r); color: var(--texte-doux); }

footer { margin-top: var(--s7); padding-block: var(--s6); border-top: 1px solid var(--ligne); color: var(--texte-doux); font-size: var(--t-petit); display: grid; gap: var(--s2); }

@media (min-width: 40rem) {
  .champ { flex-direction: row; }
  .champ input { flex: 1; }
  .preuves { grid-template-columns: repeat(3, 1fr); }
  .duo { grid-template-columns: 1fr 1fr; }
  .scores { grid-template-columns: 24rem 1fr; gap: var(--s7); }
  .hero .sonar { right: -4rem; opacity: 0.8; width: 26rem; height: 26rem; }
}
@media (min-width: 64rem) { .hero .sonar { right: 2rem; top: 1rem; width: 32rem; height: 32rem; } }
@media (prefers-reduced-motion: reduce) {
  .sweep, .ping { animation: none; }
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  :root { --fond: #fff; --surface: #fff; --surface-2: #f1f4f5; --ligne: #b7c4c8; --texte: #10242b; --texte-doux: #3c545b; --echo: #0a7a62; --alerte: #a15c00; --critique: #b3261e; --mineur: #1f5fae; }
  body { font-size: 11pt; }
  .top nav, .actions, .hero, #comment, .copier, button, .skip, .sonar { display: none !important; }
  .echo, .fichier { break-inside: avoid; }
  a { color: inherit; }
}

/* Premium */
.quota { font-size: var(--t-petit); color: var(--texte-doux); display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); align-items: center; }
.pastille { width: 10px; height: 10px; border-radius: 50%; background: var(--echo); box-shadow: 0 0 0 4px color-mix(in srgb, var(--echo) 25%, transparent); flex: none; display: inline-block; margin-right: var(--s2); }
.ariane { font: 400 var(--t-petit)/1.5 var(--mono); color: var(--texte-doux); padding-top: var(--s4); }
.ariane a { color: var(--texte-doux); }
.premium-tete { padding-block: var(--s6) var(--s5); display: grid; gap: var(--s4); }
.premium-tete h1 { max-width: 18ch; }
.premium-tete .promesse { max-width: 40rem; color: var(--texte-doux); font-size: var(--t-grand); }
.prix { display: grid; gap: var(--s3); margin-top: var(--s2); }
.prix p { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--r); padding: var(--s4); }
.prix b { display: block; font: 500 2rem/1.1 var(--mono); color: var(--texte); }
.prix span { color: var(--texte-doux); font-size: var(--t-petit); }
.prix .une-fois { background: transparent; border: 0; padding: 0; color: var(--echo); font-size: var(--t-petit); grid-column: 1 / -1; }
.carte-premium { background: var(--surface); border: 1px solid var(--ligne); border-left: 5px solid var(--echo); border-radius: var(--r-lg); padding: var(--s5); margin-block: var(--s5); display: grid; gap: var(--s4); }
.carte-premium form.sonde { margin-top: 0; }
.carte-premium .erreur { color: var(--critique); }
input[type=email] { width: 100%; min-height: 52px; padding: 0 var(--s4); background: var(--fond); color: var(--texte); border: 2px solid var(--ligne); border-radius: var(--r); font: 400 var(--t-grand)/1 var(--mono); }
.carte-premium input[type=text] { background: var(--fond); letter-spacing: 0.3em; }
input[type=email]:focus-visible { border-color: var(--echo); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--echo) 35%, transparent); }
.statut-premium { display: flex; align-items: center; font-weight: 700; font-size: var(--t-grand); }
.moyens { display: grid; gap: var(--s3); }
.sdk { min-height: 52px; }
.paiement-bouton { width: 100%; min-height: 52px; border: 0; border-radius: var(--r); background: var(--echo); color: var(--sur-echo); font: 700 var(--t-base)/1 var(--titre); cursor: pointer; }
.extrait { margin: var(--s4) 0 0; padding: var(--s4); background: var(--surface-2); border-radius: var(--r); font: 400 var(--t-petit)/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 22rem; overflow: auto; }
.note { margin-top: var(--s3); }
.faq { display: grid; gap: var(--s2); }
.faq details { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--r); padding: 0 var(--s4); }
.faq summary { cursor: pointer; min-height: 52px; display: flex; align-items: center; font-weight: 600; }
.faq details p { padding-bottom: var(--s4); color: var(--texte-doux); }
.agent { background: var(--surface); border: 1px solid var(--ligne); border-left: 5px solid var(--echo); border-radius: var(--r); padding: var(--s4); display: grid; gap: var(--s3); }
.agent > h2 { margin-bottom: 0; }
.agent .actions { align-items: center; }
@media (min-width: 40rem) {
  .prix { grid-template-columns: 1fr 1fr; }
  .moyens { grid-template-columns: 1fr 1fr; }
}
/* Le SDK FeexPay injecte des styles globaux de bouton : on réaffirme les nôtres dans la carte Premium. */
.carte-premium .moyens > button, .carte-premium .actions > .btn { font: 700 var(--t-base)/1.2 var(--titre); min-height: 52px; border-radius: var(--r); padding: var(--s2) var(--s5); }
.carte-premium .moyens > button:not(.discret), .carte-premium .actions > .btn { background: var(--echo); color: var(--sur-echo); border: 0; }
.carte-premium .moyens > button.discret { background: transparent; color: var(--texte); border: 2px solid var(--ligne); }
table.comparatif th, table.comparatif td { white-space: normal; min-width: 0; }
table.comparatif td:first-child { font-family: var(--titre); min-width: 9rem; }
table.comparatif td:last-child { color: var(--echo); }
@media print { .agent { display: none !important; } }

/* Pages de contenu : contrôles, méthode, guide */
.doc { padding-bottom: var(--s5); }
.doc > *, .doc article > * { max-width: 46rem; }
.doc h2 { margin: var(--s6) 0 var(--s3); }
.doc p, .doc ul, .doc ol, .doc pre, .doc .tableau { margin: 0 0 var(--s4); }
.doc ul, .doc ol { padding-left: var(--s5); display: grid; gap: var(--s2); }
.doc li::marker { color: var(--echo); }
.doc p code, .doc li code, .doc td code { font-size: 0.9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.doc pre { padding: var(--s3) var(--s4); background: var(--surface-2); border-radius: var(--r); font: 400 var(--t-petit)/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.doc .correction pre { margin: 0; }
.fiche-tete { padding-block: var(--s5) var(--s3); display: grid; gap: var(--s3); }
.fiche-tete .kicker { margin-bottom: 0; }
.fiche-tete .kicker a { color: inherit; }
.fiche-tete h1 { font-size: clamp(1.75rem, 6vw, 2.6rem); max-width: 24ch; }
.fiche-tete .promesse { color: var(--texte-doux); font-size: var(--t-grand); }
.fiche-meta { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.fiche-meta .id { font-size: 0.75rem; color: var(--texte-doux); }
.badge.critique { color: var(--critique); } .badge.important { color: var(--alerte); } .badge.mineur { color: var(--mineur); } .badge.google { color: var(--texte-doux); }
.note-google { border-left: 3px solid var(--mineur); padding-left: var(--s3); color: var(--texte-doux); font-size: var(--t-petit); }
.appel { margin-block: var(--s6); padding: var(--s5); background: var(--surface); border: 1px solid var(--ligne); border-left: 5px solid var(--echo); border-radius: var(--r-lg); display: grid; gap: var(--s3); }
.appel p { margin: 0; }
.appel .btn { width: 100%; }
.sommaire { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--r); padding: var(--s4); margin-block: var(--s4); }
.sommaire h2 { font-size: var(--t-base); margin: 0 0 var(--s2); }
.sommaire ul, .sommaire ol { margin: 0; }
.sommaire > ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.sommaire > ul a { display: inline-flex; min-height: 44px; align-items: center; }
.n { font: 500 var(--t-petit)/1 var(--mono); color: var(--texte-doux); }
.famille-controles { padding-top: var(--s5); border-top: 1px solid var(--ligne); margin-top: var(--s5); }
.famille-controles h2 { margin-top: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: baseline; }
.liste-controles { list-style: none; padding: 0 !important; display: grid; gap: var(--s3) !important; }
.liste-controles li { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--r); padding: var(--s3) var(--s4); display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.liste-controles li > a { font-weight: 600; flex: 1 1 16rem; min-height: 32px; display: inline-flex; align-items: center; }
.liste-controles li p { flex-basis: 100%; margin: 0; color: var(--texte-doux); font-size: var(--t-petit); }
.liste-controles.compacte li { padding: var(--s2) var(--s4); }
.guide .chapeau { font-size: var(--t-grand); color: var(--texte); }
ul.coches { list-style: none; padding-left: 0; }
ul.coches li { padding-left: 1.8rem; position: relative; }
ul.coches li::before { content: ''; position: absolute; left: 0; top: 0.35em; width: 1rem; height: 1rem; border: 2px solid var(--echo); border-radius: 4px; }
.doc .formule { max-width: 46rem; }
@media (min-width: 40rem) { .appel .btn { width: auto; } }
.echo a.id { display: inline-flex; align-items: center; min-height: 32px; text-decoration-style: dotted; }
.echo a.id:hover { color: var(--echo); }
