/* ===== ANIMATIONS PROFESSIONNELLES ONETECH ===== */

/* Variables pour animations */
:root {
    --animation-duration: 0.6s;
    --animation-easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --animation-easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --animation-easing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== ANIMATIONS D'ENTRÉE ===== */

/* Fade In Up - Animation principale */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(60px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Down - Pour le header */
@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-60px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In Left */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Right */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In - Pour les cartes */
@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate In - Pour les icônes */
@keyframes rotateIn {
    0% {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Bounce In - Pour les boutons */
@keyframes bounceIn {
    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);
    }
}

/* Slide In Stagger - Pour les listes */
@keyframes slideInStagger {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CLASSES D'ANIMATION ===== */

/* Animation principale */
.animate-fadeInUp {
    animation: fadeInUp var(--animation-duration) var(--animation-easing) forwards;
    opacity: 0;
}

.animate-fadeInDown {
    animation: fadeInDown var(--animation-duration) var(--animation-easing) forwards;
    opacity: 0;
}

.animate-slideInLeft {
    animation: slideInLeft var(--animation-duration) var(--animation-easing) forwards;
    opacity: 0;
}

.animate-slideInRight {
    animation: slideInRight var(--animation-duration) var(--animation-easing) forwards;
    opacity: 0;
}

.animate-scaleIn {
    animation: scaleIn 0.8s var(--animation-easing-bounce) forwards;
    opacity: 0;
}

.animate-rotateIn {
    animation: rotateIn 1s var(--animation-easing-bounce) forwards;
    opacity: 0;
}

.animate-bounceIn {
    animation: bounceIn 0.8s var(--animation-easing-bounce) forwards;
    opacity: 0;
}

.animate-slideInStagger {
    animation: slideInStagger 0.6s var(--animation-easing) forwards;
    opacity: 0;
}

/* ===== 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; }
.delay-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }

/* ===== ANIMATIONS HOVER PROFESSIONNELLES ===== */

/* Hover pour les cartes */
.card-hover {
    transition: all 0.4s var(--animation-easing-smooth);
    transform: translateY(0);
}

.card-hover:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Hover pour les boutons */
.btn-hover {
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--animation-easing);
    transform: translateY(0);
}

.btn-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-hover:hover::before {
    left: 100%;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 149, 0, 0.3);
}

/* Hover pour les images */
.image-hover {
    overflow: hidden;
    transition: all 0.3s var(--animation-easing);
}

.image-hover img {
    transition: transform 0.5s var(--animation-easing);
}

.image-hover:hover img {
    transform: scale(1.1);
}

/* Hover pour les icônes */
.icon-hover {
    transition: all 0.3s var(--animation-easing-bounce);
}

.icon-hover:hover {
    transform: scale(1.2) rotate(10deg);
    color: var(--primary-orange);
}

/* ===== ANIMATIONS SPÉCIALES ===== */

/* Animation de typing pour le texte */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

.typing-animation {
    overflow: hidden;
    border-right: 3px solid var(--primary-orange);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-orange); }
}

/* Animation de compteur pour les statistiques */
.counter-animation {
    font-variant-numeric: tabular-nums;
}

/* Animation de pulsation pour les éléments importants */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Animation de shake pour les erreurs */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-animation {
    animation: shake 0.6s ease-in-out;
}

/* ===== ANIMATIONS DE NAVIGATION ===== */

/* Menu mobile slide */
.nav-slide-in {
    animation: slideInRight 0.3s var(--animation-easing) forwards;
}

.nav-slide-out {
    animation: slideInLeft 0.3s var(--animation-easing) reverse forwards;
}

/* Dropdown animation */
.dropdown-slide {
    animation: fadeInUp 0.3s var(--animation-easing) forwards;
    transform-origin: top;
}

/* ===== ANIMATIONS DE SCROLL ===== */

/* Progress bar animation */
@keyframes progressBar {
    0% { width: 0%; }
    100% { width: 100%; }
}

.progress-animation {
    animation: progressBar 2s var(--animation-easing) forwards;
}

/* ===== OPTIMISATIONS PERFORMANCE ===== */

/* GPU Acceleration */
.gpu-optimized {
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Smooth transitions */
.smooth-transition {
    transition: all 0.3s var(--animation-easing-smooth);
}

/* ===== ANIMATIONS RESPONSIVE ===== */

/* Désactiver les animations sur mobile faible performance */
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
    .animate-fadeInUp,
    .animate-slideInLeft,
    .animate-slideInRight,
    .animate-scaleIn {
        animation-duration: 0.4s;
    }
}

/* Réduction des animations pour l'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;
    }
}

/* ===== ANIMATIONS DE CHARGEMENT ===== */

/* Skeleton loading */
@keyframes skeletonLoading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeletonLoading 1.5s infinite;
}

/* Spinner loading */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* ===== ÉTATS D'ANIMATION ===== */

/* État initial - masqué */
.animate-hidden {
    opacity: 0;
    visibility: hidden;
}

/* État visible */
.animate-visible {
    opacity: 1;
    visibility: visible;
}

/* Classes utilitaires */
.no-animation {
    animation: none !important;
    transition: none !important;
}

.pause-animation {
    animation-play-state: paused;
}