/* ═══════════ PAGE DEVIS ═══════════ */
.devis-body { background: linear-gradient(180deg, #fdfeff, #eef4f9 40%); min-height: 100vh; }
.back-btn { margin-left: auto; }

.devis-main { max-width: 1100px; margin: 0 auto; padding: 140px 24px 100px; }
.devis-head { text-align: center; margin-bottom: 56px; }
.devis-head h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; }
.devis-sub { margin-top: 16px; color: var(--ink-soft); font-size: 1.1rem; max-width: 540px; margin-inline: auto; line-height: 1.6; }

.devis-layout { display: grid; grid-template-columns: 1.7fr 1fr; gap: 28px; align-items: start; }

/* ── Formulaire ── */
.devis-form {
  background: #fff; border-radius: var(--radius); padding: 38px;
  box-shadow: 0 30px 70px -30px rgba(30,60,85,.25);
  animation: formIn .8s var(--ease) both;
}
@keyframes formIn { from { opacity: 0; transform: translateY(30px); } }

fieldset { border: none; margin-bottom: 30px; }
legend {
  font-weight: 800; font-size: 1.05rem; letter-spacing: .02em;
  margin-bottom: 18px; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
legend::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--brand); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field span { font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink);
  border: 1.5px solid #e2e9ef; border-radius: 13px;
  padding: 12px 15px; background: #fafcfe;
  transition: border-color .25s, box-shadow .25s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(46,107,150,.12);
}
.field input.invalid { border-color: #d64545; box-shadow: 0 0 0 4px rgba(214,69,69,.1); }
textarea { resize: vertical; }

/* steppers */
.stepper {
  display: flex; align-items: center; gap: 4px;
  background: #fafcfe; border: 1.5px solid #e2e9ef; border-radius: 13px;
  padding: 6px; width: fit-content;
}
.step-btn {
  width: 38px; height: 38px; border: none; border-radius: 10px;
  background: #eef3f7; color: var(--brand);
  font-size: 1.3rem; font-weight: 700; cursor: pointer;
  transition: background .2s, transform .15s;
}
.step-btn:hover { background: var(--brand); color: #fff; }
.step-btn:active { transform: scale(.92); }
.step-val { min-width: 46px; text-align: center; font-size: 1.15rem; }

/* chips options */
.options-label { font-size: .88rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 10px; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 10px 18px; border-radius: 999px;
  background: #f0f4f8; border: 1.5px solid transparent;
  font-size: .92rem; font-weight: 600; color: var(--ink-soft);
  transition: all .25s var(--ease);
}
.chip:hover span { transform: translateY(-2px); }
.chip input:checked + span {
  background: rgba(46,107,150,.1); border-color: var(--brand);
  color: var(--brand);
}
.chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(46,107,150,.2); }

.submit-btn { width: 100%; justify-content: center; }
.form-note { margin-top: 14px; text-align: center; font-size: .82rem; color: #8a97a4; }

/* ── Récap ── */
.devis-recap { position: sticky; top: 100px; animation: formIn .8s .15s var(--ease) both; }
.recap-card {
  background: linear-gradient(160deg, #14405e, var(--brand-deep));
  color: #fff; border-radius: var(--radius); padding: 32px;
  box-shadow: 0 30px 70px -25px rgba(20,64,94,.5);
}
.recap-logo { height: 40px; color: #fff; margin-bottom: 18px; }
.recap-title { font-weight: 800; letter-spacing: .08em; font-size: .85rem; text-transform: uppercase; opacity: .7; margin-bottom: 18px; }
.recap-list { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.recap-list li {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: .95rem; color: #dbe7f0;
  animation: recapIn .35s var(--ease) both;
}
.recap-list li b { color: #fff; white-space: nowrap; }
@keyframes recapIn { from { opacity: 0; transform: translateX(10px); } }
.recap-sep { height: 1px; background: rgba(255,255,255,.15); margin: 20px 0; }
.recap-note { font-size: .88rem; color: #b7c9d7; line-height: 1.6; }

/* ── Succès ── */
.devis-success {
  text-align: center; padding: 80px 24px;
  animation: formIn .7s var(--ease) both;
}
.success-check {
  width: 92px; height: 92px; margin: 0 auto 28px;
  border-radius: 50%; background: linear-gradient(135deg, #1f9d61, #27c076);
  color: #fff; font-size: 2.6rem; font-weight: 800;
  display: grid; place-items: center;
  box-shadow: 0 24px 50px -15px rgba(31,157,97,.5);
  animation: pop .6s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes pop { from { transform: scale(0); } }
.devis-success h2 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 14px; }
.devis-success p { color: var(--ink-soft); font-size: 1.1rem; margin-bottom: 32px; }

@media (max-width: 860px) {
  .devis-layout { grid-template-columns: 1fr; }
  .devis-recap { position: static; order: -1; }
  .field-row { grid-template-columns: 1fr; }
}
