/* =========================================================================
   NOVRA — Animations et micro-interactions
   ========================================================================= */

/* Révélation au scroll (pilotée par IntersectionObserver dans main.js) */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

[data-reveal="fade"] { transform: none; }

/* Masque horizontal pour les grands titres */
[data-reveal="mask"] {
  opacity: 1;
  transform: none;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s var(--ease-out);
}
[data-reveal="mask"].is-visible { clip-path: inset(0 0 0 0); }

/* Zoom lent sur les visuels éditoriaux */
[data-reveal="zoom"] { opacity: 0; transform: scale(1.06); }
[data-reveal="zoom"].is-visible { opacity: 1; transform: scale(1); }

/* Délais en cascade */
[data-delay="1"] { transition-delay: .08s; }
[data-delay="2"] { transition-delay: .16s; }
[data-delay="3"] { transition-delay: .24s; }
[data-delay="4"] { transition-delay: .32s; }
[data-delay="5"] { transition-delay: .40s; }
[data-delay="6"] { transition-delay: .48s; }

/* Parallaxe douce (translation appliquée via main.js) */
[data-parallax] { will-change: transform; }

/* Compteur panier */
@keyframes cartBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* Entrée du hero */
.hero-inner > * { animation: heroIn 1.1s var(--ease-out) both; }
.hero-inner > *:nth-child(1) { animation-delay: .18s; }
.hero-inner > *:nth-child(2) { animation-delay: .38s; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

/* Burger actif */
.burger.is-active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.is-active span:nth-child(2) { opacity: 0; }
.burger.is-active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Transition douce d'entrée de page */
body { animation: pageIn .5s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

/* Respect de la préférence utilisateur */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .hero-inner > * { animation: none; }
}
