/* Univers repris de forwardglobal.com : bleu nuit, photos aériennes de
   deltas, chevron jaune, Inter. Le chrome (en-tête, bandeaux, pied) est
   sombre et porté par l'image ; la lecture se fait sur un papier bleuté. */
/* Inter variable, hébergée avec le site (licence OFL). Le site institutionnel
   sert cette même famille, y compris sous le nom « NN Nouvelle ». */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/static/inter-latin.woff2) format("woff2"); }
:root {
  --navy: #030610;
  --navy-2: #0d1422;
  --ink: #161922;
  --ink-soft: #343a46;
  --muted: #566070;
  --accent: #ffcc00;
  --paper: #e6ebf0;
  --surface: #f6f8fa;
  --line: #cfd6de;
  --on-dark: #ffffff;
  --on-dark-soft: #c9d3de;
  --glacier: #9fb6c3;
  --ok: #17693a;
  --ok-bg: #dff1e5;
  --ko: #a4231b;
  --ko-bg: #fbe4e1;
  --radius: 6px;
}
* { box-sizing: border-box; }
/* scroll-padding : une ancre (résultat du quiz) ne se cache pas sous l'en-tête fixe. */
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: 84px; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font: 17px/1.65 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); }
.wrap { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 20px; }
main.wrap { flex: 1; padding-bottom: 88px; }
main.wrap:has(.hero.full) { padding-bottom: 0; display: flex; flex-direction: column; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; box-shadow: 0 0 0 6px var(--navy); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 5vw, 2.7rem); margin: 0 0 12px; font-weight: 800; letter-spacing: -0.025em; }
p, li { text-wrap: pretty; }
small { color: var(--muted); font-size: .85rem; }
::selection { background: var(--accent); color: var(--ink); }
input, textarea { caret-color: var(--ink); }
table, progress + small { font-variant-numeric: tabular-nums; }
code { background: #dbe2ea; padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.ico { vertical-align: -2px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--ink); padding: 8px 14px; z-index: 10; font-weight: 600; }
.skip:focus { left: 8px; }

/* En-tête */
.top { background: var(--navy); color: var(--on-dark); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; max-width: 1120px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 600; color: var(--on-dark); }
.brand img { display: block; height: 28px; width: auto; }
/* Contexte de lecture, affiché au défilement sur une page de module. */
.top .ctx { display: none; flex: 1; min-width: 0; align-items: baseline; gap: 12px; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .25); }
.top.scrolled .ctx { display: flex; }
.ctx-title { font-weight: 600; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-meta { flex: none; color: var(--on-dark-soft); font-size: .82rem; white-space: nowrap; }
.ctx-go { display: none; flex: none; padding: 7px 14px; border-radius: var(--radius); background: var(--accent); color: var(--ink); font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ctx-go:hover { background: #fff; }
.top.scrolled .ctx-go { display: inline-block; }
.readbar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .16); opacity: 0; transition: opacity .2s; }
.top.scrolled .readbar { opacity: 1; }
.readbar span { display: block; height: 100%; width: 0; background: var(--accent); }
.top nav { display: flex; flex: none; align-items: center; gap: 18px; font-size: .9rem; }
.top nav a { color: var(--on-dark); text-decoration: none; padding: 10px 0; }
/* La déconnexion est un envoi de formulaire, présenté comme un lien. */
.top nav form { margin: 0; }
.top nav button { font: inherit; color: var(--on-dark); background: none; border: 0; padding: 10px 0; cursor: pointer; }
.top nav button:hover { box-shadow: inset 0 -3px 0 var(--accent); }
.top nav a:hover { box-shadow: inset 0 -3px 0 var(--accent); }
.top nav .lang { text-transform: uppercase; font-weight: 600; border: 1px solid rgba(255, 255, 255, .6); border-radius: var(--radius); padding: 4px 9px; }
.top nav .lang:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); box-shadow: none; }

