/* Garage du Vieux Pont — site de démonstration La Balise.
   Aucune règle inline dans la page : la CSP du domaine (style-src 'self') les bloquerait. */

@font-face { font-family: "Archivo"; src: url("/exemples/garage/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/exemples/garage/fonts/atkinson.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

/* Contrastes (WCAG) : ink/concrete 14.0 · muted/concrete 5.4 · blanc/red 5.9 · concrete/graphite 13.9 · yellow/graphite 10.6 · mist/graphite 8.6 */
:root {
  --concrete: #ECEAE5;
  --card: #FAF9F6;
  --steel: #DAD7D0;
  --ink: #1E2124;
  --muted: #5B6066;
  --graphite: #1E2124;
  --graphite-2: #2A2E32;
  --graphite-3: #383D42;
  --mist: #B4B9BE;
  --red: #C21F2F;
  --red-2: #D63242;
  --red-dark: #861420;
  --yellow: #F6C431;
  --ok: #2B8650;
  --line: rgba(30, 33, 36, .14);
  --line-dark: rgba(236, 234, 229, .14);
  --radius: 14px;
  --shadow: 0 1px 0 rgba(30, 33, 36, .06), 0 22px 40px -28px rgba(30, 33, 36, .55);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --display: "Archivo", system-ui, sans-serif;
  --font: "Atkinson Hyperlegible Next", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--concrete); color: var(--ink); font: 400 17px/1.6 var(--font); }
main, .foot { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-stretch: 72%; font-weight: 800; line-height: .95; letter-spacing: -0.01em; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.rdv :focus-visible, .foot :focus-visible { outline-color: var(--yellow); }
small { font-size: .82em; }

/* Surligneur « ruban de chantier » */
.mark { background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%); padding: 0 .06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.mark-dark { background: none; color: var(--yellow); }

/* ---------- Bandeau démo ---------- */
.demo-bar { position: relative; z-index: 60; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 16px; padding: 8px 16px; background: var(--graphite); color: var(--mist); font-size: 13px; text-align: center; }
.demo-bar strong { color: var(--concrete); }
.demo-bar a { color: var(--yellow); font-weight: 700; text-decoration: none; }
.demo-bar a:hover { text-decoration: underline; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 22px; border: 0; border-radius: 10px; font: 800 16px/1.1 var(--display); font-stretch: 90%; letter-spacing: .02em; text-transform: uppercase; text-decoration: none; text-align: center; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s ease, color .2s ease; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 4px 0 var(--red-dark); }
.btn-red:hover { background: var(--red-2); transform: translateY(-2px); box-shadow: 0 6px 0 var(--red-dark); }
.btn-red:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--red-dark); }
.btn-ink { background: var(--graphite); color: var(--concrete); box-shadow: 0 4px 0 #000; }
.btn-ink:hover { background: var(--graphite-3); transform: translateY(-2px); }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--concrete); }
.btn-block { width: 100%; }

/* ---------- En-tête ---------- */
.top { position: sticky; top: 0; z-index: 50; background: rgba(236, 234, 229, .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s ease; }
.top.is-scrolled { border-color: var(--line); }
.top-inner { display: flex; align-items: center; gap: 28px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; }
.brand-text { display: grid; }
.brand-name { font: 800 22px/1 var(--display); font-stretch: 72%; text-transform: uppercase; letter-spacing: .01em; }
.brand-sub { margin-top: 3px; font-size: 13px; color: var(--muted); }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--muted); font-weight: 700; font-size: 15px; text-decoration: none; transition: color .2s ease; }
.nav a:hover { color: var(--ink); }
.open { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 700; white-space: nowrap; }
.dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: #9AA0A6; }
.open[data-open-state="open"] .dot { background: #34B26A; }
.open[data-open-state="open"] .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 2s ease-out infinite; }
.open[data-open-state="soon"] .dot { background: var(--yellow); }
@keyframes ping { 70%, 100% { transform: scale(2.6); opacity: 0; } }

