/* ------------------------------------------------------------------
   Gabarit outil — feuille de style unique.
   Aucune dépendance externe : pas de police web, pas de framework.
   Objectif : premier rendu sous 1 s sur mobile 4G.
   La couleur d'accent est injectée par build.mjs depuis site.config.json.
   ------------------------------------------------------------------ */

:root {
  color-scheme: light;
  /* --accent-base est reecrit par _layout.html depuis site.couleurAccent.
     Ne jamais utiliser --accent-base directement : passer par --accent, qui
     s'eclaircit automatiquement en theme sombre pour rester lisible. */
  --accent-base: #2a78d6;
  --accent: var(--accent-base);
  --accent-ink: #ffffff;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f2f1ed;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --line: #e1e0d9;
  --border: rgba(11, 11, 11, 0.10);
  --good: #006c08;
  --warn: #fab219;
  --crit: #d03b3b;
  --wash: color-mix(in srgb, var(--accent) 7%, transparent);
  --voile: color-mix(in srgb, var(--accent) 13%, transparent);
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
  /* --police-* et --accent-{principale,action,secondaire} sont réécrits par
     _layout.html depuis site.identite quand identite.police.actif ou
     identite.palette.actif valent true. Par défaut ils retombent sur les
     polices système et sur --accent : un site qui n'active rien rend un
     pixel identique à avant l'ajout de ce mécanisme. */
  --police-titres: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --police-corps: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --accent-principale: var(--accent);
  --accent-action: var(--accent);
  --accent-secondaire: var(--accent);
  /* --accent-ink s'inverse par theme parce que --accent lui-meme s'eclaircit
     en sombre : un accent pale y demande une encre foncee. --accent-action
     ne suit pas cette regle — une palette a teintes fixes n'eclaircit pas sa
     couleur d'action par theme — donc son encre reste blanche dans les deux. */
  --accent-action-ink: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    /* Un bleu institutionnel est trop sombre sur fond noir : on l'eclaircit
       et on inverse l'encre des boutons pleins, sinon le contraste tombe
       sous le seuil WCAG AA. */
    --accent: color-mix(in srgb, var(--accent-base) 58%, #ffffff);
    --accent-ink: #08182b;
    --good: #4fbe57;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #232322;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --line: #2c2c2a;
    --border: rgba(255,255,255,0.10);
    --wash: color-mix(in srgb, var(--accent) 16%, transparent);
    --voile: color-mix(in srgb, var(--accent) 22%, transparent);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: color-mix(in srgb, var(--accent-base) 58%, #ffffff);
  --accent-ink: #08182b;
  --good: #4fbe57;
  --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232322;
  --ink: #ffffff; --ink-2: #c3c2b7; --muted: #898781;
  --line: #2c2c2a; --border: rgba(255,255,255,0.10);
  --wash: color-mix(in srgb, var(--accent) 16%, transparent);
  --voile: color-mix(in srgb, var(--accent) 22%, transparent);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--police-corps);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ---------- en-tête ---------- */
.site-header {
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: saturate(180%) blur(8px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 60px;
}
.brand {
  font-family: var(--police-titres);
  font-weight: 650; font-size: 16.5px; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; display: inline-flex;
  align-items: center; gap: 9px;
}
.brand .mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(140deg, var(--accent),
              color-mix(in srgb, var(--accent) 62%, #000));
  flex-shrink: 0;
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-size: 14px;
  padding: 7px 11px; border-radius: 8px;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.icon-btn {
  background: none; border: 1px solid var(--border); color: var(--ink-2);
  border-radius: 8px; width: 34px; height: 34px; cursor: pointer;
  display: grid; place-items: center; font-size: 15px; font-family: inherit;
}
.icon-btn:hover { color: var(--ink); }

/* ---------- sélecteur de langue ---------- */
.langues { display: flex; align-items: center; gap: 4px; }
.nav .langues a {
  border: 1px solid var(--border); font-size: 13px;
  padding: 6px 10px; line-height: 1.2;
}
.nav .langues a:hover { border-color: var(--accent); color: var(--ink); }

/* Sous 620 px les liens de navigation disparaissent au profit du seul
   outil. Le lien de langue, lui, reste : un lecteur anglophone arrivé sur
   la version française n'a aucun autre moyen d'en sortir, et il ne pense
   pas à faire pivoter son téléphone pour le découvrir. */
@media (max-width: 620px) {
  .nav a { display: none; }
  .nav .langues a { display: inline-block; }
}

/* ---------- hero ---------- */
.hero {
  padding: 52px 0 38px;
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 320px at 12% -30%, var(--voile), transparent 68%),
    var(--surface);
  border-bottom: 1px solid var(--line);
}
/* Grille de points decorative, dessinee en CSS pur : aucune image a charger,
   coherente avec le "premier rendu sous 1 s" du gabarit. Coupee court a
   droite pour ne jamais passer sous le texte ni gener la lecture. */
.hero::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0;
  width: min(46%, 420px);
  background-image: radial-gradient(var(--border) 1.4px, transparent 1.4px);
  background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(to left, #000 0%, transparent 85%);
  mask-image: linear-gradient(to left, #000 0%, transparent 85%);
  pointer-events: none;
}
@media (max-width: 860px) { .hero::after { display: none; } }
h1 {
  font-family: var(--police-titres);
  font-size: clamp(25px, 4.4vw, 36px); line-height: 1.18;
  letter-spacing: -0.022em; margin: 0 0 12px; max-width: 20ch;
}
/* Filet d'accent sous le titre : la seule touche de couleur du haut de page
   qui ne depende pas d'un aplat, donc lisible dans les deux themes. */
h1::after {
  content: ""; display: block; width: 54px; height: 3px; border-radius: 2px;
  background: var(--accent); margin-top: 14px;
}
.hero .lede {
  color: var(--ink-2); font-size: 17px; margin: 14px 0 0; max-width: 62ch;
}

/* ---------- outil ---------- */
.tool {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  margin: 30px 0 44px; align-items: start;
}
@media (max-width: 860px) { .tool { grid-template-columns: 1fr; gap: 20px; } }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
}
@media (max-width: 480px) { .panel { padding: 22px; } }
.panel h2 { font-size: 15px; margin: 0 0 20px; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--accent); font-weight: 600; }

.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block; font-size: 15.5px; font-weight: 550;
  margin-bottom: 7px; color: var(--ink);
}
.field .aide { font-size: 13.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.field label .opt {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); background: var(--surface-2);
  border-radius: 5px; padding: 2px 6px; margin-left: 8px; vertical-align: 1px;
}

/* Bloc replie des champs facultatifs, en bas du formulaire. */
.facultatifs {
  margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px;
}
.facultatifs > summary {
  cursor: pointer; font-size: 14.5px; font-weight: 550; color: var(--accent);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.facultatifs > summary::-webkit-details-marker { display: none; }
.facultatifs > summary::before {
  content: ""; width: 7px; height: 7px; flex-shrink: 0;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s;
}
.facultatifs[open] > summary::before { transform: rotate(45deg); }
.facultatifs > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.facultatifs > .aide { margin: 10px 0 16px; max-width: 54ch; }
.facultatifs > .field:first-of-type { margin-top: 16px; }

.input-wrap { position: relative; display: flex; align-items: center; }
.field input[type="number"], .field input[type="text"], .field select {
  width: 100%; font: inherit; font-size: 16px;
  padding: 12px 14px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--page);
  color: var(--ink); font-variant-numeric: tabular-nums;
  appearance: none; -webkit-appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  padding-right: 34px;
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent;
}
/* Liste combinee : un seul champ, qui deroule au clic et filtre a la frappe.
   Construite par app.js des qu'un menu depasse `seuilRecherche` options. */
.combo { position: relative; width: 100%; }
.combo .combo-champ {
  width: 100%; font: inherit; font-size: 16px;
  padding: 10px 34px 10px 12px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--page); color: var(--ink);
  text-overflow: ellipsis;
}
.combo .combo-champ::placeholder { color: var(--muted); }
.combo .combo-champ:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent;
}
.combo .combo-fleche {
  position: absolute; right: 13px; top: 18px; pointer-events: none;
  width: 9px; height: 9px; border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px);
}
.combo .combo-liste {
  position: absolute; z-index: 40; top: calc(100% + 5px); left: 0; right: 0;
  max-height: 290px; overflow-y: auto; margin: 0; padding: 5px;
  list-style: none; background: var(--surface); color: var(--ink);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.combo .combo-liste li {
  padding: 8px 10px; border-radius: 7px; font-size: 14.5px;
  cursor: pointer; line-height: 1.4;
}
.combo .combo-liste li:hover { background: var(--surface-2); }
.combo .combo-liste li[aria-selected="true"] {
  background: var(--accent); color: var(--accent-ink);
}
.combo .combo-vide { color: var(--muted); cursor: default; font-style: italic; }
.combo .combo-vide:hover { background: none; }

.field .unite {
  position: absolute; right: 12px; color: var(--muted);
  font-size: 14px; pointer-events: none;
}
.field.has-unite input { padding-right: 62px; }

/* `[hidden]` doit battre les `display` explicites des composants (.btn est
   en inline-flex) : sans le !important, un bloc verrouillé reste visible. */
[hidden] { display: none !important; }

.field label.switch { display: flex; align-items: center; gap: 11px;
  cursor: pointer; font-weight: 550; margin-bottom: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 42px; height: 24px; border-radius: 99px; background: var(--surface-2);
  border: 1px solid var(--border); position: relative; transition: background .15s; flex-shrink: 0;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--muted);
  transition: transform .15s, background .15s;
}
.switch input:checked + .track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- résultat ---------- */
.result { position: sticky; top: 80px; }
@media (max-width: 860px) { .result { position: static; } }

