/* budget.css */
/* Styles du questionnaire d'estimation de projet web */

#budget-estimator {
  max-width: 920px;
  margin: 0 auto;
  color: #1c1c1c;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#budget-estimator h2,
#budget-estimator h3,
#budget-estimator legend {
  font-family: "Sora", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0f2d44;
}

#budget-estimator h2 {
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.1;
}

#budget-estimator h3 {
  margin: 32px 0 16px;
  font-size: 1.15rem;
}

#budget-estimator p {
  max-width: 680px;
  margin: 0 0 18px;
  color: #5a5a5a;
  line-height: 1.65;
}

/* Intro */

.budget-estimator__intro,
.budget-estimator__step,
.budget-estimator__result {
  padding: 48px;
  background: #f6f5f3;
  border-radius: 8px;
}

.budget-estimator__reassurance {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 24px 0 32px;
  padding: 0;
  list-style: none;
}

.budget-estimator__reassurance li {
  position: relative;
  padding-left: 20px;
  color: #0f2d44;
  font-size: 0.95rem;
}

.budget-estimator__reassurance li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #8cc633;
  font-weight: 700;
}

/* Progression */

.budget-estimator__progress {
  margin-bottom: 32px;
}

.budget-estimator__progress-label {
  margin-bottom: 10px;
  color: #5a5a5a;
  font-size: 0.9rem;
}

.budget-estimator__progress-bar {
  height: 6px;
  overflow: hidden;
  background: #ffffff;
  border-radius: 999px;
}

.budget-estimator__progress-bar span {
  display: block;
  height: 100%;
  background: #0f2d44;
  border-radius: 999px;
}

/* Questions */

.budget-estimator__form {
  margin-top: 32px;
}

.budget-estimator__question {
  margin: 0 0 32px;
  padding: 0;
  border: 0;
}

.budget-estimator__question legend {
  margin-bottom: 16px;
  font-size: 1.05rem;
  font-weight: 700;
}

.budget-estimator__help {
  margin-top: -8px !important;
  margin-bottom: 14px !important;
  font-size: 0.9rem;
}

/* Cartes */

.budget-estimator__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.budget-estimator__card {
  position: relative;
  display: block;
  min-height: 120px;
  padding: 20px;
  background: #ffffff;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 45, 68, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.budget-estimator__card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  background: transparent;
  border-radius: 999px;
}

.budget-estimator__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(15, 45, 68, 0.09);
}

/* Carte sélectionnée — version plus douce */
.budget-estimator__card.is-selected {
  background: #fbfdf7;
  border-color: rgba(140, 198, 51, 0.55);
  box-shadow: 0 12px 28px rgba(15, 45, 68, 0.07);
}

.budget-estimator__card.is-selected::before {
  top: 18px;
  bottom: 18px;
  width: 4px;
  background: #8cc633;
}

.budget-estimator__card.is-selected::after {
  content: "✓";
  position: absolute;
  top: 16px;
  right: 18px;
  color: #8cc633;
  font-weight: 800;
  font-size: 1rem;
}

.budget-estimator__card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.budget-estimator__card strong {
  display: block;
  margin-bottom: 8px;
  color: #0f2d44;
  font-size: 1rem;
}

.budget-estimator__card span {
  display: block;
  color: #5a5a5a;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Radios / checkboxes */

.budget-estimator__choices {
  display: grid;
  gap: 10px;
}

.budget-estimator__choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 45, 68, 0.04);
  cursor: pointer;
}

.budget-estimator__choice input {
  margin-top: 3px;
  accent-color: #0f2d44;
}

.budget-estimator__choice span {
  color: #1c1c1c;
  line-height: 1.45;
}

/* Actions */

.budget-estimator__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.budget-estimator__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  background: #0f2d44;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.budget-estimator__button:hover {
  background: #143a58;
}

.budget-estimator__button--secondary {
  background: #ffffff;
  color: #0f2d44;
  box-shadow: inset 0 0 0 1px rgba(15, 45, 68, 0.18);
}

.budget-estimator__button--secondary:hover {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #0f2d44;
}

.budget-estimator__link-button {
  display: inline-flex;
  align-items: center;
  margin-top: 24px;
  padding: 0;
  background: transparent;
  border: 0;
  color: #5a5a5a;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.budget-estimator__link-button:hover {
  color: #0f2d44;
}

.budget-estimator__link-button::before {
  content: "↺";
  margin-right: 8px;
}

.budget-estimator__error {
  margin-top: 16px !important;
  color: #9b1c1c !important;
  font-weight: 700;
}

/* Résultat */

.budget-estimator__price {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  margin: 18px 0 20px;
  padding: 22px 26px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 45, 68, 0.06);
}

.budget-estimator__price span {
  color: #4f5b66;
  font-size: 1.1rem;
  line-height: 1.5;
  font-weight: 500;
}

.budget-estimator__price strong {
  color: #0f2d44;
  font-family: "Sora", system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
}

.budget-estimator__disclaimer {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    padding-left: 1rem;
    border-left: 3px solid rgba(15,45,68,.15);
    margin: 2rem 0;
}

.budget-estimator__result ul {
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}

.budget-estimator__result li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 24px;
  color: #1c1c1c;
}

.budget-estimator__result li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #8cc633;
  font-weight: 700;
}

/* Lead */

