/* ============================================== */
/* TAILWIND CSS ANIMATIONS PERSONNALISÉES */
/* Fondation Mosungi - Animations Fluides */
/* ============================================== */

/* Animation de clignotement pour le titre hero */
@keyframes clignotement {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Animation fade-in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation slide-in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation slide-in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation scale-in */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation bounce-in */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* Animation float */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Animation pulse doux */
@keyframes pulseSoft {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Animation shimmer pour les boutons */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Animation gradient pour les backgrounds */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Classes utilitaires pour les animations */
.animate-clignotement {
    animation: clignotement 1.5s infinite alternate;
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Protection : le header ne doit jamais être animé */
header.animate-fadeIn,
header .animate-fadeIn {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
}

.animate-slideInLeft {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.5s ease-out forwards;
}

.animate-bounceIn {
    animation: bounceIn 0.8s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulseSoft {
    animation: pulseSoft 2s ease-in-out infinite;
}

/* Délais d'animation */
.animation-delay-100 {
    animation-delay: 100ms;
}

.animation-delay-200 {
    animation-delay: 200ms;
}

.animation-delay-300 {
    animation-delay: 300ms;
}

.animation-delay-500 {
    animation-delay: 500ms;
}

.animation-delay-700 {
    animation-delay: 700ms;
}

.animation-delay-1000 {
    animation-delay: 1000ms;
}

/* Durées d'animation personnalisées */
.duration-slow {
    animation-duration: 1s;
}

.duration-normal {
    animation-duration: 0.6s;
}

.duration-fast {
    animation-duration: 0.3s;
}

/* Transitions fluides pour les interactions */
.transition-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-bounce {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.transition-elastic {
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

/* Hover effects avec Tailwind */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 160, 223, 0.5);
}

/* Animation de chargement */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin 3s linear infinite;
}

/* Animation de shimmer pour les cartes */
.shimmer-effect {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Animation pour les sections au scroll */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Animation stagger pour les listes */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.stagger-item.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: auto;
}

/* Animation pour les boutons */
.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animated::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-animated:hover::before {
    width: 300px;
    height: 300px;
}

/* Animation pour les images */
.image-zoom {
    transition: transform 0.5s ease;
}

.image-zoom:hover {
    transform: scale(1.1);
}

/* Animation pour les cartes */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Animation pour le menu mobile */
.menu-slide {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.menu-slide.active {
    transform: translateX(0);
}

/* Animation pour les tooltips */
.tooltip-fade {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tooltip-fade.show {
    opacity: 1;
    transform: translateY(0);
}

/* Animation pour les chiffres (compteurs) */
@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.count-animate {
    animation: countUp 0.5s ease-out forwards;
}

/* Animation pour les icônes */
.icon-bounce {
    transition: transform 0.3s ease;
}

.icon-bounce:hover {
    transform: translateY(-5px) scale(1.1);
}

/* Animation pour les liens */
.link-underline {
    position: relative;
    transition: color 0.3s ease;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.link-underline:hover::after {
    width: 100%;
}

/* Animation pour les modals */
.modal-fade {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal-fade.show {
    opacity: 1;
    transform: scale(1);
}

/* Animation pour les carrousels */
.carousel-slide {
    transition: transform 0.5s ease-in-out;
}

/* Animation pour les sections avec parallaxe */
.parallax-slow {
    transition: transform 0.1s ease-out;
}

/* Animation slide pour les images hero */
.hero-slide-left {
    animation: slideLeft 20s ease-in-out infinite;
}

.hero-slide-right {
    animation: slideRight 20s ease-in-out infinite;
}

.hero-slide-smooth {
    animation: slideBackground 20s ease-in-out infinite;
}

/* Animation pour les badges */
.badge-pulse {
    animation: pulseSoft 2s ease-in-out infinite;
}

/* Responsive animations - désactiver sur mobile si nécessaire */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Performance optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

