/* ===== ANIMATIONS KEYFRAMES ===== */

/* Loader Animations */
@keyframes truckMove {
    0%, 100% { transform: translateX(0) translateZ(0); }
    25% { transform: translateX(15px) translateZ(0); }
    50% { transform: translateX(30px) translateZ(0); }
    75% { transform: translateX(15px) translateZ(0); }
}

@keyframes truckBounce {
    0%, 100% { transform: translateY(0) translateZ(0); }
    50% { transform: translateY(-3px) translateZ(0); }
}

@keyframes wheelSpin {
    0% { transform: rotate(0deg) translateZ(0); }
    100% { transform: rotate(360deg) translateZ(0); }
}

@keyframes textPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Hero Animations */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes titleReveal {
    0% {
        opacity: 0;
        transform: translateY(50px) rotateX(90deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(1deg);
    }
    66% {
        transform: translateY(-10px) rotate(-1deg);
    }
}



@keyframes scrollBounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(10px);
        opacity: 0.7;
    }
}

/* Section Animations */
@keyframes tagFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Particle System Animation */
@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Morphing Shapes */
@keyframes morphShape {
    0%, 100% {
        border-radius: 50% 50% 50% 50%;
        transform: rotate(0deg);
    }
    25% {
        border-radius: 60% 40% 60% 40%;
        transform: rotate(90deg);
    }
    50% {
        border-radius: 40% 60% 40% 60%;
        transform: rotate(180deg);
    }
    75% {
        border-radius: 50% 50% 30% 70%;
        transform: rotate(270deg);
    }
}

/* Glitch Effect */
@keyframes glitch {
    0%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
}

/* Neon Glow Effect */
@keyframes neonGlow {
    0%, 100% {
        box-shadow: 
            0 0 5px var(--secondary-color),
            0 0 10px var(--secondary-color),
            0 0 15px var(--secondary-color);
    }
    50% {
        box-shadow: 
            0 0 10px var(--secondary-color),
            0 0 20px var(--secondary-color),
            0 0 30px var(--secondary-color),
            0 0 40px var(--secondary-color);
    }
}

/* Typing Effect */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 50% { border-color: transparent; }
    51%, 100% { border-color: var(--secondary-color); }
}

/* Liquid Animation */
@keyframes liquidMove {
    0%, 100% {
        transform: translateX(0) scale(1);
    }
    25% {
        transform: translateX(10px) scale(1.1);
    }
    50% {
        transform: translateX(0) scale(0.9);
    }
    75% {
        transform: translateX(-10px) scale(1.1);
    }
}

