/**
 * MOTION.CSS - Styles pour les animations
 * Régie des Montagnes
 */

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #4a8a5a, #166a34);
    box-shadow: 0 1px 6px rgba(46, 93, 58, 0.4);
    z-index: 9999;
    transition: width 0.1s ease-out;
    pointer-events: none;
}

/* ============================================================
   REVEAL (fade-in + remontée)
   ============================================================ */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

[data-reveal="fade"] {
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal="fade-down"] {
    transform: translateY(-28px);
}

[data-reveal="fade-left"] {
    transform: translateX(28px);
}

[data-reveal="fade-right"] {
    transform: translateX(-28px);
}

[data-reveal="zoom"] {
    transform: scale(0.92);
}

[data-reveal].reveal-visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* ============================================================
   STAGGER (cascade)
   ============================================================ */
[data-stagger-item] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

[data-stagger-item].stagger-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   COUNTER
   ============================================================ */
[data-counter] {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   MAGNETIC (juste pour la transition)
   ============================================================ */
[data-magnetic] {
    will-change: transform;
}

/* ============================================================
   REDUCED MOTION (accessibilité)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    [data-reveal],
    [data-stagger-item] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    [data-magnetic] {
        transform: none !important;
        transition: none !important;
    }

    .scroll-progress {
        display: none;
    }

    /* Désactive aussi les anims du site */
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
