﻿.custom-alert {
    min-width: 280px;
    margin-bottom: 10px;
    padding: 12px 16px;
    border-radius: 6px;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
}

.custom-alert.success {
    background: #198754;
}

.custom-alert.error {
    background: #dc3545;
}

.custom-alert.warning {
    background: #ffc107;
    color: #000;
}

.alert-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-content button {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Overlay plein écran */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: none; /* caché par défaut */
    align-items: center;
    justify-content: center;
    z-index: 1050; /* > modals Bootstrap: ajuster si besoin */
    backdrop-filter: blur(1px);
}

/* Boîte centrale */
.loading-box {
    background: #fff;
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
    justify-content: center;
}

/* Spinner (CSS pur) */
.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #e9ecef;
    border-top-color: #0d6efd; /* bleu Bootstrap */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-weight: 500;
    color: #212529;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Classe utilitaire pour empêcher le scroll quand loading */
.body-no-scroll {
    overflow: hidden;
}