/* =====================================================================
   MAA DIGITAL — « Fait sur-mesure. » — Feuille de style
   Direction : CLAIR MINIMALISTE, vrai style apple.com.
   Fond blanc éclatant dominant, immenses titres sombres très lisibles,
   océan d'espace négatif, UN seul accent bleu encre sobre, rythme
   vertical lent et chic. Typo = pile SYSTÈME (SF Pro / Segoe UI / Roboto)
   = grotesque néo nette, self-hosted par nature, LCP instantané.
   100 % self-hosted, zéro CDN. transform/opacity uniquement pour l'anim.
   Mobile-first. Contrastes AA/AAA sur fond blanc.
   ===================================================================== */

/* =====================================================================
   0. DESIGN SYSTEM — palette claire, typo, rythme
   ===================================================================== */
:root {
  /* ---- Fond : blanc éclatant dominant + surfaces très claires ---- */
  --bg:            #FFFFFF;   /* fond principal, blanc pur */
  --bg-soft:       #F5F7FA;   /* sections alternées, gris-bleuté très clair */
  --surface:       #FFFFFF;   /* cartes */
  --surface-edge:  #E6EAF0;   /* bordure 1px des cartes, discrète */
  --hairline:      #EDF0F5;   /* séparateurs ultra-légers */

  /* ---- Encre : texte sombre très lisible (AA/AAA sur blanc) ---- */
  --ink:           #0B1220;   /* titres, texte fort   ~17:1  */
  --ink-2:         #2A3340;   /* corps de texte       ~11:1  */
  --ink-3:         #5B6572;   /* texte secondaire     ~5.3:1 (AA) */
  --ink-muted:     #7A8492;   /* labels/eyebrow       ~4.6:1 (AA limite) */

  /* ---- UN SEUL accent : bleu encre électrique sobre ---- */
  --accent:        #2B6CFF;   /* liens, CTA, détail 3D  ~4.9:1 (AA) */
  --accent-hover:  #1F58E0;   /* survol CTA, +contraste */
  --accent-soft:   #EAF0FF;   /* fond de puce/badge accent très clair */
  --accent-ink:    #163A8F;   /* accent EN TEXTE quand il faut AAA */

  /* ---- États & ombres (douces, façon Apple) ---- */
  --focus-color:   #2B6CFF;
  --shadow-soft:   0 12px 40px rgba(11,18,32,0.08), 0 2px 8px rgba(11,18,32,0.04);
  --shadow-card:   0 1px 2px rgba(11,18,32,0.05), 0 10px 30px rgba(11,18,32,0.06);
  --shadow-card-hover: 0 2px 4px rgba(11,18,32,0.06), 0 20px 50px rgba(11,18,32,0.10);

  /* ---- Rayons & rythme vertical ---- */
  --radius:        18px;      /* cartes */
  --radius-sm:     12px;
  --radius-lg:     26px;      /* grands blocs / mockup */
  --radius-pill:   999px;
  --maxw:          1120px;
  --measure:       60ch;
  --gutter:        clamp(20px, 5vw, 40px);
  --section-y:     clamp(88px, 12vw, 168px);  /* énorme espace vertical */

  /* ---- Typographie : pile SYSTÈME (SF Pro sur Apple) ---- */
  --font-sans: -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial,
               "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;

  /* ---- Échelle fluide (clamp) — TITRES ÉNORMES façon Apple ---- */
  --fs-hero:    clamp(2.8rem, 8vw, 5.5rem);     /* H1 hero */
  --fs-h2:      clamp(2rem, 5vw, 3.5rem);       /* titres de section */
  --fs-h3:      clamp(1.25rem, 2.4vw, 1.6rem);  /* titres de carte */
  --fs-lede:    clamp(1.15rem, 2vw, 1.45rem);   /* chapô sous-titre */
  --fs-body:    1.0625rem;                      /* 17px, corps */
  --fs-eyebrow: 0.8125rem;                      /* 13px, uppercase */

  /* ---- Header ---- */
  --header-h:   64px;

  /* ---- Courbes & durées ---- */
  --ease:       cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --dur:        0.6s;

  /* ---- Z-index ---- */
  --z-stage: 0; --z-content: 1; --z-header: 50; --z-progress: 60; --z-skip: 70;

  /* ---- Variables pilotées par le JS (défauts sûrs) ---- */
  --mx: 0.5; --my: 0.5; --bx: 50%; --by: 50%; --ink-mix: 0;

  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0.001s; }
}

