/**
 * Formulaires Zoho CRM (script WebFormServeServlet).
 * Champs en pleine largeur dans les conteneurs du site.
 */

.body-container-wrapper [id^="hs_form_target_"],
.body-container-wrapper #hs_form_target_widget_1609970559396,
.body-container-wrapper #hs_form_target_form_785672717,
.body-container-wrapper #hs_form_target_sidebar_form,
.body-container-wrapper .hs-sidebar_form-grp,
.custom_sideberForm .hs-sidebar_form-grp,
.custom-sidebar-form #hs_form_target_sidebar_form {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#crmWebToEntityForm,
form[name="WebToLeads"],
[id^="crmWebToEntity"] {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

#crmWebToEntityForm table,
#crmWebToEntityForm .zcwf_row,
.zcwf_row {
  width: 100% !important;
  max-width: 100% !important;
}

.zcwf_col_fld {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.zcwf_col_fld input[type="text"],
.zcwf_col_fld input[type="email"],
.zcwf_col_fld input[type="tel"],
.zcwf_col_fld input[type="number"],
.zcwf_col_fld input[type="url"],
.zcwf_col_fld input[type="password"],
.zcwf_col_fld select,
.zcwf_col_fld textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* Libellés au-dessus des champs (layout vertical) */
.zcwf_lblTop .zcwf_col_lab {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  display: block !important;
}

.zcwf_lblTop .zcwf_col_fld {
  float: none !important;
  display: block !important;
}

/* Libellés sur une seule ligne (desktop) — annule word-break Zoho */
@media (min-width: 768px) {
  #crmWebToEntityForm .zcwf_col_lab,
  #crmWebToEntityForm .zcwf_col_lab label,
  [id^="crmWebToEntity"] .zcwf_col_lab,
  [id^="crmWebToEntity"] .zcwf_col_lab label,
  .zcwf_row .zcwf_col_lab,
  .zcwf_row .zcwf_col_lab label {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
  }

  #crmWebToEntityForm .zcwf_col_lab label span,
  [id^="crmWebToEntity"] .zcwf_col_lab label span {
    white-space: nowrap !important;
  }

  /* Label à gauche du champ : plus de place pour éviter la coupure */
  .zcwf_lblLeft .zcwf_col_lab {
    width: auto !important;
    min-width: 12rem;
    max-width: 48% !important;
    float: left !important;
  }

  .zcwf_lblLeft .zcwf_col_fld {
    overflow: hidden;
  }
}

@media (max-width: 767px) {
  #crmWebToEntityForm .zcwf_col_lab,
  #crmWebToEntityForm .zcwf_col_lab label,
  [id^="crmWebToEntity"] .zcwf_col_lab,
  [id^="crmWebToEntity"] .zcwf_col_lab label {
    white-space: normal !important;
    word-break: break-word !important;
  }
}

/* Masquer Reset / Re-paramétrer (boutons d’action reset) */
#crmWebToEntityForm input[type="reset"],
#crmWebToEntityForm button[type="reset"],
[id^="crmWebToEntity"] input[type="reset"],
[id^="crmWebToEntity"] button[type="reset"],
.zcwf_row input[type="reset"],
.zcwf_row button[type="reset"],
.zcwf_col_fld input[type="reset"],
.zcwf_col_fld button[type="reset"],
.zc-live-secondary-btn,
#crmWebToEntityForm input[type="button"][value="Reset"],
#crmWebToEntityForm input[type="button"][value="Re-paramétrer"],
#crmWebToEntityForm input[type="button"][value="Réinitialiser"],
#crmWebToEntityForm input.zcwf_button[type="reset"] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}
