/**
 * DECIDAUTO - Styles ULTRA-PRO
 * Design français premium avec animations
 */

/* ========================================
   1. ANIMATIONS FADE-IN
   ======================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ========================================
   2. CARTES 3D HOVER
   ======================================== */
.card-3d {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.card-3d:hover {
    box-shadow: 0 20px 40px rgba(0, 85, 164, 0.2);
}

/* ========================================
   3. TOOLTIPS CUSTOM
   ======================================== */
.tooltip-custom {
    position: fixed;
    background: linear-gradient(135deg, #0055A4, #003875);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transform: translateX(-50%) translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 9999;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltip-custom::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #0055A4;
}

.tooltip-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========================================
   4. SKELETON LOADERS
   ======================================== */
.skeleton-loading {
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-item {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
    height: 60px;
    margin-bottom: 12px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ========================================
   5. TOAST NOTIFICATIONS
   ======================================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 10000;
    max-width: 400px;
}

.toast-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.toast-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.toast-show {
    transform: translateX(0);
    opacity: 1;
}

/* ========================================
   6. RIPPLE EFFECT
   ======================================== */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ========================================
   7. PARTICULES BACKGROUND
   ======================================== */
.particles-bg {
    position: relative;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(0, 85, 164, 0.3), transparent);
    border-radius: 50%;
    animation: particle-float linear infinite;
    pointer-events: none;
}

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

/* ========================================
   8. HEADER STICKY avec shadow
   ======================================== */
.header-scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

/* ========================================
   9. PROGRESS BARS améliorées
   ======================================== */
[data-progress-bar] {
    position: relative;
    overflow: hidden;
}

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

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ========================================
   10. BADGES animés
   ======================================== */
.badge-animate {
    animation: badge-pop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badge-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   11. GLASSMORPHISM
   ======================================== */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ========================================
   12. GRADIENTS FRANÇAIS
   ======================================== */
.gradient-france {
    background: linear-gradient(135deg, #0055A4 0%, #FFFFFF 50%, #EF4135 100%);
}

.gradient-france-blue {
    background: linear-gradient(135deg, #0055A4, #003875);
}

.gradient-france-red {
    background: linear-gradient(135deg, #EF4135, #C22E2A);
}

/* ========================================
   13. SHINE EFFECT sur texte
   ======================================== */
.text-shine {
    background: linear-gradient(
        90deg,
        #0055A4 0%,
        #FFFFFF 50%,
        #0055A4 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-shine 3s linear infinite;
}

@keyframes text-shine {
    to {
        background-position: 200% center;
    }
}

/* ========================================
   14. PULSE EFFECT
   ======================================== */
.pulse-france {
    animation: pulse-france 2s infinite;
}

@keyframes pulse-france {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 85, 164, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(0, 85, 164, 0);
    }
}

/* ========================================
   15. SCROLL INDICATOR
   ======================================== */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0055A4, #EF4135);
    transform-origin: left;
    z-index: 9999;
}

/* ========================================
   16. BOUTONS PREMIUM
   ======================================== */
.btn-premium {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

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

/* ========================================
   17. LOADING SPINNER français
   ======================================== */
.spinner-france {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0055A4;
    border-right: 4px solid #FFFFFF;
    border-bottom: 4px solid #EF4135;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   18. RESPONSIVE OPTIMIZATIONS
   ======================================== */
@media (max-width: 768px) {
    .toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: calc(100% - 32px);
    }

    .card-3d:hover {
        transform: none;
    }

    .particle {
        display: none; /* Désactiver particules sur mobile */
    }
}

/* ========================================
   19. PRINT STYLES
   ======================================== */
@media print {
    .tooltip-custom,
    .toast,
    .ripple-effect,
    .particle,
    .scroll-indicator {
        display: none !important;
    }

    .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
}

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

    .particle {
        display: none;
    }
}

/* Focus visible pour accessibilité clavier */
*:focus-visible {
    outline: 3px solid #0055A4;
    outline-offset: 2px;
}
