/* =================================================================
   ÉLYSÉE FORMATIONS — design system
   Prestige institutionnel : encre/bleu nuit + or antique, papier crème.
   Tout est piloté par des tokens pour reprise facile en code.
   ================================================================= */

:root {
  /* — Palette — */
  --paper:      #FAF6EE;   /* fond principal, papier crème */
  --paper-2:    #F2EBDD;   /* panneaux, alternance */
  --paper-3:    #ECE3D1;   /* encarts */
  --ink:        #16243F;   /* bleu nuit, titres */
  --ink-2:      #2E3A55;   /* texte courant */
  --muted:      #6B7080;   /* texte secondaire */
  --gold:       #A9844C;   /* or antique, accent */
  --gold-soft:  #C7A669;
  --gold-wash:  #EFE2C6;
  --bordeaux:   #80303D;   /* accent sérieux, rigueur */
  --bordeaux-2: #9C4A57;
  --bordeaux-wash: #F1DEE0;
  --rose:       #CE909A;   /* bordeaux clair sur fonds sombres */
  --blue:       #3C5A86;   /* bleu un peu clair, secondaire */
  --line:       #DCD2BF;   /* filets */
  --line-soft:  #E7DECD;
  --pencil:     #2A3040;   /* graphite des tracés */
  --white:      #FFFFFF;

  /* — Typo — */
  --font-display: "Cormorant Garamond", "Hoefler Text", Georgia, serif;
  --font-sans: "Mulish", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* — Mesures — */
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 2px;
  --shadow-soft: 0 24px 60px -32px rgba(22, 36, 63, .35);
  --shadow-card: 0 18px 44px -28px rgba(22, 36, 63, .30);

  /* — Animation — */
  --ease: cubic-bezier(.22, .68, .18, 1);
  --slow: 1.1s;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Grain de papier très subtil */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.06;
  margin: 0;
  letter-spacing: -0.005em;
}

p { margin: 0 0 1.1em; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* — Utilitaires de mise en page — */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

.section { padding-block: clamp(72px, 10vw, 132px); position: relative; }
.section--paper2 { background: var(--paper-2); }
.section--ink {
  background: var(--ink);
  color: #C9D0DE;
}
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--paper); }

/* — Eyebrow (sur-titre) — */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--bordeaux);
  display: inline-flex;
  align-items: center;
  gap: .7em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--bordeaux);
  display: inline-block;
}
.section--ink .eyebrow { color: var(--rose); }

