/* animations.css — NES COM photo multimédia
   AnimationDesigner · 3 animations uniquement
   Tout encapsulé dans prefers-reduced-motion: no-preference */

@media (prefers-reduced-motion: no-preference) {

  /* ── 1. SCROLL REVEAL — fade-in + translateY ─────────────────────
     main.js ajoute .is-visible via IntersectionObserver.
     Fallback CSS scroll-driven pour Chromium 115+.           */

  @supports not (animation-timeline: view()) {
    [data-animate],
    [data-scroll-reveal] {
      opacity: 0;
      transform: translateY(12px);
      transition: opacity 0.5s ease, transform 0.5s ease;
    }
    [data-animate].is-visible,
    [data-scroll-reveal].is-visible {
      opacity: 1;
      transform: none;
    }
    [data-delay="100"] { transition-delay: 0.1s; }
    [data-delay="200"] { transition-delay: 0.2s; }
  }

  @supports (animation-timeline: view()) {
    [data-animate],
    [data-scroll-reveal] {
      animation: reveal-up linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 25%;
    }
    [data-delay="100"] { animation-range: entry 4% entry 29%; }
    [data-delay="200"] { animation-range: entry 8% entry 33%; }
  }

  @keyframes reveal-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
  }

  /* ── 2. HOVER VIGNETTES PORTFOLIO — zoom + teinte ambre ─────────── */

  .portfolio-item {
    cursor: zoom-in;
    transition: transform 0.25s ease, filter 0.25s ease;
  }

  .portfolio-item:hover {
    transform: scale(1.02);
    filter: hue-rotate(8deg) brightness(1.03);
  }

  /* ── 3. TRANSITION DE PAGE — fondu sortant ───────────────────────── */

  body {
    transition: opacity 0.2s ease;
  }

  body.page-leaving {
    opacity: 0;
  }

} /* end prefers-reduced-motion: no-preference */

/* Sécurité reduced-motion — s'assure qu'aucune animation ne passe */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