/* =====================================================================
   1. RESET / BASE
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-tap-highlight-color: transparent;
  /* Coupe tout débordement horizontal sans casser position:sticky. */
  overflow-x: clip;
  background: var(--bg);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  overflow-x: hidden;
  min-height: 100vh;
}

img, picture, svg, canvas, video { display: block; max-width: 100%; }
img, svg { height: auto; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit; color: inherit; background: none; border: none; cursor: pointer;
}

ul, ol { list-style: none; padding: 0; }

::selection { background: var(--accent); color: #fff; }

/* Focus clavier NET, jamais supprimé */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
  border-radius: 6px;
}

p { color: var(--ink-2); }
p.small, .card p { color: var(--ink-3); }

/* =====================================================================
   2. TYPOGRAPHIE — titres façon Apple (weight 600, tracking serré)
   ===================================================================== */
h1, h2 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.06; color: var(--ink); }
h3     { font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; color: var(--ink); }

.section__title {
  font-size: var(--fs-h2);
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}

/* Chapô / lede : regular, encre-2, aéré */
.lede {
  font-size: var(--fs-lede);
  font-weight: 400;
  color: var(--ink-2);
  line-height: 1.5;
  max-width: var(--measure);
}

/* Eyebrow : petit, uppercase, discret mais AA */
.eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin: 0 0 clamp(12px, 2vw, 20px);
}

/* =====================================================================
   3. LAYOUT — wrap centré, respirations
   ===================================================================== */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--measure {
  max-width: calc(var(--measure) + 2 * var(--gutter));
}

/* Skip-link accessibilité */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: var(--z-skip);
  transform: translateY(-160%);
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* =====================================================================
   4. BARRE DE PROGRESSION DE LECTURE (scaleX piloté par main.js)
   ===================================================================== */
.reading-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: var(--z-progress);
  background: transparent;
  pointer-events: none;
}
.reading-progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: var(--accent);
  will-change: transform;
}

/* =====================================================================
   5. HEADER / NAV — blanc translucide, hairline au scroll
   ===================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s var(--ease),
              backdrop-filter 0.35s var(--ease),
              border-color 0.35s var(--ease),
              box-shadow 0.35s var(--ease);
}
.site-header.is-condensed,
.site-header.is-scrolled {
  background: rgba(255,255,255,0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--hairline);
  box-shadow: 0 1px 0 rgba(11,18,32,0.02);
}

.site-header__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-h);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: height 0.35s var(--ease);
}
.site-header.is-condensed .site-header__inner,
.site-header.is-scrolled .site-header__inner {
  height: 56px;
  min-height: 56px;
}

/* ---- Brand lock-up (symbole squircle encre + wordmark) ---- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-right: auto;
}
.brand__mark {
  border-radius: 9px;
  flex: 0 0 auto;
  transition: transform 0.4s var(--ease-out);
}
.brand:hover .brand__mark { transform: scale(1.04); }
.brand__text {
  white-space: nowrap;
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: -0.01em;
}
.brand__text b { font-weight: 600; color: var(--ink); }

/* Nav desktop */
.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}
.site-nav__list a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink-3);
  padding: 0.4rem 0.1rem;
  transition: color 0.25s var(--ease);
}
.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition: right 0.3s var(--ease);
}
.site-nav__list a:hover,
.site-nav__list a:focus-visible { color: var(--ink); }
.site-nav__list a:hover::after,
.site-nav__list a:focus-visible::after { right: 0; }

/* Bouton nav (Nous écrire) */
.btn--nav { padding: 0.55rem 1.1rem; font-size: 0.9rem; min-height: 40px; }

/* Burger mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--surface-edge);
  background: var(--surface);
}
.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Menu mobile déroulant */
.menu-mobile {
  display: none;
  border-top: 1px solid var(--hairline);
  /* Opaque : le menu ne doit JAMAIS laisser transparaître l'objet 3D derrière. */
  background: #FFFFFF;
  box-shadow: 0 20px 40px rgba(11,18,32,0.10);
}
.menu-mobile:not([hidden]) { display: block; }
.menu-mobile ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem var(--gutter) 1.5rem;
}
.menu-mobile a {
  display: block;
  padding: 0.9rem 0.75rem;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--ink);
  border-radius: var(--radius-sm);
  transition: background-color 0.2s var(--ease);
}
.menu-mobile a:hover,
.menu-mobile a:focus-visible { background: var(--bg-soft); }
.menu-mobile .btn--full { margin-top: 0.75rem; }

