/**
 * SweetAlert2 Custom Styles pour Lejecolia
 * Design moderne et personnalisé
 */

/* ===== CONFIGURATION GLOBALE SWEETALERT2 ===== */
:root {
    --swal2-primary: #FEA116;
    --swal2-secondary: #6c757d;
    --swal2-success: #28a745;
    --swal2-error: #dc3545;
    --swal2-warning: #ffc107;
    --swal2-info: #17a2b8;
    --swal2-background: #ffffff;
    --swal2-text: #333333;
    --swal2-border-radius: 12px;
    --swal2-box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    --swal2-font-family: 'Heebo', 'Nunito', sans-serif;
}

/* ===== PERSONNALISATION DES ALERTES - COMPACT ===== */
.swal2-popup {
    font-family: var(--swal2-font-family) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(254, 161, 22, 0.1) !important;
    background: #ffffff !important;
    padding: 1.25rem !important;
    max-width: 380px !important;
    width: 90% !important;
}

/* ===== TITRE - COMPACT ===== */
.swal2-title {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    color: var(--swal2-text) !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.3 !important;
    text-align: center !important;
}

/* ===== CONTENU - COMPACT ===== */
.swal2-html-container {
    font-family: 'Heebo', sans-serif !important;
    font-size: 0.85rem !important;
    color: #666666 !important;
    line-height: 1.5 !important;
    margin: 0.65rem 0 !important;
    text-align: center !important;
}

/* ===== ICÔNES - COMPACT ===== */
.swal2-icon {
    width: 2.8rem !important;
    height: 2.8rem !important;
    margin: 0 auto 1rem !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.5rem !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Icône de succès */
.swal2-icon.swal2-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
}

.swal2-icon.swal2-success::before {
    content: '✓' !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
}

