/* loader.css */

/* Le conteneur qui couvre tout l'écran */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color); /* S'adapte au thème */
    color: var(--text-color);
    z-index: 99999; /* Au-dessus de tout, même la nav */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Le texte du pourcentage */
.loader-text {
    font-family: 'Clash Display', sans-serif;
    font-size: 8vw; /* Gros et responsive */
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -2px;
    font-variant-numeric: tabular-nums; /* Empêche les chiffres de sauter */
}

/* La barre de progression */
.loader-bar-bg {
    width: 250px;
    height: 4px;
    background: rgba(128, 128, 128, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.loader-bar-fill {
    width: 0%;
    height: 100%;
    background-color: var(--accent-color);
    transition: width 0.1s linear;
}

/* Texte "Chargement" en dessous */
.loader-sub {
    margin-top: 15px;
    font-family: monospace;
    text-transform: uppercase;
    font-size: 0.9rem;
    opacity: 0.7;
    letter-spacing: 2px;
}

/* Classe ajoutée via JS pour cacher le loader */
.loader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}