/* Questionnaire propriétaire — le formulaire d'origine, aux couleurs du site,
   rempli une étape à la fois. Les classes sont celles de la fiche d'origine. */

.q {
  --q-top: var(--header-h);
  --accent: var(--brand);
  --danger: #a3271d;
  --danger-soft: #fbeae7;
  --livret: url('../img/livret-420.webp');
  overflow-anchor: none;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hpot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- en-tête ---------- */
.q-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(2rem, 6vw, 6rem); align-items: center; padding-top: clamp(1.5rem, 4vw, 3.5rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.q-hero .lede { max-width: 42rem; }
.meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.meta span { padding: 0.4rem 0.9rem; border-radius: var(--r-pill); background: var(--surface); color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.q-privacy { margin-top: 1rem; color: var(--muted); font-size: 0.9375rem; }
.q-privacy a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.q .sec__d a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.q-hero__art { width: 16rem; border-radius: var(--r-card); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lift); transform: rotate(2.5deg); }
.q-hero__art img { width: 100%; }

/* ---------- barre d'avancement ---------- */
.q-bar { position: sticky; top: var(--q-top); z-index: 40; background: rgba(250, 248, 244, 0.97); box-shadow: 0 1px 0 var(--line); }
.q:has(#fiche[hidden]) .q-bar { display: none; }
.q-bar__in { display: flex; align-items: center; gap: 1rem; min-height: 3.75rem; }
.retour { display: inline-flex; align-items: center; gap: 0.35rem; flex: none; max-width: 14rem; padding: 0.4rem 0.9rem 0.4rem 0.7rem; border: 0; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand-hover); font-size: 0.875rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background-color 0.2s; }
.retour::before { content: '‹'; font-size: 1.2rem; line-height: 1; margin-top: -2px; }
.retour:hover { background: #b8dcc8; }
.q-bar__step { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 0.3rem 0; border: 0; background: none; text-align: left; line-height: 1.25; }
.q-bar__step span { color: var(--copper); font-size: 0.75rem; font-weight: 650; letter-spacing: 0.02em; }
.q-bar__step b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--serif); font-size: 1.0625rem; font-weight: 550; }
.status { display: flex; align-items: center; gap: 1rem; margin-left: auto; color: var(--muted); font-size: 0.875rem; white-space: nowrap; }
.status b { color: var(--brand-hover); font-weight: 700; font-variant-numeric: tabular-nums; }
#saveState { transition: color 0.35s; }
#saveState[data-idle='0'] { color: var(--brand-hover); }
.progressline { height: 3px; background: var(--line); }
.progressline i { display: block; width: 0; height: 100%; border-radius: 0 2px 2px 0; background: var(--brand); transition: width 0.45s var(--ease-out); }

/* ---------- mise en page ---------- */
.q-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: start; padding-top: 1.5rem; padding-bottom: clamp(2rem, 5vw, 4rem); }
.q-layout:has(.rail[hidden]), .q-layout:has(.done.is-on) { grid-template-columns: minmax(0, 1fr); }
.q-main { min-width: 0; max-width: 52rem; }

