/* =====================================================================
 * VENDORA — Design system noir & or, mobile-first.
 * ===================================================================== */
:root {
  --ink: #101012;
  --ink-soft: #1b1b1f;
  --char: #26262a;
  --gold: #c2a24b;
  --gold-2: #d8be7e;
  --gold-soft: #f3ead4;
  --cream: #f6f4ee;
  --paper: #ffffff;
  --paper-2: #fbfaf6;
  --text: #1c1c1f;
  --muted: #6c6c73;
  --line: #e8e3d7;
  --g-low: #cf3b2e;
  --g-mid: #e0962f;
  --g-good: #c2a24b;
  --g-high: #2f8f57;
  --r: 14px;
  --r-sm: 10px;
  --shadow: 0 22px 60px rgba(16, 16, 18, 0.12);
  --shadow-sm: 0 8px 24px rgba(16, 16, 18, 0.07);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(216, 190, 126, 0.18), transparent 60%),
    linear-gradient(180deg, #fbf9f3, var(--cream));
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--char); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.01em; }

:focus-visible { outline: 3px solid rgba(194, 162, 75, 0.55); outline-offset: 2px; border-radius: 6px; }

#app { max-width: 1100px; margin: 0 auto; padding: 16px clamp(16px, 4vw, 34px) 40px; }

/* ---- Topbar / footer ---- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 22px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(145deg, var(--ink), var(--char)); color: var(--gold-2); box-shadow: var(--shadow-sm); }
.brand-mark svg { width: 24px; height: 24px; }
.brand-name { font-weight: 850; font-size: 1.18rem; letter-spacing: -0.02em; }
.topbar-badge { font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--char); background: var(--gold-soft); border: 1px solid rgba(194, 162, 75, 0.4); padding: 6px 12px; border-radius: 999px; }
.appfoot { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.78rem; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 12px 20px; border: 1px solid transparent; border-radius: var(--r-sm); font-weight: 800; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s, border-color .15s; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: linear-gradient(145deg, var(--ink), var(--char)); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(16, 16, 18, 0.22); }
.btn-primary:disabled { opacity: .55; transform: none; cursor: not-allowed; }
.btn-soft { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn-soft:hover { border-color: var(--gold); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }
.btn-lg { min-height: 56px; padding-inline: 26px; font-size: 1.02rem; }
.btn-sm { min-height: 40px; padding: 8px 14px; }

/* ---- Card ---- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }

/* ---- Hero ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.82fr); gap: 26px; align-items: center; }
.hero-copy { padding: clamp(8px, 2vw, 20px) 4px; }
.eyebrow { color: var(--gold); font-size: 0.78rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.hero h1 { font-size: clamp(2.6rem, 6.6vw, 4.6rem); line-height: 0.98; max-width: 13ch; }
.hero h1 span { color: var(--gold); }
.lede { margin-top: 20px; max-width: 40ch; color: #45454b; font-size: clamp(1rem, 2vw, 1.16rem); }
.lede strong { color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.trust { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; }
.trust li { display: flex; align-items: center; gap: 10px; color: #45454b; font-size: 0.95rem; font-weight: 600; }
.trust svg { width: 18px; height: 18px; color: var(--g-high); flex: 0 0 auto; }

.hero-visual { display: grid; place-items: center; min-height: 420px; padding: clamp(18px, 3vw, 30px); border-radius: var(--r); background: linear-gradient(160deg, var(--ink), #34302a); box-shadow: var(--shadow); overflow: hidden; }
.sign { width: min(100%, 320px); }

/* ---- Wizard ---- */
.wizard { padding: clamp(20px, 4vw, 38px); }
.wizard-head { display: grid; gap: 20px; margin-bottom: 24px; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.step { display: grid; gap: 8px; font-size: 0.76rem; font-weight: 800; color: var(--muted); }
.step i { height: 6px; border-radius: 999px; background: var(--line); }
.step.is-active, .step.is-done { color: var(--ink); }
.step.is-active i, .step.is-done i { background: linear-gradient(90deg, var(--gold), var(--char)); }
.wizard-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.wizard-title h2 { font-size: clamp(1.55rem, 3.6vw, 2.3rem); line-height: 1.1; }
.wizard-title p { margin-top: 6px; color: var(--muted); max-width: 46ch; }
.wizard-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }

