/* ==========================================================================
   kp-app.css — styles COMMUNS des applications KANÈ PAM (admin système, admin, responsable, caissier ; base de l'app client).
   Même méthode qu'Omnis : variables, aucun framework, aucune ressource externe. Couleurs mesurées sur le logo :
   bleu nuit #002B7B, bleu vif #0068E6, vert #2E9E3F (Plan 500), or #F5A623 ; violet #6B3FD4 (VIP).
   ========================================================================== */
:root {
  --nuit: #002B7B; --nuit-2: #0A3A96; --bleu: #0068E6; --bleu-2: #E8F1FF; --vert: #2E9E3F; --vert-2: #E5F5E8; --or: #F5A623; --or-2: #FFF4DB; --violet: #6B3FD4; --violet-2: #EFE9FC;
  --ink: #0E1A33; --mut: #5B6782; --line: #E2E7F0; --soft: #F1F4F9; --bg: #F5F7FB; --card: #fff;
  --ok: #16794A; --ok-bg: #DFF4E8; --warn: #8A5300; --warn-bg: #FFF1D6; --bad: #B42318; --bad-bg: #FDECEA; --info: #0B53B8; --info-bg: #E6EFFD;
  --r: 18px; --r-s: 12px; --ombre: 0 1px 2px rgba(14,26,51,.05), 0 8px 24px -10px rgba(14,26,51,.16);
  --side: 264px; --haut: 60px;
  --primaire: var(--nuit); --action: var(--bleu);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body { font: 15px/1.5 "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .d { font-family: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif; margin: 0; letter-spacing: -.02em; line-height: 1.15; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
p { margin: 0 0 .6em; } a { color: var(--action); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(0,104,230,.45); outline-offset: 2px; border-radius: 8px; }
.mut { color: var(--mut); } .petit { font-size: 13px; } .gras { font-weight: 700; } .nowrap { white-space: nowrap; } .droite { text-align: right; } .centre { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 20px; height: 20px; flex: none; vertical-align: middle; }
[hidden] { display: none !important; }

/* ── Cadre : barre du haut, menu latéral (ordinateur), onglets du bas (mobile) ── */
.kp-haut { position: sticky; top: 0; z-index: 30; height: var(--haut); display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--primaire); color: #fff; }
.kp-marque { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; min-width: 0; }
.kp-marque img { width: 36px; height: 36px; border-radius: 10px; background: #fff; padding: 3px; }
.kp-marque span { font-family: "Bricolage Grotesque", sans-serif; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-marque small { display: block; font: 500 11.5px "DM Sans", sans-serif; opacity: .75; letter-spacing: .02em; }
.kp-haut .esp { flex: 1; }
.kp-ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255,255,255,.1); color: #fff; text-decoration: none; position: relative; }
.kp-ico:hover { background: rgba(255,255,255,.18); }
.kp-badge-mode { white-space: nowrap; font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--or); color: #3D2500; letter-spacing: .03em; }
.kp-badge-mode.prod { background: #1FA35A; color: #fff; }
.kp-corps { display: flex; min-height: calc(100vh - var(--haut)); }
.kp-side { width: var(--side); flex: none; background: #fff; border-right: 1px solid var(--line); padding: 14px 10px 40px; position: sticky; top: var(--haut); height: calc(100vh - var(--haut)); overflow-y: auto; }
.kp-side .groupe { margin: 14px 10px 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); }
.kp-side a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 500; }
.kp-side a:hover { background: var(--soft); }
.kp-side a.actif { background: var(--bleu-2); color: var(--nuit); font-weight: 700; }
.kp-side a.actif svg { color: var(--bleu); }
.kp-side a .pastille { margin-left: auto; }
.kp-main { flex: 1; min-width: 0; padding: 24px clamp(16px, 3vw, 36px) 96px; max-width: 1280px; }
.kp-bas { display: none; }
@media (max-width: 899px) {
  .kp-side { display: none; }
  .kp-main { padding: 18px 14px 100px; }
  .kp-bas { display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .kp-bas a, .kp-bas button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; justify-content: center; border: 0; background: none; color: var(--mut); text-decoration: none; font-size: 11.5px; font-weight: 600; position: relative; border-radius: 12px; }
  .kp-bas .actif { color: var(--nuit); }
  .kp-bas .actif svg { color: var(--bleu); }
  .kp-bas .pastille { position: absolute; top: 4px; right: calc(50% - 22px); }
  .kp-marque small { display: none; }
  .kp-badge-mode { font-size: 0; padding: 0; width: 10px; height: 10px; }
  .kp-marque span { font-size: 15px; }
}

/* ── En-tête de vue ── */
.vue-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.vue-tete p { margin: 4px 0 0; color: var(--mut); max-width: 720px; }
.vue-tete .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Cartes, grilles, chiffres ── */
.carte { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--ombre); }
.carte + .carte { margin-top: 14px; }
.carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.grille { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grille-2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.chiffre { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--ombre); }
.chiffre .lib { color: var(--mut); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.chiffre .val { font: 700 24px "Bricolage Grotesque", sans-serif; margin-top: 6px; letter-spacing: -.02em; }
.chiffre .lib svg { color: var(--bleu); }
.liste-cles { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.liste-cles dt { color: var(--mut); } .liste-cles dd { margin: 0; font-weight: 600; word-break: break-word; }

/* ── Boutons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-p { background: var(--action); border-color: var(--action); color: #fff; } .btn-p:hover { background: #0057C2; }
.btn-n { background: var(--nuit); border-color: var(--nuit); color: #fff; } .btn-n:hover { background: var(--nuit-2); }
.btn-v { background: var(--vert); border-color: var(--vert); color: #fff; } .btn-v:hover { background: #27873A; }
.btn-d { color: var(--bad); border-color: #F3C4BF; } .btn-d:hover { background: var(--bad-bg); }
.btn-s { min-height: 34px; padding: 0 11px; border-radius: 10px; font-size: 13.5px; }
.btn-l { width: 100%; }
.lien { background: none; border: 0; padding: 0; color: var(--action); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ── Pastilles d'état ── */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--soft); color: var(--mut); white-space: nowrap; }
.pill--ok { background: var(--ok-bg); color: var(--ok); } .pill--warn { background: var(--warn-bg); color: var(--warn); } .pill--bad { background: var(--bad-bg); color: var(--bad); } .pill--info { background: var(--info-bg); color: var(--info); }
.pastille { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }

/* ── Tableaux (cartes empilées sur mobile) ── */
.tableau { width: 100%; border-collapse: collapse; }
.tableau th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tableau td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau tbody tr:hover { background: #FAFBFE; }
.tab-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 759px) {
  .tableau thead { display: none; }
  .tableau tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .tableau td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
  .tableau td::before { content: attr(data-lib); color: var(--mut); font-size: 13px; }
  .tableau td.tab-actions { justify-content: flex-start; padding-top: 8px; }
  .tableau td.tab-actions::before { content: none; }
}

/* ── Formulaires ── */
.champ { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.champ label, .champ .lib { font-weight: 600; font-size: 14px; }
.champ .aide { color: var(--mut); font-size: 13px; }
.entree, .champ input:not([type=checkbox]):not([type=radio]):not([type=file]), .champ select, .champ textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
.champ textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.entree:focus, .champ input:focus, .champ select:focus, .champ textarea:focus { border-color: var(--action); box-shadow: 0 0 0 4px rgba(0,104,230,.12); }
.form-grille { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.interrupteur { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.interrupteur input { appearance: none; width: 46px; height: 26px; border-radius: 999px; background: #CBD3E1; position: relative; transition: background .15s; flex: none; margin: 0; cursor: pointer; }
.interrupteur input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.interrupteur input:checked { background: var(--vert); }
.interrupteur input:checked::after { transform: translateX(20px); }
.interrupteur input:disabled { opacity: .5; cursor: not-allowed; }
.onglets { display: flex; gap: 4px; padding: 4px; background: var(--soft); border-radius: 14px; overflow-x: auto; margin-bottom: 14px; }
.onglets button { border: 0; background: none; padding: 8px 14px; border-radius: 10px; font-weight: 600; color: var(--mut); white-space: nowrap; }
.onglets button.actif { background: #fff; color: var(--nuit); box-shadow: 0 1px 3px rgba(14,26,51,.12); }
.recherche { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.recherche .entree { flex: 1; min-width: 200px; }

/* ── Messages ── */
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--info-bg); color: #0B3B82; font-size: 14px; margin-bottom: 14px; }
.note svg { flex: none; margin-top: 1px; }
.note--warn { background: var(--warn-bg); color: #6B4100; } .note--bad { background: var(--bad-bg); color: #8A1C12; } .note--ok { background: var(--ok-bg); color: #0F5A36; }
.vide { text-align: center; padding: 40px 16px; color: var(--mut); }
.vide svg { width: 40px; height: 40px; color: #B7C2D6; margin-bottom: 8px; }
.chargement { display: grid; gap: 12px; }
.chargement div { height: 64px; border-radius: 14px; background: linear-gradient(90deg, #EEF1F6 25%, #F7F9FC 50%, #EEF1F6 75%); background-size: 200% 100%; animation: kp-chg 1.2s infinite; }
@keyframes kp-chg { to { background-position: -200% 0; } }

/* ── Fenêtres : <dialog class="feuille"> (Bottom Sheet sur mobile, fenêtre centrée sur ordinateur — RM-063) ── */
dialog.feuille { border: 0; padding: 0; border-radius: 22px; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: #fff; color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0,20,60,.45); overflow: hidden; }
dialog.feuille::backdrop { background: rgba(5,16,40,.5); }
dialog.feuille[open] { display: flex; flex-direction: column; animation: kp-ouvrir .2s cubic-bezier(.2,.8,.2,1); }
dialog.feuille.large { width: min(920px, calc(100vw - 32px)); }
.feuille-tete { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.feuille-tete h2 { font-size: 18px; flex: 1; }
.feuille-poignee { display: none; }
.feuille-corps { padding: 18px; overflow-y: auto; overscroll-behavior: contain; }
.feuille-pied { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; flex-wrap: wrap; }
.fermer { width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--soft); display: grid; place-items: center; }
@keyframes kp-ouvrir { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes kp-monter { from { transform: translateY(100%); } to { transform: none; } }
@media (max-width: 759px) {
  dialog.feuille, dialog.feuille.large { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 92vh; }
  dialog.feuille[open] { animation-name: kp-monter; }
  .feuille-poignee { display: block; width: 44px; height: 5px; border-radius: 99px; background: #D5DBE6; margin: 8px auto 0; touch-action: none; }
  .feuille-pied .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { dialog.feuille[open] { animation: none; } }

/* ── Divers ── */
.code-grille { display: flex; gap: 8px; justify-content: center; }
.code-grille input { width: 46px; height: 56px; text-align: center; font: 700 24px "Bricolage Grotesque", sans-serif; border: 1.5px solid var(--line); border-radius: 12px; }
.code-grille input:focus { border-color: var(--action); outline: none; box-shadow: 0 0 0 4px rgba(0,104,230,.12); }
.vignette { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; background: var(--soft); display: block; }
.puce-couleur { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; }
.pre { white-space: pre-wrap; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--soft); border-radius: 12px; padding: 12px; max-height: 260px; overflow: auto; }
.separateur { height: 1px; background: var(--line); margin: 16px 0; }
.toast-zone { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-weight: 600; animation: kp-ouvrir .2s; max-width: 90vw; }
.toast--bad { background: var(--bad); }
@media (max-width: 899px) { .toast-zone { bottom: 92px; } }

#kpMain:focus, #kpMain:focus-visible { outline: none; }

/* ── Guichet et pilotage (lot 3) ───────────────────────────────────────── */
.chiffre--ok .val { color: #1F7A2E; } .chiffre--bad .val { color: #B42318; }
a.chiffre:hover { border-color: var(--bleu); }
.jauge { height: 14px; border-radius: 99px; background: var(--soft, #EEF2F8); overflow: hidden; }
.jauge > div { height: 100%; border-radius: 99px; transition: width .4s; }
.jauge--fine { height: 6px; margin-bottom: 4px; }
.graph { width: 100%; height: auto; color: var(--mut); }
.graph-txt { font-size: 11px; fill: currentColor; }
.graph-legende { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--mut); margin-top: 6px; }
.graph-legende i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.doc-legal { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px; max-height: 55vh; overflow: auto; font-size: 14px; }
.doc-legal h3 { margin: 0 0 4px; }
.doc-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 36px; }
.doc-signatures > div { border-top: 1px solid #333; padding-top: 6px; font-size: 13px; }
.zone-impression { display: none; }
.nowrap { white-space: nowrap; }
@media print {
  body > *:not(.zone-impression) { display: none !important; }
  .zone-impression { display: block !important; }
  .zone-impression .doc-legal { border: 0; max-height: none; overflow: visible; padding: 0; font-size: 12pt; }
}
@media (max-width: 560px) {
  .grille:not([style*="grid-template-columns"]) { grid-template-columns: 1fr 1fr; gap: 10px; }
  .chiffre { padding: 12px; } .chiffre .val { font-size: 18px; } .chiffre .lib { font-size: 12px; }
}

/* ── Aide « ? », visite guidée, mode aide, bandeau temps réel (lot 4, repris d'Omnis) ── */
.kp-aide-bouton { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border: 0; border-radius: 99px;
  background: var(--nuit); color: #fff; font: 600 13px "DM Sans", system-ui, sans-serif; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.2); opacity: .94; }
.kp-aide-bouton:hover { opacity: 1; } .kp-aide-bouton b { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: var(--nuit); font-size: 12px; }
.kp-aide-bouton:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
@media (max-width: 900px) { .kp-aide-bouton { bottom: calc(84px + env(safe-area-inset-bottom)); right: 12px; padding: 8px; } .kp-aide-bouton span { display: none; } }
.kp-aide-fond { position: fixed; inset: 0; z-index: 900; background: rgba(6,16,40,.38); }
.kp-aide-pan { position: fixed; z-index: 901; top: 0; right: 0; bottom: 0; width: min(430px, 100%); background: #fff; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(6,16,40,.25); }
@media (max-width: 640px) { .kp-aide-pan { top: auto; height: 88vh; width: 100%; border-radius: 20px 20px 0 0; } }
.kp-aide-tete { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.kp-aide-tete h2 { font-size: 19px; } .kp-aide-tete .fermer { border: 0; background: var(--soft); border-radius: 10px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; }
.kp-aide-corps { flex: 1; overflow: auto; padding: 14px 18px 22px; display: grid; gap: 14px; align-content: start; }
.kp-aide-ecran { background: var(--bleu-2); border-radius: 14px; padding: 12px 14px; }
.kp-aide-ecran small, .kp-aide-rep small { display: block; color: var(--bleu); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .05em; margin-bottom: 4px; }
.kp-aide-ecran ul { margin: 6px 0 0; padding-left: 18px; } .kp-aide-ecran li { margin: 2px 0; }
.kp-aide-q { display: flex; gap: 8px; align-items: flex-end; } .kp-aide-q textarea { flex: 1; resize: none; min-height: 46px; }
.kp-aide-fil { display: grid; gap: 10px; }
.kp-aide-moi { justify-self: end; background: var(--nuit); color: #fff; border-radius: 14px 14px 4px 14px; padding: 9px 12px; max-width: 85%; }
.kp-aide-rep { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; }
.kp-aide-texte { white-space: pre-line; }
.kp-aide-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); margin: 4px 0 8px; }
.kp-aide-faq details { border-bottom: 1px solid var(--line); padding: 9px 0; } .kp-aide-faq summary { cursor: pointer; font-weight: 600; } .kp-aide-faq p { margin: 6px 0 0; color: var(--mut); }
.kp-aide-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kp-aide-dem-liste { display: grid; gap: 8px; } .kp-aide-dem { border-left: 3px solid var(--or); background: var(--or-2); border-radius: 0 10px 10px 0; padding: 8px 10px; } .kp-aide-dem.ok { border-color: var(--vert); background: var(--vert-2); }
.kp-visite-trou { position: fixed; z-index: 1000; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(6,16,40,.62); transition: all .25s ease; pointer-events: none; }
.kp-visite { position: fixed; z-index: 1001; background: #fff; border-radius: 16px; padding: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.kp-visite b { display: block; font: 700 17px "Bricolage Grotesque", system-ui, sans-serif; margin-bottom: 4px; } .kp-visite-pas { color: var(--mut); font-size: 12px; }
.kp-mode-bandeau { position: fixed; left: 50%; transform: translateX(-50%); top: 10px; z-index: 950; background: var(--or); color: var(--ink); border-radius: 999px; padding: 6px 6px 6px 16px; display: flex; gap: 10px; align-items: center; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: calc(100vw - 24px); }
body.kp-mode-aide a[href^="#/"] { outline: 2px dashed var(--or); outline-offset: 2px; cursor: help; }
.kp-mode-bulle { position: fixed; z-index: 951; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 12px; max-width: 288px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.kp-bandeau { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 940; width: min(560px, calc(100vw - 24px)); background: #fff; border: 1px solid var(--line);
  border-left: 5px solid var(--bleu); border-radius: 14px; padding: 12px; display: flex; gap: 12px; align-items: center; box-shadow: 0 14px 40px rgba(6,16,40,.22); animation: kp-bandeau .25s ease-out; }
.kp-bandeau-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--bleu-2); color: var(--bleu); flex: none; }
.kp-bandeau-mid { flex: 1; min-width: 0; display: grid; } .kp-bandeau-mid small { color: var(--mut); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kp-bandeau-act { display: flex; gap: 6px; align-items: center; } .kp-bandeau-x { border: 0; background: transparent; cursor: pointer; color: var(--mut); width: 30px; height: 30px; display: grid; place-items: center; }
@keyframes kp-bandeau { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .kp-bandeau { animation: none; } .kp-visite-trou { transition: none; } }
@media print { .kp-aide-bouton, .kp-bandeau, .kp-mode-bandeau { display: none !important; } }

/* ── Dépôt par somme reçue, monnaie à rendre, reçu 80 mm (lot 5) ─────────── */
.entree-somme { font: 700 28px "Bricolage Grotesque", system-ui, sans-serif; text-align: center; padding: 14px; }
.somme-rapide { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.depot-resultat { display: grid; gap: 6px; margin-bottom: 12px; }
.depot-ligne { display: flex; justify-content: space-between; gap: 10px; padding: 6px 2px; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.depot-monnaie { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; background: var(--soft); border-radius: 12px; padding: 12px 14px; font-variant-numeric: tabular-nums; }
.depot-monnaie b { font: 800 22px "Bricolage Grotesque", system-ui, sans-serif; }
.depot-monnaie.a-rendre { background: var(--or-2); border: 2px solid var(--or); }
.depot-monnaie.grand { flex-direction: column; align-items: center; text-align: center; margin-bottom: 12px; }
.depot-monnaie.grand b { font-size: 38px; } .depot-monnaie small { width: 100%; text-align: center; font-weight: 600; }
.ticket { width: 100%; max-width: 320px; margin: 0 auto; background: #fff; border: 1px dashed #B8C2D6; border-radius: 8px; padding: 14px; font: 13px/1.45 "DM Sans", system-ui, sans-serif; color: #111; font-variant-numeric: tabular-nums; }
.tk-tete { display: grid; text-align: center; margin-bottom: 8px; } .tk-tete b { font: 800 18px "Bricolage Grotesque", sans-serif; letter-spacing: .04em; }
.tk-l { display: flex; justify-content: space-between; gap: 8px; } .tk-l span:last-child { text-align: right; } .tk-fort { font-weight: 800; font-size: 15px; }
.ticket hr { border: 0; border-top: 1px dashed #999; margin: 8px 0; } .tk-pied { text-align: center; font-size: 11px; color: #555; }
@media print { .zone-impression .ticket { border: 0; max-width: 72mm; padding: 0; font-size: 11pt; } @page { margin: 4mm; } }
.billets { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.billet { display: flex; align-items: center; gap: 6px; } .billet span { min-width: 46px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; } .billet span::after { content: " ×"; color: var(--mut); font-weight: 400; }
.billet .entree { padding: 8px; text-align: center; }

/* Case à cocher sur une ligne (ex. garder la monnaie en crédit) */
.case-a-cocher { display: flex; gap: 10px; align-items: flex-start; padding: 12px; margin-top: 10px; border: 1px solid var(--bord, #dfe3ea); border-radius: 12px; cursor: pointer; min-height: 44px; }
.case-a-cocher input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--p, #0b5); }
.case-a-cocher[hidden] { display: none; }
.journal-brut { white-space: pre-wrap; word-break: break-word; font-size: 12px; max-height: 320px; overflow: auto; background: var(--fond, #f4f6fa); padding: 12px; border-radius: 10px; margin: 0; }
.etapes-liste { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 8px; }
.etapes-liste code { word-break: break-all; }

/* Registre hors ligne du guichet */
.file-hors-ligne { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: calc(100% - 32px);
  padding: 10px 14px; border-radius: 14px; background: #3d2b00; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-weight: 600; font-size: 14px; }
.file-hors-ligne .btn { min-height: 36px; }
.file-hors-ligne svg { width: 20px; height: 20px; }
