/* ModalDialog.css - Modales HTML/CSS personnalisees */

/* Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.modal-visible {
    opacity: 1;
}

/* Conteneur modal */
.modal-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 100%;
    transform: scale(0.9);
    transition: transform 0.2s ease;
    overflow: hidden;
}

.modal-overlay.modal-visible .modal-container {
    transform: scale(1);
}

/* Header avec icone */
.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 24px 0 24px;
}

.modal-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon svg {
    width: 22px;
    height: 22px;
}

/* Couleurs par type */
.modal-icon.modal-icon-info {
    background: #e0f4fc;
    color: #2BC1EE;
}

.modal-icon.modal-icon-success {
    background: #dcfce7;
    color: #22c55e;
}

.modal-icon.modal-icon-error {
    background: #fee2e2;
    color: #dc2626;
}

.modal-icon.modal-icon-warning {
    background: #fef3c7;
    color: #f59e0b;
}

.modal-icon.modal-icon-confirm {
    background: #fef3c7;
    color: #f59e0b;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.3;
}

/* Corps du message */
.modal-body {
    padding: 16px 24px 24px 24px;
}

.modal-message {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
    word-wrap: break-word;
}

/* Boutons */
.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 0 24px 24px 24px;
}

.modal-footer .config-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    text-decoration: none;
}

.modal-footer .config-btn:focus {
    outline: 2px solid #2BC1EE;
    outline-offset: 2px;
}

.modal-footer .config-btn-primary {
    background: linear-gradient(135deg, #1A9FC4 0%, #0E8AAD 100%);
    color: white;
}

.modal-footer .config-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 159, 196, 0.4);
}

.modal-footer .config-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.modal-footer .config-btn-secondary:hover {
    background: #e2e8f0;
}

.modal-footer .config-btn-danger {
    background: #dc2626;
    color: white;
    border: none;
}

.modal-footer .config-btn-danger:hover {
    background: #b91c1c;
}

.modal-footer .config-btn-success {
    background: #22c55e;
    color: white;
}

.modal-footer .config-btn-success:hover {
    background: #16a34a;
}

/* Responsive */
@media screen and (max-width: 520px) {
    .modal-container {
        max-width: 100%;
        border-radius: 12px;
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .modal-footer .config-btn {
        width: 100%;
        justify-content: center;
    }
}
