/* ===============================
   OVERLAY
================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px; /* évite le débordement sur petits écrans */
    z-index: 9999;
}

/* ===============================
   CONTENU
================================ */
.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh; /* IMPORTANT mobile */
    padding: 26px 22px;
    overflow-y: auto; /* scroll si écran petit */
    animation: zoomIn 0.3s ease;
}

/* ===============================
   HEADER
================================ */
.modal-header {
    position: relative;
    text-align: center;
    margin-bottom: 18px;
}

.modal-header h2 {
    color: #B13C16;
    margin: 0;
    font-size: 1.5rem;
}

/* ===============================
   BOUTON FERMER
================================ */
.modal-close {
    position: absolute;
    top: -5px;
    right: -5px;
    border: none;
    background: none;
    font-size: 30px;
    cursor: pointer;
    color: #B13C16;
    padding: 5px;
}

/* ===============================
   FORMULAIRE
================================ */
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-row {
    display: flex;
    gap: 12px;
}

/* ===============================
   INPUTS
================================ */
input,
textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 15px;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #F27447;
}

/* ===============================
   TEXTAREA
================================ */
textarea {
    resize: none;
    min-height: 110px;
}

/* ===============================
   FOOTER
================================ */
.form-footer {
    text-align: center;
    margin-top: 16px;
}

.btn-submit {
    background: linear-gradient(to right, #B13C16, #F27447);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 40px;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-submit:hover {
    opacity: 0.9;
}

/* ===============================
   ALERT
================================ */
.alert {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    background: #fbeaea;
    color: #B13C16;
    border: 1px solid #f5c2c2;
}

/* ===============================
   ANIMATION
================================ */
@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===============================
   RESPONSIVE BREAKPOINTS
================================ */

/* 📱 Mobile */
@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
    }

    .modal-content {
        padding: 22px 18px;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }
}

/* 📱 Très petits écrans */
@media (max-width: 360px) {
    input,
    textarea {
        font-size: 14px;
        padding: 12px;
    }

    .btn-submit {
        width: 100%;
    }
}

/* 📲 Tablette */
@media (min-width: 768px) {
    .modal-content {
        max-width: 560px;
    }
}

/* 💻 Laptop & desktop */
@media (min-width: 1200px) {
    .modal-content {
        max-width: 600px;
    }
}
