/* =========================================
   SPLASH SCREEN - FRÈRES CONGO
   Ultra Professional Loading Screen
   ========================================= */

/* Splash Screen Container */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a2c4a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    opacity: 1;
    visibility: visible;
    overflow: hidden;
}

/* Animated Background Gradient */
#splash-screen::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(88, 155, 221, 0.15), transparent 60%),
                radial-gradient(circle at 70% 80%, rgba(88, 155, 221, 0.08), transparent 50%),
                radial-gradient(circle at 50% 20%, rgba(88, 155, 221, 0.05), transparent 40%);
    animation: gradientMove 8s ease-in-out infinite alternate;
    z-index: 1;
}

@keyframes gradientMove {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Animated Particles / Dots */
#splash-screen .particles {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

#splash-screen .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(88, 155, 221, 0.3);
    border-radius: 50%;
    animation: floatParticle 6s ease-in-out infinite alternate;
}

@keyframes floatParticle {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0.2;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px) translateX(50px) scale(0.5);
        opacity: 0.2;
    }
}

/* Splash Content */
.splash-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

/* Logo Container */
.splash-logo {
    position: relative;
    margin-bottom: 15px;
}

.splash-logo img {
    height: 100px;
    width: auto;
    animation: logoPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(88, 155, 221, 0.3));
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 30px rgba(88, 155, 221, 0.3));
    }
    50% {
        transform: scale(1.03);
        filter: drop-shadow(0 0 50px rgba(88, 155, 221, 0.5));
    }
}

/* Glowing Ring Around Logo */
.splash-logo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 2px solid rgba(88, 155, 221, 0.15);
    animation: ringPulse 2.5s ease-in-out infinite;
}

.splash-logo::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(88, 155, 221, 0.08);
    animation: ringPulse 2.5s ease-in-out infinite 0.5s;
}

@keyframes ringPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
    }
}

/* Company Name */
.splash-company {
    font-family: 'Roboto', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #589bdd;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 2px;
    animation: fadeInUp 1s ease;
}

.splash-company span {
    color: #ffffff;
}

/* Tagline */
.splash-tagline {
    font-family: 'Urbanist', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease 0.2s both;
}

/* Loading Bar Container */
.splash-loader {
    position: relative;
    width: 280px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    animation: fadeInUp 1s ease 0.3s both;
}

/* Loading Bar Progress */
.splash-loader .progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #589bdd, #3a7bb5, #589bdd);
    background-size: 200% 100%;
    border-radius: 10px;
    animation: progressFill 3.0s ease forwards, shimmer 1.5s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(88, 155, 221, 0.3);
}

@keyframes progressFill {
    0% { width: 0%; }
    20% { width: 15%; }
    40% { width: 35%; }
    60% { width: 55%; }
    80% { width: 75%; }
    100% { width: 100%; }
}

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

/* =========================================
   PROFESSIONAL VEHICLE ANIMATION
   ========================================= */

.splash-car-container {
    position: relative;
    width: 420px;
    height: 100px;
    margin: 12px 0 8px;
    overflow: visible;
    animation: fadeInUp 1s ease 0.4s both;
}

/* Vehicle */
.splash-car {
    position: absolute;
    bottom: -22px;
    left: -220px;
    width: 180px;
    z-index: 5;
    animation: driveCarSmooth 2.8s cubic-bezier(0.42, 0, 0.58, 1) forwards;
}

/* Vehicle image */
.splash-car img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    filter: 
        drop-shadow(0 8px 15px rgba(0,0,0,0.30))
        drop-shadow(0 0 20px rgba(88, 155, 221, 0.15));
}

/* Shadow - closer to the car */
.splash-car::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 20px;
    width: 140px;
    height: 10px;
    background: radial-gradient(
        ellipse at center,
        rgba(0,0,0,0.30),
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(3px);
}

/* Smooth realistic movement */
@keyframes driveCarSmooth {
    0% {
        left: -220px;
        transform: translateY(0);
    }
    10% {
        transform: translateY(-2px);
    }
    20% {
        transform: translateY(0px);
    }
    35% {
        transform: translateY(-3px);
    }
    50% {
        transform: translateY(0px);
    }
    70% {
        transform: translateY(-2px);
    }
    85% {
        transform: translateY(0px);
    }
    100% {
        left: calc(100% + 60px);
        transform: translateY(0);
    }
}

/* Road Line */
.car-road {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        rgba(255,255,255,0.30) 0px,
        rgba(255,255,255,0.30) 28px,
        transparent 28px,
        transparent 48px
    );
    animation: roadMove 0.6s linear infinite;
    border-radius: 20px;
}

@keyframes roadMove {
    0% { background-position: 0 0; }
    100% { background-position: -48px 0; }
}

/* Loading Text with Dots */
.splash-loading-text {
    font-family: 'Urbanist', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    margin-top: 6px;
    animation: fadeInUp 1s ease 0.5s both;
}

.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '...';
    animation: loadingDots 1.4s steps(4, end) infinite;
    display: inline-block;
    width: 24px;
    text-align: left;
}

