/* ===================================
   Animations - Animations zen et fluides
   =================================== */

/* ========== ANIMATIONS DE BASE ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes fadeInDown {
    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 slideInBottom {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ========== ANIMATIONS ZEN ========== */
@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

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

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(193, 126, 114, 0.7);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(193, 126, 114, 0);
    }
}

@keyframes waterRipple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes zenReveal {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========== ANIMATIONS HERO ========== */
.animate-fade-up {
    animation: fadeInUp 1s ease-out forwards;
}

.animate-fade-up-delay {
    animation: fadeInUp 1s ease-out 0.3s forwards;
    opacity: 0;
}

.animate-scale-x {
    animation: scaleXIn 1s ease-out 0.6s forwards;
    transform-origin: center;
    transform: scaleX(0);
}

@keyframes scaleXIn {
    to {
        transform: scaleX(1);
    }
}

.animate-bounce {
    animation: gentleBounce 2s infinite;
}

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

/* Animation bounce spécifique pour le bouton scroll hero */
@keyframes gentleBounceHero {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ========== SCROLL ANIMATIONS ========== */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out-expo);
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Forcer la visibilité si JavaScript ne fonctionne pas */
.no-js .scroll-animate {
    opacity: 1;
    transform: none;
}

.scroll-animate-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s var(--ease-out-expo);
}

.scroll-animate-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s var(--ease-out-expo);
}

.scroll-animate-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s var(--ease-out-expo);
}

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

/* ========== STAGGER ANIMATIONS ========== */
.stagger-animate {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-animate.visible {
    animation: zenReveal 0.6s ease-out forwards;
}

/* Forcer la visibilité pour les sections critiques */
#massagesGrid .stagger-animate {
    opacity: 1 !important;
    transform: none !important;
}

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

/* ========== HOVER EFFECTS ========== */
.hover-breathe:hover {
    animation: breathe 3s infinite;
}

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

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

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

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(193, 126, 114, 0.4);
}

/* ========== PARALLAX EFFECT ========== */
.parallax {
    transition: transform 0.5s ease-out;
}

.parallax-slow {
    transition: transform 0.8s ease-out;
}

.parallax-fast {
    transition: transform 0.3s ease-out;
}

/* ========== LOADING STATES ========== */
.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--color-light-gray);
}

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

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

/* ========== PARTICLE EFFECTS ========== */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 50%;
    opacity: 0;
    animation: particle-float 10s infinite;
}

@keyframes particle-float {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 0.5;
        transform: scale(1);
    }
    90% {
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) scale(0);
    }
}

/* ========== SMOOTH TRANSITIONS ========== */
.smooth-transition {
    transition: all 0.3s var(--ease-out-expo);
}

.smooth-transition-slow {
    transition: all 0.6s var(--ease-out-expo);
}

.smooth-transition-slower {
    transition: all 0.9s var(--ease-out-expo);
}

/* ========== TRANSFORM ORIGIN UTILITIES ========== */
.origin-center { transform-origin: center; }
.origin-top { transform-origin: top; }
.origin-bottom { transform-origin: bottom; }
.origin-left { transform-origin: left; }
.origin-right { transform-origin: right; }
.origin-top-left { transform-origin: top left; }
.origin-top-right { transform-origin: top right; }
.origin-bottom-left { transform-origin: bottom left; }
.origin-bottom-right { transform-origin: bottom right; }

/* ========== ANIMATION UTILITIES ========== */
.animation-delay-100 { animation-delay: 100ms; }
.animation-delay-200 { animation-delay: 200ms; }
.animation-delay-300 { animation-delay: 300ms; }
.animation-delay-400 { animation-delay: 400ms; }
.animation-delay-500 { animation-delay: 500ms; }
.animation-delay-600 { animation-delay: 600ms; }
.animation-delay-700 { animation-delay: 700ms; }
.animation-delay-800 { animation-delay: 800ms; }
.animation-delay-900 { animation-delay: 900ms; }
.animation-delay-1000 { animation-delay: 1000ms; }

/* ========== PERFORMANCE OPTIMIZATIONS ========== */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
}