/* Animations globales pour le site OVE Caraïbes */

/* Animations de base */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Classes d'animation */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease-out;
}

.animate-scaleIn {
    animation: scaleIn 0.6s ease-out;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 1s ease-in-out;
}

/* Animations au hover */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    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-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Animations pour les boutons */
.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-animated:hover::before {
    left: 100%;
}

.btn-animated:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Animations pour les cartes */
.card-animated {
    transition: all 0.3s ease;
}

.card-animated:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* Utilitaires globaux pour toutes les pages */
.glow-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.06);
    position: relative;
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}
.glow-card::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(0,113,227,.15), transparent 30%, transparent 70%, rgba(0,162,177,.15));
    opacity: 0; transition: opacity .3s ease;
}
.glow-card:hover { transform: translateY(-8px); box-shadow: 0 18px 45px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,113,227,0.25); }
.glow-card:hover::before { opacity: 1; }

.hover-lift-sm { transition: transform .25s ease, box-shadow .25s ease; }
.hover-lift-sm:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.18); }

.shimmer-line {
    position: relative;
}
.shimmer-line::after {
    content: '';
    position: absolute; left: -100%; bottom: -6px; height: 3px; width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
    animation: shimmer 4s infinite;
}
@keyframes shimmer { 0% { left: -100%; } 50% { left: 0; } 100% { left: 100%; } }

/* Animations pour les icônes */
.icon-animated {
    transition: all 0.3s ease;
}

.icon-animated:hover {
    transform: scale(1.2) rotate(10deg);
    color: #0071e3;
}

/* Animations pour les titres avec courbe serpentine */
.title-animated {
    position: relative;
    overflow: hidden;
}

.title-animated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #0071e3 20%, 
        #00a2b1 40%, 
        #0071e3 60%, 
        #00a2b1 80%, 
        transparent 100%
    );
    border-radius: 2px;
    transition: left 4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 10px rgba(0, 113, 227, 0.3);
}

.title-animated:hover::after {
    left: 100%;
    animation: snakeWave 4s ease-in-out;
}

/* Animation de vague serpentine */
@keyframes snakeWave {
    0% {
        transform: translateX(0) scaleY(1);
        background: linear-gradient(90deg, 
            transparent 0%, 
            #0071e3 20%, 
            #00a2b1 40%, 
            #0071e3 60%, 
            #00a2b1 80%, 
            transparent 100%
        );
    }
    25% {
        transform: translateX(25%) scaleY(1.5);
        background: linear-gradient(90deg, 
            transparent 0%, 
            #00a2b1 20%, 
            #0071e3 40%, 
            #00a2b1 60%, 
            #0071e3 80%, 
            transparent 100%
        );
    }
    50% {
        transform: translateX(50%) scaleY(1);
        background: linear-gradient(90deg, 
            transparent 0%, 
            #0071e3 20%, 
            #00a2b1 40%, 
            #0071e3 60%, 
            #00a2b1 80%, 
            transparent 100%
        );
    }
    75% {
        transform: translateX(75%) scaleY(1.3);
        background: linear-gradient(90deg, 
            transparent 0%, 
            #00a2b1 20%, 
            #0071e3 40%, 
            #00a2b1 60%, 
            #0071e3 80%, 
            transparent 100%
        );
    }
    100% {
        transform: translateX(100%) scaleY(1);
        background: linear-gradient(90deg, 
            transparent 0%, 
            #0071e3 20%, 
            #00a2b1 40%, 
            #0071e3 60%, 
            #00a2b1 80%, 
            transparent 100%
        );
    }
}

/* Version alternative avec ondulations plus prononcées */
.title-animated.snake-wave::after {
    background: linear-gradient(90deg, 
        transparent 0%, 
        #0071e3 15%, 
        #00a2b1 30%, 
        #0071e3 45%, 
        #00a2b1 60%, 
        #0071e3 75%, 
        #00a2b1 90%, 
        transparent 100%
    );
    height: 4px;
    border-radius: 3px;
    box-shadow: 0 0 15px rgba(0, 113, 227, 0.4);
}

