/* Estimate request form. Mobile first: every target is at least 48px high. */
.estimate {
  position: relative;
}
.estimate-progress {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.3px;
  color: var(--muted);
}
.estimate-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 0 26px;
}
.estimate-bar span {
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  transition: background 0.2s;
}
.estimate-progress[data-step="1"] + .estimate-bar span:first-child,
.estimate-progress[data-step="2"] + .estimate-bar span,
.estimate-progress[data-step="3"] + .estimate-bar span {
  background: var(--orange);
}
.estimate-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.estimate legend {
  padding: 0;
}
.estimate [data-step] > legend {
  font-size: 24px;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}
.estimate [data-step] > legend:focus {
  outline: none;
}
.estimate .field,
.estimate .choice {
  margin: 0 0 22px;
}
.estimate .field label,
.estimate .choice > legend,
.estimate-more label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px;
}
.estimate input:not([type="radio"]),
.estimate textarea {
  font-size: 16px; /* prevents the zoom on focus in iOS Safari */
  min-height: 52px;
  padding: 13px 14px;
  border: 1.5px solid #74878f;
  border-radius: 8px;
}
.estimate input::placeholder {
  color: #5d6f79;
}
.optional {
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
}
.optional::before {
  content: "· ";
}
.chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin: 0;
  padding: 10px 12px;
  border: 1.5px solid #74878f;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.1s;
}
.chips-icons .chip {
  flex-direction: column;
  gap: 6px;
  min-height: 84px;
}
.chip svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.chip:hover {
  border-color: var(--blue);
}
.chip:active {
  transform: scale(0.98);
}
.chip:has(input:checked) {
  border-color: var(--blue);
  background: #e8f0f4;
  box-shadow: inset 0 0 0 1px var(--blue);
}
.chip:has(input:checked)::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
}
.chip:has(input:focus-visible) {
  outline: 3px solid #dd702c;
  outline-offset: 3px;
}
.field-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.field-error {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 650;
  color: #a52b21;
}
.field-error::before {
  content: "⚠ ";
}
.has-error input:not([type="radio"]),
.has-error textarea {
  border-color: #a52b21;
  box-shadow: inset 0 0 0 1px #a52b21;
}
.has-error .chip {
  border-color: #a52b21;
}
.estimate-main {
  width: 100%;
  min-height: 54px;
  font-size: 15px;
}
.estimate-actions {
  display: grid;
  grid-template-columns: 1fr;
  margin: 26px 0 14px;
}
.estimate-actions .button {
  min-height: 54px;
}
.estimate-recap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 12px;
  margin: 0 0 22px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f1f4f3;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}
.link-button {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.estimate-more {
  margin: 0 0 22px;
}
.estimate-more summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  cursor: pointer;
}
.estimate-more label {
  margin-top: 10px;
}
/* The reCAPTCHA badge is replaced by the notice under the button, as Google allows. */
.grecaptcha-badge {
  visibility: hidden;
}
.estimate-failure {
  margin: 0 0 18px;
  padding: 16px;
  border: 1.5px solid #a52b21;
  border-radius: 8px;
  background: #fbf1ef;
  font-size: 14px;
  line-height: 1.6;
}
.estimate-failure p {
  margin: 0 0 12px;
}
.estimate-failure .actions {
  margin: 0;
}
.estimate-failure .button {
  flex: 1 1 200px;
}
#form-status:empty {
  display: none;
}
#estimate-result h2 {
  font-size: 24px;
  letter-spacing: -0.5px;
  margin: 0 0 14px;
}
#estimate-result h2:focus {
  outline: none;
}
#estimate-result .actions .button {
  flex: 1 1 200px;
}
.estimate-check {
  width: 52px;
  height: 52px;
  margin: 0 0 14px;
  fill: none;
  stroke: #1c7a4f;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 760px) {
  .estimate.form-card {
    padding: 20px 18px 22px;
  }
  .estimate [data-step] > legend,
  #estimate-result h2 {
    font-size: 22px;
  }
}
@media (max-width: 340px) {
  .chips:not(.chips-icons) {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 761px) {
  .chips-icons {
    grid-template-columns: repeat(4, 1fr);
  }
  .estimate-main {
    width: auto;
    min-width: 240px;
  }
  .estimate-actions {
    justify-content: start;
  }
}
.form-layout:has(.estimate) {
  align-items: start;
}
.estimate-more summary {
  list-style: none;
}
.estimate-more summary::-webkit-details-marker {
  display: none;
}
.estimate-more summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--blue);
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
}
.estimate-more[open] summary::before {
  content: "–";
}
/* Review of 17 November 2026 */
.optional {
  white-space: nowrap;
}
.field.has-error .field-hint {
  display: none;
}
#form-status {
  margin: 0 0 12px;
  font-weight: 650;
}
@media (max-width: 300px) {
  .chips,
  .chips.chips-icons {
    grid-template-columns: 1fr;
  }
  .chips-icons .chip {
    flex-direction: row;
    min-height: 56px;
  }
  .estimate.form-card {
    padding: 16px 12px 18px;
  }
}

