/* ==========================================================================
   MGC AGENCY — CORE
   Design system : tokens, reset, typography, layout, components.
   Concept « LE SIGNAL » — le cadre vertical 9:16 comme unité de base.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FONTS (auto-hébergées, variable, latin + latin-ext)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../assets/fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../assets/fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../assets/fonts/jost-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../assets/fonts/jost-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   2. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Couleurs de marque — extraites du logo officiel MGC Agency */
  --emerald: #13a06b;
  --emerald-bright: #1cc183;
  --emerald-deep: #0c6b47;
  --gold: #e3a63a;
  --gold-bright: #f2c063;
  /* Or soutenu : c'est la teinte des accents posés sur fond clair.
     Valeur fixée par le contraste — 4,5:1 minimum sur blanc comme sur papier. */
  --gold-deep: #8f6017;
  --forest: #0b3a2c;

  /* Neutres */
  --ink: #05100c;
  --ink-2: #081810;
  --ink-3: #0d2419;
  --paper: #f7f6f2;
  --paper-2: #efede6;
  --paper-3: #e3e0d7;

  /* ---------------------------------------------------------------------
     SYSTÈME DE SURFACES — cinq surfaces, pas une de plus.
     Toute section du site utilise l'une d'elles ; aucune couleur ad hoc.

       1. surface sombre de marque   .theme-dark, en-têtes de page, scène 3D
       2. surface claire principale  fond éditorial par défaut
       3. surface claire secondaire  .theme-light, alternance
       4. surface accent de marque   .theme-forest, bandeau final
       5. surface neutre de contenu  cartes et panneaux

     Le vert profond remplace le presque-noir sur les grandes surfaces :
     les environnements de titre respirent sans perdre l'identité.
     --------------------------------------------------------------------- */
  --surface-dark: #10382a;
  --surface-dark-2: #0b2a1f;
  --surface-accent: #0e4433;

  /* Sémantique — le clair est la base éditoriale du site.
     Le sombre est réservé aux moments cinématographiques : scène 3D,
     en-têtes de page, mur de réalisations, bandeau final. */
  --bg: var(--paper);
  --surface: #ffffff;
  --surface-2: var(--paper-2);
  --fg: #0a1811;
  --fg-dim: rgba(10, 24, 17, 0.68);
  /* Plancher fixé par le contraste : ce ton porte du texte réel
     (mentions du pied de page, formats, repères), pas de la décoration. */
  --fg-faint: rgba(10, 24, 17, 0.6);
  --line: rgba(11, 58, 44, 0.13);
  --line-strong: rgba(11, 58, 44, 0.26);
  --accent: var(--gold-deep);
  --accent-2: var(--emerald-deep);

  /* Ombres — discrètes, teintées de vert plutôt que de gris */
  --shadow-sm: 0 1px 2px rgba(11, 58, 44, 0.05);
  --shadow-md: 0 1px 2px rgba(11, 58, 44, 0.04), 0 10px 28px -14px rgba(11, 58, 44, 0.22);
  --shadow-lg: 0 2px 4px rgba(11, 58, 44, 0.05), 0 24px 56px -24px rgba(11, 58, 44, 0.3);

  /* Typographie */
  --font-sans: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-label: 'Jost', 'Century Gothic', 'Futura', var(--font-sans);

  /* Échelle typographique — resserrée : les titres doivent affirmer,
     pas occuper l'écran. Mobile, tablette et bureau sont bornés séparément. */
  --fs-display: clamp(2rem, 1.15rem + 3.9vw, 4.6rem);
  --fs-h1: clamp(1.85rem, 1.15rem + 2.7vw, 3.4rem);
  --fs-h2: clamp(1.55rem, 1.1rem + 1.8vw, 2.6rem);
  --fs-h3: clamp(1.2rem, 1.05rem + 0.7vw, 1.6rem);
  --fs-h4: clamp(1.02rem, 0.96rem + 0.3vw, 1.2rem);
  --fs-lead: clamp(1rem, 0.95rem + 0.32vw, 1.18rem);
  --fs-body: clamp(0.98rem, 0.95rem + 0.16vw, 1.08rem);
  --fs-small: 0.875rem;
  --fs-label: 0.7rem;

  --lh-tight: 0.94;
  --lh-snug: 1.12;
  --lh-body: 1.62;
  --tr-display: -0.035em;
  --tr-label: 0.26em;

  /* Espacement — échelle 4px */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 2.75rem;
  --s-8: 3.5rem;
  --s-9: 5rem;
  --s-10: 7rem;
  --s-11: 9.5rem;
  --s-12: 13rem;

  --pad-x: clamp(1.25rem, 0.6rem + 3vw, 4.5rem);
  /* Rythme vertical resserré : les sections doivent s'enchaîner, pas être
     séparées par des vides. */
  --pad-y: clamp(3rem, 1.9rem + 3.2vw, 5.5rem);
  --maxw: 88rem;
  --maxw-text: 46rem;

  /* Rayons — dérivés du cadre vertical */
  --r-frame: 0.9rem;
  --r-card: 1.15rem;
  --r-pill: 100rem;
  --r-xs: 0.35rem;

  /* Mouvement */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --d-fast: 0.25s;
  --d-mid: 0.4s;
  --d-slow: 0.8s;

  --header-h: 4.75rem;
  /* L'en-tête passe AU-DESSUS du panneau de menu : sans cela le bouton de
     fermeture se retrouve sous l'panneau et le menu ne peut plus être fermé. */
  --z-menu: 300;
  --z-nav: 320;
  --z-transition: 500;
  --z-preloader: 600;
}

