/* ============================================================
   ETEC NIGER — DESIGN SYSTEM PREMIUM (Phase 1)
   Tokens · Dark/Light · Typographie · Composants
   ============================================================ */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Brand — brun académique + or */
  --brand-50:  #FBF3EA;
  --brand-100: #F3E1CE;
  --brand-200: #E4C09B;
  --brand-300: #D19A65;
  --brand-400: #B9702E;
  --brand-500: #9A4710;
  --brand-600: #6B3109;   /* primaire officiel */
  --brand-700: #572709;
  --brand-800: #3F1C08;
  --brand-900: #2A1305;

  --gold:        #C9932F;
  --gold-bright: #E8B23A;
  --gold-glow:   #FFF3B0;

  /* Sémantiques */
  --success: #2F855A;
  --warning: #C9932F;
  --danger:  #C0392B;
  --info:    #2B6CB0;

  /* Rayons */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Espacements (échelle 4px) */
  --sp-1: .25rem;  --sp-2: .5rem;  --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;   --sp-8: 3rem;    --sp-10: 4rem;
  --sp-12: 6rem;   --sp-16: 8rem;

  /* Typo */
  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --step--1: clamp(.82rem, .8rem + .1vw, .9rem);
  --step-0:  clamp(1rem, .96rem + .2vw, 1.075rem);
  --step-1:  clamp(1.2rem, 1.12rem + .4vw, 1.4rem);
  --step-2:  clamp(1.5rem, 1.35rem + .75vw, 2rem);
  --step-3:  clamp(2rem, 1.7rem + 1.5vw, 3rem);
  --step-4:  clamp(2.6rem, 2rem + 3vw, 4.5rem);

  /* Transitions */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: .16s;  --t: .28s;  --t-slow: .5s;

  --container: 1200px;
}

/* ---------- 2. THÈMES ---------- */
:root, :root[data-theme="light"] {
  --bg:        #FBF7F0;
  --bg-tint:   #F5ECDF;
  --surface:   #FFFFFF;
  --surface-2: #F7F0E6;
  --border:    rgba(107, 49, 9, .13);
  --border-strong: rgba(107, 49, 9, .24);
  --text:      #241A12;
  --text-muted:#6E6157;
  --brand:     var(--brand-600);
  --brand-ink: var(--brand-700);
  --on-brand:  #FFF7EC;
  --hero-overlay: linear-gradient(115deg, rgba(42,19,5,.92) 0%, rgba(107,49,9,.62) 55%, rgba(107,49,9,.15) 100%);
  --shadow-sm: 0 2px 8px rgba(42,19,5,.06);
  --shadow-md: 0 12px 30px rgba(42,19,5,.10);
  --shadow-lg: 0 30px 60px rgba(42,19,5,.16);
  --shadow-gold: 0 12px 30px rgba(201,147,47,.30);
}

:root[data-theme="dark"] {
  --bg:        #150F0A;
  --bg-tint:   #1C140D;
  --surface:   #211812;
  --surface-2: #2A1F16;
  --border:    rgba(232,178,58,.15);
  --border-strong: rgba(232,178,58,.30);
  --text:      #F4ECE1;
  --text-muted:#B7A794;
  --brand:     #D08640;
  --brand-ink: #E8B23A;
  --on-brand:  #1A1006;
  --hero-overlay: linear-gradient(115deg, rgba(10,6,3,.94) 0%, rgba(24,14,7,.70) 55%, rgba(24,14,7,.30) 100%);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.4);
  --shadow-md: 0 14px 34px rgba(0,0,0,.5);
  --shadow-lg: 0 30px 70px rgba(0,0,0,.6);
  --shadow-gold: 0 12px 34px rgba(232,178,58,.22);
}

/* Icônes inline (ic()) — taille par défaut */
.lic { width: 1.2em; height: 1.2em; flex: none; vertical-align: -.18em; }
.cell .ic .lic, .mega-link .ic .lic, .contact-info .row .ic .lic { width: 22px; height: 22px; }

