/* ==========================================================================
   Wizard « Voyage sur mesure » — page-sur-mesure.php
   S'appuie sur theme.css (charte, .btn, .form-hero, .form-note, .form-alert).
   No-JS : toutes les étapes visibles à la suite. JS (.sm-form.js) : une à la fois.
   ========================================================================== */

/* ---- Chrome minimal (header-minimal.php / footer-minimal.php) ------------ */
.sm-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
/* Décalage sous la barre d'admin WordPress (comme .site-header). */
.admin-bar .sm-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .sm-header { top: 46px; } }
.sm-header__in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 14px; padding: 10px 24px; max-width: 1160px; }
.sm-header__back { justify-self: start; font-family: var(--mont); font-size: .8rem; font-weight: 500;
  color: var(--ink-soft); transition: .25s var(--ease); }
.sm-header__back:hover { color: var(--teal-deep); }
.sm-header__logo { justify-self: center; display: block; line-height: 0; }
.sm-header__logo img, .sm-header__logo .custom-logo { height: 60px; width: auto; display: block; }
.sm-header__trust { justify-self: end; font-family: var(--mont); font-size: .78rem; font-weight: 500;
  color: var(--teal-ink); text-align: right; }

.sm-footer { background: var(--ink); color: #fff; margin-top: 60px; }
.sm-footer__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 24px; padding: 22px 24px; font-size: .8rem; }
.sm-footer__copy { opacity: .8; }
.sm-footer__legal { display: flex; gap: 20px; }
.sm-footer__legal a { color: #fff; opacity: .8; transition: .25s var(--ease); }
.sm-footer__legal a:hover { opacity: 1; color: var(--teal); }

/* Header non fixe → on annule la grande réserve de hauteur du hero partagé. */
.page-template-page-sur-mesure .form-hero { padding: 46px 0 40px; }

@media (max-width: 620px) {
  .sm-header__in { grid-template-columns: auto 1fr; }
  .sm-header__trust { display: none; }
  .sm-header__logo { justify-self: end; }
  .sm-footer__in { flex-direction: column; align-items: flex-start; }
}

.sm-wrap { max-width: 820px; margin: 0 auto; padding: 46px 24px 90px; }

/* ---- Barre de progression (visible en mode JS uniquement) ---------------- */
.sm-steps { display: none; list-style: none; margin: 0 0 38px; padding: 0;
  counter-reset: s; gap: 6px; }
.sm-form.js .sm-steps { display: flex; flex-wrap: wrap; }
.sm-steps__item { flex: 1 1 0; min-width: 120px; display: flex; align-items: center;
  gap: 10px; padding: 12px 8px 12px 0; border-top: 3px solid var(--line);
  color: var(--ink-soft); font-family: var(--mont); font-size: .78rem; font-weight: 500;
  cursor: pointer; transition: .3s var(--ease); }
.sm-steps__item.is-active { border-top-color: var(--teal); color: var(--ink); }
.sm-steps__item.is-done { border-top-color: var(--teal-deep); }
.sm-steps__num { flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--sand); color: var(--ink-soft);
  font-weight: 700; font-size: .82rem; transition: .3s var(--ease); }
.sm-steps__item.is-active .sm-steps__num { background: var(--teal); color: #fff; }
.sm-steps__item.is-done .sm-steps__num { background: var(--teal-deep); color: #fff; }
.sm-steps__label { line-height: 1.25; }

/* ---- Étapes -------------------------------------------------------------- */
.sm-step { padding-top: 8px; }
.sm-step__title { font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 1.3; letter-spacing: -.01em;
  margin: 0 0 16px; color: var(--ink); }
/* Focus posé par le JS au changement d'étape (a11y) : pas de contour visible sur un titre. */
.sm-step__title:focus { outline: none; }
.sm-step__intro { color: var(--ink-soft); margin: 0 0 32px; max-width: 60ch; }

.sm-part { border: 0; margin: 0 0 40px; padding: 0; }
.sm-part__title { font-family: var(--mont); font-weight: 700; font-size: 1.02rem; line-height: 1.4;
  color: var(--teal-ink); text-transform: uppercase; letter-spacing: .08em;
  padding: 0 0 14px; margin: 0 0 24px; border-bottom: 1px solid var(--line); width: 100%; }

/* ---- Blocs de question --------------------------------------------------- */
.sm-block { margin: 0 0 22px; }
.sm-label { display: block; font-family: var(--mont); font-weight: 600; font-size: .95rem;
  color: var(--ink); margin: 0 0 10px; }
.sm-label .req { color: var(--clay); }

.sm-block input[type="text"],
.sm-block input[type="email"],
.sm-block input[type="tel"],
.sm-block select,
.sm-block textarea {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; transition: .25s var(--ease); }
.sm-block textarea { resize: vertical; min-height: 96px; }
.sm-block input:focus, .sm-block select:focus, .sm-block textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(40,190,192,.16); }

/* ---- Choix (cases / radios) en pastilles cliquables ---------------------- */
.sm-choices { display: grid; gap: 10px; }
.sm-choices--multi, .sm-choices--single {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.sm-choice { display: flex; align-items: center; gap: 11px; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: .95rem; line-height: 1.35; transition: .2s var(--ease); }
.sm-choice:hover { border-color: var(--teal); background: var(--cream); }
.sm-choice input { flex: none; width: 18px; height: 18px; accent-color: var(--teal); margin: 0; }
.sm-choice:has(input:checked) { border-color: var(--teal); background: rgba(40,190,192,.08);
  box-shadow: inset 0 0 0 1px var(--teal); }

/* ---- Navigation étape (mode JS) + envoi ---------------------------------- */
.sm-nav { display: none; gap: 12px; margin-top: 10px; }
.sm-form.js .sm-nav { display: flex; justify-content: space-between; }
.sm-nav .sm-next { margin-left: auto; }

.sm-final { margin-top: 20px; }
.sm-check { display: flex; align-items: flex-start; gap: 11px; cursor: pointer;
  font-size: .92rem; color: var(--ink-soft); line-height: 1.5; }
.sm-check input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal); }
.sm-submit { margin-top: 22px; }

/* ---- Erreurs ------------------------------------------------------------- */
.sm-err { display: block; color: #a5342b; font-style: normal; font-size: .84rem; margin-top: 7px; }
.sm-block.has-err > .sm-label,
.sm-block.has-err input, .sm-block.has-err select, .sm-block.has-err textarea { }
.sm-block.has-err input, .sm-block.has-err select, .sm-block.has-err textarea {
  border-color: #d98b82; box-shadow: 0 0 0 3px rgba(197,130,90,.14); }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 640px) {
  .sm-wrap { padding: 30px 18px 70px; }
  .sm-choices--multi, .sm-choices--single { grid-template-columns: 1fr; }
  .sm-steps__label { display: none; }
  .sm-steps__item { min-width: 0; flex: 1; justify-content: center; padding-right: 0; }
}
