/* ==========================================================================
   David's Academy — feuille de style principale
   Charte v1 validée le 01/12/2026 (docs/charte.html)
   Approche mobile-first : styles de base pour mobile, puis @media min-width.
   ========================================================================== */

/* ---------- 1. Jetons de la charte ---------- */
:root {
  --rouge: #AE0525;
  --rouge-fonce: #8C041E;
  --rouge-pale: #F8E7EA;
  --bleu: #093979;
  --bleu-fonce: #062A5A;
  --bleu-pale: #E6ECF5;
  --or: #E3A72F;            /* accent : flamme de la bougie (jamais en texte sur fond clair) */
  --or-pale: #FBF0D9;
  --encre: #1B2233;
  --texte: #3A3F4B;
  --gris: #5C5B58;
  --argent: #C9C7C2;
  --papier: #FAF7F2;
  --blanc: #FFFFFF;
  --sable: #F1ECE4;

  --f-titre: 'Fraunces', Georgia, 'Times New Roman', serif;
  --f-texte: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r: 14px;
  --r-sm: 8px;
  --ombre: 0 1px 2px rgba(27, 34, 51, .06), 0 8px 24px rgba(27, 34, 51, .07);
  --wrap: 1180px;
  --header-h: 68px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font: 400 1.0625rem/1.65 var(--f-texte);
  color: var(--texte);
  background: var(--papier);
  padding-bottom: 72px; /* place pour la barre d'actions mobile */
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--bleu); text-underline-offset: 3px; }
a:hover { color: var(--rouge); }
:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--f-titre); color: var(--encre); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2rem, 6vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
address { font-style: normal; }
.lead { font-size: 1.15rem; max-width: 62ch; }
.muted { color: var(--gris); }
.small { font-size: .9rem; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--bleu); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }

