/* Styles pour le modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-50px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 25px;
}

.modal-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--primary-color-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.modal-icon i {
    font-size: 2rem;
    color: white;
}

.modal-icon.success {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.modal-icon.error {
    background: linear-gradient(135deg, #F44336, #C62828);
}

.modal-icon.warning {
    background: linear-gradient(135deg, #FFC107, #FF8F00);
}

.modal-message {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
}

.modal-details {
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    font-family: monospace;
    font-size: 0.9rem;
    max-height: 150px;
    overflow-y: auto;
    color: var(--text-color-light);
    white-space: pre-wrap;
    word-break: break-word;
}

.modal-footer {
    padding: 15px 25px 25px;
    display: flex;
    justify-content: center;
}

.modal-btn {
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.modal-btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(152, 59, 129, 0.3);
}

.modal-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(152, 59, 129, 0.4);
    transform: translateY(-2px);
}

.modal-btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
    margin-right: 10px;
}

.modal-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Animation */
@keyframes modalPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

.modal-icon.animate {
    animation: modalPulse 0.5s forwards;
}

/* Responsive */
@media (max-width: 576px) {
    .modal {
        width: 95%;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    .modal-icon {
        width: 60px;
        height: 60px;
    }
    
    .modal-icon i {
        font-size: 1.7rem;
    }
    
    .modal-message {
        font-size: 1rem;
    }
}
