/* UltimeBots — animations d'arrivée de la page d'accueil.
 *  - Hero : entrée en cascade au chargement (CSS seul, aucun JS requis).
 *  - Sections : les blocs glissent et apparaissent quand ils entrent à l'écran (reveal.js).
 * Désactivé si l'utilisateur demande moins d'animations (data-motion-policy="reduce",
 * posé par motion-policy.js dans <head>).
 * On anime `translate` / `scale` (propriétés individuelles) : elles s'ajoutent au `transform`
 * existant des éléments au lieu de l'écraser. */

:root {
  --rv-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --rv-dur: 0.95s;
  --rv-dist: 34px;
}

/* ── Hero : cascade au chargement ─────────────────────────────────────── */
@keyframes rv-rise {
  from { opacity: 0; translate: 0 var(--rv-dist); }
}
@keyframes rv-pop {
  from { opacity: 0; scale: 0.9; translate: 0 18px; }
}
html[data-motion-policy="ok"] .hero .hero-l1 { display: block; animation: rv-rise var(--rv-dur) var(--rv-ease) 0.05s both; }
html[data-motion-policy="ok"] .hero .hero-l2 { display: block; animation: rv-rise var(--rv-dur) var(--rv-ease) 0.16s both; }
html[data-motion-policy="ok"] .hero .hero-lead { animation: rv-rise var(--rv-dur) var(--rv-ease) 0.3s both; }
html[data-motion-policy="ok"] .hero .hero-cta { animation: rv-rise var(--rv-dur) var(--rv-ease) 0.42s both; }
html[data-motion-policy="ok"] .hero .live-stats { animation: rv-rise var(--rv-dur) var(--rv-ease) 0.58s both; }

/* ── Sections : apparition au scroll ──────────────────────────────────── */
html[data-motion-policy="ok"] .rv {
  opacity: 0;
  translate: 0 var(--rv-dist);
  transition:
    opacity 0.75s var(--rv-ease),
    translate var(--rv-dur) var(--rv-ease),
    scale var(--rv-dur) var(--rv-ease);
  transition-delay: var(--rv-delay, 0ms);
  will-change: opacity, translate;
}
html[data-motion-policy="ok"] .rv--left  { translate: calc(var(--rv-dist) * -1.6) 0; }
html[data-motion-policy="ok"] .rv--right { translate: calc(var(--rv-dist) * 1.6) 0; }
html[data-motion-policy="ok"] .rv--zoom  { translate: 0 calc(var(--rv-dist) * 0.6); scale: 0.94; }

/* Pièces du puzzle Perso : arrivent un peu décalées et tournées, puis s'emboîtent avec un léger rebond. */
html[data-motion-policy="ok"] .rv--pz {
  translate: calc(22px + var(--i, 0) * 8px) 30px;
  rotate: -3deg;
  transition:
    opacity 0.55s var(--rv-ease),
    translate 0.9s cubic-bezier(0.34, 1.45, 0.64, 1),
    rotate 0.9s cubic-bezier(0.34, 1.45, 0.64, 1);
  transition-delay: var(--rv-delay, 0ms);
}
html[data-motion-policy="ok"] .rv--pz:nth-child(even) { rotate: 3deg; }
html[data-motion-policy="ok"] .rv--pz.rv-in { rotate: none; }

html[data-motion-policy="ok"] .rv.rv-in {
  opacity: 1;
  translate: none;
  scale: none;
}

/* Sécurité : jamais d'élément invisible à l'impression. */
@media print {
  .rv { opacity: 1 !important; translate: none !important; scale: none !important; }
}

/* UltimeBots — animations liées au scroll (page d'accueil), pilotées par scroll-fx.js.
 * Le script écrit la progression (0 → 1) dans --p sur chaque élément suivi ; tout le reste
 * est ici, en transform / opacity (rien qui force une remise en page).
 * Désactivé avec data-motion-policy="reduce" : le script ne tourne pas, --p reste absent
 * et chaque règle retombe sur l'état final (valeur de repli 1). */

/* Héros : scène épinglée, voir « Scène du héros » dans home.css. */

/* Titres de section : un masque descend sur le titre, qui s'allume ligne après ligne
   (compatible avec le remplissage titane en background-clip: text). */
html[data-motion-policy="ok"] .fx-lit {
  -webkit-mask-image: linear-gradient(172deg, #000 calc(var(--p, 1) * 140% - 40%), rgb(0 0 0 / 0.12) calc(var(--p, 1) * 140% - 5%));
  mask-image: linear-gradient(172deg, #000 calc(var(--p, 1) * 140% - 40%), rgb(0 0 0 / 0.12) calc(var(--p, 1) * 140% - 5%));
  transform: translate3d(0, calc((1 - var(--p, 1)) * 28px), 0);
}

/* Démo Discord : arrive couchée vers l'arrière et se redresse face à l'écran. */
html[data-motion-policy="ok"] .fx-tilt { transform-origin: 50% 0; transform: perspective(1600px) rotateX(calc((1 - var(--p, 1)) * 24deg)) scale(calc(0.84 + var(--p, 1) * 0.16)) translate3d(0, calc((1 - var(--p, 1)) * 60px), 0); opacity: calc(0.35 + var(--p, 1) * 0.65); }

/* Deux versions : chaque carte vient de son côté. */
html[data-motion-policy="ok"] .fx-from-left { transform: translate3d(calc((1 - var(--p, 1)) * -18%), 0, 0) rotate(calc((1 - var(--p, 1)) * -3deg)); opacity: calc(0.2 + var(--p, 1) * 0.8); }
html[data-motion-policy="ok"] .fx-from-right { transform: translate3d(calc((1 - var(--p, 1)) * 18%), 0, 0) rotate(calc((1 - var(--p, 1)) * 3deg)); opacity: calc(0.2 + var(--p, 1) * 0.8); }

/* Tableau gratuit / VIP : grandit en arrivant. */
html[data-motion-policy="ok"] .fx-grow { transform: scale(calc(0.9 + var(--p, 1) * 0.1)); opacity: calc(0.3 + var(--p, 1) * 0.7); }

/* Cartes de prix : montent en cascade. */
html[data-motion-policy="ok"] .fx-rise { transform: translate3d(0, calc((1 - var(--p, 1)) * (90px + var(--i, 0) * 50px)), 0); opacity: calc(var(--p, 1) * 1.6 - var(--i, 0) * 0.2); }

/* Dernier appel : la carte s'ouvre en grand. */
/* Uniquement transform + opacity (composités par le GPU) : l'ancien clip-path animé repeignait toute la carte à chaque image. */
html[data-motion-policy="ok"] .fx-open { transform: translate3d(0, calc((1 - var(--p, 1)) * 40px), 0) scale(calc(0.9 + var(--p, 1) * 0.1)); opacity: calc(0.25 + var(--p, 1) * 0.75); will-change: transform, opacity; }
