/* Rongas Académie : le chantier. Bandes pleine largeur bleu nuit / clair, motif de briques, or réservé aux repères. */
:root {
  --nuit: #0E1A3A;          /* bleu nuit de la marque */
  --nuit-2: #17264D;
  --or: #C9A653;            /* or des couvertures */
  --or-fonce: #8A6A1F;      /* or lisible sur fond clair */
  --bg: #F4F6FA;            /* fond clair, gris à biais bleu */
  --surface: #FFFFFF;
  --fg: #141B2E;
  --fg-2: #4A536B;
  --line: #D9DEEA;
  --brique: #E7DCC4;
  --sur-nuit: #EEF1F8;
  --sur-nuit-2: #AEB8D2;
  --vert: #2E7D5B;
  --f-display: "Lora", Georgia, "Times New Roman", serif;
  --f-body: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 6px;
  --w: 1160px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1226; --surface: #131C36; --fg: #E9EDF6; --fg-2: #A9B2CB; --line: #26324F;
    --brique: #2A2A22; --or-fonce: #D9B968; --nuit: #070D1F; --nuit-2: #101A36; --vert: #5CC096;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1226; --surface: #131C36; --fg: #E9EDF6; --fg-2: #A9B2CB; --line: #26324F;
  --brique: #2A2A22; --or-fonce: #D9B968; --nuit: #070D1F; --nuit-2: #101A36; --vert: #5CC096;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--f-body); font-size: 1rem; line-height: 1.65; font-weight: 400;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }

.wrap {
  max-width: var(--w); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }

h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0; }
.prose p + p { margin-top: 1em; }
.prose { max-width: 68ch; }
em.or, .or-txt { color: var(--or-fonce); font-style: italic; }
.eyebrow {
  font-family: var(--f-body); font-size: .78rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--or-fonce);
}
.lead { font-size: 1.15rem; color: var(--fg-2); max-width: 60ch; }
.muted { color: var(--fg-2); }
.small { font-size: .88rem; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- En-tête ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--nuit); }
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--nuit); color: var(--sur-nuit); border-bottom: 1px solid rgba(255,255,255,.08); }
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; flex-shrink: 0; }
.logo-mark { width: 38px; height: 38px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); gap: 3px; }
.logo-mark span { background: var(--or); border-radius: 1px; }
.logo-mark span:nth-child(1) { grid-column: 1 / 3; }
.logo-mark span:nth-child(4) { grid-column: 1 / 3; opacity: .55; }
.logo-txt { line-height: 1.05; }
.logo-txt b { display: block; font-family: var(--f-display); font-size: 1.2rem; font-weight: 600; letter-spacing: .01em; }
.logo-txt small { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--or); }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav a { text-decoration: none; font-size: .9rem; padding: 8px 12px; border-radius: var(--r); color: var(--sur-nuit-2); }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.07); }
.nav a.btn { color: var(--nuit); background: var(--or); margin-left: 8px; }
.nav a.btn:hover { background: #D8B866; color: var(--nuit); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: var(--r); padding: 8px 12px; font: inherit; font-size: .9rem; cursor: pointer; }
@media (max-width: 960px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--nuit); flex-direction: column; align-items: stretch; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid rgba(255,255,255,.1); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav a.btn { margin: 8px 0 0; text-align: center; }
}

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--f-body); font-weight: 600; font-size: .95rem; text-decoration: none; padding: 13px 22px; border-radius: var(--r); border: 2px solid transparent; cursor: pointer; transition: background .15s, color .15s; }
.btn-or { background: var(--or); color: var(--nuit); }
.btn-or:hover { background: #D8B866; }
.btn-ligne { border-color: currentColor; color: inherit; background: transparent; }
.btn-ligne:hover { background: rgba(127,127,127,.12); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Bandes ---------- */
.band { padding-block: clamp(56px, 8vw, 104px); }
.band-nuit { background: var(--nuit); color: var(--sur-nuit); }
.band-nuit .lead, .band-nuit .muted { color: var(--sur-nuit-2); }
.band-nuit .eyebrow { color: var(--or); }
.band-blanc { background: var(--surface); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 52px); max-width: 760px; }

/* ---------- Héros ---------- */
.hero { background: var(--nuit); color: var(--sur-nuit); overflow: hidden; position: relative; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; padding-block: clamp(56px, 9vw, 112px); }
.hero h1 { color: #fff; }
.hero h1 em { color: var(--or); font-style: italic; font-weight: 500; }
.hero .lead { color: var(--sur-nuit-2); margin-top: 22px; }
.hero .btn-row { margin-top: 32px; }
.hero .btn-ligne { color: #fff; }
.launch { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: .9rem; color: var(--sur-nuit-2); border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; }
.launch b { color: #fff; font-weight: 600; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Le mur du bâtisseur : 4 assises de briques, du Semeur au Bâtisseur avisé */
.mur { display: grid; gap: 8px; }
.mur-titre { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--or); margin-bottom: 6px; }
.assise { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 6px; }
.assise:nth-child(odd) { padding-left: 22px; }
.assise:nth-child(even) { padding-right: 22px; }
.assise span { height: 40px; border-radius: 2px; background: rgba(201,166,83,.16); border: 1px solid rgba(201,166,83,.35); }
.assise[data-niv="4"] span { background: var(--or); border-color: var(--or); }
.assise[data-niv="3"] span { background: rgba(201,166,83,.7); }
.assise[data-niv="2"] span { background: rgba(201,166,83,.42); }
.assise-legende { display: flex; justify-content: space-between; gap: 12px; font-size: .82rem; color: var(--sur-nuit-2); }
.assise-legende b { color: #fff; font-weight: 600; }
.mur-pied { margin-top: 10px; font-size: .85rem; color: var(--sur-nuit-2); }
@media (prefers-reduced-motion: no-preference) {
  .assise span { animation: pose .5s ease-out both; }
  .assise[data-niv="1"] span { animation-delay: .05s; }
  .assise[data-niv="2"] span { animation-delay: .2s; }
  .assise[data-niv="3"] span { animation-delay: .35s; }
  .assise[data-niv="4"] span { animation-delay: .5s; }
  @keyframes pose { from { transform: translateY(-6px); } to { transform: none; } }
}

/* ---------- Bandeau de page ---------- */
.page-hero { background: var(--nuit); color: var(--sur-nuit); }
.page-hero .wrap { padding-block: clamp(48px, 7vw, 88px); display: grid; gap: 18px; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 20ch; }
.page-hero .lead { color: var(--sur-nuit-2); }
.page-hero .eyebrow { color: var(--or); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip { font-size: .82rem; padding: 6px 12px; border: 1px solid rgba(201,166,83,.5); color: var(--sur-nuit); border-radius: 999px; }

/* ---------- Les trois portes ---------- */
.portes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.porte { padding: clamp(24px, 3vw, 36px); display: grid; gap: 14px; align-content: start; }
.porte + .porte { border-left: 1px solid var(--line); }
.porte .niveau { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.porte .prix { font-family: var(--f-display); font-size: 1.6rem; color: var(--or-fonce); }
.porte ul { margin: 0; padding-left: 1.1em; color: var(--fg-2); font-size: .95rem; }
.porte ul li + li { margin-top: 4px; }
.porte .lien { font-weight: 600; color: var(--fg); text-underline-offset: 4px; margin-top: 6px; }
@media (max-width: 900px) { .portes { grid-template-columns: 1fr; } .porte + .porte { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- Phases (séquence réelle) ---------- */
.phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); counter-reset: ph; }
.phase { border-top: 3px solid var(--or); padding-top: 18px; display: grid; gap: 10px; align-content: start; }
.phase .sem { font-size: .82rem; color: var(--sur-nuit-2); font-variant-numeric: tabular-nums; }
.phase h3 { color: #fff; font-size: 1.6rem; }
.phase p { color: var(--sur-nuit-2); }
@media (max-width: 820px) { .phases { grid-template-columns: 1fr; } }

/* ---------- Grilles génériques ---------- */
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.g2 > *, .g3 > *, .g4 > * { min-width: 0; }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.bloc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(20px, 2.6vw, 30px); display: grid; gap: 10px; align-content: start; }
.band-blanc .bloc { background: var(--bg); }
.bloc h3 { font-size: 1.15rem; }
.bloc .k { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--or-fonce); }
.bloc p, .bloc li { color: var(--fg-2); font-size: .95rem; }
.bloc ul { margin: 0; padding-left: 1.1em; }

/* ---------- Tableaux ---------- */
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
th { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); font-weight: 600; background: var(--bg); }
tr:last-child td { border-bottom: 0; }
td.code { font-family: var(--f-display); font-weight: 600; color: var(--or-fonce); white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.sep td { background: var(--bg); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--or-fonce); padding-block: 10px; }
.table-min { min-width: 640px; }

/* ---------- Avant / après ---------- */
.ap { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.ap-row { display: grid; grid-template-columns: 1fr 1fr; }
.ap-row > div { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.ap-row > div:first-child { color: var(--fg-2); border-right: 1px solid var(--line); }
.ap-row:last-child > div { border-bottom: 0; }
.ap-head > div { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; background: var(--bg); }
.ap-head > div:last-child { color: var(--or-fonce); }
@media (max-width: 600px) { .ap-row { grid-template-columns: 1fr; } .ap-row > div:first-child { border-right: 0; border-bottom: 1px dashed var(--line); } .ap-head { display: none; } .ap-row > div:first-child::before { content: "Avant · "; font-weight: 600; } .ap-row > div:last-child::before { content: "Après 90 jours · "; font-weight: 600; color: var(--or-fonce); } }

/* ---------- Grades ---------- */
.grades { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.grade { padding: 22px; display: grid; gap: 8px; align-content: start; border-left: 1px solid var(--line); }
.grade:first-child { border-left: 0; }
.grade .bar { height: 8px; border-radius: 2px; background: var(--brique); position: relative; overflow: hidden; }
.grade .bar i { position: absolute; inset: 0 auto 0 0; background: var(--or); }
.grade b { font-family: var(--f-display); font-size: 1.15rem; }
.grade .seuil { font-size: .82rem; color: var(--or-fonce); font-weight: 600; font-variant-numeric: tabular-nums; }
.grade p { font-size: .9rem; color: var(--fg-2); }
@media (max-width: 800px) { .grades { grid-template-columns: 1fr 1fr; } .grade:nth-child(3) { border-left: 0; } .grade:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 460px) { .grades { grid-template-columns: 1fr; } .grade { border-left: 0; } .grade + .grade { border-top: 1px solid var(--line); } }

/* ---------- Tarifs ---------- */
.tarifs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.tarif { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; display: grid; gap: 14px; }
.tarif.reco { border: 2px solid var(--or); }
.tarif .tag { justify-self: start; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; background: var(--or); color: var(--nuit); padding: 4px 10px; border-radius: 999px; }
.tarif .p { font-family: var(--f-display); font-size: 2.4rem; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.tarif .p small { font-family: var(--f-body); font-size: .85rem; font-weight: 400; color: var(--fg-2); }
.tarif .fond { font-size: .88rem; color: var(--vert); font-weight: 600; }
.tarif ul { margin: 0; padding-left: 1.1em; font-size: .93rem; color: var(--fg-2); }
.tarif ul li + li { margin-top: 5px; }
@media (max-width: 900px) { .tarifs { grid-template-columns: 1fr; } }

/* ---------- Calendrier ---------- */
.cal { display: grid; gap: 0; border-left: 2px solid var(--or); }
.cal-item { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; padding: 0 0 26px 24px; position: relative; }
.cal-item::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; background: var(--or); border-radius: 2px; }
.cal-item .d { font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-item p { color: var(--fg-2); }
.band-nuit .cal-item p { color: var(--sur-nuit-2); }
.band-nuit .cal-item .d { color: #fff; }
.band-nuit .cal-item h3 { color: #fff; }
@media (max-width: 640px) { .cal-item { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Coach ---------- */
.coach { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.coach-photo { position: relative; }
.coach-photo img { width: 100%; height: auto; aspect-ratio: 6 / 7; object-fit: cover; border-radius: var(--r); }
.coach-photo figcaption { margin-top: 12px; font-size: .85rem; color: var(--fg-2); }
.band-nuit .coach-photo figcaption { color: var(--sur-nuit-2); }
.citation { font-family: var(--f-display); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.35; border-left: 3px solid var(--or); padding-left: 20px; }
@media (max-width: 820px) { .coach { grid-template-columns: 1fr; } .coach-photo { max-width: 360px; } }

/* ---------- Livres ---------- */
.livres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.livre { display: grid; gap: 12px; align-content: start; }
.livre .cover { aspect-ratio: 1600 / 2474; width: 100%; object-fit: cover; border-radius: 3px; box-shadow: 0 14px 30px -14px rgba(14,26,58,.55); }
.cover-txt { aspect-ratio: 1600 / 2474; width: 100%; border-radius: 3px; background: linear-gradient(160deg, #1D6B57, #0F3D33); color: #fff; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 14px 30px -14px rgba(14,26,58,.55); }
.cover-txt b { font-family: var(--f-display); font-size: 1.45rem; line-height: 1.1; }
.cover-txt small { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.livre h3 { font-size: 1.05rem; }
.livre .role { font-size: .88rem; color: var(--fg-2); }
.livre .pr { font-weight: 600; color: var(--or-fonce); font-size: .95rem; }
.band-nuit .livre .role { color: var(--sur-nuit-2); }
.band-nuit .livre h3 { color: #fff; }
.band-nuit .livre .pr { color: var(--or); }
@media (max-width: 900px) { .livres { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Villes ---------- */
.villes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.ville { padding: 18px; border-left: 1px solid var(--line); display: grid; gap: 4px; }
.ville:first-child { border-left: 0; }
.ville b { font-family: var(--f-display); font-size: 1.1rem; }
.ville a, .ville span { font-size: .92rem; font-variant-numeric: tabular-nums; color: var(--fg-2); text-decoration: none; white-space: nowrap; }
.ville a:hover { color: var(--or-fonce); text-decoration: underline; }
@media (max-width: 900px) { .villes { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ville { border-left: 0; border-top: 1px solid var(--line); } .ville:nth-child(-n+2) { border-top: 0; } .ville:nth-child(even) { border-left: 1px solid var(--line); } }
@media (max-width: 460px) { .villes { grid-template-columns: 1fr; } .ville:nth-child(even) { border-left: 0; } .ville:nth-child(2) { border-top: 1px solid var(--line); } }

/* ---------- Charte ---------- */
.charte { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.charte div { padding: 16px 0; border-top: 1px solid rgba(255,255,255,.14); }
.charte b { color: #fff; display: block; margin-bottom: 4px; }
.charte p { color: var(--sur-nuit-2); font-size: .95rem; }
@media (max-width: 760px) { .charte { grid-template-columns: 1fr; } }

/* ---------- Serment ---------- */
.serment { font-family: var(--f-display); font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.6; display: grid; gap: 6px; max-width: 46ch; }
.serment p:first-child { font-weight: 600; }

/* ---------- Formulaire ---------- */
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(22px, 3vw, 36px); display: grid; gap: 20px; }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-weight: 600; font-size: .92rem; }
.field .aide { font-size: .82rem; color: var(--fg-2); }
.field input, .field select, .field textarea { font: inherit; font-size: 1rem; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; width: 100%; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--or); outline-offset: 1px; border-color: var(--or); }
fieldset.field { border: 0; padding: 0; margin: 0; }
.choix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choix label { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; font-weight: 400; cursor: pointer; background: var(--bg); }
.choix label:has(input:checked) { border-color: var(--or); box-shadow: inset 0 0 0 1px var(--or); }
.choix input { margin-top: 5px; accent-color: var(--or-fonce); }
.choix small { display: block; color: var(--fg-2); font-size: .82rem; }
.case { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--fg-2); }
.case input { margin-top: 5px; accent-color: var(--or-fonce); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .choix, .form-row { grid-template-columns: 1fr; } }
.resultat { border: 2px solid var(--or); border-radius: var(--r); padding: 20px; display: grid; gap: 12px; background: var(--bg); }
.resultat pre { white-space: pre-wrap; font-family: var(--f-body); font-size: .9rem; margin: 0; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.erreur { color: #B3261E; font-size: .88rem; font-weight: 600; }

/* ---------- Note / encadré ---------- */
.note { border-left: 3px solid var(--or); padding: 6px 0 6px 18px; color: var(--fg-2); font-size: .92rem; max-width: 72ch; }
.band-nuit .note { color: var(--sur-nuit-2); }

/* ---------- Appel final ---------- */
.cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.cta h2 { color: #fff; max-width: 22ch; }

/* ---------- Pied de page ---------- */
.site-foot { background: var(--nuit); color: var(--sur-nuit-2); font-size: .9rem; border-top: 1px solid rgba(255,255,255,.08); }
.site-foot .wrap { padding-block: 48px 32px; display: grid; gap: 32px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid > * { min-width: 0; }
.foot-grid h4 { color: #fff; font-family: var(--f-body); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { color: #fff; text-decoration: underline; }
.foot-bas { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .82rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }

.stack-lg { display: grid; gap: clamp(40px, 6vw, 72px); }
.stack { display: grid; gap: 16px; }
.mt { margin-top: 28px; }

[hidden] { display: none !important; }
.choix input, .case input { width: auto; flex-shrink: 0; padding: 0; }

/* ===================== Souplesse et modernité ===================== */
:root { --r: 10px; --ombre: 0 1px 2px rgba(14,26,58,.06), 0 8px 24px -12px rgba(14,26,58,.18); }
.site-head { transition: box-shadow .2s, background .2s; }
.site-head.scrolled { box-shadow: 0 10px 30px -14px rgba(0,0,0,.6); background: color-mix(in srgb, var(--nuit) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn { border-radius: 999px; transition: background .15s, color .15s, transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-or:hover { box-shadow: 0 8px 20px -8px rgba(201,166,83,.7); }
.bloc, .tarif, .porte { transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.bloc:hover, .tarif:hover { transform: translateY(-3px); box-shadow: var(--ombre); }
.porte:hover { background: color-mix(in srgb, var(--or) 6%, var(--surface)); }
.livre .cover, .cover-txt { transition: transform .25s ease, box-shadow .25s ease; }
.livre:hover .cover, .livre:hover .cover-txt { transform: translateY(-6px) rotate(-1deg); }
.photo-reelle { border-radius: var(--r); margin-top: 8px; max-width: 420px; width: 100%; box-shadow: var(--ombre); }

/* Apparition douce : les éléments restent visibles ; ils glissent seulement en entrant à l'écran */
@media (prefers-reduced-motion: no-preference) {
  .reveal.in { animation: monte .6s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes monte { from { transform: translateY(18px); opacity: .35; } to { transform: none; opacity: 1; } }
}

/* Onglets de la médiathèque */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.07); margin-top: 10px; flex-wrap: wrap; justify-self: start; }
.tabs a { text-decoration: none; padding: 9px 18px; border-radius: 999px; font-size: .9rem; color: var(--sur-nuit-2); }
.tabs a[aria-current="page"] { background: var(--or); color: var(--nuit); font-weight: 600; }
.tabs a:hover:not([aria-current]) { color: #fff; }

/* Filtres */
.filtres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filtre { font: inherit; font-size: .88rem; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg-2); cursor: pointer; transition: all .15s; }
.filtre:hover { border-color: var(--or); color: var(--fg); }
.filtre[aria-pressed="true"] { background: var(--nuit); border-color: var(--nuit); color: #fff; }

/* Cartes vidéo (format vertical 9:16) */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px 20px; }
.vstrip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .vstrip { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 62%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; } .vstrip > * { scroll-snap-align: start; } }
@media (max-width: 480px) { .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; } }
.vcard { all: unset; cursor: pointer; display: grid; gap: 10px; align-content: start; min-width: 0; }
.vcard:focus-visible { outline: 3px solid var(--or); outline-offset: 4px; border-radius: var(--r); }
.vthumb { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: var(--r); overflow: hidden; background: var(--nuit-2); box-shadow: var(--ombre); }
.vthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.vcard:hover .vthumb img { transform: scale(1.04); }
.vthumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(14,26,58,.55), transparent 45%); }
.vplay { position: absolute; z-index: 1; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(14,26,58,.82); box-shadow: 0 0 0 4px rgba(201,166,83,.55); transition: transform .2s, background .2s; }
.vplay::before { content: ""; position: absolute; left: 22px; top: 17px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent var(--or); }
.vcard:hover .vplay { transform: scale(1.08); background: var(--nuit); }
.vduree { position: absolute; z-index: 1; right: 10px; bottom: 10px; font-size: .75rem; font-weight: 600; color: #fff; background: rgba(0,0,0,.45); padding: 2px 8px; border-radius: 999px; }
.vmeta { display: grid; gap: 2px; }
.vmeta b { font-family: var(--f-display); font-weight: 600; font-size: 1.02rem; line-height: 1.3; color: var(--fg); }
.vcat { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--or-fonce); }
.band-nuit .vmeta b { color: #fff; }
.band-nuit .vcat { color: var(--or); }

/* Photothèque */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.pgrid-cahiers { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
@media (max-width: 480px) { .pgrid, .pgrid-cahiers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.ph { all: unset; cursor: zoom-in; position: relative; display: block; border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: var(--ombre); min-width: 0; }
.ph:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }
.ph img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .4s ease; }
.pgrid-cahiers .ph img { aspect-ratio: auto; }
.ph:hover img { transform: scale(1.04); }
.ph-leg { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 10px; font-size: .8rem; line-height: 1.35; color: #fff; background: linear-gradient(to top, rgba(14,26,58,.88), transparent); opacity: 0; transition: opacity .2s; }
.ph:hover .ph-leg, .ph:focus-visible .ph-leg { opacity: 1; }
@media (hover: none) { .ph-leg { opacity: 1; } .pgrid-cahiers .ph-leg { display: none; } }

/* Lecteur (vidéo et photo) */
.media-dlg { border: 0; padding: 0; background: transparent; max-width: min(92vw, 980px); max-height: 92vh; overflow: visible; }
.media-dlg::backdrop { background: rgba(5,9,22,.86); backdrop-filter: blur(4px); }
.dlg-body video { display: block; height: min(78vh, 760px); width: auto; max-width: 92vw; aspect-ratio: 9 / 16; border-radius: var(--r); background: #000; }
.dlg-body img { display: block; max-height: 80vh; max-width: 92vw; width: auto; border-radius: var(--r); }
.dlg-titre { color: #fff; text-align: center; margin-top: 12px; font-family: var(--f-display); font-size: 1.05rem; }
.dlg-close { position: absolute; top: -14px; right: -14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--or); color: var(--nuit); font-size: 1rem; font-weight: 700; cursor: pointer; }
@media (max-width: 600px) { .dlg-close { top: 6px; right: 6px; } }
@media (max-width: 480px) { .tabs { flex-wrap: nowrap; } .tabs a { white-space: nowrap; padding: 8px 12px; font-size: .82rem; } }

/* ===================== Espace en ligne ===================== */
.nav a.btn-espace { background: transparent; color: #fff; border: 1px solid rgba(201,166,83,.6); margin-left: 8px; }
.nav a.btn-espace:hover, .nav a.btn-espace[aria-current="page"] { background: rgba(201,166,83,.15); color: #fff; }
.nav a.btn-espace + a.btn { margin-left: 6px; }
@media (max-width: 1120px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--nuit); flex-direction: column; align-items: stretch; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid rgba(255,255,255,.1); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav a.btn, .nav a.btn-espace { margin: 8px 0 0; text-align: center; }
}
.esp-accueil { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(24px,5vw,64px); align-items: start; }
@media (max-width: 820px) { .esp-accueil { grid-template-columns: 1fr; } }
.esp-liste { margin: 0; padding-left: 1.1em; color: var(--fg-2); }
.esp-tete { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 32px; align-items: center; margin-bottom: 36px; }
.anneau { width: 150px; height: 150px; }
@media (max-width: 560px) { .esp-tete { grid-template-columns: 1fr; justify-items: start; gap: 16px; } .anneau { width: 120px; height: 120px; } }
.esp-seances { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
@media (max-width: 700px) { .esp-seances { grid-template-columns: 1fr; } }
.esp-carte { display: grid; grid-template-columns: 56px minmax(0,1fr) auto; gap: 14px; align-items: center; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.esp-carte:hover { transform: translateY(-2px); box-shadow: var(--ombre); border-color: var(--or); }
.esp-code { font-family: var(--f-display); font-weight: 600; font-size: 1.3rem; color: var(--or-fonce); width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); }
.esp-carte.ok .esp-code { background: var(--or); color: var(--nuit); border-color: var(--or); }
.esp-info { display: grid; gap: 2px; min-width: 0; }
.esp-info b { font-family: var(--f-display); font-weight: 600; line-height: 1.3; }
.esp-etat { font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--bg); color: var(--fg-2); white-space: nowrap; }
.esp-carte.ok .esp-etat { background: color-mix(in srgb, var(--vert) 15%, transparent); color: var(--vert); }
.esp-fil { display: flex; justify-content: space-between; margin-bottom: 24px; font-size: .9rem; color: var(--fg-2); }
.esp-fil a { color: var(--fg); font-weight: 600; text-decoration: none; }
.esp-seance { display: grid; grid-template-columns: minmax(0, 300px) minmax(0,1fr); gap: clamp(24px,4vw,48px); align-items: start; margin-bottom: 28px; }
@media (max-width: 760px) { .esp-seance { grid-template-columns: 1fr; } .esp-col-media { max-width: 300px; } }
.esp-video { width: 100%; border-radius: var(--r); background: #000; box-shadow: var(--ombre); }
.esp-capsule { aspect-ratio: 9 / 16; }
.esp-media { display: grid; gap: 10px; }
.esp-maxime { background: var(--nuit); color: #fff; border-radius: var(--r); padding: 28px 24px; aspect-ratio: 9 / 12; align-content: center; }
.esp-maxime .citation { color: #fff; }
.esp-maxime .muted { color: var(--sur-nuit-2); }
.esp-section { border-top: 1px solid var(--line); padding-block: 20px; }
.esp-section > summary { cursor: pointer; list-style: none; font-family: var(--f-display); font-weight: 600; font-size: 1.3rem; display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.esp-section > summary::-webkit-details-marker { display: none; }
.esp-section:not([open]) > summary { margin-bottom: 0; }
.esp-n { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--nuit); color: var(--or); font-family: var(--f-body); font-size: .9rem; display: grid; place-items: center; }
.choix-1 { grid-template-columns: 1fr; }
.quiz-q.juste .choix label:has(input:checked) { border-color: var(--vert); box-shadow: inset 0 0 0 1px var(--vert); }
.quiz-q.faux .choix label:has(input:checked) { border-color: #B3261E; box-shadow: inset 0 0 0 1px #B3261E; }
.quiz-q legend { margin-bottom: 8px; }
.esp-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.code-reprise { font: .8rem/1.4 ui-monospace, monospace; width: 100%; min-height: 110px; padding: 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--fg); word-break: break-all; }
.cert-cadre { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(8px, 2vw, 20px); box-shadow: var(--ombre); }
.cert-cadre canvas { width: 100%; height: auto; display: block; }
@media print {
  body * { visibility: hidden !important; }
  .cert-cadre, .cert-cadre * { visibility: visible !important; }
  .cert-cadre { position: fixed; inset: 0; border: 0; box-shadow: none; padding: 0; }
  @page { size: A4 landscape; margin: 0; }
}