/* Variante blanche — alterne avec le fond papier pour séparer les sections
   sans jamais recourir à une bordure marquée. */
.theme-light {
  --bg: #ffffff;
  --surface: var(--paper);
  --surface-2: var(--paper-2);
}

/* Sections cinématographiques.
   Toute zone au fond sombre doit redéfinir les jetons de texte, sinon elle
   hérite du texte foncé prévu pour le fond clair. */
.theme-dark,
.page-head,
.signal,
.footer,
.menu,
.preloader,
.cta-final {
  --bg: var(--surface-dark);
  --surface: var(--surface-dark-2);
  --surface-2: var(--surface-accent);
  --fg: #edefec;
  --fg-dim: rgba(237, 239, 236, 0.62);
  --fg-faint: rgba(237, 239, 236, 0.54);
  --line: rgba(237, 239, 236, 0.12);
  --line-strong: rgba(237, 239, 236, 0.22);
  --accent: var(--gold);
  --accent-2: var(--emerald-bright);
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
}
.theme-forest {
  --bg: var(--forest);
  --surface: #0e4735;
  --surface-2: #10513c;
  --fg: #eef3f0;
  --fg-dim: rgba(238, 243, 240, 0.66);
  --fg-faint: rgba(238, 243, 240, 0.56);
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --line: rgba(238, 243, 240, 0.16);
  --line-strong: rgba(238, 243, 240, 0.3);
}

/* --------------------------------------------------------------------------
   3. RESET
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
  overflow-x: clip;
}

body {
  background: var(--paper);
  color: #0a1811;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  min-height: 100svh;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
:where(h1, h2, h3, h4, h5, h6) { font-weight: 800; line-height: var(--lh-snug); text-wrap: balance; }
p { text-wrap: pretty; }
table { border-collapse: collapse; }
::selection { background: var(--emerald); color: #fff; }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: var(--s-4);
  z-index: 999;
  padding: 0.7rem 1.1rem;
  background: var(--gold);
  color: #10130c;
  font-weight: 700;
  border-radius: var(--r-pill);
  transform: translateY(-160%);
  transition: transform var(--d-mid) var(--ease-out);
}
.skip-link:focus-visible { transform: translateY(0); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.shell--narrow { max-width: 68rem; }

.section {
  position: relative;
  background: var(--bg);
  color: var(--fg);
  padding-block: var(--pad-y);
  isolation: isolate;
}
.section--flush-top { padding-block-start: 0; }
.section--tight { padding-block: clamp(3rem, 1.5rem + 4vw, 6rem); }

.grid { display: grid; gap: clamp(1.25rem, 0.6rem + 1.6vw, 2.5rem); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }

@media (max-width: 62rem) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 40rem) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-6); }

/* --------------------------------------------------------------------------
   5. TYPOGRAPHIE
   -------------------------------------------------------------------------- */
