:root {
  --bg: #0d0b10;
  --ink: #f4eef0;
  --rose: #f4b6c9;
  --rose-deep: #e0738f;
  --bleu: #6ea8ff;
  --max: 1200px;
  --ease: cubic-bezier(.16,1,.3,1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
body.is-immersive { overflow: hidden; height: 100vh; }
/* Version "scroll" (scrub) : le scroll natif est actif et pilote la séquence. */
body.is-scrub { overflow-x: hidden; }
.scroller { height: 700vh; }            /* longueur de l'expérience scrubbée */

/* Panneaux de contenu de la version scrub */
.panels { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.panel {
  position: absolute;
  top: 50%; left: 0; right: 0;
  transform: translateY(calc(-50% + 30px));
  padding: 0 clamp(1.5rem, 8vw, 7rem);
  display: flex; flex-direction: column; gap: 1.2rem;
  opacity: 0;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.panel.is-visible { opacity: 1; transform: translateY(-50%); }
.panel.align-center { align-items: center; text-align: center; }
.panel.align-left  { align-items: flex-start; text-align: left; }
.panel.align-right { align-items: flex-end; text-align: right; }
.panel .rule { width: min(260px, 40vw); }
.panel.align-center .rule { background: linear-gradient(to right, transparent, var(--rose), transparent); }
.panel.align-right .rule { background: linear-gradient(to left, var(--rose), transparent); }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1rem, 4vw, 3rem);
  background: linear-gradient(to bottom, rgba(13,11,16,.7), transparent);
}
.nav__brand { font-weight: 700; font-size: 1.3rem; letter-spacing: -.01em; }
.nav__year { color: var(--rose-deep); margin-left: .15em; }
.nav__cta {
  padding: .55rem 1.3rem; border-radius: 999px;
  background: var(--rose-deep); color: #fff; text-decoration: none;
  font-size: .85rem; font-weight: 600;
}
.nav__right { display: flex; align-items: center; gap: 1rem; }
/* Switch entre les 2 modes de démo */
.switch {
  display: inline-flex; padding: 3px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
}
.switch__opt {
  padding: .4rem 1rem; border-radius: 999px; text-decoration: none;
  font-size: .8rem; font-weight: 600; color: rgba(244,238,240,.75);
  transition: background .25s ease, color .25s ease;
}
.switch__opt.is-active { background: var(--ink); color: #16121a; }
@media (max-width: 600px) { .nav__cta { display: none; } .switch__opt { padding: .35rem .8rem; } }

/* ---------- WIPE (transition entre paliers) ---------- */
.wipe {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg);
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}
.wipe.wipe--in  { animation: wipeIn .26s var(--ease) forwards; }   /* recouvre */
.wipe.wipe--out { animation: wipeOut .32s var(--ease) forwards; }  /* dévoile */
@keyframes wipeIn  { from { transform: scaleY(0); transform-origin: bottom; }
                     to   { transform: scaleY(1); transform-origin: bottom; } }
@keyframes wipeOut { from { transform: scaleY(1); transform-origin: top; }
                     to   { transform: scaleY(0); transform-origin: top; } }

/* ---------- STAGE ---------- */
.stage { position: fixed; inset: 0; z-index: 0; background: var(--bg); overflow: hidden; }
.stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 30%, transparent 40%, rgba(13,11,16,.55)),
    linear-gradient(to bottom, rgba(13,11,16,.4), rgba(13,11,16,.15) 45%, rgba(13,11,16,.7));
}
/* léger grain pour le côté "film" */
.stage__grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .05; z-index: 11;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- LABELS LATÉRAUX ---------- */
.edge { position: absolute; top: 50%; z-index: 20; pointer-events: none; }
.edge--left  { left: clamp(.6rem, 2vw, 1.4rem); }
.edge--right { right: clamp(.6rem, 2vw, 1.4rem); }
.edge__txt {
  display: block;
  writing-mode: vertical-rl;
  font-size: .68rem; letter-spacing: .35em; text-transform: uppercase;
  color: rgba(244,238,240,.55);
  transform: translateY(-50%);
}
.edge--left .edge__txt { transform: translateY(-50%) rotate(180deg); }
@media (max-width: 768px) { .edge { display: none; } }

/* ---------- PALIERS ---------- */
.steps { position: absolute; inset: 0; z-index: 10; }
.step {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: 0 clamp(1.5rem, 8vw, 7rem);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .5s ease, visibility .5s;
}
.step.is-active { opacity: 1; visibility: visible; pointer-events: auto; }

.step__content {
  width: 100%; max-width: var(--max); margin: 0 auto;
  display: flex; flex-direction: column; justify-content: center; gap: 1.3rem;
}
.align-center { align-items: center; text-align: center; }
.align-left   { align-items: flex-start; text-align: left; }
.align-right  { align-items: flex-end; text-align: right; }

/* ---------- TYPO ---------- */
.kicker { text-transform: uppercase; letter-spacing: .3em; font-size: .75rem; color: var(--rose); margin: 0; }
.display { font-size: clamp(2.8rem, 8.5vw, 6.5rem); font-weight: 700; line-height: .98; letter-spacing: -.025em; margin: 0; }
.heading { font-size: clamp(2.1rem, 5.5vw, 4.2rem); font-weight: 700; line-height: 1.04; margin: 0; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.35rem); max-width: 42ch; color: rgba(244,238,240,.92); margin: 0; }
.body { font-size: 1.1rem; max-width: 46ch; color: rgba(244,238,240,.9); margin: 0; }
.align-left .lead, .align-left .body { margin-right: auto; }
.align-right .lead, .align-right .body { margin-left: auto; }

