/* =========================================================
   Groupe Scolaire Bilingue La Maîtrise — feuille de styles
   1. Tokens          5. Sections
   2. Base            6. Composants
   3. Layout          7. Responsive
   4. Header          8. Accessibilité / motion
   ========================================================= */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Turquoise relevé sur le logo : #78D1CB, décliné en une gamme lisible. */
  --turq-100: #E8F7F6;
  --turq-200: #C6EBE8;
  --turq-300: #78D1CB;   /* teinte exacte du logo */
  --turq-500: #137E80;   /* 4,9:1 sur blanc */
  --turq-600: #0E6E70;   /* 6,0:1 sur blanc — actions principales */
  --turq-800: #08464A;
  --turq-900: #06343A;   /* sections sombres */

  --gold-600: #A9821F;
  --gold-500: #C9A227;
  --gold-300: #E7C558;
  --gold-200: #F1E4BB;

  /* Rôles */
  --bg:         #FFFFFF;
  --bg-alt:     #F6FAFA;
  --bg-deep:    var(--turq-900);
  --surface:    #FFFFFF;
  --text:       #12262A;
  --text-muted: #4F6A6C;
  --text-invert:#F2FAF9;
  --border:     #DCE8E7;
  --brand:      var(--turq-600);
  --brand-hover:var(--turq-500);
  --brand-soft: var(--turq-100);
  --accent:     var(--gold-500);
  --accent-soft:#FCF4DE;
  --second:     var(--turq-500);
  --second-soft:var(--turq-100);
  --shadow-sm:  0 1px 2px rgba(6, 52, 58, .07), 0 4px 12px rgba(6, 52, 58, .06);
  --shadow-md:  0 10px 30px rgba(6, 52, 58, .12);
  --shadow-lg:  0 24px 60px rgba(6, 52, 58, .18);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --gutter: 18px;
  --maxw: 1180px;
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-xl: 44px;
  --section-y: clamp(44px, 7vw, 104px);
  --header-h: 116px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:         #0A1A1C;
    --bg-alt:     #0E2225;
    --bg-deep:    #051E22;
    --surface:    #132B2E;
    --text:       #E9F4F3;
    --text-muted: #9DB6B6;
    --text-invert:#F2FAF9;
    --border:     #22403F;
    --brand:      #2FA6A4;
    --brand-hover:#4FBDBA;
    --brand-soft: #12312F;
    --accent:     var(--gold-300);
    --accent-soft:#2A2517;
    --second:     var(--turq-300);
    --second-soft:#12312F;
    --shadow-sm:  0 1px 2px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.3);
    --shadow-md:  0 10px 30px rgba(0,0,0,.45);
    --shadow-lg:  0 24px 60px rgba(0,0,0,.55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:#0A1A1C; --bg-alt:#0E2225; --bg-deep:#051E22; --surface:#132B2E;
  --text:#E9F4F3; --text-muted:#9DB6B6; --text-invert:#F2FAF9; --border:#22403F;
  --brand:#2FA6A4; --brand-hover:#4FBDBA; --brand-soft:#12312F;
  --accent:var(--gold-300); --accent-soft:#2A2517;
  --second:var(--turq-300); --second-soft:#12312F;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4),0 4px 12px rgba(0,0,0,.3);
  --shadow-md:0 10px 30px rgba(0,0,0,.45);
  --shadow-lg:0 24px 60px rgba(0,0,0,.55);
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
body h1, body h2, body h3, body h4, body h5, body h6 { color: var(--text); }
body .section--deep h2, body .section--deep h3,
body .results h2, body .results h3,
body .card--brand h3, body .site-footer h3, body .hero__stamp { color: var(--text-invert); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.9vw, 1.4rem); }
p  { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible {
  outline: 3px solid var(--second);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 3. LAYOUT ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--deep { background: var(--bg-deep); color: var(--text-invert); }
.stack { display: grid; gap: 18px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-600); margin: 0 0 12px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--accent); border-radius: 2px;
}
.section--deep .eyebrow { color: var(--gold-500); }
.lead { color: var(--text-muted); font-size: 1.06rem; max-width: 62ch; }
.section--deep .lead { color: #BEDEDC; }
.section-head { max-width: 46rem; margin-bottom: clamp(28px, 4vw, 48px); display: grid; gap: 14px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; padding: 13px 26px;
  border: 2px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: .97rem;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--brand-hover); }
