/* ------------------------------------------------------------------
   exercer.ca — feuille de style, refonte du 28 juillet 2026.
   Divergence locale assumée du gabarit commun (décision utilisateur) :
   direction « papier et encre » — titrage serif système, jade et ambre,
   illustration du parcours dans le héros.
   Aucune dépendance externe : pas de police web, pas de framework.
   Objectif inchangé : 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: #0e7a5f;
  --accent: var(--accent-base);
  --accent-ink: #ffffff;
  /* L'ambre est reserve a l'illustration et aux touches ponctuelles : c'est
     la couleur du permis temporaire qui court, pas une seconde couleur de
     marque. La generaliser diluerait les deux. */
  --ambre: #dd9a2b;
  /* Variante texte : l'ambre plein n'atteint que 2.1:1 sur --wash, tres
     sous le seuil AA (4.5:1) pour du texte. Assombrie pour le libelle de
     l'aparte ; les usages decoratifs (jalons, bordure) gardent --ambre. */
  --ambre-texte: #8a5a12;
  --page: #f6f8f6;
  --surface: #ffffff;
  --surface-2: #edf1ee;
  --ink: #16211c;
  --ink-2: #47544e;
  /* 4.77:1 sur --surface — au-dessus du seuil AA pour du texte normal.
     Le gabarit d'origine etait a 3.50:1 ; corrige au passage. */
  --muted: #6b756f;
  --line: #dfe5e0;
  --border: rgba(22, 33, 28, 0.11);
  --good: #1e7a34;
  --warn: #b97f14;
  --crit: #c23434;
  --wash: color-mix(in srgb, var(--accent) 6%, transparent);
  --voile: color-mix(in srgb, var(--accent) 12%, transparent);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 33, 28, .04), 0 10px 30px rgba(22, 33, 28, .06);
  /* Titrage serif sans police web : Charter sur macOS, Sitka/Cambria sur
     Windows, Georgia partout ailleurs. C'est le seul endroit ou la
     personnalite typographique du site se decide. */
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    /* Le jade profond disparait sur fond sombre : 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) 55%, #ffffff);
    --accent-ink: #08201a;
    --ambre: #e5ad4e;
    /* Sur le fond sombre de l'aparte, l'ambre plein contraste deja a 7.4:1 :
       pas besoin d'assombrir comme en clair. */
    --ambre-texte: #e5ad4e;
    --good: #5cc06a;
    --page: #0e1310;
    --surface: #161c18;
    --surface-2: #1f2621;
    --ink: #f2f5f2;
    --ink-2: #b9c4bc;
    --muted: #83908a;
    --line: #2a322c;
    --border: rgba(255,255,255,0.11);
    --wash: color-mix(in srgb, var(--accent) 14%, transparent);
    --voile: color-mix(in srgb, var(--accent) 20%, transparent);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: color-mix(in srgb, var(--accent-base) 55%, #ffffff);
  --accent-ink: #08201a;
  --ambre: #e5ad4e;
  --ambre-texte: #e5ad4e;
  --good: #5cc06a;
  --page: #0e1310; --surface: #161c18; --surface-2: #1f2621;
  --ink: #f2f5f2; --ink-2: #b9c4bc; --muted: #83908a;
  --line: #2a322c; --border: rgba(255,255,255,0.11);
  --wash: color-mix(in srgb, var(--accent) 14%, transparent);
  --voile: color-mix(in srgb, var(--accent) 20%, transparent);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px 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: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  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-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 62px;
}
.entete-gauche { display: flex; align-items: center; gap: 8px; }

.brand {
  font-weight: 600; font-size: 17px; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; display: inline-flex;
  align-items: center; gap: 10px;
}
/* La tuile « é » : l'accent aigu est l'identite du site — c'est lui,
   l'examen de francais. Serif, comme le titrage. */
.brand .mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--serif); font-size: 18px; font-weight: 600;
  line-height: 1; display: grid; place-items: center;
  padding-bottom: 2px; flex-shrink: 0;
}

/* ---------- menu du site ----------
   Un <details>, comme .facultatifs et .lines-more ailleurs dans le
   gabarit : natif au clavier, sans script. Place a gauche, a cote de la
   marque, plutot que dans le fil de liens a droite — visible et cliquable
   a toutes les tailles d'ecran, y compris sous 620px ou l'ancien menu en
   ligne disparaissait sans aucune trace. */