.display {
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-display);
  font-weight: 800;
}
.h1 { font-size: var(--fs-h1); letter-spacing: -0.03em; line-height: 1; }
.h2 { font-size: var(--fs-h2); letter-spacing: -0.028em; line-height: 1.04; }
.h3 { font-size: var(--fs-h3); letter-spacing: -0.018em; line-height: 1.18; }
.h4 { font-size: var(--fs-h4); letter-spacing: -0.012em; line-height: 1.3; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--fg-dim); font-weight: 400; }
.small { font-size: var(--fs-small); }
.dim { color: var(--fg-dim); }
.faint { color: var(--fg-faint); }
.measure { max-width: var(--maxw-text); }
.measure-sm { max-width: 34rem; }

.eyebrow {
  font-family: var(--font-label);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  line-height: 1;
}
.eyebrow::before {
  content: '';
  width: 1.6rem;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  flex: none;
}
.eyebrow--bare::before { display: none; }

.index-num {
  font-family: var(--font-label);
  font-size: var(--fs-label);
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 400;
}

.gold { color: var(--gold); }
.emerald { color: var(--emerald-bright); }

/* Découpe de texte pour révélation masquée (générée par JS) */
.sw {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
}
.sw__i { display: inline-block; will-change: transform; }
.sc { display: inline-block; }

/* --------------------------------------------------------------------------
   6. BOUTONS & LIENS
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--gold);
  --btn-fg: #14120a;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1rem 1.6rem;
  min-height: 3rem;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
  line-height: 1;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--d-mid) var(--ease-out), border-color var(--d-mid) var(--ease-out);
  will-change: transform;
}
.btn > span { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 0.6rem; }
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--emerald);
  transform: translate3d(0, 101%, 0);
  transition: transform 0.5s var(--ease-out);
}
.btn:hover::after, .btn:focus-visible::after { transform: translate3d(0, 0, 0); }
.btn:hover, .btn:focus-visible { color: #fff; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  border: 1px solid var(--line-strong);
}
.btn--ghost::after { background: var(--fg); }
.btn--ghost:hover, .btn--ghost:focus-visible { color: var(--bg); border-color: transparent; }

.btn--emerald { --btn-bg: var(--emerald); --btn-fg: #fff; }
.btn--emerald::after { background: var(--gold); }
.btn--emerald:hover, .btn--emerald:focus-visible { color: #14120a; }

.btn--sm { padding: 0.7rem 1.15rem; min-height: 2.5rem; font-size: 0.85rem; }
.btn--block { width: 100%; }

.btn .arw { transition: transform var(--d-mid) var(--ease-out); }
.btn:hover .arw { transform: translateX(0.25rem); }

/* Lien avec soulignement animé */
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding-block: 0.1em;
  font-weight: 600;
}
.link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(1);
  transition: transform 0.35s var(--ease-out);
}
.link:hover::after, .link:focus-visible::after {
  transform-origin: left;
  animation: link-wipe 0.55s var(--ease-out);
}
@keyframes link-wipe {
  0% { transform: scaleX(1); transform-origin: right; }
  49% { transform: scaleX(0); transform-origin: right; }
  50% { transform: scaleX(0); transform-origin: left; }
  100% { transform: scaleX(1); transform-origin: left; }
}
.link .arw { transition: transform var(--d-mid) var(--ease-out); }
.link:hover .arw { transform: translate(0.2rem, -0.2rem); }

