/* =========================================================
FE SMART FORMS - FRONT CSS (LIGHT + PERF FRIENDLY)
========================================================= */

.fe-form {
    margin: 20px 0;
}

.fe-form-heading {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* GRID */
.fe-form__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* FIELD */
.fe-form__field {
    width: calc(50% - 7.5px);
    display: flex;
    flex-direction: column;
}


.fe-form__field--full {
    width: 100%;
}

/* LABEL */
.fe-form__field label {
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 500;
}

/* INPUTS */
.fe-form__field input,
.fe-form__field select,
.fe-form__field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border 0.2s ease;
}

.fe-form__field input:focus,
.fe-form__field select:focus,
.fe-form__field textarea:focus {
    border-color: #0073aa;
    outline: none;
}

/* TEXTAREA */
.fe-form__field textarea {
    resize: vertical;
}

/* CHECKBOX */
.fe-form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
}

/* REQUIRED */
.fe-form__required {
    color: red;
    margin-left: 4px;
}

/* ERROR */
.fe-form__error {
    font-size: 12px;
    color: #d63638;
    margin-top: 4px;
}

/* ALERT */
.fe-form__alert {
    padding: 10px;
    margin-top: 15px;
    border-radius: 5px;
    font-size: 14px;
}

.fe-form__alert.success {
    background: #d1f5d3;
    color: #1d7a2e;
}

.fe-form__alert.error {
    background: #ffdede;
    color: #a40000;
}

/* BUTTON */
.fe-form__submit {
    margin-top: 20px;
    padding: 12px 20px;
    background-color: var(--primary-bg-color);
    border: 1px solid var(--blue-border);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    font-weight: var(--typo-weight-2);
    text-transform: uppercase;
    transition: background 0.2s ease;
}

.fe-form__submit:hover,.fe-form__submit:focus,.fe-form__submit:active {
    background-color: var(--bg-white);
    color: var(--text-primary);
    
}

.fe-form__submit.is-loading {
    opacity: 0.6;
    pointer-events: none;
}
.fe-form__honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}
form[data-form-id="4"] .fe-form__grid {
    display: block;
    padding: 0 20px; 
}
form[data-form-id="4"] .fe-form__field{
    width: 100%;
}
form[data-form-id="4"]  select#fe-subject_bien {
    font-weight: 500;
    line-height: 31px;
   
}
form[data-form-id="4"]  .fe-form__field input:focus,form[data-form-id="4"]   .fe-form__field select:focus,form[data-form-id="4"]   .fe-form__field textarea:focus{
 border-color: #ddd;
}
form[data-form-id="4"] #fe-subject_bien option[value=""] {
  display: none;
}
.fe-form__privacy .fe-form__field-title {
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 500;
    line-height: 1.4;
}
/* MOBILE */
@media (max-width: 768px) {
    .fe-form__field {
        width: 100%;
    }
}

/* FORM ID 5 - Corrections */

/* Si vous pouvez modifier le HTML, remplacez l'input par un textarea */
form[data-form-id="5"] .fe-form__field textarea#fe-message {
    min-height: 160px !important;
    resize: vertical;
}

/* Checkbox privacy - afficher le label correctement */
form[data-form-id="5"] .fe-form__privacy .fe-form__checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
form[data-form-id="5"] .fe-form__field input[name="phone"]{
    border-radius: 0;
}

form[data-form-id="5"] .fe-form__privacy .fe-form__checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin: 0;
    cursor: pointer;
}