.menu-site { position: relative; }
.menu-site > summary {
  list-style: none; cursor: pointer; width: 36px; height: 36px;
  border-radius: 8px; border: 1px solid var(--border);
  display: grid; place-items: center;
}
.menu-site > summary::-webkit-details-marker { display: none; }
.menu-site > summary:hover { border-color: var(--muted); }
.menu-site > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.menu-icone, .menu-icone::before, .menu-icone::after {
  width: 15px; height: 2px; background: var(--ink-2); border-radius: 2px;
  transition: transform .15s ease, opacity .15s ease, top .15s ease;
}
.menu-icone { position: relative; display: block; }
.menu-icone::before, .menu-icone::after { content: ""; position: absolute; left: 0; }
.menu-icone::before { top: -5px; }
.menu-icone::after { top: 5px; }
.menu-site[open] > summary .menu-icone { background: transparent; }
.menu-site[open] > summary .menu-icone::before { top: 0; transform: rotate(45deg); }
.menu-site[open] > summary .menu-icone::after { top: 0; transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) { .menu-icone, .menu-icone::before, .menu-icone::after { transition: none; } }

.menu-panneau {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40;
  min-width: 200px; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px;
}
.menu-panneau a {
  color: var(--ink-2); text-decoration: none; font-size: 14.5px;
  padding: 9px 12px; border-radius: 8px;
}
.menu-panneau a:hover { color: var(--ink); background: var(--surface-2); }
.menu-panneau a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.nav { display: flex; align-items: center; gap: 4px; }
.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); border-color: var(--muted); }

/* ---------- 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; color: var(--ink-2); text-decoration: none;
  border-radius: 8px;
}
.nav .langues a:hover { border-color: var(--accent); color: var(--ink); background: none; }

/* ---------- hero ---------- */
/* Deux usages : bandeau d'accueil (.hero-accueil, pleine largeur, avec
   l'illustration) et tete des pages interieures (colonne etroite, sobre). */
.hero { padding: 44px 0 10px; }
h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4.6vw, 42px); line-height: 1.14;
  letter-spacing: -0.012em; font-weight: 700;
  margin: 0 0 12px; max-width: 22ch;
}
/* 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: 44px; height: 4px; border-radius: 2px;
  background: var(--accent); margin-top: 16px;
}
.hero .lede {
  color: var(--ink-2); font-size: 17px; margin: 14px 0 0; max-width: 60ch;
}

.hero-cta { margin-top: 22px; }

.hero-accueil {
  padding: 56px 0 44px;
  background:
    radial-gradient(1000px 420px at 8% -20%, var(--voile), transparent 65%),
    var(--surface);
  border-bottom: 1px solid var(--line);
}
.hero-grille {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 48px; align-items: center;
}
.hero-visuel { min-width: 0; }
.parcours { width: 100%; max-width: 460px; height: auto; display: block; margin: 0 auto; }
@media (max-width: 860px) {
  .hero-accueil { padding: 44px 0 36px; }
  .hero-grille { grid-template-columns: 1fr; gap: 8px; }
  /* Sur mobile, l'outil doit rester au-dessus du pli : l'illustration cede
     la place au formulaire. */
  .hero-visuel { display: none; }
}

/* L'illustration du parcours : le trace, trois jalons ambre (les
   renouvellements du permis temporaire), le sceau de l'attestation a
   l'arrivee, et le « é » en filigrane. Tout en variables de theme. */
