/* ===== ANIMATIONS AUDIOS V2 ===== */

/* Variables d'animation */
:root {
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-back: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53);
    --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
    --duration-fast: 0.3s;
    --duration-normal: 0.4s;
    --duration-slow: 0.6s;
}

/* Animations d'entrée */
.fade-in {
    animation: fadeIn var(--duration-normal) var(--ease-out-expo) both;
}

.slide-in-up {
    animation: slideInUp var(--duration-slow) var(--ease-out-expo) both;
}

.slide-in-left {
    animation: slideInLeft var(--duration-slow) var(--ease-out-expo) both;
}

.slide-in-right {
    animation: slideInRight var(--duration-slow) var(--ease-out-expo) both;
}

.scale-in {
    animation: scaleIn var(--duration-slow) var(--ease-out-expo) both;
}

.bounce-in {
    animation: bounceIn var(--duration-slow) var(--ease-in-out-back) both;
}

/* Délais d'animation */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* Animations au survol */
.hover-lift {
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
}

.hover-glow {
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.hover-glow:hover {
    box-shadow: 
        0 20px 60px rgba(105, 68, 60, 0.15),
        0 8px 32px rgba(105, 68, 60, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.hover-scale {
    transition: transform var(--duration-fast) var(--ease-out-expo);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Animation de float */
.floating {
    animation: float 3s ease-in-out infinite;
}

.floating-slow {
    animation: float 4s ease-in-out infinite;
}

.floating-delayed {
    animation: float 3.5s ease-in-out infinite 1s;
}

/* Animations de pulse */
.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

.pulse-scale {
    animation: pulseScale 1.5s ease-in-out infinite;
}

/* Animations de rotation */
.rotate-in {
    animation: rotateIn var(--duration-slow) var(--ease-out-expo) both;
}

.spin-slow {
    animation: spin 3s linear infinite;
}

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

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

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

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

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

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

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(105, 68, 60, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(105, 68, 60, 0.4);
    }
}

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

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

/* Animations de chargement */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots > span {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: loadingDots 1.4s ease-in-out infinite both;
}

.loading-dots > span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots > span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Animations de progression */
.progress-bar {
    overflow: hidden;
    position: relative;
}

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

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

/* Animations de particules */
.particle-background {
    position: relative;
    overflow: hidden;
}

.particle-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(105, 68, 60, 0.1) 2px, transparent 3px),
        radial-gradient(circle at 80% 20%, rgba(139, 111, 99, 0.1) 1px, transparent 2px),
        radial-gradient(circle at 40% 40%, rgba(105, 68, 60, 0.05) 1px, transparent 2px);
    background-size: 100px 100px, 150px 150px, 80px 80px;
    animation: particlesFloat 20s linear infinite;
    pointer-events: none;
}

@keyframes particlesFloat {
    0% {
        transform: translateY(0) translateX(0);
    }
    33% {
        transform: translateY(-10px) translateX(5px);
    }
    66% {
        transform: translateY(-5px) translateX(-3px);
    }
    100% {
        transform: translateY(0) translateX(0);
    }
}

/* Animations de modal */
.modal-backdrop {
    animation: fadeIn 0.3s ease both;
}

.modal-content {
    animation: modalSlideIn 0.4s var(--ease-out-expo) both;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animations de confetti */
.confetti {
    position: fixed;
    top: -10px;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--primary);
    animation: confettiFall 3s linear infinite;
    pointer-events: none;
}

@keyframes confettiFall {
    0% {
        transform: translateX(-50%) translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Animations responsives */
@media (max-width: 768px) {
    .slide-in-up {
        animation: slideInUpMobile var(--duration-normal) var(--ease-out-expo) both;
    }
    
    @keyframes slideInUpMobile {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .hover-lift:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

/* Préférences de mouvement réduit */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating,
    .floating-slow,
    .floating-delayed {
        animation: none;
    }
    
    .pulse-glow,
    .pulse-scale {
        animation: none;
    }
}

/* Export */
.animations-loaded {
    --animations-ready: true;
}