/* =====================================================================
   6. BOUTONS — pill façon Apple
   ===================================================================== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.3s var(--ease),
              box-shadow 0.3s var(--ease),
              background-color 0.25s var(--ease),
              color 0.25s var(--ease),
              border-color 0.25s var(--ease);
  will-change: transform;
}
.btn:active { transform: scale(0.98); transition: transform 0.1s var(--ease); }

/* CTA plein accent */
.btn--primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 6px 20px rgba(43,108,255,0.22);
  overflow: hidden;
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--accent-hover);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 10px 30px rgba(43,108,255,0.30);
}
.btn--primary:active { transform: scale(0.98); }
/* halo interne clair qui suit le curseur (data-magnetic / spotlight sobre) */
.btn--primary[data-magnetic]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(9rem 9rem at var(--bx, 50%) var(--by, 50%),
    rgba(255,255,255,0.28), rgba(255,255,255,0) 60%);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  pointer-events: none;
}
.btn--primary[data-magnetic]:hover::before { opacity: 1; }
.btn--primary > * { position: relative; z-index: 1; }

/* CTA lien fantôme (texte + soulignement au survol) */
.btn--ghost {
  color: var(--accent-ink);
  background: transparent;
  padding-inline: 0.25rem;
  min-height: 48px;
}
.btn--ghost::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}
.btn--ghost:hover,
.btn--ghost:focus-visible { color: var(--accent); }
.btn--ghost:hover::after { transform: translateX(3px); }

/* Bouton nav (contour discret) */
.btn--nav {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--surface-edge);
}
.btn--nav:hover,
.btn--nav:focus-visible {
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* Bouton pleine largeur (menu mobile) */
.btn--full {
  width: 100%;
  background: var(--accent);
  color: #fff;
}

/* Magnétisme (main.js met le transform inline ; défaut au repos) */
.btn[data-magnetic] { transform: translate(0, 0); }

/* CTA row */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
}
.cta-row--center { justify-content: center; }

/* =====================================================================
   7. COUCHE 3D UNIQUE (stage / canvas / fallback / halo) — fond CLAIR
   ===================================================================== */
.stage {
  position: fixed;
  inset: 0;
  z-index: var(--z-stage);
  pointer-events: none;
  overflow: hidden;
  /* Blanc éclatant + très léger voile d'accent. Le canvas WebGL est
     transparent et laisse transparaître ce blanc. */
  background:
    radial-gradient(120% 80% at 64% 42%, rgba(43,108,255,0.045), rgba(43,108,255,0) 55%),
    var(--bg);
}
.stage__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  /* L'objet 3D domine le hero (opacité pleine) puis s'efface au scroll pour
     rendre les sections calmes et très lisibles (piloté par main.js via
     --stage-canvas-opacity). Défaut = 1 pour le hero. */
  opacity: var(--stage-canvas-opacity, 1);
  transition: opacity 0.45s var(--ease);
  will-change: opacity;
}

/* Fallback image (affiché par défaut ; masqué quand data-webgl="on") */
.stage__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
@media (min-width: 768px) {
  .stage__fallback { justify-items: end; padding-right: max(4vw, 24px); }
}
.stage__fallback img {
  width: min(72vmin, 680px);
  height: auto;
  object-fit: contain;
  opacity: 1;
  filter: drop-shadow(0 24px 60px rgba(11,18,32,0.10));
}
.stage[data-webgl="on"] .stage__fallback { opacity: 0; visibility: hidden; }

/* Halo radial clair très discret */
.stage__halo {
  position: absolute;
  left: 64%;
  top: 44%;
  width: min(110vmin, 100vw, 1000px);
  height: min(110vmin, 1000px);
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(43,108,255,0.05), rgba(43,108,255,0) 70%);
  filter: blur(12px);
  opacity: 0.9;
}
@media (max-width: 767px) {
  .stage__halo { left: 50%; top: 38%; }
}

/* =====================================================================
   8. SECTIONS — rythme général, énorme respiration
   ===================================================================== */
main { position: relative; z-index: var(--z-content); }

.section {
  position: relative;
  padding-block: var(--section-y);
  display: flex;
  align-items: center;
}
.section > .wrap { width: 100%; }

