/* =========================================================
   SMH · Formulaire « simulation » v3.2 (proposition 1)
   Charte digitale Homair Sweet mobil-home (oct. 2026)
   Bleu nuit #004A6A · Bleu canard #006187 · Turquoise #009B9A
   Jaune #F8AA00 (CTA uniquement) · Blanc cassé #FFFBF3
   La carte blanche autour du formulaire est gérée dans Elementor.
   ========================================================= */

._frm-bg-b17 { background: transparent !important; }

/* Grille Bitform (60 colonnes) : filet de sécurité si le fichier généré perd son sélecteur */
._frm-b17 { display: grid; grid-template-columns: repeat(60, minmax(1px, 1fr)); }
._frm-b17 { font-family: 'Averta', 'Helvetica Neue', Arial, sans-serif; color: #004A6A; }

/* ---------- En-tête d'étape ---------- */
._frm-b17 .smh-step {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 6px 16px; margin: 0 0 10px;
}
._frm-b17 .smh-step__titre {
    margin: 0; font-size: 14px; font-weight: 800; line-height: 1.3;
    letter-spacing: .06em; text-transform: uppercase; color: #004A6A;
}
._frm-b17 .smh-step__num {
    display: inline-block; margin-right: 10px; padding: 4px 10px; border-radius: 6px;
    background: #004A6A; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em;
}
._frm-b17 .smh-step__req { margin: 0; font-size: 12px; color: rgba(0, 74, 106, .72); }
._frm-b17 .smh-step__bar { height: 4px; border-radius: 4px; background: rgba(0, 97, 135, .15); overflow: hidden; }
._frm-b17 .smh-step__fill { display: block; height: 100%; border-radius: 4px; background: #009B9A; }

/* ---------- Mêmes marges pour tous les champs (colonnes alignées) ---------- */
._frm-b17 .b17-89-fld-wrp, ._frm-b17 .b17-90-fld-wrp, ._frm-b17 .b17-84-fld-wrp, ._frm-b17 .b17-36-fld-wrp,
._frm-b17 .b17-3-fld-wrp, ._frm-b17 .b17-2-fld-wrp, ._frm-b17 .b17-10-fld-wrp, ._frm-b17 .b17-81-fld-wrp,
._frm-b17 .b17-39-fld-wrp {
    padding: 6px 8px !important; margin: 0 !important;
}
._frm-b17 .b17-89-lbl-wrp, ._frm-b17 .b17-90-lbl-wrp, ._frm-b17 .b17-84-lbl-wrp, ._frm-b17 .b17-36-lbl-wrp,
._frm-b17 .b17-3-lbl-wrp, ._frm-b17 .b17-2-lbl-wrp, ._frm-b17 .b17-10-lbl-wrp, ._frm-b17 .b17-81-lbl-wrp,
._frm-b17 .b17-39-lbl-wrp {
    margin: 0 0 6px !important; padding: 0 !important;
}

/* ---------- Champs texte : même hauteur que les listes et les cases (52 px) ---------- */
._frm-b17 .b17-3-fld, ._frm-b17 .b17-2-fld, ._frm-b17 .b17-81-fld, ._frm-b17 .b17-39-fld { height: 52px !important; }
._frm-b17 .b17-10-phone-fld-container { display: block !important; height: 52px !important; }
._frm-b17 .b17-10-phone-fld-wrp { height: auto !important; }
._frm-b17 .b17-10-phone-inner-wrp { height: 52px !important; }
._frm-b17 .b17-10-phone-inner-wrp { align-items: center; }
._frm-b17 .b17-10-phone-number-input { height: 100% !important; }
._frm-b17 .b17-fld:focus,
._frm-b17 .b17-10-phone-inner-wrp:focus-within {
    border-color: #009B9A !important;
    box-shadow: 0 0 0 3px rgba(0, 155, 154, .2) !important;
    background: #fff !important;
}
._frm-b17 .b17-fld:hover:not(:focus) { border-color: rgba(0, 97, 135, .6) !important; }

/* ---------- Listes déroulantes (destination + budget) ---------- */
._frm-b17 select.b17-89-fld, ._frm-b17 select.b17-90-fld,
._frm-b17 select.b17-89-fld:hover:not(:focus), ._frm-b17 select.b17-90-fld:hover:not(:focus),
._frm-b17 select.b17-89-fld:focus, ._frm-b17 select.b17-90-fld:focus {
    -webkit-appearance: none !important; appearance: none !important;
    height: 52px !important; padding: 0 42px 0 14px !important;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23006187' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px !important;
    font-size: 16px !important; color: #004A6A !important;
    cursor: pointer; white-space: nowrap; text-overflow: ellipsis;
}
._frm-b17 select.b17-89-fld:hover:not(:focus), ._frm-b17 select.b17-90-fld:hover:not(:focus) { border-color: rgba(0, 97, 135, .6) !important; }
._frm-b17 select.b17-89-fld:focus, ._frm-b17 select.b17-90-fld:focus {
    border-color: #009B9A !important; box-shadow: 0 0 0 3px rgba(0, 155, 154, .2) !important;
}
._frm-b17 select.b17-89-fld.smh-empty, ._frm-b17 select.b17-90-fld.smh-empty { color: rgba(0, 74, 106, .55) !important; }
._frm-b17 select.b17-89-fld option, ._frm-b17 select.b17-90-fld option { color: #004A6A; }

/* ---------- Cases (couchages + délai), sur une ligne ---------- */
._frm-b17 .b17-84-cc, ._frm-b17 .b17-36-cc {
    display: grid !important; gap: 8px !important; margin: 0 !important; padding: 0 !important; width: 100% !important;
}
._frm-b17 .b17-84-cc { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
._frm-b17 .b17-36-cc { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
._frm-b17 .simulateur-radio { position: relative; width: auto !important; margin: 0 !important; }
._frm-b17 .simulateur-radio [data-bx] { display: none !important; }
._frm-b17 .simulateur-radio [data-cl] {
    display: flex !important; align-items: center; justify-content: center;
    width: 100%; height: 52px; margin: 0 !important; padding: 0 6px !important; box-sizing: border-box;
    border: 1.5px solid rgba(0, 97, 135, .35); border-radius: 10px;
    background: #fff; color: #004A6A; text-align: center; line-height: 1.15;
    cursor: pointer; transition: border-color .2s, background-color .2s, color .2s;
}
._frm-b17 .simulateur-radio [data-cl] * { font-size: 15px !important; font-weight: 700 !important; line-height: 1.15 !important; }
/* « D'ici » sur la 1re ligne, « 3 mois » sur la 2e (espaces insécables dans les libellés) */
._frm-b17 .b17-36-ct { width: min-content; }
._frm-b17 .simulateur-radio:hover [data-cl] { border-color: #006187; background: #FFFBF3; }
._frm-b17 .simulateur-radio input:checked ~ [data-cl] {
    border-color: #004A6A; background: #004A6A; color: #fff;
    box-shadow: 0 6px 14px -8px rgba(0, 74, 106, .6);
}
._frm-b17 .simulateur-radio input:checked ~ [data-cl] * { color: #fff !important; }
._frm-b17 .simulateur-radio input:focus-visible ~ [data-cl] { outline: 2px solid #009B9A; outline-offset: 2px; }

/* ---------- Récapitulatif (étape 2) ---------- */
._frm-b17 .smh-recap {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
    padding: 10px 12px; border: 1px solid rgba(0, 97, 135, .15); border-radius: 10px;
    background: #FFFBF3; color: #004A6A; font-size: 14px;
}
._frm-b17 .smh-recap b { font-weight: 800; margin-right: 2px; }
._frm-b17 .smh-recap__tags { display: flex; flex-wrap: wrap; gap: 6px; }
._frm-b17 .smh-tag {
    padding: 4px 10px; border-radius: 6px; background: #fff; border: 1px solid rgba(0, 97, 135, .2);
    font-size: 13px; font-weight: 700; line-height: 1.3; white-space: nowrap;
}
._frm-b17 .smh-recap__edit {
    margin-left: auto; color: #006187; font-size: 13px; font-weight: 700;
    text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
._frm-b17 .smh-recap__edit:hover { color: #004A6A; }
._frm-b17 .smh-recap:has(.smh-recap__tags:empty) { display: none; }

/* ---------- Boutons ---------- */
/* CTA principal jaune : Continuer + Demander ma simulation */
._frm-b17 .b17-1-btn,
._frm-b17 ._frm-b17-next-step-btn {
    background: #F8AA00 !important;
    color: #004A6A !important;
    border: 0 !important;
    border-radius: 12px !important;
    box-shadow: inset 0 0 0 4px #F8AA00, inset 0 0 0 5px rgba(0, 74, 106, .45) !important;
    font-size: 16px !important; font-weight: 700 !important; text-transform: none !important;
    padding: 16px 28px !important; height: auto !important; min-height: 54px;
}
._frm-b17 .b17-1-btn:hover,
._frm-b17 ._frm-b17-next-step-btn:hover {
    background-color: #F8AA00 !important; filter: brightness(1.06);
}
._frm-b17 .b17-1-btn:focus-visible,
._frm-b17 ._frm-b17-next-step-btn:focus-visible { outline: 2px solid #009B9A !important; outline-offset: 3px; }

/* Retour = lien (un seul CTA jaune par écran) */
._frm-b17 ._frm-b17-prev-step-btn {
    background: transparent !important; color: #006187 !important;
    box-shadow: none !important; border: 0 !important;
    font-size: 15px !important; font-weight: 700 !important;
    text-decoration: underline; text-underline-offset: 3px;
    padding: 16px 8px !important;
}
._frm-b17 ._frm-b17-prev-step-btn:hover { background: transparent !important; color: #004A6A !important; }

/* Retour remonté à gauche de « Demander ma simulation » : lien ajouté par le JS.
   La barre native de l'étape 2 n'est masquée que si le JS a bien tourné (classe smh-js). */
._frm-b17.smh-js [data-step="2"] ._frm-b17-stp-btn-wrpr { display: none !important; }
._frm-b17 .b17-1-inp-wrp { width: 100% !important; }
._frm-b17 .b17-1-inp-fld-wrp { align-items: center; gap: 12px; }
._frm-b17 .smh-retour {
    display: inline-flex; align-items: center; gap: 6px; margin-right: auto;
    padding: 8px 0 !important; border: 0 !important; border-radius: 0 !important;
    background: none !important; box-shadow: none !important; cursor: pointer;
    color: #006187 !important; font-family: inherit; font-size: 15px; font-weight: 700;
    text-decoration: underline; text-underline-offset: 3px;
}
._frm-b17 .smh-retour:hover, ._frm-b17 .smh-retour:focus { background: none !important; box-shadow: none !important; color: #004A6A !important; }
._frm-b17 .smh-retour:focus-visible { outline: 2px solid #009B9A; outline-offset: 3px; }

/* ---------- Case newsletter ---------- */
._frm-b17 .b17-9-ct { color: #004A6A; font-size: 14px; line-height: 1.4; }

/* Flèche de la charte sur les CTA principaux (glisse légèrement au survol) */
._frm-b17 .b17-1-btn::after,
._frm-b17 ._frm-b17-next-step-btn::after {
    content: ""; display: inline-block; flex: none; width: 18px; height: 18px; margin-left: 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23004A6A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .2s ease;
}
._frm-b17 .b17-1-btn:hover::after,
._frm-b17 ._frm-b17-next-step-btn:hover::after { transform: translateX(3px); }

/* ---------- Mobile ---------- */
@media (max-width: 570px) {
    ._frm-b17 .simulateur-radio [data-cl] * { font-size: 14px !important; }
    ._frm-b17 .b17-1-inp-fld-wrp, ._frm-b17 .b17-1-inp-wrp { width: 100% !important; }
    ._frm-b17 .b17-1-btn, ._frm-b17 ._frm-b17-next-step-btn { width: 100% !important; }
    ._frm-b17 .smh-step__req { width: 100%; }
    ._frm-b17 .b17-1-inp-fld-wrp { flex-direction: column-reverse; align-items: stretch; }
    ._frm-b17 .smh-retour { margin: 4px auto 0; }
}

/* ---------- Message de confirmation : dans la carte, à la place du formulaire ----------
   Réglages Bitform : Position « Sous le formulaire », Après envoi « Masquer le formulaire »,
   Masquage automatique désactivé. Le contenu du message utilise les classes .smh-ok */
/* Doublon caché que Bitform insère au-dessus (décalait le message vers le bas) */
._frm-bg-b17 [id^="bf-form-msg-wrp-"]:has(.smh-ok) { display: none !important; }
._frm-bg-b17 [class*="msg-container-"]:has(.smh-ok) { margin: 0 !important; padding: 0 !important; }
/* Style du message Bitform neutralisé : fond beige, bordure, padding et coupure des mots (break-all) */
._frm-bg-b17 [class*="msg-container-"]:has(.smh-ok) [class*="msg-background-"],
._frm-bg-b17 [class*="msg-container-"]:has(.smh-ok) .bf-msg-content {
    position: static !important; width: 100% !important; max-width: none !important; min-height: 0 !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
    background: transparent !important; box-shadow: none !important; word-break: normal !important;
}
._frm-bg-b17 [class*="msg-container-"]:has(.smh-ok) .bf-msg-close { display: none !important; }
._frm-bg-b17 .smh-ok, ._frm-bg-b17 .smh-ok * { word-break: normal !important; overflow-wrap: normal !important; }
._frm-bg-b17 .smh-ok {
    padding: 8px 8px 4px; text-align: center; color: #004A6A;
    font-family: 'Averta', 'Helvetica Neue', Arial, sans-serif;
}
._frm-bg-b17 .smh-ok p { margin: 0; }
._frm-bg-b17 .smh-ok__ic {
    display: flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; margin: 0 auto 16px !important; border-radius: 50%;
    background: rgba(0, 155, 154, .12); color: #009B9A; font-size: 30px; font-weight: 800; line-height: 1;
}
._frm-bg-b17 .smh-ok__titre {
    font-size: 26px; font-weight: 800; line-height: 1.15; letter-spacing: -.2px;
    text-transform: uppercase; color: #004A6A;
}
._frm-bg-b17 .smh-ok__sign {
    margin-right: .1em; font-family: 'Dear Joe', 'Brush Script MT', cursive;
    font-size: 1.35em; font-weight: 400; letter-spacing: 0; text-transform: none; color: #006187;
}
._frm-bg-b17 .smh-ok__txt { max-width: 440px; margin: 12px auto 0 !important; font-size: 16px; line-height: 1.55; color: #004A6A; }