/* Lien de navigation — décalage de texte masqué */
.nav-link {
  position: relative;
  display: inline-block;
  overflow: hidden;
  padding: 0.35rem 0;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  vertical-align: top;
}
.nav-link__inner { display: block; transition: transform 0.45s var(--ease-out); }
.nav-link__inner::after {
  content: attr(data-txt);
  display: block;
  color: var(--gold);
  position: absolute;
  left: 0;
  top: 100%;
  white-space: nowrap;
}
.nav-link:hover .nav-link__inner,
.nav-link:focus-visible .nav-link__inner { transform: translateY(-100%); }
.nav-link[aria-current='page'] { color: var(--gold); }

/* --------------------------------------------------------------------------
   7. HEADER / NAVIGATION
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-nav);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding-inline: var(--pad-x);
  padding-top: env(safe-area-inset-top);
  transition: transform 0.5s var(--ease-out), background-color 0.4s linear, border-color 0.4s linear;
  border-bottom: 1px solid transparent;
}
.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5, 16, 12, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.4s linear;
  pointer-events: none;
}
.header.is-solid::before { opacity: 1; }
.header.is-solid { border-bottom-color: var(--line); }
.header.is-hidden { transform: translateY(-105%); }

.header__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}

.brand { display: inline-flex; align-items: center; gap: 0.6rem; flex: none; }
.brand__mark { width: 1.85rem; height: auto; flex: none; }
.brand__type { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  color: #edefec;
}
.brand__sub {
  font-family: var(--font-label);
  font-size: 0.52rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.24rem;
  font-weight: 400;
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 0.3rem + 1.4vw, 2rem); color: #edefec; }
.nav__actions { display: flex; align-items: center; gap: var(--s-4); }

.lang {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-family: var(--font-label);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 0.3rem 0.15rem;
  color: #edefec;
}
.lang a, .lang span {
  padding: 0.22rem 0.6rem;
  border-radius: var(--r-pill);
  transition: color var(--d-fast) linear, background-color var(--d-fast) linear;
  line-height: 1;
}
.lang [aria-current='true'] { background: var(--gold); color: #14120a; font-weight: 500; }
.lang a:hover { color: var(--gold); }
.lang__sep { opacity: 0.3; padding: 0 !important; }

/* Burger */
.burger {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.3rem;
  flex: none;
  color: #edefec;
}
.burger span {
  display: block;
  width: 1.1rem;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.4s var(--ease-out), opacity 0.25s linear;
}
.burger.is-open span:nth-child(1) { transform: translateY(0.4rem) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-0.4rem) rotate(-45deg); }

@media (max-width: 60rem) {
  .nav--desktop { display: none; }
  .burger { display: inline-flex; }
  .nav__cta { display: none; }
}

/* Menu mobile
   ---------------------------------------------------------------------------
   L'ouverture et la fermeture reposent uniquement sur une classe posée sur
   <html> et sur cette transition CSS. Aucun lien du menu ne dépend de la fin
   d'une animation JavaScript pour être visible ou cliquable : une navigation
   ne doit jamais pouvoir se retrouver piégée si un script tarde ou échoue. */
.menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: var(--ink);
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + env(safe-area-inset-top) + 1.5rem) var(--pad-x) calc(2rem + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform: translate3d(0, -100%, 0);
  visibility: hidden;
  transition: transform 0.55s var(--ease-out), visibility 0s linear 0.55s;
}
html.menu-open .menu {
  transform: translate3d(0, 0, 0);
  visibility: visible;
  transition: transform 0.55s var(--ease-out), visibility 0s linear 0s;
}
/* Verrouillage du défilement de fond, en CSS pur. */
html.menu-open, html.menu-open body { overflow: hidden; }

/* L'en-tête reste au-dessus et lisible pendant l'ouverture. */
html.menu-open .header::before { opacity: 0; }
html.menu-open .header { border-bottom-color: transparent; }