/* Fonds : blanc par défaut. Les sections claires (nacre) passent en gris très clair. */
.section { background: transparent; }

/* Têtes de section centrées */
.section__head { margin-bottom: clamp(2.75rem, 5.5vw, 4.5rem); }
.section__head--center {
  text-align: center;
  max-width: 48rem;
  margin-inline: auto;
}
.section__head--center .eyebrow { margin-inline: auto; display: block; }
.section__head--center .section__chapo,
.section__head--center .lede { margin-inline: auto; }
.section__chapo { margin-top: 1.35rem; }

/* =====================================================================
   9. THÈME ALTERNÉ CLAIR (section marquée data-theme="nacre" -> gris très clair)
   ===================================================================== */
.section--nacre,
.section[data-theme="nacre"] {
  background: var(--bg-soft);
  color: var(--ink-2);
}
/* liseré accent en haut de la section alternée (scaleX via --ink-mix, JS) */
.section--nacre::before,
.section[data-theme="nacre"]::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0.55;
  transform: scaleX(var(--ink-mix, 0));
  transform-origin: center;
}
.section--nacre .eyebrow,
.section[data-theme="nacre"] .eyebrow { color: var(--ink-3); }
.section--nacre .section__title,
.section[data-theme="nacre"] .section__title { color: var(--ink); }
.section--nacre .lede,
.section[data-theme="nacre"] .lede { color: var(--ink-2); }

/* Réalisation (Coquille) : autre section alternée claire */
.coquille { background: var(--bg-soft); }

/* =====================================================================
   10. HERO
   ===================================================================== */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + clamp(2rem, 8vh, 6rem));
  text-align: left;
}
.hero__wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 46rem;
}
.hero .eyebrow { margin-bottom: 1.25rem; color: var(--ink-3); }

.hero__title {
  font-size: var(--fs-hero);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.04;
  color: var(--ink);
  margin-bottom: 1.6rem;
  text-wrap: balance;
}
.hero__title .line { display: block; }

.hero__lede {
  font-size: var(--fs-lede);
  color: var(--ink-2);
  max-width: 40ch;
  margin-bottom: 2.5rem;
}
.hero__cta { margin-top: 0.5rem; }

/* Indice de scroll discret */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(1.5rem, 4vh, 3rem);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink-muted);
}
.scroll-hint__label {
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.scroll-hint__line {
  width: 1px;
  height: 38px;
  background: linear-gradient(180deg, var(--ink-3), transparent);
  transform-origin: top center;
  animation: scroll-drift 2.4s var(--ease) infinite;
}
@keyframes scroll-drift {
  0%   { transform: translateY(-6px); opacity: 0.15; }
  50%  { opacity: 0.7; }
  100% { transform: translateY(6px); opacity: 0.15; }
}

/* =====================================================================
   11. LAYOUT SPLIT (colonne sticky + flux) — sections 2 & 5
   ===================================================================== */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.split__sticky { position: relative; }
.split__flow { position: relative; }

/* =====================================================================
   12. SECTION 2 — SAVOIR-FAIRE (piliers)
   ===================================================================== */
.piliers {
  display: flex;
  flex-direction: column;
  gap: clamp(1.1rem, 2.2vw, 1.6rem);
}

/* =====================================================================
   13. CARTES CLAIRES (piliers & secteurs) + tilt subtil
   ===================================================================== */
.card {
  position: relative;
  border-radius: var(--radius);
  padding: clamp(1.6rem, 2.6vw, 2.4rem);
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  isolation: isolate;
}
/* Neutralise l'ancien style « glass » sombre : la classe .glass reste
   sur le markup mais on la ramène au style clair. */
.card.glass {
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* Tilt 3D — amplitude très réduite (±4°), lévitation douce (main.js met
   le transform inline en :hover ; défaut au repos). */
.card[data-tilt] {
  transform: perspective(1000px)
    rotateY(calc((var(--mx, 0.5) - 0.5) * 8deg))
    rotateX(calc((0.5 - var(--my, 0.5)) * 8deg));
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease),
              box-shadow 0.5s var(--ease),
              border-color 0.4s var(--ease);
  will-change: transform;
}
.card[data-tilt]:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
}

/* Pilier — icône linéaire fine + typo */
.pilier__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1.1rem;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
}
.pilier__title {
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin-bottom: 0.7rem;
  color: var(--ink);
}
.pilier__text {
  color: var(--ink-3);
  max-width: 46ch;
}