/* — Titres de section — */
.display {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 600;
}
.h-section {
  font-size: clamp(2rem, 4vw, 3.3rem);
  font-weight: 600;
}
.lead {
  font-size: clamp(1.12rem, 1.6vw, 1.32rem);
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 60ch;
}
.section--ink .lead { color: #BFC7D6; }

.rule {
  height: 1px; width: 0;
  background: linear-gradient(90deg, var(--bordeaux), transparent);
  margin: 0;
  transition: width 1.2s var(--ease);
}

/* =========================== HEADER =========================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  height: 90px;
  transition: background .5s var(--ease), box-shadow .5s var(--ease), height .4s var(--ease);
}
.site-header.solid {
  background: rgba(250, 246, 238, .88);
  backdrop-filter: blur(12px) saturate(1.1);
  box-shadow: 0 1px 0 var(--line), 0 12px 30px -26px rgba(22,36,63,.5);
  height: 76px;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.brand { display: flex; align-items: center; gap: 13px; }
.brand__mark {
  width: 42px; height: 42px;
  flex: none;
  display: grid; place-items: center;
}
.brand__mark svg { width: 100%; height: 100%; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.72rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--ink);
  line-height: 1;
}
.brand__name b { color: var(--bordeaux); font-weight: 600; }
.brand__sub {
  display: block;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: .36em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); }
.nav a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .01em;
  position: relative;
  padding-block: 6px;
}
.nav a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1.5px; background: var(--bordeaux);
  transition: width .4s var(--ease);
}
.nav a:hover::after, .nav a.active::after { width: 100%; }
.nav a.active { color: var(--bordeaux); }

/* — Bouton — */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 13px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: transform .3s var(--ease), background .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: #0e1a30; transform: translateY(-2px); box-shadow: 0 14px 30px -16px rgba(22,36,63,.6); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn--gold:hover { background: #95713c; border-color: #95713c; }
.btn--bordeaux { background: var(--bordeaux); border-color: var(--bordeaux); color: #fff; }
.btn--bordeaux:hover { background: #6a2530; border-color: #6a2530; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--lg { padding: 16px 30px; font-size: 15px; }
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

.nav-toggle { display: none; }

/* =========================== HERO =========================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 96px;
  overflow: hidden;
}
.hero__sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 70% 12%, #FFFDF7 0%, var(--paper) 46%, var(--paper-2) 100%);
  z-index: 0;
}
.hero__facade {
  position: absolute;
  right: -2%;
  bottom: 0;
  width: min(72vw, 980px);
  z-index: 1;
  pointer-events: none;
}
.hero__facade svg { width: 100%; height: auto; display: block; }

.hero .wrap { position: relative; z-index: 3; width: 100%; }
.hero__inner { max-width: 640px; }
.hero h1 {
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: .98;
  margin: 22px 0 0;
  letter-spacing: -0.01em;
}
.hero h1 em {
  font-style: italic;
  color: var(--bordeaux);
  font-weight: 500;
}
.hero__lead {
  margin-top: 26px;
  font-size: clamp(1.1rem, 1.6vw, 1.34rem);
  color: var(--ink-2);
  max-width: 46ch;
}
.hero__cta { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, var(--paper) 0%, rgba(250,246,238,.82) 34%, rgba(250,246,238,.2) 56%, transparent 72%);
  pointer-events: none;
}

/* Bandeau d'agréments sous le hero */
.trust {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 4;
  border-top: 1px solid var(--line);
  background: rgba(250,246,238,.7);
  backdrop-filter: blur(6px);
}
.trust .wrap { display: flex; align-items: center; gap: clamp(18px,4vw,54px); flex-wrap: wrap; padding-block: 16px; }
.trust__label { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.trust__items { display: flex; gap: clamp(18px,3vw,42px); align-items: center; flex-wrap: wrap; }
.trust__item { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: .01em; }
.trust__item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bordeaux); flex: none; }

/* =========================== FAÇADE (auto-dessin) =========================== */
.hero__facade svg .stk {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1s var(--ease);
}
.hero__facade svg.drawn .stk { stroke-dashoffset: 0; }
.hero__facade svg .fl {
  opacity: 0;
  transition: opacity 1.3s var(--ease);
}
.hero__facade svg.colored .fl { opacity: 1; }
/* une fois en couleur, les traits crayon s'affinent en encre fine (gravure) */
.hero__facade svg .facade-stroke {
  transition: opacity 1.4s var(--ease);
}
.hero__facade svg.colored .facade-stroke { opacity: .72; }

/* =========================== REVEAL =========================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.reveal[data-delay="4"] { transition-delay: .4s; }

/* =========================== GRILLE / CARTES =========================== */
.section-head { max-width: 760px; }
.section-head .h-section { margin-top: 18px; }
.section-head .lead { margin-top: 20px; }

.grid { display: grid; gap: clamp(20px, 2.4vw, 32px); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Carte formation */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 30px 30px;
  position: relative;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute; left: 0; top: 0; height: 100%; width: 3px;
  background: var(--bordeaux);
  transform: scaleY(0); transform-origin: top;
  transition: transform .5s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); border-color: var(--bordeaux-2); }
.card:hover::after { transform: scaleY(1); }
.card__no {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--bordeaux);
  letter-spacing: .12em;
}
.card__icon { margin: 4px 0 20px; color: var(--ink); }
.card__icon svg { width: 40px; height: 40px; }
.card h3 { font-size: 1.7rem; margin-bottom: 12px; }
.card p { font-size: 15.5px; color: var(--ink-2); margin-bottom: 18px; }
.card__meta { display: flex; gap: 16px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 16px; }
.card__meta b { color: var(--ink); font-weight: 700; }
.card__link { font-weight: 700; font-size: 14px; color: var(--ink); display: inline-flex; align-items: center; gap: .5em; }
.card__link .arr { transition: transform .3s var(--ease); }
.card:hover .card__link .arr { transform: translateX(5px); }
.card__link { color: var(--bordeaux); }

