/**
 * splash-screen.css
 * Splash screen animé pour Bokk Dem Customer
 * Gradient animé vert/jaune/rouge inspiré de bokkdem.sn
 */

/* ========================================
   SPLASH SCREEN CONTAINER
   ======================================== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    /* Gradient animé identique à bokkdem.sn - Équilibre parfait des couleurs */
    background: linear-gradient(135deg, #00873E, #FDD835, #D72638, #00873E);
    background-size: 400% 400%;
    animation: gradientShift 6s ease-in-out infinite;

    /* Transition de sortie */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Animation du gradient */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ========================================
   LOGO CONTAINER
   ======================================== */
.splash-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: logoFadeIn 1s ease-out forwards;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ========================================
   LOGO IMAGE
   ======================================== */
.splash-logo {
    width: 180px;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.4));
    }
}

/* ========================================
   BRAND TEXT
   ======================================== */
.splash-brand {
    margin-top: 24px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    animation: textFadeIn 1s ease-out 0.3s forwards;
    opacity: 0;
}

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

/* ========================================
   TAGLINE
   ======================================== */
.splash-tagline {
    margin-top: 12px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
    animation: textFadeIn 1s ease-out 0.5s forwards;
    opacity: 0;
}

/* ========================================
   LOADING INDICATOR
   ======================================== */
.splash-loader {
    position: absolute;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: loaderFadeIn 1s ease-out 0.8s forwards;
    opacity: 0;
}

@keyframes loaderFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Dots loader */
.splash-dots {
    display: flex;
    gap: 8px;
}

.splash-dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.splash-dot:nth-child(1) {
    animation-delay: 0s;
}

.splash-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.splash-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.splash-loading-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.5px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 480px) {
    /* Mobile garde le même gradient que desktop (identique à bokkdem.sn) */
    .splash-logo {
        width: 140px;
    }

    .splash-brand {
        font-size: 26px;
        margin-top: 20px;
    }

    .splash-tagline {
        font-size: 12px;
    }

    .splash-loader {
        bottom: 60px;
    }
}

@media (min-width: 768px) {
    .splash-logo {
        width: 220px;
    }

    .splash-brand {
        font-size: 40px;
    }

    .splash-tagline {
        font-size: 16px;
    }
}

/* ========================================
   DARK THEME SUPPORT
   ======================================== */
[data-theme="dark"] .splash-screen {
    /* Gradient légèrement plus sombre pour le dark mode */
    background: linear-gradient(
        135deg,
        #006B32 0%,
        #006B32 15%,
        #DCBA1E 35%,
        #DCBA1E 50%,
        #B82030 70%,
        #B82030 85%,
        #006B32 100%
    );
    background-size: 400% 400%;
}