.btn--gold { background: var(--accent); color: #2A2003; }
.btn--gold:hover { background: var(--gold-600); color: #fff; }
.btn--ghost { border-color: var(--border); background: transparent; color: var(--text); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--on-deep { border-color: rgba(246,243,234,.4); color: var(--text-invert); }
.btn--on-deep:hover { background: rgba(246,243,234,.1); border-color: var(--text-invert); }
.btn--sm { min-height: 42px; padding: 9px 18px; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Lien texte fléché */
.link-arrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: .93rem; color: var(--brand);
  text-decoration: none; border-bottom: 2px solid transparent; padding-bottom: 2px;
  width: fit-content;
}
.link-arrow:hover { border-bottom-color: var(--accent); }
.link-arrow svg { transition: transform .18s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- 4. HEADER ---------- */
.topbar {
  background: var(--turq-900); color: #CDE6E4;
  font-size: .82rem; padding-block: 9px;
}
.topbar__in { display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: center; justify-content: space-between; }
.topbar__item { display: inline-flex; align-items: center; gap: 7px; }
.topbar a { text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar svg { flex: none; color: var(--gold-500); }

.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header.is-stuck { box-shadow: var(--shadow-sm); }
:target { scroll-margin-top: calc(var(--header-h) + 8px); }
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }
.nav { display: flex; align-items: center; gap: 18px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { width: 50px; height: 50px; border-radius: 12px; }
.brand__name { display: block; max-width: 16rem; font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; line-height: 1.12; color: var(--text); }
.brand__sub { display: block; white-space: nowrap; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.nav__list { display: flex; align-items: center; gap: 4px; }
.nav__list a {
  display: block; padding: 10px 13px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--text);
}
.nav__list a:hover { background: var(--brand-soft); color: var(--brand); }
.nav__cta { display: flex; gap: 10px; align-items: center; }
.burger {
  display: none; width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  align-items: center; justify-content: center; color: var(--text);
}

/* ---------- 5. HERO ---------- */
.hero { position: relative; overflow: hidden; background: var(--bg-alt); }
.hero::after {
  content: ""; position: absolute; inset: auto -12% -35% auto;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--second-soft), transparent 68%);
  pointer-events: none;
}
.hero__in {
  position: relative; z-index: 1;
  display: grid; gap: clamp(32px, 5vw, 60px);
  grid-template-columns: 1.05fr .95fr; align-items: center;
  padding-block: clamp(44px, 6vw, 84px);
}
.hero h1 { margin-bottom: 18px; }
.hero h1 em { font-style: italic; color: var(--brand); }
.hero__meta { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 26px; align-items: center; }
.hero__badge {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 18px 8px 8px; box-shadow: var(--shadow-sm);
}
.hero__badge b { font-family: var(--font-display); font-size: 1.28rem; color: var(--brand); display: block; line-height: 1; }
.hero__badge span { font-size: .8rem; color: var(--text-muted); }
.hero__badge i {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--gold-600); flex: none;
}
.hero__phone { font-weight: 700; text-decoration: none; display: inline-flex; gap: 9px; align-items: center; }
.hero__phone svg { color: var(--second); }

.hero__media { position: relative; display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.hero__media figure { margin: 0; position: relative; overflow: hidden; background: var(--brand-soft); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.shot--tall { grid-row: span 2; aspect-ratio: 3/5; border-radius: 180px 180px 24px 24px; }
.shot--wide { aspect-ratio: 4/3; border-radius: 24px 140px 24px 24px; }
.shot--soft { aspect-ratio: 4/3; border-radius: 24px 24px 140px 24px; }
.hero__stamp {
  position: absolute; left: -14px; bottom: 16%; z-index: 2;
  background: var(--turq-800); color: #fff; border-radius: 18px;
  padding: 12px 16px; font-size: .8rem; font-weight: 700; line-height: 1.3;
  box-shadow: var(--shadow-md); max-width: 170px;
}
.hero__stamp span { display: block; color: var(--gold-300); font-weight: 600; font-size: .74rem; }

/* ---------- Bandeau résultats ---------- */
.results { background: var(--turq-800); color: var(--text-invert); }
.results__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding-block: 36px; }
.results__item { display: flex; gap: 14px; align-items: flex-start; }
.results__item b { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; color: var(--gold-500); white-space: nowrap; }
.results__item p { font-size: .93rem; color: #CFE9E7; }
.results__note { font-size: .8rem; color: #9CC3C1; padding-bottom: 28px; }

/* ---------- Cartes génériques ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 26px;
  display: grid; gap: 12px; align-content: start;
}
.card__icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- À propos ---------- */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
.about__media { position: relative; }
.about__media img { border-radius: var(--r-lg) var(--r-lg) 120px var(--r-lg); aspect-ratio: 4/5; object-fit: cover; object-position: 50% 62%; width: 100%; }
.about__card {
  position: absolute; right: -8px; bottom: -22px; max-width: 250px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 18px; box-shadow: var(--shadow-md);
}
.about__card b { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.about__card p { font-size: .85rem; color: var(--text-muted); }
.entities { display: grid; gap: 14px; margin-top: 8px; }
.entity {
  display: grid; gap: 6px; padding: 18px 20px; border-radius: var(--r-md);
  background: var(--bg-alt); border-left: 4px solid var(--accent);
}
.entity h3 { font-size: 1.08rem; }
.entity p { font-size: .9rem; color: var(--text-muted); }
.entity .motto { font-family: var(--font-display); font-style: italic; color: var(--brand); font-size: .95rem; }
.motto-strip {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px;
}
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent-soft); color: var(--gold-600);
  border-radius: 999px; padding: 6px 14px; font-size: .78rem;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}

/* ---------- Programmes ---------- */
.program { overflow: hidden; padding: 0; border-radius: var(--r-lg); display: flex; flex-direction: column; }
.program__top { padding: 26px 24px 0; display: grid; gap: 8px; }
.program__tag {
  font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--second);
}
.program__body { padding: 16px 24px 26px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.program__body .link-arrow { margin-top: auto; }
.program dl { display: grid; gap: 8px; margin: 0; font-size: .89rem; }
.program dl div { display: flex; gap: 8px; align-items: baseline; border-top: 1px dashed var(--border); padding-top: 8px; }
.program dt { color: var(--text-muted); min-width: 92px; flex: none; }
.program dd { margin: 0; font-weight: 600; }

/* ---------- Atouts ---------- */
.checks { display: grid; gap: 10px; }
.checks li { display: flex; gap: 11px; align-items: flex-start; font-size: .97rem; }
.checks svg { flex: none; margin-top: 4px; color: var(--brand); }
.section--deep .checks svg { color: var(--gold-300); }

/* ---------- Frais ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tab {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 10px 18px; font: inherit; font-weight: 600; font-size: .9rem;
  cursor: pointer; min-height: 44px;
}
.tab[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .92rem; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: 16px 18px 0; font-weight: 700; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
thead th { background: var(--brand-soft); color: var(--brand); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
tfoot td { background: var(--accent-soft); font-weight: 700; color: var(--gold-600); }
.fees-notes { display: grid; gap: 10px; margin-top: 18px; font-size: .9rem; color: var(--text-muted); }

/* ---------- Admission ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; display: grid; gap: 10px; align-content: start; }
.step__num {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-family: var(--font-display); font-size: 1.1rem; font-weight: 700;
}
.step h3 { font-size: 1.05rem; }
.step p { font-size: .9rem; color: var(--text-muted); }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 23px; left: 58px; right: -12px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--border) 0 7px, transparent 7px 14px);
}

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery button {
  padding: 0; border: 0; background: var(--brand-soft); cursor: zoom-in;
  border-radius: var(--r-md); overflow: hidden; aspect-ratio: 1/1;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery button:hover img { transform: scale(1.06); }
.gallery .span-2 { grid-column: span 2; aspect-ratio: 2/1; }

.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(5, 30, 34, .9); padding: 24px;
}
.lightbox img { max-height: 84vh; width: auto; border-radius: var(--r-md); }
.lightbox__close {
  position: absolute; top: 16px; right: 16px; width: 48px; height: 48px;
  border-radius: 50%; border: 0; background: #fff; color: var(--turq-900);
  font-size: 1.4rem; cursor: pointer;
}
.lightbox figcaption { color: #E7EFE9; text-align: center; margin-top: 12px; font-size: .9rem; }

/* ---------- Emplacements à remplir ---------- */
.placeholder {
  border: 2px dashed var(--border); border-radius: var(--r-md);
  padding: 26px; display: grid; gap: 8px; background: var(--bg-alt);
}
.placeholder b { font-size: .95rem; }
.placeholder p { font-size: .88rem; color: var(--text-muted); }
.placeholder__tag {
  font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold-600); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; width: fit-content;
}

/* ---------- CTA final ---------- */
.cta-final { text-align: center; display: grid; gap: 20px; justify-items: center; }
.cta-final h2 { max-width: 20ch; }
.cta-final .lead { color: #BEDEDC; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.contact__list { display: grid; gap: 18px; }
.contact__row { display: flex; gap: 14px; align-items: flex-start; }
.contact__row svg { flex: none; margin-top: 3px; color: var(--second); }
.contact__row b { display: block; font-size: .95rem; }
.contact__row p, .contact__row a { font-size: .93rem; color: var(--text-muted); text-decoration: none; }
.contact__row a:hover { color: var(--brand); text-decoration: underline; }
.phones { display: grid; gap: 3px; }

form { display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 32px); }
.field { display: grid; gap: 6px; }
.field label { font-size: .88rem; font-weight: 700; }
.field .hint { font-size: .78rem; color: var(--text-muted); font-weight: 400; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 12px 14px; min-height: 48px; width: 100%;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
.field.is-invalid input, .field.is-invalid select { border-color: #B3261E; }
.error { font-size: .8rem; color: #B3261E; font-weight: 600; }
.form-note { font-size: .8rem; color: var(--text-muted); }
.form-status { border-radius: var(--r-sm); padding: 12px 14px; font-size: .9rem; font-weight: 600; }
.form-status--ok { background: var(--brand-soft); color: var(--brand); }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-deep); color: #BBD6D4; padding-block: clamp(44px, 6vw, 72px) 0; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; }
.site-footer h3 { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; font-family: var(--font-body); font-weight: 800; margin-bottom: 14px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold-500); text-decoration: underline; }
.footer__brand { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.footer__brand img { width: 54px; height: 54px; border-radius: 14px; }
.footer__brand b { color: #fff; font-family: var(--font-display); font-size: 1.05rem; }
.site-footer ul { display: grid; gap: 9px; font-size: .92rem; }
.footer__bottom {
  margin-top: 40px; border-top: 1px solid rgba(255,255,255,.12);
  padding-block: 20px; display: flex; flex-wrap: wrap; gap: 10px 24px;
  justify-content: space-between; font-size: .84rem;
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 18px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ---------- 7. RESPONSIVE ---------- */
@media (max-width: 1040px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:not(:last-child)::after { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav__list, .nav__cta .btn--ghost { display: none; }
  .burger { display: flex; }
  .nav--open .nav__list {
    display: grid; position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 6px);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
    padding: 10px; box-shadow: var(--shadow-lg); gap: 2px; z-index: 60;
  }
  .nav--open .nav__list a { padding: 14px; }
  .hero__in, .about, .contact { grid-template-columns: 1fr; }
  .about__media img { aspect-ratio: 16/11; border-radius: var(--r-lg); }
  .about__card { position: static; max-width: none; margin-top: 14px; box-shadow: none; }
  .results__grid { grid-template-columns: 1fr; gap: 16px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Téléphone ---------- */
@media (max-width: 620px) {
  :root { --header-h: 62px; --gutter: 16px; }

  /* Barre d'infos : on ne garde que le contact direct, le reste est dans la page. */
  .topbar { font-size: .78rem; padding-block: 7px; }
  .topbar__in { justify-content: center; gap: 6px 16px; }
  .topbar__in > *:not(:last-child) { display: none; }

  /* En-tête compact : logo + nom sur deux lignes au plus, bouton court. */
  .nav { min-height: 62px; gap: 10px; }
  .brand { gap: 9px; }
  .brand img { width: 38px; height: 38px; border-radius: 9px; }
  .brand__name { font-size: .88rem; max-width: 10.5rem; }
  .brand__sub { display: none; }
  .nav__cta { gap: 8px; }
  .nav__cta .btn--sm { padding: 9px 14px; font-size: .84rem; min-height: 40px; }
  .btn { white-space: normal; }
  .hide-sm { display: none; }
  .burger { width: 42px; height: 42px; }

  /* Contenu */
  .grid--2, .grid--3, .grid--4, .steps { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 24px; gap: 10px; }
  .card { padding: 20px; }
  .lead { font-size: 1rem; }

  /* Bandeau d'accueil */
  .hero__in { padding-block: 28px 36px; gap: 26px; }
  .hero h1 { margin-bottom: 14px; }
  .hero__meta { gap: 12px 18px; margin-top: 20px; }
  .hero__badge { padding: 8px 14px 8px 8px; }
  .hero__badge span span { font-size: .82rem; }
  .btn-row .btn { flex: 1 1 100%; }
  .hero__media { grid-template-columns: 1fr 1fr; gap: 12px; }
  .shot--tall { grid-row: auto; aspect-ratio: 3/4; border-radius: 90px 90px 16px 16px; }
  .shot--wide { aspect-ratio: 3/4; border-radius: 16px 90px 16px 16px; }
  .shot--soft { display: none; }
  .hero__stamp { position: static; max-width: none; margin-top: 12px; grid-column: 1 / -1; }

  /* Résultats */
  .results__grid { padding-block: 26px; }
  .results__item b { font-size: 1.6rem; }

  /* Onglets et tableaux */
  .tabs { gap: 6px; margin-bottom: 16px; }
  .tab { width: 100%; text-align: left; font-size: .87rem; padding: 11px 16px; }
  table { min-width: 460px; font-size: .84rem; }
  th, td { padding: 9px 12px; }
  caption { padding: 12px 14px 0; font-size: .9rem; }
  .table-scroll { position: relative; }
  .table-scroll::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 26px;
    background: linear-gradient(90deg, transparent, var(--surface));
    pointer-events: none; border-radius: 0 var(--r-md) var(--r-md) 0;
  }
  .scroll-hint { font-size: .78rem; color: var(--text-muted); margin-top: 8px; }

  /* Galerie */
  .gallery { gap: 10px; }
  .gallery .span-2 { grid-column: span 2; aspect-ratio: 16/10; }

  /* Contact et pied de page */
  .footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .footer__bottom { flex-direction: column; gap: 12px; }
  .cta-final h2 { max-width: none; }
}

@media (min-width: 621px) {
  .scroll-hint { display: none; }
}
/* ---------- 8. MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* =========================================================
   9. Adaptations WordPress
   ========================================================= */

/* Barre d'administration et header collant */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

/* Menus générés par wp_nav_menu */
.nav__list li { list-style: none; }
.site-footer .menu, .footer__legal ul { display: grid; gap: 9px; list-style: none; margin: 0; padding: 0; }
.footer__legal ul { display: flex; flex-wrap: wrap; gap: 18px; }

/* Bloc « Tableau » du contenu, habillé comme les tableaux du site */
.table-scroll figure.wp-block-table { margin: 0; }
.table-scroll .wp-block-table table { border-collapse: collapse; }
.table-scroll .wp-block-table td, .table-scroll .wp-block-table th { border: 0; border-bottom: 1px solid var(--border); }
.table-scroll .wp-block-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--bg-alt) 60%, transparent); }
[role="tabpanel"] > .table-scroll { margin-bottom: 0; }

/* Variantes de cartes */
.card--gold { background: var(--accent-soft); border-color: var(--gold-200); }
.card--brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.card--brand h3 { color: #fff; }
.card--brand p { color: #CFE9E7; }

/* Actualités */
.news { padding: 0; overflow: hidden; }
.news > *:not(.news__media) { margin-inline: 24px; }
.news > *:first-child:not(.news__media) { margin-top: 24px; }
.news > *:last-child { margin-bottom: 24px; }
.news__media { display: block; aspect-ratio: 16/10; background: var(--brand-soft); }
.news__media img { width: 100%; height: 100%; object-fit: cover; }
.news__date { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-600); }
.news h3 a, .news h2 a { text-decoration: none; }
.news h3 a:hover, .news h2 a:hover { color: var(--brand); }

/* Témoignages */
.quote blockquote { margin: 0; font-size: 1rem; color: var(--text); }
.quote blockquote p { margin: 0 0 10px; }
.quote figcaption b { display: block; }
.quote figcaption span { font-size: .85rem; color: var(--text-muted); }

/* Bloc de préinscription */
.form-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: clamp(20px, 3vw, 32px);
}
.form-wrap--fallback { background: var(--bg-alt); }
.form-wrap form { border: 0; padding: 0; background: transparent; }
.form-wrap .placeholder { margin-top: 20px; }

/* Contenu éditorial des pages et actualités */
.prose { max-width: 70ch; display: grid; gap: 18px; }
.prose h2 { margin-top: 18px; }
.prose ul, .prose ol { list-style: revert; padding-left: 1.3em; display: grid; gap: 8px; }
.prose a { color: var(--brand); }
.prose img { border-radius: var(--r-md); }

/* Pagination */
.pagination .page-numbers {
  display: inline-block; padding: 8px 14px; border: 1px solid var(--border);
  border-radius: 999px; text-decoration: none; margin-right: 6px;
}
.pagination .page-numbers.current { background: var(--brand); color: #fff; border-color: var(--brand); }