/* =====================================================================
   14. SECTION 3 — SECTEURS (grille de cartes claires)
   ===================================================================== */
.secteurs__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2vw, 1.35rem);
  margin-top: clamp(2rem, 4vw, 3.5rem);
}
.secteur {
  min-height: 8rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.4rem;
}
.secteur__label {
  font-weight: 600;
  font-size: var(--fs-h3);
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.secteur__note {
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--ink-3);
}
/* Carte « ouverte » — accent discret */
.secteur--open {
  background: var(--accent-soft);
  border-color: rgba(43,108,255,0.28);
  border-style: dashed;
}
.secteur--open .secteur__label { color: var(--accent-ink); }

/* =====================================================================
   15. SECTION 4 — DÉMARCHE (étapes + trait qui se dessine)
   ===================================================================== */
.demarche .wrap--measure { position: relative; }

.etapes {
  position: relative;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-left: clamp(3rem, 8vw, 5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 7vw, 6rem);
}
.etapes__trace {
  position: absolute;
  left: clamp(1rem, 3vw, 1.6rem);
  top: 0.5rem;
  width: 2px;
  height: calc(100% - 1rem);
  overflow: visible;
}
.etapes__trace-base {
  stroke: var(--hairline);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.etapes__trace-draw {
  stroke: var(--accent);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  transition: stroke-dashoffset 0.15s linear;
}

.etape {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}
.etape__num {
  position: absolute;
  left: calc(-1 * clamp(3rem, 8vw, 5rem));
  top: -0.1em;
  width: clamp(2.2rem, 6vw, 3.2rem);
  text-align: center;
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  color: var(--ink-3);
  letter-spacing: -0.02em;
  line-height: 1;
  transition: color 0.5s var(--ease), transform 0.5s var(--ease);
}
.etape__body { grid-column: 1 / -1; }
.etape__title {
  font-weight: 600;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.etape__text {
  color: var(--ink-3);
  max-width: var(--measure);
}
.etape.is-active .etape__num {
  color: var(--accent);
  transform: scale(1.06);
}
.etape.is-active .etape__title { color: var(--ink); }

/* =====================================================================
   16. SECTION 5 — RÉALISATION / LA COQUILLE (split inversé + mockup chat)
   ===================================================================== */
.split--reverse .coquille__intro { order: 1; }
.split--reverse .coquille__mockup-col { order: 2; }

.coquille__lede { margin-top: 1.5rem; }
.coquille__points {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 2rem;
}
.coquille__points li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--ink-2);
  max-width: 46ch;
}
.coquille__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 3px;
  background: var(--accent);
  transform: rotate(45deg);
}
.coquille__note {
  margin-top: 2rem;
  font-size: 0.94rem;
  color: var(--ink-3);
  font-style: italic;
  max-width: 46ch;
}

/* Mockup conversation — carte claire, propre */
.chat {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  box-shadow: var(--shadow-soft);
  max-width: 30rem;
  margin-inline: auto;
}
.chat__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.5rem 1rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 1rem;
}
.chat__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--ink);
  box-shadow: 0 4px 12px rgba(11,18,32,0.12);
}
.chat__avatar svg { width: 100%; height: 100%; }
.chat__meta { display: flex; flex-direction: column; }
.chat__name { font-weight: 600; color: var(--ink); }
.chat__status { font-size: 0.78rem; color: var(--ink-3); }

.chat__thread {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

/* Bulles — état initial invisible, révélées au scroll par le JS (.is-in) */
.bubble {
  --b-in: 0;
  max-width: 84%;
  padding: 0.7rem 1rem;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.45;
  opacity: var(--b-in);
  transform: translateY(calc((1 - var(--b-in)) * 12px)) scale(calc(0.96 + var(--b-in) * 0.04));
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease-out);
  will-change: transform, opacity;
}
.bubble.is-in { --b-in: 1; }
/* Bulle sortante (utilisateur) — droite, accent bleu */
.bubble--out {
  align-self: flex-end;
  transform-origin: bottom right;
  color: #fff;
  background: var(--accent);
  border-bottom-right-radius: 5px;
}
/* Bulle entrante (assistant) — gauche, gris très clair */
.bubble--in {
  align-self: flex-start;
  transform-origin: bottom left;
  color: var(--ink-2);
  background: var(--bg-soft);
  border: 1px solid var(--surface-edge);
  border-bottom-left-radius: 5px;
}