.pc-ghost {
  font-family: var(--serif); font-size: 360px; font-weight: 700;
  fill: var(--accent); opacity: .07;
}
.pc-trace {
  fill: none; stroke: var(--accent); stroke-width: 3.5;
  stroke-linecap: round;
}
.pc-depart { fill: var(--muted); }
.pc-jalon { fill: var(--surface); stroke: var(--ambre); stroke-width: 3.5; }
.pc-anneau {
  fill: none; stroke: var(--accent); stroke-width: 2;
  stroke-dasharray: 3 7; stroke-linecap: round;
}
.pc-coeur { fill: var(--accent); }
.pc-coche {
  fill: none; stroke: var(--accent-ink); stroke-width: 4.5;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Une seule sequence orchestree, au chargement de l'accueil : le texte se
   pose, le trace se dessine, les jalons s'allument dans l'ordre du
   parcours. Rien d'autre n'est anime sur le site. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes pose { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes allume { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
  .hero-accueil h1 { animation: pose .5s ease both; }
  .hero-accueil .lede { animation: pose .5s ease .12s both; }
  .pc-trace { stroke-dasharray: 1; animation: trace 1s ease-out .25s both; }
  .pc-jalon, .pc-sceau, .pc-depart { transform-box: fill-box; transform-origin: center; }
  .pc-depart { animation: allume .3s ease .25s both; }
  .pc-j1 { animation: allume .3s ease .5s both; }
  .pc-j2 { animation: allume .3s ease .7s both; }
  .pc-j3 { animation: allume .3s ease .9s both; }
  .pc-sceau { animation: allume .4s ease 1.15s both; }
}

/* ---------- outil ---------- */
/* minmax(0, …) et min-width: 0 : sans eux, un <select> dont une option est
   tres longue (« J'ai suivi au moins trois années… ») impose sa largeur
   intrinseque a la colonne et fait deborder toute la page sur mobile. */
.tool {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px;
  margin: 34px 0 48px; align-items: start;
}
@media (max-width: 860px) { .tool { grid-template-columns: minmax(0, 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: 13px; margin: 0 0 22px; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--accent); font-weight: 650; }

.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; }
.input-wrap > * { min-width: 0; }
.field input[type="number"], .field input[type="text"], .field select {
  width: 100%; min-width: 0; font: inherit; font-size: 16px;
  padding: 12px 14px; border-radius: 10px;
  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: 10px;
  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: 8px; 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: 82px; border-top: 3px solid var(--accent); }
@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-family: var(--serif);
  font-size: clamp(32px, 5.6vw, 44px); font-weight: 700; letter-spacing: -0.015em;
  line-height: 1.08; margin: 8px 0 4px; 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); }
/* Pas de nowrap : sur ce site les valeurs sont souvent des phrases (nom de
   l'ordre, format d'examen), pas des nombres — elles doivent replier. */
.lines .r { font-variant-numeric: tabular-nums; font-weight: 550; text-align: right; overflow-wrap: anywhere; }
.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 10px 10px; }
.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: 9px; 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: var(--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: 10px; 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;
  transition: transform .12s ease, filter .12s ease, border-color .12s ease;
}
.btn:hover { border-color: var(--muted); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-primary:hover { filter: brightness(1.07); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover { transition: none; transform: none; }
}

.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 { font-family: var(--serif); margin: 0 0 6px; font-size: 19px; 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); }

/* ---------- test gratuit (aperçu officiel) ----------
   L'ambre y marque un contenu "aperçu" — distinct du jade de marque,
   coherent avec son usage dans l'illustration du parcours (le permis
   temporaire qui court). --ambre-texte plutot que --ambre : mesure au
   28 juillet 2026, l'ambre plein ne contraste qu'a 2.1:1 sur ce fond clair,
   tres sous le seuil AA de 4.5:1 pour du texte. */
.apercu-gratuit {
  scroll-margin-top: 82px;
  margin: 36px 0; padding: 30px 32px;
  background: var(--wash); border: 1px solid var(--border);
  border-left: 3px solid var(--ambre);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.apercu-etiquette {
  font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ambre-texte); margin: 0 0 8px;
}
.apercu-gratuit h2 {
  font-family: var(--serif); font-size: 22px; font-weight: 700;
  margin: 0 0 10px; letter-spacing: -0.01em;
}
.apercu-texte { color: var(--ink-2); margin: 0 0 24px; max-width: 62ch; }
@media (max-width: 480px) { .apercu-gratuit { padding: 22px; } }

/* ---------- test gratuit : parcours en quatre etapes ----------
   Une seule <section class="tg-etape"> visible a la fois, dans l'ordre des
   quatre activites reelles de l'examen — test-gratuit.js bascule `hidden`.
   Note bien tenue au clavier : chaque moment de discussion/entretien est un
   <fieldset> natif dont la premiere option porte `required`, donc un
   passage a l'etape suivante sans reponse est bloque par la validation
   native du formulaire (`form.reportValidity()`), pas par une logique
   maison a maintenir. */