/* ----- Révélation par masque (lignes de titre) ----- */
.line { display: block; overflow: hidden; }
.line__in {
  display: inline-block;
  text-shadow: 0 6px 40px rgba(0,0,0,.45);
}
/* Si la ligne n'a PAS été découpée en mots, c'est elle qui anime. */
.line__in[data-words] { transform: translateY(110%); transition: transform .5s var(--ease); }
.is-revealed .line__in[data-words] { transform: translateY(0); }

/* ----- Stagger par mot (injecté en JS, remplace data-words) ----- */
.word { display: inline-block; overflow: hidden; vertical-align: top; line-height: 1.05; }
.word__in {
  display: inline-block;
  transform: translateY(105%);
  transition: transform .5s var(--ease);
}
.is-revealed .word__in { transform: translateY(0); }

/* ----- Paliers "respiration" : un mot-clé en grand ----- */
.breath-word { margin: 0; }
.step--breath .line__in,
.step--breath .word__in { }
.breath-word .line__in {
  font-size: clamp(2.5rem, 9vw, 7rem);
  font-weight: 300;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: .96;
}

/* ----- Reveal génériques ----- */
[data-reveal] { opacity: 0; transition: opacity .5s var(--ease), transform .5s var(--ease); }
[data-reveal="fade"]    { transform: none; }
[data-reveal="fade-up"] { transform: translateY(22px); }
.is-revealed [data-reveal] { opacity: 1; transform: none; transition-delay: .15s; }

/* ----- Filet qui se trace ----- */
.rule {
  display: block; height: 1px; width: 0;
  background: linear-gradient(to right, var(--rose), transparent);
  transition: width .55s var(--ease) .15s;
}
.align-center .rule { background: linear-gradient(to right, transparent, var(--rose), transparent); }
.align-right .rule  { align-self: flex-end; background: linear-gradient(to left, var(--rose), transparent); }
.is-revealed .rule { width: min(260px, 40vw); }

/* ----- Piliers ----- */
.pillars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; max-width: 46ch; }
.pillars li { font-size: 1.15rem; border-top: 1px solid rgba(255,255,255,.15); padding-top: 1rem;
  opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.is-revealed .pillars li { opacity: 1; transform: none; }
.pillars strong { color: var(--rose-deep); margin-right: .6rem; font-variant-numeric: tabular-nums; }

/* ----- Citation ----- */
.quote { font-size: clamp(1.5rem, 3.6vw, 2.5rem); font-weight: 300; font-style: italic; max-width: 26ch; margin: 0; line-height: 1.3; }
.quote cite { display: block; font-size: 1rem; font-style: normal; opacity: .7; margin-top: 1.2rem; }

/* ----- Stats ----- */
.stats { display: flex; gap: clamp(1.5rem, 5vw, 4rem); margin-top: 2.5rem; }
.stat { display: flex; flex-direction: column;
  opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.is-revealed .stat { opacity: 1; transform: none; }
.stat__num { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; color: var(--rose); line-height: 1; font-variant-numeric: tabular-nums; }
.stat__lbl { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; opacity: .7; margin-top: .4rem; }

/* ----- Boutons ----- */
.actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }
.btn { display: inline-block; padding: .95rem 2.2rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .95rem; transition: transform .25s ease, background .25s ease; }
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--rose-deep); color: #fff; }
.btn--ghost { border: 1px solid rgba(255,255,255,.4); color: var(--ink); }
.btn--ghost:hover { background: rgba(255,255,255,.1); }

/* ---------- DOTS ---------- */
/* Beaucoup de paliers : on utilise de fins traits verticaux empilés. */
.dots { position: fixed; right: clamp(.8rem, 2.5vw, 1.6rem); top: 50%; transform: translateY(-50%);
  z-index: 25; display: flex; flex-direction: column; gap: 6px; }
.dot { width: 2px; height: 14px; border: 0; border-radius: 2px;
  background: rgba(255,255,255,.28); padding: 0; cursor: pointer; transition: all .35s var(--ease); }
.dot.is-active { background: var(--rose); height: 22px; }
@media (max-width: 768px) {
  .dots { right: 0; left: 0; top: auto; bottom: .8rem; transform: none;
    flex-direction: row; justify-content: center; }
  .dot { width: 14px; height: 2px; }
  .dot.is-active { width: 22px; height: 2px; }
}

/* ---------- SCROLL CUE ---------- */
.scroll-cue { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 25;
  display: inline-flex; flex-direction: column; align-items: center; gap: .4rem;
  font-size: .7rem; text-transform: uppercase; letter-spacing: .2em; opacity: .8; transition: opacity .5s ease; }
.scroll-cue.is-hidden { opacity: 0; pointer-events: none; }
.scroll-cue__arrow { animation: bob 1.6s ease-in-out infinite; font-size: 1.1rem; }
@keyframes bob { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(6px) } }

/* ---------- LOADER ---------- */
.stage__loader { position: absolute; inset: 0; z-index: 60;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  background: var(--bg); transition: opacity .5s ease; }
.stage__loader.is-hidden { opacity: 0; pointer-events: none; }
.loader-bar { width: min(280px, 60vw); height: 3px; background: rgba(255,255,255,.12); border-radius: 3px; overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 0%; background: var(--rose-deep); transition: width .15s linear; }
.loader-label { font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; color: rgba(255,255,255,.5); margin: 0; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .line__in, .word__in { transform: none; }
  [data-reveal], .pillars li, .stat { opacity: 1; transform: none; }
  .rule { width: min(260px, 40vw); }
  .scroll-cue__arrow { animation: none; }
  .wipe { display: none; }
}
