/* =======================================================
   Estimation — Version Luxury Properties Responsive
   Rendu conforme maquette (Image 2)
======================================================= */

:root {
  --brand: #004c66;
  --brand-weak: #e7f0f2;
  --text: #0e2a36;
  --muted: #6b737a;
  --bg: #f6f3ec;
  --card: #ffffff;
  --border: #e6e0d6;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* PAGE GLOBALE */
.estimation-form {
  background: var(--bg);
  padding: 24px 0 56px;
  font-family: "Montserrat", Arial, sans-serif;
  color: var(--text);
}

/* WRAPPER */
.estimate-wizard {
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 16px;
}

/* TITRE PRINCIPAL */
.wiz__title {
  font-family: "Big Caslon", serif;
  /* font-size: clamp(32px, 3.2vw, 44px); */
  font-weight: 500;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 12px;
}

/* BARRE DE PROGRESSION */
.wiz__progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.wiz__bar {
  flex: 1;
  height: 6px;
  background: #ece7dd;
  border-radius: 999px;
  overflow: hidden;
}
.wiz__bar-fill {
  display: block;
  height: 100%;
  background: var(--brand);
  width: 20%;
  transition: width 0.25s ease;
}
.wiz__percent {
  margin-left: 12px;
  font-size: 14px;
  color: var(--muted);
}

/* GRILLE PRINCIPALE */
.wiz__grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
}
@media (max-width: 980px) {
  .wiz__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* STEPPER LATÉRAL */
.wiz__steps {
  list-style: none;
  padding: 8px 0;
  margin: 0;
}
.wiz__steps li {
  position: relative;
  padding-left: 24px;
  font-size: 18px;
  margin-bottom: .5rem;
  font-weight: 600;
  color: #222;
}
.wiz__steps li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #222;
}
.wiz__steps li.is-active {
  color: var(--color-brand-300);
  font-weight: 700;
}
.wiz__steps li.is-active::before {
  background: var(--color-brand-300);
}
.wiz__steps li.is-done {
  color: var(--text);
}
.wiz__steps li.is-done::before {
  background: var(--text);
}

/* CARTE PRINCIPALE */
.wiz__card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.05);
}
@media (max-width: 768px) {
  .wiz__card {
    padding: 28px 20px;
    border-radius: 20px;
  }
}