.title-animated.snake-wave:hover::after {
    animation: snakeWaveAdvanced 5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes snakeWaveAdvanced {
    0% {
        transform: translateX(0) scaleY(1) rotate(0deg);
        background: linear-gradient(90deg, 
            transparent 0%, 
            #0071e3 15%, 
            #00a2b1 30%, 
            #0071e3 45%, 
            #00a2b1 60%, 
            #0071e3 75%, 
            #00a2b1 90%, 
            transparent 100%
        );
    }
    20% {
        transform: translateX(20%) scaleY(1.8) rotate(2deg);
        background: linear-gradient(90deg, 
            transparent 0%, 
            #00a2b1 15%, 
            #0071e3 30%, 
            #00a2b1 45%, 
            #0071e3 60%, 
            #00a2b1 75%, 
            #0071e3 90%, 
            transparent 100%
        );
    }
    40% {
        transform: translateX(40%) scaleY(1.2) rotate(-1deg);
        background: linear-gradient(90deg, 
            transparent 0%, 
            #0071e3 15%, 
            #00a2b1 30%, 
            #0071e3 45%, 
            #00a2b1 60%, 
            #0071e3 75%, 
            #00a2b1 90%, 
            transparent 100%
        );
    }
    60% {
        transform: translateX(60%) scaleY(1.6) rotate(1.5deg);
        background: linear-gradient(90deg, 
            transparent 0%, 
            #00a2b1 15%, 
            #0071e3 30%, 
            #00a2b1 45%, 
            #0071e3 60%, 
            #00a2b1 75%, 
            #0071e3 90%, 
            transparent 100%
        );
    }
    80% {
        transform: translateX(80%) scaleY(1.3) rotate(-0.5deg);
        background: linear-gradient(90deg, 
            transparent 0%, 
            #0071e3 15%, 
            #00a2b1 30%, 
            #0071e3 45%, 
            #00a2b1 60%, 
            #0071e3 75%, 
            #00a2b1 90%, 
            transparent 100%
        );
    }
    100% {
        transform: translateX(100%) scaleY(1) rotate(0deg);
        background: linear-gradient(90deg, 
            transparent 0%, 
            #0071e3 15%, 
            #00a2b1 30%, 
            #0071e3 45%, 
            #00a2b1 60%, 
            #0071e3 75%, 
            #00a2b1 90%, 
            transparent 100%
        );
    }
}

/* Animations de chargement */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animations pour les formulaires */
.form-group {
    position: relative;
    overflow: hidden;
}

.form-group::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: #0071e3;
    transition: left 0.3s ease;
}

.form-group:focus-within::before {
    left: 0;
}

/* Animations pour les images */
.img-animated {
    transition: transform 0.3s ease;
    overflow: hidden;
}

.img-animated:hover {
    transform: scale(1.1);
}

/* Animations pour les listes */
.list-animated li {
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInLeft 0.5s ease-out forwards;
}

.list-animated li:nth-child(1) { animation-delay: 0.1s; }
.list-animated li:nth-child(2) { animation-delay: 0.2s; }
.list-animated li:nth-child(3) { animation-delay: 0.3s; }
.list-animated li:nth-child(4) { animation-delay: 0.4s; }
.list-animated li:nth-child(5) { animation-delay: 0.5s; }

/* Animations pour les compteurs */
.counter-animated {
    font-weight: bold;
    color: #0071e3;
    transition: all 0.3s ease;
}

.counter-animated:hover {
    transform: scale(1.1);
    color: #005bb8;
}

/* Responsive animations */
@media (max-width: 768px) {
    .animate-fadeInLeft,
    .animate-fadeInRight {
        animation: fadeInUp 0.8s ease-out;
    }
    
    .hover-lift:hover,
    .hover-scale:hover {
        transform: none;
    }
}
