/* ===== ANIMATIONS ===== */

/* Animation de flottement */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Animation de pulsation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 102, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(0, 102, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 255, 0);
    }
}

/* Animation de rebond */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Animation d'apparition en fondu */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animation de glissement depuis la gauche */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation de glissement depuis la droite */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation de glissement depuis le bas */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation de rotation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animation d'échelle */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation de secousse */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Animation de rebondissement */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* Animation de rebondissement depuis le bas */
@keyframes bounceInUp {
    0% {
        opacity: 0;
        transform: translateY(200px);
    }
    60% {
        opacity: 1;
        transform: translateY(-20px);
    }
    80% {
        transform: translateY(10px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Animation de rebondissement depuis la gauche */
@keyframes bounceInLeft {
    0% {
        opacity: 0;
        transform: translateX(-200px);
    }
    60% {
        opacity: 1;
        transform: translateX(20px);
    }
    80% {
        transform: translateX(-10px);
    }
    100% {
        transform: translateX(0);
    }
}

/* Animation de rebondissement depuis la droite */
@keyframes bounceInRight {
    0% {
        opacity: 0;
        transform: translateX(200px);
    }
    60% {
        opacity: 1;
        transform: translateX(-20px);
    }
    80% {
        transform: translateX(10px);
    }
    100% {
        transform: translateX(0);
    }
}

/* Animation de zoom au survol */
.hover-zoom {
    transition: transform 0.3s ease;
}

.hover-zoom:hover {
    transform: scale(1.05);
}

/* Animation de soulignement au survol */
.hover-underline {
    position: relative;
    display: inline-block;
}

.hover-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.hover-underline:hover::after {
    width: 100%;
}

/* Animation de flottement au survol */
.hover-float {
    transition: transform 0.3s ease;
}

.hover-float:hover {
    transform: translateY(-5px);
}

/* Animation d'opacité au survol */
.hover-fade {
    transition: opacity 0.3s ease;
}

.hover-fade:hover {
    opacity: 0.8;
}

/* Animation de rotation au survol */
.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Animation de secousse au survol */
.hover-shake:hover {
    animation: shake 0.5s ease-in-out;
}

/* Animation de rebondissement au survol */
.hover-bounce:hover {
    animation: bounce 0.5s ease;
}

/* Animation de pulsation infinie */
.pulse-infinite {
    animation: pulse 2s infinite;
}

/* Animation de rotation infinie */
.rotate-infinite {
    animation: rotate 3s linear infinite;
}

/* 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;
}

/* Durées d'animation */
.duration-500 {
    animation-duration: 0.5s;
}

.duration-700 {
    animation-duration: 0.7s;
}

.duration-1000 {
    animation-duration: 1s;
}

.duration-1500 {
    animation-duration: 1.5s;
}

/* Classes utilitaires d'animation */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

.animate-slide-in-up {
    animation: slideInUp 0.6s ease-out forwards;
}

.animate-bounce-in {
    animation: bounceIn 0.6s ease-out forwards;
}

.animate-bounce-in-up {
    animation: bounceInUp 0.8s ease-out forwards;
}

.animate-bounce-in-left {
    animation: bounceInLeft 0.8s ease-out forwards;
}

.animate-bounce-in-right {
    animation: bounceInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

/* Animation de chargement */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: rotate 1s linear infinite;
    margin: 0 auto;
}

/* Animation de progression */
@keyframes progress {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

.progress-bar {
    height: 4px;
    background: rgba(0, 102, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0;
    border-radius: 2px;
    animation: progress 1.5s ease-out forwards;
}

/* Animation de vague */
@keyframes wave {
    0% {
        transform: translateX(-100%);
    }
    60% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.wave-effect {
    position: relative;
    overflow: hidden;
}

.wave-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: wave 1.5s linear infinite;
}

/* Animation de rebond doux */
@keyframes gentleBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.gentle-bounce {
    animation: gentleBounce 3s ease-in-out infinite;
}

/* Animation de flottement doux */
@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.gentle-float {
    animation: gentleFloat 6s ease-in-out infinite;
}

/* Animation de battement de cœur */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.1);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(1);
    }
}

.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* Animation de rebondissement élastique */
@keyframes rubberBand {
    from {
        transform: scale3d(1, 1, 1);
    }
    30% {
        transform: scale3d(1.25, 0.75, 1);
    }
    40% {
        transform: scale3d(0.75, 1.25, 1);
    }
    50% {
        transform: scale3d(1.15, 0.85, 1);
    }
    65% {
        transform: scale3d(0.95, 1.05, 1);
    }
    75% {
        transform: scale3d(1.05, 0.95, 1);
    }
    to {
        transform: scale3d(1, 1, 1);
    }
}

.rubber-band {
    animation: rubberBand 1s ease-out;
}

/* Animation de flash */
@keyframes flash {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.5;
    }
}

.flash {
    animation: flash 2s ease-in-out infinite;
}
