/* Modal de confirmation personnalisé */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal.show {
    opacity: 1;
}

.custom-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.custom-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    padding: 0;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.custom-modal.show .custom-modal-content {
    transform: scale(1);
}

.custom-modal-header {
    padding: 30px 30px 20px 30px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.custom-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

/* Icônes selon le type */
.custom-modal-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.custom-modal-icon.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.custom-modal-icon.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.custom-modal-icon.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.custom-modal-icon.confirm {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    color: white;
}

.custom-modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.custom-modal-body {
    padding: 30px;
    text-align: center;
}

.custom-modal-body p {
    margin: 0;
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
}

.custom-modal-footer {
    padding: 20px 30px 30px 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.custom-modal-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.custom-modal-btn-cancel {
    background: #f3f4f6;
    color: #6b7280;
}

.custom-modal-btn-cancel:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.custom-modal-btn-confirm {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
}

.custom-modal-btn-confirm:hover {
    background: linear-gradient(135deg, #ca8a04 0%, #a16207 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(234, 179, 8, 0.5);
}

/* Bouton confirm pour les modals de type success */
.custom-modal-content.success .custom-modal-btn-confirm {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.custom-modal-content.success .custom-modal-btn-confirm:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}

/* Bouton confirm pour les modals de type error */
.custom-modal-content.error .custom-modal-btn-confirm {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.custom-modal-content.error .custom-modal-btn-confirm:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5);
}

/* Bouton confirm pour les modals de type warning */
.custom-modal-content.warning .custom-modal-btn-confirm {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.custom-modal-content.warning .custom-modal-btn-confirm:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
}

/* Bouton confirm pour les modals de type info */
.custom-modal-content.info .custom-modal-btn-confirm {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.custom-modal-content.info .custom-modal-btn-confirm:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}

/* Animation de pulsation pour l'icône */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.custom-modal.show .custom-modal-icon {
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .custom-modal-content {
        max-width: 90%;
        margin: 20px;
    }

    .custom-modal-header {
        padding: 20px 20px 15px 20px;
    }

    .custom-modal-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
        margin-bottom: 15px;
    }

    .custom-modal-title {
        font-size: 1.2rem;
    }

    .custom-modal-body {
        padding: 20px;
    }

    .custom-modal-body p {
        font-size: 1rem;
    }

    .custom-modal-footer {
        padding: 15px 20px 20px 20px;
        flex-direction: column;
    }

    .custom-modal-btn {
        width: 100%;
        min-width: auto;
    }
}