/* ---------- 3. RESET / BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--on-brand); padding: .7rem 1.2rem; border-radius: 0 0 var(--r-md) 0; z-index: 200; }
.skip-link:focus { left: 0; }

/* ---------- 4. TYPOGRAPHIE UTILS ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-sans); font-size: var(--step--1); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brand);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--gold); border-radius: 2px; }
.display { font-size: var(--step-4); }
.h-lead { font-size: var(--step-2); }
.lead { font-size: var(--step-1); color: var(--text-muted); line-height: 1.55; }
.text-gold { color: var(--gold); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: var(--step-3); margin: .6rem 0 .8rem; }
.section-head p { color: var(--text-muted); font-size: var(--step-1); }

/* ---------- 5. BOUTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-weight: 600; font-size: var(--step-0); line-height: 1;
  padding: .95rem 1.7rem; border-radius: var(--r-full);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
  will-change: transform; white-space: nowrap;
}
.btn svg { width: 1.1em; height: 1.1em; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: linear-gradient(135deg, var(--brand-500), var(--brand-600)); color: var(--on-brand); box-shadow: var(--shadow-gold); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(201,147,47,.42); }
.btn-gold { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: #2A1305; box-shadow: var(--shadow-gold); }
.btn-gold:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.btn-light { background: rgba(255,255,255,.14); color: #fff; border: 1.5px solid rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255,255,255,.24); transform: translateY(-2px); }
.btn-lg { padding: 1.1rem 2.1rem; font-size: var(--step-1); }

/* ---------- 6. BADGES ---------- */
.badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .3rem .65rem; border-radius: var(--r-full); }
.badge-cames { background: rgba(47,133,90,.14); color: var(--success); }
.badge-anaq { background: rgba(43,108,176,.14); color: var(--info); }
.badge-gold { background: rgba(201,147,47,.16); color: var(--gold); }

/* ---------- 7. TOPBAR / TICKER ---------- */
.topbar { background: var(--brand-700); color: var(--brand-50); font-size: var(--step--1); overflow: hidden; }
.topbar .track { display: flex; gap: 3rem; white-space: nowrap; padding: .5rem 0; animation: ticker 34s linear infinite; }
.topbar .track span { opacity: .92; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .topbar .track { animation: none; justify-content: center; } }

/* ---------- 8. NAVBAR + MEGA MENU ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.nav.scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; gap: 1rem; padding: .55rem 0; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand-logo {
  display: block; height: 52px; width: auto; max-width: min(220px, 42vw);
  object-fit: contain; border-radius: var(--r-md);
  transition: transform var(--t-fast) var(--ease);
}
.brand-logo:hover { transform: translateY(-1px); }
.brand img.brand-logo,
.brand .brand-logo img { height: 52px; width: auto; display: block; }
/* Logo transparent = texte foncé : pastille claire seulement là où le fond est sombre */
:root[data-theme="dark"] .nav .brand-logo { background: rgba(255,255,255,.95); padding: 4px 10px; box-shadow: 0 1px 6px rgba(0,0,0,.3); }
.brand-logo-footer { background: rgba(255,255,255,.96); padding: 8px 16px; border-radius: var(--r-lg); box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.brand-logo-footer img { height: 50px; }
.nav-menu {
  display: flex; align-items: center; gap: .15rem; margin: 0 0 0 auto; padding: 0;
  list-style: none;
}
.nav-menu > li { list-style: none; margin: 0; padding: 0; }
.nav-menu > li > a, .nav-trigger {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .5rem .75rem; border-radius: var(--r-md);
  font-weight: 500; color: var(--text);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-menu > li > a:hover, .nav-trigger:hover, .nav-item.open .nav-trigger { color: var(--brand); background: var(--surface-2); }
.nav-menu a.active { color: var(--brand); }
.nav-trigger .chev { font-size: .7em; line-height: 1; opacity: .7; transition: transform var(--t); }
.nav-item.open .nav-trigger .chev { transform: rotate(180deg); }

.nav-item { position: relative; }
.mega {
  position: absolute; top: calc(100% + .5rem); left: 50%; transform: translateX(-50%) translateY(8px);
  width: min(90vw, 640px); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 1.4rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1.5rem;
  opacity: 0; visibility: hidden; transition: opacity var(--t), transform var(--t); z-index: 120;
}
.nav-item.open .mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega-col h5 { font-family: var(--font-sans); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin: .3rem .6rem .5rem; }
.mega-link { display: flex; gap: .8rem; align-items: flex-start; padding: .6rem; border-radius: var(--r-md); transition: background var(--t-fast); }
.mega-link:hover { background: var(--surface-2); }
.mega-link .ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-50); color: var(--brand); }
:root[data-theme="dark"] .mega-link .ic { background: rgba(232,178,58,.12); }
.mega-link b { display: block; font-size: .95rem; }
.mega-link span { font-size: .8rem; color: var(--text-muted); }

