/* Styles pour le systÃ¨me de modales */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    padding: 2rem;
    animation: slideIn 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.modal-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    line-height: 1.2;
}

.modal-icon.success {
    color: #2ecc71;
}

.modal-icon.error {
    color: #e74c3c;
}

.modal-icon.warning {
    color: #f39c12;
}

.modal-icon.info {
    color: #3498db;
}

.modal-header-content {
    flex: 1;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    word-break: break-word;
}

.modal-message {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 1rem 0 0 0;
    word-break: break-word;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: #333;
}

.modal-body {
    margin-bottom: 1.5rem;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.modal-footer.centered {
    justify-content: center;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.modal-btn-primary {
    background: #3498db;
    color: white;
}

.modal-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.modal-btn-secondary {
    background: #95a5a6;
    color: white;
}

.modal-btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.modal-btn-danger {
    background: #e74c3c;
    color: white;
}

.modal-btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.modal-btn-success {
    background: #2ecc71;
    color: white;
}

.modal-btn-success:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modales avec scroll */
.modal-content.has-scroll {
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content.has-scroll::-webkit-scrollbar {
    width: 6px;
}

.modal-content.has-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-content.has-scroll::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.modal-content.has-scroll::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Responsive */
@media (max-width: 480px) {
    .modal-content {
        padding: 1.5rem;
        max-width: 95%;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
    }
}