/* Marqueur de relecture (local uniquement) */
.todo { background: #FFF3B0; color: #5A4500; padding: 1px 6px; border-radius: 4px; font-size: .9em; font-weight: 600; font-family: var(--f-texte); }
.todo-block { border: 2px dashed #E0C64A; background: #FFFBE6; border-radius: var(--r); padding: 20px; color: #5A4500; }

/* ---------- 3. Motifs du logo ---------- */
/* Ruban argent : étiquette des titres de section */
.ruban {
  display: inline-block;
  background: linear-gradient(180deg, #F5F4F1, #D9D7D2);
  color: var(--bleu);
  font: 700 .78rem/1 var(--f-texte);
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 9px 22px;
  margin-bottom: 14px;
  clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%, 5% 50%);
}
.ruban--clair { background: linear-gradient(180deg, #FFFFFF, #E3E1DC); }
.laurel { width: 22px; color: var(--or); flex: none; }
.laurel--droite { transform: scaleX(-1); }

/* ---------- 4. Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 1rem/1.1 var(--f-texte);
  padding: 14px 24px; min-height: 48px;
  border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--sm { padding: 10px 18px; min-height: 42px; font-size: .95rem; }
.btn--rouge { background: var(--rouge); color: #fff; }
.btn--rouge:hover { background: var(--rouge-fonce); color: #fff; }
.btn--bleu { background: var(--bleu); color: #fff; }
.btn--bleu:hover { background: var(--bleu-fonce); color: #fff; }
.btn--contour { border-color: var(--bleu); color: var(--bleu); background: transparent; }
.btn--contour:hover { background: var(--bleu-pale); color: var(--bleu); }
.btn--blanc { background: #fff; color: var(--bleu); }
.btn--blanc:hover { background: var(--bleu-pale); color: var(--bleu); }
.btn--contour-blanc { border-color: rgba(255,255,255,.7); color: #fff; background: transparent; }
.btn--contour-blanc:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-lien { font-weight: 700; color: var(--rouge); text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 2px; }
.btn-lien:hover { color: var(--rouge-fonce); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
button[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* ---------- 5. En-tête ---------- */
/* Pas de backdrop-filter : il piégerait le menu mobile (position: fixed) dans l'en-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--papier); border-bottom: 1px solid var(--sable); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); margin-right: auto; }
.brand img { width: 40px; height: auto; }
.brand strong { display: block; font: 600 1.2rem/1.1 var(--f-titre); color: var(--bleu); white-space: nowrap; }
.brand span span { display: block; font-size: .78rem; color: var(--gris); letter-spacing: .04em; }
.header-actions { display: none; }

.burger { width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--bleu-pale); cursor: pointer; display: grid; place-items: center; }
.burger span, .burger span::before, .burger span::after { display: block; width: 20px; height: 2px; background: var(--bleu); border-radius: 2px; position: relative; transition: transform .25s, background-color .25s; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* Menu mobile : panneau plein écran sous l'en-tête */
.main-nav { position: fixed; inset: var(--header-h) 0 0 0; z-index: 49; background: var(--papier); padding: 16px 20px 32px; overflow-y: auto; display: none; }
.main-nav.is-open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav li a { display: block; padding: 14px 4px; font: 600 1.3rem/1.2 var(--f-titre); color: var(--encre); text-decoration: none; border-bottom: 1px solid var(--sable); }
.main-nav a[aria-current="page"] { color: var(--rouge); }
.mobile-extra { display: grid; gap: 12px; margin-top: 24px; }
.mobile-contact { margin-top: 22px; font-size: .95rem; color: var(--gris); }
.mobile-contact a { font-weight: 700; }
@media (min-width: 1024px) { .mobile-contact { display: none; } }
body.nav-open { overflow: hidden; }

/* ---------- 6. Sections et grilles ---------- */
.section { padding: 64px 0; }
.section--sable { background: var(--sable); }
.section--bleu { background: var(--bleu); color: #DCE4F1; }
.section--bleu h2, .section--bleu h3 { color: #fff; }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--gris); }
.section--bleu .section-head p { color: #DCE4F1; }
.section-foot { margin-top: 32px; }
.grid { display: grid; gap: 24px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 24px; grid-template-columns: 1fr; }
.split { display: grid; gap: 40px; align-items: center; }

/* ---------- 7. Bandeau d'accueil ---------- */
.hero { background: var(--bleu); color: #DCE4F1; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--rouge); }
.hero .wrap { display: grid; gap: 36px; padding-top: 48px; padding-bottom: 64px; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 7vw, 3.6rem); }
.hero h1 em { font-style: italic; color: var(--or); font-weight: 500; }
.hero .lead { color: #DCE4F1; }
.hero .ruban { margin-bottom: 20px; }
.hero-facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: .95rem; }
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--or); }
.medallion { justify-self: center; width: min(300px, 70vw); aspect-ratio: 1; border-radius: 50%; background: var(--papier); border: 5px solid var(--or); display: grid; place-items: center; box-shadow: 0 0 0 14px rgba(255,255,255,.06), 0 0 0 28px rgba(255,255,255,.04); }
.medallion img { width: 62%; }
.hero-motto { margin-top: 10px; font: italic 500 1.1rem/1.3 var(--f-titre); color: var(--or); }

/* ---------- 8. Chiffres clés ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stat { background: var(--blanc); border-radius: var(--r); box-shadow: var(--ombre); padding: 22px 12px; display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.stat-num { display: block; font: 600 clamp(1.9rem, 6vw, 2.6rem)/1 var(--f-titre); color: var(--rouge); }
.stat-label { display: block; font-size: .9rem; color: var(--gris); margin-top: 6px; line-height: 1.3; }
.stats-wrap { margin-top: -40px; position: relative; z-index: 2; }

/* ---------- 9. Cartes ---------- */
.card { background: var(--blanc); border-radius: var(--r); box-shadow: var(--ombre); overflow: hidden; display: flex; flex-direction: column; }
.card-media { aspect-ratio: 4 / 3; background: var(--sable); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin-bottom: 4px; }
.card-body h3 a { color: inherit; text-decoration: none; }
.card-body h3 a:hover { color: var(--rouge); }
.card-body p { color: var(--gris); margin: 0; }
.card-body .btn-lien { margin-top: auto; align-self: flex-start; padding-top: 12px; }
.card-meta { font-size: .85rem; color: var(--gris); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.badge { display: inline-block; font: 700 .72rem/1 var(--f-texte); letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 6px; background: var(--rouge-pale); color: var(--rouge); }
.badge--bleu { background: var(--bleu-pale); color: var(--bleu); }
.badge--or { background: var(--or-pale); color: #6B4A08; }
.badge--demo { background: #FFF3B0; color: #5A4500; }

/* Carte « niveau » : filet bleu, âge en grand chiffre rouge */
.level-card { border-top: 6px solid var(--bleu); }
.level-age { font: 600 1.7rem/1 var(--f-titre); color: var(--rouge); }
.level-card .card-body { gap: 10px; }
.level-tracks { display: flex; flex-wrap: wrap; gap: 6px; }

/* Carte « agenda » */
.event { display: flex; gap: 16px; align-items: flex-start; background: var(--blanc); border-radius: var(--r); box-shadow: var(--ombre); padding: 18px; }
.event-date { flex: none; width: 66px; text-align: center; border: 2px solid var(--bleu); border-radius: 10px; padding: 6px 0 8px; color: var(--bleu); font-weight: 700; font-size: .8rem; line-height: 1.1; text-transform: uppercase; }
.event-date span { display: block; font: 600 1.8rem/1 var(--f-titre); text-transform: none; }
.event h3 { font-size: 1.1rem; margin-bottom: 4px; }
.event p { margin: 0; color: var(--gris); font-size: .95rem; }

/* ---------- 10. Blocs de contenu ---------- */
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.feature-list li { display: flex; gap: 14px; }
.feature-icon { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--bleu-pale); color: var(--bleu); display: grid; place-items: center; }
.feature-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature-list h3 { font-size: 1.1rem; margin-bottom: 2px; }
.feature-list p { margin: 0; color: var(--gris); }

.photo-frame { border-radius: var(--r); overflow: hidden; box-shadow: var(--ombre); aspect-ratio: 4 / 3; background: var(--sable); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }

.quote { background: var(--blanc); border-radius: var(--r); box-shadow: var(--ombre); padding: 28px; position: relative; }
.quote::before { content: "\201C"; position: absolute; top: -6px; left: 18px; font: 700 5rem/1 var(--f-titre); color: var(--rouge-pale); }
.quote blockquote { margin: 0 0 14px; font: italic 500 1.15rem/1.5 var(--f-titre); color: var(--encre); position: relative; }
.quote figcaption { font-size: .9rem; color: var(--gris); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: step; }
.steps li { background: var(--blanc); border-radius: var(--r); box-shadow: var(--ombre); padding: 22px 22px 22px 76px; position: relative; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 20px; top: 20px; width: 40px; height: 40px; border-radius: 50%; background: var(--bleu); color: #fff; display: grid; place-items: center; font: 600 1.2rem/1 var(--f-titre); }
.steps h3 { font-size: 1.1rem; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--gris); }

.info-box { background: var(--bleu-pale); border-left: 5px solid var(--bleu); border-radius: var(--r-sm); padding: 18px 20px; }
.info-box p:last-child { margin: 0; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { padding-left: 30px; position: relative; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: var(--rouge-pale) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23AE0525' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--blanc); border-radius: var(--r); overflow: hidden; box-shadow: var(--ombre); }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--sable); vertical-align: top; }
th { background: var(--bleu); color: #fff; font-weight: 700; font-size: .92rem; }
tr:last-child td { border-bottom: 0; }

/* Personnes (équipe) */
.person { text-align: center; }
.avatar { width: 112px; height: 112px; border-radius: 50%; margin: 0 auto 14px; background: var(--bleu-pale); color: var(--bleu); display: grid; place-items: center; font: 600 2rem/1 var(--f-titre); border: 4px solid var(--blanc); box-shadow: var(--ombre); }
.person h3 { font-size: 1.1rem; margin-bottom: 2px; }
.person p { color: var(--gris); margin: 0; font-size: .95rem; }

/* Mot de la directrice */
.letter { background: var(--blanc); border-radius: var(--r); box-shadow: var(--ombre); padding: 32px 28px; border-top: 6px solid var(--rouge); }

/* Partenaires */
.partners { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.partner { min-width: 220px; padding: 22px 26px; border: 1px solid var(--argent); border-radius: var(--r); background: var(--blanc); text-align: center; font-weight: 700; color: var(--bleu); }
.partner small { display: block; font-weight: 400; color: var(--gris); margin-top: 4px; }

/* Appel à l'action */
.cta { background: var(--rouge); color: #fff; border-radius: var(--r); padding: 40px 28px; display: grid; gap: 20px; position: relative; overflow: hidden; }
.cta h2 { color: #fff; margin: 0; }
.cta p { margin: 0; color: #FBE4E8; max-width: 52ch; }
.cta::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 24px solid rgba(255,255,255,.08); }

/* ---------- 11. Pages intérieures ---------- */
.page-hero { background: var(--bleu); color: #DCE4F1; padding: 28px 0 44px; position: relative; }
.page-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--rouge); }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero .lead { color: #DCE4F1; margin: 0; }
.crumbs ol { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 6px; font-size: .88rem; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: #9FB2D3; }
.crumbs a { color: #DCE4F1; }
.crumbs a:hover { color: #fff; }
.crumbs [aria-current] { color: #fff; }

.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.4em; }
.prose ul { margin: 0 0 1em; }

/* Sommaire de page : reste visible sous l'en-tête pendant la lecture */
.anchor-bar { position: sticky; top: var(--header-h); z-index: 30; background: rgba(250, 247, 242, .97); border-bottom: 1px solid var(--sable); }
.anchor-bar .wrap { padding-top: 10px !important; padding-bottom: 2px; }
.anchor-nav { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; margin-bottom: 0; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.anchor-nav::-webkit-scrollbar { display: none; }
.anchor-nav a.is-active { background: var(--bleu); border-color: var(--bleu); color: #fff; }
html { scroll-padding-top: calc(var(--header-h) + 72px); }
.anchor-nav a { flex: none; padding: 9px 16px; border-radius: 999px; background: var(--blanc); border: 1px solid var(--argent); text-decoration: none; color: var(--encre); font-weight: 600; font-size: .92rem; }
.anchor-nav a:hover { border-color: var(--bleu); color: var(--bleu); }

/* Fiche niveau (page Nos classes) */
.level-sheet { background: var(--blanc); border-radius: var(--r); box-shadow: var(--ombre); overflow: hidden; display: grid; }
.level-sheet + .level-sheet { margin-top: 28px; }
.level-sheet .photo-frame { border-radius: 0; box-shadow: none; }
.level-sheet-body { padding: 28px 24px; }
.level-sheet dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 16px 0 0; }
.level-sheet dt { font-weight: 700; color: var(--encre); }
.level-sheet dd { margin: 0; }

/* ---------- 12. Filtres, actualités, agenda ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-btn { font: 600 .92rem/1 var(--f-texte); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--argent); background: var(--blanc); color: var(--encre); cursor: pointer; min-height: 42px; }
.filter-btn:hover { border-color: var(--bleu); color: var(--bleu); }
.filter-btn[aria-pressed="true"] { background: var(--bleu); border-color: var(--bleu); color: #fff; }
[hidden] { display: none !important; }
.empty-state { text-align: center; color: var(--gris); padding: 40px 0; }

.article-head { max-width: 760px; }
.article-cover { border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; background: var(--sable); margin: 28px 0; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

.view-toggle { display: inline-flex; background: var(--blanc); border: 1px solid var(--argent); border-radius: 999px; padding: 4px; margin-bottom: 24px; }
.view-toggle button { border: 0; background: transparent; font: 600 .95rem/1 var(--f-texte); padding: 10px 18px; border-radius: 999px; cursor: pointer; color: var(--encre); }
.view-toggle button[aria-pressed="true"] { background: var(--bleu); color: #fff; }

.calendar { background: var(--blanc); border-radius: var(--r); box-shadow: var(--ombre); padding: 18px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cal-head h2 { font-size: 1.4rem; margin: 0; text-transform: capitalize; }
.cal-nav { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--argent); background: var(--blanc); cursor: pointer; font-size: 1.2rem; color: var(--bleu); }
.cal-nav:hover { border-color: var(--bleu); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: .78rem; font-weight: 700; color: var(--gris); padding: 6px 0; text-transform: uppercase; }
.cal-day { min-height: 54px; border-radius: 8px; background: var(--papier); padding: 4px 6px; font-size: .85rem; position: relative; }
.cal-day.is-out { background: transparent; color: var(--argent); }
.cal-day.is-today { outline: 2px solid var(--or); }
.cal-day.has-event { background: var(--bleu-pale); }
.cal-day button { all: unset; display: block; width: 100%; height: 100%; cursor: pointer; }
.cal-day button:focus-visible { outline: 3px solid var(--or); border-radius: 6px; }
.cal-dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--rouge); margin-top: 4px; }
.cal-events { margin-top: 18px; display: grid; gap: 12px; }

/* ---------- 13. Galerie et visionneuse ---------- */
.album-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
.album-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.album-photos button { border: 0; padding: 0; background: var(--sable); border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 1; cursor: zoom-in; }
.album-photos img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.album-photos button:hover img { transform: scale(1.04); }
.album + .album { margin-top: 48px; }
.album-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.album-head h2 { font-size: 1.5rem; margin: 0; }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(12, 18, 32, .94); display: grid; grid-template-rows: auto 1fr auto; padding: 12px; }
.lightbox[hidden] { display: none; }
.lightbox-top { display: flex; justify-content: space-between; align-items: center; color: #fff; padding: 4px 6px; font-size: .95rem; }
.lightbox figure { margin: 0; display: grid; place-items: center; min-height: 0; }
.lightbox img { max-height: 76vh; max-width: 100%; width: auto; border-radius: var(--r-sm); }
.lightbox figcaption { color: #DCE4F1; margin-top: 10px; text-align: center; }
.lightbox-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 1.4rem; cursor: pointer; }
.lightbox-btn:hover { background: rgba(255,255,255,.22); }
.lightbox-nav { display: flex; justify-content: center; gap: 16px; padding: 10px; }

/* ---------- 14. Formulaires ---------- */
.form-card { background: var(--blanc); border-radius: var(--r); box-shadow: var(--ombre); padding: 28px 22px; }
.field { margin-bottom: 18px; }
.field label, .field legend { display: block; font-weight: 700; color: var(--encre); margin-bottom: 6px; }
.field .req { color: var(--rouge); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--encre);
  padding: 12px 14px; min-height: 48px;
  border: 1.5px solid var(--argent); border-radius: var(--r-sm); background: var(--blanc);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--bleu); outline: 3px solid var(--bleu-pale); outline-offset: 0; }
.field .hint { font-size: .85rem; color: var(--gris); margin-top: 4px; }
.field .error { display: none; font-size: .88rem; color: var(--rouge); margin-top: 6px; font-weight: 600; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--rouge); }
.field.has-error .error { display: block; }
.field-row { display: grid; gap: 0 18px; }
.choice { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; font-weight: 400; }
.choice input { width: 20px; height: 20px; min-height: 0; margin-top: 3px; accent-color: var(--bleu); flex: none; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* piège anti-robots */
.form-alert { border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 18px; font-weight: 600; }
.form-alert--ok { background: #E5F3EA; color: #1D5B33; }
.form-alert--err { background: var(--rouge-pale); color: var(--rouge-fonce); }

/* Formulaire en plusieurs étapes */
.stepper { list-style: none; padding: 0; margin: 0 0 26px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: s; }
.stepper li { counter-increment: s; font-size: .78rem; font-weight: 700; color: var(--gris); text-align: center; }
.stepper li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto 6px; border-radius: 50%; border: 2px solid var(--argent); background: var(--blanc); font: 600 1rem/1 var(--f-titre); }
.stepper li.is-active { color: var(--bleu); }
.stepper li.is-active::before { border-color: var(--bleu); background: var(--bleu); color: #fff; }
.stepper li.is-done::before { border-color: var(--bleu); color: var(--bleu); content: "✓"; }
.step-panel h3 { margin-bottom: 16px; }
.step-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.recap dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.recap dt { font-weight: 700; color: var(--encre); }
.recap dd { margin: 0; }

/* Carte (Leaflet) */
.map { height: 340px; border-radius: var(--r); overflow: hidden; box-shadow: var(--ombre); background: var(--sable); z-index: 0; }
.hours { list-style: none; padding: 0; margin: 0; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--sable); }

/* Espace parents */
.login-wrap { min-height: 70vh; display: grid; place-items: center; padding: 48px 20px; background:
  linear-gradient(90deg, var(--rouge-pale) 0 50%, var(--bleu-pale) 50%) 0 0 / 100% 100%; }
.login-card { width: 100%; max-width: 440px; background: var(--blanc); border-radius: var(--r); box-shadow: var(--ombre); padding: 32px 26px; text-align: center; }
.login-card img { width: 64px; margin: 0 auto 10px; }
.login-card form { text-align: left; margin-top: 22px; }

/* 404 */
.notfound { text-align: center; padding: 80px 0; }
.notfound .big { font: 600 clamp(5rem, 20vw, 9rem)/1 var(--f-titre); color: var(--bleu); }

/* ---------- 15. Pied de page ---------- */
.site-footer { background: var(--encre); color: #C9CFDA; margin-top: 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--or); }
.footer-main { display: grid; gap: 32px; padding-top: 56px; padding-bottom: 40px; }
.footer-brand img { width: 74px; margin-bottom: 14px; background: var(--papier); border-radius: 50%; padding: 10px 12px; box-sizing: content-box; }
.footer-brand p { max-width: 40ch; }
.site-footer h2 { font: 700 .82rem/1 var(--f-texte); color: var(--or); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer address, .site-footer p { margin: 0 0 12px; }
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a, .social span { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; }
.social svg { width: 20px; height: 20px; fill: #fff; }
.social a:hover { background: var(--rouge); }
.social-todo { opacity: .35; outline: 2px dashed #E0C64A; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; font-size: .88rem; }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 18px; }

/* Barre d'actions fixe (mobile) */
.action-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(250,247,242,.97); border-top: 1px solid var(--sable); }
.action-bar .btn { min-height: 46px; padding: 10px; }

/* ---------- 16. Animations discrètes ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- 16 bis. Petits écrans (< 640 px) : priorité au contenu et au pouce ---------- */
@media (max-width: 639px) {
  .section { padding: 52px 0; }
  .section-head { margin-bottom: 26px; }
  /* Bandeau : le blason est déjà dans l'en-tête → on le masque pour remonter le contenu */
  .hero-visual { display: none; }
  .hero .wrap { padding-top: 36px; padding-bottom: 56px; }
  .hero .btn-row .btn, .cta .btn-row .btn { flex: 1 1 100%; }
  .hero-facts { flex-direction: column; gap: 8px; }
  /* Chiffres clés : sans lauriers, plus compacts */
  .stats { gap: 10px; }
  .stat { padding: 16px 10px; min-width: 0; }
  .stat .laurel { display: none; }
  .stat-label { font-size: .82rem; }
  .stats-wrap { margin-top: -32px; }
  /* Listes de définitions empilées (fiches classes, récapitulatif) */
  .level-sheet dl, .recap dl { grid-template-columns: 1fr; gap: 2px; }
  .level-sheet dd, .recap dd { margin-bottom: 10px; }
  .level-sheet-body { padding: 24px 20px; }
  .steps li { padding: 20px 18px 20px 68px; }
  .steps li::before { left: 16px; }
  .form-card { padding: 24px 18px; }
  .step-actions .btn { flex: 1; }
  .cta { padding: 32px 22px; }
  .event { padding: 16px; gap: 12px; }
  .event-date { width: 58px; }
  .hours li { flex-direction: column; gap: 2px; }
  .cal-day { min-height: 46px; padding: 3px; font-size: .8rem; }
  .cal-dow { font-size: .68rem; }
  .calendar { padding: 12px; }
  .letter { padding: 26px 20px; }
  .partner { min-width: 0; width: 100%; }
}
/* Les longues adresses e-mail ne débordent jamais */
.feature-list p, .feature-list address, .site-footer p, .prose p { overflow-wrap: anywhere; }

/* ---------- 17. Tablette (≥ 640 px) ---------- */
@media (min-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .album-photos { grid-template-columns: repeat(3, 1fr); }
  .stepper li { font-size: .85rem; }
  .form-card { padding: 34px; }
}

/* ---------- 17 bis. Tablette (≥ 768 px) : deux colonnes, appel à l'action dans l'en-tête ---------- */
@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .action-bar { display: none; }
  .header-actions { display: flex; align-items: center; gap: 10px; }
  .header-link { display: none; }            /* l'espace parents reste dans le menu */
  .split { grid-template-columns: 1fr 1fr; gap: 40px; }
  .hero .wrap { grid-template-columns: 1.4fr 1fr; align-items: center; }
  .hero .medallion { display: grid; width: 240px; }
  .hero-motto { display: block; }
  .level-sheet { grid-template-columns: 2fr 3fr; }
  .level-sheet .photo-frame { aspect-ratio: auto; height: 100%; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .cta { padding: 44px 40px; }
  .steps li { padding-left: 80px; }
}

/* ---------- 18. Bureau (≥ 1024 px) ---------- */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .action-bar, .burger, .mobile-extra { display: none; }
  :root { --header-h: 84px; }
  .brand img { width: 46px; }
  .main-nav { position: static; display: block; background: none; padding: 0; overflow: visible; }
  .main-nav ul { display: flex; gap: 2px; }
  .main-nav li a { font: 600 .92rem/1 var(--f-texte); padding: 10px 9px; border: 0; border-radius: 999px; color: var(--encre); white-space: nowrap; }
  .brand { flex: none; }
  .brand span span { display: none; }
  .main-nav li:first-child { display: none; } /* « Accueil » : le blason y mène déjà */
  .header-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .header-link { width: 42px; height: 42px; justify-content: center; border-radius: 50%; background: var(--bleu-pale); }
  .main-nav li a:hover { background: var(--bleu-pale); color: var(--bleu); }
  .main-nav a[aria-current="page"] { color: var(--rouge); background: var(--rouge-pale); }
  .header-actions { display: flex; align-items: center; gap: 12px; }
  .header-link { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; text-decoration: none; color: var(--bleu); white-space: nowrap; }
  .header-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

  .section { padding: 96px 0; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .split { grid-template-columns: 1fr 1fr; gap: 64px; }
  .split--wide-left { grid-template-columns: 1.3fr 1fr; }
  .hero .wrap { grid-template-columns: 1.25fr 1fr; align-items: center; padding-top: 72px; padding-bottom: 104px; }
  .hero .medallion { width: 340px; }
  .stats-wrap { margin-top: -56px; }
  .cta { grid-template-columns: 1fr auto; align-items: center; padding: 48px 56px; }
  .footer-main { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 48px; }
  .level-sheet { grid-template-columns: 5fr 7fr; }
  .level-sheet .photo-frame { aspect-ratio: auto; height: 100%; }
  .level-sheet-body { padding: 36px 40px; }
  .album-photos { grid-template-columns: repeat(4, 1fr); }
  .page-hero { padding: 36px 0 64px; }
  .cal-day { min-height: 78px; font-size: .92rem; }
  .map { height: 420px; }
}

/* ---------- 19. Grand écran (≥ 1240 px) : libellés complets dans l'en-tête ---------- */
@media (min-width: 1240px) {
  .brand span span { display: block; }
  .main-nav li:first-child { display: list-item; }
  .main-nav li a { padding: 10px 12px; font-size: .95rem; }
  .header-link { width: auto; height: auto; background: none; border-radius: 0; }
  .header-link span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
