/* ==============================================
   GONAGO LOADER - public/css/loader.css
   ============================================== */

/* Container principal du loader */
#page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1e1b4b 100%);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Cacher le contenu principal */
.app-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.app-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.5s ease-in-out;
}

/* Loader caché */
.loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ============ ANIMATIONS ============ */
@keyframes orbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

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

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

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

@keyframes shadow-pulse {
    0%, 100% { transform: scale(1); opacity: 0.25; }
    50% { transform: scale(0.85); opacity: 0.35; }
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.5; }
    100% { transform: scale(1.15); opacity: 0; }
}

@keyframes cloud-drift {
    0% { transform: translateX(0); }
    100% { transform: translateX(30px); }
}

@keyframes road-move {
    0% { stroke-dashoffset: 10; }
    100% { stroke-dashoffset: 0; }
}

@keyframes plane-fly {
    0% { transform: translate(-15px, 10px) scale(0.7); opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { transform: translate(40px, -15px) scale(1); opacity: 0; }
}

@keyframes vehicle-up {
    0% { transform: translateY(0); opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { transform: translate(-5px, -30px); opacity: 0; }
}

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

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.3); }
}

@keyframes fade-slide {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ============ CLASSES D'ANIMATION ============ */
.animate-orbit { animation: orbit 10s linear infinite; }
.animate-orbit-reverse { animation: orbit-reverse 14s linear infinite; }
.animate-spin-slow { animation: spin-slow 20s linear infinite; }
.animate-float { animation: float 4s ease-in-out infinite; }
.animate-bounce-slow { animation: bounce-slow 3s ease-in-out infinite; }
.animate-shadow { animation: shadow-pulse 3s ease-in-out infinite; }
.animate-pulse-ring { animation: pulse-ring 3s ease-out infinite; }
.animate-cloud { animation: cloud-drift 25s linear infinite; }
.animate-road { animation: road-move 1s linear infinite; }
.animate-plane { animation: plane-fly 6s ease-in-out infinite; }
.animate-vehicle-1 { animation: vehicle-up 4s ease-in-out infinite; }
.animate-vehicle-2 { animation: vehicle-up 5s ease-in-out infinite 1.5s; }
.animate-vehicle-3 { animation: vehicle-up 4.5s ease-in-out infinite 3s; }
.animate-shimmer { animation: shimmer 1.2s infinite; }

/* ============ PARTICULES ============ */
.loader-particle {
    position: absolute;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}
.loader-particle:nth-child(4n) { background: #06b6d4; }
.loader-particle:nth-child(4n+1) { background: #f59e0b; }
.loader-particle:nth-child(4n+2) { background: #22c55e; }
.loader-particle:nth-child(4n+3) { background: #a855f7; }

/* ============ LOGO CONTAINER ============ */
.loader-logo-container {
    position: relative;
    width: 16rem;
    height: 16rem;
    margin-bottom: 1.5rem;
}

/* ============ ANNEAUX ============ */
.loader-ring {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-ring-inner {
    border-radius: 50%;
    border-width: 1px;
    border-style: solid;
}

/* ============ TRAIN ORBITAL ============ */
.train-orbit {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 2px dashed rgba(245, 158, 11, 0.3);
}

.train-wagon {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
}

.train-engine {
    width: 20px;
    height: 16px;
    background: #f59e0b;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
}

.train-car {
    width: 12px;
    height: 12px;
    background: #fbbf24;
    border-radius: 2px;
}

/* ============ MODES DE TRANSPORT ============ */
.transport-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.5s ease;
}

.transport-mode.active {
    opacity: 1 !important;
    transform: scale(1.1);
}

.mode-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.transport-mode.active .mode-icon {
    border-color: currentColor;
    box-shadow: 0 0 20px currentColor;
}

/* ============ BARRE DE PROGRESSION ============ */
.loader-progress-container {
    width: 18rem;
    height: 8px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 9999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0 auto;
}

.loader-progress-bar {
    height: 100%;
    border-radius: 9999px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #06b6d4, #3b82f6, #8b5cf6, #a855f7);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.6);
    transition: width 0.1s ease;
}

.loader-progress-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

/* ============ TEXTES ============ */
.loader-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
    letter-spacing: 0.05em;
    text-shadow: 0 0 30px rgba(6, 182, 212, 0.5), 0 0 60px rgba(168, 85, 247, 0.3);
}

.loader-subtitle {
    color: rgba(165, 243, 252, 0.5);
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.loader-message {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 4px 16px;
    border-radius: 9999px;
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.15), rgba(168, 85, 247, 0.15));
    transition: all 0.3s ease;
}

/* ============ INDICATEURS ============ */
.loader-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.loader-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.loader-dot.active {
    transform: scale(1.5);
    box-shadow: 0 0 10px currentColor;
}