/* ---------- sommaire ---------- */
.rail { position: sticky; top: calc(var(--q-top) + 5rem); max-height: calc(100svh - var(--q-top) - 6.5rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0.25rem 0.25rem 1rem 0; }
.q:has(.done.is-on) .rail, .q:has(.done.is-on) .choisi { display: none; }
.rail h2 { margin-bottom: 0.75rem; font-family: var(--sans); font-size: 0.8125rem; font-weight: 650; color: var(--muted); letter-spacing: 0.02em; }
.rail ol { display: grid; gap: 2px; }
.rail__chap { margin: 1.1rem 0 0.35rem; padding: 0 0.6rem; color: var(--copper); font-size: 0.75rem; font-weight: 650; line-height: 1.4; }
.rail__chap:first-child { margin-top: 0; }
.rail a { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; padding: 0.5rem 0.6rem; border-radius: 10px; color: var(--muted); font-size: 0.875rem; line-height: 1.3; text-decoration: none; transition: background-color 0.2s, color 0.2s; }
.rail a:hover { background: var(--surface); color: var(--ink); }
.rail a.is-current { background: var(--forest); color: #fff; font-weight: 600; }
.rail .n { color: var(--copper); font-size: 0.75rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.rail a.is-current .n { color: var(--copper-light); }
.dot { width: 0.7rem; height: 0.7rem; border: 1.5px solid var(--line-strong); border-radius: 50%; transition: background-color 0.2s, border-color 0.2s; }
.dot[data-state='partial'] { border-color: var(--brand); background: linear-gradient(90deg, var(--brand) 50%, transparent 50%); }
.dot[data-state='full'] { border-color: var(--brand); background: var(--brand); }
.rail a.is-current .dot { border-color: rgba(255, 255, 255, 0.7); }
.rail a.is-current .dot[data-state='full'], .rail a.is-current .dot[data-state='partial'] { border-color: var(--copper-light); }
.rail a.is-current .dot[data-state='full'] { background: var(--copper-light); }
.rail a.is-current .dot[data-state='partial'] { background: linear-gradient(90deg, var(--copper-light) 50%, transparent 50%); }

/* ---------- choix du service ---------- */
.choix { padding-bottom: 1rem; }
.choix__t { font-family: var(--serif); font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.125rem); font-weight: 500; line-height: 1.15; letter-spacing: -0.015em; }
.choix__d { margin: 0.6rem 0 1.75rem; color: var(--muted); }
.choix__grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.carte { display: flex; flex-direction: column; align-items: flex-start; padding: 1.5rem 1.4rem 1.3rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); color: var(--ink); text-align: left; transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.3s; }
.carte:hover { transform: translateY(-4px); border-color: transparent; box-shadow: var(--shadow-lift); }
.carte:active { transform: scale(0.98); }
.carte__i { width: 3.25rem; height: 2.5rem; margin-bottom: 1.1rem; color: var(--brand); }
.carte b { margin-bottom: 0.45rem; font-family: var(--serif); font-size: 1.3125rem; font-weight: 550; line-height: 1.2; }
.carte em { margin-bottom: 1.25rem; color: var(--muted); font-size: 0.9375rem; font-style: normal; line-height: 1.5; }
.carte__go { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: auto; color: var(--brand); font-size: 0.9375rem; font-weight: 650; }
.carte__go::after { content: '→'; transition: transform 0.2s var(--ease); }
.carte:hover .carte__go::after { transform: translateX(4px); }
.carte--info { border-style: dashed; border-color: var(--line-strong); background: var(--surface); }
.carte--info .carte__i, .carte--info .carte__go { color: var(--copper); }

/* service retenu */
.choisi { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-bottom: 1rem; padding: 0.85rem 1.1rem; border-radius: var(--r-media); background: var(--surface); }
.choisi__l { color: var(--muted); font-size: 0.8125rem; font-weight: 650; }
.choisi b { font-family: var(--serif); font-size: 1.125rem; font-weight: 550; }
.choisi .btn--link { margin-left: auto; }

/* ---------- qui sommes-nous ---------- */
.presentation { max-width: 46rem; padding-bottom: 1rem; }
.presentation .eyebrow { margin-bottom: 0.75rem; }
.presentation__t { font-family: var(--serif); font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); font-weight: 500; line-height: 1.12; letter-spacing: -0.02em; }
.presentation__signature { margin: 0.5rem 0 1.75rem; font-family: var(--serif); font-size: 1.25rem; font-style: italic; color: var(--copper); }
.presentation__intro { margin-bottom: 2rem; color: var(--muted); font-size: 1.0625rem; }
.presentation__intro strong { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.75rem; color: var(--ink); font-weight: 650; }
.presentation__st { display: flex; align-items: center; gap: 0.7rem; margin: 0 0 0.9rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-family: var(--serif); font-size: 1.375rem; font-weight: 550; }
.presentation__ico { flex: none; width: 24px; height: 24px; color: var(--copper); }
.presentation p { margin: 0 0 1rem; color: var(--muted); }
.presentation p strong, .presentation__liste dd strong { color: var(--ink); font-weight: 650; }
.presentation__liste { display: grid; gap: 0.25rem; margin: 0 0 1.5rem; }
.presentation__liste dt { margin-top: 0.85rem; font-weight: 650; }
.presentation__liste dd { margin: 0; color: var(--muted); font-size: 0.9875rem; }
.presentation__mail { color: var(--brand); font-weight: 650; text-underline-offset: 3px; }

