/* =========================================================
   Léo — présentation
   Tokens, socle, puis styles par slide (.sN-)
   ========================================================= */

:root {
  color-scheme: dark;
  --bg: #000000;                       /* noir pur */
  --surface: #111111;                  /* cartes et blocs : jamais de carte noire sur fond noir */
  --surface-2: #111111;                /* bloc dans une carte : même gris, filet pour le distinguer */
  --ink: #F3F1EA;                      /* texte courant : blanc légèrement cassé, pas blanc pur */
  --ink-2: #A9ADB5;                    /* texte secondaire : gris moyen clair */
  --ink-3: #8A8F98;                    /* notes, compteur (5,7:1 sur noir) */
  --line: rgb(255 255 255 / .10);      /* filet fin : blanc à 10 % */
  --line-strong: rgb(255 255 255 / .30);
  --shadow: none;                      /* pas d'ombre sur fond noir, le filet suffit */
  --accent: #00F0FF;                   /* cyan : KPI, chiffres, traits, barres, anneaux, numéros de slide, états actifs */

  --font-title: 'Bricolage Grotesque', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'DM Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* mouvement : départ vif, long atterrissage (expo-out) ; ressort pour les objets qui se posent */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out-back: cubic-bezier(.34, 1.56, .64, 1);
  --ease-draw: cubic-bezier(.45, .12, .30, 1);   /* trace de trait : on voit la ligne avancer */
  --dur: 700ms;
  --dur-pop: 500ms;
  --dur-state: 450ms;
  --rise: 26px;

  --stage-w: 1600px;
  --stage-h: 900px;
  --pad-x: 112px;
  --pad-y: 84px;
  --radius: 18px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  overscroll-behavior: none;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, form { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- deck & stage ---------- */
.deck {
  position: fixed;
  inset: 0;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--stage-w);
  height: var(--stage-h);
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center;
  will-change: transform;
}

/* ---------- slides ---------- */
/* changement de slide : la sortante glisse et s'efface en 450 ms,
   l'entrante arrive de 56 px avec une légère prise d'échelle en 750 ms */
.slide {
  position: absolute;
  inset: 0;
  padding: var(--pad-y) var(--pad-x);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  translate: 56px 0;
  scale: .985;
  transition: opacity 450ms var(--ease), translate 450ms var(--ease), scale 450ms var(--ease), visibility 0s linear 450ms;
}
.deck.dir-back .slide { translate: -56px 0; }
.slide.is-active {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
  scale: 1;
  transition: opacity 750ms var(--ease) 60ms, translate 750ms var(--ease) 60ms, scale 750ms var(--ease) 60ms, visibility 0s linear 0s;
}
.slide.is-leaving { translate: -40px 0; scale: .985; }
.deck.dir-back .slide.is-leaving { translate: 40px 0; }

.slide-head { flex: 0 0 auto; }
.kicker {
  display: block;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: 14px;
}
.title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 64px;
  line-height: 1.02;
  letter-spacing: -.02em;
  max-width: 100%;   /* même marge à droite qu'à gauche, le titre passe à la ligne si besoin */
  padding-right: 0;
}

.placeholder { margin: auto 0; }
.placeholder p { margin-top: 18px; color: var(--ink-3); }

/* ---------- reveal générique ----------
   [data-reveal="k"] apparaît à l'étape k (classes is-k sur la slide, .revealed sur l'élément).
   --d : délai optionnel (mis par le JS pour les entrées décalées). */
[data-reveal] {
  opacity: 0;
  translate: 0 var(--rise);
  transition: opacity var(--dur) var(--ease) var(--d, 0ms), translate var(--dur) var(--ease) var(--d, 0ms);
}

/* ---------- entrée de slide : kicker, titre, sommaire (0 / 80 / 200 ms) ---------- */
.slide-head .kicker, .slide-head .title, .chapters {
  opacity: 0;
  translate: 0 var(--rise);
  transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease);
}
.slide.is-active .slide-head .kicker { opacity: 1; translate: 0 0; transition-delay: 0ms; }
.slide.is-active .slide-head .title  { opacity: 1; translate: 0 0; transition-delay: 80ms; }
.slide.is-active .chapters           { opacity: 1; translate: 0 0; transition-delay: 200ms; }
.is-1  [data-reveal="1"],
.is-2  [data-reveal="2"],
.is-3  [data-reveal="3"],
.is-4  [data-reveal="4"],
.is-5  [data-reveal="5"],
.is-6  [data-reveal="6"],
.is-7  [data-reveal="7"],
.is-8  [data-reveal="8"],
.is-9  [data-reveal="9"],
.is-10 [data-reveal="10"] {
  opacity: 1;
  translate: 0 0;
}