.menu__list { display: flex; flex-direction: column; gap: 0.35rem; margin-top: auto; }
.menu__item { overflow: hidden; }
.menu__link {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  font-size: clamp(1.45rem, 1.05rem + 1.7vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #edefec;
  min-height: 2.75rem;
}
.menu__link:hover, .menu__link:focus-visible { color: var(--gold); }
.menu__num { font-family: var(--font-label); font-size: 0.68rem; letter-spacing: 0.2em; color: var(--gold); font-weight: 400; }
.menu__foot {
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4) var(--s-6);
  align-items: center;
  justify-content: space-between;
  color: var(--fg-dim);
  font-size: var(--fs-small);
}

/* --------------------------------------------------------------------------
   8. PRELOADER
   -------------------------------------------------------------------------- */
/* Sans JavaScript, le préchargeur ne doit jamais masquer la page. */
.preloader { display: none; }
html.js .preloader {
  position: fixed;
  inset: 0;
  z-index: var(--z-preloader);
  background: var(--ink);
  display: grid;
  place-items: center;
  color: #edefec;
}
.preloader__inner { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; width: min(20rem, 68vw); }
.preloader__mark { width: 4.5rem; height: auto; opacity: 0; }
.preloader__bar { width: 100%; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.preloader__fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
}
.preloader__meta {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-label);
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.preloader__pct { font-variant-numeric: tabular-nums; color: var(--gold); }
html.is-loading, html.is-loading body { overflow: hidden; }

/* --------------------------------------------------------------------------
   9. TRANSITION DE PAGE
   -------------------------------------------------------------------------- */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: var(--z-transition);
  pointer-events: none;
  display: grid;
  place-items: center;
  background: var(--forest);
  transform: translate3d(0, 100%, 0);
  visibility: hidden;
}
.page-transition__mark { width: 3.4rem; opacity: 0; }

/* --------------------------------------------------------------------------
   10. COMPOSANTS — CADRE VERTICAL (langage signature)
   -------------------------------------------------------------------------- */
.vframe {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--r-frame);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  isolation: isolate;
}
.vframe__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vframe__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 16, 12, 0.88) 0%, rgba(5, 16, 12, 0.15) 45%, rgba(5, 16, 12, 0) 70%);
}
.vframe__body { position: absolute; inset: auto 0 0 0; padding: 1rem; color: #edefec; }
.vframe__tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-family: var(--font-label);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: var(--r-pill);
  background: rgba(5, 16, 12, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(237, 239, 236, 0.16);
  color: #edefec;
}

/* Carte générique */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.4rem, 1rem + 1.2vw, 2.2rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: border-color var(--d-mid) var(--ease-out), transform var(--d-mid) var(--ease-out), box-shadow var(--d-mid) var(--ease-out);
  overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); }
.card__num { font-family: var(--font-label); font-size: var(--fs-label); letter-spacing: 0.2em; color: var(--accent); }
.card__title { font-size: var(--fs-h4); font-weight: 800; letter-spacing: -0.015em; }
.card__text { color: var(--fg-dim); font-size: 0.96rem; line-height: 1.55; }
.card--link:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.card__list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  color: var(--fg-dim);
  line-height: 1.2;
}
/* Les accents suivent le contexte : version soutenue sur fond clair,
   version lumineuse sur fond sombre. */
.chip--gold { border-color: var(--line-strong); color: var(--accent); }
.chip--emerald { border-color: var(--line-strong); color: var(--accent-2); }

