.overlay {
    display: none; /* Masqué par défaut */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6); /* Fond sombre transparent */
    backdrop-filter: blur(4px); /* Effet flouté moderne */
    z-index: 9999;
    /* Centrage parfait du contenu */
    align-items: center;
    justify-content: center;
}

/* Modal / Carte centrale */
.overlay-content {
    background-color: #ffffff;
    padding: 28px 40px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-width: 240px;
}

/* Texte de chargement */
.overlay-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color, #1e293b);
    font-family: inherit;
}

/* Spinner de chargement vectoriel (remplace le GIF) */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid var(--primary-color, #0284c7); /* Couleur principale */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Animation de rotation du spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.overlay.active {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important; /* Bloque les clics sur l'écran pendant le chargement */
}