.nav-actions { display: flex; align-items: center; gap: .5rem; }
.theme-toggle { width: 42px; height: 42px; border-radius: var(--r-full); display: grid; place-items: center; border: 1px solid var(--border); color: var(--text); transition: background var(--t-fast), transform var(--t-fast); }
.theme-toggle:hover { background: var(--surface-2); transform: rotate(-8deg); }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.nav-burger { display: none; width: 44px; height: 44px; border-radius: var(--r-md); }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px auto; border-radius: 2px; transition: var(--t); }

/* Drawer mobile */
.drawer { position: fixed; inset: 0; z-index: 200; visibility: hidden; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(20,10,4,.5); opacity: 0; transition: opacity var(--t); }
.drawer-panel { position: absolute; top: 0; right: 0; height: 100%; width: min(86vw, 360px); background: var(--surface); box-shadow: var(--shadow-lg); padding: 1.5rem; transform: translateX(100%); transition: transform var(--t) var(--ease-out); overflow-y: auto; }
.drawer.open { visibility: visible; }
.drawer.open .drawer-scrim { opacity: 1; }
.drawer.open .drawer-panel { transform: translateX(0); }
.drawer-panel a { display: block; padding: .85rem .4rem; border-bottom: 1px solid var(--border); font-weight: 500; }
.drawer-panel a.sub { padding-left: 1.4rem; font-size: .92rem; color: var(--text-muted); border-bottom: 0; }
.drawer-close { position: absolute; top: 1rem; right: 1rem; font-size: 1.5rem; width: 40px; height: 40px; }

/* ---------- 9. HERO ---------- */
.hero { position: relative; min-height: clamp(560px, 88vh, 860px); display: grid; align-items: center; overflow: hidden; color: #fff; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hero-overlay); }
.hero-inner { padding: clamp(3rem, 8vh, 6rem) 0; max-width: 58rem; }
.hero .eyebrow { color: var(--gold-glow); }
.hero .eyebrow::before { background: var(--gold-bright); }
.hero h1 { font-size: var(--step-4); margin: 1rem 0 1.2rem; color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,.3); }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--gold-bright), var(--gold-glow)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: var(--step-1); max-width: 40rem; color: rgba(255,255,255,.9); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.hero-scroll { position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.7); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.hero-scroll::after { content: ""; width: 1px; height: 34px; background: linear-gradient(rgba(255,255,255,.7), transparent); animation: scrollpulse 2s var(--ease) infinite; }
@keyframes scrollpulse { 0%,100% { opacity: .3; transform: scaleY(.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- 10. STATS ---------- */
.stats { position: relative; z-index: 2; margin-top: -3.5rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.stat { background: var(--surface); padding: 1.6rem 1.2rem; text-align: center; }
.stat .num { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 600; color: var(--brand); line-height: 1; }
.stat .num .plus { color: var(--gold); }
.stat .lbl { display: block; margin-top: .5rem; font-size: var(--step--1); color: var(--text-muted); font-weight: 500; }

/* ---------- 11. BENTO / WHY ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.bento .cell { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.6rem; transition: transform var(--t) var(--ease), box-shadow var(--t), border-color var(--t); }
.bento .cell:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.bento .cell.wide { grid-column: span 2; }
.bento .cell.tall { grid-row: span 2; }
.cell .ic { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); color: var(--brand); margin-bottom: 1rem; }
:root[data-theme="dark"] .cell .ic { background: rgba(232,178,58,.12); }
.cell h3 { font-size: var(--step-1); margin-bottom: .4rem; }
.cell p { color: var(--text-muted); font-size: var(--step-0); }

/* ---------- 12. CARDS (domaines / campus / news) ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; transition: transform var(--t) var(--ease), box-shadow var(--t), border-color var(--t); display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card-media { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.card-media .tag { position: absolute; top: .8rem; left: .8rem; background: var(--brand); color: var(--on-brand); font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .3rem .7rem; border-radius: var(--r-full); }
.card-body { padding: 1.4rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-body h3 { font-size: var(--step-1); }
.card-body p { color: var(--text-muted); font-size: var(--step-0); }
.card-foot { margin-top: auto; padding-top: .8rem; display: flex; align-items: center; gap: .5rem; color: var(--brand); font-weight: 600; font-size: var(--step-0); }
.card:hover .card-foot .arrow { transform: translateX(4px); }
.card-foot .arrow { transition: transform var(--t); }

/* Domaine card (formation levels) */
.domain { position: relative; padding: 1.8rem; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); overflow: hidden; transition: transform var(--t) var(--ease), box-shadow var(--t); }
.domain:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.domain::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--brand), var(--gold)); }
.domain .lvl-badge { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.domain h3 { font-size: var(--step-2); margin: .5rem 0; }
.domain .count { font-family: var(--font-display); font-size: 2.6rem; color: var(--brand); line-height: 1; }
.domain p { color: var(--text-muted); margin-top: .5rem; }

/* ---------- 13. TIMELINE PROCESS ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: step; }
.step { position: relative; padding-top: 3.5rem; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 52px; height: 52px; display: grid; place-items: center; border-radius: var(--r-full); background: linear-gradient(135deg, var(--brand-500), var(--brand-600)); color: var(--on-brand); font-family: var(--font-display); font-size: 1.4rem; box-shadow: var(--shadow-gold); }
.step::after { content: ""; position: absolute; top: 26px; left: 52px; right: -1.5rem; height: 2px; background: linear-gradient(90deg, var(--gold), transparent); }
.step:last-child::after { display: none; }
.step h3 { font-size: var(--step-1); margin-bottom: .3rem; }
.step p { color: var(--text-muted); font-size: var(--step-0); }

/* ---------- 14. MARQUEE PARTENAIRES ---------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee .track { display: flex; gap: 3.5rem; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee .pill { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.marquee .pill::before { content: "◆"; color: var(--gold); font-size: .7rem; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: none; flex-wrap: wrap; justify-content: center; } }

/* ---------- 15. TESTIMONIALS ---------- */
.quote-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 2rem; box-shadow: var(--shadow-sm); }
.quote-card .mark { font-family: var(--font-display); font-size: 3rem; color: var(--gold); line-height: .6; }
.quote-card blockquote { font-size: var(--step-1); line-height: 1.5; margin: .5rem 0 1.2rem; }
.quote-card .who { display: flex; align-items: center; gap: .8rem; }
.quote-card .who .av { width: 46px; height: 46px; border-radius: var(--r-full); background: var(--brand-100); color: var(--brand); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; }
.quote-card .who b { display: block; }
.quote-card .who span { font-size: var(--step--1); color: var(--text-muted); }