/* =====================================================================
   17. SECTION 6 — PRINCIPES / IA (fond alterné clair, centré)
   ===================================================================== */
.ia { text-align: center; }
.ia__lede { margin-inline: auto; }

.ia__waouh {
  font-weight: 600;
  font-size: clamp(1.7rem, 4.5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 20ch;
  margin: clamp(3rem, 7vw, 5rem) auto;
  text-wrap: balance;
}
.ia__waouh::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  margin: 1.4rem auto 0;
  border-radius: 3px;
  background: var(--accent);
}

.ia__connecteurs { margin-top: clamp(2rem, 5vw, 4rem); }
.ia__connecteurs-title {
  color: var(--ink-3);
  margin-bottom: 1.5rem;
}

/* Pastilles connecteurs — claires, sobres (main.js met le transform inline) */
.pastilles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 46rem;
  margin-inline: auto;
}
.pastille {
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--surface-edge);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s var(--ease),
              box-shadow 0.3s var(--ease),
              border-color 0.3s var(--ease),
              color 0.25s var(--ease);
  will-change: transform;
}
.pastille:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-card-hover);
}
.ia__closing {
  margin-top: 1.75rem;
  color: var(--ink-3);
  font-style: italic;
}

/* =====================================================================
   18. SECTION 7 — CONTACT
   ===================================================================== */
.contact { text-align: center; }
.contact__wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact .eyebrow { margin-inline: auto; }
.contact__lede { margin: 1.25rem auto 0; }

/* Email en très grand, encre, soulignement accent au survol.
   [data-glow] : léger halo interne d'accent qui suit le curseur (--bx/--by). */
