/* Easy Shop — interface de caisse (tactile) et d'administration. Couleur de la marque : orange et blanc. */
:root {
  --brand: #ef7d00;
  --brand-dark: #c05f00;
  --brand-soft: #fff1e0;
  --ink: #1f2328;
  --muted: #6b7280;
  --line: #e3e5e8;
  --bg: #f6f7f8;
  --card: #ffffff;
  --ok: #1a7f37;
  --ok-soft: #e6f4ea;
  --bad: #c62828;
  --bad-soft: #fdecec;
  --warn: #9a6700;
  --warn-soft: #fff6d6;
  --r: 10px;
  --tap: 52px;
  font-family:
    'Segoe UI',
    system-ui,
    -apple-system,
    Roboto,
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
}
body {
  font-size: 15px;
  line-height: 1.4;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: var(--brand-dark);
}
h1 {
  font-size: 22px;
  margin: 0 0 14px;
}
h2 {
  font-size: 18px;
  margin: 18px 0 10px;
}
h3 {
  font-size: 15px;
  margin: 14px 0 8px;
}
.muted {
  color: var(--muted);
}
.r {
  text-align: right;
}
.c {
  text-align: center;
}
.nowrap {
  white-space: nowrap;
}
.b {
  font-weight: 600;
}
.neg {
  color: var(--bad);
}
.pos {
  color: var(--ok);
}
.hidden {
  display: none !important;
}

