/* =====================================================================
   PAGE "TROUVER MON OFFRE" (quiz) — loaded after styles.css
   ===================================================================== */

.qz {
  position: relative; min-height: 100vh; min-height: 100svh;
  background: var(--paper); overflow-x: clip;
  padding: calc(var(--nav-h) + clamp(16px, 3vw, 48px)) var(--pad) clamp(150px, 15vw, 230px);
}
/* Faint 12-column layout grid, as on the home hero */
.qz::before {
  content: ""; position: absolute; inset: 0 var(--pad); pointer-events: none;
  background-image: linear-gradient(90deg, color-mix(in srgb, var(--ink) 6%, transparent) 1px, transparent 1px);
  background-size: calc((100% - 1px) / 12) 100%;
  border-right: 1px solid color-mix(in srgb, var(--ink) 6%, transparent);
}
.qz-shell { position: relative; max-width: 1400px; margin: 0 auto; }

/* ---------- Top bar: back, progress, counter ---------- */
.qz-top { display: grid; grid-template-columns: 110px 1fr 110px; align-items: center; gap: 20px; }
.qz-back, .qz-count, .qz-restart {
  font-family: var(--mono); font-size: 14px; letter-spacing: .04em; text-transform: uppercase;
}
.qz-back { justify-self: start; padding: 8px 0; border: 0; background: none; color: var(--ink); cursor: pointer; }
.qz-back[hidden] { display: block; visibility: hidden; }
.qz-back span { display: inline-block; transition: transform .4s var(--ease); }
.qz-count { justify-self: end; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.qz-bar { position: relative; height: 3px; border-radius: 3px; background: var(--row-line); overflow: hidden; }
.qz-bar span {
  position: absolute; inset: 0; background: var(--orange);
  transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease);
}

/* ---------- Layout: question on the left, live profile on the right ---------- */
.qz-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(32px, 5vw, 96px); align-items: start; margin-top: clamp(36px, 5vw, 80px);
}
.qz.is-result .qz-grid { grid-template-columns: minmax(0, 1fr); }
.qz.is-result .qz-profile { display: none; }

/* ---------- Screens ---------- */
.qz-screen { animation: qz-in .7s var(--ease) both; }
.qz-screen.out { opacity: 0; transform: translateY(-14px); transition: opacity .26s linear, transform .26s var(--ease); pointer-events: none; }
@keyframes qz-in { from { opacity: 0; transform: translateY(22px); } }
@keyframes qz-pop { from { opacity: 0; transform: translateY(26px) scale(.97); } }

.qz-kicker { font-family: var(--mono); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--orange); }
.qz-q {
  margin-top: 16px; max-width: 18ch;
  font-size: clamp(38px, 3.3vw + 20px, 84px); font-weight: 600; letter-spacing: -0.04em; line-height: .98;
  color: var(--ink); text-wrap: balance;
}
.qz-q:focus { outline: none; }
.qz-hint { margin-top: 14px; font-family: var(--mono); font-size: 14px; color: var(--ink-2); }
.qz-lead { margin-top: 24px; max-width: 580px; font-size: clamp(19px, .6vw + 15px, 24px); line-height: 1.35; color: var(--ink-2); }

/* Intro: optional first name */
.qz-name { display: block; margin-top: clamp(32px, 4vw, 48px); max-width: 440px; }
.qz-name > span { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.qz-name em { font-style: normal; opacity: .7; }
.qz-name input {
  display: block; width: 100%; margin-top: 6px; padding: 10px 0;
  border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: clamp(24px, 1vw + 18px, 32px); font-weight: 500; letter-spacing: -0.02em; outline: none;
  transition: border-color .3s;
}
.qz-name input::placeholder { color: var(--line); }
.qz-name input:focus { border-bottom-color: var(--orange); }

.qz-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; margin-top: clamp(28px, 3vw, 40px); }
.qz-row .btn { margin-top: 0; }
.qz-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.qz-intro .qz-meta span::before { content: "✓"; margin-right: 6px; color: var(--orange); font-weight: 700; }
.qz-keys { margin-top: 22px; }
.qz-row .qz-keys { margin-top: 0; }
.qz kbd {
  display: inline-block; min-width: 1.7em; padding: 1px 5px; margin: 0 1px;
  border: 1px solid var(--line); border-radius: 5px; font-family: var(--mono); font-size: 12px; text-align: center; color: var(--ink);
}
@media not all and (hover: hover) and (pointer: fine) { .qz-keys { display: none; } }

