/* Direction : tout part du logo. Son bleu nuit fait le fond, son sable trace les filets,
   son cercle devient le médaillon de chaque formation (les taux en anneaux) et son trait
   continu dessine les motifs de chirurgie à mesure que l'on descend.
   Titres en Newsreader (serif, léger, serré), texte en Fira Sans. */
:root {
  --nuit: #1c232e;        /* fond de page, le bleu du logo assombri */
  --marine: #262e3b;      /* fond du logo, bandeaux */
  --sable: #ccbc9b;       /* or sable du logo */
  --ivoire: #f1ece2;
  --brume: #a6acb6;

  /* noms d'origine, conservés pour les gabarits générés par app.js */
  --navy: var(--marine);
  --navy-deep: #161c25;
  --sand: var(--sable);
  --bronze: var(--sable);
  --ink: var(--ivoire);
  --muted: var(--brume);
  --line: rgba(204, 188, 155, .2);
  --surface: rgba(255, 255, 255, .045);
  --on-navy: var(--ivoire);
  --on-navy-muted: var(--brume);
  --ok: #9bd3ad;
  --err: #f2a594;

  --font: "Fira Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.55rem, 2.4vw, 1.95rem);
  --step-3: clamp(2.1rem, 4.6vw, 3.4rem);
  --step-4: clamp(2.6rem, 6.6vw, 5.2rem);

  --radius: 4px;
  --wrap: 86rem;
  --gutter: clamp(20px, 5vw, 64px);
  --header-h: 72px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); background: var(--nuit); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--nuit); color: var(--ink); font: 400 var(--step-0)/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; display: block; }
[hidden] { display: none !important; }
::selection { background: var(--sable); color: var(--nuit); }
a { color: inherit; text-decoration-color: var(--sable); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--sable); outline-offset: 3px; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-family: var(--serif); font-weight: 300; line-height: 1.04; letter-spacing: -0.022em; }
h1 { font-size: var(--step-4); line-height: .98; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.2; font-weight: 400; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.label { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sable); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ivoire); color: var(--nuit); padding: 8px 12px; z-index: 60; }

/* Bandeaux marine */
.navy { background: var(--marine); }

/* ---------- En-tête : transparent sur le film, plein ensuite ---------- */
.site-header { position: sticky; top: 0; z-index: 30; height: var(--header-h); margin-bottom: calc(-1 * var(--header-h));
  transition: background-color .35s ease, border-color .35s ease; border-bottom: 1px solid transparent; }
.site-header.plein { background: rgba(22, 28, 37, .84); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 100%; }
.brand img { height: 26px; width: auto; }
.nav { display: flex; gap: clamp(16px, 2.4vw, 34px); }
.nav a { color: var(--ivoire); text-decoration: none; font-size: 0.74rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; padding-block: 6px; border-bottom: 1px solid transparent; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--sable); }
.menu-btn { display: none; background: none; border: 1px solid rgba(241, 236, 226, .35); border-radius: 999px; color: var(--ivoire); font: 500 0.72rem/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; padding: 10px 16px; cursor: pointer; }