/* boutons et champs */
.btn {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
}
.btn:hover {
  border-color: #c9ccd1;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn.p {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn.p:hover {
  background: var(--brand-dark);
}
.btn.ok {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.btn.bad {
  background: #fff;
  border-color: var(--bad);
  color: var(--bad);
}
.btn.sm {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 13px;
}
.btn.big {
  min-height: var(--tap);
  font-size: 17px;
  padding: 10px 20px;
}
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.tile:focus-visible {
  outline: 3px solid #1d6fd8;
  outline-offset: 1px;
}
input,
select,
textarea {
  border: 1px solid #cfd3d8;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  min-height: 40px;
  width: 100%;
}
textarea {
  min-height: 70px;
}
label.f {
  display: block;
  margin-bottom: 10px;
}
label.f > span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 3px;
}
label.chk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 14px 4px 0;
}
label.chk input {
  width: auto;
  min-height: 0;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.row > input:not([type='checkbox']),
.row > select {
  width: auto;
  flex: 1 1 160px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 14px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 14px;
}
.card > h2:first-child,
.card > h1:first-child {
  margin-top: 0;
}
.note {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--warn-soft);
  color: #5c4400;
  margin: 8px 0;
}
.note.info {
  background: #eef4ff;
  color: #1b3d73;
}
.note.bad {
  background: var(--bad-soft);
  color: #7d1515;
}
.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: #eceef1;
}
.badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.badge.bad {
  background: var(--bad-soft);
  color: var(--bad);
}
.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.badge.brand {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

/* tableaux */
table.t {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
table.t th,
table.t td {
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
table.t th {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
  background: #fafbfc;
  position: sticky;
  top: 0;
}
table.t tr.click {
  cursor: pointer;
}
table.t tr.click:hover td {
  background: #fff8ef;
}
table.t td.r,
table.t th.r {
  text-align: right;
}
.scroll {
  overflow: auto;
  max-height: 70vh;
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* écran de connexion */
.login {
  max-width: 380px;
  margin: 9vh auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.5px;
  color: var(--brand);
  margin-bottom: 18px;
}
.logo svg {
  width: 40px;
  height: 40px;
}

/* administration */
.shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
.side {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 14px 10px;
}
.side .logo {
  font-size: 20px;
  margin: 0 6px 16px;
}
.side .logo svg {
  width: 30px;
  height: 30px;
}
.side a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  margin-bottom: 2px;
}
.side a:hover {
  background: var(--bg);
}
.side a.on {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
}
.side .sep {
  border-top: 1px solid var(--line);
  margin: 10px 4px;
}
.main {
  padding: 20px 24px;
  min-width: 0;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
}
.kpi.click {
  cursor: pointer;
}
.kpi.click:hover {
  border-color: var(--brand);
}
.kpi .k {
  font-size: 12.5px;
  color: var(--muted);
}
.kpi .v {
  font-size: 22px;
  font-weight: 700;
  margin-top: 2px;
}
.kpi .s {
  font-size: 12.5px;
  color: var(--muted);
}
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.toolbar input,
.toolbar select {
  width: auto;
  min-width: 180px;
}
.toolbar input[type='checkbox'],
.toolbar input[type='date'] {
  min-width: 0;
}
.t td select {
  min-width: 132px;
}

/* caisse */
.till {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100vh;
  overflow: hidden;
}
.pos-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.pos-top .logo {
  font-size: 19px;
  margin: 0;
}
.pos-top .logo svg {
  width: 28px;
  height: 28px;
}
.pos-top .who {
  margin-left: auto;
  text-align: right;
  font-size: 13px;
}
.pos-top .btn {
  min-height: 40px;
}
.net {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--ok-soft);
  color: var(--ok);
}
.net.off {
  background: var(--warn-soft);
  color: var(--warn);
}
.net.err {
  background: var(--bad-soft);
  color: var(--bad);
}
.pos-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr);
  min-height: 0;
}
.pos-left {
  padding: 12px;
  overflow: auto;
  min-height: 0;
}
.scanbox {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.scanbox input {
  font-size: 20px;
  min-height: var(--tap);
}
.cats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.cats button {
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
}
.cats button.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.tile {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  padding: 10px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tile:hover {
  border-color: var(--brand);
}
.tile .n {
  font-weight: 600;
  font-size: 14px;
}
.tile .p {
  font-weight: 700;
  color: var(--brand-dark);
}
.pos-right {
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #fff;
  border-left: 1px solid var(--line);
  min-height: 0;
}
.cart {
  overflow: auto;
  min-height: 0;
}
.cart-empty {
  color: var(--muted);
  text-align: center;
  padding: 40px 10px;
}
.line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.line.last {
  background: #fff8ef;
}
.line .nm {
  font-weight: 600;
}
.line .sub {
  font-size: 12.5px;
  color: var(--muted);
  grid-column: 1 / -1;
}
.qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.qty button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 20px;
  font-weight: 700;
}
.qty span {
  min-width: 34px;
  text-align: center;
  font-weight: 700;
}
.line .tot {
  font-weight: 700;
  min-width: 76px;
  text-align: right;
}
.line .x {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--bad);
  font-size: 18px;
}
.line .price {
  border: 0;
  background: none;
  padding: 0;
  text-decoration: underline dotted;
  color: var(--muted);
  font-size: 12.5px;
}
.pay {
  padding: 12px;
  border-top: 1px solid var(--line);
}
.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 10px;
}
.total small {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.paybtns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.paybtns .btn {
  min-height: 64px;
  font-size: 18px;
}
/* clients servis en même temps sur la même caisse */
.clients {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  background: #faf8f5;
}
.client {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 112px;
  min-height: 52px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
  font-size: 12.5px;
  color: var(--muted);
}
.client b {
  font-size: 14px;
  color: var(--ink);
}
.client.on {
  border: 2px solid var(--brand);
  background: #fff8ef;
}
.client.on b {
  color: var(--brand-dark);
}
.client.wait {
  border-color: #e6c46a;
  background: var(--warn-soft);
  color: #5c4400;
}
.client.add {
  margin-left: auto;
  border-style: dashed;
  color: var(--ink);
  min-width: 0;
}
.agebar {
  background: var(--warn-soft);
  color: #5c4400;
  font-weight: 700;
  padding: 8px 12px;
  border-bottom: 1px solid #f0d78a;
}
.change {
  font-size: 34px;
  font-weight: 800;
  color: var(--ok);
}
.cashkeys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 8px 0;
}
.cashkeys .btn {
  min-height: 48px;
}
.denoms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 12px;
}
.denoms label {
  display: grid;
  grid-template-columns: 70px 1fr;
  align-items: center;
  gap: 6px;
}

