/* =====================================================
   SACOTEC — Animations premium
   ===================================================== */

/* Reveal au scroll */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
    will-change: opacity, transform;
}
.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left { transform: translateX(-40px); }
.reveal-left.in-view { transform: translateX(0); }
.reveal-right { transform: translateX(40px); }
.reveal-right.in-view { transform: translateX(0); }
.reveal-scale { transform: scale(0.94); }
.reveal-scale.in-view { transform: scale(1); }

/* Délais en cascade */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* Compteur stats : effet count-up géré en JS */
.count {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* Animation typing */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}
.cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--cyan-400);
    vertical-align: text-bottom;
    margin-left: 4px;
    animation: blink 1s infinite;
}

/* Shimmer effect (for skeleton / loading) */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}
.shimmer {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.05) 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Tilt effect on hover (subtle 3D) */
.tilt {
    transition: transform 0.4s var(--ease-out);
    transform-style: preserve-3d;
}
.tilt:hover { transform: perspective(1000px) rotateY(-2deg) rotateX(2deg) translateY(-4px); }

/* Page transition fade-in */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.8s var(--ease-out) both; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.fade-in { animation: fadeIn 0.6s var(--ease-out) both; }

/* Marquee partenaires */
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.marquee {
    display: flex;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent 0%, black 10%, black 90%, transparent 100%);
}
.marquee-track {
    display: flex;
    gap: 4rem;
    animation: marquee 30s linear infinite;
    width: max-content;
    align-items: center;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* Glow pulse */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(37, 99, 235, 0.4); }
    50% { box-shadow: 0 0 40px rgba(37, 99, 235, 0.7); }
}
.glow-pulse { animation: glowPulse 2.5s ease-in-out infinite; }

/* Slide background */
@keyframes slideBg {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 0%; }
}

/* Reduced motion */
@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;
    }
}
