/* ============================================================================
   PAGE LOADER - SYSTÈME DE CHARGEMENT PROFESSIONNEL
   ============================================================================ */

#pageLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Le background est défini inline avec les couleurs dynamiques */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#pageLoader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.store-icon {
    animation: logoFade 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.store-name {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    animation: logoFade 2s ease-in-out infinite;
    animation-delay: 0.2s;
}

@keyframes logoFade {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

.loader-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    position: relative;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: rgba(255, 255, 255, 0.8);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    font-size: 1rem;
    font-weight: 500;
    margin-top: 15px;
    letter-spacing: 1px;
    animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 20px auto 0;
    overflow: hidden;
}


.loader-progress-bar {
    height: 100%;
    background: white;
    border-radius: 10px;
    width: 0%;
    animation: progressLoad 1.2s cubic-bezier(0.4,0,0.2,1) forwards;
}

@keyframes progressLoad {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Variante avec dots animés */
.loader-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}

.loader-dot {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.loader-dot:nth-child(1) { animation-delay: 0s; }
.loader-dot:nth-child(2) { animation-delay: 0.2s; }
.loader-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1.2); opacity: 1; }
}
