/* ============================================
   DRÉBA VTC - ANIMATIONS MODERNES ET VIVANTES
   Design moderne avec animations fluides
   ============================================ */

/* Variables CSS pour animations */
:root {
    --animation-fast: 0.2s;
    --animation-normal: 0.3s;
    --animation-slow: 0.5s;
    --animation-slower: 0.8s;
    
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

/* ============================================
   ANIMATIONS DE BASE
   ============================================ */

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

@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 slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(254, 196, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(254, 196, 0, 0.8), 0 0 30px rgba(237, 174, 16, 0.6);
    }
}

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

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

/* ============================================
   CLASSES UTILITAIRES D'ANIMATION
   ============================================ */

.animate-fade-in {
    animation: fadeIn var(--animation-normal) var(--ease-smooth);
}

.animate-fade-in-up {
    animation: fadeInUp var(--animation-normal) var(--ease-smooth);
}

.animate-fade-in-down {
    animation: fadeInDown var(--animation-normal) var(--ease-smooth);
}

.animate-slide-in-right {
    animation: slideInRight var(--animation-normal) var(--ease-smooth);
}

.animate-slide-in-left {
    animation: slideInLeft var(--animation-normal) var(--ease-smooth);
}

.animate-scale-in {
    animation: scaleIn var(--animation-normal) var(--ease-smooth);
}

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

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

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

/* ============================================
   TRANSITIONS FLUIDES
   ============================================ */

.transition-smooth {
    transition: all var(--animation-normal) var(--ease-smooth);
}

.transition-fast {
    transition: all var(--animation-fast) var(--ease-smooth);
}

.transition-slow {
    transition: all var(--animation-slow) var(--ease-smooth);
}

/* ============================================
   CARDS ANIMÉES
   ============================================ */

.card-animated {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all var(--animation-normal) var(--ease-smooth);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.card-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(254, 196, 0, 0.1), transparent);
    transition: left 0.5s;
}

.card-animated:hover::before {
    left: 100%;
}

.card-animated:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(237, 174, 16, 0.25);
    border-color: rgba(254, 196, 0, 0.3);
}

.card-animated:active {
    transform: translateY(-4px) scale(1.01);
}

/* Card avec effet glassmorphism */
.card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all var(--animation-normal) var(--ease-smooth);
}

.card-glass:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(237, 174, 16, 0.2);
}

/* ============================================
   BOUTONS ANIMÉS
   ============================================ */

.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all var(--animation-normal) var(--ease-smooth);
    transform: translateZ(0);
}

.btn-animated::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-animated:hover::before {
    width: 300px;
    height: 300px;
}

.btn-animated:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(237, 174, 16, 0.4);
}

.btn-animated:active {
    transform: translateY(0);
}

/* Bouton avec effet shimmer */
.btn-shimmer {
    background: linear-gradient(90deg, #FEC400 0%, #EDAE10 50%, #FEC400 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

.btn-shimmer:hover {
    animation-duration: 1s;
}

/* Bouton avec effet glow */
.btn-glow {
    box-shadow: 0 0 10px rgba(254, 196, 0, 0.5);
    transition: all var(--animation-normal) var(--ease-smooth);
}

.btn-glow:hover {
    box-shadow: 0 0 20px rgba(254, 196, 0, 0.8), 0 0 30px rgba(237, 174, 16, 0.6);
    transform: scale(1.05);
}

/* ============================================
   LOADING ANIMATIONS
   ============================================ */

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

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

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

.loader-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

/* Skeleton loading */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* ============================================
   STATS CARDS ANIMÉES
   ============================================ */

.stat-card-animated {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(237, 174, 16, 0.25);
    transition: all var(--animation-normal) var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.stat-card-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #FEC400, #EDAE10, #F3BD06);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--animation-slow) var(--ease-smooth);
}

.stat-card-animated:hover::after {
    transform: scaleX(1);
}

.stat-card-animated:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(237, 174, 16, 0.2);
    border-color: rgba(254, 196, 0, 0.4);
}

/* ============================================
   BADGES ANIMÉS
   ============================================ */

.badge-animated {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: all var(--animation-fast) var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.badge-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: left 0.3s;
}

.badge-animated:hover::before {
    left: 100%;
}

.badge-animated:hover {
    transform: scale(1.1);
}

/* Badge avec pulse */
.badge-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   INPUTS ANIMÉS
   ============================================ */

.input-animated {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: all var(--animation-normal) var(--ease-smooth);
    background: rgba(255, 255, 255, 0.9);
}

.input-animated:focus {
    outline: none;
    border-color: #FEC400;
    box-shadow: 0 0 0 4px rgba(254, 196, 0, 0.1);
    transform: translateY(-2px);
    background: white;
}

.input-animated::placeholder {
    transition: opacity var(--animation-fast);
}

.input-animated:focus::placeholder {
    opacity: 0.5;
}

/* ============================================
   NAVIGATION ANIMÉE
   ============================================ */

.nav-link-animated {
    position: relative;
    padding: 8px 16px;
    transition: all var(--animation-fast) var(--ease-smooth);
}

.nav-link-animated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #FEC400, #EDAE10);
    transform: translateX(-50%);
    transition: width var(--animation-normal) var(--ease-smooth);
}

