/* Track F's own screens of the guided journey: the home (/parcours), step 1 "Vos besoins" (/parcours/besoins)
   and the second door (/parcours/voiture). After app.css and journey.css; never redefines a token. The
   shared pieces (.j-screen, .j-title, .j-option, .j-go, the thread) are journey.css's. */

/* ── The home ────────────────────────────────────────────────────────────────────────────────────────── */

.jh { padding-top: clamp(20px, 6vh, 56px); }
.jh .j-title { font-size: clamp(2.125rem, 10.08vw, 3.5625rem); line-height: 0.98; max-width: 14.5em; }
.jh .j-lede { font-size: 1.125rem; }

/* A few real cars at true scale, standing on one line: the calm picture of the home. */
.jh-scene { margin: 30px calc(var(--pad) * -1) 0; overflow: hidden; overflow: clip; }
.jh-road {
  /* The scale that puts every car of the scene on the screen, the gaps included (`--fit`, millimetres), and no larger than a card's. */
  --mm: min(0.034px, (100vw - 2 * var(--pad)) / var(--fit, 20000));
  display: flex; align-items: flex-end; justify-content: center; gap: calc(380 * var(--mm));
  width: max-content; min-width: 100%; margin: 0 auto; padding: 18px var(--pad) 10px;
  border-bottom: 1.5px solid var(--line);
}
.jh-car { display: block; flex: none; }
.jh-scene figcaption { padding: 10px var(--pad) 0; text-align: center; }
@media (min-width: 760px) {
  .jh-road { --mm: min(0.034px, (760px - 2 * var(--pad)) / var(--fit, 20000)); }
}

/* The story in one line. */
.jh-story { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 26px; font: 550 0.8125rem/1.3 var(--body); color: var(--soft); }
.jh-story li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.jh-story b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.25px solid var(--edge); font: 600 0.71875rem/1 var(--label); color: var(--ink); font-variant-numeric: tabular-nums; }

.jh-doors { display: grid; gap: 10px; margin-top: 28px; }
.jh-doors .btn { width: 100%; min-height: 58px; border-radius: 30px; font-size: 1.0625rem; }
.jh-main .ic { margin-right: -4px; }
.jh-street { justify-self: center; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font: 500 0.9375rem/1.2 var(--body); color: var(--soft); text-underline-offset: 0.22em; }
.jh-street:hover { color: var(--ink); }

/* "Reprendre": a card above the doors, when the device remembers a journey. */
.jh-resume {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 26px;
  padding: 14px 14px 14px 18px; border: 1.5px solid var(--ink); border-radius: var(--r-l); background: var(--card);
  text-decoration: none; box-shadow: var(--lift-1);
}
.jh-resume-text { display: grid; gap: 2px; min-width: 0; }
.jh-resume-text b { font: 700 1.0625rem/1.2 var(--display); letter-spacing: -0.013em; }
.jh-resume-text small { font: 400 0.875rem/1.3 var(--body); color: var(--soft); }
.jh-resume + .jh-doors { margin-top: 12px; }

.jh-facts { margin-top: 26px; text-align: center; }

@media (min-width: 760px) {
  .jh { max-width: 760px; }
  .jh-scene { margin-left: 0; margin-right: 0; }
  .jh-road { padding-left: 0; padding-right: 0; }
  .jh-scene figcaption { padding-left: 0; }
  .jh-street { padding-left: 0; }
  .jh-doors { grid-template-columns: auto auto; justify-content: start; align-items: center; }
  .jh-doors .btn { width: auto; padding: 8px 28px; }
  .jh-street { grid-column: 1 / -1; justify-self: start; }
  .jh-story { justify-content: flex-start; }
  .jh-facts { text-align: left; }
  .jh-scene figcaption { text-align: left; }
  .jh-road { justify-content: flex-start; }
}

/* ── Step 1: one question ────────────────────────────────────────────────────────────────────────────── */

