/* ==========================================================================
   ECC — animations.css
   Keyframes et classes d'animation. Déclenchées en CSS pur (hover, etc.)
   ou pilotées en JS natif (scroll reveal via IntersectionObserver,
   compteurs, ripple).
   ========================================================================== */

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--left {
  transform: translateX(-40px);
}
.reveal--left.is-visible {
  transform: translateX(0);
}

.reveal--right {
  transform: translateX(40px);
}
.reveal--right.is-visible {
  transform: translateX(0);
}

.reveal--scale {
  transform: scale(0.92);
}
.reveal--scale.is-visible {
  transform: scale(1);
}

/* Délais échelonnés pour les grilles de cartes */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.55s; }

.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Hero ---------- */
@keyframes scroll-line {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__eyebrow { animation: fade-in-up 0.8s var(--ease) 0.1s both; }
.hero__title { animation: fade-in-up 0.9s var(--ease) 0.25s both; }
.hero__subtitle { animation: fade-in-up 0.9s var(--ease) 0.4s both; }
.hero__actions { animation: fade-in-up 0.9s var(--ease) 0.55s both; }

/* ---------- Ripple (boutons) ---------- */
@keyframes ripple-effect {
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}

/* ---------- Menu mobile ---------- */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.nav__mobile {
  animation: fade-in 0.3s var(--ease);
}

.nav__mobile .nav__link {
  opacity: 0;
  transform: translateY(14px);
  animation: fade-in-up 0.5s var(--ease) forwards;
}

.nav__mobile.is-open .nav__link:nth-child(1) { animation-delay: 0.08s; }
.nav__mobile.is-open .nav__link:nth-child(2) { animation-delay: 0.14s; }
.nav__mobile.is-open .nav__link:nth-child(3) { animation-delay: 0.20s; }
.nav__mobile.is-open .nav__link:nth-child(4) { animation-delay: 0.26s; }
.nav__mobile.is-open .nav__link:nth-child(5) { animation-delay: 0.32s; }

/* ---------- Icônes décoratives ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.intro__badge {
  animation: float 5s ease-in-out infinite;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero__pattern {
  animation: spin-slow 60s linear infinite;
}

/* ---------- Réduction des animations (accessibilité) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