/* ---- Fields ---- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label, .lbl { font-size: 0.88rem; font-weight: 800; color: var(--ink); }
.field input, .field select, .field textarea, .sim-row input, .modal input {
  width: 100%; min-height: 52px; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper-2); transition: border-color .14s, box-shadow .14s, background .14s;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .sim-row input:focus, .modal input:focus {
  border-color: var(--gold); background: #fff; box-shadow: 0 0 0 4px rgba(194, 162, 75, 0.16); outline: none;
}
.hint { color: var(--muted); font-size: 0.86rem; }
.note { grid-column: 1 / -1; padding: 16px; border-radius: var(--r-sm); background: var(--gold-soft); border: 1px solid rgba(194, 162, 75, 0.32); }
.note strong { color: var(--ink); }
.note p { color: #5a5550; margin-top: 4px; font-size: 0.92rem; }

/* ---- Chips ---- */
.chips { display: grid; gap: 10px; }
.chips-2 { grid-template-columns: repeat(2, 1fr); }
.chips-3 { grid-template-columns: repeat(3, 1fr); }
.chips-4 { grid-template-columns: repeat(4, 1fr); }
.chips-7 { grid-template-columns: repeat(7, 1fr); }
.chip { min-height: 52px; padding: 12px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); font-weight: 800; color: var(--text); box-shadow: var(--shadow-sm); transition: transform .13s, border-color .13s, background .13s, color .13s, box-shadow .13s; }
.chip:hover { border-color: var(--gold); transform: translateY(-1px); }
.chip.is-selected { background: linear-gradient(145deg, var(--ink), var(--char)); border-color: var(--char); color: #fff; box-shadow: 0 12px 24px rgba(16, 16, 18, 0.18); }

/* ---- Combobox (commune search) ---- */
.combobox { position: relative; }
.combo-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.combo-ico svg { width: 20px; height: 20px; }
#loc-input { width: 100%; min-height: 56px; padding: 14px 16px 14px 44px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper-2); font-size: 1.05rem; }
#loc-input:focus { border-color: var(--gold); background: #fff; box-shadow: 0 0 0 4px rgba(194, 162, 75, 0.16); outline: none; }
.loc-listbox { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow); display: none; max-height: 320px; overflow: auto; }
.loc-listbox.is-open { display: block; }
.loc-opt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 8px; cursor: pointer; }
.loc-opt:hover, .loc-opt.is-active { background: var(--gold-soft); }
.loc-opt-pc { font-weight: 850; color: var(--char); font-variant-numeric: tabular-nums; }
.loc-opt-name { font-weight: 700; }
.loc-opt-sub { color: var(--muted); font-size: 0.82rem; text-align: right; }
.loc-selected { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 14px 12px 16px; border: 1px solid rgba(194, 162, 75, 0.5); border-radius: var(--r-sm); background: var(--gold-soft); font-weight: 800; }
.loc-clear { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 12px; font-weight: 800; font-size: 0.82rem; }

/* ---- Consent ---- */
.consent { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper-2); font-size: 0.9rem; color: #4c4c52; }
.consent.is-on { border-color: var(--gold); background: var(--gold-soft); }
.consent input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--char); flex: 0 0 auto; }

