/* Animations - Animations et transitions */

/* Keyframes */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-left {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fade-in-right {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slide-in-up {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slide-in-down {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

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

/* Animations premium - Effets sophistiqués */

/* Keyframes premium */
@keyframes premium-glow {
    0%, 100% {
        box-shadow: var(--shadow-sm);
    }
    50% {
        box-shadow: var(--shadow-glow);
    }
}

@keyframes premium-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.9;
    }
}

@keyframes premium-slide-in {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes premium-gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

/* Classes d'animation */
.animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out forwards;
    opacity: 0;
}

.animate-fade-in-down {
    animation: fade-in-down 0.6s ease-out forwards;
    opacity: 0;
}

.animate-fade-in-left {
    animation: fade-in-left 0.6s ease-out forwards;
    opacity: 0;
}

.animate-fade-in-right {
    animation: fade-in-right 0.6s ease-out forwards;
    opacity: 0;
}

.animate-fade-in {
    animation: fade-in 0.6s ease-out forwards;
    opacity: 0;
}

.animate-scale-in {
    animation: scale-in 0.4s ease-out forwards;
    opacity: 0;
}

.animate-bounce-in {
    animation: bounce-in 0.6s ease-out forwards;
    opacity: 0;
}

.animate-slide-in-up {
    animation: slide-in-up 0.6s ease-out forwards;
}

.animate-slide-in-down {
    animation: slide-in-down 0.6s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

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

/* Animations premium */
.animate-premium-glow {
    animation: premium-glow 1.5s ease-in-out infinite;
}

.animate-premium-pulse {
    animation: premium-pulse 2s infinite;
}

.animate-premium-slide-in {
    animation: premium-slide-in 0.7s ease-out forwards;
}

.animate-premium-gradient-shift {
    animation: premium-gradient-shift 3s ease-in-out infinite;
}

.animate-premium-float {
    animation: premium-float 3s ease-in-out infinite;
}

.animate-premium-glow-pulse {
    animation: premium-glow-pulse 2s infinite;
}

.animate-premium-glow-drift {
    animation: premium-glow-drift 3s ease-in-out infinite;
}

/* Délais d'animation */
.animate-delay-100 {
    animation-delay: 100ms;
}

.animate-delay-200 {
    animation-delay: 200ms;
}

.animate-delay-300 {
    animation-delay: 300ms;
}

.animate-delay-500 {
    animation-delay: 500ms;
}

.animate-delay-700 {
    animation-delay: 700ms;
}

.animate-delay-1000 {
    animation-delay: 1000ms;
}

/* Durées d'animation */
.animate-duration-fast {
    animation-duration: var(--animation-duration-fast);
}

.animate-duration-normal {
    animation-duration: var(--animation-duration-base);
}

.animate-duration-slow {
    animation-duration: var(--animation-duration-slow);
}

/* Animation au scroll */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Animation de hover pour les cartes */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* Animation de hover pour les boutons */
.hover-scale {
    transition: transform 0.2s ease;
}

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

/* Animation de loading */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: loading-dots 1.4s infinite;
}

@keyframes loading-dots {
    0%, 61.11%, 100% {
        content: '';
    }
    11.11% {
        content: '.';
    }
    22.22% {
        content: '..';
    }
    33.33% {
        content: '...';
    }
}

/* Animation de progress bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Animation de typewriter */
.typewriter {
    border-right: 2px solid var(--primary);
    animation: typewriter-blink 1s infinite;
}

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

/* Animation de parallax */
.parallax {
    transform: translateZ(0);
    transition: transform 0.1s ease-out;
}

/* Réduction des animations pour accessibilité */
@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;
    }
    
    .animate-fade-in-up,
    .animate-fade-in-down,
    .animate-fade-in-left,
    .animate-fade-in-right,
    .animate-fade-in,
    .animate-scale-in,
    .animate-bounce-in {
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    .scroll-animate {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .hover-lift:hover,
    .hover-scale:hover {
        transform: none;
    }
}

/* Animation de toast/notification */
.toast-enter {
    animation: toast-slide-in 0.3s ease-out forwards;
}

.toast-exit {
    animation: toast-slide-out 0.3s ease-in forwards;
}

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

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

/* Animation de modal */
.modal-overlay-enter {
    animation: modal-fade-in 0.3s ease-out forwards;
}

.modal-overlay-exit {
    animation: modal-fade-out 0.3s ease-in forwards;
}

.modal-content-enter {
    animation: modal-scale-in 0.3s ease-out forwards;
}

.modal-content-exit {
    animation: modal-scale-out 0.3s ease-in forwards;
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modal-fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes modal-scale-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modal-scale-out {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-10px);
    }
}