.contact__mail {
  position: relative;
  display: inline-block;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  font-size: clamp(1.7rem, 6vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  word-break: break-word;
  transition: color 0.3s var(--ease);
}
.contact__mail::before {
  content: "";
  position: absolute;
  inset: -0.3em -0.6em;
  z-index: -1;
  border-radius: 20px;
  background: radial-gradient(12rem 9rem at var(--bx, 50%) var(--by, 50%),
    rgba(43,108,255,0.12), rgba(43,108,255,0) 65%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
.contact__mail:hover { color: var(--accent-ink); }
.contact__mail:hover::before { opacity: 1; }
.contact__mail::after {
  content: "";
  position: absolute;
  left: 0; bottom: -0.12em;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}
.contact__mail:hover::after,
.contact__mail:focus-visible::after { transform: scaleX(1); }

.contact .cta-row { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

/* =====================================================================
   19. FOOTER — clair, minimal
   ===================================================================== */
.site-footer {
  position: relative;
  z-index: var(--z-content);
  background: var(--bg-soft);
  border-top: 1px solid var(--hairline);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-start;
  text-align: left;
}
.site-footer .brand { margin-right: 0; margin-bottom: 0.5rem; }
/* Neutralise le dégradé de l'ancien wordmark : encre pleine, lisible. */
.site-footer__brand .brand__text b { color: var(--ink); }
.site-footer__baseline {
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
}
.site-footer__note,
.site-footer__legal { color: var(--ink-3); font-size: 0.92rem; }
.site-footer__mail a {
  color: var(--accent-ink);
  font-weight: 600;
  transition: color 0.25s var(--ease);
}
.site-footer__mail a:hover,
.site-footer__mail a:focus-visible { color: var(--accent); }
.site-footer__top {
  margin-top: 1rem;
  color: var(--ink-3);
  font-size: 0.92rem;
  transition: color 0.25s var(--ease);
}
.site-footer__top:hover,
.site-footer__top:focus-visible { color: var(--ink); }

/* =====================================================================
   20. REVEALS AU SCROLL — fondu + translation douce (transform/opacity)
   État initial [data-reveal] ; .is-visible / .is-revealed = état final.
   ===================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-revealed,
[data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
/* Stagger doux */
[data-reveal-delay="1"] { --reveal-delay: 80ms; }
[data-reveal-delay="2"] { --reveal-delay: 150ms; }
[data-reveal-delay="3"] { --reveal-delay: 230ms; }
[data-reveal-delay="4"] { --reveal-delay: 310ms; }
[data-reveal-delay="5"] { --reveal-delay: 400ms; }
[data-reveal-delay="6"] { --reveal-delay: 490ms; }
[data-reveal-delay="7"] { --reveal-delay: 590ms; }

/* Fallback anti-FOUC : si le JS ne tourne pas, contenu visible */
html:not(.js) [data-reveal] {
  opacity: 1;
  transform: none;
}

/* =====================================================================
   21. RESPONSIVE — mobile-first
   ===================================================================== */

/* --- ≥ 720px : grilles 2 colonnes --- */
@media (min-width: 720px) {
  .secteurs__grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- ≥ 860px : layout desktop (nav complète, split 2 col) --- */
@media (min-width: 860px) {
  .nav-toggle { display: none !important; }
  .menu-mobile { display: none !important; }

  .split { grid-template-columns: 0.9fr 1.1fr; }
  .split__sticky {
    position: sticky;
    top: calc(var(--header-h) + clamp(2rem, 8vh, 5rem));
    align-self: start;
  }
  .split--reverse { grid-template-columns: 1.1fr 0.9fr; }
  .split--reverse .coquille__intro { order: 2; }
  .split--reverse .coquille__mockup-col { order: 1; }
}

/* --- < 860px : header mode mobile (burger visible, nav cachée) --- */
@media (max-width: 859.98px) {
  .site-nav { display: none; }
  .btn--nav { display: none; }
  .nav-toggle { display: flex; }
  .chat { position: relative; top: auto; }
}

/* --- ≥ 1024px : secteurs 3 colonnes --- */
@media (min-width: 1024px) {
  .secteurs__grid { grid-template-columns: repeat(3, 1fr); }
  .piliers { gap: 1.6rem; }
}

/* --- < 640px : simplification --- */
@media (max-width: 639.98px) {
  :root {
    --section-y: clamp(64px, 14vw, 96px);
    --gutter: 20px;
  }
  .hero { padding-top: calc(var(--header-h) + 2.5rem); }

  /* Anti-zoom iOS : corps ≥ 16px */
  body { font-size: max(16px, var(--fs-body)); }

  .stage__fallback img { width: min(80vmin, 440px); }
  .stage__halo { top: 26%; }

  /* CTA pleine largeur au pouce */
  .hero__cta .btn--primary,
  .cta-row--center .btn--primary { width: 100%; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row--center { align-items: center; }
  .cta-row--center .btn--primary { max-width: 22rem; }
  .btn--ghost { justify-content: center; }

  .etapes { padding-left: 2.5rem; }
  .etape__num { left: -2.5rem; }

  .bubble { max-width: 92%; }
  .menu-mobile a { padding-block: 1rem; }
}

/* --- Très petits écrans : marque compacte --- */
@media (max-width: 380px) {
  .brand__text { font-size: 1rem; }
}

/* =====================================================================
   22. SUPPORT TACTILE — désactive tilt / magnétisme / spotlight
   ===================================================================== */
@media (hover: none), (pointer: coarse) {
  .card[data-tilt] { transform: none !important; }
  .btn[data-magnetic] { transform: none !important; }
  .btn--primary[data-magnetic]::before { display: none; }
  .contact__mail::before { display: none; }
}

/* =====================================================================
   23. PREFERS-REDUCED-MOTION — coupe les grosses animations
   Le contenu reste dans son état FINAL, lisible.
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  /* Reveals : état final immédiat */
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Coupe tilt / magnétisme / oscillations */
  .card[data-tilt] { transform: none !important; }
  .btn[data-magnetic] { transform: none !important; }
  .btn--primary[data-magnetic]::before { display: none !important; }
  .pastille { transform: none !important; }
  .contact__mail::before { display: none !important; }

  /* Header : hairline figée */
  .site-header { transition: none !important; }

  /* Section alternée : liseré figé (état final) */
  .section--nacre::before,
  .section[data-theme="nacre"]::before { transition: none !important; }

  /* Bulles chat : toutes visibles */
  .bubble { opacity: 1 !important; transform: none !important; }

  /* Indice de scroll figé */
  .scroll-hint__line { animation: none !important; opacity: 0.4; transform: none !important; }
  .stage__fallback img { animation: none !important; transform: none !important; }

  /* Trait de la démarche : entièrement tracé (état final) */
  .etapes__trace-draw { stroke-dashoffset: 0 !important; transition: none !important; }

  .reading-progress__bar { transition: none !important; }
}

/* =====================================================================
   24. PRINT — sobriété
   ===================================================================== */
@media print {
  .stage, .reading-progress, .scroll-hint, .nav-toggle, .menu-mobile { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 2rem; }
}