/* Rangée d'accordéon / liste tabulaire */
.row-list { border-top: 1px solid var(--line); }
.row {
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  gap: var(--s-4);
  align-items: baseline;
  padding: clamp(1.1rem, 0.8rem + 0.9vw, 1.9rem) 0;
  transition: color var(--d-mid) var(--ease-out);
}
.row__num { font-family: var(--font-label); font-size: var(--fs-label); letter-spacing: 0.2em; color: var(--accent); }
.row__title { font-size: var(--fs-h3); font-weight: 800; letter-spacing: -0.02em; }
.row__text { color: var(--fg-dim); font-size: 0.96rem; margin-top: 0.5rem; max-width: 40rem; }
@media (max-width: 40rem) {
  .row { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .row > .row__aside { grid-column: 2; }
}

/* Statistique */
.stat { display: flex; flex-direction: column; gap: 0.35rem; }
.stat__value {
  font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat__label { font-size: 0.85rem; color: var(--fg-dim); }

/* Bandeau défilant */
.marquee {
  --mq-dur: 38s;
  position: relative;
  display: flex;
  overflow: hidden;
  gap: 0;
  -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;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3.5rem);
  padding-right: clamp(1.5rem, 3vw, 3.5rem);
  flex: none;
  animation: mq var(--mq-dur) linear infinite;
  will-change: transform;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes mq { to { transform: translate3d(-100%, 0, 0); } }
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-label);
  font-size: clamp(0.9rem, 0.8rem + 0.5vw, 1.15rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  white-space: nowrap;
}
.marquee__item::after {
  content: '';
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}

/* Filet décoratif */
.rule { height: 1px; background: var(--line); border: 0; }

/* --------------------------------------------------------------------------
   11. FORMULAIRES
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field__label {
  font-family: var(--font-label);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.field__label .req { color: var(--gold); }
.input, .select, .textarea {
  width: 100%;
  padding: 0.95rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  color: var(--fg);
  font-size: 0.98rem;
  transition: border-color var(--d-fast) linear, background-color var(--d-fast) linear;
  min-height: 3rem;
}
.textarea { min-height: 8.5rem; resize: vertical; line-height: 1.55; }
.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 1.15rem top 55%, right 0.8rem top 55%;
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}
.select option { background: var(--ink-2); color: #edefec; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold); }
.input::placeholder, .textarea::placeholder { color: var(--fg-faint); }
.input[aria-invalid='true'], .textarea[aria-invalid='true'], .select[aria-invalid='true'] { border-color: #e2604a; }
.field__error { font-size: 0.8rem; color: #f08a76; min-height: 1rem; }
.field__error:empty { min-height: 0; }

.checkline { display: flex; align-items: flex-start; gap: 0.7rem; font-size: 0.88rem; color: var(--fg-dim); }
.checkline input { width: 1.1rem; height: 1.1rem; margin-top: 0.2rem; accent-color: var(--emerald); flex: none; }

.form-status {
  padding: 1rem 1.15rem;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  font-size: 0.92rem;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status--ok { border-color: rgba(28, 193, 131, 0.5); color: var(--emerald-bright); background: rgba(28, 193, 131, 0.08); }
.form-status--err { border-color: rgba(226, 96, 74, 0.5); color: #f08a76; background: rgba(226, 96, 74, 0.08); }

/* --------------------------------------------------------------------------
   12. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  position: relative;
  background: var(--ink);
  color: #edefec;
  padding: var(--s-9) 0 calc(var(--s-6) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: var(--s-7) var(--s-6);
}
@media (max-width: 62rem) { .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .footer__top { grid-template-columns: minmax(0, 1fr); } }
.footer__col h3 {
  font-family: var(--font-label);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
  margin-bottom: var(--s-4);
}
.footer__col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__col a { color: rgba(237, 239, 236, 0.66); font-size: 0.93rem; transition: color var(--d-fast) linear; }
.footer__col a:hover { color: var(--gold); }
.footer__bottom {
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4) var(--s-6);
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--fg-faint);
}

/* --------------------------------------------------------------------------
   13. ÉTATS D'ANIMATION (JS)
   -------------------------------------------------------------------------- */
[data-anim] { will-change: transform, opacity; }
html.js [data-anim='fade-up'] { opacity: 0; transform: translate3d(0, 30px, 0); }
html.js [data-anim='fade'] { opacity: 0; }
html.js [data-anim='clip'] { clip-path: inset(0 0 100% 0); }
html.js [data-split] { opacity: 0; }
html.js .is-inview[data-anim] { will-change: auto; }

/* --------------------------------------------------------------------------
   14. MOUVEMENT RÉDUIT
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .marquee__track { animation: none; }
  html.js [data-anim], html.js [data-split] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}