/* Matrix Rain Effect */
@keyframes matrixRain {
    0% {
        transform: translateY(-100vh);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Holographic Effect */
@keyframes holographic {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Magnetic Field Effect */
@keyframes magneticField {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: hue-rotate(0deg);
    }
    25% {
        transform: scale(1.05) rotate(90deg);
        filter: hue-rotate(90deg);
    }
    50% {
        transform: scale(0.95) rotate(180deg);
        filter: hue-rotate(180deg);
    }
    75% {
        transform: scale(1.05) rotate(270deg);
        filter: hue-rotate(270deg);
    }
}

/* Quantum Tunnel Effect */
@keyframes quantumTunnel {
    0% {
        transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateZ(0px);
        opacity: 1;
    }
    50% {
        transform: perspective(1000px) rotateX(180deg) rotateY(180deg) translateZ(-200px);
        opacity: 0.5;
    }
    100% {
        transform: perspective(1000px) rotateX(360deg) rotateY(360deg) translateZ(0px);
        opacity: 1;
    }
}

/* DNA Helix Animation */
@keyframes dnaHelix {
    0% {
        transform: rotateY(0deg) rotateX(0deg);
    }
    25% {
        transform: rotateY(90deg) rotateX(15deg);
    }
    50% {
        transform: rotateY(180deg) rotateX(0deg);
    }
    75% {
        transform: rotateY(270deg) rotateX(-15deg);
    }
    100% {
        transform: rotateY(360deg) rotateX(0deg);
    }
}

/* Plasma Wave Effect */
@keyframes plasmaWave {
    0%, 100% {
        background: radial-gradient(circle at 20% 50%, var(--primary-color) 0%, transparent 50%),
                    radial-gradient(circle at 80% 50%, var(--secondary-color) 0%, transparent 50%);
    }
    25% {
        background: radial-gradient(circle at 50% 20%, var(--primary-color) 0%, transparent 50%),
                    radial-gradient(circle at 50% 80%, var(--secondary-color) 0%, transparent 50%);
    }
    50% {
        background: radial-gradient(circle at 80% 50%, var(--primary-color) 0%, transparent 50%),
                    radial-gradient(circle at 20% 50%, var(--secondary-color) 0%, transparent 50%);
    }
    75% {
        background: radial-gradient(circle at 50% 80%, var(--primary-color) 0%, transparent 50%),
                    radial-gradient(circle at 50% 20%, var(--secondary-color) 0%, transparent 50%);
    }
}

/* Cyberpunk Grid */
@keyframes cyberpunkGrid {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 50px 50px, 50px 50px;
    }
}

/* Tilt Effect */
@keyframes tilt {
    0%, 100% {
        transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
    }
    50% {
        transform: perspective(1000px) rotateX(0deg) rotateY(10deg);
    }
    75% {
        transform: perspective(1000px) rotateX(-5deg) rotateY(5deg);
    }
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Magnetic Hover Effect */
.magnetic-hover {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.magnetic-hover:hover {
    animation: magneticField 2s ease-in-out infinite;
}

/* Parallax Scroll Effect */
.parallax-element {
    transform: translateZ(0);
    transition: transform 0.1s ease-out;
}

/* Intersection Observer Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

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

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

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

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

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

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease-out;
}

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

.rotate-in {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
    transition: all 1s ease-out;
}

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

/* Stagger Animation */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.stagger-item.animate {
    opacity: 1;
    transform: translateY(0);
}

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

/* Morphing Button */
.morph-button {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.morph-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.morph-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Glowing Border */
.glow-border {
    position: relative;
    background: linear-gradient(45deg, transparent, var(--secondary-color), transparent);
    background-size: 400% 400%;
    animation: holographic 3s ease-in-out infinite;
}

.glow-border::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: var(--white);
    border-radius: inherit;
    z-index: -1;
}

/* Particle System - DISABLED */
/*
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 8s linear infinite;
}

.particle:nth-child(odd) {
    background: var(--primary-color);
    animation-duration: 10s;
}

.particle:nth-child(3n) {
    width: 6px;
    height: 6px;
    animation-duration: 12s;
}
*/

/* Liquid Morphing */
.liquid-shape {
    background: var(--gradient-secondary);
    animation: liquidMove 4s ease-in-out infinite;
    filter: blur(1px);
}

/* Hologram Effect */
.hologram {
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    background-size: 200% 200%;
    animation: holographic 2s linear infinite;
}

/* 3D Flip Card */
.flip-card {
    perspective: 1000px;
    width: 100%;
    height: 200px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card-back {
    background: var(--gradient-primary);
    color: var(--white);
    transform: rotateY(180deg);
}

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

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

/* Elastic Animation */
@keyframes elastic {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.25);
    }
    40% {
        transform: scale(0.75);
    }
    50% {
        transform: scale(1.15);
    }
    65% {
        transform: scale(0.95);
    }
    75% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.elastic-hover:hover {
    animation: elastic 0.8s ease-out;
}

/* Performance Optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

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

/* ===== MODERN 2025 CAROUSEL TRANSITIONS ===== */

/* Effet de Zoom élégant et fluide */
@keyframes smoothZoomEffect {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-background.changing.zoom-effect {
    animation: smoothZoomEffect 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Amélioration des indicateurs avec animation fluide */
.indicator {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.indicator.active {
    animation: indicatorPulse 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes indicatorPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5);
    }
    100% {
        transform: scale(1.3);
    }
}

/* Effet de hover modernisé pour les boutons carousel */
.carousel-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-btn:active {
    transform: scale(0.95);
}

/* Reduced Motion Support */
@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 les effets complexes en mode reduced motion */
    .hero-background.changing {
        animation: none !important;
        opacity: 0.5;
        transition: opacity 0.3s ease;
    }
}