.headline { padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.headline .k { font-size: 13px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.04em; font-weight: 600; }
.headline .v {
  font-size: clamp(34px, 6vw, 46px); font-weight: 650; letter-spacing: -0.03em;
  line-height: 1.05; margin: 6px 0 2px; color: var(--accent);
}
.headline .sub { font-size: 14px; color: var(--ink-2); }

.lines { list-style: none; padding: 0; margin: 0; }
.lines li {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14.5px;
}
.lines li:last-child { border-bottom: 0; }
.lines .l { color: var(--ink-2); }
.lines .r { font-variant-numeric: tabular-nums; font-weight: 550; white-space: nowrap; }
.lines li.total { border-top: 1px solid var(--ink-2); border-bottom: 0;
  margin: 8px -12px 0; padding: 12px; font-weight: 650;
  background: var(--wash); border-radius: 0 0 9px 9px; }
.lines li.total .l { color: var(--ink); }
.lines li.total .r { color: var(--accent); font-size: 16px; }
.lines .pct { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 7px; }

.warnings { margin: 16px 0 0; padding: 0; list-style: none; }
.warnings li {
  font-size: 13px; color: var(--ink-2); background: var(--wash);
  border-radius: 8px; padding: 9px 12px 9px 30px; margin-bottom: 7px; line-height: 1.45;
  position: relative;
}
/* Petit repere visuel dessine en CSS, pas une image : coherent avec le
   principe "aucune dependance externe" du gabarit. */
.warnings li::before {
  content: "i"; position: absolute; left: 10px; top: 9px;
  width: 15px; height: 15px; border-radius: 50%; background: var(--accent);
  color: var(--accent-ink); font-size: 10.5px; font-weight: 700; font-style: normal;
  font-family: Georgia, serif; display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
/* La ligne "voir plus d'avertissements" reste un <li> normal, donc elle
   herite du badge "i" ci-dessus : lui redonner le retrait gauche standard
   et recentrer le badge verticalement plutot que de fixer un top: 9px
   pense pour une ligne pleine hauteur. */
.warnings li.warnings-toggle { background: none; padding: 2px 0 0 30px; }
.warnings li.warnings-toggle::before { top: 50%; transform: translateY(-50%); }

/* Repli des lignes de detail et des avertissements au-dela du premier
   apercu : construit dynamiquement par app.js, meme mecanique visuelle que
   .facultatifs (chevron a 45deg qui pivote a l'ouverture). */
.lines-more, .warnings-more { margin-top: 4px; }
.lines-more > summary, .warnings-more > summary {
  cursor: pointer; font-size: 13.5px; font-weight: 550; color: var(--accent);
  list-style: none; display: flex; align-items: center; gap: 7px; padding: 7px 0;
}
.lines-more > summary::-webkit-details-marker,
.warnings-more > summary::-webkit-details-marker { display: none; }
.lines-more > summary::before, .warnings-more > summary::before {
  content: ""; width: 6px; height: 6px; flex-shrink: 0;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s;
}
.lines-more[open] > summary::before, .warnings-more[open] > summary::before {
  transform: rotate(45deg);
}
.lines-more > summary:focus-visible, .warnings-more > summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.lines-more .lines { margin-top: 2px; }
.lines-more .lines li { padding: 7px 0; }
.warnings-more .warnings { margin-top: 2px; }

.actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 20px; }
.btn {
  font: inherit; font-size: 14.5px; font-weight: 550; cursor: pointer;
  border-radius: 9px; padding: 10px 16px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 7px;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent-action); color: var(--accent-action-ink); border-color: transparent; }