/* ---------- 16. CTA BANNER ---------- */
.cta { position: relative; border-radius: var(--r-xl); overflow: hidden; padding: clamp(2.5rem, 6vw, 4.5rem); text-align: center; color: #fff; background: linear-gradient(120deg, var(--brand-700), var(--brand-500)); box-shadow: var(--shadow-lg); }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(232,178,58,.35), transparent 45%); }
.cta > * { position: relative; }
.cta h2 { font-size: var(--step-3); color: #fff; }
.cta p { color: rgba(255,255,255,.9); font-size: var(--step-1); max-width: 40rem; margin: 1rem auto 1.8rem; }
.cta .hero-cta { justify-content: center; }

/* ---------- 17. FOOTER ---------- */
.footer { background: var(--brand-900); color: #E9D9C6; padding-top: clamp(3rem, 6vw, 5rem); }
:root[data-theme="light"] .footer { background: #241206; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer h4 { font-family: var(--font-sans); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-bright); margin-bottom: 1rem; }
.footer a { color: #C9B49C; transition: color var(--t-fast); }
.footer a:hover { color: #fff; }
.footer li { margin-bottom: .55rem; }
.footer-brand p { color: #C9B49C; margin: 1rem 0; max-width: 24rem; }
.footer-motto { display: flex; gap: .5rem; flex-wrap: wrap; }
.footer-motto span { font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: .3rem .7rem; border: 1px solid rgba(232,178,58,.3); border-radius: var(--r-full); color: var(--gold-bright); }
.footer-social { display: flex; gap: .6rem; margin-top: 1.2rem; }
.footer-social a { width: 40px; height: 40px; border-radius: var(--r-full); border: 1px solid rgba(255,255,255,.15); display: grid; place-items: center; }
.footer-social a:hover { background: var(--gold); border-color: var(--gold); color: #241206; }
.footer-social svg { width: 18px; height: 18px; fill: currentColor; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.5rem 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: var(--step--1); color: #A8917A; }

/* ---------- 18. FLOATING ---------- */
.fab-wa { position: fixed; bottom: 1.4rem; right: 1.4rem; z-index: 90; width: 56px; height: 56px; border-radius: var(--r-full); background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(37,211,102,.45); transition: transform var(--t); }
.fab-wa:hover { transform: scale(1.08); }
.fab-wa svg { width: 30px; height: 30px; fill: currentColor; }
.to-top { position: fixed; bottom: 1.4rem; left: 1.4rem; z-index: 90; width: 46px; height: 46px; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(10px); transition: var(--t); }
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- 19. ANIMATIONS REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; } .reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; } .reveal-d4 { transition-delay: .32s; }
html.reveal-instant .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }

/* ---------- 20. RESPONSIVE ---------- */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .cell.wide, .bento .cell.tall { grid-column: auto; grid-row: auto; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
}
@media (max-width: 820px) {
  .nav-menu, .nav-actions .btn { display: none; }
  .nav-burger { display: block; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .steps, .bento { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .hero-cta .btn { flex: 1; }
}

/* ============================================================
   PHASE 2 — PAGES INTERNES
   ============================================================ */

/* Bannière de page + fil d'Ariane */
.page-hero { position: relative; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); color: #fff; overflow: hidden; background: linear-gradient(120deg, var(--brand-800), var(--brand-600) 70%); }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 15%, rgba(232,178,58,.28), transparent 42%); }
.page-hero > * { position: relative; }
.page-hero h1 { font-size: var(--step-3); color: #fff; margin: .3rem 0 .6rem; }
.page-hero p { color: rgba(255,255,255,.9); font-size: var(--step-1); max-width: 46rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: var(--step--1); color: rgba(255,255,255,.75); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { opacity: .5; }

/* Filtres formations */
.filter-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; }
.filter-tabs a { padding: .6rem 1.1rem; border-radius: var(--r-full); border: 1px solid var(--border); font-weight: 600; font-size: var(--step-0); transition: all var(--t-fast); }
.filter-tabs a:hover { border-color: var(--brand); color: var(--brand); }

/* Bloc de niveau */
.level-block { scroll-margin-top: 90px; }
.level-block + .level-block { margin-top: clamp(3rem, 6vw, 5rem); }
.level-head { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.level-head h2 { font-size: var(--step-2); }
.level-badge { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .35rem .8rem; border-radius: var(--r-full); background: var(--brand-50); color: var(--brand); }
:root[data-theme="dark"] .level-badge { background: rgba(232,178,58,.14); color: var(--gold-bright); }
.level-note { font-size: var(--step--1); color: var(--text-muted); background: var(--surface-2); border-left: 3px solid var(--gold); padding: .7rem 1rem; border-radius: 0 var(--r-md) var(--r-md) 0; margin-bottom: 1.6rem; }

/* Cartes filières */
.filiere-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.filiere-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.2rem; transition: transform var(--t-fast) var(--ease), box-shadow var(--t), border-color var(--t); }
.filiere-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.filiere-card .code { display: inline-flex; font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .05em; color: var(--brand); background: var(--brand-50); padding: .25rem .55rem; border-radius: var(--r-sm); margin-bottom: .6rem; }
:root[data-theme="dark"] .filiere-card .code { background: rgba(232,178,58,.12); color: var(--gold-bright); }
.filiere-card h3 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 600; line-height: 1.3; margin-bottom: .3rem; }
.filiere-card p { font-size: var(--step--1); color: var(--text-muted); }
.filiere-card .accreds { display: flex; gap: .4rem; margin-top: .8rem; flex-wrap: wrap; }

/* Deux colonnes (à propos) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media img { width: 100%; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); aspect-ratio: 4/3; object-fit: cover; }
.prose p { margin-bottom: 1rem; color: var(--text-muted); }
.prose p.lead-txt { color: var(--text); font-size: var(--step-1); }

/* Carte PDG */
.pdg { display: grid; grid-template-columns: 300px 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; background: var(--surface-2); border-radius: var(--r-xl); padding: clamp(1.5rem, 4vw, 3rem); scroll-margin-top: 90px; }
.pdg img { width: 100%; border-radius: var(--r-lg); aspect-ratio: 3/4; object-fit: cover; box-shadow: var(--shadow-lg); }
.pdg .quote { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.4; font-weight: 500; }
.pdg .quote::first-letter { color: var(--gold); }
.pdg .sig { margin-top: 1.2rem; }
.pdg .sig b { display: block; font-size: var(--step-1); color: var(--brand); font-family: var(--font-display); }
.pdg .sig span { color: var(--text-muted); font-size: var(--step--1); }

/* Fees */
.fees-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.fee-card { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.8rem 1.2rem; transition: transform var(--t) var(--ease), box-shadow var(--t); }
.fee-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.fee-card .amount { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--brand); font-weight: 600; }
.fee-card .lbl { color: var(--text-muted); font-size: var(--step--1); margin-top: .4rem; white-space: pre-line; }
.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.6rem; }
.info-card h3 { font-size: var(--step-1); margin-bottom: .8rem; display: flex; align-items: center; gap: .5rem; }
.info-card ul li { padding: .5rem 0 .5rem 1.6rem; position: relative; border-bottom: 1px solid var(--border); font-size: var(--step-0); }
.info-card ul li:last-child { border-bottom: 0; }
.info-card ul li::before { content: ""; position: absolute; left: .2rem; top: 1rem; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.promo-band { text-align: center; background: linear-gradient(120deg, var(--gold), var(--gold-bright)); color: #2A1305; font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); padding: 1rem; border-radius: var(--r-full); }

/* Formulaires */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow-sm); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: var(--step--1); font-weight: 600; }
.field input, .field select, .field textarea { font: inherit; padding: .8rem .9rem; border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(201,147,47,.2); }
.field textarea { resize: vertical; min-height: 120px; }
.alert { padding: 1rem 1.2rem; border-radius: var(--r-md); margin-bottom: 1.5rem; display: flex; gap: .6rem; align-items: flex-start; }
.alert-success { background: rgba(47,133,90,.12); color: var(--success); border: 1px solid rgba(47,133,90,.3); }
.alert-error { background: rgba(192,57,43,.1); color: var(--danger); border: 1px solid rgba(192,57,43,.3); }

/* Galerie + lightbox */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.gallery-grid button { padding: 0; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 1; position: relative; cursor: zoom-in; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.gallery-grid button:hover img { transform: scale(1.08); }
.gallery-grid button::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 60%, rgba(42,19,5,.4)); opacity: 0; transition: opacity var(--t); }
.gallery-grid button:hover::after { opacity: 1; }
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(15,8,3,.92); display: none; place-items: center; padding: 2rem; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: var(--r-md); box-shadow: var(--shadow-lg); }
.lightbox .lb-close { position: absolute; top: 1.2rem; right: 1.4rem; color: #fff; font-size: 2.4rem; line-height: 1; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 2.6rem; width: 56px; height: 56px; background: rgba(255,255,255,.12); border-radius: var(--r-full); }
.lightbox .lb-prev { left: 1rem; } .lightbox .lb-next { right: 1rem; }

/* Stars */
.stars { color: var(--gold-bright); letter-spacing: .1em; font-size: .95rem; }

/* Barre de recherche + filtres (formations) */
.search-toolbar { margin-bottom: 2.5rem; }
.search-box { position: relative; margin-bottom: 1rem; }
.search-box .lic { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 1.2em; height: 1.2em; }
.search-box input { width: 100%; font: inherit; padding: .95rem 1rem .95rem 2.8rem; border-radius: var(--r-full); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.search-box input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(201,147,47,.2); }
.filter-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { padding: .5rem 1rem; border-radius: var(--r-full); border: 1px solid var(--border); font-weight: 600; font-size: var(--step--1); color: var(--text); transition: all var(--t-fast); display: inline-flex; align-items: center; gap: .4rem; }
.chip:hover { border-color: var(--brand); }
.chip.active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.chip .cn { font-size: .72rem; opacity: .7; }
.chip-accred.active { background: var(--gold); color: #2A1305; border-color: var(--gold); }
.filiere-card.hide, .level-block.hide { display: none; }

/* État vide */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state .ic { width: 64px; height: 64px; margin: 0 auto 1rem; display: grid; place-items: center; border-radius: var(--r-full); background: var(--surface-2); color: var(--text-muted); }
.empty-state .ic .lic { width: 30px; height: 30px; }
.empty-state h3 { font-size: var(--step-1); }
.empty-state p { color: var(--text-muted); margin: .4rem 0 1.2rem; }

/* Accordéon FAQ */
.accordion { max-width: 52rem; margin-inline: auto; }
.acc-item { border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: .8rem; overflow: hidden; background: var(--surface); transition: border-color var(--t); }
.acc-item.open { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.acc-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.4rem; text-align: left; font-family: var(--font-display); font-size: var(--step-1); font-weight: 600; }
.acc-head .plus { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--r-full); background: var(--brand-50); color: var(--brand); font-size: 1.3rem; transition: transform var(--t), background var(--t); }
:root[data-theme="dark"] .acc-head .plus { background: rgba(232,178,58,.12); color: var(--gold-bright); }
.acc-item.open .acc-head .plus { transform: rotate(45deg); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height var(--t) var(--ease); }
.acc-body-inner { padding: 0 1.4rem 1.3rem; color: var(--text-muted); }

/* Contact info list */
.contact-info { display: grid; gap: 1rem; }
.contact-info .row { display: flex; gap: .9rem; align-items: flex-start; }
.contact-info .row .ic { flex: none; width: 42px; height: 42px; border-radius: var(--r-md); background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
:root[data-theme="dark"] .contact-info .row .ic { background: rgba(232,178,58,.12); }
.contact-info .row b { display: block; }
.contact-info .row span, .contact-info .row a { color: var(--text-muted); font-size: var(--step-0); }

@media (max-width: 820px) {
  .split, .pdg, .form-grid { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .pdg img { max-width: 260px; }
}

/* ============================================================
   BROCHURE + COMPARATEUR + IMPRESSION
   ============================================================ */
.brochure { max-width: 900px; margin-inline: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: clamp(1.5rem, 5vw, 3.5rem); box-shadow: var(--shadow-md); }
.brochure-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 3px solid var(--gold); padding-bottom: 1.2rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.brochure-head img { height: 60px; }
.brochure-head .meta { text-align: right; font-size: var(--step--1); color: var(--text-muted); }
.brochure h2 { font-size: var(--step-2); margin: 1.6rem 0 .8rem; color: var(--brand); }
.brochure .b-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.2rem 0; }
.brochure .b-stat { text-align: center; background: var(--surface-2); border-radius: var(--r-md); padding: 1rem; }
.brochure .b-stat b { display: block; font-family: var(--font-display); font-size: 1.8rem; color: var(--brand); }
.brochure .b-stat span { font-size: .78rem; color: var(--text-muted); }
.brochure .b-levels { display: grid; gap: .6rem; }
.brochure .b-level { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; background: var(--surface-2); border-radius: var(--r-md); border-left: 3px solid var(--gold); }
.brochure .b-level b { color: var(--brand); }
.print-actions { max-width: 900px; margin: 0 auto 1.5rem; display: flex; gap: .8rem; justify-content: flex-end; }

/* Comparateur */
.cmp-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.cmp-select { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1rem; }
.cmp-select label { font-size: var(--step--1); font-weight: 600; display: block; margin-bottom: .4rem; }
.cmp-select select { width: 100%; font: inherit; padding: .7rem; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); }
.cmp-table { width: 100%; border-collapse: collapse; }
.cmp-table th, .cmp-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.cmp-table thead th { background: var(--brand); color: var(--on-brand); font-family: var(--font-display); }
.cmp-table thead th:first-child { background: transparent; }
.cmp-table tbody th { font-weight: 600; color: var(--text-muted); font-size: var(--step--1); width: 180px; }
.cmp-table .cmp-empty { color: var(--text-muted); font-style: italic; }
.cmp-wrap { overflow-x: auto; }

@media (max-width: 700px) {
  .cmp-picker { grid-template-columns: 1fr; }
  .brochure .b-stats { grid-template-columns: repeat(2, 1fr); }
}

@media print {
  .topbar, .nav, .drawer, .footer, .fab-wa, .to-top, .print-actions, .no-print { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .brochure { box-shadow: none; border: none; max-width: 100%; padding: 0; }
  .page-hero { background: #fff !important; color: #000 !important; padding: 0 !important; }
  .page-hero h1, .page-hero p { color: #000 !important; }
  a { color: #000 !important; text-decoration: none; }
  .section { padding: 0 !important; }
}
