/* Formulaire « Parlons de votre projet » (/projet) : une question par écran.
   Charte Midi Mas (noir, or, Cormorant Garamond + Quicksand) dans une mise en page claire et actuelle. */
:root {
  --bg: #f6f3ee;
  --card: #fff;
  --ink: #191816;
  --ink-2: #3b3833;
  --muted: #6b645a;
  --line: #e7e1d7;
  --line-strong: #8f8578;
  --gold: #b19777;
  --gold-ink: #7d6342;
  --gold-soft: #f8f2e8;
  --error: #b3261e;
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Quicksand", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;
  --shadow: 0 1px 2px rgba(25, 24, 22, .05), 0 10px 30px rgba(25, 24, 22, .06);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink-2);
  font-family: var(--font); font-size: 16px; line-height: 1.6; font-weight: 500;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
p { margin: 0 0 1em; }
.nw { white-space: nowrap; }

/* ---------- En-tête : photo ronde, logo, activité ---------- */
.q-head { padding: clamp(24px, 5vh, 44px) 20px 0; text-align: center; }
.q-avatar { display: block; width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%; object-fit: cover; object-position: 38% 55%; border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--gold), 0 6px 18px rgba(25, 24, 22, .12); }
.q-logo { display: inline-block; line-height: 0; color: var(--ink); }
.q-logo svg { display: block; width: 156px; height: auto; aspect-ratio: 4896 / 602; fill: currentColor; }
.q-sub { margin: 10px 0 0; font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--muted); }

.q-main { flex: 1 0 auto; width: 100%; max-width: 560px; margin: 0 auto; padding: 26px 16px 32px; }