/* ---------- Boutons : pastilles, comme des commandes de lecteur ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; text-decoration: none;
  font: 500 0.78rem/1 var(--font); letter-spacing: 0.14em; text-transform: uppercase; padding: 15px 24px; border-radius: 999px;
  background: var(--sable); color: var(--nuit); border: 1px solid var(--sable); transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.btn:hover { background: var(--ivoire); border-color: var(--ivoire); }
.btn.line { background: transparent; color: var(--ivoire); border-color: rgba(241, 236, 226, .38); }
.btn.line:hover { background: transparent; border-color: var(--sable); color: var(--sable); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Héros : la vidéo en boucle, comme à l'origine ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; min-height: min(100vh, 60rem); min-height: min(100svh, 60rem); display: grid; align-items: end; }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(28, 35, 46, .6) 0%, rgba(28, 35, 46, 0) 26%, rgba(28, 35, 46, .25) 60%, rgba(28, 35, 46, .92) 100%),
    linear-gradient(90deg, rgba(28, 35, 46, .92) 0%, rgba(38, 46, 59, .72) 42%, rgba(38, 46, 59, .22) 100%); }
.hero .wrap { width: 100%; padding-block: calc(var(--header-h) + 48px) clamp(40px, 6vw, 72px); display: grid; gap: 24px; justify-items: start; }
.hero h1 { max-width: 18ch; font-size: clamp(2.5rem, 5.6vw, 4.6rem); }
.hero .intro { max-width: 30rem; font-size: 1.12rem; font-weight: 300; line-height: 1.6; color: rgba(241, 236, 226, .9); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.hero-facts { justify-self: stretch; display: flex; flex-wrap: wrap; gap: 16px clamp(28px, 5vw, 64px); padding-top: 24px; margin-top: 20px; border-top: 1px solid var(--line); }
.hero-facts:empty { display: none; }
.hero-facts div { display: grid; gap: 2px; }
.hero-facts b { font: 300 1.6rem/1.15 var(--serif); letter-spacing: -0.015em; color: var(--sable); font-variant-numeric: lining-nums; }
.hero-facts span { font-size: var(--step--1); color: var(--muted); }

/* ---------- Catalogue : une scène par formation ---------- */
.catalogue-tete { padding-block: clamp(72px, 10vw, 136px) clamp(28px, 4vw, 48px); }
.catalogue-tete .section-head { margin-bottom: clamp(24px, 3vw, 36px); }
.courses { position: relative; }
/* Chaque scène reste en place pendant que la suivante la recouvre ; app.js règle « top »
   et fournit --t (tracé du motif, 0 à 1) et --couvert (part recouverte par la suivante). */
.scene { position: sticky; top: 0; min-height: 100vh; min-height: 100svh; display: grid; align-items: center; overflow: hidden;
  background: var(--marine); border-top: 1px solid var(--line); box-shadow: 0 -28px 60px rgba(10, 13, 18, .35); }
.scene:nth-child(even) { background: var(--nuit); }
.scene::after { content: ""; position: absolute; inset: 0; background: #0d1117; opacity: calc(var(--couvert, 0) * .62); pointer-events: none; }
.scene-grille { width: 100%; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px clamp(32px, 6vw, 96px); align-items: center;
  padding-block: calc(var(--header-h) + 28px) 56px; transform: scale(calc(1 - var(--couvert, 0) * .035)); transform-origin: 50% 0; }
.repere { display: flex; align-items: center; gap: 14px; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivoire); }
.repere b { flex: none; font-weight: 500; color: var(--sable); font-variant-numeric: tabular-nums; white-space: nowrap; }
.repere b::after { content: ""; display: inline-block; vertical-align: middle; width: 36px; height: 1px; margin-left: 14px; background: rgba(241, 236, 226, .5); }
.scene .course-main { display: grid; gap: 20px; align-content: center; min-width: 0; }
.scene .course-main h3 { font-size: clamp(2.2rem, 5vw, 4.2rem); font-weight: 300; line-height: 1; letter-spacing: -0.025em; max-width: 14ch; }
.scene .course-main h3 a { text-decoration: none; background: linear-gradient(var(--sable), var(--sable)) 0 100% / 0 1px no-repeat; transition: background-size .4s ease; }
.scene .course-main h3 a:hover { background-size: 100% 1px; }
.scene .course-main > p:not(.repere) { color: rgba(241, 236, 226, .8); font-size: 1.1rem; font-weight: 300; max-width: 34rem; }
.scene .facts-line { gap: 10px 32px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; }
.scene .facts-line span { display: grid; gap: 4px; }
.scene .facts-line b { font: 400 1.02rem/1.3 var(--font); letter-spacing: 0; text-transform: none; }
.scene .course-actions { padding-top: 6px; }
.scene .course-side { display: grid; gap: 20px; justify-items: center; }
.scene .results { width: min(100%, 24rem); background: none; border: 0; }
.scene .result { padding: 0 20px; justify-items: center; text-align: center; }