/* Bandeau d'ouverture : pleine largeur, photo + voile bleu nuit */
.hero { position: relative; isolation: isolate; width: 100vw; margin-left: calc(50% - 50vw); margin-bottom: 40px; padding: 56px 0 48px; color: var(--on-dark); background: var(--navy) center / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(3, 6, 16, .94) 0%, rgba(3, 6, 16, .82) 45%, rgba(3, 6, 16, .42) 100%); }
.hero > .wrap { position: relative; }
.hero h1 { color: var(--on-dark); max-width: 22ch; }
/* Le bandeau d'accueil est le seul moment fort : titre à pleine échelle. */
.hero.big { padding: 84px 0 64px; }
/* Le bandeau d'accueil se fond dans la bande nuit qui le suit. */
.hero.big::before { background: linear-gradient(180deg, rgba(3, 6, 16, .62) 0%, rgba(3, 6, 16, .8) 62%, var(--navy) 100%); }
.hero.big h1 { font-size: clamp(2.2rem, 6.4vw, 4.2rem); line-height: 1.02; letter-spacing: -0.035em; max-width: 14ch; margin-bottom: 20px; }
.hero.big .lead { font-size: 1.3rem; color: var(--on-dark); font-weight: 500; margin-bottom: 10px; }
.hero .lead { color: var(--on-dark-soft); }
.hero.small { padding: 30px 0 30px; }
.hero.small h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); max-width: 30ch; }
.hero.full { flex: 1; margin-bottom: 0; display: grid; align-items: center; min-height: 420px; }
.hero.plain { background-image: none; }
.hero.plain::before { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%); }
/* Six cadrages tirés de trois photos : chaque parcours a le sien. Les
   vignettes de cartes chargent une version légère. */