.nav-link-animated:hover::after,
.nav-link-animated.active::after {
    width: 80%;
}

.nav-link-animated:hover {
    color: #FEC400;
    transform: translateY(-2px);
}

/* ============================================
   PROGRESS BARS ANIMÉES
   ============================================ */

@keyframes progress {
    from {
        width: 0%;
    }
}

.progress-bar-animated {
    height: 8px;
    background: linear-gradient(90deg, #FEC400, #EDAE10);
    border-radius: 4px;
    animation: progress 1s ease-out;
    position: relative;
    overflow: hidden;
}

.progress-bar-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* ============================================
   MODALS ANIMÉES
   ============================================ */

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-animated {
    animation: modalFadeIn var(--animation-normal) var(--ease-bounce);
}

.modal-backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn var(--animation-fast);
}

/* ============================================
   HERO SECTION ANIMÉE
   ============================================ */

.hero-animated {
    position: relative;
    overflow: hidden;
}

.hero-animated::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(254, 196, 0, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp var(--animation-slower) var(--ease-smooth);
}

/* ============================================
   LIST ITEMS ANIMÉS
   ============================================ */

.list-item-animated {
    transition: all var(--animation-normal) var(--ease-smooth);
    border-left: 3px solid transparent;
}

.list-item-animated:hover {
    border-left-color: #FEC400;
    transform: translateX(5px);
    background: rgba(254, 196, 0, 0.05);
}

/* Stagger animation pour les listes */
.list-item-animated:nth-child(1) { animation-delay: 0.1s; }
.list-item-animated:nth-child(2) { animation-delay: 0.2s; }
.list-item-animated:nth-child(3) { animation-delay: 0.3s; }
.list-item-animated:nth-child(4) { animation-delay: 0.4s; }
.list-item-animated:nth-child(5) { animation-delay: 0.5s; }

/* ============================================
   ICONS ANIMÉES
   ============================================ */

.icon-animated {
    transition: all var(--animation-normal) var(--ease-smooth);
    display: inline-block;
}

.icon-animated:hover {
    transform: scale(1.2) rotate(5deg);
    color: #FEC400;
}

.icon-bounce:hover {
    animation: bounce 0.6s ease-in-out;
}

.icon-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   GRADIENTS ANIMÉS
   ============================================ */

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

.gradient-animated {
    background: linear-gradient(-45deg, #FEC400, #EDAE10, #F3BD06, #FEC400);
    background-size: 400% 400%;
    animation: gradient-shift 5s ease infinite;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--animation-slow) var(--ease-smooth);
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   HOVER EFFECTS
   ============================================ */

.hover-lift {
    transition: all var(--animation-normal) var(--ease-smooth);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: all var(--animation-normal) var(--ease-smooth);
}

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

.hover-glow {
    transition: all var(--animation-normal) var(--ease-smooth);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(254, 196, 0, 0.5);
}

/* ============================================
   RESPONSIVE ANIMATIONS
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   UTILITAIRES
   ============================================ */

.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; }

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

.ease-smooth { animation-timing-function: var(--ease-smooth); }
.ease-bounce { animation-timing-function: var(--ease-bounce); }
.ease-elastic { animation-timing-function: var(--ease-elastic); }
