/* kit-auto — socle partagé des démos automobile Lokzen.
   Chaque démo redéfinit les variables --k-* dans sa propre feuille. */
:root {
  --k-bg: #ffffff;
  --k-paper: #ffffff;
  --k-surface: #f2f2f2;
  --k-ink: #1a1a1a;
  --k-muted: #545454;
  --k-line: rgba(0, 0, 0, .14);
  --k-accent: #1f4a3a;
  --k-accent-ink: #ffffff;
  --k-accent2: #8a4a1f;
  --k-accent2-gfx: #b4652f;
  --k-accent-tint: #eef3f0;
  --k-ok: #1f6b3a;
  --k-radius: 14px;
  --k-radius-s: 8px;
  --k-font-title: system-ui, sans-serif;
  --k-font-body: system-ui, sans-serif;
  --k-font-num: ui-monospace, "SFMono-Regular", Menlo, monospace;
  --k-max: 1120px;
  --k-gutter: clamp(16px, 4vw, 32px);
  --k-ease: cubic-bezier(.2, .7, .2, 1);
  --k-demobar-h: 52px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--k-bg);
  color: var(--k-ink);
  font: 400 1.0625rem/1.6 var(--k-font-body);
  padding-bottom: var(--k-demobar-h);
  overflow-wrap: break-word;
}
body.k-demobar-closed { padding-bottom: 0; }
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--k-font-title); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6.2vw, 3.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--k-accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--k-accent2); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.k-num { font-family: var(--k-font-num); font-variant-numeric: tabular-nums; font-weight: 500; }
.k-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.k-wrap { width: min(100% - 2 * var(--k-gutter), var(--k-max)); margin-inline: auto; }
.k-section { padding-block: clamp(48px, 8vw, 96px); }
.k-eyebrow { font: 700 .8125rem/1.3 var(--k-font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--k-accent2); margin-bottom: .75em; }
.k-lead { font-size: clamp(1.08rem, 2.2vw, 1.25rem); color: var(--k-muted); max-width: 60ch; }

/* Lien d'évitement */
.k-skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--k-accent); color: var(--k-accent-ink); padding: 10px 16px; border-radius: var(--k-radius-s); }
.k-skip:focus { top: 12px; }