/* Statistiques / réseau */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px,3vw,48px); }
.stat__num { font-family: var(--font-display); font-size: clamp(3rem, 5vw, 4.4rem); font-weight: 600; line-height: 1; color: var(--ink); }
.section--ink .stat__num { color: var(--paper); }
.stat__num .u { color: var(--bordeaux); }
.stat__label { font-size: 14px; color: var(--muted); margin-top: 10px; letter-spacing: .01em; }
.section--ink .stat__label { color: #97A0B3; }

/* Citation / fondateur */
.quote { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1.28; color: var(--ink); font-weight: 500; }
.section--ink .quote { color: var(--paper); }
.quote em { color: var(--bordeaux); font-style: italic; }

/* Placeholder image (élégant, rayé) */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg, var(--paper-3) 0 11px, var(--paper-2) 11px 22px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid; place-items: center;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  letter-spacing: .06em;
  text-align: center;
  min-height: 220px;
}
.ph span { background: var(--paper); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }

/* Pied de page */
.site-footer { background: var(--ink); color: #AEB6C6; padding-block: 72px 36px; }
.site-footer h4 { color: var(--paper); font-size: 1.1rem; margin-bottom: 16px; font-family: var(--font-sans); font-weight: 700; letter-spacing: .02em; }
.site-footer a:hover { color: var(--rose); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14.5px; }
.footer-brand .brand__name { color: var(--paper); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 54px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #828B9D; }

/* Bandeau CTA */
.cta-band { text-align: center; }
.cta-band .h-section { margin: 18px auto 0; max-width: 18ch; }
.cta-band .lead { margin: 22px auto 32px; }

/* Page header (pages internes) */
.page-hero { padding-top: 150px; padding-bottom: clamp(40px,6vw,76px); position: relative; }
.page-hero .display { font-size: clamp(2.6rem, 5.5vw, 4.6rem); margin-top: 16px; }
.page-hero .lead { margin-top: 22px; }

/* Liste process / approche */
.steps { display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 92px 1fr; gap: 28px; padding: 34px 0; border-top: 1px solid var(--line); align-items: start; }
.step:last-child { border-bottom: 1px solid var(--line); }
.step__no { font-family: var(--font-display); font-size: 2.6rem; color: var(--bordeaux); line-height: 1; }
.step h3 { font-size: 1.7rem; margin-bottom: 10px; }
.step p { color: var(--ink-2); margin: 0; max-width: 56ch; }

/* Formulaire */
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.field input, .field textarea, .field select {
  font-family: var(--font-sans); font-size: 16px; color: var(--ink);
  padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--bordeaux); box-shadow: 0 0 0 3px var(--bordeaux-wash);
}
.field--invalid input, .field--invalid textarea { border-color: #B4502E; }
.field__err { font-size: 12.5px; color: #B4502E; display: none; }
.field--invalid .field__err { display: block; }

/* =========================== RESPONSIVE =========================== */
@media (max-width: 980px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 34px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero__facade { width: 92vw; right: -8%; opacity: .9; }
  .hero__scrim { background: linear-gradient(180deg, var(--paper) 30%, rgba(250,246,238,.55) 70%, transparent); }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: fixed; inset: 66px 0 auto 0; background: var(--paper);
    padding: 24px var(--gutter) 32px; gap: 18px; box-shadow: var(--shadow-soft);
    border-bottom: 1px solid var(--line);
  }
  .nav-toggle {
    display: inline-flex; flex-direction: column; gap: 5px; background: none; border: none;
    cursor: pointer; padding: 8px;
  }
  .nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: .3s var(--ease); }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .step { grid-template-columns: 56px 1fr; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .header-cta { display: none; }
}

/* Réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
  .cloud, .dust-layer, .facade-sheen { display: none !important; }
}

/* =================================================================
   VIE PERMANENTE — le site ne s'arrête jamais de se faire.
   États statiques ici (fallback), boucles dans @media no-preference.
   ================================================================= */

/* — Lueur qui repasse sur la façade — */
.facade-sheen { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.facade-sheen::before {
  content: ""; position: absolute; top: -20%; left: -45%; width: 32%; height: 140%;
  background: linear-gradient(100deg, transparent, rgba(255,253,247,.5), transparent);
  transform: skewX(-14deg);
}

/* — Nuages — */
.cloud {
  position: absolute; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,255,255,.95), rgba(255,255,255,0));
  border-radius: 50%; filter: blur(3px); opacity: .65; will-change: transform;
}

/* — Poussière de graphite / particules d'or — */
.dust-layer { position: fixed; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.dust { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--gold); opacity: .22; will-change: transform, opacity; }

/* — Fil conducteur (épine dorsale du site) — */
.thread-svg { mix-blend-mode: normal; }
.thread-flow { opacity: 0; }
.thread-node { transform-box: fill-box; transform-origin: center; opacity: .55; }

/* — Underline croquis sous les titres — */
.sketch-ul { display: block; margin-top: 14px; overflow: visible; }
.sketch-ul path { stroke: var(--bordeaux); stroke-width: 2.2; fill: none; stroke-linecap: round; opacity: .7; }
.section--ink .sketch-ul path { stroke: var(--rose); }

/* — Réseau vivant — */
.net-svg { will-change: opacity; }
.net-edge { stroke: rgba(128,48,61,.5); stroke-width: 1; opacity: .2; }
.net-node { fill: var(--bordeaux-2); transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: no-preference) {
  /* Façade vivante */
  .hero__facade svg.alive .flag { transform-box: fill-box; transform-origin: left center; animation: flagWave 3.6s ease-in-out infinite; }
  .hero__facade svg.alive .flag:nth-of-type(2) { animation-delay: .12s; }
  .hero__facade svg.alive .flag:nth-of-type(3) { animation-delay: .24s; }
  .hero__facade svg.alive .win { animation: winGlow 7s ease-in-out infinite; }
  .hero__facade svg.alive .oculus { transform-box: fill-box; transform-origin: center; animation: oculusPulse 5s ease-in-out infinite; }
  .hero__facade svg.alive .foliage { transform-box: fill-box; transform-origin: bottom center; animation: sway 6.5s ease-in-out infinite; }
  .facade-sheen::before { animation: sheen 9s ease-in-out infinite; }
  .cloud { animation: cloudDrift linear infinite; }
  .dust { animation: dustFloat linear infinite; }
  .thread-flow { opacity: .95; stroke-dasharray: 2 13; animation: threadFlow 2.4s linear infinite; }
  .thread-node { animation: nodePulse 3.2s ease-in-out infinite; }
  .sketch-ul path { stroke-dasharray: 3 9; animation: threadFlow 3s linear infinite; }
  .net-edge { animation: edgePulse ease-in-out infinite; }
  .net-node { animation: nodePulse 3s ease-in-out infinite; }
  .rule { background: linear-gradient(90deg, var(--bordeaux), var(--bordeaux-2) 40%, transparent); background-size: 220% 100%; animation: ruleFlow 4.5s linear infinite; }
}

@keyframes flagWave { 0%,100% { transform: skewY(0) scaleY(1); } 30% { transform: skewY(-3deg) scaleY(.95); } 60% { transform: skewY(2.2deg) scaleY(1.04); } }
@keyframes winGlow { 0%,100% { fill: #6E7E97; } 50% { fill: #AC9162; } }
@keyframes oculusPulse { 0%,100% { opacity: .65; } 50% { opacity: 1; } }
@keyframes sway { 0%,100% { transform: rotate(0); } 50% { transform: rotate(1.6deg); } }
@keyframes sheen { 0% { left: -45%; } 55%,100% { left: 135%; } }
@keyframes cloudDrift { from { transform: translateX(-16vw); } to { transform: translateX(88vw); } }
@keyframes dustFloat { 0% { transform: translateY(14px); opacity: 0; } 12% { opacity: .3; } 88% { opacity: .24; } 100% { transform: translateY(-46px); opacity: 0; } }
@keyframes threadFlow { to { stroke-dashoffset: -60; } }
@keyframes nodePulse { 0%,100% { transform: scale(.7); opacity: .45; } 50% { transform: scale(1.3); opacity: 1; } }
@keyframes edgePulse { 0%,100% { opacity: .07; } 50% { opacity: .5; } }
@keyframes ruleFlow { to { background-position: -220% 0; } }

/* =================================================================
   PASSANTS — silhouettes qui marchent devant le palais
   ================================================================= */
.people-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.person { position: absolute; width: 26px; transform: scaleX(var(--sx,1)) scaleY(var(--sy,1)); transform-origin: bottom center; will-change: left, opacity; }
.person svg { width: 100%; height: auto; display: block; overflow: visible; }
.person .pstroke { stroke: var(--pencil); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.person .leg, .person .parm, .person .parm2 { transform-box: fill-box; transform-origin: top center; }
@media (prefers-reduced-motion: no-preference) {
  .person.walk .leg-l { animation: step .5s linear infinite; }
  .person.walk .leg-r { animation: step .5s linear infinite; animation-delay: -.25s; }
  .person.walk .parm { animation: step .5s linear infinite reverse; }
  .person.walk .parm2 { animation: step .5s linear infinite; }
}
@keyframes step { 0%,100% { transform: rotate(15deg); } 50% { transform: rotate(-15deg); } }

/* =================================================================
   SCÈNES DE PAGE — chaque onglet a son "élévation" qui se dessine,
   se colore, puis continue de vivre. (cf. scenes.js)
   ================================================================= */
.hero--page { min-height: 82svh; }
.hero--page .hero__inner { max-width: 600px; }
.hero--page h1 { font-size: clamp(2.6rem, 5.2vw, 4.4rem); margin-top: 18px; }
.hero--page .hero__lead { margin-top: 20px; }
.hero__scene { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: min(56vw, 700px); aspect-ratio: 800 / 560; z-index: 1; pointer-events: none; }
.hero__scene canvas { width: 100%; height: 100%; display: block; }
.hero__scene .scene-svg { width: 100%; height: auto; display: block; }

/* Accueil : hero en deux colonnes (texte | tableau de bord) */
.hero--split .hero__grid { display: grid; grid-template-columns: 1.04fr .96fr; gap: clamp(28px, 4vw, 72px); align-items: center; width: 100%; }
.hero--split .hero__inner h1 { font-size: clamp(2.5rem, 4.8vw, 4.5rem); }
.hero--split .hero__scene--panel { position: relative; right: auto; top: auto; transform: none; width: 100%; max-width: 600px; aspect-ratio: 5 / 4; z-index: 2; margin-left: auto; }
@media (max-width: 1024px) { .hero--split .hero__grid { grid-template-columns: 1fr; } .hero__scene--panel { display: none; } }
@media (max-width: 980px) { .hero__scene { width: 96vw; right: -8%; opacity: .8; } }
.hero__scene--bg { right: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(900px, 94vw); opacity: .16; z-index: 0; }

.scene-svg .stk { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s var(--ease); }
.scene-svg.drawn .stk { stroke-dashoffset: 0; }
.scene-svg .fl { opacity: 0; transition: opacity 1.3s var(--ease); }
.scene-svg.colored .fl { opacity: 1; }
.scene-svg .sc-stroke { transition: opacity 1.4s var(--ease); }
.scene-svg.colored .sc-stroke { opacity: .74; }

@media (prefers-reduced-motion: no-preference) {
  .scene-svg.alive .sun { transform-box: fill-box; transform-origin: center; animation: spin 70s linear infinite; }
  .scene-svg.alive .glow { transform-box: fill-box; transform-origin: center; animation: glowPulse 4s ease-in-out infinite; }
  .scene-svg.alive .flutter { transform-box: fill-box; transform-origin: left center; animation: flutter 3.4s ease-in-out infinite; }
  .scene-svg.alive .flutter2 { transform-box: fill-box; transform-origin: right center; animation: flutter 3.4s ease-in-out infinite reverse; }
  .scene-svg.alive .sway2 { transform-box: fill-box; transform-origin: bottom center; animation: sway 6.5s ease-in-out infinite; }
  .scene-svg.alive .pathflow { stroke-dasharray: 3 10; animation: threadFlow 2.6s linear infinite; }
  .scene-svg.alive .sc-edge { animation: edgePulse ease-in-out infinite; }
  .scene-svg.alive .sc-node { transform-box: fill-box; transform-origin: center; animation: nodePulse 3.2s ease-in-out infinite; }
  .scene-svg.alive .climber { animation: climb 8s ease-in-out infinite; }
  .scene-svg.alive .walkin { animation: walkin 9s ease-in-out infinite; }
  .scene-svg.alive .fall { animation: fall 6s linear infinite; }
  .scene-svg.alive .ring { transform-box: fill-box; transform-origin: center; animation: ringPulse 3.6s ease-out infinite; }
  .scene-svg.alive .gesture { transform-box: fill-box; transform-origin: top center; animation: gesture 4s ease-in-out infinite; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glowPulse { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes flutter { 0%,100% { transform: skewY(0) scaleX(1); } 50% { transform: skewY(-5deg) scaleX(.96); } }
@keyframes climb { 0% { transform: translate(-90px, 40px); opacity: 0; } 14% { opacity: 1; } 84% { opacity: 1; } 100% { transform: translate(48px, -96px); opacity: 0; } }
@keyframes walkin { 0% { transform: translate(-120px, 6px); opacity: 0; } 14% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(58px, -34px); opacity: 0; } }
@keyframes fall { 0% { transform: translateY(0) translateX(0); opacity: 0; } 12% { opacity: .7; } 100% { transform: translateY(130px) translateX(-26px); opacity: 0; } }
@keyframes gesture { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-12deg); } }
@keyframes ringPulse { 0% { transform: scale(.32); opacity: 0; } 22% { opacity: .55; } 100% { transform: scale(1.5); opacity: 0; } }

/* =================================================================
   BANDEAU CLIENTS + ÉTUDES DE CAS
   ================================================================= */
.clients { padding: 42px 0 10px; border-bottom: 1px solid var(--line); position: relative; z-index: 2; background: var(--paper); }
.clients__label { text-align: center; font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 0 0 26px; }
.logo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(26px, 5vw, 60px); }
.logo { font-family: var(--font-display); font-size: clamp(1.15rem, 2vw, 1.55rem); letter-spacing: .03em; color: var(--ink); opacity: .5; font-weight: 600; transition: opacity .3s var(--ease); white-space: nowrap; }
.logo b { color: var(--bordeaux); font-weight: 700; }
.logo:nth-child(3) { font-family: var(--font-sans); font-weight: 800; letter-spacing: -.01em; text-transform: lowercase; }
.logo:nth-child(5) { font-style: italic; }
.logo:hover { opacity: 1; }

.case { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; position: relative; transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease); }
.case:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); border-color: var(--bordeaux-2); }
.case__tag { display: inline-block; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; font-weight: 700; color: var(--bordeaux); background: var(--bordeaux-wash); padding: 5px 11px; border-radius: 999px; }
.case h3 { font-size: 1.5rem; margin: 16px 0 10px; }
.case p { font-size: 15px; color: var(--ink-2); margin-bottom: 18px; }
.case__stat { border-top: 1px solid var(--line-soft); padding-top: 14px; font-size: 14px; color: var(--muted); }
.case__stat b { font-family: var(--font-display); font-size: 1.55rem; color: var(--ink); font-weight: 600; margin-right: 6px; }

