/* =============================================================================
   ALVINAH PARTNERS — Site vitrine V2
   animations.css · keyframes + transitions globales
   Animations Hero séquencées par /js/animations.js (durée totale ≤ 2.8s).
   ============================================================================= */


/* ============================================================
   0. Audit V3 A11Y MO-4 (12/05/2026) — Reduced motion global fallback
   ============================================================
   WCAG 2.3.3 (Animation from Interactions) demande que les animations
   non essentielles soient auto-désactivées quand l'OS signale
   ``prefers-reduced-motion: reduce`` (Mac : Préférences > Accessibilité >
   Affichage > Réduire les animations ; Windows : Paramètres > Accessibilité
   > Effets visuels).

   La règle ciblée en bas du fichier (§ 4) couvre déjà hero + site-menu,
   mais ne protège pas les futures animations ajoutées ailleurs (cards,
   trajectory, etc.). Cette règle globale agit comme un filet de
   sécurité ``ceinture + bretelles`` : réduit la durée de toute
   animation/transition à 0.01ms (perçu instantané) sans tout casser.

   Note : les valeurs sont ``0.01ms`` plutôt que ``0`` pour préserver
   les callbacks ``animationend`` éventuels (sinon les listeners JS
   qui attendent l'event ne se déclenchent jamais).
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ============================================================
   1. Hero — fade-in logo (V2.0 : glow supprimé, durée 0.25s)
   ============================================================ */
@keyframes hero-fade-in {
    from { opacity: 1; }
    to   { opacity: 1; }
}
.hero__logo.is-revealed {
    animation: hero-fade-in 0.25s ease-out forwards;
}


/* ============================================================
   2. Hero — fallback texte calligraphique (sans Vivus.js)
   Utilisé tant que assets/accroche-calligraphie.svg n'est pas fourni.
   Apparition douce de gauche à droite (clip-path) — proche du tracé Vivus.
   ============================================================ */
@keyframes hero-calligraphy-write {
    0% {
        opacity: 0.55;
        clip-path: inset(0 100% 0 0);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}
.hero__calligraphy.is-revealed {
    /* V4.23 — retour durée originale (1.7s ease-in-out) */
    animation: hero-calligraphy-write 1.7s ease-in-out forwards;
}


/* ============================================================
   3. Menu — apparition du haut (T = 2.3s → 2.8s)
   ============================================================ */
@keyframes menu-slide-down {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
/* La classe is-visible déclenche l'animation (gérée en JS).
   La transition CSS (déjà sur .site-menu) gère le hide-on-scroll. */


/* ============================================================
   4. Reduced motion — désactivation animations Hero
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .hero__logo,
    .hero__calligraphy {
        opacity: 1 !important;
        animation: none !important;
        clip-path: none !important;
    }
    .site-menu {
        opacity: 1 !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }
}