.nf .j-said { margin: -4px calc(var(--pad) * -1) 18px; }
.nf-ask { margin-top: 4px; }

/* "Au comptant | Par mois": two links, as a switch. */
.nf-per { display: inline-grid; grid-template-columns: 1fr 1fr; margin-top: 20px; padding: 3px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.nf-per a { display: grid; place-items: center; min-height: 40px; padding: 0 18px; border-radius: var(--r-pill); font: 550 0.9rem/1 var(--body); color: var(--soft); text-decoration: none; white-space: nowrap; }
.nf-per a[aria-current="true"] { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgb(0 0 0 / 0.14), 0 0 0 1.5px var(--ink); }
.nf-per + .j-options { margin-top: 16px; }

/* The kinds, each with its silhouette before its name. */
.j-option.has-sil { grid-template-columns: 76px minmax(0, 1fr) auto; }
.nf-sil { width: 76px; height: auto; }
.j-options { container-type: inline-size; }
.j-option-text b { hyphens: auto; }
/* Large text on a phone: the silhouette stands above the name, so that no word is cut. */
@container (max-width: 19em) {
  .j-option.has-sil { grid-template-columns: minmax(0, 1fr) auto; }
  .j-option.has-sil .nf-sil { grid-column: 1 / -1; width: 64px; }
}

.nf-terms { margin-top: 14px; }
.nf-amount { display: grid; gap: 8px; margin-top: 22px; }
.nf-amount label { font: 550 0.9375rem/1.3 var(--body); }
.nf-amount-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.nf-amount input { width: 100%; min-width: 0; height: 52px; padding: 0 14px; border: 1.5px solid var(--edge); border-radius: var(--r-m); background: var(--card); font: 700 1.1875rem/1 var(--display); letter-spacing: -0.008em; font-variant-numeric: tabular-nums; }
.nf-amount input:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 2px; border-color: var(--ink); }
.nf-amount input::placeholder { color: var(--faint); font-weight: 500; }
.nf-unit { font: 600 0.9375rem/1 var(--body); color: var(--soft); }
.nf-amount .btn { min-height: 52px; }

.nf-missing { margin-top: 16px; }
.nf-rules { margin-top: 10px; }
.nf-rules ul { display: grid; gap: 6px; margin-bottom: 8px; }
.nf-skip { margin-top: 26px; text-align: center; }
.nf-skip a { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 18px; border-radius: var(--r-pill); font: 600 0.9375rem/1 var(--body); text-decoration: none; border: 1.5px solid var(--edge); }
.nf-skip .ic { width: 18px; height: 18px; }
@media (hover: hover) {
  .nf-skip a:hover { border-color: var(--ink); }
}

/* The count of cars left, large beside the question: on a laptop only (the thread says it on a phone, and to a
   screen reader everywhere). */
.nf-count { display: none; }

/* ── Step 1 with room: the question and what was said on one side, the options as large cards on the other ── */