/* ---------- rappel en tête de fiche ---------- */
.oblignote { margin-bottom: 1.25rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-left: 3px solid var(--copper); border-radius: var(--r-media); background: var(--card); color: var(--muted); font-size: 0.9375rem; }
.oblignote b { color: var(--ink); font-weight: 650; }
.oblignote em, .fac { display: inline-block; padding: 0 0.55rem; border: 1px solid var(--line-strong); border-radius: var(--r-pill); color: var(--muted); font-size: 0.75rem; font-style: normal; font-weight: 600; white-space: nowrap; vertical-align: 1px; }
.fac { margin-left: 0.5rem; }

/* ---------- étapes ---------- */
form#fiche { max-width: none; }
.q-step { position: relative; margin-bottom: 0.75rem; padding: 1.1rem 1.4rem; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); scroll-margin-top: calc(var(--q-top) + 5rem); transition: box-shadow 0.35s var(--ease-out), border-color 0.3s, padding 0.3s var(--ease-out); }
.q-step:not(.is-current) > :not(.sec__head):not(.q-step__summary) { display: none; }
.q-step:not(.is-current):hover { border-color: var(--line-strong); }
.q-step.is-current { padding: clamp(1.4rem, 3.5vw, 2.5rem); border-color: transparent; box-shadow: var(--shadow-lift); }
.q-step.is-upcoming:not(.is-complete) .sec__head { opacity: 0.62; }
.q-step.is-entering > :not(.sec__head) { animation: q-in 0.5s var(--ease-out) both; }
@keyframes q-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .q-step.is-entering > :not(.sec__head) { animation: none; } }