.btn-primary:hover { filter: brightness(1.07); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.note-calcul { font-size: 12.5px; color: var(--muted); margin-top: 16px; line-height: 1.5; }

/* ---------- offre payante ---------- */
.offer {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px; margin: 36px 0;
}
.offer h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.offer .accroche { color: var(--ink-2); margin: 0 0 14px; max-width: 60ch; }
.offer ul { margin: 0 0 18px; padding-left: 20px; color: var(--ink-2); font-size: 14.5px; }
.offer li { margin: 4px 0; }
.offer .prix { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; margin-right: 12px; }
.offer .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.unlock { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.unlock input {
  font: inherit; font-size: 14px; padding: 8px 11px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--page); color: var(--ink); width: 190px;
}
.unlock .msg { font-size: 13px; }
.unlock .msg.ok { color: var(--good); }
.unlock .msg.ko { color: var(--crit); }

/* ---------- renvoi vers la page FAQ / guide ---------- */
.prose-teaser {
  max-width: none; margin: 40px 0; padding: 26px 28px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.prose-teaser h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.01em; }
.prose-teaser p { margin: 0; color: var(--ink-2); font-size: 14.5px; max-width: 52ch; }
.prose-teaser .btn { flex-shrink: 0; }

/* ---------- contenu éditorial ---------- */
.prose { max-width: 68ch; }
.prose h2 { font-size: 22px; margin: 40px 0 10px; letter-spacing: -0.015em; }
.prose h3 { font-size: 17px; margin: 26px 0 6px; }
.prose p { color: var(--ink-2); margin: 0 0 14px; }
.prose ul, .prose ol { color: var(--ink-2); padding-left: 22px; }
.prose li { margin: 5px 0; }
.prose a { color: var(--accent); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 16px 0; }
.prose th { text-align: left; font-size: 12.5px; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted); border-bottom: 1px solid var(--line); padding: 8px 10px; }
.prose td { padding: 9px 10px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.prose td:last-child, .prose th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

.faq details {
  border-bottom: 1px solid var(--line); padding: 14px 0;
}
.faq summary {
  cursor: pointer; font-weight: 550; font-size: 15.5px; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 19px; flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); font-size: 14.5px; }

.sources-list { list-style: none; padding: 0; font-size: 14px; }
.sources-list li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.sources-list .date { color: var(--muted); font-size: 12.5px; }

/* ---------- pied ---------- */
.site-footer {
  margin-top: 72px; border-top: 1px solid var(--line);
  background: var(--surface); padding: 30px 0 44px;
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-2); text-decoration: none; font-size: 14px; display: block; padding: 3px 0; }
.site-footer a:hover { color: var(--ink); }
.site-footer .legal { color: var(--muted); font-size: 12.5px; max-width: 46ch; line-height: 1.5; }