.tg-quiz { margin: 0; }
.tg-etape { animation: none; }
.tg-etape-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ambre-texte); margin: 0 0 10px;
}
.tg-etape h3 {
  font-family: var(--serif); font-size: 19px; font-weight: 700;
  margin: 0 0 14px; letter-spacing: -0.01em;
}
.tg-cas-texte {
  color: var(--ink); background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 16px 18px; margin: 0 0 12px; line-height: 1.6;
}
.tg-duree { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.tg-consigne { color: var(--ink); margin: 0 0 14px; max-width: 62ch; }

.tg-moment {
  border: 0; border-top: 1px solid var(--line); margin: 0; padding: 20px 0 4px;
}
.tg-moment:first-of-type { border-top: 0; padding-top: 0; }
.tg-moment legend {
  font-weight: 600; font-size: 15.5px; padding: 0; margin: 0 0 12px; color: var(--ink);
}
.tg-option {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  padding: 8px 4px; border-radius: 8px; font-size: 14.5px; color: var(--ink-2);
}
.tg-option:hover { background: var(--surface-2); color: var(--ink); }
.tg-option input { margin: 3px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.tg-retroaction {
  margin: 10px 0 4px; padding: 12px 14px; background: var(--wash);
  border-radius: 9px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5;
}
.tg-verdict { font-weight: 700; }
.tg-verdict-bon { color: var(--good); }
.tg-verdict-revoir { color: var(--ambre-texte); }
.tg-quiz .tg-etape > .btn { margin-top: 22px; }

.tg-texte {
  width: 100%; min-width: 0; font: inherit; font-size: 15px; line-height: 1.6;
  padding: 14px 16px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--page); color: var(--ink); resize: vertical;
}
.tg-texte:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.tg-resultat {
  border: 0; margin-top: 0; padding-top: 0;
}
.tg-score {
  font-family: var(--serif); font-size: 28px; font-weight: 700;
  color: var(--accent); margin: 0 0 8px; letter-spacing: -0.01em;
}
.tg-message { color: var(--ink); font-size: 15px; margin: 0 0 16px; max-width: 60ch; }
.tg-diagnostic {
  list-style: none; padding: 0; margin: 0 0 18px;
  display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-2);
}
.tg-disclaimer { color: var(--muted); font-size: 12.5px; margin: 0; max-width: 62ch; line-height: 1.5; }

/* Accompagnement du raisonnement : seuls les cas payants portent cette
   classe (un moment gratuit n'a pas de champ `conseil`). Fond jade plutot
   que --wash ambre des .tg-retroaction : c'est la marque, pas l'aperçu, qui
   signe ce contenu — c'est justement ce qui le distingue du gratuit. */
.tg-conseil {
  margin: 10px 0 4px; padding: 12px 14px; background: var(--voile);
  border-left: 3px solid var(--accent); border-radius: 0 9px 9px 0;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.5;
}

/* ---------- cas payants : deverrouillage local ----------
   Distinct du data-verrou du gabarit — voir la note de
   site.config.json (apercu.casPayants._note). */
.tg-payant {
  margin: 40px 0 0; padding: 26px 28px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.tg-payant-etiquette {
  font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 8px;
}
.tg-payant-texte { color: var(--ink-2); margin: 0 0 16px; max-width: 62ch; }
.tg-deverrouiller { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tg-deverrouiller 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;
}
.tg-deverrouiller-msg { font-size: 13px; }
.tg-payant-confirmation { color: var(--good); font-size: 14px; margin: 14px 0 0; }
.tg-cas-verrouilles { margin-top: 28px; display: flex; flex-direction: column; gap: 40px; }
.tg-cas-verrouilles .tg-quiz { padding-top: 28px; border-top: 1px solid var(--line); }
.tg-cas-verrouilles .tg-quiz:first-child { padding-top: 0; border-top: 0; }

/* ---------- renvoi vers la page FAQ / guide ---------- */
.prose-teaser {
  max-width: none; margin: 40px 0; padding: 26px 28px;
  background: linear-gradient(120deg, var(--wash), transparent 60%), 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 { font-family: var(--serif); margin: 0 0 4px; font-size: 20px; 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-family: var(--serif); font-size: 24px; font-weight: 700;
  margin: 42px 0 10px; letter-spacing: -0.01em;
}
.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 summary:hover::after { color: var(--accent); }
.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, .hero-visuel { display: none !important; }
  body { background: #fff; color: #000; }
  .panel { border: 0; box-shadow: none; padding: 0; }
  .result { border-top: 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, .hero-accueil { background: none; border-bottom: 0; padding: 0 0 12px; }
  .lines li.total { background: none; margin: 8px 0 0; padding: 12px 0 0; }
}
