/* ==========================================================
   FORMULAIRE MODAL — assets/css/form-modal.css
   ========================================================== */

/* The Modal */
.modal {
    position: fixed;
    z-index: 9999999999999999999999999;
    top: 0;
    left: 0;
    display: none;
    overflow: auto;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}
.modal-content {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1600px;
    max-height: 100%;
    width: 85%;
    border: 1px solid var(--main-grey);
    padding: 3rem 2rem;
    background-color: #fefefe;
}
#heyModal .modal-content {
    max-width: unset;
    max-height: unset;
    width: 100%;
    height: 100%;
}
.modal li {
    padding-left: 1rem;
    list-style: disc;
    list-style-position: inside;
    line-height: 1.5;
}
.modal ul ul li {
    padding-left: 2rem;
    list-style: circle;
    list-style-position: inside;
}
.close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: var(--main-grey);
    font-size: 2rem;
    font-weight: 500;
    transition: color .3s ease;
}
.close:hover,
.close:focus {
    color: var(--main-gold);
    cursor: pointer;
}
/* ---------- Overlay ---------- */
.form-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .45);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.form-overlay.is-open {
    display: flex;
    z-index: 9999999999999999999999;
}

/* ---------- Modal ---------- */
.form-modal {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 860px;
    width: 100%;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    animation: formSlideIn .3s ease;
}

@keyframes formSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Close button ---------- */
.form-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-dark);
    transition: background .2s ease;
}

.form-close:hover {
    background: var(--bg-soft);
}

/* ---------- Image ---------- */
.form-image {
    overflow: hidden;
}

.form-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Content ---------- */
.form-content {
    padding: 48px 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    object-position: center 60%;
}

.form-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

/* ---------- Gender radio ---------- */
.form-gender {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.gender-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-dark);
    transition: background .15s ease;
    user-select: none;
}

.gender-option:first-child {
    border-right: 1px solid var(--border);
}

.gender-option:hover {
    background: var(--bg-soft);
}

.gender-option input[type="radio"] {
    display: none;
}

.gender-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ccc;
    position: relative;
    flex-shrink: 0;
    transition: border-color .15s ease;
}

.gender-option input[type="radio"]:checked + .gender-radio {
    border-color: var(--blue);
}

.gender-option input[type="radio"]:checked + .gender-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--blue);
}

/* ---------- Inputs ---------- */
.form-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 16px;
    transition: border-color .2s ease;
}

.form-input-wrap:focus-within {
    border-color: var(--blue);
}

.form-icon {
    flex-shrink: 0;
    color: #b0b5be;
}

.form-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    padding: 16px 0;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-dark);
    background: transparent;
}

.form-input-wrap input::placeholder {
    color: #b0b5be;
}

/* Masquer les flèches du champ number */
.form-input-wrap input[type="number"]::-webkit-inner-spin-button,
.form-input-wrap input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.form-input-wrap input[type="number"] {
    -moz-appearance: textfield;
}

/* ---------- Submit button ---------- */
.btn-submit {
    width: 100%;
    padding: 18px 28px;
    background: linear-gradient(0deg, #0A69DE 0%, #0346A4 100%);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(24, 87, 214, 0.3);
    transition: transform .15s ease, box-shadow .15s ease;
    font-family: inherit;
    margin-top: 4px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(24, 87, 214, 0.35);
}

/* ---------- Security notice ---------- */
.form-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: .85rem;
    color: #a0a5ae;
    margin-top: 4px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .form-modal {
        grid-template-columns: 1fr;
        max-height: 95vh;
        overflow-y: auto;
    }

    .form-image {
        max-height: 200px;
    }

    .form-content {
        padding: 32px 24px 28px;
    }
}

@media (max-width: 480px) {
    .form-overlay {
        padding: 12px;
    }

    .form-content {
        padding: 28px 18px 24px;
    }

    .form-title {
        font-size: 1.2rem;
    }
}