form[data-form-id="5"] button.fe-form__submit.js-fe-form-submit {
    background-color: #001731;
    text-transform: uppercase;
    display: inline-block;
    padding: 15px 20px;
    font-size: 15px;
    border-radius: 0px;
}
form[data-form-id="4"] .fe-form__field{
padding: 20px 0;
}
form[data-form-id="4"] button.fe-form__submit.js-fe-form-submit {
    background-color: var(--color-secondary);
    width: 100%;
    padding: 20px;
    text-transform: uppercase;
    border-style: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    z-index: 0;
    box-sizing: border-box;
    transition: color 0.35s ease-in-out, border-color 0.35s ease-in-out;
}
form[data-form-id="4"] .fe-form__submit::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary-bg-color);
    z-index: -1;
    transition: all 0.35s ease-in-out; 
} 
form[data-form-id="4"] .fe-form__submit:hover::before {
    right: 0;
    left: 0;
    width: 100%; 
} 
/* Message field prend toute la largeur */
form[data-form-id="5"] .fe-form__field:has(#fe-message) {
    width: 100%;
}
form[data-form-id="4"] .fe-form__field input,
form[data-form-id="2"] .fe-form__field input,
form[data-form-id="3"] .fe-form__field input,
form[data-form-id="7"] .fe-form__field input,
form[data-form-id="1"] .fe-form__field input{
    width: auto;
    border-radius: 0;
}
form[data-form-id="4"] .fe-form__field input[type="checkbox"],
form[data-form-id="7"] .fe-form__field input[type="checkbox"],
form[data-form-id="1"] .fe-form__field input[type="checkbox"],
form[data-form-id="2"] .fe-form__field input[type="checkbox"],
form[data-form-id="3"] .fe-form__field input[type="checkbox"],
form[data-form-id="5"] .fe-form__field input[type="checkbox"],
form[data-form-id="6"] .fe-form__field input[type="checkbox"]{
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    min-height: 18px;
    cursor: pointer;
}

form[data-form-id="4"].fe-form{
    margin-bottom: 0;
}


/* =========================================================
CUSTOM SELECT GLOBAL (TOUS LES FORMS)
========================================================= */

.fe-form .fe-custom-select {
    position: relative;
    width: 100%;
}

/* hide native select */
.fe-form .fe-custom-select__native {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* trigger */
.fe-form .fe-custom-select__trigger {
    width: 100%;
    min-height: 56px;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-align: left;
}

/* arrow */
.fe-form .fe-custom-select__trigger b {
    font-size: 16px;
    color: #777;
}

/* dropdown */
.fe-form .fe-custom-select__list {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 999;
    background: #fff;
    box-shadow: 0 8px 22px rgba(0,0,0,0.15);
}

/* open */
.fe-form .fe-custom-select.is-open .fe-custom-select__list {
    display: block;
}

/* option */
.fe-form .fe-custom-select__option {
    width: 100%;
    padding: 12px 16px;
    border: 0;
    background: #fff;
    color: #111827;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* hover + selected */
.fe-form .fe-custom-select__option:hover,
.fe-form .fe-custom-select__option.is-selected {
    background: var(--primary-bg-color);
    color: #fff;
}

/* check icon */
.fe-form .fe-custom-select__option span {
    font-weight: bold;
}

.fe-form .fe-custom-select__option.is-selected {
    background: var(--primary-bg-color);
    color: #fff;
}

.fe-custom-select__trigger svg {
    margin-left: 10px;
    flex-shrink: 0;
}



form[data-form-id="6"] .fe-form__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  flex-direction: column;
  width: 100%;
}

form[data-form-id="6"] .fe-form__grid > * {
  flex: 1;
  width:100%;
}
form[data-form-id="6"] .fe-form__submit {
  width: 100%;
  margin-top: 6px;
}
form[data-form-id="6"] .fe-form__field label {
    margin-bottom: 10px;
}
form[data-form-id="6"] button.fe-form__submit:hover,form[data-form-id="6"] button.fe-form__submit:focus,form[data-form-id="6"]  button.fe-form__submit:active{
    background-color: var(--primary-bg-color-hover);
}

form[data-form-id="1"] .fe-form__submit,
form[data-form-id="2"] .fe-form__submit,
form[data-form-id="3"] .fe-form__submit,
form[data-form-id="4"] .fe-form__submit,
form[data-form-id="5"] .fe-form__submit,
form[data-form-id="6"] .fe-form__submit,
form[data-form-id="7"] .fe-form__submit{
    width: 100%;
}
form[data-form-id="4"] button.fe-form__submit.js-fe-form-submit:hover,
form[data-form-id="4"] button.fe-form__submit.js-fe-form-submit:focus,
form[data-form-id="4"] button.fe-form__submit.js-fe-form-submit:active{
    color: var(--text-white) !important;
}