/* ==========================================================================
   Page Devis
   ========================================================================== */
.devis { padding: 40px 0 96px; background: var(--bg-alt); }
.devis__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }

.wizard { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 28px 32px 32px; overflow: hidden; }
.wizard__progress { position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--line); }
.wizard__progress span { display: block; height: 100%; width: 0; background: var(--orange); transition: width .35s ease; }

.wizard__steps { display: flex; gap: 6px; margin: 4px 0 28px; overflow-x: auto; scrollbar-width: none; }
.wizard__steps::-webkit-scrollbar { display: none; }
.wizard__steps li { flex: 1 0 auto; }
.wizard__step { width: 100%; display: flex; align-items: center; gap: 7px; padding: 8px 6px; border: 0; border-radius: 10px; background: none; cursor: pointer; font: 600 13.5px var(--font-title); color: var(--muted); white-space: nowrap; transition: background .2s, color .2s; }
.wizard__step:hover:not(:disabled) { background: var(--bg-alt); }
.wizard__step:disabled { cursor: default; opacity: .55; }
.wizard__num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); font-size: 12.5px; flex: none; transition: all .2s; }
.wizard__step.is-current { color: var(--ink); }
.wizard__step.is-current .wizard__num { border-color: var(--orange); background: var(--orange); color: #fff; }
.wizard__step.is-done .wizard__num { border-color: var(--orange); color: var(--orange-600); background: var(--orange-50); }

.wizard__loading { display: flex; align-items: center; gap: 12px; padding: 48px 0; justify-content: center; color: var(--muted); }

.step { border: 0; margin: 0; padding: 0; min-width: 0; animation: fadeUp .3s ease both; }
.step__title { font-family: var(--font-title); font-weight: 800; font-size: clamp(20px, 2.4vw, 26px); color: var(--ink); padding: 0; margin-bottom: 8px; }
.step__help { color: var(--muted); font-size: 15px; margin-bottom: 4px; }
.step__sub { font-size: 15px; font-weight: 700; margin: 22px 0 -6px; color: var(--ink-2); }
.step__error { margin-top: 14px; color: #b42318; font-weight: 500; font-size: 14.5px; }

.choices { display: grid; gap: 12px; margin-top: 20px; }
.choices--2 { grid-template-columns: repeat(2, 1fr); }
.choices--3 { grid-template-columns: repeat(3, 1fr); }
.choices--4 { grid-template-columns: repeat(4, 1fr); }
.choice { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 60px; padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; font-weight: 600; color: var(--ink-2); transition: border-color .15s, background .15s, box-shadow .15s, transform .15s; }
.choice:hover { border-color: #c9ced6; transform: translateY(-1px); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); color: #fff; flex: none; transition: all .15s; }
.choice__tick .ico { width: 13px; height: 13px; stroke-width: 3; opacity: 0; }
.choice:has(input:checked) { border-color: var(--orange); background: var(--orange-50); color: var(--ink); box-shadow: 0 4px 14px rgba(232,115,12,.15); }
.choice:has(input:checked) .choice__tick { background: var(--orange); border-color: var(--orange); }
.choice:has(input:checked) .choice__tick .ico { opacity: 1; }
.choice:has(input:focus-visible) { outline: 2px dashed var(--ink-2); outline-offset: 3px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; margin-top: 20px; }
.field--full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: 14.5px; color: var(--ink); margin-bottom: 6px; }
.field label span[aria-hidden] { color: var(--orange-600); }
.field__opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(232,115,12,.15); }
.field__error { display: none; color: #b42318; font-size: 13.5px; margin-top: 6px; }
.field.is-invalid input { border-color: #d92d20; }
.field.is-invalid .field__error { display: block; }

.address { position: relative; }
.address__ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.address input { padding-left: 42px; }
.address__list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.address__list li { padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.address__list li:hover, .address__list li[aria-selected="true"] { background: var(--orange-50); color: var(--ink); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.consent { margin-top: 18px; font-size: 13px; color: var(--muted); font-style: italic; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; font-size: 14.5px; margin-top: 16px; }
.alert .ico { margin-top: 2px; }
.alert a { font-weight: 600; text-decoration: underline; }
.alert--error { background: #fef3f2; color: #912018; border: 1px solid #fecdca; }

.wizard__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.wizard__nav #nextBtn, .wizard__nav #submitBtn { margin-left: auto; }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--orange); animation: spin .8s linear infinite; display: inline-block; }
.spinner--light { border-color: rgba(255,255,255,.35); border-top-color: #fff; display: none; }
.btn.is-loading .spinner--light { display: inline-block; }
.btn.is-loading { pointer-events: none; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

.success { text-align: center; padding: 32px 8px 12px; animation: fadeUp .4s ease both; }
.success:focus { outline: none; }
.success__ico { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: #ecfdf3; color: #079455; margin-bottom: 18px; }
.success__ico .ico { width: 34px; height: 34px; stroke-width: 2.6; }
.success h2 { font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.success p { color: var(--ink-2); margin-bottom: 8px; }
.success__muted { color: var(--muted) !important; font-size: 14.5px; margin-bottom: 24px !important; }
.success__muted a { font-weight: 600; color: var(--orange-600); }

/* Récapitulatif */
.recap { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 16px; }
.recap__card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.recap__card h2 { font-size: 17px; margin-bottom: 14px; }
.recap__list { margin: 0 0 18px; }
.recap__list div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.recap__list div:last-child { border-bottom: 0; }
.recap__list dt { color: var(--muted); }
.recap__list dd { margin: 0; font-weight: 600; color: #b6bcc5; text-align: right; }
.recap__list div.is-set { cursor: pointer; }
.recap__list div.is-set dd { color: var(--ink); }
.recap__list div.is-set:hover dd { color: var(--orange-600); text-decoration: underline; }
.recap__trust { display: grid; gap: 10px; padding: 0 6px; font-size: 14.5px; }
.recap__trust li { display: flex; align-items: center; gap: 10px; }
.recap__trust .ico { color: var(--orange); }
.recap__call { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--ink); color: #fff; transition: background .2s; }
.recap__call:hover { background: #000; }
.recap__call .ico { color: var(--orange); }
.recap__call span { font-size: 13.5px; color: #c9ced6; line-height: 1.35; }
.recap__call strong { display: block; font-family: var(--font-title); font-size: 19px; color: #fff; }

@media (max-width: 980px) {
  .devis__grid { grid-template-columns: 1fr; }
  .recap { position: static; }
  .choices--4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .devis { padding: 20px 0 64px; }
  .wizard { padding: 22px 18px 24px; border-radius: var(--radius); }
  .wizard__label { display: none; }
  .wizard__step.is-current .wizard__label { display: inline; }
  .wizard__steps li { flex: 0 0 auto; }
  .wizard__steps li:has(.is-current) { flex: 1 0 auto; }
  .choices--2, .choices--3 { grid-template-columns: 1fr; }
  .choices--4 { grid-template-columns: 1fr 1fr; }
  .fields { grid-template-columns: 1fr; }
  .wizard__nav .btn { flex: 1; }
}
.consent a { color: var(--orange-600); text-decoration: underline; }
