/* ============================================================
   Animations : révélations au défilement, micro-interactions.
   Uniquement transform et opacity. Respect intégral de
   prefers-reduced-motion (tout est désactivé).
   ============================================================ */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Révélation progressive des sections (activée par animations.js) */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Sans JavaScript, tout reste visible. */
html:not(.js) [data-reveal] {
  opacity: 1;
  transform: none;
}

/* Léger flottement des éléments décoratifs du héros */
@keyframes float-soft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float-soft {
  animation: float-soft 7s ease-in-out infinite;
}

/* Préférence de réduction des animations : on coupe tout. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