/* Buttons: the site's rolling label also on <button>, and a disabled state */
.qz button.btn { cursor: pointer; font-family: inherit; }
.qz button.btn:hover .roll > span { transform: translateY(-100%); }
.qz .btn:disabled { opacity: .35; pointer-events: none; }

/* ---------- Answers ---------- */
.qz-options { margin-top: clamp(28px, 3vw, 44px); border-bottom: 1px solid var(--line); }
.qz-opt {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px;
  width: 100%; padding: 18px 16px; border: 0; border-top: 1px solid var(--line); background: none;
  color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  animation: qz-in .6s var(--ease) both; animation-delay: calc(var(--d) * 55ms + 120ms);
  transition: color .3s;
}
/* fill that rises on hover, and turns orange once chosen */
.qz-opt::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--soft);
  transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--ease), background-color .3s;
}
.qz-opt[aria-pressed="true"]::before { background: var(--orange); transform: none; }
.qz-opt[aria-pressed="true"] { color: #151414; }
.qz-opt:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.qz-label { font-size: clamp(19px, .8vw + 14px, 26px); font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; transition: transform .45s var(--ease); }
.qz-label small { display: block; margin-top: 4px; font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--ink-2); }
.qz-opt[aria-pressed="true"] .qz-label small { color: rgba(21, 20, 20, .72); }
.qz-key {
  display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--mono); font-size: 14px; color: var(--ink-2); transition: background-color .3s, color .3s, border-color .3s;
}
.qz-opt[aria-pressed="true"] .qz-key { background: #151414; border-color: #151414; color: #fff; }
.qz-tick { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; transition: background-color .3s, border-color .3s; }
.qz-tick svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .45s var(--ease) .05s; }
.qz-opt[aria-pressed="true"] .qz-tick { background: #151414; color: #fff; }
.qz-opt[aria-pressed="true"] .qz-tick svg { stroke-dashoffset: 0; }
/* multiple choice: an empty circle shows each answer can be ticked */
.qz-multi .qz-tick { border: 1.5px solid var(--line); }
.qz-multi .qz-opt[aria-pressed="true"] .qz-tick { border-color: #151414; }
@media (hover: hover) {
  .qz-opt:hover::before { transform: none; }
  .qz-opt:hover .qz-label { transform: translateX(8px); }
  .qz-opt:hover .qz-key { border-color: var(--ink); color: var(--ink); }
  .qz-opt[aria-pressed="true"]:hover .qz-key { border-color: #151414; color: #fff; }
  .qz-back:hover span { transform: translateX(-4px); }
}

/* ---------- Live profile ---------- */
.qz-profile {
  position: sticky; top: calc(var(--nav-h) + 16px);
  min-height: 340px; padding: 32px 28px 28px; border-radius: 20px; background: var(--soft);
  display: flex; flex-direction: column;
}
.qz-who { font-family: var(--mono); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--orange); padding-right: 90px; }
.qz-profile h2 { margin-top: 10px; font-size: clamp(24px, .8vw + 18px, 30px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; padding-right: 70px; }
.qz-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.qz-tags li {
  padding: 7px 13px; border: 1px solid var(--ink); border-radius: 40px;
  font-size: 15px; line-height: 1.2; color: var(--ink); background: var(--paper);
}
.qz-tags li.new { animation: qz-tag .7s var(--ease) both; }
@keyframes qz-tag {
  0% { opacity: 0; transform: translateY(10px) scale(.7); background: var(--orange); border-color: var(--orange); color: #151414; }
  60% { opacity: 1; transform: none; background: var(--orange); border-color: var(--orange); color: #151414; }
}
.qz-empty { margin-top: 24px; font-size: 16px; line-height: 1.4; color: var(--ink-2); }
.qz-tags[data-empty="false"] + .qz-empty { display: none; }

/* No price while answering (it would steer the answers): it only appears on the result */
.qz-tags, .qz-empty { margin-bottom: 28px; }
.qz-profile-foot {
  margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2);
}

/* Spinning badge on the panel's corner (same as the home hero) */
.qz-spin { position: absolute; top: -44px; right: -12px; width: 124px; aspect-ratio: 1; pointer-events: none; }
.qz-spin svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 8px 20px rgba(21, 20, 20, .15)); }
.qz-spin .badge-disc { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.qz-spin .badge-ring { transform-origin: 100px 100px; animation: badge-spin 18s linear infinite; }
.qz-spin text { font-family: var(--mono); font-size: 15px; letter-spacing: .12em; fill: var(--ink); }
.qz-spin .badge-star { stroke: var(--orange); stroke-width: 7; stroke-linecap: round; fill: none; transform-origin: 100px 100px; animation: badge-spin 9s linear infinite reverse; }

/* ---------- Result ---------- */
.qz-result .qz-q { max-width: 20ch; }
.qz-res-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; margin-top: clamp(32px, 4vw, 56px); }
.qz-main {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start;
  padding: clamp(26px, 2.8vw, 44px); border-radius: 20px; background: var(--orange); color: #151414;
  animation: qz-pop .9s var(--ease) both .1s;
}
.qz-main .qz-star { position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; opacity: .22; pointer-events: none; }
.qz-main .qz-star path { fill: none; stroke: #151414; stroke-width: 7; stroke-linecap: round; transform-origin: 100px 100px; animation: badge-spin 22s linear infinite; }
.qz-pill {
  position: relative; font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 40px; background: #151414; color: #fff;
}
.qz-main h3 { position: relative; margin-top: 28px; max-width: 13ch; font-size: clamp(36px, 2.6vw + 18px, 64px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.qz-main > p:not(.qz-main-price) { position: relative; margin-top: 16px; max-width: 470px; font-size: 18px; line-height: 1.4; color: rgba(21, 20, 20, .8); }
.qz-main-price {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; align-self: stretch;
  margin-top: auto; padding-top: 22px; border-top: 1px solid rgba(21, 20, 20, .2);
}
.qz-main > p + .qz-main-price { margin-top: 32px; }
.qz-main-price strong { font-size: clamp(30px, 1.6vw + 18px, 48px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; }
.qz-main-price s { font-size: 18px; font-weight: 500; opacity: .6; }
.qz-main-price small, .qz-extra-price small { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; opacity: .75; }
.qz-link { display: inline-block; margin-top: 18px; padding-bottom: 2px; border-bottom: 1px solid currentColor; font-size: 16px; }
.qz-link span { display: inline-block; transition: transform .4s var(--ease); }
.qz-link:hover span { transform: translate(3px, -3px); }

.qz-why { padding: clamp(26px, 2.8vw, 44px); border-radius: 20px; background: var(--soft); animation: qz-pop .9s var(--ease) both .2s; }
.qz-why h3 { font-size: clamp(22px, .8vw + 16px, 28px); font-weight: 600; letter-spacing: -0.02em; }
.qz-why ul { list-style: none; margin-top: 18px; }
.qz-why li {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--row-line);
  font-size: 17px; line-height: 1.4; color: var(--ink-2);
  animation: qz-in .6s var(--ease) both; animation-delay: calc(var(--d) * 90ms + 400ms);
}
.qz-why li svg { width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: var(--orange); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.qz-sub { margin-top: clamp(44px, 5vw, 72px); font-size: clamp(24px, 1vw + 18px, 34px); font-weight: 600; letter-spacing: -0.025em; }
.qz-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 20px; }
.qz-extra {
  display: flex; flex-direction: column; align-items: flex-start; padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--card);
  animation: qz-in .7s var(--ease) both; animation-delay: calc(var(--d) * 90ms + 500ms);
}
.qz-role { margin-bottom: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--orange); }
.qz-extra h4 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.qz-extra > p:not(.qz-extra-price) { margin-top: 8px; font-size: 16px; line-height: 1.4; color: var(--ink-2); }
.qz-extra-price { margin-top: auto; padding-top: 20px; }
.qz-extra-price strong { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }

.qz-total {
  margin-top: 16px; padding: clamp(26px, 2.8vw, 44px); border-radius: 20px;
  background: var(--invert-bg); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  animation: qz-in .7s var(--ease) both .6s;
}
.qz-total-label { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--orange); }
.qz-total-value { margin-top: 14px; font-size: clamp(44px, 4vw + 16px, 104px); font-weight: 600; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.qz-amt { white-space: nowrap; }
.qz-total-value small { font-size: clamp(16px, .6vw + 12px, 22px); font-weight: 500; letter-spacing: 0; color: rgba(255, 255, 255, .6); }
.qz-total-value i { font-style: normal; font-weight: 400; color: var(--orange); }
.qz-total-note { margin-top: 18px; max-width: 620px; font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, .6); }

.qz-plan {
  margin-top: 16px; padding: 18px 22px; border: 1px dashed var(--orange); border-radius: 14px;
  font-size: 17px; line-height: 1.45; color: var(--ink-2); animation: qz-in .7s var(--ease) both .7s;
}
.qz-plan strong, .qz-plan em { color: var(--ink); font-style: normal; font-weight: 600; }
/* "Chaque projet se discute": the estimate is a starting point, never a fixed price */
.qz-talk {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 2.4vw, 32px); align-items: start;
  margin-top: 16px; padding: clamp(24px, 2.8vw, 44px); border: 1.5px solid var(--orange); border-radius: 20px;
  animation: qz-in .7s var(--ease) both .7s;
}
.qz-talk svg {
  width: clamp(44px, 4vw, 64px); height: auto; aspect-ratio: 1; margin-top: 2px;
  fill: none; stroke: var(--orange); stroke-width: 14; stroke-linecap: round; animation: badge-spin 14s linear infinite;
}
.qz-talk h3 { font-size: clamp(30px, 2vw + 16px, 52px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.qz-talk p { margin-top: 14px; max-width: 700px; font-size: clamp(17px, .4vw + 15px, 20px); line-height: 1.45; color: var(--ink-2); }
.qz-tip {
  margin-top: 16px; padding: 18px 22px; border-radius: 14px; background: var(--soft);
  font-size: 17px; line-height: 1.45; color: var(--ink-2); animation: qz-in .7s var(--ease) both .7s;
}
.qz-tip strong { color: var(--orange); font-weight: 600; }
.qz-tip a { color: var(--ink); font-weight: 600; border-bottom: 1px solid currentColor; }

/* "Et ensuite ?": the 3 steps after sending */
.qz-after ol { list-style: none; counter-reset: qz-step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.qz-after li {
  counter-increment: qz-step; padding-top: 16px; border-top: 1px solid var(--ink);
  font-size: 17px; line-height: 1.4; color: var(--ink-2);
}
.qz-after li::before { content: counter(qz-step, decimal-leading-zero); display: block; margin-bottom: 10px; font-family: var(--mono); font-size: 14px; color: var(--orange); }

.qz-actions { margin-top: clamp(32px, 4vw, 48px); }
.qz .qz-send { background: var(--orange); border-color: var(--orange); color: #151414; }
.qz .qz-send::before { background: #151414; }
.qz .qz-send .roll span + span { color: #fff; }
.qz .qz-send:hover { border-color: #151414; }
.qz-restart { padding: 6px 0; border: 0; border-bottom: 1px solid currentColor; background: none; color: var(--ink-2); cursor: pointer; }
.qz-restart:hover { color: var(--ink); }

/* ---------- Tilted ribbon at the bottom (services, scrolling) ---------- */
.qz-ribbon {
  position: absolute; left: -4%; right: -4%; bottom: clamp(44px, 5vw, 80px);
  padding: clamp(8px, .9vw, 14px) 0; background: var(--orange); transform: rotate(-2deg);
  box-shadow: 0 10px 30px rgba(21, 20, 20, .12);
}
.qz-ribbon .marquee { position: relative; top: auto; left: auto; right: auto; transform: none; height: auto; mix-blend-mode: normal; color: #151414; }
.qz-ribbon .m-item {
  font-family: var(--mono); font-size: clamp(16px, 1.6vw, 28px); font-weight: 400; letter-spacing: .06em;
  line-height: 1.3; text-transform: uppercase; padding-right: .6em;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .qz-grid { grid-template-columns: minmax(0, 1fr); }
  .qz-profile { position: relative; top: auto; min-height: 0; }
  .qz-spin { width: 96px; top: -34px; right: -8px; }
  .qz-res-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 799px) {
  .qz-after ol { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .qz-top { grid-template-columns: auto 1fr auto; gap: 14px; }
  .qz-opt { gap: 14px; padding: 16px 6px; }
  .qz-key { width: 30px; height: 30px; font-size: 13px; }
  .qz-tick { width: 26px; height: 26px; }
  .qz-label small { font-size: 14px; }
  .qz-row .btn { width: 100%; justify-content: center; }
  .qz-main h3 { max-width: none; }
  .qz-total-value { font-size: 42px; }
  .qz-talk { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .qz-talk svg { width: 40px; }
  .qz-total-value small { display: inline; }
}
