/* ========================================
   Modern Delete Modal - UTSS Association
   ======================================== */

/* Overlay moderne avec backdrop blur */
.modern-delete-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Modal moderne */
.modern-delete-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 90%;
    overflow: hidden;
    transform: scale(0.9);
    animation: scaleIn 0.3s ease forwards;
}

@keyframes scaleIn {
    to {
        transform: scale(1);
    }
}

/* Header avec icône de danger */
.modern-delete-header {
    padding: 32px 32px 24px;
    text-align: center;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border-bottom: 1px solid rgba(220, 53, 69, 0.1);
}

.modern-delete-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.3);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(220, 53, 69, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 32px rgba(220, 53, 69, 0.4);
    }
}

.modern-delete-icon i {
    font-size: 36px;
    color: white;
}

.modern-delete-title {
    font-size: 24px;
    font-weight: 700;
    color: #dc3545;
    margin: 0 0 8px;
    line-height: 1.3;
}

/* Body avec message */
.modern-delete-body {
    padding: 24px 32px;
    text-align: center;
}

.modern-delete-message {
    font-size: 16px;
    color: #6c757d;
    margin: 0 0 8px;
    line-height: 1.6;
}

.modern-delete-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    color: #856404;
}

.modern-delete-warning i {
    font-size: 18px;
    color: #ffc107;
}

/* Footer avec boutons */
.modern-delete-footer {
    padding: 20px 32px 32px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modern-delete-btn {
    flex: 1;
    max-width: 160px;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modern-delete-btn i {
    font-size: 18px;
}

.modern-delete-btn-cancel {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #dee2e6;
}

.modern-delete-btn-cancel:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modern-delete-btn-confirm {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.modern-delete-btn-confirm:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
}

.modern-delete-btn:active {
    transform: translateY(0);
}

/* Effet de chargement sur le bouton */
.modern-delete-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.modern-delete-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* RTL Support */
[dir="rtl"] .modern-delete-warning {
    flex-direction: row-reverse;
}

[dir="rtl"] .modern-delete-footer {
    flex-direction: row-reverse;
}

[dir="rtl"] .modern-delete-btn {
    flex-direction: row-reverse;
}

/* Dark Mode Support */
[data-layout-mode="dark"] .modern-delete-modal {
    background: #1e2125;
}

[data-layout-mode="dark"] .modern-delete-header {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15) 0%, rgba(220, 53, 69, 0.25) 100%);
    border-bottom-color: rgba(220, 53, 69, 0.2);
}

[data-layout-mode="dark"] .modern-delete-title {
    color: #ff6b7a;
}

[data-layout-mode="dark"] .modern-delete-message {
    color: #adb5bd;
}

[data-layout-mode="dark"] .modern-delete-warning {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

[data-layout-mode="dark"] .modern-delete-btn-cancel {
    background: #2b2f33;
    color: #adb5bd;
    border-color: #3a3f44;
}

[data-layout-mode="dark"] .modern-delete-btn-cancel:hover {
    background: #3a3f44;
    border-color: #4a5057;
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .modern-delete-modal {
        max-width: 95%;
        margin: 20px;
    }

    .modern-delete-header {
        padding: 24px 20px 16px;
    }

    .modern-delete-icon {
        width: 64px;
        height: 64px;
    }

    .modern-delete-icon i {
        font-size: 28px;
    }

    .modern-delete-title {
        font-size: 20px;
    }

    .modern-delete-body {
        padding: 20px;
    }

    .modern-delete-message {
        font-size: 14px;
    }

    .modern-delete-footer {
        flex-direction: column;
        padding: 16px 20px 24px;
    }

    .modern-delete-btn {
        max-width: 100%;
        width: 100%;
    }
}

/* Animation de sortie */
.modern-delete-overlay.hiding {
    animation: fadeOut 0.3s ease forwards;
}

.modern-delete-overlay.hiding .modern-delete-modal {
    animation: scaleOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

@keyframes scaleOut {
    to {
        transform: scale(0.9);
        opacity: 0;
    }
}
