/* ==============================================
   SWEETALERT2 - STYLES GLOBAUX PERSONNALISÉS
   ============================================== */

/* Style général des popups SweetAlert2 */
.swal2-popup {
    border-radius: 15px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
    font-family: 'Roboto', sans-serif !important;
    border: none !important;
    width: auto !important;
    max-width: 500px !important;
    min-width: 300px !important;
    height: auto !important;
    max-height: 80vh !important;
    padding: 2rem !important;
    overflow: visible !important;
}

/* Titre des popups */
.swal2-title {
    color: #333 !important;
    font-size: 1.5em !important;
    font-weight: 600 !important;
    margin-bottom: 10px !important;
}

/* Texte des popups */
.swal2-html-container {
    color: #666 !important;
    font-size: 1em !important;
    line-height: 1.5 !important;
    margin: 1rem 0 !important;
    text-align: left !important;
    white-space: pre-line !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 1rem 0 !important;
}

/* Boutons de confirmation personnalisés */
.swal2-confirm.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3) !important;
}

.swal2-confirm.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #a71e2a) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4) !important;
}

.swal2-confirm.btn-danger:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Boutons d'annulation */
.swal2-cancel.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3) !important;
}

.swal2-cancel.btn-secondary:hover {
    background: linear-gradient(135deg, #545b62, #383d41) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4) !important;
}

/* Icônes colorées */
.swal2-icon.swal2-warning {
    border-color: #f39c12 !important;
    color: #f39c12 !important;
}

.swal2-icon.swal2-success {
    border-color: #28a745 !important;
    color: #28a745 !important;
}

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

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

/* Animation personnalisée pour l'apparition */
.swal2-show {
    animation: swal2-show-custom 0.3s ease-out !important;
}

@keyframes swal2-show-custom {
    0% {
        transform: scale(0.7) translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Animation de disparition */
.swal2-hide {
    animation: swal2-hide-custom 0.15s ease-in !important;
}

@keyframes swal2-hide-custom {
    0% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    100% {
        transform: scale(0.8) translateY(-10px);
        opacity: 0;
    }
}

/* Style pour les toasts (notifications en coin) */
.swal2-toast {
    display: block;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    background: white !important;
    border-left: 4px solid #28a745 !important;
}

.swal2-toast.swal2-icon-success {
    border-left-color: #28a745 !important;
}

.swal2-toast.swal2-icon-error {
    border-left-color: #dc3545 !important;
}

.swal2-toast.swal2-icon-warning {
    border-left-color: #f39c12 !important;
}

.swal2-toast.swal2-icon-info {
    border-left-color: #17a2b8 !important;
}

/* Barre de progression pour les toasts */
.swal2-timer-progress-bar {
    background: rgba(0, 0, 0, 0.2) !important;
    height: 3px !important;
}

/* Responsive design pour les petits écrans */
@media (max-width: 768px) {
    .swal2-popup {
        width: 90% !important;
        max-width: 350px !important;
        min-width: 280px !important;
        margin: 0 !important;
        padding: 1.5rem !important;
        font-size: 14px !important;
        max-height: 70vh !important;
    }
    
    .swal2-title {
        font-size: 1.3em !important;
        margin-bottom: 0.8rem !important;
    }
    
    .swal2-html-container {
        font-size: 0.9em !important;
        margin: 0.8rem 0 !important;
    }
    
    .swal2-confirm,
    .swal2-cancel {
        padding: 10px 16px !important;
        font-size: 14px !important;
    }
    
    .swal2-container {
        padding: 1rem !important;
    }
}

/* Style pour les conteneurs de boutons */
.swal2-actions {
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: 1.5rem !important;
    gap: 15px !important;
    justify-content: center !important;
    margin-top: 25px !important;
}

/* Style pour la fermeture */
.swal2-close {
    color: #999 !important;
    font-size: 1.5em !important;
    transition: color 0.2s ease !important;
}

.swal2-close:hover {
    color: #333 !important;
}

/* Overlay background */
.swal2-container {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(2px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
}

/* Assurer que le contenu s'adapte automatiquement */
.swal2-content {
    height: auto !important;
    overflow: visible !important;
}

.swal2-header {
    padding: 0 0 1rem 0 !important;
}

.swal2-footer {
    padding: 1rem 0 0 0 !important;
}