/* Médaillon : le cercle du logo. Anneau extérieur = satisfaction, intérieur = réussite. */
.medaillon { width: min(100%, 25rem, 52vh); height: auto; overflow: visible; fill: none; stroke: var(--sable); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.medaillon .piste { stroke: rgba(204, 188, 155, .2); stroke-width: 1; }
.medaillon .arc { stroke-width: 2.5; stroke-dasharray: calc(var(--t, 1) * var(--r)) 100; }
.medaillon .motif path { stroke-width: 1.7; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--t, 1)); }
.medaillon .fil-logo { stroke: rgba(204, 188, 155, .55); stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--t, 1)); }
.result .label::before { content: ""; display: inline-block; vertical-align: middle; width: 9px; height: 9px; margin-right: 8px; border: 1.5px solid var(--sable); border-radius: 50%; }
.result + .result .label::before { width: 6px; height: 6px; }
.result.empty .label::before { border-color: rgba(204, 188, 155, .35); }
@media (prefers-reduced-motion: reduce) { .scene { position: relative; } }

/* Demande d'inscription, par-dessus la scène */
.demande-dialog { border: 1px solid var(--line); border-radius: 8px; padding: clamp(18px, 3vw, 30px); background: var(--marine); color: var(--ivoire); width: min(94vw, 36rem); max-height: 92vh; max-height: 92dvh; overflow-y: auto; }
.demande-dialog::backdrop { background: rgba(10, 13, 18, .78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.demande-dialog .dlg-fermer { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.demande-dialog .dlg-fermer .btn { padding: 10px 16px; }
.demande-dialog .dlg-titre { font: 300 1.7rem/1.1 var(--serif); letter-spacing: -0.02em; margin-bottom: 18px; max-width: 18ch; }
.demande-dialog .form-card { background: none; border: 0; padding: 0; }
.demande-dialog .form-card h3 { font: 500 0.72rem/1.2 var(--font); letter-spacing: 0.2em; text-transform: uppercase; color: var(--sable); }

/* Le lieu : la vidéo (16/9) et la photo de la salle (3/2) partagent la même hauteur */
.place { display: grid; gap: clamp(32px, 5vw, 56px); }
.place-text { display: grid; gap: 18px; max-width: 44rem; }
.place-text address { font-style: normal; }
.place-medias { display: grid; grid-template-columns: minmax(0, 1.778fr) minmax(0, 1.5fr); gap: clamp(12px, 1.6vw, 20px); }
.place-medias video { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--navy-deep); }
.salle { position: relative; margin: 0; }
.salle img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.salle figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px; border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(180deg, rgba(22, 28, 37, 0), rgba(22, 28, 37, .82)); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 10vw, 136px); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); max-width: 44rem; }
.section-head p { color: var(--muted); max-width: 38rem; }

/* Filtres */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--ivoire); border-radius: 999px; padding: 10px 18px; font: 500 0.72rem/1 var(--font); letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; }
.chip:hover { border-color: var(--sable); }
.chip[aria-pressed="true"] { background: var(--sable); color: var(--nuit); border-color: var(--sable); }

/* Lignes d'information d'une formation */
.facts-line { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 0.92rem; color: var(--muted); padding-top: 4px; }
.facts-line b { color: var(--ivoire); font-weight: 500; }
.course-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Indicateurs de résultats */
.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.result { padding: 18px 20px; display: grid; gap: 4px; align-content: start; }
.result + .result { border-left: 1px solid var(--line); }
.result .label { font-size: 0.64rem; letter-spacing: 0.16em; color: var(--muted); }
.result b { font: 300 2.5rem/1.05 var(--serif); letter-spacing: -0.02em; color: var(--sable); font-variant-numeric: lining-nums tabular-nums; }
.result small { font-size: 0.8rem; color: var(--muted); line-height: 1.35; }
.result.empty b { font: 400 1rem/1.4 var(--font); letter-spacing: 0; color: var(--muted); padding-block: 8px 4px; }
.results-note { font-size: 0.8rem; color: var(--muted); }