/* ---------- composants ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.avatar {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
  flex: 0 0 auto;
}
/* Cadrage : l'image source (1024², personnage centré avec beaucoup de vide)
   est zoomée ×1,55 et décalée pour que le visage et le haut du buste
   remplissent le cercle. Visage centré horizontalement, pas de déformation. */
.avatar img {
  position: absolute;
  max-width: none;
  width: 155%;
  height: 155%;
  left: -27.5%;
  top: -7%;
  object-fit: cover;
}
/* anneau cyan, avec une respiration lente : un second anneau fin s'écarte et s'estompe */
.avatar-ring {
  --ring-gap: 6px;
  --ring: 9px;
  --ring-far: 15px;
  box-shadow: 0 0 0 var(--ring-gap) var(--bg), 0 0 0 var(--ring) var(--accent);
  animation: ring-breathe 4.2s ease-in-out infinite;
}
@keyframes ring-breathe {
  0%, 100% { box-shadow: 0 0 0 var(--ring-gap) var(--bg), 0 0 0 var(--ring) var(--accent), 0 0 0 var(--ring) rgb(0 240 255 / 0); }
  50%      { box-shadow: 0 0 0 var(--ring-gap) var(--bg), 0 0 0 var(--ring) var(--accent), 0 0 0 var(--ring-far) rgb(0 240 255 / .35); }
}
.avatar-xl { width: 320px; height: 320px; }
.avatar-sm { width: 44px; height: 44px; }

/* ---------- progression ---------- */
.progress {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 44px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 10;
}
.progress .bar {
  flex: 1 1 auto;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.progress .bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 550ms var(--ease);
}
.progress .count {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  letter-spacing: .04em;
  min-width: 48px;
  text-align: center;
}
.nav-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-3);
  opacity: .55;
  transition: opacity 200ms, color 200ms;
}
.nav-btn:hover { opacity: 1; color: var(--accent); }
.nav-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; opacity: 1; }
.nav-btn[disabled] { opacity: .15; cursor: default; }

/* =========================================================
   SLIDE 3 — L'autre option.
   Étapes : 1 carte SDR · 2 carte glisse, Léo grandit · 3 respiration
   ========================================================= */
.s3-scene {
  position: relative;
  flex: 1 1 auto;
  margin-top: 8px;
}

.s3-card-pos {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 540px;
  translate: -50% -50%;
  scale: 1;
  transition:
    translate 800ms var(--ease),
    scale 800ms var(--ease);
}
.slide-3.is-2 .s3-card-pos {
  translate: calc(-50% - 330px) -50%;
  scale: .84;
}

.s3-card {
  padding: 40px 44px 30px;
  opacity: 0;
  translate: 0 var(--rise);
  transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease);
}
.slide-3.is-1 .s3-card { opacity: 1; translate: 0 0; }

.card-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -.02em;
  line-height: 1.05;
  margin-bottom: 26px;
}
.facts li {
  font-size: 22px;
  line-height: 1.35;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.facts strong {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 32px;
  color: var(--accent);
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.card-foot {
  margin-top: 22px;
  font-size: 13px;
  color: var(--ink-3);
}

.s3-leo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 560px;
  translate: calc(-50% + 330px) -50%;
  scale: .18;
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform-origin: center;
  transition:
    scale 900ms var(--ease-out-back),
    opacity 450ms var(--ease);
}
.slide-3.is-2 .s3-leo {
  scale: 1;
  opacity: 1;
  transition-delay: 200ms;
}
.s3-name {
  display: block;
  margin-top: 34px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -.02em;
  opacity: 0;
  translate: 0 10px;
  transition: opacity 480ms var(--ease), translate 480ms var(--ease);
}
.s3-line {
  margin-top: 12px;
  font-size: 24px;
  line-height: 1.35;
  color: var(--ink);
  max-width: 24ch;
  opacity: 0;
  translate: 0 10px;
  transition: opacity 560ms var(--ease), translate 560ms var(--ease);
}
.slide-3.is-2 .s3-name { opacity: 1; translate: 0 0; transition-delay: 700ms; }
.slide-3.is-2 .s3-line { opacity: 1; translate: 0 0; transition-delay: 1100ms; }
/* les lignes de la carte arrivent l'une après l'autre, 150 ms d'écart */
.facts li { opacity: 0; translate: 0 14px; transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease); }
.slide-3.is-1 .facts li { opacity: 1; translate: 0 0; }
.slide-3.is-1 .facts li:nth-child(1) { transition-delay: 250ms; }
.slide-3.is-1 .facts li:nth-child(2) { transition-delay: 400ms; }
.slide-3.is-1 .facts li:nth-child(3) { transition-delay: 550ms; }
.slide-3.is-1 .facts li:nth-child(4) { transition-delay: 700ms; }
.card-foot { opacity: 0; transition: opacity 600ms var(--ease) 950ms; }
.slide-3.is-1 .card-foot { opacity: 1; }

