/* ==========================================================================
   Rougier et Fils - Design System pour Popups & Modales (SweetAlert2 Custom)
   ========================================================================== */

/* Conteneur et fond flouté */
.rougier-swal-container {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    background: rgba(15, 23, 42, 0.65) !important;
    z-index: 99999 !important;
}

/* Boîte de dialogue */
.rougier-swal-popup {
    border-radius: 22px !important;
    padding: 28px 24px 24px !important;
    background: #ffffff !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.9) !important;
    max-width: 440px !important;
    width: 90% !important;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    border: none !important;
    animation: swalPopupBounce 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes swalPopupBounce {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Titre */
.rougier-swal-title {
    color: #1e293b !important;
    font-size: 1.45rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    margin-top: 12px !important;
    margin-bottom: 8px !important;
    padding: 0 !important;
    display: block !important;
}

/* Contenu du message */
.rougier-swal-content {
    color: #475569 !important;
    font-size: 1.05rem !important;
    font-weight: 500 !important;
    line-height: 1.55 !important;
    margin: 8px 0 20px !important;
    padding: 0 !important;
}

.rougier-swal-msg {
    color: #475569;
    font-size: 1.05rem;
    font-weight: 500;
}

/* Boutons */
.swal2-actions {
    margin-top: 18px !important;
    gap: 12px !important;
    width: 100% !important;
    justify-content: center !important;
}

.rougier-swal-btn {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    padding: 12px 32px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    outline: none !important;
    border: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}

/* S'assurer que SweetAlert2 peut masquer les boutons */
.swal2-actions button[style*="display: none"],
.swal2-styled[style*="display: none"],
button.swal2-cancel[style*="display: none"],
button.swal2-confirm[style*="display: none"] {
    display: none !important;
}

/* Bouton Confirmer / Compris */
.rougier-swal-confirm-btn {
    background: linear-gradient(135deg, #385170 0%, #1e3a5f 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(56, 81, 112, 0.4) !important;
    min-width: 130px !important;
}

.rougier-swal-confirm-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(56, 81, 112, 0.55) !important;
    filter: brightness(1.08) !important;
    color: #ffffff !important;
}

.rougier-swal-confirm-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(56, 81, 112, 0.4) !important;
}

/* Bouton Annuler */
.rougier-swal-cancel-btn {
    background: #f1f5f9 !important;
    color: #64748b !important;
    box-shadow: none !important;
}

.rougier-swal-cancel-btn:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
    transform: translateY(-1px) !important;
}

/* Personnalisation des icônes SweetAlert2 */
.swal2-icon {
    border-width: 3px !important;
    margin-top: 6px !important;
    margin-bottom: 12px !important;
    transform: scale(0.95);
}

.swal2-icon.swal2-warning {
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

.swal2-icon.swal2-error {
    border-color: #e11d48 !important;
    color: #e11d48 !important;
}

.swal2-icon.swal2-success {
    border-color: #10b981 !important;
    color: #10b981 !important;
}

.swal2-icon.swal2-info {
    border-color: #385170 !important;
    color: #385170 !important;
}

/* Toast personnalisé */
.rougier-swal-toast {
    border-radius: 14px !important;
    padding: 12px 18px !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2) !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
}

.rougier-swal-toast .swal2-title {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
}

/* Correction Bootstrap 4 Toast : ne doit jamais bloquer les clics lorsqu'il n'est pas affiché */
.toast {
    pointer-events: none !important;
}

.toast:not(.show):not(.showing) {
    display: none !important;
}

.toast.show,
.toast.showing {
    display: block !important;
    pointer-events: auto !important;
    opacity: 1 !important;
}

