/* Animations et effets spéciaux */

/* ===== ACCESSIBILITÉ - PREFERS REDUCED MOTION ===== */
/* Respecter les préférences utilisateur pour réduire les animations */
@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;
    }
    
    /* Désactiver toutes les animations de scroll */
    .scroll-reveal,
    .scroll-reveal-left,
    .scroll-reveal-right,
    .scroll-reveal-bottom,
    .scroll-fade-in {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Désactiver les effets de tilt et magnetic */
    .tilt-card,
    .magnetic {
        transform: none !important;
        transition: none !important;
    }
    
    /* Désactiver les éléments flottants */
    .floating-element,
    .float-element {
        animation: none !important;
        transform: none !important;
    }
    
    /* Désactiver les pulsations et rotations */
    .pulse,
    .rotate,
    .bounce {
        animation: none !important;
    }
    
    /* Garder les transitions de hover mais instantanées */
    button:hover,
    a:hover,
    .btn:hover {
        transition-duration: 0.01ms !important;
    }
}

/* ===== ANIMATIONS DE BASE ===== */

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.4s ease forwards; /* Réduit de 0.8s à 0.4s */
}

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px); /* Réduit de 50px à 30px */
    transition: all 0.4s ease; /* Réduit de 0.8s à 0.4s */
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Liquid Button Effect */
.liquid-btn {
    position: relative;
    overflow: hidden;
}

.liquid-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transition: all 0.5s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.liquid-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Breathing Animation */
.breathing {
    /* animation désactivée pour performance */
}

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

/* Tilt Effect - Simplifié pour performance */
.tilt-card {
    /* transform-style: preserve-3d désactivé pour performance */
    transition: transform 0.2s ease;
}

/* Morphing Background */
.morphing-bg {
    background: linear-gradient(-45deg, var(--primary-color), var(--primary-light), var(--primary-light), var(--primary-color));
    background-size: 400% 400%;
    /* animation désactivée pour performance */
}

@keyframes morphing {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Magnetic Effect */
.magnetic {
    transition: transform 0.3s ease;
}

/* Floating Elements - Désactivés */
.floating-element {
    display: none !important;
    position: absolute;
    pointer-events: none;
    opacity: 0;
    /* animation désactivée pour performance */
}

.floating-element:nth-child(odd) {
    animation-direction: reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Particles - Désactivées pour performance */
.particles {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    display: none !important;
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100px);
        opacity: 0;
    }
}

/* Staggered Animations */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    animation: staggerIn 0.6s ease forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes staggerIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* Plus rapide */
}

.hover-lift:hover {
    transform: translateY(-5px); /* Réduit de -10px à -5px */
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.25);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.5);
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Pulse Effect */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

/* Shake Effect */
.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Bounce Effect */
.bounce {
    animation: bounce 1s infinite;
}

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

/* Rotate Effect */
.rotate {
    animation: rotate 2s linear infinite;
}

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

/* Scale Effect */
.scale-in {
    animation: scaleIn 0.5s ease-out;
}

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

/* Slide In Effects */
.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-up {
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in-down {
    animation: slideInDown 0.8s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Fade Effects */
.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-out {
    animation: fadeOut 1s ease-out;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Typing Effect */
.typing {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-color); }
}

/* Gradient Text Animation - Désactivé pour performance */
.gradient-text {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    background-size: 100% 100%; /* Pas d'animation */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* animation: gradientShift 3s ease infinite; */ /* Désactivé */
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
} 