/* ---------- Progression ---------- */
.q-progress { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; }
.q-bar { position: relative; flex: 1; height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.q-bar span { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, #c9b08c, var(--gold)); transition: width .45s cubic-bezier(.2, .7, .2, 1); }
.q-count { font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Carte ---------- */
.q-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(24px, 4.5vw, 36px); }
.fp-step { animation: q-in .35s ease both; }
@keyframes q-in { from { opacity: 0; transform: translateY(8px); } }
.q-card h2 { font-family: var(--font); font-size: clamp(19px, 2vw, 21px); font-weight: 700; line-height: 1.35; margin-bottom: 6px; }
.q-card h2:focus { outline: none; }
.q-card h2.q-title { font-family: var(--serif); font-size: clamp(28px, 3.2vw, 32px); font-weight: 600; line-height: 1.15; margin-bottom: 10px; }
.q-help { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0; }
.q-body { margin-top: 20px; }
.kicker { display: block; margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.q-intro p:not(.kicker) { color: var(--muted); font-size: 15.5px; margin-bottom: 0; }

/* Message avant la question « zone » (pas encore de terrain) */
.q-note { margin: 0 0 22px; padding: 18px 20px; border-radius: var(--radius-sm); background: var(--gold-soft); border: 1px solid #efe4d2; }
.q-card .q-note h2 { font-size: 18px; margin-bottom: 8px; }
.q-note p { font-size: 14.5px; line-height: 1.65; color: var(--ink-2); margin: 0; }
.q-ask { display: block; margin: 0; text-wrap: balance; font-size: clamp(19px, 2vw, 21px); font-weight: 700; line-height: 1.35; color: var(--ink); }
.q-ask + .q-body { margin-top: 16px; }

/* ---------- Champs ---------- */
.fields { display: grid; gap: 18px; }
.label { display: block; margin: 0 0 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.input {
  display: block; width: 100%; min-height: 52px; padding: 13px 15px; background: #fff; color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  font-size: 17px; font-weight: 500; transition: border-color .15s ease, box-shadow .15s ease; appearance: none; -webkit-appearance: none;
}
.input::placeholder { color: var(--muted); opacity: 1; }
.input:hover { border-color: var(--ink-2); }
.input:focus { outline: 2px solid var(--gold-ink); outline-offset: 1px; border-color: var(--gold-ink); box-shadow: 0 0 0 4px rgba(177, 151, 119, .22); }
.input::-webkit-calendar-picker-indicator { display: none !important; }
.phone { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 0 12px; align-items: end; }
.money { position: relative; display: block; }
.money .input { padding-right: 40px; font-variant-numeric: tabular-nums; }
.money > span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 17px; font-weight: 600; color: var(--muted); }

/* Choix unique : une ligne, un clic suffit */
.opts { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.opt {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 54px; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink);
  font-size: 16px; font-weight: 600; line-height: 1.4; text-align: left; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.opt svg { width: 16px; height: 16px; flex: none; color: var(--gold-ink); opacity: 0; transform: translateX(-4px); transition: opacity .15s ease, transform .15s ease; }
.opt:hover, .opt:focus-visible { border-color: var(--gold); background: var(--gold-soft); }
.opt:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 2px; }
.opt:hover svg, .opt:focus-visible svg { opacity: 1; transform: none; }
.opt:active { transform: scale(.995); }
.opt[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold); }
.opt[aria-pressed="true"] svg { opacity: 1; transform: none; }
.opts.is-locked .opt { pointer-events: none; }

.check { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 13.5px; font-weight: 500; line-height: 1.55; color: var(--muted); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); cursor: pointer; }
.check a { color: var(--ink); text-underline-offset: 3px; }
.check small { font-size: 12.5px; }
.save-state { font-size: 12.5px; color: var(--muted); }

.recap { margin: 0; padding: 16px 18px; border-radius: var(--radius-sm); background: #faf8f4; border: 1px solid var(--line); }
.recap h3 { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 10px; }
.recap dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0; font-size: 14.5px; line-height: 1.45; }
.recap dt { color: var(--muted); }
.recap dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.captcha-local { padding: 14px 16px; border: 1.5px dashed #d3c9ba; border-radius: var(--radius-sm); }
.notice { margin: 0; color: var(--error); font-size: 14px; }
.error { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: var(--error); }
.error:empty { margin: 0; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 14px 22px; border: 1.5px solid transparent; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 16px; font-weight: 700; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, transform .15s ease, opacity .15s ease;
}
.btn svg { width: 17px; height: 17px; flex: none; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn--dark, .btn--wa { background: var(--ink); color: #fff; box-shadow: 0 6px 16px rgba(25, 24, 22, .16); }
.btn--dark:hover, .btn--wa:hover { background: #2e2b27; }
.btn--block { width: 100%; margin-top: 22px; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn:disabled:hover svg { transform: none; }
.btn--wa .wa-icon { width: 22px; height: 22px; color: #25d366; }
.btn--wa:hover .wa-icon { transform: none; }
.back { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 8px 6px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-radius: 8px; }
.back:hover { color: var(--ink); }
.q-back { display: flex; justify-content: center; margin-top: 12px; }

/* ---------- Écran d’accueil : preuves et presse ---------- */
.q-proofs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.q-proofs li { padding: 6px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); }
.q-press { margin: 22px 0 0; text-align: center; }
.q-press figcaption { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.q-press cite { font-style: normal; color: var(--gold-ink); }
.q-press blockquote { margin: 0; }
.q-press p { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 21px; line-height: 1.3; color: var(--ink); }
.q-press .pq { display: inline-block; width: .7em; height: .5em; fill: var(--gold); vertical-align: .12em; }
.q-press .pq--o { margin-right: .2em; transform: rotate(180deg); }
.q-press .pq--c { margin-left: .16em; }

/* ---------- Fin du parcours : WhatsApp, et réponse hors budget ---------- */
.q-final p:not(.kicker) { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
.done__icon { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-ink); }
.done__icon svg { width: 24px; height: 24px; }
.wa { margin: 16px 0 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.wa__head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #f0f2f5; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.wa__head strong { display: block; color: var(--ink); font-size: 14px; font-weight: 700; }
.wa__logo { width: 34px; height: 34px; flex: none; border-radius: 50%; }
.wa__body { padding: 14px 12px 16px; background: #efeae2; }
.wa__bubble { margin: 0 0 0 auto !important; max-width: 94%; padding: 9px 12px 10px; border-radius: 10px 0 10px 10px; background: #d9fdd3; color: #111b21 !important; font-size: 14px !important; font-weight: 500; line-height: 1.5 !important; white-space: pre-line; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
.wa-note { margin: 10px 0 0 !important; font-size: 13px !important; color: var(--muted) !important; text-align: center; }
.ref { display: block; margin-top: 18px; font-size: 12.5px; color: var(--muted); }

/* ---------- Pied de page ---------- */
.q-foot { padding: 18px 20px calc(26px + env(safe-area-inset-bottom)); text-align: center; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.q-foot p { margin: 0 0 2px; }
.q-foot a { color: var(--ink-2); text-underline-offset: 3px; }
/* « Gestion des cookies » : rouvre le bandeau (consent.js), pour s’opposer à la mesure depuis l’onglet de la demande */
.q-cookies { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.q-legal-note { margin: 8px 0 0 !important; font-size: 12px; }
.q-disclaimer { max-width: 560px; margin: 14px auto 0 !important; font-size: 11px; line-height: 1.55; color: var(--muted); }
.q-dev { margin: 16px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

/* ---------- États ---------- */
.loading { margin: 40px 0; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); }
.empty { text-align: center; }
.empty h1 { font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--ink); margin: 0 0 10px; }
.empty .primary { display: inline-flex; align-items: center; min-height: 50px; padding: 0 22px; border: 0; border-radius: var(--radius-sm); background: var(--ink); color: #fff; font-weight: 700; cursor: pointer; }
#toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; display: none; transform: translateX(-50%); padding: 12px 18px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 14px; }
#toast.show { display: block; }

body[data-screen=step] .q-avatar, body[data-screen=final] .q-avatar { display: none; }
.q-sub .sep { white-space: nowrap; }
@media (max-width: 600px) {
  .q-head { padding-top: 22px; }
  body[data-screen=step] .q-head, body[data-screen=final] .q-head { padding-top: 16px; }
  body[data-screen=step] .q-sub, body[data-screen=final] .q-sub { display: none; }
  body[data-screen=step] .q-main, body[data-screen=final] .q-main { padding-top: 14px; }
  .q-sub .sep { display: none; }
  .q-sub .nw { display: block; }
  .q-avatar { width: 72px; height: 72px; margin-bottom: 12px; }
  .q-sub { font-size: 12.5px; }
  .q-main { padding: 20px 14px 26px; }
  .q-card { padding: 22px 18px 24px; border-radius: 16px; }
  .phone { grid-template-columns: 82px minmax(0, 1fr); }
  .recap dl { grid-template-columns: minmax(0, 1fr); gap: 1px; }
  .recap dd + dt { margin-top: 8px; }
}
@media (max-width: 350px) {
  .opt { padding: 14px 14px; gap: 8px; font-size: 15px; }
  .opt svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fp-step { animation: none; }
  .q-bar span, .btn, .btn svg, .opt, .opt svg, .input { transition: none; }
}
@media (forced-colors: active) {
  .opt[aria-pressed="true"] { outline: 3px solid CanvasText; }
}
