/**
 * Animations de défilement communes pour toutes les pages
 * Animation fluide des éléments lors du scroll
 */

/* Classes de base pour les animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.25, 0.25, 1);
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.25, 0.25, 0.25, 1);
}

.fade-in-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.25, 0.25, 1);
}

.fade-in-right.animate {
    opacity: 1;
    transform: translateX(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 0.25, 0.25, 1);
}

.fade-in.animate {
    opacity: 1;
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.25, 0.25, 0.25, 1);
}

.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}

.slide-in-bottom {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.25, 0.25, 0.25, 1);
}

.slide-in-bottom.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Animation avec délai pour créer un effet cascade */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
}

.delay-500 {
    transition-delay: 0.5s;
}

/* Animation spéciale pour les titres */
.title-animation {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1.2s cubic-bezier(0.23, 1, 0.320, 1);
}

.title-animation.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Animation pour les cartes de services */
.card-animation {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.25, 0.25, 0.25, 1);
}

.card-animation.animate {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Animation pour les éléments de statistiques */
.counter-animation {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.25, 0.25, 1);
}

.counter-animation.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Animation pour les images */
.image-animation {
    opacity: 0;
    transform: scale(1.1);
    transition: all 1s cubic-bezier(0.25, 0.25, 0.25, 1);
}

.image-animation.animate {
    opacity: 1;
    transform: scale(1);
}

/* Animation spéciale pour les formulaires */
.form-animation {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.25, 0.25, 1);
}

.form-animation.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Animation pour les boutons */
.button-animation {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.25, 0.25, 0.25, 1);
}

.button-animation.animate {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Animation spécifique pour la navigation */
.nav-animation {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.8s cubic-bezier(0.25, 0.25, 0.25, 1);
}

.nav-animation.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Animation pour les icônes */
.icon-animation {
    opacity: 0;
    transform: scale(0.5) rotate(180deg);
    transition: all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.icon-animation.animate {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Animation spéciale pour le hero */
.hero-animation {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1.2s cubic-bezier(0.23, 1, 0.320, 1);
}

.hero-animation.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Animation pour les sections */
.section-animation {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.25, 0.25, 0.25, 1);
}

.section-animation.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Effet de parallaxe léger */
.parallax-light {
    transition: transform 0.1s linear;
}

/* Réduction du mouvement pour les utilisateurs qui le préfèrent */
@media (prefers-reduced-motion: reduce) {
    .fade-in-up,
    .fade-in-left,
    .fade-in-right,
    .fade-in,
    .scale-in,
    .slide-in-bottom,
    .title-animation,
    .card-animation,
    .counter-animation,
    .image-animation,
    .form-animation,
    .button-animation,
    .nav-animation,
    .icon-animation,
    .hero-animation,
    .section-animation {
        transition: none;
        transform: none;
        opacity: 1;
    }
    
    .parallax-light {
        transition: none;
    }
}

/* Animation spéciale pour mobile */
@media (max-width: 768px) {
    .fade-in-up,
    .fade-in-left,
    .fade-in-right,
    .slide-in-bottom,
    .title-animation,
    .card-animation,
    .hero-animation,
    .section-animation {
        transform: translateY(20px);
        transition-duration: 0.6s;
    }
    
    .fade-in-left.animate,
    .fade-in-right.animate {
        transform: translateX(0);
    }
    
    .icon-animation {
        transform: scale(0.8);
        transition-duration: 0.8s;
    }
    
    .icon-animation.animate {
        transform: scale(1);
    }
}

/* Performance: will-change pour les éléments animés */
.fade-in-up,
.fade-in-left,
.fade-in-right,
.fade-in,
.scale-in,
.slide-in-bottom,
.title-animation,
.card-animation,
.counter-animation,
.image-animation,
.form-animation,
.button-animation,
.nav-animation,
.icon-animation,
.hero-animation,
.section-animation {
    will-change: opacity, transform;
}

/* Nettoyage après animation */
.animate {
    will-change: auto;
}