/* fenêtres */
.ov {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 26, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 12px;
  z-index: 50;
  overflow: auto;
}
.dlg {
  background: #fff;
  border-radius: 12px;
  width: min(560px, 100%);
  padding: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.dlg.wide {
  width: min(980px, 100%);
}
.dlg h2 {
  margin-top: 0;
}
.dlg .acts {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.toasts {
  position: fixed;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 60;
}
.toast {
  background: #222;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  max-width: 420px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.toast.err {
  background: var(--bad);
}
.toast.ok {
  background: var(--ok);
}

/* ticket (impression depuis la caisse, aussi hors connexion) : noir et blanc, format choisi pour chaque poste (80 mm, 58 mm ou A4) */
#print-area {
  display: none;
}
@media print {
  body.printing > *:not(#print-area) {
    display: none !important;
  }
  body.printing #print-area {
    display: block;
    width: 72mm;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.25;
    color: #000;
  }
  body.printing #print-area.f58 {
    width: 48mm;
    font-size: 9px;
  }
  body.printing #print-area.fA4 {
    width: 90mm;
    font-size: 12px;
    margin: 0 auto;
  }
  #print-area table {
    width: 100%;
    border-collapse: collapse;
  }
  #print-area td {
    padding: 0;
    vertical-align: top;
  }
  #print-area .r {
    text-align: right;
    white-space: nowrap;
  }
  #print-area .c {
    text-align: center;
  }
  #print-area hr {
    border: 0;
    border-top: 1px dashed #000;
    margin: 4px 0;
  }
  #print-area .big {
    font-size: 1.3em;
    font-weight: 700;
  }
  #print-area .small {
    font-size: 0.85em;
  }
  #print-area .vat td {
    font-size: 0.9em;
  }
  #print-area .bc {
    display: block;
    width: 100%;
    height: 12mm;
    margin: 6px 0 2px;
    fill: #000;
  }
  #print-area.f80 {
    page: t80;
  }
  #print-area.f58 {
    page: t58;
  }
  #print-area.fA4 {
    page: tA4;
  }
}
/* rouleau 80 / 58 mm : la longueur suit le ticket (format du pilote de l'imprimante, réglage « réduire les blancs / couper après ») */
@page t80 {
  margin: 3mm;
}
@page t58 {
  margin: 2mm;
}
@page tA4 {
  size: A4;
  margin: 12mm;
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .till {
    height: auto;
    overflow: visible;
  }
  .pos-body {
    grid-template-columns: 1fr;
  }
  .pos-right {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .grid2,
  .grid3 {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* 0.3 — tâches, DLC, analyses */
.task {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.task:last-child {
  border-bottom: 0;
}
.task-main {
  flex: 1;
  min-width: 0;
}
.task-main b {
  margin-right: 8px;
}
.task-act {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.task.done {
  opacity: 0.62;
}
.task.nd b {
  text-decoration: line-through;
}
.task.check {
  background: #fbf7ee;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px;
  margin-bottom: 6px;
}
.dlc-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dlc-cell .row {
  gap: 4px;
  align-items: center;
}
.dlc-cell .x {
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 15px;
}
table.heatt td.heat {
  text-align: right;
  font-size: 11.5px;
  padding: 3px 6px;
  min-width: 34px;
}
table.heatt td:first-child {
  font-weight: 600;
}
/* 0.4 loterie : n° des tickets sous la ligne du panier, onglets de la page Loterie */
.small {
  font-size: 12.5px;
  margin-top: 2px;
}
.lot-tabs .btn {
  margin-bottom: 4px;
}
.lot-page .badge {
  white-space: nowrap;
}
/* 0.6 promotions et fidélité : remise sous la ligne du panier, zone du client fidèle */
.promo {
  color: #0a7a35;
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 2px;
}
.custbar {
  margin: 4px 0 6px;
}
.custbar:empty {
  display: none;
}
/* 0.7 : promotion à signaler au client, tâches du jour à la caisse, loques de couleur */
.hintbar:empty {
  display: none;
}
.hintbar {
  margin: 0 0 6px;
}
.hint {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  border: 2px dashed #0a7a35;
  border-radius: 8px;
  padding: 6px 8px;
  margin-bottom: 4px;
  font-size: 13.5px;
  background: #f3fbf5;
}
.hint b {
  color: #0a7a35;
}
.hint .btn {
  white-space: nowrap;
  flex: none;
}
.task .muted,
.task-main .muted {
  white-space: pre-line;
}
.cloth {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #999;
  border-radius: 10px;
  padding: 0 7px;
  font-size: 12px;
  margin-left: 6px;
}
.cloth i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid #555;
}
.cloth.bleu i {
  background: #1565c0;
}
.cloth.rouge i {
  background: #c62828;
}
.cloth.vert i {
  background: #2e7d32;
}
.cloth.jaune i {
  background: #f9a825;
}
.tasksbtn {
  position: relative;
}
.tasksbtn .n {
  background: #c62828;
  color: #fff;
  border-radius: 9px;
  padding: 0 6px;
  font-size: 12px;
  margin-left: 4px;
}
.rota {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
.rota th,
.rota td {
  border: 1px solid #bbb;
  padding: 4px 6px;
  vertical-align: top;
}
.rota th:first-child {
  width: 150px;
  text-align: left;
}
.rota td .sh {
  display: inline-block;
  padding: 3px 8px;
  margin: 2px 6px 2px 0;
  border: 1px solid #888;
  border-radius: 4px;
  cursor: pointer;
  background: #fff;
}
.rota td .sh.me {
  font-weight: 700;
  border-width: 2px;
}
.rota .warn {
  color: var(--bad);
  font-weight: 600;
}
@media print {
  .rota td .sh {
    border-color: #000;
  }
}
fieldset {
  border: 1px solid var(--line, #ddd);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 8px 0;
}
.full .scroll {
  max-height: none;
}
/* 0.8 : tâches en cases à cocher */
.ck {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
}
.ck label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  flex: 1;
}
.ck input[type='checkbox'] {
  width: 24px;
  height: 24px;
  flex: none;
  margin-top: 1px;
  accent-color: #0a7a35;
}
.ck.done b {
  text-decoration: line-through;
  color: #555;
}
.ck.nd b {
  color: var(--bad);
}
.ck .muted {
  white-space: pre-line;
}
/* 0.8 : quantité dans le panier sur la case du produit */
.tile {
  position: relative;
}
.tile .q:empty {
  display: none;
}
.tile .q {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 28px;
  height: 28px;
  border-radius: 14px;
  background: #0a7a35;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}
.tile.in {
  border-color: #0a7a35;
  box-shadow: 0 0 0 2px #0a7a3533 inset;
}
.tile .n {
  padding-right: 30px;
}
.catchip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}
/* 0.8 : agenda des DLC */
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-h {
  font-weight: 700;
  text-align: center;
  padding: 4px;
}
.cal-d {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px;
  background: #fff;
  font-size: 12px;
  overflow: hidden;
}
.cal-d.empty {
  border: none;
  background: transparent;
}
.cal-d.today {
  border: 2px solid var(--brand);
}
.cal-d.has {
  background: #fffdf3;
}
.cal-n {
  font-weight: 700;
  margin-bottom: 2px;
}
.cal-p {
  cursor: pointer;
  padding: 1px 3px;
  border-radius: 3px;
  margin-bottom: 2px;
  background: #eef5ff;
  line-height: 1.25;
}
.cal-p.warn {
  background: #fff1d6;
}
.cal-p.bad {
  background: #ffe0e0;
}
@media (max-width: 700px) {
  .cal {
    grid-template-columns: 1fr;
  }
  .cal-h,
  .cal-d.empty {
    display: none;
  }
  .cal-d {
    min-height: 0;
  }
  .cal-d:not(.has) {
    display: none;
  }
}
/* 0.8 : GSM — menu replié derrière un bouton, tableaux défilants, boutons et champs à la bonne taille */
.menu-toggle {
  display: none;
}
@media (max-width: 900px) {
  .menu-toggle {
    display: block;
    width: 100%;
    margin: 4px 0;
    padding: 10px;
    font-size: 16px;
    font-weight: 700;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }
  .side-links {
    display: none;
  }
  body.menu-open .side-links {
    display: block;
  }
  .side {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 8px 10px;
  }
  .side .logo {
    margin: 0 6px 4px;
  }
  .main {
    padding: 12px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .scroll {
    max-height: none;
  }
  table.t {
    font-size: 13px;
  }
  .ov {
    padding: 2vh 6px;
  }
  .dlg {
    padding: 12px;
  }
  .dlg .acts {
    flex-wrap: wrap;
  }
  input,
  select,
  textarea,
  .btn {
    font-size: 16px;
  }
  .tiles {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
  h1 {
    font-size: 22px;
  }
}
/* 0.9 : compteur de colis sur le côté de la caisse */
.pos-body.with-side {
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr) 172px;
}
.parcels {
  border-left: 1px solid var(--line);
  background: #fff;
  padding: 8px;
  overflow: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.parcels .ph {
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.parcels .pc {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 6px;
}
.parcels .pname {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}
.parcels .prow {
  display: grid;
  grid-template-columns: 1fr 34px auto;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.parcels .pplus {
  min-height: 46px;
  padding: 4px 6px;
  font-weight: 700;
  background: var(--brand-soft);
  border-color: var(--brand);
}
.parcels .pcount {
  font-size: 20px;
  text-align: center;
}
.parcels .pminus {
  min-height: 46px;
  padding: 2px 6px;
}
.parcels .ptot {
  margin-top: auto;
  font-weight: 700;
  text-align: right;
}
@media (max-width: 1100px) {
  .pos-body.with-side {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  }
  .parcels {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .parcels .pc {
    min-width: 220px;
  }
  .parcels .ptot {
    margin-top: 0;
    align-self: center;
  }
}
@media (max-width: 900px) {
  .pos-body.with-side {
    grid-template-columns: 1fr;
  }
}
/* 0.9 : poubelle */
.wlist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.wpick {
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  margin: 6px 0;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.chip {
  min-height: 44px;
}
.chip.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* 0.10 : dépôt de factures, consignes, logo */
.dropzone {
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  margin: 10px 0;
  background: #fff;
}
.dropzone.on {
  border-color: var(--brand);
  background: #f4f8ff;
}
.logo img {
  max-height: 44px;
  max-width: 180px;
  object-fit: contain;
}
.side .logo img {
  max-height: 34px;
}
.logo-preview {
  max-height: 90px;
  max-width: 260px;
  border: 1px solid var(--line);
  padding: 6px;
  background: #fff;
}
.tlogo {
  max-height: 60px;
  max-width: 70%;
  filter: grayscale(1);
}
.consigne .big {
  font-size: 20px;
  line-height: 1.4;
}
.consigne .item {
  font-size: 17px;
  line-height: 1.35;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.consigne .item:last-child {
  border-bottom: 0;
}
.consigne .item p {
  margin: 2px 0;
}

/* 0.10.1 — recherche par nom dans l'inventaire, cases à cocher en grille, rappel des tâches à la caisse, logo = retour, chauffeur */
.sugg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.grid-chk {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2px 14px;
  margin: 6px 0 10px;
}
.taskbanner {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 2px solid #b45309;
  background: #fff4e5;
  color: #7c2d12;
  padding: 8px 14px;
  font-size: 15px;
  cursor: pointer;
}
.taskbanner.hidden {
  display: none;
}
.logo-home {
  cursor: pointer;
}
.psub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* 0.10.2 : export Excel de chaque tableau et de la page */
.btn.ghost {
  background: transparent;
  border-color: var(--line, #ccc);
  color: inherit;
  opacity: 0.75;
}
.btn.ghost:hover {
  opacity: 1;
}
.tbl-exp {
  display: flex;
  justify-content: flex-end;
  position: sticky;
  left: 0;
  margin-bottom: 4px;
}
.tbl-exp .btn {
  padding: 2px 8px;
  font-size: 12px;
}
.page-exp {
  float: right;
  margin: 0 0 6px 10px;
}
@media print {
  .tbl-exp,
  .page-exp {
    display: none !important;
  }
}

/* 0.10.2 : horaires jour par jour */
.rota tr.click {
  cursor: pointer;
}
.rota tr.click:hover th {
  background: #f3f4f6;
}
.rota tr.today th {
  border-left: 4px solid var(--brand, #222);
}
.rota td .sh.chg {
  border-style: dashed;
  border-width: 2px;
}
.rota td .sh.off {
  text-decoration: line-through;
  color: #777;
  cursor: default;
}

/* 0.10.2 : raccourcis du menu à la caisse, sous les colis */
.pos-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--line);
  background: #fff;
}
.pos-side .parcels {
  border-left: 0;
  flex: 0 1 auto;
  min-height: 0;
  overflow: auto;
}
.pos-acts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 8px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.pos-acts .btn {
  width: 100%;
  min-height: 46px;
}
@media (max-width: 1100px) {
  .pos-side {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .pos-acts {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .pos-acts .btn {
    width: auto;
    flex: 1 1 140px;
  }
}

/* 0.10.2 : heures et jours forts (tableaux en couleur) */
table.heatt td.heat.best {
  outline: 2px solid #0b3d24;
  outline-offset: -2px;
  font-weight: 700;
}
.heatcell {
  display: inline-block;
  min-width: 90px;
  padding: 2px 6px;
  border-radius: 4px;
  text-align: right;
}
.mbar {
  position: relative;
  min-width: 160px;
  height: 20px;
  background: #f1f3f5;
  border-radius: 4px;
  overflow: hidden;
}
.mbar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #6fcf97, #10784a);
}
.mbar.avg i {
  background: linear-gradient(90deg, #c9d3dd, #7d8b99);
}
.mbar span {
  position: relative;
  padding: 0 6px;
  font-size: 12px;
  line-height: 20px;
  font-weight: 600;
}
@media print {
  .mbar i {
    background: #999 !important;
  }
}

/* 0.10.3 : bouton « Retour » en haut de chaque page du menu */
.page-back {
  float: left;
  margin: 0 10px 6px 0;
}
@media print {
  .page-back {
    display: none !important;
  }
}

/* 0.10.4 : version installée (menu, caisse, connexion) */
.app-ver {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}
nav.side .app-ver {
  padding: 0 14px 8px;
}

/* 0.11 : presse AMP — « Imprimer la liste » des titres à retirer du rayon : seulement la page, en noir et blanc */
@media print {
  body.print-page nav.side,
  body.print-page .menu-toggle,
  body.print-page .no-print,
  body.print-page .page-back,
  body.print-page .tbl-exp,
  body.print-page .page-exp {
    display: none !important;
  }
  body.print-page,
  body.print-page .card {
    color: #000 !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  body.print-page input {
    border: 1px solid #000;
  }
}

/* 0.13.0 — écran « Opérations du jour » : grandes tuiles */
.home h1 {
  margin-bottom: 0;
}
.tiles-sec h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #666);
  margin: 18px 0 8px;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.tile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.tile:hover,
.tile:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.tile-ic {
  font-size: 30px;
  width: 44px;
  text-align: center;
  flex: none;
}
.tile-t {
  font-size: 18px;
  font-weight: 700;
}
.tile-s {
  font-size: 13px;
  color: var(--muted, #666);
}

/* 0.13.0 — étiquettes de rayon : A4, 3 × 8 cases de 57 × 32 mm, traits de découpe, noir et blanc */
#label-area {
  display: none;
}
.lbl-sheet {
  width: 210mm;
  height: 297mm;
  box-sizing: border-box;
  padding: 20.5mm 19.5mm;
  display: grid;
  grid-template-columns: repeat(3, 57mm);
  grid-template-rows: repeat(8, 32mm);
  background: #fff;
  color: #000;
}
.lbl-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.lbl-preview .lbl-sheet {
  zoom: 0.5;
  border: 1px solid #bbb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.lbl {
  box-sizing: border-box;
  border: 0.2mm dashed #777;
  overflow: hidden;
  padding: 1.6mm 2.2mm;
  display: flex;
  flex-direction: column;
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  background: #fff;
}
.lbl .nm {
  font-weight: 700;
  font-size: 8.5pt;
  line-height: 1.15;
  max-height: 2.35em;
  overflow: hidden;
}
.lbl .pr {
  margin-top: auto;
  text-align: right;
  font-weight: 800;
  font-size: 22pt;
  line-height: 1;
  white-space: nowrap;
}
.lbl .old {
  text-decoration: line-through;
  font-weight: 600;
  font-size: 10pt;
  margin-right: 1.5mm;
}
.lbl .ft {
  display: flex;
  justify-content: space-between;
  font-size: 5.5pt;
  color: #333;
  margin-top: 0.6mm;
}
.lbl.petit.promo .ptag {
  font-weight: 900;
  font-size: 9pt;
  border: 0.3mm solid #000;
  align-self: flex-start;
  padding: 0 1mm;
  margin-bottom: 0.5mm;
}
.lbl.petit.promo .pr {
  font-size: 18pt;
}
.lbl.long {
  flex-direction: row;
  gap: 2.5mm;
}
.lbl.long .pt {
  width: 46mm;
  flex: none;
  border-right: 0.3mm solid #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.lbl.long .pt .big {
  font-size: 24pt;
  font-weight: 900;
  line-height: 1;
}
.lbl.long .pt .small {
  font-size: 11pt;
  font-weight: 800;
  letter-spacing: 0.6mm;
}
.lbl.long .rt {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.lbl.long .rt .nm {
  font-size: 10pt;
}
.lbl.long .un {
  margin-top: auto;
  font-size: 9pt;
  font-weight: 700;
}
.lbl.grand .hd {
  font-size: 16pt;
  font-weight: 900;
  letter-spacing: 1.2mm;
  text-align: center;
  border-bottom: 0.4mm solid #000;
  min-height: 7mm;
}
.lbl.grand .tag {
  align-self: center;
  font-weight: 900;
  font-size: 15pt;
  border: 0.4mm solid #000;
  padding: 0 2mm;
  margin-top: 1.5mm;
}
.lbl.grand .nm {
  font-size: 12pt;
  margin-top: 1.5mm;
  text-align: center;
}
.lbl.grand .pr {
  font-size: 38pt;
  text-align: center;
}
.lbl.grand .old {
  font-size: 15pt;
}
@media print {
  body.printing-labels > *:not(#label-area) {
    display: none !important;
  }
  body.printing-labels #label-area {
    display: block !important;
  }
  body.printing-labels #label-area .lbl-sheet {
    page: lbl;
    break-after: page;
  }
}
@page lbl {
  size: A4;
  margin: 0;
}

/* 0.14.0 : contrôle du jour — ligne qui vient d'être comptée (scan ou + / −) */
tr.hl td {
  background: #fff3c4;
}

/* 0.14.0 : la bannière « ne pas oublier » (une ligne en plus) ne pousse plus le bas de la caisse hors de l'écran ; boutons du côté
   un peu plus bas pour que tout tienne (tâches, contrôle du jour, inventaire, poubelle, gain loterie, presse, annuler le panier) */
.till {
  grid-template-rows: auto auto minmax(0, 1fr);
}
.till > .pos-body {
  grid-row: 3;
}
.pos-acts .btn {
  min-height: 40px;
  padding-top: 6px;
  padding-bottom: 6px;
}
@media (max-width: 900px) {
  .till > .pos-body {
    grid-row: auto;
  }
}