/* Icône d'erreur */
.swal2-icon.swal2-error {
    background: linear-gradient(135deg, #dc3545, #e74c3c) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3) !important;
}

.swal2-icon.swal2-error::before {
    content: '✕' !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
}

/* Icône d'avertissement */
.swal2-icon.swal2-warning {
    background: linear-gradient(135deg, #ffc107, #ffb300) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3) !important;
}

.swal2-icon.swal2-warning::before {
    content: '⚠' !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
}

/* Icône d'information */
.swal2-icon.swal2-info {
    background: linear-gradient(135deg, #17a2b8, #20c997) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3) !important;
}

.swal2-icon.swal2-info::before {
    content: 'ℹ' !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
}

/* Icône de question */
.swal2-icon.swal2-question {
    background: linear-gradient(135deg, #FEA116, #ff8c00) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(254, 161, 22, 0.3) !important;
}

.swal2-icon.swal2-question::before {
    content: '?' !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
}

/* ===== BOUTONS - COMPACT ===== */
.swal2-actions {
    margin: 1.25rem 0 0 0 !important;
    gap: 0.65rem !important;
    justify-content: center !important;
}

.swal2-styled {
    font-family: 'Heebo', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 7px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: none !important;
    letter-spacing: 0.3px !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Bouton de confirmation */
.swal2-confirm {
    background: linear-gradient(135deg, #FEA116, #ff8c00) !important;
    color: white !important;
    box-shadow: 0 3px 10px rgba(254, 161, 22, 0.3) !important;
}

.swal2-confirm:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(254, 161, 22, 0.5) !important;
}

.swal2-confirm:active {
    transform: translateY(0) !important;
}

/* Bouton d'annulation */
.swal2-cancel {
    background: linear-gradient(135deg, #6c757d, #5a6268) !important;
    color: white !important;
    box-shadow: 0 3px 10px rgba(108, 117, 125, 0.3) !important;
}

.swal2-cancel:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(108, 117, 125, 0.5) !important;
}

/* Bouton de danger */
.swal2-deny {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    color: white !important;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3) !important;
}

.swal2-deny:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(220, 53, 69, 0.5) !important;
}

/* ===== TOASTS ===== */
.swal2-toast {
    font-family: var(--swal2-font-family) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 1rem 1.5rem !important;
    margin: 0.5rem !important;
    max-width: 350px !important;
}

.swal2-toast .swal2-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: white !important;
}

.swal2-toast .swal2-icon {
    width: 2rem !important;
    height: 2rem !important;
    margin: 0 0.75rem 0 0 !important;
    font-size: 1rem !important;
}

/* ===== ANIMATIONS ===== */
@keyframes swal2-show {
    0% {
        transform: scale(0.7) translateY(-50px);
        opacity: 0;
    }
    45% {
        transform: scale(1.05) translateY(0);
        opacity: 1;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

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

.swal2-show {
    animation: swal2-show 0.3s ease-out !important;
}

.swal2-hide {
    animation: swal2-hide 0.3s ease-in !important;
}

/* ===== LOADING SPINNER - COMPACT ===== */
.swal2-loader {
    border: 2.5px solid rgba(254, 161, 22, 0.3) !important;
    border-top: 2.5px solid #FEA116 !important;
    border-radius: 50% !important;
    width: 1.75rem !important;
    height: 1.75rem !important;
    animation: swal2-spin 1s linear infinite !important;
}

@keyframes swal2-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== TIMER PROGRESS BAR - COMPACT ===== */
.swal2-timer-progress-bar {
    background: linear-gradient(90deg, #FEA116, #ff8c00) !important;
    height: 3px !important;
}

/* ===== BOUTON FERMER - COMPACT ===== */
.swal2-close {
    font-size: 1.5rem !important;
    width: 1.75rem !important;
    height: 1.75rem !important;
    line-height: 1.75rem !important;
    top: 0.65rem !important;
    right: 0.65rem !important;
}

/* ===== RESPONSIVE - COMPACT ===== */
@media (max-width: 768px) {
    .swal2-popup {
        width: 92% !important;
        padding: 1.15rem !important;
        margin: 0.75rem !important;
        max-width: 350px !important;
    }
    
    .swal2-title {
        font-size: 1.05rem !important;
        margin-bottom: 0.65rem !important;
    }
    
    .swal2-html-container {
        font-size: 0.8rem !important;
        margin: 0.5rem 0 !important;
    }
    
    .swal2-icon {
        width: 2.5rem !important;
        height: 2.5rem !important;
        margin: 0 auto 0.85rem !important;
    }
    
    .swal2-styled {
        padding: 0.5rem 1rem !important;
        font-size: 0.75rem !important;
    }
    
    .swal2-actions {
        flex-direction: column !important;
        gap: 0.6rem !important;
        margin: 1rem 0 0 0 !important;
    }
    
    .swal2-styled {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .swal2-popup {
        padding: 1rem !important;
        max-width: 320px !important;
    }
    
    .swal2-title {
        font-size: 1rem !important;
    }
    
    .swal2-html-container {
        font-size: 0.75rem !important;
    }
    
    .swal2-icon {
        width: 2.25rem !important;
        height: 2.25rem !important;
        font-size: 1.25rem !important;
        margin: 0 auto 0.75rem !important;
    }
    
    .swal2-icon::before {
        font-size: 1.25rem !important;
    }
}

/* ===== EFFETS SPÉCIAUX - COMPACT ===== */
.swal2-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FEA116, #ff8c00, #FEA116);
    border-radius: 12px 12px 0 0;
}

/* Effet de brillance sur les boutons */
.swal2-styled::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.swal2-styled:hover::before {
    left: 100%;
}

/* ===== PERSONNALISATION DES COULEURS PAR TYPE ===== */
.swal2-popup.swal2-success {
    border-left: 4px solid #28a745 !important;
}

.swal2-popup.swal2-error {
    border-left: 4px solid #dc3545 !important;
}

.swal2-popup.swal2-warning {
    border-left: 4px solid #ffc107 !important;
}

.swal2-popup.swal2-info {
    border-left: 4px solid #17a2b8 !important;
}

.swal2-popup.swal2-question {
    border-left: 4px solid #FEA116 !important;
}