/* Boutons */
.k-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font: 700 1rem/1.2 var(--k-font-body); text-decoration: none; cursor: pointer;
  border: 2px solid var(--k-accent); background: var(--k-accent); color: var(--k-accent-ink);
  transition: transform .2s var(--k-ease), background-color .2s, color .2s;
}
.k-btn:hover { transform: translateY(-1px); }
.k-btn:active { transform: translateY(0); }
.k-btn--ghost { background: transparent; color: var(--k-accent); }
.k-btn--small { min-height: 40px; padding: 8px 16px; font-size: .9375rem; }
.k-btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* En-tête et navigation multi-pages (sans JavaScript) */
.k-header { background: var(--k-paper); border-bottom: 1px solid var(--k-line); }
.k-header__in { display: flex; align-items: center; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.k-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--k-ink); font: 700 1.25rem/1 var(--k-font-title); }
.k-brand svg { width: 34px; height: 34px; flex: none; }
.k-header__tel { margin-left: auto; text-decoration: none; font-weight: 700; color: var(--k-accent); white-space: nowrap; }
.k-nav { order: 3; flex: 0 0 calc(100% + 2 * var(--k-gutter)); min-width: 0; margin-inline: calc(-1 * var(--k-gutter)); }
.k-nav ul { list-style: none; margin: 0; padding: 0 var(--k-gutter) 10px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.k-nav ul::-webkit-scrollbar { display: none; }
.k-nav a { display: block; white-space: nowrap; padding: 10px 14px; border-radius: 999px; text-decoration: none; color: var(--k-ink); font-weight: 500; font-size: .9375rem; }
.k-nav a:hover { background: var(--k-surface); }
.k-nav a[aria-current="page"] { background: var(--k-accent); color: var(--k-accent-ink); }
@media (min-width: 900px) {
  .k-nav { order: 0; flex: 0 1 auto; margin: 0 0 0 auto; }
  .k-nav ul { padding: 0; }
  .k-header__tel { margin-left: 8px; }
}

/* Bandeau « Démo Lokzen » : fixe en bas, sans décalage de mise en page */
.k-demobar {
  position: fixed; inset: auto 0 0 0; z-index: 50; min-height: var(--k-demobar-h);
  display: flex; align-items: center; gap: 10px; padding: 8px var(--k-gutter);
  background: #15181a; color: #f3f1ec; font-size: .875rem; line-height: 1.3;
}
.k-demobar p { margin: 0; flex: 1; min-width: 0; }
.k-demobar strong { color: #fff; }
.k-demobar__cta { flex: none; color: #15181a; background: #f3f1ec; border-radius: 999px; padding: 8px 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.k-demobar__close { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #f3f1ec; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.k-demobar__close:hover { background: rgba(255, 255, 255, .12); }
@media (max-width: 420px) { .k-demobar__more { display: none; } }

/* Assistant en étapes */
.k-steps { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(var(--k-steps, 4), 1fr); gap: 6px; counter-reset: k-step; }
.k-steps li { counter-increment: k-step; font-size: .8125rem; color: var(--k-muted); padding-top: 10px; border-top: 4px solid var(--k-line); }
.k-steps li::before { content: counter(k-step) ". "; font-family: var(--k-font-num); }
.k-steps li[aria-current="step"] { color: var(--k-ink); font-weight: 700; border-color: var(--k-accent2-gfx); }
.k-steps li.is-done { border-color: var(--k-accent); color: var(--k-ink); }
@media (max-width: 520px) { .k-steps li span { display: none; } }
.k-step__title { outline: none; }
.k-step__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }

/* Choix sous forme de cartes (radios natifs) */
.k-choices { border: 0; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.k-choices legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
.k-choice { position: relative; }
.k-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.k-choice span { display: block; height: 100%; padding: 14px 16px; border: 2px solid var(--k-line); border-radius: var(--k-radius-s); background: var(--k-paper); transition: border-color .2s, background-color .2s; }
.k-choice small { display: block; color: var(--k-muted); font-size: .875rem; margin-top: 2px; }
.k-choice input:checked + span { border-color: var(--k-accent); background: var(--k-accent-tint); }
.k-choice input:focus-visible + span { outline: 3px solid var(--k-accent2); outline-offset: 2px; }
.k-choice input:disabled + span { opacity: .5; text-decoration: line-through; cursor: not-allowed; }

/* Formulaires */
.k-field { display: grid; gap: 6px; margin-bottom: 16px; }
.k-field label { font-weight: 700; font-size: .9375rem; }
.k-field input, .k-field select, .k-field textarea {
  font: inherit; color: var(--k-ink); background: var(--k-paper);
  border: 2px solid var(--k-line); border-radius: var(--k-radius-s); padding: 11px 14px; min-height: 48px; width: 100%;
}
.k-field input:focus-visible, .k-field select:focus-visible, .k-field textarea:focus-visible { border-color: var(--k-accent); outline-offset: 1px; }
.k-field .k-hint { font-size: .875rem; color: var(--k-muted); }
.k-alert { padding: 14px 16px; border-radius: var(--k-radius-s); background: var(--k-surface); border-left: 4px solid var(--k-accent2-gfx); }
.k-alert--ok { border-left-color: var(--k-ok); }

/* Sélecteur de créneaux */
.k-days { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.k-days legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
.k-days__list { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 8px; scrollbar-width: thin; }
.k-days .k-choice { flex: 0 0 auto; min-width: 84px; text-align: center; }
.k-days .k-choice span { padding: 10px 8px; }
.k-days .k-choice b { display: block; font-family: var(--k-font-num); font-size: 1.25rem; }
.k-times { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.k-times legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
.k-times .k-choice span { text-align: center; padding: 10px 6px; font-family: var(--k-font-num); }

/* Pied de page légal */
.k-footer { background: #15181a; color: #d9d6cf; font-size: .9375rem; padding-block: 40px 24px; }
.k-footer a { color: #f3f1ec; }
.k-footer__grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.k-footer h2 { font-size: 1rem; color: #fff; margin-bottom: .6em; }
.k-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.k-footer__demo { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .8125rem; color: #bdb9b0; }

/* Emplacements photo avec repli illustré */
.k-photo { margin: 0; position: relative; border-radius: var(--k-radius); overflow: hidden; background: var(--k-surface); aspect-ratio: 4 / 3; }
.k-photo > svg, .k-photo > img { width: 100%; height: 100%; object-fit: cover; }
.k-photo figcaption { position: absolute; left: 10px; bottom: 10px; background: rgba(21, 24, 26, .92); color: #fff; font-size: .8125rem; padding: 4px 10px; border-radius: 999px; }

/* Apparition sobre (opacité + déplacement), désactivée si l'utilisateur réduit les animations */
.k-reveal { opacity: 1; transform: none; }
.js-motion .k-reveal:not(.is-in) { opacity: 0; transform: translateY(14px); }
.js-motion .k-reveal { transition: opacity .5s var(--k-ease), transform .5s var(--k-ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .js-motion .k-reveal:not(.is-in) { opacity: 1; transform: none; }
}

/* Très petits écrans : logo, nom et téléphone tiennent sur une ligne */
@media (max-width: 360px) {
  .k-header__in { gap: 8px; }
  .k-brand { font-size: 1.0625rem; gap: 8px; }
  .k-brand img, .k-brand svg { width: 28px; height: 28px; }
  .k-header__tel { font-size: .875rem; }
}

/* ---- Ajout lot 2 : pare-brise vectoriel (k-ws-*). Couleurs réglables par démo. ---- */
.k-ws { display: block; width: 100%; height: auto; touch-action: manipulation; cursor: crosshair; }
.k-ws-verre-a { stop-color: var(--k-ws-verre-a, #d9f1f7); }
.k-ws-verre-b { stop-color: var(--k-ws-verre-b, #a9d8e6); }
.k-ws-glass { stroke: none; }
.k-ws-reflet { fill: #fff; opacity: .28; pointer-events: none; }
.k-ws-bord { stroke: var(--k-ws-bord, rgba(16, 33, 58, .16)); pointer-events: none; }
.k-ws-cadre { stroke: var(--k-ws-cadre, #10213a); stroke-width: 1.6; stroke-linejoin: round; pointer-events: none; }
.k-ws-vision { fill: var(--k-ws-vision, rgba(245, 197, 24, .16)); stroke: var(--k-ws-vision-trait, #a07800); stroke-width: .5; stroke-dasharray: 2 1.5; pointer-events: none; }
.k-ws-legende { font: 600 3.2px/1 var(--k-font-body); fill: var(--k-ws-legende, #5c4600); pointer-events: none; }
.k-ws-impact { pointer-events: none; }
.k-ws-repere { fill: none; stroke: var(--k-ws-repere, #10213a); stroke-width: .5; stroke-dasharray: 1 .8; }
.k-ws-point { fill: var(--k-ws-repere, #10213a); }
.k-ws-fissure path, .k-ws-eclat { fill: none; stroke: var(--k-ws-fissure, #10213a); stroke-width: .6; stroke-linecap: round; stroke-dasharray: 1; }
.k-ws-fissure.is-repare { opacity: .18; }
.k-ws-resine { fill: var(--k-ws-resine, rgba(57, 198, 224, .55)); stroke: var(--k-ws-resine-trait, #0a6e86); stroke-width: .35; opacity: 0; transform-box: fill-box; transform-origin: center; }
.k-ws-resine.is-visible { opacity: 1; }
.k-ws-grid { display: grid; grid-template-columns: repeat(var(--k-ws-cols, 5), minmax(0, 1fr)); gap: 6px; }
.k-ws-cell span { padding: 8px 6px; font-size: .8125rem; line-height: 1.25; text-align: center; min-height: 100%; }
@media (max-width: 560px) {
  .k-ws-grid { grid-template-columns: repeat(var(--k-ws-rows, 3), minmax(0, 1fr)); grid-template-rows: repeat(var(--k-ws-cols, 5), auto); grid-auto-flow: column; }
  .k-ws-cell span { font-size: .8125rem; padding: 7px 4px; }
}

/* ---- Ajout lot 3 : avant/après (k-ba-*), silhouettes (k-sil-*), vignettes locales (k-thumb-*) ---- */
.k-ba { margin: 0; }
.k-ba-scene { position: relative; border-radius: var(--k-radius); overflow: hidden; background: var(--k-ba-fond, #ecebe6); aspect-ratio: 400 / 220; }
.k-ba-svg { display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: ew-resize; }
.k-ba-laque-a { stop-color: var(--k-ba-laque-a, #d8443c); }
.k-ba-laque-b { stop-color: var(--k-ba-laque-b, #a51f1a); }
.k-ba-laque-c { stop-color: var(--k-ba-laque-c, #6f1411); }
.k-ba-tole { stroke: var(--k-ba-trait, #23262b); stroke-width: 1.5; }
.k-ba-nervure { fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: 2; }
.k-ba-brillance { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 5; stroke-linecap: round; }
.k-ba-poignee { fill: rgba(0, 0, 0, .35); stroke: rgba(255, 255, 255, .4); }
.k-ba-rayures path { stroke: rgba(255, 255, 255, .85); stroke-width: 1.3; stroke-linecap: round; fill: none; }
.k-ba-enfonce ellipse { fill: rgba(0, 0, 0, .32); }
.k-ba-enfonce .k-ba-enfonce-reflet { fill: rgba(255, 255, 255, .28); }
.k-ba-ternie rect { fill: rgba(205, 200, 190, .55); }
.k-ba-ternie path { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 8; stroke-linecap: round; }
.k-ba-trait { stroke: var(--k-ba-repere, #fff); stroke-width: 2; }
.k-ba-cote { font: 500 9px/1 var(--k-font-num); fill: var(--k-ba-repere, #fff); }
.k-ba-balayage { pointer-events: none; }
.k-ba-label { display: block; font-size: .875rem; color: var(--k-muted); margin: 12px 0 4px; }
.k-ba-range { width: 100%; accent-color: var(--k-accent2); min-height: 32px; }
.k-ba-texte { margin: 6px 0 0; font-size: .9375rem; }
.k-sil { display: block; width: 100%; height: auto; }
.k-sil-corps { fill: var(--k-sil-fond, #f3f2ee); stroke: var(--k-sil-trait, #23262b); stroke-width: 1.4; }
.k-sil-zone, .k-sil-zone ellipse { fill: var(--k-sil-zone, #ffffff); stroke: var(--k-sil-trait, #23262b); stroke-width: .8; cursor: pointer; }
.k-sil-zone.is-touchee, .k-sil-zone.is-touchee ellipse { fill: var(--k-sil-touche, rgba(165, 31, 26, .28)); }
.k-sil-zone.is-courante, .k-sil-zone.is-courante ellipse { stroke: var(--k-sil-courante, #a51f1a); stroke-width: 2.2; }
.k-sil-cotes line { stroke: var(--k-sil-cote, #8a8d93); stroke-width: .6; stroke-dasharray: 2 2; }
.k-sil-grille { display: grid; grid-template-columns: repeat(var(--k-sil-cols, 3), minmax(0, 1fr)); gap: 6px; }
.k-sil-case span { padding: 8px 6px; font-size: .8125rem; line-height: 1.25; text-align: center; min-height: 100%; }
.k-thumb-liste { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.k-thumb { position: relative; border: 1px solid var(--k-line); border-radius: var(--k-radius-s); overflow: hidden; background: var(--k-surface); }
.k-thumb img, .k-thumb-repli { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.k-thumb-repli { display: grid; place-items: center; padding: 8px; font: 500 .75rem/1.3 var(--k-font-num); text-align: center; word-break: break-all; }
.k-thumb-retirer { width: 100%; min-height: 40px; border: 0; border-top: 1px solid var(--k-line); background: var(--k-paper); color: var(--k-ink); font: inherit; font-size: .875rem; cursor: pointer; }
.k-thumb-retirer:hover { background: var(--k-surface); }

/* ---- Ajout lot 4 : silhouettes de profil (k-sp-*), jauge (k-jauge-*), comparateur (k-cmp-*) ---- */
.k-sp { display: block; width: 100%; height: auto; aspect-ratio: 400 / 160; color: var(--k-sp-trait, currentColor); }
.k-sp-scene { position: relative; display: grid; place-items: center; padding: 6% 6% 3%; background: var(--k-sp-fond, var(--k-surface)); }
.k-sp-scene::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 70% at 50% 0%, var(--k-sp-halo, rgba(255, 255, 255, .08)), transparent 70%); }
.k-sp-scene > * { position: relative; }

.k-jauge { position: relative; width: min(100%, var(--k-jauge-taille, 200px)); margin-inline: auto; }
.k-jauge svg { width: 100%; height: auto; aspect-ratio: 1; transform: rotate(135deg); }
.k-jauge-fond, .k-jauge-arc { fill: none; stroke-width: 12; stroke-linecap: round; }
.k-jauge-fond { stroke: var(--k-jauge-fond, var(--k-line)); }
.k-jauge-arc { stroke: var(--k-jauge-arc, var(--k-accent)); transition: stroke-dasharray .32s var(--k-ease); }
.k-jauge.is-vide .k-jauge-arc { opacity: 0; }
.k-jauge-centre { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; margin: 0; }
.k-jauge-valeur { font: 700 clamp(1.5rem, 6vw, 2rem)/1.1 var(--k-font-num); font-variant-numeric: tabular-nums; }
.k-jauge-centre small { display: block; color: var(--k-muted); font-size: .8125rem; }
.k-jauge-echelle { margin: 4px 0 0; text-align: center; font-size: .8125rem; color: var(--k-muted); }
@media (prefers-reduced-motion: reduce) { .k-jauge-arc { transition: none; } }

.k-cmp-case { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.k-cmp-case input { width: 20px; height: 20px; margin: 0; accent-color: var(--k-accent); }
.k-cmp-barre { position: sticky; bottom: calc(var(--k-demobar-h) + 8px); z-index: 20; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 16px; padding: 10px 14px; border: 1px solid var(--k-line); border-radius: var(--k-radius); background: var(--k-paper); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
body.k-demobar-closed .k-cmp-barre { bottom: 8px; }
.k-cmp-statut { flex: 1 1 200px; margin: 0; font-size: .875rem; color: var(--k-muted); }
.k-cmp-defile { overflow-x: auto; margin: 12px 0; }
.k-cmp-table { width: 100%; min-width: 480px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.k-cmp-table caption { text-align: left; font-weight: 700; padding-bottom: 8px; }
.k-cmp-table th, .k-cmp-table td { padding: 10px 12px; border-bottom: 1px solid var(--k-line); text-align: left; vertical-align: top; }
.k-cmp-table thead th { font-family: var(--k-font-title); }
.k-cmp-table tbody th { font-weight: 500; color: var(--k-muted); width: 32%; }