.cover-0 { background-image: url(/static/cover-0.jpg); }
.cover-1 { background-image: url(/static/cover-1.jpg); }
.cover-2 { background-image: url(/static/cover-2.jpg); }
.cover-3 { background-image: url(/static/cover-3.jpg); }
.cover-4 { background-image: url(/static/cover-4.jpg); }
.cover-5 { background-image: url(/static/cover-5.jpg); }
.thumb.cover-0 { background-image: url(/static/cover-0-sm.jpg); }
.thumb.cover-1 { background-image: url(/static/cover-1-sm.jpg); }
.thumb.cover-2 { background-image: url(/static/cover-2-sm.jpg); }
.thumb.cover-3 { background-image: url(/static/cover-3-sm.jpg); }
.thumb.cover-4 { background-image: url(/static/cover-4-sm.jpg); }
.thumb.cover-5 { background-image: url(/static/cover-5-sm.jpg); }
.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 58ch; margin: 0 0 20px; }
/* Faits alignés et séparés par un filet, plutôt qu'une phrase à points médians. */
.facts { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; color: var(--on-dark-soft); font-size: .95rem; }
.facts li + li { margin-left: 16px; padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, .3); }
.hero.small .facts { margin-bottom: 0; }
.meta { color: var(--on-dark-soft); font-size: .92rem; margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.section { font-size: 1.35rem; margin: 48px 0 16px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.section small { font-weight: 400; font-size: .9rem; }
.crumbs { font-size: .88rem; color: var(--on-dark-soft); margin-bottom: 18px; }
.crumbs a { color: var(--on-dark-soft); }
.crumbs a:hover { color: var(--on-dark); }

/* Boutons */
.btn { display: inline-block; background: var(--ink); color: #fff; border: 2px solid var(--ink); border-radius: var(--radius); padding: 11px 22px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.small { padding: 5px 14px; font-size: .88rem; }
td form { margin: 0; }
.btn.ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.hero .btn { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.hero .btn:hover { background: #fff; border-color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.center { justify-content: center; text-align: center; }

/* Étiquettes et progression */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag { display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: #d5dce4; color: var(--ink-soft); }
.tag.accent { background: var(--ink); color: #fff; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.hero .tag:not(.accent):not(.ok) { background: rgba(255, 255, 255, .16); color: var(--on-dark); }
/* Progression : piste claire cerclée, donc lisible vide, et remplissage
   sombre ; sur fond bleu nuit, piste cerclée de blanc et remplissage jaune. */
progress { display: block; width: 100%; height: 10px; margin: 14px 0 6px; border: 1px solid #6f7a88; border-radius: 99px; background: #fff; overflow: hidden; appearance: none; }
progress::-webkit-progress-bar { background: #fff; }
progress::-webkit-progress-value { background: var(--ink); }
progress::-moz-progress-bar { background: var(--ink); }
.hero progress { border-color: rgba(255, 255, 255, .65); }
.hero progress::-webkit-progress-value { background: var(--accent); }
.hero progress::-moz-progress-bar { background: var(--accent); }
.hero progress, .hero progress::-webkit-progress-bar { background: rgba(3, 6, 16, .55); }
.hero progress { max-width: 640px; }
.hero small { color: var(--on-dark-soft); }


/* Listes d'étapes (modules) */
.steps { list-style: none; padding: 0; margin: 0; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.steps li + li { border-top: 1px solid var(--line); }
.steps a { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; }
.steps a:hover { background: #fff; }
.steps .num { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--ink); font-weight: 600; font-size: .9rem; }
.steps .done .num { background: var(--accent); border-color: var(--accent); }
.steps .num .ico { width: 16px; height: 16px; }
.steps .label { font-weight: 600; }
.steps .empty, .empty { padding: 16px; color: var(--muted); }

/* Leçon : colonne de lecture d'environ 75 caractères */
.lesson { max-width: 60ch; }
.lesson h2 { font-size: 1.4rem; margin: 2.2em 0 .6em; }
.lesson h3 { font-size: 1.1rem; margin: 1.8em 0 .5em; }
.lesson > p:first-child { font-size: 1.3rem; line-height: 1.45; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 1.6em; }
.lesson li { margin: .35em 0; }
.lesson a { overflow-wrap: anywhere; }
.lesson img { max-width: 100%; height: auto; border-radius: var(--radius); }
/* Images et vidéos insérées dans une leçon. */
.lesson figure { margin: 1.8em 0; }
.lesson figure img { display: block; }
.lesson figcaption { margin-top: 8px; font-size: .9rem; color: var(--muted); }
.lesson figure.video video, .lesson figure.video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: var(--navy); }
.lesson .table-wrap { margin: 1.2em 0; box-shadow: none; background: none; }
.lesson table { border-collapse: collapse; font-size: .95rem; }
.lesson th { background: var(--ink); color: #fff; text-align: left; font-weight: 600; font-size: inherit; text-transform: none; letter-spacing: 0; }
.lesson td { background: var(--surface); }
.lesson th, .lesson td { border: 1px solid var(--line); padding: 8px 12px; vertical-align: top; }
.lesson blockquote { margin: 1.2em 0; padding: 4px 18px; color: var(--ink-soft); background: var(--surface); border-radius: var(--radius); }
/* Ce que l'IA a répondu : fond distinct du document source. */
.lesson blockquote.ai { background: #d6e2ea; color: var(--ink); }
/* Critique repliée : l'apprenant cherche d'abord. */
.reveal { margin: 1.4em 0; background: var(--surface); border-radius: var(--radius); }
.reveal > summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style-position: inside; }
.reveal > summary:hover { background: #fff; border-radius: var(--radius); }
.reveal[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.reveal > :not(summary) { margin-left: 18px; margin-right: 18px; }
.reveal > :last-child { margin-bottom: 0; padding-bottom: 16px; }
/* Mise en pratique : bloc nuit marqué du chevron. Le jaune est réservé au
   tracé du parcours et à l'action principale. */
.task { margin: 2.4em 0 0; padding: 26px 28px; background: var(--navy); color: var(--on-dark); border-radius: var(--radius); }
.task h2 { margin: 0 0 .6em; font-size: 1.3rem; color: var(--on-dark); display: flex; gap: 12px; align-items: center; }
.task h2::before { content: ""; flex: none; width: 22px; height: 25px; background: url(/static/chevron.png) center / contain no-repeat; }
.task p:last-child { margin-bottom: 0; }
.task a { color: var(--on-dark); }
.task li::marker { color: var(--glacier); }
.lesson pre { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 16px; overflow-x: auto; white-space: pre-wrap; font-size: .9rem; }
.lesson pre code { background: none; padding: 0; }

/* Quiz */
.quiz { max-width: 60ch; margin-top: 48px; padding: 28px; background: var(--surface); border-radius: var(--radius); scroll-margin-top: 80px; }
.quiz h2 { margin: 0 0 8px; font-size: 1.3rem; }
.hint { color: var(--muted); font-size: .92rem; margin: 0 0 8px; }
fieldset { border: 0; padding: 0; margin: 26px 0; min-width: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 10px; }
.qnum { color: var(--muted); }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin: 8px 0; background: #fff; border: 1px solid #6f7a88; border-radius: var(--radius); cursor: pointer; }
.choice:hover { border-color: var(--ink); }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.choice input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.choice:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.choice input:focus-visible { outline: none; box-shadow: none; }
.choice .text { flex: 1; }
.choice .mark { flex: none; font-size: .8rem; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: #fff; }
.choice.right, .choice.right:has(input:checked) { border-color: var(--ok); background: var(--ok-bg); }
.choice.right .mark { color: var(--ok); }
.choice.wrong, .choice.wrong:has(input:checked) { border-color: var(--ink-soft); border-style: dashed; background: #fff; }
.choice.wrong .text { color: var(--muted); }
.choice.wrong .mark { background: var(--ink-soft); color: #fff; }
.choice:has(input:disabled) { cursor: default; }
.explain { margin: 10px 0 0; font-size: .95rem; color: var(--ink-soft); }
.explain.ok strong { color: var(--ok); }
.explain.ko strong { color: var(--ink); }
.result { font-weight: 600; padding: 12px 16px; border-radius: var(--radius); margin: 0 0 20px; }
.result span { font-weight: 400; margin-left: 8px; }
.result.ok { background: var(--ok-bg); color: var(--ok); }
.result.ko { background: var(--ko-bg); color: var(--ko); }
/* Quiz à reprendre : ton neutre, ce n'est pas une faute. */
.result.retry { background: var(--navy); color: var(--on-dark); }
/* Le bandeau reçoit le focus pour être annoncé ; ce n'est pas un contrôle, pas d'anneau. */
.result:focus { outline: none; box-shadow: none; }
.result.retry span { display: block; margin: 4px 0 0; color: var(--on-dark-soft); }
.quiz .task { margin: 20px 0; }
/* Après validation : ce qui vient ensuite, sur une bande nuit, avec une seule action. */
.nextstep { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; margin: 20px 0; padding: 24px 26px; background: var(--navy); color: var(--on-dark); border-radius: var(--radius); }
.nextstep > div { flex: 1 1 280px; min-width: 0; }
.nextstep .t { margin: 0 0 10px; font-size: 1.25rem; line-height: 1.3; font-weight: 700; letter-spacing: -0.015em; }
.nextstep .facts { margin: 0; }
.nextstep .left { margin: 10px 0 0; font-size: .93rem; color: var(--on-dark-soft); }
.nextstep .btn { flex: none; background: var(--accent); border-color: var(--accent); color: var(--ink); padding: 13px 28px; }
.nextstep .btn:hover { background: #fff; border-color: #fff; }
/* Module précédent / suivant */
.pager { max-width: 60ch; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.pager a { display: block; padding: 14px 16px; background: var(--surface); border-radius: var(--radius); text-decoration: none; font-weight: 600; }
.pager a:hover { background: #fff; }
.pager a.fwd { text-align: right; grid-column: 2; }
.pager small { display: block; font-weight: 400; }

/* Attestation : feuille claire, pensée pour l'impression */
.attestation { position: relative; text-align: center; padding: 56px 24px; margin-top: 40px; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); }
.attestation img.logo { height: 40px; width: auto; margin-bottom: 28px; }
.attestation .kind { font-size: 1.1rem; font-weight: 600; color: var(--muted); margin: 0 0 20px; }
.attestation .name { font-size: 1.5rem; font-weight: 700; margin: 10px 0; }

/* Administration */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); }
td.bar, th.bar { width: 30%; }
td.bar progress { margin: 6px 0 2px; }
.filter { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin: 0 0 8px; }
.filter label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.filter .check { display: flex; align-items: center; gap: 8px; font-weight: 400; padding-bottom: 12px; }
.filter input[type=search] { font: inherit; padding: 10px 12px; min-width: min(100%, 260px); border: 1px solid #6f7a88; border-radius: var(--radius); background: #fff; color: var(--ink); }
.result { margin-top: 0; }
.hero + .result { margin-top: -16px; }
/* Médiathèque */
.form input[type=file] { padding: 14px; background: #fff; }
.media { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.media li { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 14px; background: var(--surface); border-radius: var(--radius); }
.media .preview img, .media .preview video { display: block; width: 150px; height: 96px; object-fit: cover; border-radius: 4px; background: var(--navy); }
.media .name { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.media p { margin: 2px 0; }
.media label { display: grid; gap: 4px; margin: 8px 0 4px; font-size: .85rem; font-weight: 600; }
.media input { font: .85rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 8px 10px; border: 1px solid #6f7a88; border-radius: var(--radius); width: 100%; background: #fff; color: var(--ink); }
.media .acts { display: grid; gap: 8px; }
.media .acts .btn { width: 100%; padding: 8px 16px; }
/* Blocs repliables du formulaire : aide et questions du quiz */
.form details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.form details > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; }
.form details[open] > summary { border-bottom: 1px solid var(--line); }
.form details > :not(summary) { margin: 16px; }
.form details ul { padding-left: 20px; font-size: .92rem; }
.form .section { margin: 12px 0 0; }
.answers { margin: 16px; }
.answers legend { font-size: .92rem; }
.answer { display: grid; grid-template-columns: 22px 1fr 1fr; gap: 10px; align-items: center; margin: 8px 0; }
.answer input[type=radio] { width: 18px; height: 18px; accent-color: var(--ink); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th { text-align: left; font-size: .85rem; font-weight: 600; color: var(--muted); }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.form { display: grid; gap: 18px; padding: 24px; background: var(--surface); border-radius: var(--radius); }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.form small { font-weight: 400; }
.form input:not([type=checkbox]), .form textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid #6f7a88; border-radius: var(--radius); width: 100%; background: #fff; color: var(--ink); }
.form textarea { resize: vertical; line-height: 1.5; }
.form .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
.form .short { max-width: 120px; }
.form .check { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.form .btn { justify-self: start; }
.cols { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.cols.three { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* Pied de page */
.foot { background: var(--navy); color: var(--on-dark-soft); font-size: .88rem; }
.foot .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; max-width: 1120px; }
.foot img { display: block; height: 20px; width: auto; }

/* Lecteurs d'écran seulement. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Bande nuit pleine largeur : index des parcours, étapes d'un parcours. */
.band { width: 100vw; margin-left: calc(50% - 50vw); padding: 56px 0 104px; background: var(--navy); color: var(--on-dark); }
.band h2 { margin: 0 0 8px; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.025em; }
.band .lead { color: var(--on-dark-soft); }
.band .btn { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.band .btn:hover { background: #fff; border-color: #fff; }
.band .tag { background: rgba(255, 255, 255, .16); color: var(--on-dark); }
.hero:has(+ .band) { margin-bottom: 0; }
/* La bande nuit descend jusqu'au pied de page, même sur une page courte. */
main.wrap:has(> .band:last-child) { padding-bottom: 0; display: flex; flex-direction: column; }
.band:last-child { flex: 1; }

/* Le fil du parcours : une étape par module, reliées par un tracé. Fait =
   jaune plein ; à venir = cerclé ; votre position = le chevron Forward. */
.route { list-style: none; margin: 52px 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.route li { position: relative; }
.route li::before { content: ""; position: absolute; top: 13px; left: 14px; width: 100%; height: 2px; background: rgba(159, 182, 195, .5); }
.route li:last-child::before { display: none; }
.route li.done::before { top: 12px; height: 4px; background: var(--accent); }
.route a { position: relative; display: block; padding-right: 20px; color: inherit; text-decoration: none; }
.route .dot { display: block; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--glacier); background: var(--navy); }
.route .done .dot { border-color: var(--accent); background: var(--accent); }
.route .here .dot { border: 0; border-radius: 0; background: url(/static/chevron.png) center / contain no-repeat; }
.route .n { display: block; margin-top: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--on-dark); }
.route .t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: .88rem; line-height: 1.35; color: var(--on-dark-soft); }
.route .here .t { color: var(--on-dark); font-weight: 600; }
.route a:hover .t { color: var(--on-dark); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* En colonne, sur la page d'un parcours. */
.route.v { grid-auto-flow: row; grid-auto-columns: auto; margin: 0 0 8px; }
.route.v li::before { top: 46px; left: 13px; width: 2px; height: calc(100% - 28px); }
.route.v li.done::before { top: 46px; left: 12px; width: 4px; height: calc(100% - 28px); }
.route.v a { display: grid; grid-template-columns: 28px 1.6em minmax(0, 1fr) auto 5.5em; gap: 0 18px; align-items: center; padding: 18px 0; }
.route.v .n { margin: 0; font-size: 1.1rem; color: var(--glacier); }
.route.v .t { display: block; font-size: 1.2rem; line-height: 1.3; font-weight: 600; color: var(--on-dark); }
.route.v .m, .route.v .s { font-size: .9rem; color: var(--on-dark-soft); white-space: nowrap; }
.route.v .s { text-align: right; }

/* En réduit, dans le bandeau d'un module : des points seuls. */
.route.mini { margin: 22px 0 0; grid-auto-columns: 46px; justify-content: start; }
.route.mini li::before { top: 8px; left: 9px; }
.route.mini li.done::before { top: 7px; }
.route.mini a { padding: 0; width: 18px; }
.route.mini .dot { width: 18px; height: 18px; background: transparent; }
.route.mini .done .dot { background: var(--accent); }
.route.mini .cur .dot { outline: 2px solid var(--on-dark); outline-offset: 4px; }

/* Index des parcours, sur la bande nuit. */
.index { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid rgba(159, 182, 195, .3); }
.index li { border-bottom: 1px solid rgba(159, 182, 195, .3); }
.index a { display: grid; grid-template-columns: minmax(0, 1fr) 7em 5em auto; grid-template-areas: "name count time dots" "sum count time dots"; gap: 2px 24px; align-items: center; padding: 20px 0; color: inherit; text-decoration: none; }
.index .name { grid-area: name; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.015em; }
.index .sum { grid-area: sum; font-size: .93rem; color: var(--on-dark-soft); max-width: 60ch; }
.index .count { grid-area: count; }
.index .time { grid-area: time; }
.index .count, .index .time { font-size: .93rem; color: var(--on-dark-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.index .count.soon { grid-column: count / dots; }
.index .dots { grid-area: dots; min-width: 110px; white-space: nowrap; }
.index a:hover .name { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.dots i { display: inline-block; width: 11px; height: 11px; margin-right: 5px; border-radius: 50%; border: 2px solid var(--glacier); }
.dots i.on { border-color: var(--accent); background: var(--accent); }

/* Leçon : colonne de lecture et sommaire fixe à droite. */
.read { display: grid; grid-template-columns: minmax(0, 60ch) minmax(0, 220px); gap: 56px; align-items: start; }
.toc-m { display: none; margin: 0 0 24px; background: var(--surface); border-radius: var(--radius); }
.toc-m summary { cursor: pointer; padding: 12px 16px; font-weight: 600; }
.toc-m ol { margin: 0; padding: 0 16px 14px 36px; display: grid; gap: 8px; font-size: .95rem; }
.toc { position: sticky; top: 96px; font-size: .9rem; }
.toc p { margin: 0 0 10px; font-weight: 700; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.toc a { display: block; color: var(--ink-soft); text-decoration: none; padding-left: 12px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--ink); border-left-color: var(--ink); }
.steps small, .steps .tag { white-space: nowrap; }
.steps a:has(.tag) { grid-template-columns: 40px 1fr auto auto auto; }

@media (max-width: 980px) {
  .read { grid-template-columns: minmax(0, 60ch); }
  .toc { display: none; }
  .toc-m { display: block; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand img { height: 22px; }
  .top .wrap { gap: 4px 10px; padding: 6px 14px; flex-wrap: wrap; }
  .top.scrolled .wrap { flex-wrap: nowrap; }
  .ctx-meta { display: none; }
  .top.scrolled nav a:not(.lang), .top.scrolled nav form { display: none; }
  .top nav { gap: 12px; font-size: .82rem; }
  .top nav .lang { padding: 3px 7px; }
  .hero { padding: 36px 0 32px; }
  .hero.big { padding: 48px 0 40px; }
  .route { margin-top: 36px; }
  .route:not(.v) .t { display: none; }
  .route a { padding-right: 6px; }
  .route.v a { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 2px 14px; }
  .route.v .n { display: none; }
  .route.v .t { font-size: 1.05rem; }
  .route.v .s { display: none; }
  .route.mini { grid-auto-columns: 38px; }
  .index a { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name name" "sum sum" "count dots"; gap: 6px 16px; }
  .index .time { display: none; }
  .band { padding: 40px 0 72px; }
  /* Sur petit écran les faits passent à la ligne : pas de filet orphelin en début de ligne. */
  .facts { gap: 2px 16px; }
  .facts li + li { margin-left: 0; padding-left: 0; border-left: 0; }
  .hero::before { background: rgba(3, 6, 16, .76); }
  .pager { grid-template-columns: 1fr; }
  .media li { grid-template-columns: 1fr; }
  .media .preview img, .media .preview video { width: 100%; height: 150px; }
  .choice { flex-wrap: wrap; }
  .choice .text { flex: 1 1 calc(100% - 44px); min-width: 0; }
  .choice .mark { order: 3; margin-left: 30px; }
  .pager a.fwd { grid-column: 1; }
  .answer { grid-template-columns: 22px 1fr; }
  .answer input[lang] { grid-column: 2; }
  .steps a { grid-template-columns: 40px 1fr; }
  .steps small { grid-column: 2; }
  .quiz { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .top, .foot, .noprint, .skip, .hero { display: none; }
  body { background: #fff; }
  .attestation { margin-top: 18vh; padding: 96px 48px; }
}
