/**
 * 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;
}

/* Espace entre le dernier champ et le bouton Submit */
#crmWebToEntityForm .zcwf_row:has(input[type="submit"]),
#crmWebToEntityForm .zcwf_row:has(button[type="submit"]),
[id^="crmWebToEntity"] .zcwf_row:has(input[type="submit"]),
[id^="crmWebToEntity"] .zcwf_row:has(button[type="submit"]) {
  margin-top: 1.25rem !important;
}

#crmWebToEntityForm input[type="submit"],
#crmWebToEntityForm button[type="submit"],
#crmWebToEntityForm input.zcwf_button[type="submit"],
#crmWebToEntityForm input.formsubmit,
[id^="crmWebToEntity"] input[type="submit"],
[id^="crmWebToEntity"] button[type="submit"],
[id^="crmWebToEntity"] input.zcwf_button[type="submit"],
[id^="crmWebToEntity"] input.formsubmit,
.zcwf_row .zcwf_button[type="submit"],
.form-wrapper .zc-live-primary-btn {
  font-size: 16px !important;
  font-weight: 600 !important;
  padding: 14px 32px !important;
  min-height: 48px !important;
  min-width: 9.5rem !important;
  width: auto !important;
  max-width: none !important;
  overflow: visible !important;
  white-space: nowrap !important;
  text-overflow: clip !important;
  border-radius: 12px !important;
  box-sizing: border-box !important;
}

/* Canada landing — grille 2 colonnes (libellé | champ) */
.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_row,
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_row {
  display: grid !important;
  grid-template-columns: minmax(12rem, 32%) minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  width: 100% !important;
  margin: 18px 0 !important;
}

.form-wrapper #crmWebToEntityForm.zcwf_lblLeft,
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft {
  font-family: "DM Sans", sans-serif !important;
  padding: 0 !important;
}

.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_row::after,
.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_col_fld::after,
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_row::after,
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_col_fld::after {
  content: none !important;
  display: none !important;
}

.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_col_lab,
.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_col_fld,
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_col_lab,
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_col_fld {
  width: auto !important;
  max-width: none !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  padding: 0 6px !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_col_lab,
.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_col_lab label,
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_col_lab,
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_col_lab label {
  font-family: "DM Sans", sans-serif !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_col_lab,
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_col_lab {
  padding-top: 12px !important;
}

.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_col_fld input[type="text"],
.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_col_fld input[type="email"],
.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_col_fld input[type="tel"],
.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_col_fld input[type="number"],
.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_col_fld select,
.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_col_fld textarea,
.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_col_fld_slt,
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_col_fld input[type="text"],
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_col_fld input[type="email"],
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_col_fld input[type="tel"],
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_col_fld input[type="number"],
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_col_fld select,
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_col_fld textarea,
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_col_fld_slt {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
  padding: 11px 14px !important;
  min-height: 48px !important;
  border: 1px solid #cbd6e2 !important;
  border-radius: 4px !important;
  color: #33475b !important;
  background-color: #fff !important;
  box-sizing: border-box !important;
}

.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_col_fld textarea,
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_col_fld textarea {
  min-height: 96px !important;
  resize: vertical !important;
}

.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_row:has(.formsubmit) .zcwf_col_lab,
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_row:has(.formsubmit) .zcwf_col_lab {
  display: none !important;
}

.form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_row:has(.formsubmit) .zcwf_col_fld,
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_row:has(.formsubmit) .zcwf_col_fld {
  grid-column: 1;
  justify-self: start;
  text-align: left !important;
}

.form-wrapper #crmWebToEntityForm.zcwf_lblLeft input.formsubmit,
.form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft input.formsubmit {
  float: none !important;
  clear: none !important;
  display: inline-block !important;
  margin: 0 !important;
}

@media (max-width: 600px) {
  .form-wrapper #crmWebToEntityForm.zcwf_lblLeft .zcwf_row,
  .form-wrapper [id^="crmWebToEntity"].zcwf_lblLeft .zcwf_row {
    grid-template-columns: 1fr;
  }
}