/* =================================================================
   MOTIFS DE SECTION — petite illustration qui se dessine puis se
   colore en boucle, dans chaque section. (cf. motifs.js)
   ================================================================= */
.motif { position: absolute; top: clamp(34px, 5vw, 72px); right: var(--gutter); width: clamp(102px, 11vw, 156px); z-index: 1; pointer-events: none; }
.motif svg { width: 100%; height: auto; overflow: visible; display: block; }
.motif .mstk { fill: none; stroke: var(--pencil); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.section--ink .motif .mstk { stroke: rgba(233, 224, 205, .72); }
.motif .mfl { opacity: 0; }
@media (max-width: 940px) { .motif { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .motif .mstk { stroke-dashoffset: 0 !important; }
  .motif .mfl { opacity: 1 !important; }
}

/* =================================================================
   VISUALISATIONS DE SECTION (canvas vivant) — cf. section-viz.js
   ================================================================= */
.sviz { position: absolute; top: clamp(40px, 5vw, 76px); right: var(--gutter); width: clamp(160px, 18vw, 248px); aspect-ratio: 1 / 1; z-index: 1; pointer-events: none; }
.sviz canvas { width: 100%; height: 100%; display: block; }
.cta-band .sviz { top: clamp(28px, 3vw, 44px); }
@media (max-width: 940px) { .sviz { display: none; } }

/* variante intégrée dans une colonne (sections en 2 colonnes) */
.sviz--wide { position: relative; top: auto; right: auto; width: 100%; max-width: 460px; aspect-ratio: 16 / 7; margin-top: 28px; z-index: 1; }
@media (max-width: 940px) { .sviz--wide { display: block; max-width: 100%; } }

/* variante qui remplit un cadre (placeholder carte) */
.sviz--fill { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; top: 0; right: 0; }

/* =================================================================
   AJOUTS CLOUD CODE — menu déroulant, grille 5 domaines, témoignages.
   Composants additionnels ; le système de design d'origine est inchangé.
   ================================================================= */

/* — Menu déroulant — */
.nav .has-sub { position: relative; display: inline-flex; align-items: center; }
.nav .has-sub > a { display: inline-flex; align-items: center; gap: 6px; }
.nav .caret { font-size: 10px; color: var(--muted); transition: transform .3s var(--ease); }
.nav .has-sub:hover .caret, .nav .has-sub:focus-within .caret { transform: rotate(180deg); color: var(--bordeaux); }
.nav .sub {
  position: absolute; top: 100%; left: -14px; min-width: 274px;
  background: rgba(250, 246, 238, .97); backdrop-filter: blur(12px) saturate(1.1);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft);
  padding: 10px; display: grid; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s; z-index: 60;
}
.nav .has-sub:hover .sub, .nav .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.nav .sub a { display: block; padding: 9px 12px; font-size: 14px; font-weight: 600; color: var(--ink); border-radius: var(--radius); }
.nav .sub a::after { display: none; }
.nav .sub a:hover { background: var(--paper-2); color: var(--bordeaux); }
.nav .sub__all { margin-top: 4px; border-top: 1px solid var(--line-soft); padding-top: 12px !important; color: var(--bordeaux) !important; }

/* — Grille 5 domaines (3 + 2) — */
.grid--5 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .grid--5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .grid--5 { grid-template-columns: 1fr; } }