.skip {
  position: absolute; left: -9999px; background: var(--accent); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip:focus { left: 0; top: 0; }

/* ---------- publicite ----------
   La mention est au-dessus du bloc, jamais dedans : elle doit se lire
   avant qu'on ait commence a prendre l'encart pour du contenu. */
.pub { margin: 30px 0; }
.pub-mention {
  display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.pub-carte {
  display: block; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 18px 20px; text-decoration: none; color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pub-carte:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.pub-titre { display: block; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; margin-bottom: 4px; }
.pub-texte { display: block; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; max-width: 62ch; }
.pub-lien { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 550; color: var(--accent); }
.pub-lien::after { content: " \2192"; }

/* ---------- banniere de consentement ---------- */
.consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: var(--shadow);
}
.consent[hidden] { display: none; }
.consent-corps {
  max-width: 960px; margin: 0 auto; padding: 18px 20px;
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
}
.consent-corps h2 { font-size: 15px; margin: 0; flex: 0 0 auto; }
.consent-corps p { margin: 0; flex: 1 1 320px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.consent-actions { display: flex; gap: 10px; margin-left: auto; }
@media (max-width: 600px) {
  .consent-actions { width: 100%; margin-left: 0; }
  .consent-actions .btn { flex: 1; }
}

@media print {
  .site-header, .site-footer, .actions, .offer, .form-panel { display: none !important; }
  /* Le repli "+ voir plus" n'a de sens qu'a l'ecran : sur papier, rien n'est
     cliquable, donc tout le detail et tous les avertissements sortent en
     clair, et le triangle de bascule disparait. */
  .lines-more, .warnings-more { display: block !important; }
  .lines-more > summary, .warnings-more > summary { display: none !important; }
  /* Le PDF sert de canal de distribution : un gestionnaire l'imprime pour sa
     direction. Y laisser un encart commandite transformerait sa note interne
     en prospectus, et c'est lui qui en porterait le cout. */
  .pub, .consent { display: none !important; }
  /* Le PDF est un livrable vendu : il porte le resultat et les sources
     datees, pas le contenu editorial ni la FAQ de la page d'accueil. */
  .prose:not(.prose-sources) { display: none !important; }
  .hero .lede { display: none !important; }
  body { background: #fff; color: #000; }
  .panel { border: 0; box-shadow: none; padding: 0; }
  /* Les aplats teintes ruinent une impression laser : on les retire, mais on
     garde le filet sous le titre, qui sort proprement en noir. */
  .hero { background: none; border-bottom: 0; padding: 0 0 12px; }
  .lines li.total { background: none; margin: 8px 0 0; padding: 12px 0 0; }
}

/* ==================================================================
   Sections de fiche — rendu générique pour annuaire / comparateur /
   fiche métier. Un résultat qui renvoie `sections` est rendu dans
   #res-sections ; un calculateur classique n'en renvoie pas et rien
   ne change pour lui.
   ================================================================== */
#res-sections { margin-top: 18px; }
#res-sections:empty { display: none; }

.section {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
  padding: 22px 22px 20px; margin-bottom: 18px;
}
.sec-titre {
  margin: 0 0 4px; font-size: 16.5px; font-weight: 650;
  letter-spacing: -0.01em;
}
.section.ton-accent .sec-titre { color: var(--accent); }
.section.ton-cyan .sec-titre { color: #0e7490; }
.sec-intro { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.section-detail { margin: 10px 0 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-detail summary { cursor: pointer; padding: 10px 0; color: var(--accent); font-size: 13.5px; font-weight: 600; }
.section-detail-titre { margin: 8px 0 4px; font-size: 13px; color: var(--ink-2); }
.section-detail-liste { margin: 0 0 10px; padding-left: 20px; color: var(--muted); font-size: 13px; }
.section-detail-liste li { margin: 4px 0; }

.article { display: flex; gap: 10px; margin-bottom: 9px; font-size: 15px; align-items: baseline; }
.article:last-child { margin-bottom: 0; }
.article-icone { flex: 0 0 22px; text-align: center; }

.cartes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px; margin-top: 12px;
}
.carte {
  position: relative; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.carte.ton-accent { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.carte-rang {
  position: absolute; top: 12px; right: 12px; font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px;
}
.carte-titre {
  font-weight: 650; font-size: 15.5px; line-height: 1.3;
  display: flex; align-items: center; gap: 8px; padding-right: 40px;
}
.carte-score {
  flex: 0 0 auto; font-size: 13px; font-weight: 700; min-width: 32px; text-align: center;
  padding: 4px 6px; border-radius: 8px; background: var(--wash);
}
.carte-score.score-haut { color: var(--good); }
.carte-score.score-moyen { color: var(--accent); }
.carte-score.score-bas { color: var(--warn); }
.carte-sous { color: var(--muted); font-size: 13px; }

.pastilles { display: flex; flex-wrap: wrap; gap: 6px; }
.pastille {
  font-size: 11px; color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.pastille.ton-vert, .pastille.ton-ambre, .pastille.ton-rouge,
.pastille.ton-orange, .pastille.ton-accent, .pastille.ton-cyan {
  background: color-mix(in srgb, currentColor 12%, transparent);
}
.ton-vert { color: var(--good); }
.ton-ambre { color: var(--warn); }
.ton-rouge { color: var(--crit); }
.ton-orange { color: #d97706; }
.ton-accent { color: var(--accent); }
.ton-cyan { color: #0e7490; }

.metriques { display: flex; flex-wrap: wrap; gap: 14px; }
.metrique { display: flex; flex-direction: column; gap: 1px; }
.m-lib { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.m-val { font-size: 19px; font-weight: 800; }
.m-val.ton-hausse { color: var(--good); }
.m-val.ton-baisse { color: var(--crit); }

.barres { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.barre { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.barre-lib { flex: 1; line-height: 1.35; }
.barre-piste { flex: 0 0 64px; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.barre-piste i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.barre-piste i.ton-vert { background: var(--good); }
.barre-piste i.ton-rouge { background: var(--crit); }
.barre-piste i.ton-ambre { background: var(--warn); }
.barre-piste i.ton-orange { background: #d97706; }
.barre-piste i.ton-cyan { background: #0e7490; }
.barre-w { font-size: 11px; color: var(--muted); width: 34px; text-align: right; }
.carte-liste-visible {
  list-style: none; margin: 2px 0 0; padding: 0;
  display: grid; gap: 6px; color: var(--ink-2); font-size: 13px;
}
.carte-liste-visible li { position: relative; padding-left: 16px; line-height: 1.4; }
.carte-liste-visible li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.carte.ton-rouge .carte-liste-visible li::before { background: #F87171; }
.carte.ton-vert .carte-liste-visible li::before { background: #34D399; }

.carte-detail { margin-top: 4px; }
.carte-detail summary { font-size: 13px; color: var(--accent); cursor: pointer; font-weight: 600; }
.carte-detail .ligne { font-size: 13.5px; margin-top: 6px; line-height: 1.5; }
.carte-indication {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 2px;
  color: var(--accent); font-size: 12px; font-weight: 650;
}
.carte-indication::after { content: "↓"; font-size: 14px; transition: transform .15s; }
.carte-ouverte .carte-indication::after { transform: rotate(180deg); }
.carte-ouverte .carte-indication { display: none; }

.carte-pied { font-size: 13px; color: var(--muted); margin-top: 2px; }
.sec-pied { font-size: 13px; color: var(--muted); margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.carte-lien {
  margin-top: auto; align-self: flex-end; font-size: 12.5px; font-weight: 650;
  color: var(--accent-action-ink); background: var(--accent-action);
  border: 1px solid transparent; border-radius: 8px; padding: 7px 11px;
  text-decoration: none; white-space: nowrap;
}
.carte-lien:hover { filter: brightness(1.08); }

.partage-options { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-partage-social {
  width: 32px; height: 32px; padding: 0; justify-content: center;
  border-radius: 50%; font-size: 14px; font-weight: 800; line-height: 1;
}
.logo-linkedin { background: #0A66C2; color: #fff; }
.logo-facebook { background: #1877F2; color: #fff; font-family: Arial, sans-serif; font-size: 20px; }
.logo-x { background: #000; color: #fff; }
.logo-whatsapp { background: #25D366; color: #fff; font-size: 18px; }

/* Les teintes orange et cyan sont fixées en dur : trop sombres sur fond
   noir, on les éclaircit en thème sombre, comme le fait déjà la coque
   pour --good. Rouge et ambre suivent les variables --crit/--warn de la
   coque, qui restent cohérentes dans les deux thèmes. */
:root[data-theme="dark"] .ton-orange { color: #fdba74; }
:root[data-theme="dark"] .ton-cyan { color: #67e8f9; }
:root[data-theme="dark"] .section.ton-cyan .sec-titre { color: #67e8f9; }
:root[data-theme="dark"] .barre-piste i.ton-orange { background: #fdba74; }
:root[data-theme="dark"] .barre-piste i.ton-cyan { background: #67e8f9; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .ton-orange { color: #fdba74; }
  :root:where(:not([data-theme="light"])) .ton-cyan { color: #67e8f9; }
  :root:where(:not([data-theme="light"])) .section.ton-cyan .sec-titre { color: #67e8f9; }
  :root:where(:not([data-theme="light"])) .barre-piste i.ton-orange { background: #fdba74; }
  :root:where(:not([data-theme="light"])) .barre-piste i.ton-cyan { background: #67e8f9; }
}

/* ==================================================================
   PIVOT - Job & AI : identité visuelle (déclarée en dernier : écrase la coque).
   Refonte 28/08 v3 : fond blanc propre + teal. Score en flux normal (pas de
   chevauchement). Divergence volontaire, documentée dans ETAT.md.

   Contrat visuel :
   THESIS - clarté : l'IA accélère ton métier, voici ton plan pour avancer.
   OWN-WORLD - blanc, teal profond, Space Grotesk/DM Sans, cartes à bordures fines.
   STORY - on découvre son métier (1), on mesure sa préparation (2), on repart
           avec un plan (3).
   FIRST VIEWPORT - titre + recherche + score (chiffre + barre) + CTA.
   FORM - teal sur blanc, un seul CTA principal.
   FINISH - non revu et non documenté = inachevé.
   ================================================================== */

/* ---------- jetons ---------- */
:root, :root[data-theme="dark"], :root[data-theme="light"] {
  color-scheme: light;
  --teal: #0F766E;
  --teal-fonce: #115E59;
  --teal-clair: #14B8A6;
  --accent-base: var(--teal);
  --accent: var(--teal);
  --accent-ink: #ffffff;
  --accent-action: var(--teal);
  --accent-action-ink: #ffffff;
  --page: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F5F7F9;
  --surface-3: #ECEFF2;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #4B5563;
  --line: #E5E7EB;
  --border: #D1D5DB;
  --good: #059669;
  --warn: #D97706;
  --crit: #DC2626;
  --wash: rgba(15, 118, 110, 0.08);
  --voile: rgba(15, 118, 110, 0.12);
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(17,24,39,.05), 0 10px 30px rgba(17,24,39,.07);
  --shadow-eleve: 0 2px 8px rgba(17,24,39,.06), 0 24px 60px rgba(17,24,39,.12);
  --grad-teal: linear-gradient(135deg, var(--teal-fonce), var(--teal) 60%, var(--teal));
  --police-titres: 'Space Grotesk', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --police-corps: 'DM Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- surface de base ---------- */
body {
  background: var(--page);
  font-feature-settings: "ss01" on;
}

.wrap { max-width: 960px; }

::selection { background: rgba(15, 118, 110, 0.18); color: var(--ink); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 3px; }
html { scrollbar-color: var(--teal) var(--surface-3); }

/* ---------- en-tête ---------- */
.site-header {
  background: rgba(255, 255, 255, 0.88);
  border-top: 0;
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(160%) blur(10px);
}
.site-header .wrap { height: 64px; }
.brand {
  background: none; color: var(--ink);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--police-titres); font-weight: 700; font-size: 21px; letter-spacing: -0.02em;
}
.logo-mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand-txt { display: inline-flex; align-items: baseline; color: var(--ink); }
.brand-amp {
  background: linear-gradient(90deg, var(--teal), var(--teal-clair));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding: 0 1px;
}
.nav a { border-radius: 9px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; margin-left: 4px;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--ink); cursor: pointer;
  font-size: 17px; line-height: 1;
}
.icon-btn:hover { border-color: var(--teal); }
/* fond blanc unique : le bouton de thème n'a plus d'effet */
.icon-btn#bt-theme { display: none; }

/* ---------- progression 3 étapes ---------- */
.etapes {
  list-style: none; margin: 0 0 26px; padding: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
}
.etape {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.etape .n {
  display: grid; place-items: center; width: 22px; height: 22px;
  border-radius: 50%; border: 1px solid var(--line); color: var(--muted);
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.etape::after { content: ""; width: 22px; height: 1px; background: var(--line); margin-left: 8px; }
.etape:last-child::after { display: none; }
body[data-etape="1"] .etape[data-cible="1"],
body[data-etape="2"] .etape[data-cible="2"],
body[data-etape="3"] .etape[data-cible="3"] { color: var(--ink); border-color: var(--teal); background: var(--wash); }
body[data-etape="1"] .etape[data-cible="1"] .n,
body[data-etape="2"] .etape[data-cible="2"] .n,
body[data-etape="3"] .etape[data-cible="3"] .n { background: var(--teal); border-color: transparent; color: #ffffff; }
body[data-etape="2"] .etape[data-cible="1"] .n,
body[data-etape="3"] .etape[data-cible="1"] .n,
body[data-etape="3"] .etape[data-cible="2"] .n { background: var(--surface-3); border-color: var(--teal); color: var(--teal); }
@media (max-width: 560px) {
  .etape { padding: 6px 10px; gap: 7px; font-size: 12px; }
  .etape::after { width: 10px; margin-left: 6px; }
}

/* ---------- héro ---------- */
.hero { background: none; padding: 44px 0 22px; border-bottom: 0; }
.hero::after { display: none; }
h1::after { display: none; }
.hero h1 {
  font-family: var(--police-titres);
  font-size: clamp(30px, 5.4vw, 48px); line-height: 1.06;
  letter-spacing: -0.028em; max-width: 22ch; margin: 0 auto 14px; text-align: center;
}
.hero .lede { color: var(--muted); font-size: 16.5px; text-align: center; margin: 0 auto; max-width: 56ch; }

/* ---------- outil : une colonne, sans boîtes ---------- */
.tool { display: block; margin: 24px 0 44px; }
.panel { background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0 0 22px; }
.panel h2 { display: none; }
.result { position: static; }

/* ---------- recherche métier ---------- */
.field { margin-bottom: 0; }
.field label { display: none; }
.field .aide { color: var(--muted); font-size: 13px; margin-top: 8px; }
.combo { max-width: 620px; margin: 0 auto; }
.combo .combo-champ {
  padding: 18px 22px; font-size: 17px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.combo .combo-champ::placeholder { color: var(--muted); }
.combo .combo-champ:focus {
  border-color: var(--teal); outline: 0;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}
.combo .combo-fleche { top: 24px; right: 20px; border-color: var(--muted); }
.combo .combo-liste {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 6px; box-shadow: var(--shadow-eleve);
}
.combo .combo-liste li { font-size: 15px; padding: 10px 12px; border-radius: 10px; }
.combo .combo-liste li:hover { background: var(--surface-2); }
.combo .combo-liste li[aria-selected="true"] { background: var(--wash); color: var(--teal-fonce); }

/* exemples cliquables */
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.chip {
  font-size: 13px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2);
  text-decoration: none; cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.chip:hover { background: var(--wash); border-color: var(--teal); color: var(--teal-fonce); }

/* ---------- score : chiffre + barre, en flux normal (pas de chevauchement) ---------- */
.headline {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; padding: 18px 20px 16px; border-bottom: 0; margin-bottom: 4px;
}
.headline .k { font-family: var(--police-titres); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); text-transform: none; }
.score-eyebrow { display: none; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--teal); margin: 0; }
body[data-etape="1"] .score-eyebrow { display: block; }
/* étape 1 : détache le badge de la boîte de recherche au-dessus */
body[data-etape="1"] .result { margin-top: 16px; }
.headline .v { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; color: var(--teal); }
.headline .sub { color: var(--muted); font-size: 14.5px; max-width: 560px; line-height: 1.6; }

/* score numérique : grand chiffre + barre de progression (::after en flux) */
.headline.score-numerique {
  position: static;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 14px 20px 18px;
}
.headline.score-numerique .v {
  width: auto; height: auto; margin: 0;
  display: inline-flex; align-items: baseline; justify-content: center; gap: 2px;
  font-size: clamp(52px, 8vw, 84px); font-weight: 800;
  letter-spacing: -0.035em; line-height: 1.05;
  color: var(--couleur-score, var(--teal));
  font-variant-numeric: tabular-nums;
  background: none; box-shadow: none;
}
.headline.score-numerique .v::before { display: none; }
.headline.score-numerique .v::after {
  content: "%"; font-size: 0.4em; font-weight: 800;
  color: var(--couleur-score, var(--teal)); letter-spacing: 0; margin: 0;
}
.headline.score-numerique .sub { order: 4; }
.headline.score-numerique::after {
  content: ""; order: 3; flex-shrink: 0;
  width: 100%; max-width: 460px; height: 10px; border-radius: 99px;
  background:
    linear-gradient(90deg,
      var(--couleur-score) 0%, var(--couleur-score) calc(var(--score, 0) * 1%),
      var(--line) calc(var(--score, 0) * 1%));
}
.headline.score-rouge { --couleur-score: var(--crit); }
.headline.score-orange { --couleur-score: #D97706; }
.headline.score-ambre { --couleur-score: var(--warn); }
.headline.score-vert { --couleur-score: var(--good); }

/* avertissements - discrets */
.warnings li { background: var(--wash); border: 1px solid var(--line); color: var(--ink-2); }
.warnings li::before { background: var(--teal); color: #ffffff; }
.warnings li.warnings-toggle { background: none; border: 0; }
.warnings li.warnings-toggle::before { display: none; }

/* ---------- CTA ---------- */
.hero-result {
  display: grid; grid-template-columns: 1fr 340px; align-items: center;
  gap: 36px; max-width: 860px; margin: 0 auto;
}
.hero-result .headline { align-items: center; text-align: center; justify-self: center; padding: 0; margin-bottom: 0; }
.hero-cta { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
#bt-score {
  width: 100%; background: var(--grad-teal); color: #ffffff; border: 0;
  border-radius: 12px; padding: 13px 18px; font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  white-space: nowrap;
  text-align: center; text-decoration: none;
  box-shadow: 0 1px 2px rgba(17,24,39,.08), 0 8px 20px rgba(15, 118, 110, 0.20);
  transition: filter .18s var(--ease), transform .18s var(--ease);
}
#bt-score:hover { filter: brightness(1.05); transform: translateY(-1px); }
.cta-gratuit {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  background: #ffffff; color: var(--teal);
  padding: 3px 10px; border-radius: 999px; line-height: 1.4; white-space: nowrap;
}
.hero-cta .partage { display: flex; justify-content: center; margin: 4px 0 0; }
.hero-cta .btn-partager {
  width: auto; align-self: center; justify-content: center;
  background: transparent; color: var(--muted);
  border: 0; border-radius: 999px; box-shadow: none;
  padding: 5px 12px; font-size: 12.5px; font-weight: 500;
}
.hero-cta .btn-partager:hover { color: var(--teal); background: var(--wash); filter: none; }

/* partage : discret, en retrait du CTA principal */
.partage { display: flex; justify-content: center; margin: 6px 0 18px; }
.btn.btn-partager {
  background: transparent; color: var(--muted); border: 0; border-radius: 999px;
  padding: 5px 12px; font-weight: 500; font-size: 12.5px; box-shadow: none;
}
.btn.btn-partager:hover { color: var(--teal); background: var(--wash); filter: none; }
.btn.btn-partager::before { content: "\2197"; margin-right: 5px; font-size: 11px; }

/* ---------- actions & boutons ---------- */
.actions { justify-content: center; margin-top: 16px; }
.btn { border-radius: 11px; border-color: var(--line); background: var(--surface); color: var(--ink); transition: border-color .18s var(--ease); }
.btn:hover { border-color: var(--teal); }
.btn-primary { background: var(--grad-teal); color: #ffffff; border: 0; box-shadow: 0 1px 2px rgba(17,24,39,.08), 0 8px 20px rgba(15, 118, 110, 0.18); }
.btn-primary:hover { filter: brightness(1.05); }
.note-calcul { text-align: center; }

/* ---------- teintes ---------- */
.ton-accent { color: var(--teal); }
.ton-cyan { color: var(--teal-fonce); }
.ton-orange { color: var(--warn); }
.barre-piste i.ton-orange { background: var(--warn); }
.barre-piste i.ton-cyan { background: var(--teal); }

/* ---------- sections / cartes ---------- */
#res-sections { margin-top: 20px; }
.section {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
  padding: 24px 24px 22px; margin-bottom: 20px;
}
.sec-titre { margin: 0 0 4px; font-family: var(--police-titres); font-size: 18px; font-weight: 700; letter-spacing: -0.012em; color: var(--ink); }
.sec-intro { color: var(--muted); font-size: 14px; margin: 0 0 16px; line-height: 1.6; }
.sec-pied { font-size: 13px; color: var(--muted); margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }

.article { display: flex; gap: 12px; margin-bottom: 10px; font-size: 15px; align-items: flex-start; line-height: 1.55; }
.article:last-child { margin-bottom: 0; }
.article-icone { flex: 0 0 20px; height: 20px; margin-top: 2px; display: grid; place-items: center; color: var(--teal); }
.article-icone svg { display: block; }

.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 12px; }
.cartes-colonne { grid-template-columns: 1fr; }
.carte {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 17px; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.carte.ton-accent { border-color: rgba(15, 118, 110, 0.4); }
.carte-rang { position: absolute; top: 13px; right: 13px; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.carte-titre { font-weight: 700; font-size: 15.5px; line-height: 1.32; display: flex; align-items: center; gap: 9px; padding-right: 42px; }
.carte-sous { color: var(--muted); font-size: 13px; line-height: 1.5; }
.carte-pied { font-size: 13px; color: var(--muted); margin-top: 2px; }

.carte-score {
  flex: 0 0 auto; min-width: 38px; height: 38px; display: grid; place-items: center;
  font-size: 16px; font-weight: 800; text-align: center; padding: 0; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.carte-score.score-haut { color: var(--good); }
.carte-score.score-moyen { color: var(--teal); }
.carte-score.score-bas { color: var(--warn); }

.pastilles { display: flex; flex-wrap: wrap; gap: 6px; }
.pastille {
  font-size: 11.5px; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.pastille.ton-vert, .pastille.ton-ambre, .pastille.ton-rouge,
.pastille.ton-orange, .pastille.ton-accent, .pastille.ton-cyan {
  background: color-mix(in srgb, currentColor 11%, transparent);
}

.metriques { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.metrique { display: flex; flex-direction: column; gap: 1px; }
.m-lib { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.m-val { font-family: var(--police-titres); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.m-val.ton-hausse { color: var(--good); }
.m-val.ton-baisse { color: var(--crit); }

.barres { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.barre { display: flex; align-items: baseline; gap: 12px; font-size: 13.5px; }
.barre-lib { flex: 1; line-height: 1.4; color: var(--ink-2); }
.barre-piste { flex: 0 0 110px; height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; align-self: center; }
.barre-piste i { display: block; height: 100%; border-radius: 99px; background: var(--teal); }
.barre-piste i.ton-vert { background: var(--good); }
.barre-piste i.ton-rouge { background: var(--crit); }
.barre-piste i.ton-ambre { background: var(--warn); }
.barre-piste i.ton-orange { background: var(--warn); }
.barre-piste i.ton-cyan { background: var(--teal); }
.barre-w { font-size: 12px; color: var(--ink-2); width: 42px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.carte-liste-visible { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 6px; color: var(--ink-2); font-size: 13px; }
.carte-liste-visible li { position: relative; padding-left: 16px; line-height: 1.45; }
.carte-liste-visible li::before { content: ""; position: absolute; left: 0; top: .58em; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.carte.ton-rouge .carte-liste-visible li::before { background: var(--crit); }
.carte.ton-vert .carte-liste-visible li::before { background: var(--good); }

.carte-cliquable { cursor: pointer; }
.carte-cliquable:hover { border-color: var(--teal-clair); }
.carte-ouverte { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.carte-detail {
  margin-top: 6px; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
}
.carte-detail.carte-detail-liste { background: none; border: 0; padding: 2px 0 0; margin-top: 2px; }
.carte-detail-titre { margin: 0 0 9px; color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.carte-detail-note { margin: -3px 0 9px; color: var(--muted); font-size: 11.5px; font-style: italic; }
.carte-tache-ligne { position: relative; padding-left: 17px; font-size: 13.5px; line-height: 1.55; margin: 7px 0; color: var(--ink-2); }
.carte-tache-ligne::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.carte.ton-rouge .carte-tache-ligne::before { background: var(--crit); }
.carte.ton-vert .carte-tache-ligne::before { background: var(--good); }
.carte.ton-rouge .carte-tache-ligne { color: #B91C1C; }
.carte.ton-vert .carte-tache-ligne { color: #047857; }
.carte-indication { display: inline-flex; align-items: center; gap: 7px; margin-top: 2px; color: var(--teal); font-size: 12.5px; font-weight: 650; }
.carte-indication::after { content: "\2193"; font-size: 13px; transition: transform .15s var(--ease); }
.carte-ouverte .carte-indication::after { transform: rotate(180deg); }
.carte-ouverte .carte-indication { display: none; }
.carte-lien {
  margin-top: auto; align-self: flex-end; font-size: 12.5px; font-weight: 700;
  color: #ffffff; background: var(--grad-teal); border: 1px solid transparent;
  border-radius: 9px; padding: 8px 13px; text-decoration: none; white-space: nowrap;
  transition: filter .18s var(--ease);
}
.carte-lien:hover { filter: brightness(1.05); }
.btn-voir-plus { width: 100%; margin-top: 12px; background: transparent; border: 1px solid var(--line); border-radius: 12px; color: var(--teal); padding: 11px 16px; }
.btn-voir-plus:hover { border-color: var(--teal); }

/* ---------- formulaire d'évaluation ---------- */
#form-outil .facultatifs { display: none; }
#bt-generer { display: none; }
body[data-etape="2"] #form-outil .facultatifs { display: block; }
body[data-etape="2"] #bt-generer { display: block; }
body[data-etape="1"] .result .sections .section { display: none; }
body[data-etape="1"] .result .sections .section:first-child { display: block; }
body[data-etape="1"] .result .actions { display: none; }
body[data-etape="2"] .result { display: none; }
body[data-etape="3"] #form-outil { display: none; }
body[data-etape="3"] #bt-score { display: none; }
.btn-retour { display: none; background: none; border: 0; color: var(--teal); cursor: pointer; font-size: 14px; padding: 0 0 12px; }
body[data-etape="2"] .btn-retour { display: inline-block; }

#form-outil { display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; }
#bt-generer { order: 99; }
#form-outil > .field:first-child label { display: none; }

#form-outil .field label:not(.switch) {
  display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 8px;
}
.field .req { color: var(--crit); font-weight: 700; }
.facultatifs { margin-top: 22px; border-top: 0; padding-top: 0; }
.facultatifs > summary { display: none; }
.facultatifs > .aide { margin: 0 0 18px; max-width: 56ch; color: var(--muted); font-size: 14px; }
.facultatifs .field { margin-bottom: 20px; }

#form-outil .field select,
#form-outil .field input[type="text"] {
  padding: 12px 14px; border-radius: 10px; font-size: 15.5px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
#form-outil .field select { padding-right: 36px; }
#form-outil .field select:focus,
#form-outil .field input[type="text"]:focus {
  border-color: var(--teal); outline: 0;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}
.facultatifs .field label.switch { font-size: 14px; font-weight: 500; gap: 12px; line-height: 1.5; }

.oui-non { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.oui-non label {
  display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15px; color: var(--ink);
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); transition: border-color .18s var(--ease), background .18s var(--ease);
}
.oui-non label:has(input:checked) { border-color: var(--teal); background: var(--wash); }
.oui-non input[type="radio"] { accent-color: var(--teal); width: 17px; height: 17px; margin: 0; }

.field label.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 44px; height: 24px; border-radius: 99px; background: var(--surface-3);
  border: 1px solid var(--line); position: relative; flex-shrink: 0; margin-top: 2px;
  transition: background .18s var(--ease);
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--muted); transition: transform .18s var(--ease), background .18s var(--ease);
}
.switch input:checked + .track { background: var(--teal); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(20px); background: #ffffff; }

#bt-generer {
  width: 100%; margin-top: 20px; background: var(--grad-teal); color: #ffffff;
  border: 0; border-radius: 12px; padding: 15px 22px; font-weight: 700; font-size: 16px;
  cursor: pointer; box-shadow: 0 1px 2px rgba(17,24,39,.08), 0 8px 20px rgba(15, 118, 110, 0.18);
  transition: filter .18s var(--ease), transform .18s var(--ease);
}
#bt-generer:hover { filter: brightness(1.05); transform: translateY(-1px); }
#bt-generer:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }

/* ---------- score (étape 3) ---------- */
body[data-etape="3"] .hero-result { grid-template-columns: 1fr; max-width: 720px; }
body[data-etape="3"] .hero-cta { flex-direction: row; justify-content: center; }
body[data-etape="3"] .hero-cta .partage { margin: 0; }
body[data-etape="3"] .result .headline { padding-top: 8px; }
body[data-etape="3"] .hero .lede { display: none; }
body[data-etape="3"] #res-sections .section { animation: section-in .55s var(--ease) both; }
body[data-etape="3"] #res-sections .section:nth-child(2) { animation-delay: .06s; }
body[data-etape="3"] #res-sections .section:nth-child(3) { animation-delay: .12s; }
body[data-etape="3"] #res-sections .section:nth-child(4) { animation-delay: .18s; }
body[data-etape="3"] #res-sections .section:nth-child(5) { animation-delay: .24s; }
@keyframes section-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- prose, teaser, sources, pied ---------- */
.prose-teaser { background: var(--surface); }
.prose a, .sources-list a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.prose td { color: var(--ink-2); }
.site-footer { background: transparent; border-top-color: var(--line); }
.site-footer a:hover { color: var(--ink); }
.legal { color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 680px) {
  .hero { padding-top: 34px; }
  .hero-result { grid-template-columns: 1fr; gap: 22px; }
  .hero-cta { min-width: 0; }
  .headline .k { font-size: 20px; }
  .headline.score-numerique .v { font-size: clamp(48px, 18vw, 72px); }
  .section { padding: 20px 18px 18px; }
  .cartes { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .barre-piste { flex-basis: 74px; }
  .barre-w { width: 38px; }
  .hero h1, .hero .lede, .field label, .field label.switch,
  .facultatifs > .aide, .headline .sub {
    overflow-wrap: break-word; word-break: normal; white-space: normal; max-width: 100%;
  }
}

/* ---------- impression ---------- */
@media print {
  .etapes { display: none !important; }
  .hero { padding: 0 0 12px; }
  body { padding-bottom: 0; }
}

/* ---------- mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  body[data-etape="3"] #res-sections .section { animation: none; }
  .chip, .btn, .carte, .combo .combo-champ, .oui-non label,
  .etape, .etape .n, #bt-score, #bt-generer { transition: none; }
}