/* ── Harmonisation avec l'identité actualisée du site (aucun changement de logique) ── */
.estimate input:not([type="radio"]),
.estimate textarea,
.chip,
.estimate-recap,
.estimate-failure {
  border-radius: 2px;
}
.chip:has(input:checked) {
  background: var(--sand);
}
.chip:has(input:focus-visible) {
  outline-color: var(--blue);
}
.estimate-recap {
  background: var(--sand);
}
.estimate [data-step] > legend,
#estimate-result h2 {
  font-weight: 750;
}
.estimate .button {
  text-transform: uppercase;
}
.form-layout > *,
.estimate fieldset,
.chip {
  min-width: 0;
}
.chip span {
  overflow-wrap: anywhere;
}
@media (max-width: 300px) {
  .aside h2 {
    font-size: 20px;
  }
}
@media (max-width: 300px) {
  .estimate .button {
    padding: 12px 6px;
    font-size: 12px;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }
  .estimate-recap,
  .field-hint,
  .field-error {
    overflow-wrap: anywhere;
  }
}
@media (max-width: 300px) {
  .optional {
    white-space: normal;
  }
}
@media (max-width: 300px) {
  .estimate legend,
  .estimate label {
    overflow-wrap: anywhere;
  }
}
/* A legend sizes itself to its text: keep it inside its fieldset so long labels wrap. */
.estimate legend {
  max-width: 100%;
  box-sizing: border-box;
}
@media (max-width: 300px) {
  .optional {
    display: inline-block;
    max-width: 100%;
  }
}
.estimate-more summary {
  flex-wrap: wrap;
}
/* ── Lot du 21 novembre 2026 : confort de lecture et grands écrans ── */
.estimate-progress,
.optional,
.field-hint {
  font-size: var(--fs-xs, 12px);
}
.field-error,
.estimate-recap,
.link-button {
  font-size: var(--fs-s, 13.5px);
}
.estimate .field label,
.estimate .choice > legend,
.estimate-more label,
.chip,
.estimate-main,
.estimate-more summary,
.estimate-failure {
  font-size: var(--fs-b, 15px);
}
/* ── Adresse du bien : rue, numéro et boîte, affichés une fois la commune indiquée ── */
.address-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
@media (max-width: 300px) {
  .address-row {
    grid-template-columns: 1fr;
  }
}
/* ── Fourchette de prix indicative : trois étapes, caractéristiques, résultat ── */
.estimate-bar {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}
.estimate-progress[data-step="2"] + .estimate-bar span:nth-child(-n + 2),
.estimate-progress[data-step="3"] + .estimate-bar span,
.estimate-progress[data-step="4"] + .estimate-bar span {
  background: var(--orange);
}
.chips-3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 380px) {
  .chips-3 {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 761px) {
  .chips-icons {
    grid-template-columns: repeat(5, 1fr);
  }
}
.estimate-range {
  margin: 0 0 24px;
  padding: 20px 20px 18px;
  border-left: 4px solid var(--orange);
  border-radius: 2px;
  background: var(--sand);
}
.estimate-range p {
  margin: 0;
}
.estimate-range-label {
  font-size: var(--fs-s, 13.5px);
  font-weight: 750;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--muted);
}
.estimate-range-value {
  margin: 6px 0 10px !important;
  font-size: clamp(24px, 6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  color: var(--blue);
}
.estimate-range-note,
.estimate-range-later {
  font-size: var(--fs-s, 13.5px);
  line-height: 1.6;
  color: var(--muted);
}
.estimate-range-later {
  margin: 0 0 20px;
}
/* The rule of the two-step form fills every segment at step 2: the third waits for step 3. */
.estimate-progress[data-step="2"] + .estimate-bar span:nth-child(3) {
  background: var(--line);
}