.budget-estimator__lead {
  margin-top: 36px;
  padding: 28px;
  background: #ffffff;
  border-radius: 8px;
}

.budget-estimator__lead h3 {
  margin-top: 0;
}

.budget-estimator__lead-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.budget-estimator__lead-form label {
  display: grid;
  gap: 8px;
  color: #0f2d44;
  font-weight: 700;
}

.budget-estimator__lead-form input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(15, 45, 68, 0.18);
  border-radius: 6px;
  font: inherit;
}

.budget-estimator__lead-form button {
  align-self: end;
}

.budget-estimator__success {
  padding: 18px 20px;
  background: #fbfdf7;
  border-left: 4px solid #8cc633;
  border-radius: 6px;
  color: #0f2d44;
  font-weight: 600;
}
/* Mobile */

@media (max-width: 767px) {
  .budget-estimator__intro,
  .budget-estimator__step,
  .budget-estimator__result {
    padding: 28px 20px;
  }

  .budget-estimator__cards {
    grid-template-columns: 1fr;
  }

  .budget-estimator__card {
    min-height: auto;
  }

  .budget-estimator__actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .budget-estimator__button {
    width: 100%;
  }

  .budget-estimator__lead-form {
    grid-template-columns: 1fr;
  }

  .budget-estimator__price {
    display: flex;
    width: 100%;
  }

  .budget-estimator__reassurance {
    display: grid;
    gap: 10px;
  }
}

/* Ajustements UX / finition */

/* Cartes : moins hautes, plus équilibrées */
.budget-estimator__card {
  min-height: 104px;
  padding: 18px 20px;
  border: 1px solid transparent;
}

/* Carte sélectionnée — version plus sobre */
.budget-estimator__card.is-selected {
  background: #ffffff;
  border-color: rgba(15, 45, 68, 0.14);
  box-shadow: 0 12px 28px rgba(15, 45, 68, 0.08);
}

.budget-estimator__card.is-selected::before {
  display: none;
}

.budget-estimator__card.is-selected::after {
  content: "✓";
  position: absolute;
  top: 16px;
  right: 18px;
  color: #8cc633;
  font-weight: 800;
  font-size: 1.6rem;
}

/* Sécurité boutons */
.budget-estimator__button {
  box-sizing: border-box;
  max-width: 100%;
}

/* Bouton spécifique dans les résultats */
.budget-estimator__result > a.budget-estimator__button {
  width: auto;
}

@media (max-width: 767px) {
  .budget-estimator__result > a.budget-estimator__button {
    width: 100%;
  }
}
/* Bouton lead : ne plus le coincer dans une colonne */
.budget-estimator__lead-form {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.budget-estimator__lead-form button {
  grid-column: 1 / -1;
  justify-self: start;
  min-width: 260px;
}

/* Bloc lead : respiration un peu meilleure */
.budget-estimator__lead {
  padding: 32px;
}

/* Résultat : prix un peu plus premium */
.budget-estimator__price {
  min-width: 360px;
  padding: 26px 30px;
}


/* Mobile */
@media (max-width: 767px) {
  .budget-estimator__lead-form button {
    width: 100%;
    min-width: 0;
  }

  .budget-estimator__price {
    min-width: 0;
  }
}

/* Correctifs mobile */

@media (max-width: 767px) {
  #budget-estimator {
    max-width: none;
    width: 100%;
  }

  .budget-estimator__intro,
  .budget-estimator__step,
  .budget-estimator__result {
    padding: 28px 20px 32px;
    border-radius: 8px;
  }

  .budget-estimator__question {
    margin-bottom: 36px;
  }

  .budget-estimator__card {
    padding: 20px;
  }

  .budget-estimator__lead {
    padding: 24px 20px;
  }

  .budget-estimator__lead-form {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 18px;
  }

  .budget-estimator__lead-form label {
    width: 100%;
  }

  .budget-estimator__lead-form input {
    width: 100%;
    box-sizing: border-box;
  }

  .budget-estimator__lead-form button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 767px) {
  .budget-estimator__price {
    width: 100%;
    box-sizing: border-box;
    padding: 24px 22px;
  }

  .budget-estimator__price strong {
    font-size: 2.4rem;
  }
}

@media (max-width: 767px) {
  .budget-estimator__button {
    margin-bottom: 6px;
  }

  .budget-estimator__result {
    padding-bottom: 40px;
  }
}

.budget-estimator__submit-error {
  grid-column: 1 / -1;
  margin: 8px 0 0 !important;
  color: #9b1c1c !important;
  font-weight: 700;
}

#budget-estimator .btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.budget-estimator__privacy {
  grid-column: 1 / -1;
  margin: 4px 0 0 !important;
  color: #5a5a5a !important;
  font-size: 0.82rem;
  line-height: 1.5;
}

/* Correction forte des radios / checkboxes contre conflit CSS global */

#budget-estimator .budget-estimator__choices {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

#budget-estimator label.budget-estimator__choice {
  display: grid !important;
  grid-template-columns: 18px 1fr !important;
  align-items: start !important;
  justify-content: initial !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  text-align: left !important;
}

#budget-estimator label.budget-estimator__choice input {
  position: static !important;
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  margin: 3px 0 0 !important;
  opacity: 1 !important;
  transform: none !important;
}

#budget-estimator label.budget-estimator__choice span {
  display: block !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  white-space: normal !important;
}

.budget-estimator__lead-form textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
}