/* — Témoignages — */
.tmoins { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.4vw, 30px); margin-top: 52px; }
.tmoin { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; display: flex; flex-direction: column; position: relative; transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease); }
.tmoin:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); border-color: var(--bordeaux-2); }
.tmoin__stars { color: var(--gold); letter-spacing: 3px; font-size: 13px; margin-bottom: 14px; }
.tmoin__quote { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.28rem; line-height: 1.42; color: var(--ink); margin: 0 0 18px; }
.tmoin__who { margin-top: auto; border-top: 1px solid var(--line-soft); padding-top: 14px; font-size: 13.5px; line-height: 1.4; }
.tmoin__name { font-weight: 800; color: var(--ink); }
.tmoin__role { color: var(--muted); }
@media (max-width: 980px) { .tmoins { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .tmoins { grid-template-columns: 1fr; } }

/* — Mobile : sous-menus en accordéon statique — */
@media (max-width: 720px) {
  .nav .has-sub { display: block; width: 100%; }
  .nav .sub {
    position: static; opacity: 1; visibility: visible; transform: none;
    background: none; border: none; box-shadow: none; backdrop-filter: none;
    padding: 4px 0 4px 14px; margin-top: 6px; border-left: 1px solid var(--line);
  }
  .nav .caret { display: none; }
}

/* — Pages de contenu / légales — */
.prose { font-size: 16.5px; color: var(--ink-2); max-width: 820px; }
.prose h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 44px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.2rem; margin: 26px 0 8px; font-family: var(--font-sans); font-weight: 700; color: var(--ink); letter-spacing: .01em; }
.prose p { margin: 0 0 1em; }
.prose ul { margin: 0 0 1.2em; padding-left: 1.1em; }
.prose li { margin-bottom: .5em; }
.prose a { color: var(--bordeaux); text-decoration: underline; text-underline-offset: 2px; }
.prose strong, .prose b { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--font-sans); font-weight: 700; color: var(--ink); }
.prose .meta-line { color: var(--muted); font-size: 14px; margin-bottom: 30px; }
.notice { background: var(--paper-2); border-left: 3px solid var(--gold); padding: 15px 18px; border-radius: var(--radius); font-size: 14.5px; margin: 0 0 26px; color: var(--ink-2); }

