/* ==========================================================================
   Chez Marie France — Animations & micro-interactions
   ========================================================================== */

/* Molette de l'indicateur de scroll (hero) */
@keyframes scroll-wheel {
  0%   { opacity: 1; transform: translateY(0); }
  70%  { opacity: 0; transform: translateY(12px); }
  100% { opacity: 0; transform: translateY(0); }
}

/* Apparition douce des sections au scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Décalage en cascade pour les grilles de cartes */
.card-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.card-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.card-grid .reveal:nth-child(4) { transition-delay: 0.24s; }

/* Entrée du contenu du hero au chargement */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content > * {
  animation: hero-rise 0.9s ease both;
}

.hero-content > :nth-child(2) { animation-delay: 0.12s; }
.hero-content > :nth-child(3) { animation-delay: 0.24s; }
.hero-content > :nth-child(4) { animation-delay: 0.36s; }

/* Fondu de la lightbox */
@keyframes lightbox-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox:not([hidden]) { animation: lightbox-in 0.25s ease; }

/* Respect des préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important; /* exception documentée : neutralise toutes les animations */
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