/* ---- Price hint ---- */
.price-hint { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: space-between; padding: 12px 14px; border-radius: var(--r-sm); background: var(--paper-2); border: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.price-hint b { color: var(--ink); }
.price-delta .ok { color: var(--g-high); }
.price-delta .hi { color: var(--g-low); }
.price-delta .lo { color: var(--g-mid); }

/* ---- Error ---- */
.error { display: none; margin-top: 16px; padding: 12px 14px; border-radius: var(--r-sm); background: rgba(207, 59, 46, 0.08); border: 1px solid rgba(207, 59, 46, 0.24); color: var(--g-low); font-weight: 750; font-size: 0.92rem; }
.error.show { display: block; }

/* ---- Loading ---- */
.loading { display: grid; place-items: center; gap: 16px; min-height: 360px; text-align: center; padding: 40px; }
.loading p { color: var(--muted); }
.spinner { width: 52px; height: 52px; border: 5px solid var(--line); border-top-color: var(--char); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Result ---- */
.result { display: grid; gap: 16px; }
.result-main { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: clamp(18px, 3vw, 40px); align-items: center; padding: clamp(22px, 4vw, 40px); }
.gauge-wrap { display: grid; justify-items: center; gap: 6px; }
.gauge { width: min(100%, 300px); }
.gauge-track { fill: none; stroke: var(--line); stroke-width: 18; stroke-linecap: round; }
.gauge-fill { fill: none; stroke-width: 18; stroke-linecap: round; transition: stroke-dashoffset 1.5s cubic-bezier(.16, 1, .3, 1); }
.gauge-num { font-weight: 900; font-size: 56px; fill: var(--ink); }
.gauge-pct { font-size: 24px; fill: var(--muted); }
.gauge-min, .gauge-max { fill: var(--muted); font-size: 13px; font-weight: 800; }
.gauge-cap { font-weight: 850; color: var(--char); text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.82rem; }
.result-headline .eyebrow { margin-bottom: 8px; }
.result-headline h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.1; }
.result-msg { margin-top: 12px; color: #45454b; font-size: 1.02rem; line-height: 1.65; }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { padding: clamp(18px, 3vw, 26px); }
.panel h3 { font-size: 1.18rem; margin-bottom: 16px; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.kpi { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper-2); }
.kpi span { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.kpi strong { font-size: 0.98rem; color: var(--ink); }

.sim-now { font-family: var(--font-display, inherit); font-weight: 850; font-size: clamp(2rem, 7vw, 2.6rem); line-height: 1; color: var(--ink); letter-spacing: -0.01em; }
.sim { margin-top: 18px; display: grid; gap: 8px; }
.sim label { font-size: 0.84rem; font-weight: 800; }
.sim-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

.diags { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.diag { display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: start; }
.diag-dot { width: 11px; height: 11px; border-radius: 50%; margin-top: 5px; }
.diag-pos .diag-dot { background: var(--g-high); }
.diag-warn .diag-dot { background: var(--g-mid); }
.diag-neg .diag-dot { background: var(--g-low); }
.diag strong { display: block; font-size: 0.95rem; }
.diag span { color: var(--muted); font-size: 0.9rem; }
.conf { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.82rem; }
.conf b { color: var(--char); text-transform: capitalize; }

/* ---- Price bar ---- */
.pricebar { padding: 36px 8px 6px; }
.pb-track { position: relative; height: 12px; border-radius: 8px; background: linear-gradient(90deg, #e3f0e7 0%, #f4ead2 52%, #f9ddd8 100%); }
.pb-zone { position: absolute; top: -2px; height: 16px; background: rgba(194, 162, 75, 0.28); border-left: 2px solid var(--gold); border-right: 2px solid var(--gold); border-radius: 5px; }
.pb-ref { position: absolute; top: -10px; height: 32px; border-left: 2px dashed var(--char); }
.pb-ref span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 3px; font-size: 0.68rem; font-weight: 800; color: var(--char); text-align: center; line-height: 1.1; white-space: nowrap; }
.pb-marker { position: absolute; top: 50%; width: 20px; height: 20px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--ink); border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); }
.pb-marker.over { background: var(--g-low); }
.pb-marker.under { background: var(--g-high); }
.pb-marker span { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); font-size: 0.68rem; font-weight: 850; color: var(--ink); text-align: center; line-height: 1.1; white-space: nowrap; }
.pb-scale { display: flex; justify-content: space-between; margin-top: 26px; color: var(--muted); font-size: 0.8rem; font-weight: 700; }

/* ---- CTA ---- */
.cta { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: clamp(20px, 3vw, 30px); background: linear-gradient(150deg, var(--ink), #322e28); border-color: var(--char); color: #fff; }
.cta .eyebrow { color: var(--gold-2); }
.cta h3 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 6px 0; }
.cta p { color: rgba(255, 255, 255, 0.78); max-width: 52ch; }
.agency-line { margin-top: 8px; font-weight: 700; }
.agency-line a { color: var(--gold-2); }
.cta-actions { display: grid; gap: 10px; min-width: 210px; }
.cta-actions .btn-soft { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.18); color: #fff; }
.cta-actions .btn-soft:hover { border-color: var(--gold-2); }
.cta-actions .btn-ghost { color: rgba(255, 255, 255, 0.7); }
.cta-actions .btn-ghost:hover { color: #fff; }

/* ---- Modal ---- */
.modal-bg { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(16, 16, 18, 0.5); backdrop-filter: blur(6px); }
.modal { position: relative; width: min(100%, 440px); display: grid; gap: 10px; padding: clamp(22px, 5vw, 30px); background: #fff; border-radius: var(--r); box-shadow: var(--shadow); }
.modal h3 { font-size: 1.5rem; }
.modal p { color: var(--muted); }
.modal label { font-weight: 800; font-size: 0.86rem; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 1.4rem; line-height: 1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ---- Hero sign animation ---- */
.sign-post-bg { fill: none; stroke: rgba(216, 190, 126, 0.28); stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.sign-post { fill: none; stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; stroke: var(--g-low); stroke-dasharray: 470; stroke-dashoffset: 470; animation: post 8.4s cubic-bezier(.55, 0, .2, 1) infinite; }
.sign-board { fill: #f6efdd; stroke: rgba(255, 255, 255, 0.5); stroke-width: 2; }
.sign-sale, .sign-sold { fill: var(--ink); font-size: 24px; font-weight: 900; }
.sign-sale { animation: saleTxt 8.4s steps(1, end) infinite; }
.sign-sold { opacity: 0; animation: soldTxt 8.4s steps(1, end) infinite; }
.sign-tag { fill: var(--g-low); animation: tag 8.4s steps(1, end) infinite; }
.sign-p { fill: #fff; font-size: 18px; font-weight: 900; opacity: 0; }
.sign-p25 { animation: p25 8.4s steps(1, end) infinite; }
.sign-p50 { animation: p50 8.4s steps(1, end) infinite; }
.sign-p75 { animation: p75 8.4s steps(1, end) infinite; }
.sign-p100 { animation: p100 8.4s steps(1, end) infinite; }
@keyframes post { 0% { stroke-dashoffset: 470; stroke: var(--g-low); } 22% { stroke-dashoffset: 352; stroke: var(--g-low); } 44% { stroke-dashoffset: 235; stroke: var(--g-mid); } 66% { stroke-dashoffset: 117; stroke: var(--g-good); } 80%, 92% { stroke-dashoffset: 0; stroke: var(--g-high); } 100% { stroke-dashoffset: 470; stroke: var(--g-low); } }
@keyframes saleTxt { 0%, 66%, 92.1%, 100% { opacity: 1; } 66.1%, 92% { opacity: 0; } }
@keyframes soldTxt { 0%, 66%, 92.1%, 100% { opacity: 0; } 66.1%, 92% { opacity: 1; } }
@keyframes tag { 0%, 22%, 92.1%, 100% { fill: var(--g-low); } 22.1%, 44% { fill: var(--g-mid); } 44.1%, 92% { fill: var(--g-high); } }
@keyframes p25 { 0%, 22%, 92.1%, 100% { opacity: 1; } 22.1%, 92% { opacity: 0; } }
@keyframes p50 { 0%, 22%, 44.1%, 100% { opacity: 0; } 22.1%, 44% { opacity: 1; } }
@keyframes p75 { 0%, 44%, 66.1%, 100% { opacity: 0; } 44.1%, 66% { opacity: 1; } }
@keyframes p100 { 0%, 66%, 92.1%, 100% { opacity: 0; } 66.1%, 92% { opacity: 1; } }

/* ---- Responsive ---- */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { order: -1; min-height: 300px; }
  .result-main, .result-grid, .cta { grid-template-columns: 1fr; }
  .cta-actions { min-width: 0; }
}
@media (max-width: 560px) {
  .grid, .sim-row { grid-template-columns: 1fr; }
  .chips-3, .chips-4 { grid-template-columns: repeat(2, 1fr); }
  .chips-7 { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .step { font-size: 0; gap: 0; }
  .step i { height: 7px; }
  .wizard-title { flex-direction: column; align-items: flex-start; }
  .wizard-foot { flex-direction: column-reverse; }
  .wizard-foot .btn { width: 100%; }
  .kpis { grid-template-columns: 1fr; }
  .loc-opt-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