@keyframes loadingDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

/* Bottom Text */
.splash-footer {
    position: absolute;
    bottom: 30px;
    z-index: 2;
    font-family: 'Urbanist', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: fadeInUp 1s ease 0.8s both;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Splash Screen Hidden State */
#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* =========================================
   RESPONSIVE ADJUSTMENTS
   ========================================= */

@media (max-width: 768px) {
    .splash-logo img {
        height: 75px;
    }
    
    .splash-logo::before {
        width: 150px;
        height: 150px;
    }
    
    .splash-logo::after {
        width: 180px;
        height: 180px;
    }
    
    .splash-company {
        font-size: 22px;
        letter-spacing: 3px;
    }
    
    .splash-tagline {
        font-size: 12px;
        letter-spacing: 2px;
        margin-bottom: 15px;
    }
    
    .splash-loader {
        width: 240px;
    }
    
    .splash-car-container {
        width: 320px;
        height: 80px;
        margin: 10px 0 6px;
    }
    
    .splash-car {
        width: 140px;
        left: -180px;
        bottom: -17px;
    }
    
    .splash-car::after {
        width: 110px;
        height: 8px;
        bottom: -6px;
        left: 15px;
    }
    
    @keyframes driveCarSmooth {
        0% { left: -180px; transform: translateY(0); }
        10% { transform: translateY(-2px); }
        20% { transform: translateY(0px); }
        35% { transform: translateY(-2px); }
        50% { transform: translateY(0px); }
        70% { transform: translateY(-2px); }
        85% { transform: translateY(0px); }
        100% { left: calc(100% + 40px); transform: translateY(0); }
    }
    
    .splash-loading-text {
        font-size: 11px;
        margin-top: 4px;
    }
    
    .splash-footer {
        font-size: 10px;
        bottom: 25px;
    }
}

@media (max-width: 480px) {
    .splash-logo img {
        height: 60px;
    }
    
    .splash-logo::before {
        width: 120px;
        height: 120px;
    }
    
    .splash-logo::after {
        width: 150px;
        height: 150px;
    }
    
    .splash-company {
        font-size: 18px;
        letter-spacing: 2px;
    }
    
    .splash-tagline {
        font-size: 10px;
        letter-spacing: 1.5px;
        margin-bottom: 12px;
    }
    
    .splash-loader {
        width: 200px;
        height: 2px;
    }
    
    .splash-car-container {
        width: 250px;
        height: 65px;
        margin: 8px 0 4px;
        
    }
    
    .splash-car {
        width: 110px;
        left: -140px;
        bottom: -13px;
    }
    
    .splash-car::after {
        width: 85px;
        height: 6px;
        bottom: -5px;
        left: 12px;
        filter: blur(2px);
    }
    
    .car-road {
        height: 3px;
    }
    
    @keyframes driveCarSmooth {
        0% { left: -140px; transform: translateY(0); }
        10% { transform: translateY(-1px); }
        20% { transform: translateY(0px); }
        35% { transform: translateY(-2px); }
        50% { transform: translateY(0px); }
        70% { transform: translateY(-1px); }
        85% { transform: translateY(0px); }
        100% { left: calc(100% + 30px); transform: translateY(0); }
    }
    
    .splash-loading-text {
        font-size: 10px;
        margin-top: 3px;
        letter-spacing: 1px;
    }
    
    .loading-dots::after {
        width: 18px;
    }
    
    .splash-footer {
        font-size: 8px;
        bottom: 15px;
        letter-spacing: 1.5px;
    }
}

@media (max-width: 360px) {
    .splash-logo img {
        height: 50px;
    }
    
    .splash-logo::before {
        width: 100px;
        height: 100px;
    }
    
    .splash-logo::after {
        width: 130px;
        height: 130px;
    }
    
    .splash-company {
        font-size: 16px;
        letter-spacing: 1.5px;
    }
    
    .splash-tagline {
        font-size: 9px;
        letter-spacing: 1px;
        margin-bottom: 10px;
    }
    
    .splash-loader {
        width: 170px;
    }
    
    .splash-car-container {
        width: 200px;
        height: 55px;
        margin: 6px 0 3px;
    }
    
    .splash-car {
        width: 90px;
        left: -120px;
        bottom: -22px;
    }
    
    .splash-car::after {
        width: 70px;
        height: 5px;
        bottom: -4px;
        left: 10px;
        filter: blur(2px);
    }
    
    .car-road {
        height: 2px;
    }
    
    @keyframes driveCarSmooth {
        0% { left: -120px; transform: translateY(0); }
        10% { transform: translateY(-1px); }
        20% { transform: translateY(0px); }
        35% { transform: translateY(-1px); }
        50% { transform: translateY(0px); }
        70% { transform: translateY(-1px); }
        85% { transform: translateY(0px); }
        100% { left: calc(100% + 20px); transform: translateY(0); }
    }
    
    .splash-loading-text {
        font-size: 9px;
    }
    
    .splash-footer {
        font-size: 7px;
        bottom: 12px;
    }
}