/* — Portrait du fondateur (photo réelle, ratio respecté, cadre passe-partout) — */
.portrait-mat { padding: 9px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.portrait-mat::after { content: ""; display: block; height: 2px; margin-top: 9px; background: linear-gradient(90deg, var(--gold), transparent 70%); }
.portrait { display: block; width: 100%; height: auto; border-radius: 1px; }

/* =================================================================
   MOBILE — finitions (rendu parfait sur petit écran)
   ================================================================= */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

@media (max-width: 720px) {
  /* Accueil : la barre « financements & agréments » passe SOUS le contenu
     (fin du chevauchement avec le 2ᵉ bouton du héros) */
  .hero { min-height: auto; padding-top: 116px; padding-bottom: 0; flex-direction: column; align-items: stretch; }
  .trust { position: static; margin-top: 26px; background: transparent; backdrop-filter: none; }
  .trust .wrap { padding-block: 16px 0; }
  .hero__cta { gap: 12px; }
  .hero__cta .btn { flex: 1 1 100%; justify-content: center; }
  /* Portrait du fondateur centré sur mobile */
  .portrait-mat { margin-inline: auto; }
}
@media (max-width: 560px) {
  /* Formulaire de contact : prénom / nom empilés */
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

/* =================================================================
   CORRECTIFS & ACCESSIBILITÉ
   ================================================================= */
/* Bouton CTA du menu : le texte héritait de .nav a (bleu nuit) et devenait
   illisible sur le bordeaux. On force le blanc et on retire le soulignement. */
.nav a.btn { color: #fff; }
.nav a.btn:hover { color: #fff; }
.nav a.btn::after { display: none; }

/* Lien d'évitement (navigation clavier) */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--ink); color: var(--paper); padding: 12px 18px; font-weight: 700; font-size: 14px; border-radius: 0 0 var(--radius) 0; }
.skip-link:focus { left: 0; }

/* Focus visible au clavier */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .nav-toggle:focus-visible { outline: 2px solid var(--bordeaux); outline-offset: 3px; border-radius: 2px; }

/* CTA flottant (mobile) — l'en-tête masque son CTA sous 720px */
.cta-float { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: none; align-items: center; gap: .5em; background: var(--bordeaux); color: #fff; font-family: var(--font-sans); font-weight: 700; font-size: 14.5px; letter-spacing: .02em; padding: 13px 20px; border-radius: 999px; box-shadow: 0 12px 28px -8px rgba(22, 36, 63, .55); transition: transform .25s var(--ease), background .25s var(--ease); }
.cta-float:hover { background: #6a2530; color: #fff; }
.cta-float:active { transform: scale(.97); }
@media (max-width: 720px) { .cta-float { display: inline-flex; } }
@media (prefers-reduced-motion: reduce) { .cta-float { transition: none; } }
