/* Mouvement. Une séquence d'ouverture (le héros), des apparitions brèves au défilement, des retours au toucher.
 * On n'anime que transform et opacity. « Réduire les animations » neutralise tout (fin du fichier + js/ui.js). */

/* ---------- Ouverture du héros : trois pensées, puis la lumière dans la serrure ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes light-open { from { opacity: 0; transform: scale(.12); } 60% { opacity: 1; } to { opacity: 1; transform: scale(1); } }
@keyframes light-breathe { from { opacity: .9; } to { opacity: 1; } }

.soon { animation: rise 640ms var(--ease) both; }
.hero-title .l1 { animation: rise 760ms var(--ease) 120ms both; }
.hero-title .l2 { animation: rise 760ms var(--ease) 280ms both; }
.hero-title .l3 { animation: rise 760ms var(--ease) 440ms both; }
.hero-lead { animation: rise 760ms var(--ease) 700ms both; }
.hero-actions { animation: rise 760ms var(--ease) 820ms both; }
.hero-meta { animation: rise 760ms var(--ease) 940ms both; }

.door-bloom, .door-haze, .door-floor { animation: fade 1.6s var(--ease) 480ms both; }
.door-bubble { animation: fade 900ms var(--ease) 100ms both; }
.door-light { animation: light-open 1.4s var(--spring) 560ms both, light-breathe 7s ease-in-out 2.2s infinite alternate; }

/* ---------- Apparitions au défilement (activées seulement si le JavaScript tourne) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 640ms var(--ease), transform 640ms var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Petites boucles ---------- */
@keyframes caret { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
@keyframes travel { 0% { transform: translateX(-100%); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(0); opacity: 0; } }
@keyframes pulse-ring { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(3); opacity: 0; } }
@keyframes pulse-soft { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Réduire les animations : tout se pose immédiatement, rien ne bouge ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .caret { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
}