.sec__head { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 0.85rem; }
.sec__n { min-width: 1.6rem; font-family: var(--serif); font-size: 1.125rem; color: var(--copper); font-variant-numeric: lining-nums tabular-nums; }
.sec__ico { width: 22px; height: 22px; color: var(--copper); }
.sec__t { font-family: var(--serif); font-size: 1.1875rem; font-weight: 550; line-height: 1.25; letter-spacing: -0.01em; text-wrap: balance; }
.sec__t:focus { outline: none; }
.q-step.is-current .sec__t { font-size: clamp(1.45rem, 1.15rem + 1vw, 1.875rem); font-weight: 500; }
.q-step__state { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--muted); font-size: 0.8125rem; font-weight: 650; white-space: nowrap; }
.q-step.is-complete .q-step__state { color: var(--brand); }
.q-step.is-complete .q-step__state::before { content: ''; width: 0.4rem; height: 0.75rem; margin: -0.2rem 0.2rem 0 0; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.q-step.is-current .q-step__state { display: none; }
.q-step__open { position: absolute; inset: 0; z-index: 1; width: 100%; padding: 0; border: 0; border-radius: inherit; background: none; cursor: pointer; }
.q-step.is-current .q-step__open { display: none; }
.q-step__summary { margin: 0.35rem 0 0 calc(1.6rem + 22px + 1.7rem); overflow: hidden; color: var(--muted); font-size: 0.875rem; white-space: nowrap; text-overflow: ellipsis; }
.q-step.is-current .q-step__summary, .q-step__summary:empty { display: none; }

.q .sec__d { max-width: 62ch; margin-top: 0.85rem; color: var(--muted); }
.q .sec__d strong { color: var(--ink); font-weight: 650; }
.q .fields { display: flex; flex-direction: column; gap: 1.85rem; margin-top: 1.75rem; }
.q .fields .fields { margin-top: 0; }

/* navigation entre les étapes */
.q-step__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.q-step__count { margin-left: auto; color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.q-step__msg { flex-basis: 100%; padding: 0.8rem 1rem; border-radius: var(--r-btn); background: var(--danger-soft); color: var(--danger); font-size: 0.9375rem; font-weight: 600; }
[data-q-next].is-ready { animation: q-ready 1.2s var(--ease-out) 2; }
@keyframes q-ready { 0%, 100% { box-shadow: 0 6px 16px rgba(23, 98, 78, 0.22); } 50% { box-shadow: 0 0 0 7px rgba(23, 98, 78, 0.16), 0 6px 16px rgba(23, 98, 78, 0.22); } }
@media (prefers-reduced-motion: reduce) { [data-q-next].is-ready { animation: none; } }

/* une question à la fois : les autres s'estompent pendant la saisie */
.q-unit { transition: opacity 0.35s var(--ease); }
.q-step.is-current.has-focus .q-unit:not(.is-focus):not(.err) { opacity: 0.45; }
.q-step.is-current.has-focus .q-unit:not(.is-focus):hover { opacity: 0.8; }

/* ---------- champs ---------- */
.q .field { position: static; display: block; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.q .field:focus-within, .q .field:has(:user-invalid) { border-color: transparent; box-shadow: none; }
.q .lbl, .q .field > .lbl { display: block; margin: 0 0 0.65rem; padding: 0; color: var(--ink); font-size: 1rem; font-weight: 650; letter-spacing: 0; line-height: 1.4; }
.q .hint { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.875rem; font-weight: 400; line-height: 1.45; }
.q .sublbl { margin: 0 0 0.6rem; color: var(--copper); font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.02em; }
.q .subgroup { margin-top: 1.25rem; }
.q .subgroup:first-child { margin-top: 0; }

.q input[type='text'], .q input[type='email'], .q input[type='tel'], .q input[type='number'], .q input[type='url'], .q input[type='date'], .q textarea, .q select {
  width: 100%; padding: 0.8rem 1rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-btn); background: var(--card); color: var(--ink); font-size: 1rem; line-height: 1.45; outline: none; appearance: none; -webkit-appearance: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.q textarea { min-height: 6rem; resize: vertical; }
.q input::placeholder, .q textarea::placeholder { color: #8f897e; }
.q input:hover, .q textarea:hover { border-color: #b3aa99; }
.q input:focus, .q textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(23, 98, 78, 0.14); }
.q input[type='number'] { font-variant-numeric: tabular-nums; }

.row { display: grid; gap: 1rem; }
@media (min-width: 620px) {
  .row-2 { grid-template-columns: 1fr 1fr; }
  .row-3 { grid-template-columns: repeat(3, 1fr); }
  .row-cp { grid-template-columns: 10rem 1fr; }
}
.unit { position: relative; display: block; }
.q .unit input { padding-right: 6.5rem; }
.unit .u { position: absolute; right: 1rem; top: 50%; color: var(--muted); font-size: 0.875rem; transform: translateY(-50%); pointer-events: none; }

/* précision ouverte par un choix */
.q [data-r] { margin-top: 0.75rem; padding-left: 1rem; border-left: 2px solid var(--brand-soft); }
.q .fields > [data-r] { margin-top: 0; }

/* cases et choix */
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.5rem; }
.opts.wide { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.opts.narrow { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.opt { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.85rem 1rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-btn); background: var(--card); color: var(--ink); font-size: 0.9875rem; line-height: 1.4; cursor: pointer; transition: border-color 0.2s, background-color 0.2s, transform 0.1s; }
.opt:hover { border-color: var(--ink); }
.opt:active { transform: scale(0.98); }
.q .opt input { position: relative; flex: none; width: 1.15rem; height: 1.15rem; margin: 0.1rem 0 0; padding: 0; border: 1.5px solid #a9a090; border-radius: 5px; background: var(--card); box-shadow: none; appearance: none; -webkit-appearance: none; cursor: pointer; transition: background-color 0.15s, border-color 0.15s; }
.q .opt input[type='radio'] { border-radius: 50%; }
.q .opt input:checked { border-color: var(--brand); background: var(--brand); }
.q .opt input[type='checkbox']:checked::after { content: ''; position: absolute; left: 0.32rem; top: 0.1rem; width: 0.3rem; height: 0.6rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.q .opt input[type='radio']:checked::after { content: ''; position: absolute; inset: 0.2rem; border-radius: 50%; background: #fff; }
.opt:has(input:checked) { border-color: var(--brand); background: #ecf5f0; }
.opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.opt b { font-weight: 650; }
.opt em { font-style: italic; opacity: 0.85; }
.opt b + em { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.875rem; font-style: normal; line-height: 1.35; opacity: 1; }
.q .opt .qte { display: none; flex: none; width: 4.25rem; margin-left: auto; padding: 0.25rem 0.4rem; border-radius: 8px; font-size: 1rem; text-align: center; }
.opt:has(input[type='checkbox']:checked) .qte { display: block; }

/* dépôt de fichiers */
.filebox { position: relative; padding: 1.25rem; border: 1.5px dashed var(--line-strong); border-radius: var(--r-btn); background: var(--card); text-align: center; transition: border-color 0.2s, background-color 0.2s; }
.filebox:hover, .filebox.is-over { border-color: var(--brand); background: #ecf5f0; }
.filebox label { display: block; cursor: pointer; }
.filebox strong { display: block; margin-bottom: 0.2rem; color: var(--brand-hover); font-weight: 650; }
.filebox span { color: var(--muted); font-size: 0.875rem; }
.filebox input[type='file'] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.vignettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: 0.6rem; margin-top: 1rem; text-align: left; }
.vignettes li { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.vignette { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); }
.vignette--doc { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.75rem; font-weight: 650; letter-spacing: 0.08em; }
.vignettes .fileinfo { padding: 0.45rem 0.6rem; }
.vignettes b { display: block; overflow: hidden; font-size: 0.75rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.vignettes i { display: block; margin-top: 0.1rem; color: var(--muted); font-size: 0.75rem; font-style: normal; }

/* dépôt des photos, hors formulaire */
.envoi { padding: 1.25rem; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--r-media); background: var(--surface); }
.envoi__titre { margin-bottom: 0.35rem; font-weight: 650; }
.envoi__intro { margin-bottom: 1rem; color: var(--muted); font-size: 0.9375rem; }
.envoi__bouton svg { width: 18px; height: 18px; }
.envoi__note { margin-top: 0.9rem; color: var(--muted); font-size: 0.875rem; }
.envoi__lien { color: var(--brand); text-underline-offset: 3px; }

/* option livret d'accueil (la classe « livret » de la fiche n'est pas le bloc de l'accueil) */
.q .livret { display: block; margin: 0; padding: 0; overflow: visible; border-radius: 0; background: none; }
.livret__corps { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; padding: 1.25rem; border-radius: var(--r-media); background: var(--surface); }
@media (min-width: 620px) { .livret__corps { grid-template-columns: 11rem 1fr; gap: 1.75rem; } }
.livret__apercu { display: block; width: 100%; max-width: 11rem; aspect-ratio: 420 / 753; border: 6px solid #1d1d1f; border-radius: 1.4rem; background: var(--livret) center top / cover no-repeat; box-shadow: var(--shadow-soft); }
.livret__texte p { margin: 0 0 0.85rem; color: var(--muted); font-size: 0.9375rem; }
.livret__accroche b, .livret__tarifs b, .livret__tarifs strong { color: var(--ink); font-weight: 650; }
.livret__liste { margin: 0 0 0.85rem; padding-left: 1.25rem; list-style: disc; color: var(--muted); font-size: 0.9375rem; }
.livret__liste li { margin-bottom: 0.15rem; }
.livret__tarifs { padding: 0.85rem 1rem; border-radius: var(--r-btn); background: var(--card); line-height: 1.6; }
.livret__tarifs span { color: var(--muted); font-size: 0.875rem; }
.livret__texte .consent { margin: 0; }

/* estimation du devis */
.estim { padding: 1.5rem; border-radius: var(--r-media); background: var(--surface); }
.estim__vide { color: var(--muted); }
.estim__label { margin-bottom: 0.35rem; color: var(--muted); font-size: 0.875rem; font-weight: 650; }
.estim__montant { margin-bottom: 0.5rem; font-family: var(--serif); font-size: clamp(2rem, 1.5rem + 1.8vw, 2.75rem); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; color: var(--brand-hover); font-variant-numeric: lining-nums; }
.estim__detail { color: var(--muted); }
.estim__recap { display: grid; grid-template-columns: auto 1fr; margin-top: 1.25rem; border-top: 1px solid var(--line-strong); }
.estim__recap dt, .estim__recap dd { margin: 0; padding: 0.6rem 0; border-bottom: 1px solid var(--line-strong); font-size: 0.9375rem; }
.estim__recap dt { padding-right: 1.25rem; color: var(--muted); }
.estim__recap dd { font-weight: 600; }
.estim__note { margin-top: 1rem; color: var(--muted); font-size: 0.875rem; }

/* ---------- relecture et envoi ---------- */
.recap { margin-top: 1.75rem; padding: 1.5rem; border-radius: var(--r-media); background: var(--surface); }
.recap__eyebrow { margin-bottom: 0.5rem; color: var(--copper); font-size: 0.8125rem; font-weight: 650; }
.recap__title { margin-bottom: 1.25rem; font-family: var(--serif); font-size: 1.5rem; font-weight: 500; line-height: 1.2; }
.recap__empty { color: var(--muted); font-size: 0.9375rem; }
.recap__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); gap: 0.5rem; }
.recap__stat { padding: 0.9rem 0.6rem; border-radius: var(--r-btn); background: var(--card); text-align: center; }
.recap__stat b { display: block; font-family: var(--serif); font-size: 1.75rem; font-weight: 500; line-height: 1; color: var(--brand-hover); font-variant-numeric: lining-nums; }
.recap__stat span { display: block; margin-top: 0.35rem; color: var(--muted); font-size: 0.8125rem; }
.recap__beds { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; margin-top: 1.25rem; }
.bed { position: relative; display: flex; align-items: flex-end; justify-content: center; flex: none; height: 3rem; padding-bottom: 0.3rem; border: 1px solid var(--brand); border-radius: 7px; background: var(--brand-soft); }
.bed::before { content: ''; position: absolute; left: 5px; right: 5px; top: 5px; height: 10px; border-radius: 3px; background: var(--brand); opacity: 0.3; }
.bed i { color: var(--brand-hover); font-size: 0.6875rem; font-style: normal; font-weight: 650; }
.recap__note { max-width: 56ch; margin-top: 0.75rem; color: var(--muted); font-size: 0.875rem; }
.recap__note.warn { color: var(--danger); font-weight: 600; }
.recap__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.25rem; }
.recap__tag { padding: 0.35rem 0.8rem; border-radius: var(--r-pill); background: var(--card); color: var(--ink); font-size: 0.8125rem; font-weight: 550; }

.finish { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1.75rem; }
.consent { display: flex; align-items: flex-start; gap: 0.75rem; color: var(--ink); font-size: 0.9375rem; line-height: 1.5; cursor: pointer; }
.q .consent input { position: relative; flex: none; width: 1.25rem; height: 1.25rem; margin: 0.1rem 0 0; padding: 0; border: 1.5px solid #a9a090; border-radius: 5px; background: var(--card); appearance: none; -webkit-appearance: none; cursor: pointer; transition: background-color 0.15s, border-color 0.15s; }
.q .consent input:checked { border-color: var(--brand); background: var(--brand); }
.q .consent input:checked::after { content: ''; position: absolute; left: 0.36rem; top: 0.12rem; width: 0.32rem; height: 0.65rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.q .consent input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.consent em { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.875rem; font-style: normal; }
.consent.err { color: var(--danger); }
.q .consent.err input { border-color: var(--danger); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--link { padding: 0; border: 0; background: none; color: var(--muted); font-size: 0.9375rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn--link:hover { color: var(--danger); }
.btn--primary:disabled { opacity: 0.7; cursor: progress; }
.btn__spin { display: none; flex: none; width: 15px; height: 15px; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: currentColor; border-radius: 50%; animation: q-spin 0.7s linear infinite; }
.btn--primary[data-envoi] .btn__spin { display: block; }
@keyframes q-spin { to { transform: rotate(360deg); } }
.formnote { max-width: 60ch; color: var(--muted); font-size: 0.875rem; }

.alert { display: flex; gap: 0.75rem; padding: 0.9rem 1rem; border-radius: var(--r-btn); font-size: 0.9375rem; line-height: 1.5; }
.alert--err { background: var(--danger-soft); color: var(--danger); }
.alert b { display: block; margin-bottom: 0.15rem; }

/* champs à compléter */
.q .field.err { border-radius: 4px; outline: 1.5px solid var(--danger); outline-offset: 0.75rem; background: var(--danger-soft); box-shadow: 0 0 0 0.75rem var(--danger-soft); }
.q .field.err > .lbl, .q .field.err > legend.lbl { color: var(--danger); }
.q .field.err .opt, .q .field.err input, .q .field.err textarea { border-color: var(--danger); }
.q .field.err > .lbl > .fac { border-color: var(--danger); color: var(--danger); }

/* ---------- confirmation ---------- */
.done { display: none; max-width: 40rem; padding: 1rem 0 2rem; }
.done.is-on { display: block; }
.done__seal { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; margin-bottom: 1.5rem; border-radius: 50%; background: var(--brand-soft); }
.done h2 { margin-bottom: 0.85rem; font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem); }
.done p { margin-bottom: 0.75rem; color: var(--muted); }
.done dl { display: grid; grid-template-columns: auto 1fr; margin: 1.5rem 0; border-top: 1px solid var(--line); }
.done dt, .done dd { margin: 0; padding: 0.65rem 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.done dt { padding-right: 1.5rem; color: var(--muted); }
.done dd { font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .done.is-on .done__seal { animation: q-seal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
  .done.is-on .done__seal path { stroke-dasharray: 22; animation: q-trace 0.45s 0.3s ease-out backwards; }
  .done.is-on > h2 { animation: q-in 0.5s 0.16s both; }
  .done.is-on > p { animation: q-in 0.5s 0.24s both; }
  .done.is-on > dl { animation: q-in 0.5s 0.32s both; }
  .done.is-on > .actions { animation: q-in 0.5s 0.4s both; }
}
@keyframes q-seal { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: none; } }
@keyframes q-trace { from { stroke-dashoffset: 22; } to { stroke-dashoffset: 0; } }

/* ---------- écrans moyens : le sommaire devient un menu de la barre ---------- */
@media (max-width: 1079px) {
  .q-layout { grid-template-columns: minmax(0, 1fr); }
  .q-main { max-width: none; }
  .rail { position: fixed; z-index: 45; left: var(--pad); right: var(--pad); top: calc(var(--q-top) + 4rem); max-width: 26rem; max-height: min(70svh, 36rem); padding: 1rem; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow-pop); visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity 0.2s var(--ease), transform 0.25s var(--ease-out), visibility 0s 0.25s; }
  .rail.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity 0.2s var(--ease), transform 0.25s var(--ease-out); }
  .q-bar__step { padding-right: 1.75rem; background: no-repeat right 0.25rem center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666159' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
  .q-bar__step[aria-expanded='true'] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666159' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 15l6-6 6 6'/%3E%3C/svg%3E"); }
}
@media (max-width: 960px) {
  .choix__grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q-hero { grid-template-columns: minmax(0, 1fr); }
  .q-hero__art { display: none; }
}
@media (max-width: 743px) {
  .retour, #saveState { display: none; }
  .q-bar__in { min-height: 3.5rem; }
  .q-bar__step b { font-size: 1rem; }
  .choix__grille { grid-template-columns: minmax(0, 1fr); }
  .q-layout { padding-top: 1rem; }
  .q-step { margin-inline: calc(var(--pad) * -0.5); padding: 1rem 1.1rem; }
  .q-step.is-current { padding: 1.4rem 1.1rem 1.25rem; }
  .sec__head { grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.6rem; }
  .sec__ico { display: none; }
  .q-step__summary { margin-left: calc(1.6rem + 0.6rem); }
  .q-step__nav .btn { flex: 1; }
  .q-step__count { flex-basis: 100%; order: -1; margin-left: 0; }
  .opts, .opts.wide { grid-template-columns: minmax(0, 1fr); }
  .opts.narrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actions .btn { width: 100%; }
}