@media (min-width: 1000px) {
  .j-screen.nf:not(.nf-end) {
    max-width: var(--j-frame); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: repeat(8, auto) 1fr auto; column-gap: clamp(48px, 6vw, 96px); align-content: start; padding-top: 44px;
  }
  .nf > * { grid-column: 1; }
  .nf > .j-said { grid-row: 1; margin: 0 0 22px; padding: 0; }
  /* The question a step under the count of cars it leads to (3.5rem): the figure leads. */
  .nf > .j-title { grid-row: 2; font-size: clamp(2.25rem, 3.05vw, 2.75rem); line-height: 1; }
  .nf > .nf-count { grid-row: 3; display: flex; align-items: baseline; gap: 10px; margin-top: 26px; font: 500 1rem/1 var(--body); color: var(--soft); }
  .nf-count b { font: 800 3.5rem/0.9 var(--display); letter-spacing: -0.038em; color: var(--ink); font-variant-numeric: tabular-nums; }
  .nf-count small { font: 500 0.875rem/1 var(--body); }
  .nf > .nf-per { grid-row: 4; justify-self: start; margin-top: 28px; }
  .nf > .nf-terms { grid-row: 5; }
  .nf > .nf-missing { grid-row: 6; }
  .nf > .nf-rules { grid-row: 7; }
  .nf > .nf-skip { grid-row: 8; text-align: left; }
  .nf > .j-options { grid-column: 2; grid-row: 1 / span 9; align-self: start; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 0; }
  .nf > .nf-amount { grid-column: 2; grid-row: 10; max-width: 420px; }
  .nf .j-option { min-height: 96px; padding: 16px 18px 16px 20px; }
  .nf .j-option-text b { font-size: 1.3125rem; }
  .nf .j-option-n b { font-size: 1.5rem; }
  .nf .j-option.has-sil { grid-template-columns: minmax(0, 1fr) auto; align-content: space-between; }
  .nf .j-option.has-sil .nf-sil { grid-column: 1 / -1; width: 96px; }
  /* The count is beside the question: the thread's own is kept for a screen reader only. */
  .app:has(.nf-count) .jt-left { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* The early end: the few cars left. */
.nf-left { display: grid; margin-top: 22px; border-top: 1px solid var(--line); }
.nf-left li { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.nf-left-pic { --mm: 0.0185px; display: grid; place-items: end center; min-height: 36px; }
.nf-left b { display: block; font: 700 1.0625rem/1.2 var(--display); letter-spacing: -0.013em; }

/* ── The second door ─────────────────────────────────────────────────────────────────────────────────── */

.nc-search { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 24px; }
.nc-field { display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 16px; border: 1.5px solid var(--edge); border-radius: var(--r-l); background: var(--card); box-shadow: var(--lift-1); }
.nc-field:focus-within { border-color: var(--ink); outline: 2.5px solid var(--ink); outline-offset: 2px; }
.nc-field .ic { flex: none; color: var(--soft); }
.nc-field input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: none; font: 650 1.25rem/1 var(--display); letter-spacing: -0.017em; }
.nc-field input::placeholder { color: var(--faint); font-weight: 500; }
.nc-search .btn { min-height: 52px; }
@media (min-width: 560px) {
  .nc-search { grid-template-columns: minmax(0, 1fr) auto; }
  .nc-search .btn { min-height: 58px; padding: 0 26px; }
}
.nc-h { margin: 30px 0 10px; font: 700 1.125rem/1.2 var(--display); letter-spacing: -0.013em; outline: none; }
.nc-rows { display: grid; gap: 8px; }
.nc-row {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 76px;
  padding: 10px 12px 10px 14px; border: 1.5px solid var(--line); border-radius: var(--r-l); background: var(--card);
  text-decoration: none; transition: border-color var(--quick), scale var(--quick);
}
.nc-row:active { scale: 0.985; border-color: var(--ink); }
.nc-pic { --mm: 0.02px; display: grid; place-items: end center; min-height: 38px; }
.nc-text { display: grid; gap: 2px; min-width: 0; }
.nc-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 750 1.1875rem/1.15 var(--display); letter-spacing: -0.017em; }
.nc-text > span { font-size: 0.875rem; color: var(--soft); }
.nc-text small:not(.t-label) { color: var(--soft); }
.nc-row > .ic { color: var(--soft); }
.nc-makes { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.nc-makes .tile[aria-current="true"] { border-color: var(--ink); }
@media (hover: hover) {
  .nc-row:hover { border-color: var(--ink); }
}
.nc-makes .tile { text-decoration: none; }
.j-option.is-none .nf-sil { opacity: 0.45; }
.nc-more summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-bottom: 0; cursor: pointer; list-style: none; }
.nc-more summary::-webkit-details-marker { display: none; }
.nc-more summary::after { content: "+"; font: 400 1.5rem/1 var(--body); color: var(--soft); }
.nc-more[open] summary::after { content: "−"; }
.nc-more[open] summary { margin-bottom: 10px; }