/* STEP HEADER */
.wiz__step legend {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.wiz__step p {
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 16px;
}

h2.wp-block-heading, h5.wp-block-heading{
  font: var(--h2-font);
  margin-bottom: 1rem;
}

form.jet-form-builder p {
    font-size: .9rem;
    margin-bottom: 1rem;
}
form.jet-form-builder p:empty {
  display: none;
}

/* SEPARATEUR */
.wp-block-separator {
  border: none;
  border-top: 2px solid var(--text);
  width: 24px;
  opacity: 1;
  margin: 12px 0 24px;
}

/* LABELS */
.jet-form-builder__label-text {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.05em;
  color: #222;
  margin-bottom: 6px;
}

/* INPUTS / SELECT */
.jet-form-builder__field-wrap {
  position: relative;
}
.jet-form-builder__field {
  width: 100%;
  border: none;
  border-bottom: 1px solid #e0dcd2;
  background: transparent;
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  transition: border-color 0.2s ease;
}
.jet-form-builder__field::placeholder {
  color: var(--muted);
  font-weight: 400;
}
.jet-form-builder__field:focus {
  outline: none;
  border-bottom-color: var(--brand);
}
.jet-form-builder__field.select-field {
  padding-right: 36px;
}

/* =======================================================
   RADIO PILLS — Estimer le prix (version finale)
======================================================= */
.jet-form-builder__fields-group.checkradio-wrap {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.jet-form-builder__field-wrap.radio-wrap {
  margin: 0;
  flex: 0 0 auto;
}

.jet-form-builder__field-label.for-radio {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.jet-form-builder__field-label.for-radio input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.jet-form-builder__field-wrap.checkradio-wrap span{
  font-size: .9rem;
}

.jet-form-builder__field-label.for-radio span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 2px solid #888B97;
  border-radius: 6px;
  background: #fff;
  color: #888B97;
  font-weight: 700;
  font-size: .9rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

/* Hover visuel */
.jet-form-builder__field-label.for-radio span:hover {
  border-color: #CEAE7E;
  color: #0e2a36;
}

/* État sélectionné */
.jet-form-builder__field-label.for-radio input:checked + span {
  background: #fff;
  border-color: #CEAE7E;
  color: #0e2a36;
}

/* Suppression de la puce radio par défaut JetFormBuilder */
.estimation-form .field-type-radio-field
.jet-form-builder__field-label.for-radio > span::before {
  content: none;
  display: none;
  width: 0;
  height: 0;
  border: 0;
  background: none;
}

/* =======================================================
   BOUTONS DE NAVIGATION — Version maquette
======================================================= */

/* Footer global : Back à gauche, texte au centre, Suivant à droite */
.wiz__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
}

/* Bouton Back custom (chevron seul dans un pill) */
.wiz__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.wiz__back::before {
  content: "←";
  font-size: 18px;
  line-height: 1;
}

.wiz__back.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Texte avec l’astérisque */
.form__disclaimer {
  margin: 0;
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  text-align: left;
}

/* Conteneur qui récupère le bouton JetForm (Suivant / Envoyer) */
.wiz__footer-next {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Styles du bouton JetForm aligné à droite */
.jet-form-builder__next-page-wrap,
.jet-form-builder__submit-wrap {
  margin-top: 0;           /* plus de gros décalage fixe */
}

.jet-form-builder__next-page,
button.jet-form-builder__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  height: 44px;
  padding: 11px 40px;
  border-radius: 6px;
  border: none;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.jet-form-builder__next-page:hover,
button.jet-form-builder__submit:hover {
  filter: brightness(1.05);
}
.jet-form-builder__next-page:active,
button.jet-form-builder__submit:active {
  transform: translateY(1px);
}
.jet-form-builder__next-page::after {
  content: "→";
  font-size: 16px;
}

/* On cache le bouton Prev d’origine JetForm (on le remplace par .wiz__back) */
.jet-form-builder__prev-page,
.jet-form-builder__prev-page-wrap {
  display: none !important;
}

/* Responsive : footer en colonne sur mobile */
@media (max-width: 640px) {
  .wiz__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .wiz__footer-next {
    width: 100%;
    justify-content: flex-end;
  }
}

/* DISCLAIMER */
.form__disclaimer {
  margin-top: 12px;
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  text-align: center;
}

/* UTILITAIRES */
.is-hidden {
  display: none !important;
}

/* AJUSTEMENTS VISUELS */
.jet-form-builder__messages-wrap {
  margin-top: 16px;
}

/* Corrige le layout des checkboxs bonus optionnels */
.field-type-checkbox-field .jet-form-builder__fields-group.checkradio-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

/* Conserve le layout horizontal uniquement pour les radios */
.field-type-radio-field .jet-form-builder__fields-group.checkradio-wrap {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

/* Custom Select — Luxury Properties Style */
.lp-select {
  position: relative;
  display: inline-block;
  width: 100%;
}
.lp-select__visible {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid #e0dcd2;
  cursor: pointer;
  font-weight: 400;
  color: #222;
  padding: 0 0 0.6em;
  transition: border-color 0.2s ease;
  font-size: 16px;
  font-family: "Montserrat", sans-serif;
  margin-bottom: 0.1em;
}
.lp-select__visible::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid #6b737a;
  border-bottom: 2px solid #6b737a;
  transform: rotate(45deg);
  margin-left: 8px;
  transition: transform 0.2s ease;
}
.lp-select.open .lp-select__visible::after {
  transform: rotate(-135deg);
}
.lp-select__menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 0 0 6px 6px;
  z-index: 20;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  display: none;
  padding: 0;
}
.lp-select.open .lp-select__menu {
  display: block;
}
.lp-select__menu li {
  list-style: none;
  padding: 10px 14px;
  font-weight: 400;
  font-size: .9rem;
  line-height: 1.2em;
  cursor: pointer;
  border-radius: 0 0 6px 6px;
  transition: background 0.2s ease, color 0.2s ease;
}
.lp-select__menu li:hover {
  background: #DCF6F0;
  color: #008996;
}
.lp-select select {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.jet-form-builder__field-label{
  font-weight: 500;
}

/* Largeurs fixes desktop */
/* .wp-block-columns.is-layout-flex.wp-container-core-columns-is-layout-9d6595d7.wp-block-columns-is-layout-flex {
  width: 780px;
}
.jet-form-builder-row.field-type-text-field {
  width: 100%;
}
.jet-form-builder__field-wrap:has(.jet-form-builder__field[name="adresse"]) {
  width: 780px !important;
} */

/* Diagnostic énergétique — DPE A→G */
.jet-form-builder__fields-group.checkradio-wrap:has(input[name="dpe"]) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 390px;
}
.jet-form-builder__fields-group.checkradio-wrap:has(input[name="dpe"])
.jet-form-builder__field-label.for-radio span {
  width: 39px;
  height: 39px;
  padding: 0;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  border: 2px solid #888B97;
  border-radius: 6px;
  color: #888B97;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.jet-form-builder__fields-group.checkradio-wrap:has(input[name="dpe"])
.jet-form-builder__field-label.for-radio span:hover {
  border-color: #CEAE7E;
  color: #0e2a36;
}
.jet-form-builder__fields-group.checkradio-wrap:has(input[name="dpe"])
.jet-form-builder__field-label.for-radio input:checked + span {
  border-color: #CEAE7E;
  color: #0e2a36;
  background: #fff;
}
legend.jet-form-builder__label {
  margin-bottom: 0;
}

/* .footer{display: none;} */
/* =======================================================
   FIX RESPONSIVE UNIQUEMENT
======================================================= */

/* TABLETTE ≤ 980px */
@media (max-width: 980px) {
  .wp-block-columns.is-layout-flex.wp-container-core-columns-is-layout-9d6595d7.wp-block-columns-is-layout-flex,
  .jet-form-builder-row.field-type-text-field,
  .jet-form-builder__field-wrap:has(.jet-form-builder__field[name="adresse"]),
  .jet-form-builder__fields-group.checkradio-wrap:has(input[name="dpe"]) {
    width: 100% !important;
  }

  .jet-form-builder__fields-group.checkradio-wrap:has(input[name="dpe"]) {
    justify-content: flex-start;
  }
}

/* MOBILE ≤ 640px */
@media (max-width: 640px) {
  .wp-block-columns.is-layout-flex.wp-container-core-columns-is-layout-9d6595d7.wp-block-columns-is-layout-flex,
  .jet-form-builder-row.field-type-text-field,
  .jet-form-builder__field-wrap:has(.jet-form-builder__field[name="adresse"]),
  .jet-form-builder__fields-group.checkradio-wrap:has(input[name="dpe"]) {
    width: 100% !important;
    max-width: 100%;
    gap: 0.2rem !important;
  }

  .jet-form-builder__fields-group.checkradio-wrap:has(input[name="dpe"]) {
    justify-content: flex-start;
    gap: 6px;
  }

  .jet-form-builder__fields-group.checkradio-wrap:has(input[name="dpe"])
  .jet-form-builder__field-label.for-radio span {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }
}
/* =========================================================
   RESPONSIVE - formulaire-estimation.css (desktop-first, max-width)
   Base = 2560-1920 ; correctifs en dessous | PAGES CIBLEES UNIQUEMENT
========================================================= */
@media (max-width: 1680px) {
  /* Reduit les marges laterales du wizard */
  .page-template-templatespagesestimation-form-php .estimate-wizard {
    padding-inline: 24px;
  }
  .page-template-templatespagesestimation-form-php .wiz__card {
    padding: clamp(32px, 4vw, 40px);
  }
}

@media (max-width: 1280px) {
  /* Etire le contenu principal et resserre la colonne laterale */
  .page-template-templatespagesestimation-form-php .wiz__grid {
    gap: 32px;
    grid-template-columns: 260px 1fr;
  }
}

@media (max-width: 1024px) {
  /* Passage en mono-colonne avec stepper au-dessus du formulaire */
  .page-template-templatespagesestimation-form-php .wiz__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .page-template-templatespagesestimation-form-php .wiz__steps {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    flex-direction: column;
    align-self: flex-start;
  }
  .page-template-templatespagesestimation-form-php .wiz__steps li {
    padding-left: 18px;
    margin: 0;
    font-size: .9rem;
  }
    .wiz__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  /* Fluidifie les cartes et agrandit la surface de clic des radios */
  .page-template-templatespagesestimation-form-php .wiz__card {
    padding: clamp(24px, 5vw, 28px);
  }
  .page-template-templatespagesestimation-form-php .jet-form-builder__fields-group.checkradio-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .page-template-templatespagesestimation-form-php .jet-form-builder__field-label.for-radio span {
    width: 100%;
  }
}

@media (max-width: 640px) {

}

@media (max-width: 480px) {
  /* Ajustements fins des espacements */
  .page-template-templatespagesestimation-form-php .estimate-wizard {
    padding-inline: 16px;
  }
  .page-template-templatespagesestimation-form-php .wiz__card {
    border-radius: 18px;
  }
  .page-template-templatespagesestimation-form-php .jet-form-builder__field {
    font-size: clamp(17px, 6vw, 20px);
  }
}

@media (max-width: 375px) {
  /* Compacter les boutons et labels */
  .page-template-templatespagesestimation-form-php .jet-form-builder__field-label.for-radio span {
    padding: 10px 16px;
  }
  .page-template-templatespagesestimation-form-php .wiz__steps li {
    font-size: 11px;
  }
  .wiz__title {
    font-size: clamp(23px, 3.2vw, 44px);;
  }
}

@media (max-width: 320px) {
  /* Dernier garde-fou contre le scroll horizontal */
  .page-template-templatespagesestimation-form-php .estimate-wizard,
  .page-template-templatespagesestimation-form-php .wiz__card {
    padding-inline: 12px;
  }
}
/* Footer navigation */
.wiz__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
}

/* Bouton back (tu l'as déjà, je le rappelle juste) */
.wiz__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.wiz__back::before {
  content: "←";
  font-size: 18px;
  line-height: 1;
}
.wiz__back.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Texte obligatoire */
.form__disclaimer {
  margin: 0;
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  text-align: left;
}

/* Bouton Suivant custom (unique) */
.wiz__next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  height: 44px;
  padding: 11px 40px;
  border-radius: 6px;
  border: none;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.wiz__next::after {
  content: "→";
  font-size: 16px;
}
.wiz__next:hover {
  filter: brightness(1.05);
}
.wiz__next:active {
  transform: translateY(1px);
}

/* On CACHE tous les boutons de navigation JetForm,
   on ne garde que notre UI custom */
.jet-form-builder__next-page-wrap,
.jet-form-builder__submit-wrap,
.jet-form-builder__prev-page-wrap,
.jet-form-builder__prev-page {
  display: none !important;
}

/* Responsive : footer en colonne sur mobile */
@media (max-width: 640px) {
  .wiz__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  button.wiz__back.my-prev {
    display:none;
  }
}
/* Grille principale : 2 colonnes (stepper + contenu) */
.wiz__grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 40px;
}

/* Colonne gauche : stepper en haut, bouton Back en bas */
.wiz__sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Le stepper reste en haut */
.wiz__steps {
  list-style: none;
  padding: 8px 0;
  margin: 0;
}

/* Bouton Back calé sous la liste, aligné à gauche */
.wiz__back {
  margin-top: 24px;        /* espace avec les <ol> */
  align-self: flex-start;  /* bien collé à gauche de la colonne */
}

/* Sur tablette/mobile, 1 seule colonne : on laisse tout s’empiler */
@media (max-width: 1024px) {
  .wiz__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .wiz__sidebar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .wiz__steps {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .wiz__back {
    margin-top: 0;
  }
}
/* Nouveau style du bouton Back : simple chevron bleu */
.wiz__back {
  border: none;
  background: transparent;
  padding: 0;
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--brand); /* #004c66 */
}

/* on retire l'ancienne flèche en ::before */
.wiz__back::before {
  content: none;
}

/* SVG interne */
.wiz__back svg {
  width: 44px;
  height: 44px;
  stroke: currentColor;
}

/* hover léger */
.wiz__back:hover {
  opacity: .8;
  color: #008996;
}

/* état désactivé sur la première step */
.wiz__back.is-disabled {
  opacity: .3;
  cursor: default;
  pointer-events: none;
}
/* Bouton de fermeture (croix en haut à droite) */
.estimate-wizard {
  position: relative;
}

.wiz__close {
  position: absolute;
  top: 10px;          /* ajuste au besoin */
  right: 16px;        /* ajuste au besoin */
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.wiz__close svg {
  width: 40px;
  height: 40px;
  stroke: currentColor;
  color: #004c66;
}

.wiz__close svg:hover {
  color: #008996;
}

/* un peu plus proche du bord sur mobile si tu veux */
@media (max-width: 768px) {
  .wiz__title{
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
  }
  .wiz__close {
    top: 0;
    right: 1rem;
    width: 1.875rem;
    height: 1.25rem;
  }
  .lp-select__visible {
    font-size: .9rem !important;
  }
}