/* Formulaires */
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ivoire); background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; transition: border-color .2s ease, background-color .2s ease; }
.field input:hover, .field textarea:hover { border-color: rgba(204, 188, 155, .45); }
.field textarea { min-height: 116px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--sable); outline-offset: 0; border-color: transparent; background: rgba(255, 255, 255, .08); }
.field ::placeholder { color: rgba(166, 172, 182, .7); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.84rem; color: var(--muted); line-height: 1.5; }
.consent input { margin-top: 3px; accent-color: var(--sable); flex: none; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { font-size: 0.94rem; font-weight: 500; }
.form-msg:empty { display: none; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--err); }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 30px); display: grid; gap: 16px; }
.form-card h3 { font-size: 1.5rem; font-weight: 300; }

/* Qualité */
.quality { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.quality-status { display: grid; gap: 20px; justify-items: start; }
.quality-status img { width: 180px; height: auto; background: #fff; padding: 10px; border-radius: var(--radius); }
.badge { display: inline-flex; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 500; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); width: fit-content; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sable); }
.badge.ok::before { background: var(--ok); }
/* Le fil : avant, pendant, après. Il se tire à mesure que l'on descend (--t, réglé par app.js). */
.steps { position: relative; display: grid; gap: 34px; margin: 0; padding-left: 40px; }
.steps::before, .steps::after { content: ""; position: absolute; left: 6px; top: 10px; bottom: 6px; width: 1px; background: rgba(204, 188, 155, .22); }
.steps::after { background: var(--sable); transform-origin: 50% 0; transform: scaleY(var(--t, 1)); }
.steps div { position: relative; display: grid; gap: 6px; }
.steps div::before { content: ""; position: absolute; left: -40px; top: 7px; width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--sable); background: var(--marine); z-index: 1; transition: background-color .4s ease, box-shadow .4s ease; }
.steps.anime div:not(.atteint)::before { border-color: rgba(204, 188, 155, .4); }
.steps.anime div:not(.atteint) dt { color: rgba(241, 236, 226, .55); }
.steps div.atteint::before, .steps:not(.anime) div::before { background: var(--sable); box-shadow: 0 0 0 5px rgba(204, 188, 155, .14); }
.steps dt { font: 300 1.9rem/1.1 var(--serif); letter-spacing: -0.02em; transition: color .4s ease; }
.steps dd { margin: 0; color: var(--muted); max-width: 34rem; }

/* Suggestion + newsletter */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.split .section-head { margin-bottom: 0; }
.nl-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.nl-row .field { flex: 1 1 13rem; }

/* ---------- Fiche formation et pages de texte ---------- */
.detail-hero { position: relative; overflow: hidden; }
.detail-hero.avec-medaillon .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 16rem); column-gap: clamp(24px, 5vw, 72px); }
.detail-hero.avec-medaillon .wrap > * { grid-column: 1; }
.detail-hero.avec-medaillon .medaillon { grid-column: 2; grid-row: 1 / span 5; align-self: center; width: 100%; }
.detail-hero .wrap { padding-block: calc(var(--header-h) + clamp(40px, 7vw, 88px)) clamp(48px, 7vw, 88px); display: grid; gap: 20px; }
.detail-hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); max-width: 18ch; }
.detail-hero .intro { max-width: 56ch; color: rgba(241, 236, 226, .86); font-size: 1.12rem; font-weight: 300; }
.crumbs { font-size: 0.88rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 25rem); gap: clamp(32px, 5vw, 80px); align-items: start; padding-block: clamp(48px, 6vw, 72px) 120px; }
.detail article { display: grid; gap: 52px; min-width: 0; }
.detail section { display: grid; gap: 16px; }
.detail h2 { font-size: var(--step-2); font-weight: 400; letter-spacing: -0.015em; line-height: 1.12; }
.detail h3 { font-family: var(--font); font-size: 1.05rem; font-weight: 500; letter-spacing: 0; }
.detail ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.detail ul li::marker { color: var(--sable); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); margin: 0; border-top: 1px solid var(--line); }
.facts div { padding: 18px 18px 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; align-content: start; }
.facts dt { font-size: 0.66rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--sable); }
.facts dd { margin: 0; }
.prog { list-style: none; padding: 0 !important; gap: 0 !important; border-top: 1px solid var(--line); }
.prog li { padding-block: 18px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.prog li p { color: var(--muted); }
.callout { border-left: 1px solid var(--sable); padding: 4px 0 4px 22px; display: grid; gap: 8px; }
.aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 22px; }
.price-box { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price-box b { font: 300 2.7rem/1 var(--serif); letter-spacing: -0.02em; color: var(--sable); font-variant-numeric: lining-nums; }
.dates, .detail .dates { list-style: none; margin: 0; padding: 0; gap: 0; border-top: 1px solid var(--line); }
.dates li { display: flex; justify-content: space-between; gap: 4px 12px; padding-block: 12px; border-bottom: 1px solid var(--line); font-size: 0.95rem; flex-wrap: wrap; }
.detail-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }

.prose { display: grid; gap: 18px; padding-block: clamp(48px, 6vw, 72px) 120px; }
.prose > * { max-width: 46rem; }
.prose h2 { font-size: var(--step-2); font-weight: 400; letter-spacing: -0.015em; line-height: 1.12; margin-top: 24px; }
.prose p, .prose li, .prose dd { color: rgba(241, 236, 226, .86); }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.prose ul li::marker { color: var(--sable); }
.prose dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 28px; margin: 0; }
.prose dt { color: var(--muted); }
.prose dd { margin: 0; }

/* ---------- Pied de page ---------- */
.site-footer { padding-block: 72px 40px; font-size: 0.92rem; border-top: 1px solid var(--line); }
.site-footer.navy { background: var(--nuit); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 40px; }
.site-footer .brand img { height: 26px; margin-bottom: 20px; }
.site-footer h3 { font: 500 0.72rem/1.2 var(--font); letter-spacing: 0.2em; text-transform: uppercase; color: var(--sable); margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.legal-line { grid-column: 1 / -1; padding-top: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; line-height: 1.6; }

.demo-banner { background: var(--sable); color: var(--nuit); text-align: center; font-size: 0.85rem; padding: 8px 16px; }

/* ---------- Écrans étroits ---------- */
@media (max-width: 900px) {
  .scene-grille, .place-medias, .quality, .split, .detail { grid-template-columns: minmax(0, 1fr); }
  .scene-grille { padding-block: calc(var(--header-h) + 20px) 44px; gap: 24px; }
  .scene .course-side { order: -1; justify-items: start; grid-template-columns: 9.5rem minmax(0, 1fr); align-items: center; gap: 12px; }
  .scene .medaillon { width: 9.5rem; }
  .scene .results { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .scene .result { padding: 0 0 0 8px; justify-items: start; text-align: left; }
  .scene .result + .result { border-left: 0; }
  .detail-hero.avec-medaillon .wrap { grid-template-columns: minmax(0, 1fr); }
  .detail-hero.avec-medaillon .medaillon { display: none; }
  .aside { position: static; }
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
    background: var(--nuit); flex-direction: column; gap: 0; padding: 12px var(--gutter) 32px; overflow-y: auto; }
  .site-header.ouvert { background: var(--nuit); border-bottom-color: var(--line); }
  .site-header.ouvert .nav { display: flex; }
  .nav a { font: 300 2rem/1.1 var(--serif); letter-spacing: -0.02em; text-transform: none; padding-block: 18px; border-bottom: 1px solid var(--line); white-space: normal; }
}
@media (max-width: 520px) {
  :root { --header-h: 64px; }
  .form .row { grid-template-columns: minmax(0, 1fr); }
  .brand img { height: 20px; }
  .result b { font-size: 2rem; }
  .btn { padding: 14px 20px; }
  .scene .course-main h3 { font-size: 2.1rem; }
  .scene .course-actions .btn { flex: 1 1 100%; }
  .prose dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .prose dd { margin-bottom: 10px; }
}

/* Fiche en cours de chargement ou introuvable : laisser la place de l'en-tête */
#fiche > .prose { padding-top: calc(var(--header-h) + 56px); }
