
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Logo principal */
.preloader-logo {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 2rem;
    text-align: center;
    animation: logoFade 2s ease-in-out infinite;
}

@keyframes logoFade {
    0%, 100% { opacity: 0.7; transform: scale(1); color: #1f2937; }
    50% { opacity: 1; transform: scale(1.02); color: #fbbf24; }
}

/* Container principal du loader */
.loader-container {
    position: relative;
    width: 200px;
    height: 80px;
    margin-bottom: 2rem;
}

/* Remorque simplifiée et moderne */
.modern-trailer {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 40px;
    background: linear-gradient(145deg, #fbbf24, #f59e0b);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
    animation: trailerMove 2s ease-in-out infinite;
}

.modern-trailer::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: 4px;
    background: #9ca3af;
    border-radius: 2px;
}

.modern-trailer::after {
    content: '';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #6b7280;
    border-radius: 50%;
}

@keyframes trailerMove {
    0%, 100% { transform: translate(-50%, -50%) translateX(-10px); }
    50% { transform: translate(-50%, -50%) translateX(10px); }
}

/* Roues modernes */
.modern-wheel {
    position: absolute;
    bottom: -8px;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, #6b7280 40%, #374151 100%);
    border-radius: 50%;
    border: 2px solid #1f2937;
    animation: wheelSpin 0.6s linear infinite;
}

.modern-wheel.left { left: 20px; }
.modern-wheel.right { right: 20px; }

@keyframes wheelSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Barre de progression moderne */
.progress-container {
    width: 200px;
    height: 3px;
    background: rgba(31, 41, 55, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #fbbf24);
    background-size: 200% 100%;
    border-radius: 2px;
    animation: progressFlow 2s ease-in-out infinite;
    width: 0%;
    transition: width 0.3s ease;
}

@keyframes progressFlow {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Texte de chargement épuré */
.loading-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7280;
    text-align: center;
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Points animés */
.loading-dots {
    display: inline-block;
    margin-left: 4px;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Particules flottantes subtiles */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(251, 191, 36, 0.3);
    border-radius: 50%;
    animation: float 4s linear infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 0.5s; }
.particle:nth-child(3) { left: 30%; animation-delay: 1s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1.5s; }
.particle:nth-child(5) { left: 50%; animation-delay: 2s; }
.particle:nth-child(6) { left: 60%; animation-delay: 2.5s; }
.particle:nth-child(7) { left: 70%; animation-delay: 3s; }
.particle:nth-child(8) { left: 80%; animation-delay: 3.5s; }

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(90vh) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateY(10vh) scale(1);
    }
    100% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .preloader-logo {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .loader-container {
        width: 160px;
        height: 60px;
        margin-bottom: 1.5rem;
    }
    
    .modern-trailer {
        width: 100px;
        height: 32px;
    }
    
    .modern-wheel {
        width: 14px;
        height: 14px;
        bottom: -7px;
    }
    
    .progress-container {
        width: 160px;
    }
    
    .loading-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .preloader-logo {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .loader-container {
        width: 140px;
        height: 50px;
        margin-bottom: 1rem;
    }
    
    .modern-trailer {
        width: 80px;
        height: 28px;
    }
    
    .modern-wheel {
        width: 12px;
        height: 12px;
        bottom: -6px;
    }
    
    .progress-container {
        width: 140px;
    }
    
    .loading-text {
        font-size: 0.75rem;
    }
}