/* ------------------------------------------------------------------
   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; }

.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-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-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: 2px; align-self: flex-start; font-size: 13px; font-weight: 600;
  color: var(--accent); text-decoration: none;
}
.carte-lien:hover { text-decoration: underline; }

/* 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 — identité visuelle (déclarée en dernier : écrase la coque).
   Thème sombre violet/cyan assumé, distinct du gabarit générique.
   La structure HTML et le build restent ceux du gabarit ; seul le
   visuel change. Divergence volontaire, documentée dans ETAT.md.
   ================================================================== */
:root, :root[data-theme="dark"], :root[data-theme="light"] {
  color-scheme: dark;
  --accent-base: #8B5CF6;
  --accent: #8B5CF6;
  --accent-ink: #ffffff;
  --accent-action: #8B5CF6;
  --accent-action-ink: #ffffff;
  --page: #0B0F1A;
  --surface: #121826;
  --surface-2: #1A2134;
  --ink: #F1F5F9;
  --ink-2: #C6CCDC;
  --muted: #8B98B8;
  --line: #26304A;
  --border: rgba(139, 92, 246, 0.26);
  --good: #34D399;
  --warn: #FBBF24;
  --crit: #F87171;
  --wash: rgba(139, 92, 246, 0.12);
  --voile: rgba(139, 92, 246, 0.16);
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  --police-titres: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --police-corps: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
  background:
    radial-gradient(1100px 550px at 78% -10%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(850px 450px at -5% -5%, rgba(34, 211, 238, 0.10), transparent 55%),
    var(--page);
  background-attachment: fixed;
}

.wrap { max-width: 960px; }

/* ---------- en-tête ---------- */
.site-header {
  background: rgba(11, 15, 26, 0.72);
  border-top: 0;
  backdrop-filter: saturate(160%) blur(10px);
}
.brand {
  background: none;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 22px; 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, #8B5CF6, #22D3EE);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding: 0 1px;
}
.nav a:hover { background: rgba(139, 92, 246, 0.14); }
.icon-btn { display: none; } /* thème sombre assumé */

/* ---------- hero ---------- */
.hero {
  background: none; padding: 46px 0 26px; border-bottom: 0;
}
.hero::after { display: none; }
h1::after { background: linear-gradient(90deg, #8B5CF6, #22D3EE); width: 64px; }
.hero h1 { font-size: clamp(30px, 5.2vw, 46px); line-height: 1.08; max-width: none; }
.hero .lede { color: var(--muted); }

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

/* champ métier, façon champ de recherche */
.field { margin-bottom: 0; }
.field label { display: none; }
.field .aide { color: var(--muted); font-size: 13px; margin-top: 8px; }
.combo .combo-champ {
  padding: 20px 24px; font-size: 18px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.combo .combo-champ::placeholder { color: var(--muted); }
.combo .combo-champ:focus {
  border-color: #8B5CF6; outline: 0;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22);
}
.combo .combo-fleche { top: 26px; right: 20px; border-color: var(--muted); }
.combo .combo-liste {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 6px;
}
.combo .combo-liste li { font-size: 15px; padding: 10px 12px; border-radius: 10px; }
.combo .combo-liste li:hover { background: rgba(139, 92, 246, 0.16); }
.combo .combo-liste li[aria-selected="true"] { background: rgba(139, 92, 246, 0.28); color: var(--ink); }

/* ---------- résultat : badge ---------- */
.headline {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center; padding: 28px 20px 26px; border-bottom: 0; margin-bottom: 6px;
}
.headline .k {
  font-size: 30px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--ink); text-transform: none;
}
.headline .v { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; color: var(--accent); }

/* jauge : dessinée quand calcul.js renvoie un score numérique 0-100 */
.headline.score-numerique .v {
  width: 168px; height: 168px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; gap: 2px; margin: 0; z-index: 0;
  color: var(--couleur-score, var(--accent));
  background: conic-gradient(var(--couleur-score, var(--accent)) calc(var(--score, 0) * 3.6deg), var(--line) 0deg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.headline.score-numerique .v::before {
  content: ""; position: absolute; inset: 18px; border-radius: 50%;
  background: var(--surface);
  z-index: -1;
}
.headline.score-numerique .v::after {
  content: "/ 100"; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0;
}
.headline.score-rouge { --couleur-score: var(--crit); }
.headline.score-orange { --couleur-score: #FB923C; }
.headline.score-ambre { --couleur-score: var(--warn); }
.headline.score-vert { --couleur-score: var(--good); }
.headline .sub { color: var(--muted); font-size: 14px; max-width: 560px; line-height: 1.55; }

/* avertissements — discrets */
.warnings li { background: rgba(139, 92, 246, 0.06); border: 1px solid var(--line); color: var(--ink-2); }
.warnings li::before { background: var(--accent); color: #fff; }
.warnings li.warnings-toggle { background: none; border: 0; }
.warnings li.warnings-toggle::before { display: none; }

/* partage — près du badge */
.partage { display: flex; justify-content: center; margin: 6px 0 18px; }
.btn.btn-partager {
  background: linear-gradient(90deg, #8B5CF6, #22D3EE);
  color: #fff; border: 0; border-radius: 999px;
  padding: 11px 22px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}
.btn.btn-partager:hover { filter: brightness(1.08); border-color: transparent; }
.btn.btn-partager::before { content: "↗"; margin-right: 7px; font-size: 15px; }

/* formations : liste verticale */
.cartes-colonne { grid-template-columns: 1fr; }

/* actions */
.actions { justify-content: center; margin-top: 16px; }
.btn { border-radius: 12px; border-color: var(--line); background: rgba(139, 92, 246, 0.08); color: var(--ink); }
.btn:hover { border-color: #8B5CF6; }
.btn-primary {
  background: linear-gradient(90deg, #8B5CF6, #22D3EE);
  color: #fff; border: 0;
}
.note-calcul { text-align: center; }

/* ---------- teintes (toujours sur fond sombre) ---------- */
.ton-accent { color: #A78BFA; }
.ton-cyan { color: #22D3EE; }
.ton-orange { color: #FB923C; }
.barre-piste i.ton-orange { background: #FB923C; }
.barre-piste i.ton-cyan { background: #22D3EE; }

/* ---------- sections / cartes ---------- */
.sec-titre { color: var(--ink); }
.carte-score { background: rgba(139, 92, 246, 0.16); }
.carte.ton-accent { border-color: rgba(139, 92, 246, 0.5); }
.carte-detail summary { color: #22D3EE; }
.carte-lien { color: #A78BFA; }

/* ---------- prose, teaser, sources, pied ---------- */
.prose-teaser { background: var(--surface); }
.prose a, .sources-list a { color: #A78BFA; }
.prose td { color: var(--ink-2); }
.site-footer { background: transparent; }
.site-footer a:hover { color: var(--ink); }
.legal { color: var(--muted); }

/* ---------- formations : score visible, carte entière cliquable ---------- */
.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(--page); border: 1px solid var(--line);
}
.carte-score.score-haut { color: var(--good); }
.carte-score.score-moyen { color: #22D3EE; }
.carte-score.score-bas { color: var(--warn); }

.carte-cliquable { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.carte-cliquable:hover { border-color: rgba(34, 211, 238, 0.45); }
.carte-ouverte { border-color: #22D3EE; box-shadow: 0 0 0 1px #22D3EE; }

.carte-detail {
  margin-top: 6px; padding: 12px 14px;
  background: var(--page); border: 1px solid var(--line); border-radius: 10px;
}
.carte-detail .ligne { font-size: 13.5px; line-height: 1.55; margin: 4px 0; }

.btn-voir-plus {
  width: 100%; margin-top: 12px;
  background: transparent; border: 1px solid var(--line); border-radius: 12px;
  color: #22D3EE; padding: 10px 16px;
}
.btn-voir-plus:hover { border-color: #22D3EE; }