/* ---------- Hero ---------- */
.hero { padding: 54px 0 84px; background: repeating-linear-gradient(-45deg, transparent 0 22px, rgba(30, 33, 36, .025) 22px 44px); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.kicker { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.kicker-light { color: var(--yellow); }
.hero h1 { margin-top: 16px; font-size: clamp(50px, 6.8vw, 96px); }
.hero-lead { margin-top: 22px; max-width: 30em; font-size: 19px; color: var(--muted); }
.plate-form { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.plate { display: flex; align-items: stretch; height: 64px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 3px var(--ink), 0 14px 28px -16px rgba(0, 0, 0, .5); overflow: hidden; cursor: text; }
.plate:focus-within { box-shadow: 0 0 0 3px var(--red), 0 0 0 7px rgba(194, 31, 47, .2); }
.plate-eu, .plate-dept { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 40px; background: #1F44A8; color: #fff; font: 800 18px/1 var(--display); }
.stars { color: var(--yellow); font-size: 12px; margin-bottom: 4px; }
.plate-dept span { font-size: 14px; }
.plate input { width: 220px; padding: 0 12px; border: 0; background: transparent; color: var(--ink); font: 800 34px/1 var(--display); font-stretch: 85%; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.plate input::placeholder { color: #C4C7CA; }
.plate input:focus { outline: none; }
.plate-form .btn { height: 64px; padding-inline: 26px; }
.plate-help { margin-top: 12px; min-height: 1.5em; font-size: 15px; color: var(--muted); }
.plate-help.is-error { color: var(--red); font-weight: 700; }

.car-card { position: relative; padding: 26px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.car-art { margin: -6px -6px 6px; padding: 6px; border-radius: 16px; background: linear-gradient(#E3E1DB, #D4D1C9); }
.car-art img { display: block; width: 100%; height: auto; border-radius: 12px; }
.car-body { fill: var(--car, #7C8B96); transition: fill .6s var(--ease); }
.car-card.is-new .car-art img { animation: drive .9s var(--ease); }
@keyframes drive { from { transform: translateX(-60px); opacity: 0; } }
.car-card.is-new .wheel { animation: roll .9s var(--ease); transform-box: fill-box; transform-origin: center; }
@keyframes roll { from { transform: rotate(-300deg); } }
.car-plate { display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 2px var(--ink); font: 800 15px/1.2 var(--display); letter-spacing: .08em; }
.car-info h2 { margin-top: 10px; font-size: 36px; }
.car-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.car-facts div { padding: 10px 12px; border-radius: 10px; background: var(--concrete); }
.car-facts dt { font-size: 12px; color: var(--muted); }
.car-facts dd { margin: 2px 0 0; font-weight: 800; }
.car-note { margin-top: 12px; padding: 10px 12px; border-left: 4px solid var(--yellow); background: #FFF8E1; font-size: 15px; }
.car-other { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; color: var(--muted); }
.car-other select { flex: 1; min-width: 200px; padding: 9px 10px; border: 0; border-radius: 8px; background: var(--concrete); color: var(--ink); font: 600 15px var(--font); box-shadow: inset 0 0 0 1px var(--line); }
.fine { margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center; }
.fine-left { text-align: left; }
.fine-light { color: var(--mist); }

/* ---------- Prix ---------- */
.prices { padding: 90px 0 100px; border-top: 3px solid var(--ink); }
.section-head { max-width: 780px; }
.section-head h2, .track h2 { margin-top: 12px; font-size: clamp(40px, 5vw, 68px); }
.section-lead { margin-top: 16px; max-width: 36em; font-size: 18px; color: var(--muted); }
.price-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-top: 34px; align-items: start; }
.services { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.svc { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow .2s ease, transform .2s var(--ease), background-color .2s ease; }
.svc:hover { transform: translateX(4px); }
.svc input { width: 22px; height: 22px; margin: 0; accent-color: var(--red); }
.svc-name { font-weight: 800; }
.svc-name small { display: block; font-weight: 400; color: var(--muted); }
.svc-opts { display: inline-flex; gap: 4px; margin-top: 6px; }
.svc-opts button { padding: 5px 10px; border: 0; border-radius: 6px; background: var(--concrete); color: var(--ink); font: 700 13px var(--font); cursor: pointer; }
.svc-opts button[aria-pressed="true"] { background: var(--ink); color: var(--concrete); }
.svc-price { font: 800 24px/1 var(--display); font-stretch: 80%; font-variant-numeric: tabular-nums; white-space: nowrap; }
.svc.is-on { box-shadow: inset 0 0 0 2px var(--red); background: #fff; }
.svc.is-off { opacity: .5; cursor: default; }
.svc.is-off:hover { transform: none; }
.ticket { position: sticky; top: 90px; padding: 24px; border-radius: 6px; background: #fff; box-shadow: var(--shadow); font-family: var(--font); }
.ticket::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: radial-gradient(circle at 10px 0, transparent 9px, #fff 10px) -10px 0 / 20px 10px repeat-x; }
.ticket-head { font: 800 22px/1 var(--display); font-stretch: 72%; text-transform: uppercase; letter-spacing: .04em; padding-bottom: 12px; border-bottom: 2px dashed var(--line); }
.ticket-lines { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; min-height: 40px; font-size: 15px; }
.ticket-lines li { display: flex; justify-content: space-between; gap: 10px; animation: tick .3s var(--ease) both; }
.ticket-lines li b { font-variant-numeric: tabular-nums; }
.ticket-lines .empty { color: var(--muted); }
@keyframes tick { from { opacity: 0; transform: translateY(-6px); } }
.ticket-total { margin-top: 14px; padding-top: 12px; border-top: 2px dashed var(--line); font: 800 52px/1 var(--display); font-stretch: 80%; font-variant-numeric: tabular-nums; }
.ticket-total small { font-size: 16px; color: var(--muted); }
.ticket-time { margin: 6px 0 16px; font-size: 15px; color: var(--muted); }

/* ---------- Rendez-vous ---------- */
.rdv { padding: 100px 0; background: var(--graphite); color: var(--concrete); }
.rdv .section-lead { color: var(--mist); }
.rdv-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-top: 34px; align-items: start; }
.rdv-steps { display: grid; gap: 12px; }
.rdv-block { padding: 20px; border-radius: var(--radius); background: var(--graphite-2); }
.rdv-label { font: 800 22px/1 var(--display); font-stretch: 72%; text-transform: uppercase; letter-spacing: .04em; color: var(--yellow); }
.rdv-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 14px; }
.rdv-day { padding: 10px 4px; border: 0; border-radius: 10px; background: var(--graphite-3); color: var(--concrete); font: 700 13px/1.2 var(--font); cursor: pointer; transition: background-color .2s ease; }
.rdv-day strong { display: block; font: 800 24px/1.05 var(--display); font-stretch: 80%; }
.rdv-day:hover:not(:disabled) { background: #4A5056; }
.rdv-day[aria-pressed="true"] { background: var(--yellow); color: var(--ink); }
.rdv-day:disabled { opacity: .35; cursor: not-allowed; }
.rdv-modes { display: grid; gap: 8px; margin-top: 14px; }
.mode { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; border: 0; border-radius: 10px; background: var(--graphite-3); color: var(--concrete); font: 400 15px/1.35 var(--font); text-align: left; cursor: pointer; transition: background-color .2s ease; animation: tick .3s var(--ease) both; }
.mode strong { font: 800 20px/1.1 var(--display); font-stretch: 80%; }
.mode em { font-style: normal; font-weight: 800; color: var(--yellow); }
.mode span { grid-column: 1 / -1; color: var(--mist); }
.mode:hover:not(:disabled) { background: #4A5056; }
.mode[aria-pressed="true"] { background: var(--concrete); color: var(--ink); }
.mode[aria-pressed="true"] span { color: var(--muted); }
.mode:disabled { opacity: .4; cursor: not-allowed; }
.loan { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: var(--radius); background: var(--graphite-2); cursor: pointer; }
.loan input { width: 22px; height: 22px; accent-color: var(--yellow); }
.loan span span { color: var(--mist); font-size: 14px; }
.loan.is-off { opacity: .45; cursor: not-allowed; }
.rdv-form, .rdv-done { display: grid; gap: 10px; padding: 24px; border-radius: 18px; background: var(--graphite-2); box-shadow: inset 0 0 0 1px var(--line-dark); }
.rdv-summary { padding: 12px 14px; border-radius: 10px; background: var(--graphite-3); font-weight: 700; }
.field { display: block; }
.field > span { display: block; margin: 0 0 5px 2px; font-size: 13px; font-weight: 700; color: var(--mist); }
.track .field > span { color: var(--muted); }
.field input { width: 100%; padding: 13px 14px; border: 0; border-radius: 10px; background: var(--card); color: var(--ink); font: 600 16px var(--font); box-shadow: inset 0 0 0 1.5px rgba(30, 33, 36, .3); }
.field input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--red), 0 0 0 4px rgba(194, 31, 47, .2); }
.form-error { min-height: 1.3em; color: #FF8A94; font-weight: 700; font-size: 14px; }
.rdv-done { text-align: center; justify-items: center; }
.rdv-done[hidden] { display: none; }
.rdv-done:focus { outline: none; }
.rdv-done h3 { font-size: 34px; }
.rdv-done p { color: var(--mist); }
.rdv-done .btn-line { color: var(--concrete); box-shadow: inset 0 0 0 2px var(--concrete); }
.done-key { width: 96px; }
.done-ring { fill: none; stroke: var(--yellow); stroke-width: 6; stroke-dasharray: 320; stroke-dashoffset: 320; animation: draw .7s var(--ease) forwards; }
.done-check { fill: none; stroke: var(--concrete); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw .5s .55s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Suivi ---------- */
.track { padding: 100px 0; }
.track-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.track-form { display: flex; align-items: flex-end; gap: 10px; margin-top: 26px; max-width: 420px; }
.track-form .field { flex: 1; }
.track-form .btn { height: 50px; }
.track-card { padding: 26px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); animation: tick .4s var(--ease) both; }
.track-card[hidden] { display: none; }
.track-car { font: 800 24px/1.1 var(--display); font-stretch: 80%; }
.timeline { margin: 18px 0 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; padding-bottom: 18px; color: var(--muted); }
.timeline li::before { content: ""; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 3px var(--steel); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 24px; bottom: 2px; width: 2px; background: var(--steel); }
.timeline li:last-child::after { display: none; }
.timeline li.is-done { color: var(--ink); }
.timeline li.is-done::before { background: var(--ok); box-shadow: none; }
.timeline li.is-done::after { background: var(--ok); }
.timeline li.is-now { color: var(--ink); font-weight: 800; }
.timeline li.is-now::before { background: var(--yellow); box-shadow: 0 0 0 5px rgba(246, 196, 49, .35); }
.timeline time { font-size: 14px; color: var(--muted); font-weight: 400; }
.extra { margin-top: 6px; padding: 18px; border-radius: 14px; background: #FFF8E1; box-shadow: inset 0 0 0 2px var(--yellow); }
.extra-head { font: 800 20px/1 var(--display); font-stretch: 80%; text-transform: uppercase; letter-spacing: .03em; }
.extra-body { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; margin-top: 12px; font-size: 15px; }
.extra-pic { width: 110px; height: 74px; object-fit: cover; border-radius: 8px; }
.extra-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.extra-actions .btn { padding: 12px 16px; font-size: 14px; }
.extra-answer { margin-top: 10px; font-weight: 700; min-height: 1.4em; }
.extra.is-answered .extra-actions { display: none; }

/* ---------- Garanties ---------- */
.trust { padding: 0 0 100px; }
.trust-photo { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; margin-bottom: 20px; border-radius: 20px; box-shadow: var(--shadow); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.trust-grid li { padding: 24px; border-top: 4px solid var(--red); background: var(--card); box-shadow: var(--shadow); color: var(--muted); font-size: 15px; }
.trust-grid strong { display: block; margin-bottom: 8px; color: var(--ink); font: 800 24px/1.05 var(--display); font-stretch: 75%; }

/* ---------- Pied de page ---------- */
.foot { padding: 56px 0; background: var(--graphite); color: var(--mist); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 32px; }
.brand-name-foot { margin-bottom: 12px; color: var(--concrete); font-size: 26px; }
.foot a { color: var(--concrete); }
.foot-small { margin-top: 6px; font-size: 13px; }
.foot-credit a { color: var(--yellow); font-weight: 700; text-decoration: none; }
.foot-credit a:hover { text-decoration: underline; }

.sticky-cta { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .nav { display: none; }
  .open { margin-left: auto; }
  .hero-grid, .price-grid, .rdv-grid, .track-grid { grid-template-columns: 1fr; }
  .ticket { position: static; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .demo-long { display: none; }
  .top-inner { min-height: 60px; gap: 10px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: 17px; }
  .brand-sub { display: none; }
  .open { padding: 6px 10px; font-size: 13px; }
  .hero { padding: 30px 0 64px; }
  .hero-lead { font-size: 17px; }
  .plate { width: 100%; }
  .plate input { flex: 1; width: auto; min-width: 0; font-size: 30px; }
  .plate-form .btn { width: 100%; }
  .car-card { padding: 18px 14px; }
  .car-info h2 { font-size: 30px; }
  .prices, .rdv, .track { padding: 72px 0; }
  .svc { grid-template-columns: 24px 1fr; padding: 14px; }
  .svc-price { grid-column: 2; }
  .ticket-total { font-size: 44px; }
  .rdv-days { grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .rdv-day { font-size: 11px; }
  .rdv-day strong { font-size: 20px; }
  .rdv-block, .rdv-form, .rdv-done { padding: 16px; }
  .track-card { padding: 20px 16px; }
  .extra-body { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust { padding-bottom: 72px; }
  .foot { padding-bottom: 110px; }
  .foot-grid { grid-template-columns: 1fr; }
  .sticky-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 55; transition: transform .35s var(--ease), opacity .3s ease; }
  .sticky-cta.is-away { transform: translateY(150%); opacity: 0; pointer-events: none; }
}

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

/* Les éléments de grille peuvent rétrécir sous la largeur de leur contenu */
.hero-grid > *, .price-grid > *, .rdv-grid > *, .track-grid > * { min-width: 0; }