/* =========================================================
   SLIDE 10 — Chaque semaine, vous recevez ça.
   Étapes : 1–4 chiffres · 5 bloc "Ce qui ressort"
   ========================================================= */
.slide-10 { padding-bottom: 60px; }
.s10-scene {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}
.mail {
  width: 780px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 36px 14px;
  display: flex;
  flex-direction: column;
}
.mail-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.mail-from { font-size: 17px; line-height: 1.2; }
.mail-from strong { font-weight: 500; }
.mail-from span { color: var(--ink-2); margin-left: 6px; }
.mail-date { font-size: 13px; color: var(--ink-3); margin-top: 3px; }

.mail-subject {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -.015em;
  line-height: 1.15;
  padding: 20px 0 6px;
}
.mail-hello { color: var(--ink-2); font-size: 17px; margin: 6px 0 4px; }

.mail-stats { display: flex; flex-direction: column; }
.mail-stats li {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  translate: -18px 0;   /* les lignes du mail glissent depuis la gauche */
}
.mail { opacity: 0; translate: 0 var(--rise); transition: opacity var(--dur) var(--ease) 250ms, translate var(--dur) var(--ease) 250ms; }
.slide-10.is-active .mail { opacity: 1; translate: 0 0; }
.mail-stats em { opacity: 0; transition: opacity 400ms var(--ease) 350ms; }
.mail-stats li.revealed em { opacity: 1; }
.mail-stats li:last-child { border-bottom: 0; }
.mail-stats .num {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  color: var(--accent);
  min-width: 96px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.mail-stats span { font-size: 21px; }
.mail-stats em {
  display: block;
  font-style: normal;
  font-size: 15px;
  color: var(--ink-2);
  margin-top: 1px;
}

.mail-insight {
  margin-top: 18px;
  padding: 16px 22px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 12px 12px 0;
}
.insight-label {
  display: block;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.mail-insight p { font-size: 19px; line-height: 1.45; }

.mail-foot {
  margin-top: 16px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .04em;
  text-align: right;
}

/* =========================================================
   MOBILE (< 900px) — empilement vertical, scroll interne
   ========================================================= */
@media (max-width: 899px) {
  body { font-size: 17px; overflow: hidden; }

  .deck.is-mobile .stage {
    position: absolute;
    inset: 0;
    left: 0; top: 0;
    width: 100%;
    height: 100%;
    transform: none;
  }
  .deck.is-mobile .slide {
    padding: 28px 20px 64px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .kicker { font-size: 14px; margin-bottom: 10px; }
  .title { font-size: 38px; }

  /* slide 3 */
  .deck.is-mobile .s3-scene {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 34px;
  }
  .deck.is-mobile .s3-card-pos,
  .deck.is-mobile .slide-3.is-2 .s3-card-pos {
    position: static;
    width: 100%;
    max-width: 480px;
    translate: none;
    scale: 1;
  }
  .deck.is-mobile .s3-card { padding: 28px 26px 22px; }
  .card-title { font-size: 28px; margin-bottom: 18px; }
  .facts li { font-size: 18px; padding: 11px 0; }
  .facts strong { font-size: 23px; }

  .deck.is-mobile .s3-leo {
    position: static;
    width: 100%;
    translate: none;
    scale: .6;
    display: none;
  }
  .deck.is-mobile .slide-3.is-2 .s3-leo { display: flex; scale: 1; }
  .avatar-xl { width: 220px; height: 220px; }
  .s3-name { margin-top: 26px; font-size: 28px; }
  .s3-line { font-size: 19px; }

  /* slide 10 */
  .deck.is-mobile .s10-scene { margin-top: 24px; align-items: flex-start; }
  .mail { width: 100%; padding: 20px 20px 14px; }
  .mail-subject { font-size: 22px; }
  .mail-stats .num { font-size: 32px; min-width: 64px; }
  .mail-stats span { font-size: 18px; }
  .mail-stats em { font-size: 14px; }
  .mail-insight p { font-size: 17px; }

  .progress { height: 40px; padding: 0 12px; background: var(--bg); }
}

/* ---------- mouvement réduit ----------
   Tout s'affiche directement dans son état final ; les mouvements permanents s'arrêtent. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
  }
}
