/* --- 1. Ton loader d'origine (intact) --- */

.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 32px;
    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;
    max-width: 440px;
    width: 90%;
    text-align: center;    
    box-sizing: border-box;
}

/* Texte de chargement */
.overlay-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color, #1e293b);
    font-family: inherit;
}

/* Spinner de chargement vectoriel */
.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 */
}


/* --- 2. Éléments spécifiques ajoutés pour la modale de confirmation --- */

.custom-modal-title {
    margin: 0;
    font-size: 1.50rem;
    font-weight: 600;
    color: #1e293b;
}

.custom-modal-text {
    margin: 0;
    font-size: 1.25rem;
    color: #475569;
    line-height: 1.5;
}

.custom-modal-question {
    margin: 4px 0 24px 0;
    font-size: 0.95rem;
    color: #64748b; /* Un gris un peu plus léger que le texte principal */
    font-weight: 500;
}

.custom-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .custom-modal-icon.info {
        background-color: #e6f2fa;
        color: #0073b7;
    }

    .custom-modal-icon.warning {
        background-color: #fef3c7;
        color: #d97706;
    }

    .custom-modal-icon.danger {
        background-color: #fee2e2;
        color: #dc2626;
    }

.custom-modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    width: 100%;
}

.btn-modal-cancel, .btn-modal-ok {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    transition: all 0.15s ease;
}

.btn-modal-cancel {
    background-color: #ffffff;
    color: #475569;
}

    .btn-modal-cancel:hover {
        background-color: #f1f5f9;
    }

.btn-modal-ok {
    background-color: #0073b7;
    color: #ffffff;
    border-color: #0073b7;
}

    .btn-modal-ok:hover {
        background-color: #005b92;
    }

    .btn-modal-ok.danger-btn {
        background-color: #dc2626;
        border-color: #dc2626;
    }

        .btn-modal-ok.danger-btn:hover {
            background-color: #b91c1c;
        }
/* Conteneur horizontal pour le logo et le titre */
.custom-modal-header {
    display: flex;
    align-items: center; /* <--- C'est lui qui aligne verticalement l'icône et le texte au centre */
    justify-content: center; /* <--- C'est lui qui centre tout le bloc au milieu de la modale */
    gap: 16px; /* Espacement harmonieux entre le gros logo et le titre */
    width: 100%;
    margin-bottom: 16px;
}

    /* On garde ton gros format de logo */
    .custom-modal-header .custom-modal-icon {
        width: 64px; /* Ton format agrandi type Option 1 */
        height: 64px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        flex-shrink: 0;
    }

    /* Le titre s'aligne parfaitement au milieu face au gros logo */
    .custom-modal-header .custom-modal-title {
        margin: 0;
        font-size: 1.50rem;
        font-weight: 600;
        color: #1e293b;
        text-align: left;
    }