/* Borne chauffeur — très gros, très simple : une question à la fois, des images, des couleurs franches.
   Chargé après app.css, uniquement sur les pages de la borne. */
.kiosk {
  --k-green: #1f8a4c;
  --k-green-dark: #166b3a;
  --k-green-soft: #e3f4e9;
  --k-blue: #2459b3;
  --k-blue-dark: #1b4589;
  --k-blue-soft: #e6eefb;
  --k-red: #c62f2f;
  --k-red-soft: #fdeaea;
  --k-amber: #b86e00;
  --k-amber-soft: #fff3df;
  --k-ink: #172026;
  --k-muted: #5d6973;
  --k-line: #d9e1e6;
  --k-bg: #eef3f0;
  --k-radius: 22px;
  --k-shadow: 0 2px 4px rgba(20, 40, 30, .06), 0 10px 28px rgba(20, 40, 30, .08);
  background: var(--k-bg);
  color: var(--k-ink);
  font-size: 20px;
  line-height: 1.4;
}
.kiosk .ico { width: 1em; height: 1em; flex: none; vertical-align: -.15em; }

/* ---------- barre du haut ---------- */
.kiosk-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--k-line); }
.kiosk-top img { height: 52px; }
.kiosk-top .actions { display: flex; align-items: center; gap: 10px; }
.k-who { display: inline-flex; align-items: center; gap: 8px; background: var(--k-green-soft); color: var(--k-green-dark); border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: .85rem; }
.k-quit { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px; border-radius: 14px; border: 2px solid #efc2c2; background: #fff; color: var(--k-red); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
.k-quit:active { background: var(--k-red-soft); }
.k-staff { color: var(--k-muted); font-size: .8rem; padding: 10px; }

.kiosk-main { max-width: 900px; margin: 0 auto; padding: 22px 18px 120px; }

/* ---------- titres et blocs ---------- */
.k-hello { text-align: center; margin: 18px 0 24px; }
.k-hello h1 { font-size: 2.1rem; margin: 0 0 6px; }
.k-hello p { color: var(--k-muted); margin: 0; font-size: 1.05rem; }
.k-panel { background: #fff; border: 0; border-radius: var(--k-radius); box-shadow: var(--k-shadow); padding: 28px; margin: 0 0 18px; min-width: 0; }
.k-q { display: flex; align-items: center; gap: 14px; font-size: 1.6rem; margin: 0 0 22px; }
.k-q .k-bubble { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--k-green-soft); color: var(--k-green); }
.k-q .k-bubble .ico { width: 32px; height: 32px; }

/* ---------- champs ---------- */
.k-field { margin: 0 0 22px; }
.k-field > label { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; margin: 0 0 10px; color: var(--k-ink); }
.k-field > label .ico { width: 28px; height: 28px; color: var(--k-green); }
.k-field > label .k-opt { font-weight: 500; color: var(--k-muted); font-size: .85rem; }
.kiosk .k-field input, .kiosk .k-field select { width: 100%; min-height: 72px; padding: 12px 20px; font: inherit; font-size: 1.45rem; font-weight: 600; color: var(--k-ink); background: #f7faf8; border: 3px solid var(--k-line); border-radius: 16px; }
.kiosk .k-field input::placeholder, .kiosk .k-door .code-input::placeholder { color: #c3ccd1; opacity: 1; }
.kiosk .k-field input:focus, .kiosk .k-field select:focus { outline: none; border-color: var(--k-green); background: #fff; box-shadow: 0 0 0 5px rgba(31, 138, 76, .18); }
.kiosk .k-field input[readonly] { background: #eef2f0; color: var(--k-muted); }
.kiosk .k-field input:disabled { background: #eef2f0; }
.k-help { display: block; margin-top: 8px; color: var(--k-muted); font-size: .9rem; }
.k-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

/* Plaque façon plaque belge : bande bleue + lettres rouges. */
.k-plate { display: flex; align-items: stretch; border: 4px solid #2b2b2b; border-radius: 14px; overflow: hidden; background: #fff; max-width: 520px; }
.k-plate-eu { width: 58px; flex: none; background: #1a47a8; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 8px; font-weight: 800; font-size: 1.3rem; }
.k-plate-eu::before { content: "★"; color: #ffd200; font-size: .8rem; margin-bottom: auto; margin-top: 8px; letter-spacing: 2px; }
.kiosk .k-plate input { border: 0; border-radius: 0; background: #fff; min-height: 86px; color: #b3121a; font-family: var(--mono); font-size: 2.3rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.kiosk .k-plate input:focus { box-shadow: none; }
.kiosk .k-plate input::placeholder { color: #e9c3c5; }
.k-plate:focus-within { box-shadow: 0 0 0 6px rgba(31, 138, 76, .25); }

/* ---------- gros boutons ---------- */
.k-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 80px; padding: 0 34px; border-radius: 20px; border: 0; font: inherit; font-size: 1.4rem; font-weight: 800; cursor: pointer; text-decoration: none; color: #fff; background: var(--k-green); box-shadow: 0 6px 0 var(--k-green-dark); transition: transform .06s, box-shadow .06s; -webkit-tap-highlight-color: transparent; }
.k-btn:hover { text-decoration: none; color: #fff; }
.k-btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--k-green-dark); }
.k-btn .ico { width: 32px; height: 32px; }
.k-btn.blue { background: var(--k-blue); box-shadow: 0 6px 0 var(--k-blue-dark); }
.k-btn.blue:active { box-shadow: 0 1px 0 var(--k-blue-dark); }
.k-btn.back { background: #fff; color: var(--k-ink); border: 3px solid var(--k-line); box-shadow: 0 6px 0 #c9d3d9; }
.k-btn.back:active { box-shadow: 0 1px 0 #c9d3d9; }
.k-btn.small { min-height: 60px; font-size: 1.05rem; padding: 0 22px; }
.k-btn.wide { width: 100%; }
.k-btn[disabled] { opacity: .45; pointer-events: none; }
.k-nav { display: flex; gap: 16px; justify-content: space-between; margin-top: 10px; }
.k-nav .k-btn:only-child { margin-left: auto; }
.k-nav .k-btn:not(.back) { flex: 1; max-width: 480px; margin-left: auto; }

/* ---------- étapes ---------- */
.k-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 20px; padding: 0; counter-reset: k; }
.k-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--k-muted); font-size: .85rem; font-weight: 700; }
.k-steps li::after { content: ""; position: absolute; top: 30px; left: calc(50% + 36px); right: calc(-50% + 36px); height: 5px; border-radius: 9px; background: var(--k-line); }
.k-steps li:last-child::after { display: none; }
.k-steps .k-dot { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 4px solid var(--k-line); color: var(--k-muted); }
.k-steps .k-dot .ico { width: 30px; height: 30px; }
.k-steps li.on .k-dot { background: var(--k-green); border-color: var(--k-green); color: #fff; }
.k-steps li.on::after { background: var(--k-green); }
.k-steps li.now { color: var(--k-ink); }
.k-steps li.now .k-dot { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(31, 138, 76, .2); }
.k-steps li.now::after { background: var(--k-line); }

/* ---------- messages ---------- */
.kiosk .alert { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: 18px; font-size: 1.15rem; font-weight: 700; margin: 0 0 18px; border: 0; }
.kiosk .alert::before { content: "!"; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.3rem; }
.kiosk .alert.error { background: var(--k-red-soft); color: #8e1d1d; }
.kiosk .alert.error::before { background: var(--k-red); color: #fff; }
.kiosk .alert.info { background: var(--k-blue-soft); color: var(--k-blue-dark); }
.kiosk .alert.info::before { content: "i"; background: var(--k-blue); color: #fff; }
.kiosk .alert.warning { background: var(--k-amber-soft); color: #7a4800; }
.kiosk .alert.warning::before { background: var(--k-amber); color: #fff; }
.kiosk .alert.success { background: var(--k-green-soft); color: var(--k-green-dark); }
.kiosk .alert.success::before { content: "✓"; background: var(--k-green); color: #fff; }
.kiosk .alert[hidden] { display: none; }

/* ---------- code d'accès ---------- */
.k-door { max-width: 600px; margin: 10px auto; text-align: center; }
.k-door .k-lock { width: 110px; height: 110px; margin: 0 auto 16px; border-radius: 32px; display: grid; place-items: center; background: var(--k-green); color: #fff; box-shadow: var(--k-shadow); }
.k-door .k-lock .ico { width: 58px; height: 58px; }
.kiosk .k-door .code-input { width: 100%; min-height: 96px; text-align: center; font-family: var(--mono); font-size: 2.6rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; border: 4px solid var(--k-line); border-radius: 20px; background: #fff; }
.kiosk .k-door .code-input:focus { outline: none; border-color: var(--k-green); box-shadow: 0 0 0 6px rgba(31, 138, 76, .2); }
.k-door .k-btn { margin-top: 22px; }

/* ---------- grandes cartes de choix (site, dépôt / retrait) ---------- */
.k-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.k-choice { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 260px; padding: 28px 20px; border-radius: 28px; border: 0; cursor: pointer; font: inherit; color: #fff; text-align: center; box-shadow: 0 8px 0 rgba(0, 0, 0, .18), var(--k-shadow); transition: transform .06s, box-shadow .06s; -webkit-tap-highlight-color: transparent; }
.k-choice:active { transform: translateY(6px); box-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.k-choice .k-pic { position: relative; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .2); }
.k-choice .k-pic > .ico { width: 70px; height: 70px; }
.k-choice .k-badge { position: absolute; right: -6px; bottom: -6px; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #fff; }
.k-choice .k-badge .ico { width: 32px; height: 32px; }
.k-choice strong { font-size: 2rem; line-height: 1.1; }
.k-choice span.k-sub { font-size: 1.05rem; opacity: .92; }
.k-choice.depot { background: var(--k-blue); }
.k-choice.depot .k-badge { color: var(--k-blue); }
.k-choice.retrait { background: var(--k-green); }
.k-choice.retrait .k-badge { color: var(--k-green); }
.k-choice.site { background: #fff; color: var(--k-ink); min-height: 180px; border: 3px solid var(--k-line); box-shadow: 0 8px 0 #cfd8de, var(--k-shadow); }
.k-choice.site .k-pic { width: 84px; height: 84px; background: var(--k-green-soft); color: var(--k-green); }
.k-choice.site .k-pic > .ico { width: 46px; height: 46px; }
.k-choice.site strong { font-size: 1.7rem; }

/* ---------- camion reconnu ---------- */
.kiosk .vehicle-card { margin: 4px 0 22px; padding: 22px; border: 4px solid var(--k-blue); border-radius: 22px; background: var(--k-blue-soft); }
.kiosk .vehicle-card[hidden] { display: none; }
.kiosk .vehicle-card h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 1.35rem; margin: 0 0 12px; }
.kiosk .vehicle-card h3 .ico { width: 34px; height: 34px; color: var(--k-blue); }
.kiosk .vehicle-card .kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0 0 14px; font-size: 1.15rem; }
.kiosk .vehicle-card dt { color: var(--k-muted); }
.kiosk .vehicle-card dd { margin: 0; font-weight: 800; }
.kiosk .vehicle-card p { font-size: 1.3rem; margin: 6px 0 14px; }
.k-yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- entonnoir matière ---------- */
.kiosk .funnel-trail { display: inline-block; background: #f1f5f3; color: var(--k-muted); border-radius: 12px; padding: 8px 14px; font-size: .95rem; margin-bottom: 14px; }
.kiosk .funnel-question { font-size: 1.55rem; margin: 4px 0 18px; }
.kiosk .funnel-answers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 16px; }
.kiosk .funnel-answer { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; min-height: 110px; padding: 18px 22px 18px 74px; position: relative; text-align: left; white-space: normal; font: inherit; font-size: 1.3rem; font-weight: 800; color: var(--k-ink); background: #fff; border: 3px solid var(--k-line); border-radius: 20px; box-shadow: 0 6px 0 #cfd8de; cursor: pointer; transition: transform .06s, box-shadow .06s; }
.kiosk .funnel-answer::before { content: ""; position: absolute; left: 20px; top: 50%; width: 36px; height: 36px; margin-top: -18px; border-radius: 50%; border: 4px solid var(--k-green); background: #fff; }
.kiosk .funnel-answer:active { transform: translateY(5px); box-shadow: 0 1px 0 #cfd8de; border-color: var(--k-green); }
.kiosk .funnel-answer small { font-weight: 500; color: var(--k-muted); font-size: .95rem; }
.kiosk .funnel .btn.ghost { min-height: 60px; font-size: 1.05rem; border: 3px solid var(--k-line); background: #fff; border-radius: 16px; padding: 0 22px; color: var(--k-ink); }
.kiosk .funnel-result { display: grid; gap: 8px; justify-items: start; padding: 24px 24px 24px 100px; position: relative; border: 4px solid var(--k-green); border-radius: 22px; background: var(--k-green-soft); }
.kiosk .funnel-result::before { content: "✓"; position: absolute; left: 22px; top: 24px; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--k-green); color: #fff; font-size: 2rem; font-weight: 900; }
.kiosk .funnel-code { font-family: var(--mono); font-size: 2.8rem; font-weight: 900; line-height: 1; color: var(--k-green-dark); }
.kiosk .funnel-name { font-size: 1.35rem; font-weight: 700; }
.kiosk .funnel-result .funnel-trail { background: #fff; margin: 4px 0; }
.kiosk .funnel-result .btn { min-height: 56px; font-size: 1rem; border: 3px solid var(--k-line); border-radius: 14px; padding: 0 20px; background: #fff; }
.kiosk .k-field select { appearance: auto; }

/* ---------- pesée ---------- */
.k-scale { background: #13201a; color: #fff; border-radius: 24px; padding: 26px 22px; text-align: center; margin: 0 0 22px; }
.k-scale-label { margin: 0 0 4px; color: #c7d6cd; font-size: 1.2rem; font-weight: 800; }
.kiosk .weight-live { font-family: var(--mono); font-size: 4.2rem; font-weight: 800; line-height: 1.1; color: #7cf2a6; text-shadow: 0 0 18px rgba(124, 242, 166, .35); font-variant-numeric: tabular-nums; }
.kiosk .weight-state { color: #c7d6cd; font-size: 1.1rem; margin: 8px 0 18px; }
.k-scale .k-btn { min-width: 320px; }
.k-net { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-radius: 18px; background: var(--k-green-soft); color: var(--k-green-dark); font-size: 1.35rem; font-weight: 800; margin: 0 0 18px; }
.k-net:empty { display: none; }

/* ---------- vérification + signature ---------- */
.k-recap { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0 0 22px; }
.k-recap div { background: #f4f7f5; border-radius: 16px; padding: 14px 16px; }
.k-recap .wide { grid-column: 1 / -1; }
.k-recap dt { color: var(--k-muted); font-size: .85rem; font-weight: 700; }
.k-recap dd { margin: 2px 0 0; font-size: 1.25rem; font-weight: 800; word-break: break-word; }
.k-sign { position: relative; }
.kiosk canvas.signature { display: block; width: 100%; height: 280px; border: 4px dashed #9fb4a8; border-radius: 22px; background: #fff; touch-action: none; }
.k-sign-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; color: #9fb4a8; font-size: 1.6rem; font-weight: 800; pointer-events: none; }
.k-sign-hint .ico { width: 40px; height: 40px; }
.k-sign.signed .k-sign-hint { display: none; }
.k-sign-tools { display: flex; justify-content: flex-end; margin-top: 12px; }

/* ---------- fin ---------- */
.k-done { text-align: center; padding: 40px 24px; }
.k-done .k-tick { width: 150px; height: 150px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; background: var(--k-green); color: #fff; box-shadow: 0 0 0 16px var(--k-green-soft); animation: k-pop .45s cubic-bezier(.2, 1.6, .5, 1); }
.k-done .k-tick .ico { width: 90px; height: 90px; }
.k-done h1 { font-size: 2.4rem; margin: 0 0 12px; }
.k-done .k-ref { display: inline-block; font-family: var(--mono); font-size: 1.8rem; font-weight: 800; background: #f1f5f3; padding: 10px 22px; border-radius: 14px; margin: 6px 0 16px; }
.k-done p { font-size: 1.2rem; }
@keyframes k-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .k-done .k-tick { animation: none; } .k-btn, .k-choice, .kiosk .funnel-answer { transition: none; } }

/* ---------- espace bulliste ---------- */
.k-door .k-lock.blue { background: var(--k-blue); }
.k-btn.red { background: var(--k-red); box-shadow: 0 6px 0 #8f1f1f; }
.k-btn.red:active { box-shadow: 0 1px 0 #8f1f1f; }
.k-list { display: grid; gap: 14px; }
.k-item { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 18px; padding: 18px 20px; background: #fff; border-radius: 20px; box-shadow: var(--k-shadow); color: var(--k-ink); }
.k-item:hover { text-decoration: none; color: var(--k-ink); }
.k-item-op { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; color: #fff; }
.k-item-op .ico { width: 32px; height: 32px; }
.k-item-op.depot { background: var(--k-blue); }
.k-item-op.retrait { background: var(--k-green); }
.k-item-main { display: grid; gap: 2px; min-width: 0; }
.k-item-main strong { font-size: 1.4rem; }
.k-item-main small { color: var(--k-muted); }
.k-item-kg { font-size: 1.35rem; font-weight: 800; white-space: nowrap; }
.k-empty { text-align: center; color: var(--k-green-dark); }
.k-empty .ico { width: 64px; height: 64px; color: var(--k-green); }
.k-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 6px 0 18px; }
.k-head h1 { font-size: 1.8rem; margin: 0 0 4px; }
.k-head p { color: var(--k-muted); margin: 0; }
.kiosk .k-panel .field input, .kiosk .k-panel .field select, .kiosk .k-panel .field textarea { min-height: 58px; font-size: 1.15rem; border-radius: 12px; }
.kiosk .k-panel .field label { font-weight: 700; font-size: .95rem; }
.k-refuse { border: 3px solid #f0c5c5; }
.k-refuse h2 { color: var(--k-red); }

/* ---------- petits écrans ---------- */
@media (max-width: 700px) {
  .kiosk { font-size: 18px; }
  .kiosk-main { padding: 14px 12px 100px; }
  .k-panel { padding: 20px 16px; }
  .k-two, .k-yesno { grid-template-columns: 1fr; }
  .k-steps li { font-size: .72rem; }
  .k-steps .k-dot { width: 48px; height: 48px; }
  .k-steps li::after { top: 23px; left: calc(50% + 28px); right: calc(-50% + 28px); }
  .k-nav { flex-direction: column-reverse; }
  .k-nav .k-btn, .k-nav .k-btn:not(.back) { width: 100%; max-width: none; }
  .k-choice { min-height: 200px; }
  .k-scale-label { margin: 0 0 4px; color: #c7d6cd; font-size: 1.2rem; font-weight: 800; }
.kiosk .weight-live { font-size: 3rem; }
  .k-scale .k-btn { min-width: 0; width: 100%; }
  .k-who { display: none; }
  .k-item { grid-template-columns: auto 1fr; }
  .k-item-kg { grid-column: 2; }
  .k-item .k-btn { grid-column: 1 / -1; }
  .k-head { flex-direction: column; }
  .kiosk .k-plate input { font-size: 1.6rem; letter-spacing: .06em; min-height: 72px; padding: 8px 12px; }
  .k-plate-eu { width: 44px; }
  .kiosk .vehicle-card .kv { grid-template-columns: 1fr; gap: 0; }
  .kiosk .vehicle-card dd { margin-bottom: 8px; }
  .k-btn { font-size: 1.2rem; padding: 0 20px; }
}
/* Terres : document de transport (Walterre) */
.k-transport { border: 2px solid var(--k-line, #d6dbe1); border-radius: 14px; padding: 14px; }
.k-field > label.k-check { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; font-weight: 600; cursor: pointer; }
.k-or { margin: 16px 0 0; font-weight: 700; }
.k-field > label.k-sub { margin: 18px 0 8px; font-size: 1rem; }
.k-field label.k-check input[type=radio], .k-field label.k-check input[type=checkbox] { width: 30px; height: 30px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--k-green, #3d7a3c); }
