/* Overlay */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Affichage */
.modal.show {
    display: flex;
}

/* Fenêtre */
.modal-dialog {
    width: 100%;
    max-width: 500px;
    margin: auto;
}

/* Contenu */
.modal-content {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    animation: modalFade 0.3s ease;
}

/* Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eaeaea;
}

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

/* Bouton fermer */
.close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
}

/* Body */
.modal-body {
    padding: 1rem;
    line-height: 1.5;
}

/* Footer */
.modal-footer {
    padding: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    border-top: 1px solid #eaeaea;
}

/* Boutons */
.modal-footer a,
.modal-footer button {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

/* Types */
.modal.success .modal-header {
    background: #d4edda;
}

.modal.error .modal-header {
    background: #f8d7da;
}

.modal.warning .modal-header {
    background: #fff3cd;
}

/* Animation */
@keyframes modalFade {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
