/* DMC Industrie — assistant devis */
body.quote { background: var(--paper); color: var(--text); }

.q-wrap {
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: 100svh;
}

/* Sidebar */
.q-side {
  position: sticky; top: 0; height: 100svh;
  background: var(--ink); color: #fff;
  padding: 120px 40px 40px;
  display: flex; flex-direction: column;
  overflow: hidden; isolation: isolate;
}
.q-side::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("../img/galerie-08.jpg") center / cover;
  opacity: .22;
}
.q-side::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11,12,13,.7), rgba(11,12,13,.97) 60%);
}
.q-side h1 { font-size: 40px; line-height: 1; margin: 18px 0 14px; }
.q-side > p { color: rgba(255,255,255,.65); margin: 0 0 40px; line-height: 1.6; }
.q-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.q-steps li {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; color: rgba(255,255,255,.45);
  font-weight: 600; transition: color .3s;
}
.q-steps .b {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid rgba(255,255,255,.2);
  font-family: var(--font-mono); font-size: 13px;
  transition: all .3s var(--ease);
}
.q-steps .b svg { width: 16px; height: 16px; display: none; }
.q-steps li.active { color: #fff; }
.q-steps li.active .b { border-color: var(--accent); background: var(--accent); color: #fff; }
.q-steps li.done { color: rgba(255,255,255,.8); }
.q-steps li.done .b { border-color: rgba(255,255,255,.8); background: #fff; color: var(--ink); }
.q-steps li.done .b span { display: none; }
.q-steps li.done .b svg { display: block; }
.q-steps small { display: block; font-weight: 500; font-size: 13px; color: rgba(255,255,255,.4); margin-top: 1px; }
.q-trust { margin-top: auto; display: grid; gap: 12px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.1); }
.q-trust div { display: flex; gap: 12px; align-items: center; font-size: 14px; color: rgba(255,255,255,.75); }
.q-trust svg { width: 18px; height: 18px; color: var(--accent2); flex: none; }

/* Main */
.q-main { padding: 120px clamp(20px, 5vw, 80px) 60px; display: flex; flex-direction: column; }
.q-top { display: none; }
.q-card { width: 100%; max-width: 760px; }
.q-progress { height: 4px; background: var(--paper2); border-radius: 4px; overflow: hidden; margin-bottom: 36px; }
.q-progress span { display: block; height: 100%; width: 25%; background: var(--accent); border-radius: 4px; transition: width .45s var(--ease); }

.q-step { display: none; animation: stepIn .45s var(--ease); }
.q-step.active { display: block; }
@keyframes stepIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.q-step .eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.q-step h2 { font-size: clamp(30px, 3.6vw, 44px); margin: 12px 0 10px; }
.q-step > p.sub { color: var(--text2); font-size: 17px; margin: 0 0 32px; }

.q-group { margin-bottom: 30px; }
.q-label { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.q-label small { font-weight: 500; color: var(--text2); font-size: 13px; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { position: relative; cursor: pointer; }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile span {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  height: 100%; min-height: 118px;
  padding: 18px 16px;
  background: var(--card); border: 1.5px solid var(--rule); border-radius: 14px;
  font-weight: 700; font-size: 15px; line-height: 1.25;
  transition: border-color .2s, background .2s, transform .2s var(--ease), color .2s;
}
.tile svg { width: 28px; height: 28px; color: var(--accent-ink); transition: color .2s; }
.tile:hover span { border-color: #b9b4a9; transform: translateY(-2px); }
.tile input:checked + span { border-color: var(--text); background: var(--text); color: #fff; }
.tile input:checked + span svg { color: var(--accent2); }
.tile input:focus-visible + span { outline: 3px solid rgba(226,112,28,.35); outline-offset: 2px; }

/* Pills (radio chips) */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span {
  display: inline-flex; align-items: center; height: 44px; padding: 0 18px;
  background: var(--card); border: 1.5px solid var(--rule); border-radius: 999px;
  font-weight: 600; font-size: 14px;
  transition: all .2s var(--ease);
}
.pill:hover span { border-color: #b9b4a9; }
.pill input:checked + span { background: var(--text); border-color: var(--text); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid rgba(226,112,28,.35); outline-offset: 2px; }

/* Inputs */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.f { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.f label { font-weight: 700; font-size: 14px; }
.f label .opt { font-weight: 500; color: var(--text2); }
.f .ctrl { position: relative; }
.f input, .f textarea {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: 12px;
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}
.f textarea { height: auto; min-height: 150px; padding: 14px 16px; resize: vertical; line-height: 1.6; }
.f input::placeholder, .f textarea::placeholder { color: #a5a7a9; }
.f input:hover, .f textarea:hover { border-color: #c4bfb4; }
.f input:focus, .f textarea:focus { border-color: var(--text); box-shadow: 0 0 0 4px rgba(18,19,20,.06); }
.f.err input, .f.err textarea { border-color: #c0392b; box-shadow: 0 0 0 4px rgba(192,57,43,.08); }
.f .msg { display: none; color: #b03a2e; font-size: 13px; font-weight: 600; }
.f.err .msg { display: block; }
.f .suffix {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 12px; color: var(--text2); pointer-events: none;
}
.f .suffix + input, .f input.has-suffix { padding-right: 44px; }
.f input[type=number]::-webkit-outer-spin-button,
.f input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.f input[type=number] { -moz-appearance: textfield; }
.f input[type=date] { min-height: 54px; line-height: 54px; }
.f input[type=date]::-webkit-date-and-time-value { text-align: left; }

/* Stepper */
.stepper { display: inline-flex; align-items: center; height: 54px; background: var(--card); border: 1.5px solid var(--rule); border-radius: 12px; overflow: hidden; }
.stepper button { width: 54px; height: 100%; border: 0; background: transparent; cursor: pointer; font-size: 22px; color: var(--text); transition: background .2s; }
.stepper button:hover { background: var(--paper); }
.stepper input { width: 70px; height: 100%; border: 0; text-align: center; font-weight: 700; font-size: 17px; background: transparent; outline: none; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Dropzone */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 34px 20px; text-align: center;
  background: var(--card); border: 2px dashed #cdc8bd; border-radius: 16px;
  cursor: pointer; transition: border-color .2s, background .2s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: #fffaf5; }
.drop svg { width: 36px; height: 36px; color: var(--accent-ink); }
.drop b { font-size: 16px; }
.drop span { color: var(--text2); font-size: 14px; }
.drop input { display: none; }
.files { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.files li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 14px; background: var(--card); border: 1px solid var(--rule); border-radius: 12px;
  font-size: 14px;
}
.files .ext { flex: none; width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: var(--paper); font-family: var(--font-mono); font-size: 10px; font-weight: 500; text-transform: uppercase; color: var(--accent-ink); }
.files .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.files .sz { color: var(--text2); font-family: var(--font-mono); font-size: 12px; }
.files button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; color: var(--text2); font-size: 18px; }
.files button:hover { background: var(--paper); color: #b03a2e; }

/* Consent */
.consent { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: var(--card); border: 1.5px solid var(--rule); border-radius: 12px; cursor: pointer; font-size: 14px; line-height: 1.5; color: var(--text2); }
.consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.consent.err { border-color: #c0392b; }

/* Recap */
.recap { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 6px 20px; margin-bottom: 24px; }
.recap:empty { display: none; }
.recap div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--paper2); font-size: 14px; }
.recap div:last-child { border-bottom: 0; }
.recap dt { color: var(--text2); }
.recap dd { margin: 0; font-weight: 600; word-break: break-word; }

/* Nav buttons */
.q-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--rule); }
.q-nav .hint { color: var(--text2); font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.hint-ral { margin: 8px 0 0; font-size: 13px; color: var(--text2); line-height: 1.4; }
#ral { max-width: 220px; }
.q-nav .btn { --h: 56px; padding: 0 28px; }

/* Result */
.q-done { display: none; text-align: left; animation: stepIn .5s var(--ease); }
.q-done.show { display: block; }
.q-done .ok { width: 72px; height: 72px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; margin-bottom: 26px; }
.q-done .ok svg { width: 34px; height: 34px; }
.q-done h2 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 14px; }
.q-done p { font-size: 17px; color: var(--text2); max-width: 48ch; }
.q-done .ref { display: inline-block; margin: 8px 0 28px; padding: 10px 16px; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; font-family: var(--font-mono); font-size: 15px; }
.q-error { display: none; margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: #fdecea; border: 1px solid #f1b0a8; color: #8e2a1f; font-weight: 600; font-size: 14px; }
.q-error.show { display: block; }

@media (max-width: 1080px) {
  .q-wrap { grid-template-columns: 1fr; }
  .q-side { display: none; }
  .q-main { padding-top: 104px; align-items: center; }
  .q-top { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 760px; margin-bottom: 14px; font-size: 14px; font-weight: 600; color: var(--text2); }
  .q-top b { color: var(--text); }
}
@media (max-width: 680px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile span { min-height: 100px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .recap div { grid-template-columns: 1fr; gap: 2px; }
  .q-nav { position: sticky; bottom: 0; background: var(--paper); margin: 32px -20px 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); }
  .q-nav .hint { display: none; }
  .q-nav .btn { flex: 1; padding: 0 18px; }
  .q-nav .btn-line { flex: 0 0 auto; }
}
