/* ============================================================
   Demande de devis : en-tête illustré, formulaire en 3 cartes numérotées,
   tuiles et puces de choix, dépôt de fichiers, colonne « comment ça marche » + suivi.
   ============================================================ */
.qd-page { --q-navy: #062440; --q-navy-2: #0b3a66; --q-accent: #0b78c2; --q-accent-2: #0a68a8; --q-ok: #0b78c2; --q-line: #e3e9ef; --q-soft: #f3f6f9; --q-muted: #5c6b79; padding-bottom: 3rem; }
.qd-page .status-msg:empty { display: none; }
.qd-page [hidden] { display: none !important; }

.qd-hero { position: relative; overflow: hidden; margin: .5rem 0 1.5rem; padding: clamp(1.6rem, 4.5vw, 2.8rem) clamp(1.3rem, 4vw, 2.6rem); border-radius: 24px; color: #fff;
  background: radial-gradient(520px 240px at 100% 0%, rgba(11, 120, 194, .5), transparent 70%), linear-gradient(135deg, var(--q-navy), var(--q-navy-2)); }
.qd-eyebrow { display: flex; align-items: center; gap: .8rem; margin: 0 0 .6rem; color: #7cc3f2; font-size: .8rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.qd-eyebrow::before { content: ""; width: 2rem; height: 2px; background: currentColor; }
.qd-hero h1 { margin: 0; color: #fff; font-size: clamp(1.8rem, 5.5vw, 2.7rem); line-height: 1.1; }
.qd-lead { max-width: 640px; margin: .8rem 0 0; color: #d7e2ec; line-height: 1.6; }
.qd-perks { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.qd-perks li { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); font-size: .85rem; font-weight: 600; }
.qd-perks li::before { content: "✓"; color: #7cc4ff; font-weight: 800; }

.qd-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 1.5rem; align-items: start; }
.qd-main, .qd-form { display: grid; gap: 1rem; min-width: 0; }
.qd-side { position: sticky; top: 90px; display: grid; gap: 1rem; }

.qd-card { padding: clamp(1.1rem, 3vw, 1.6rem); border: 1px solid var(--q-line); border-radius: 22px; background: #fff; box-shadow: 0 14px 34px -28px rgba(15, 23, 42, .45); min-width: 0; }
.qd-h2 { display: flex; align-items: center; gap: .75rem; margin: 0 0 1.1rem; font-size: 1.2rem; color: var(--q-navy); }
.qd-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--q-navy); color: #fff; font-size: .9rem; font-weight: 800; }
.qd-optional { font-style: normal; font-weight: 500; font-size: .85rem; color: var(--q-muted); }

.qd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
.qd-grid + .qd-fs, .qd-fs + .qd-grid, .qd-fs + .qd-f, .qd-grid + .qd-f { margin-top: 1.1rem; }
.qd-f { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.qd-f > span { font-size: .88rem; font-weight: 700; color: var(--q-navy); }
.qd-f em { font-style: normal; font-weight: 500; color: var(--q-muted); }
.qd-f input, .qd-f select, .qd-f textarea { width: 100%; min-height: 50px; padding: .75rem .95rem; border: 1.5px solid #d5dde7; border-radius: 14px; background: #fff; font: inherit; font-size: 16px; color: #0f1b26; transition: border-color .15s, box-shadow .15s; }
.qd-f textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.qd-f input:hover, .qd-f select:hover, .qd-f textarea:hover { border-color: #b8c4d6; }
.qd-f input:focus, .qd-f select:focus, .qd-f textarea:focus { outline: none; border-color: var(--q-accent); box-shadow: 0 0 0 4px rgba(11, 120, 194, .14); }
.qd-f input:user-invalid, .qd-f select:user-invalid { border-color: #e5484d; }
.qd-count { align-self: flex-end; font-size: .75rem; color: var(--q-muted); }

.qd-fs { margin: 0; padding: 0; border: 0; min-width: 0; }
.qd-fs legend { margin-bottom: .6rem; padding: 0; font-size: .88rem; font-weight: 700; color: var(--q-navy); }
.qd-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.qd-tile, .qd-chip { position: relative; cursor: pointer; }
.qd-tile input, .qd-chip input { position: absolute; opacity: 0; pointer-events: none; }
.qd-tile > span { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; min-height: 86px; padding: .85rem .9rem; border: 1.5px solid var(--q-line); border-radius: 16px; background: #fff; font-size: .9rem; font-weight: 700; color: var(--q-navy); line-height: 1.3; transition: border-color .15s, background .15s, box-shadow .15s; }
.qd-tile__icon { font-size: 1.5rem; line-height: 1; }
.qd-tile:hover > span, .qd-chip:hover > span { border-color: #9cc9ea; }
.qd-tile input:checked + span, .qd-chip input:checked + span { border-color: var(--q-accent); background: #eef6fc; box-shadow: 0 0 0 1px var(--q-accent); }
.qd-tile input:focus-visible + span, .qd-chip input:focus-visible + span { outline: 3px solid rgba(11, 120, 194, .35); outline-offset: 2px; }
.qd-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.qd-chip > span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 1rem; border: 1.5px solid var(--q-line); border-radius: 999px; background: #fff; font-size: .88rem; font-weight: 600; color: var(--q-navy); transition: border-color .15s, background .15s; }

.qd-product { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.1rem; padding: .8rem 1rem; border-radius: 16px; background: var(--q-soft); border: 1px solid var(--q-line); }
.qd-product img { flex: none; width: 72px; height: 54px; object-fit: cover; border-radius: 10px; }
.qd-product__text { display: flex; flex-direction: column; min-width: 0; }
.qd-product__text small { font-size: .75rem; font-weight: 700; color: var(--q-muted); text-transform: uppercase; letter-spacing: .05em; }
.qd-product__text strong { color: var(--q-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qd-product__text em { font-style: normal; font-size: .78rem; color: var(--q-muted); }
.qd-config { display: grid; gap: .4rem; margin-bottom: 1.1rem; padding: 1rem; border-radius: 16px; background: #eef6fc; border: 1px solid #c7e0f3; font-size: .9rem; }
.qd-config > strong { color: var(--q-navy); margin-bottom: .2rem; }
.qd-config__line { display: flex; justify-content: space-between; gap: 1rem; color: #24313d; }
.qd-config__line span:last-child { flex: none; font-weight: 700; }
.qd-config__total { display: flex; justify-content: space-between; gap: 1rem; margin-top: .3rem; padding-top: .5rem; border-top: 1px solid #c7e0f3; font-weight: 800; color: var(--q-navy); font-size: 1.05rem; }
.qd-config .hint { margin: .2rem 0 0; font-size: .78rem; }

.qd-drop { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 1.6rem 1rem; border: 2px dashed #c3d3e2; border-radius: 18px; background: var(--q-soft); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.qd-drop:hover, .qd-drop:focus-within { border-color: var(--q-accent); background: #eef6fc; }
.qd-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.qd-drop__icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: .2rem; border-radius: 50%; background: #fff; color: var(--q-accent); box-shadow: 0 8px 18px -10px rgba(11, 120, 194, .7); }
.qd-drop strong { color: var(--q-navy); }
.qd-drop small { color: var(--q-muted); }
.qd-files { list-style: none; margin: .7rem 0 0; padding: 0; display: grid; gap: .4rem; }
.qd-files li { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-radius: 12px; background: var(--q-soft); font-size: .88rem; }
.qd-files li.is-bad { background: #fdecec; color: #b42318; }
.qd-files__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.qd-files small { flex: none; color: var(--q-muted); }

.qd-card--send { display: grid; gap: .9rem; }
.qd-check { display: flex; align-items: flex-start; gap: .7rem; font-size: .9rem; line-height: 1.5; color: #24313d; cursor: pointer; }
.qd-check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--q-accent); }
.qd-note { margin: 0; font-size: .8rem; line-height: 1.5; color: var(--q-muted); }
.qd-submit { display: inline-flex; align-items: center; justify-content: center; gap: .8rem; width: 100%; min-height: 58px; padding: 0 1.6rem; border: 0; border-radius: 16px; background: var(--q-accent); color: #fff; font: inherit; font-size: 1.05rem; font-weight: 800; cursor: pointer; box-shadow: 0 16px 30px -16px rgba(11, 120, 194, .95); transition: background .15s, transform .15s; }
.qd-submit:hover { background: var(--q-accent-2); transform: translateY(-1px); }
.qd-submit:disabled { opacity: .7; cursor: progress; transform: none; }

.qd-success { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 2.2rem 1.4rem; text-align: center; outline: none; }
.qd-success__icon { display: flex; align-items: center; justify-content: center; width: 68px; height: 68px; border-radius: 50%; background: #e6f1fb; color: var(--q-ok); font-size: 2rem; font-weight: 800; }
.qd-success h2 { margin: .3rem 0 0; color: var(--q-navy); font-size: 1.4rem; }
.qd-success p { margin: 0; color: var(--q-muted); }
.qd-ref { padding: .6rem 1.2rem; border-radius: 12px; background: var(--q-soft); border: 1.5px dashed #b8c8d8; color: var(--q-navy) !important; font-size: 1.4rem; font-weight: 800; letter-spacing: .06em; user-select: all; }
.qd-success__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .6rem; }
.qd-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.3rem; border: 0; border-radius: 14px; background: var(--q-navy); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.qd-btn--ghost { background: #fff; color: var(--q-navy); border: 1.5px solid var(--q-line); }
.qd-btn--ghost:hover { border-color: var(--q-navy); }

.qd-how h2, .qd-track h2 { margin: 0 0 .9rem; font-size: 1.05rem; color: var(--q-navy); }
.qd-how ol { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: .9rem; }
.qd-how li { position: relative; display: flex; flex-direction: column; gap: .15rem; padding-left: 2.6rem; counter-increment: s; }
.qd-how li::before { content: counter(s); position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #e6f1fa; color: var(--q-accent); font-weight: 800; font-size: .85rem; }
.qd-how li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 34px; bottom: -.7rem; width: 2px; background: #e6f1fa; }
.qd-how strong { color: var(--q-navy); font-size: .92rem; }
.qd-how span { color: var(--q-muted); font-size: .84rem; line-height: 1.5; }
.qd-trackform { display: grid; gap: .8rem; }
.qd-trackform .qd-f input { min-height: 46px; }
.qd-status { display: inline-block; padding: .35rem .8rem; border-radius: 999px; background: #e3edff; color: #1d4ed8; font-weight: 800; font-size: .85rem; }
.qd-status--accepted, .qd-status--converted { background: #e1f4ea; color: #146c3b; }
.qd-status--rejected { background: #fde4e2; color: #b42318; }
.qd-status--new, .qd-status--in_review { background: #fff4d6; color: #92580a; }
.qd-answer { margin: .6rem 0 0; padding: .7rem .8rem; border-radius: 12px; background: var(--q-soft); font-size: .88rem; line-height: 1.55; white-space: pre-line; }

@media (max-width: 960px) {
  .qd-layout { grid-template-columns: minmax(0, 1fr); }
  .qd-side { position: static; }
}
@media (max-width: 600px) {
  .qd-hero { border-radius: 20px; margin-top: 0; }
  .qd-perks li { font-size: .8rem; }
  .qd-grid { grid-template-columns: minmax(0, 1fr); }
  .qd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qd-tile > span { min-height: 78px; font-size: .85rem; }
  .qd-card { border-radius: 20px; }
}
