/* ══════════════════════════════════════════
   VRM ORDERS — Design System Complet
   © By AMIR for Be-Ethics
   ══════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@400;500;600;700&display=swap");

/* ── Variables ── */
:root {
  --g1: #1a6b25;
  --g2: #2e8b3a;
  --g3: #3daa48;
  --gold: #c8960c;
  --gold2: #f0c842;
  --gold3: #a07008;
  --dark: #070a07;
  --dark2: #0f140f;
  --dark3: #1e261e;
  --text: #f0ede6;
  --text2: #b8c4b0;
  --text3: #7a8870;
  --glass: rgba(46, 139, 58, 0.08);
  --glass2: rgba(46, 139, 58, 0.14);
  --border: rgba(46, 139, 58, 0.25);
  --border2: rgba(61, 170, 72, 0.5);
  --red: #d94f4f;
  --blue: #4a90c4;
  --orange: #e08030;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  height: 100%;
  background: #111;
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  overflow: hidden;
}

/* ── App Container ── */
#app {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  background: var(--dark);
  border-radius: 44px;
  border: 2px solid #1a2a1a;
  overflow: hidden;
  position: relative;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
  margin: 0 auto;
}

/* ── Screens ── */
.scr {
  display: none;
  position: absolute;
  inset: 0;
  padding-top: 46px; /* laisse la place à la barre date/heure fixe en haut de #app */
  flex-direction: column;
  overflow: hidden;
  background: var(--dark);
}
/* ── Barre date/heure (en haut de tous les écrans) ── */
.datetime-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 150;
  min-height: 26px;
  padding: 3px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  color: #888;
  background: var(--dark);
  border-bottom: 0.5px solid var(--border);
  letter-spacing: 0.2px;
  line-height: 1.35;
}
.datetime-bar .dtb-line { white-space: nowrap; }
.datetime-bar .dtb-hijri { font-size: 11px; opacity: 0.75; margin-top: 1px; }
/* ── Sélecteur de langue sur l'écran de login / onboarding ── */
.loginlang-btns,
.oblang-btns {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 10px 0 2px;
  flex-shrink: 0;
}
/* ── Onboarding ── */
.ob-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px 28px;
  gap: 14px;
}
.ob-title {
  font-family: "Bebas Neue";
  font-size: 34px;
  letter-spacing: 1px;
  color: var(--text);
  line-height: 1.05;
}
.ob-desc {
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
  max-width: 300px;
}
.ob-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 4px 0 14px;
  flex-shrink: 0;
}
.ob-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2a2a2a;
}
.ob-dot.on {
  background: var(--gold2); /* #f0c842 */
}
.ob-foot {
  padding: 0 20px 22px;
  flex-shrink: 0;
}
.ob-foot .btn {
  width: 100%;
}
.ob-replay-link {
  text-align: center;
  font-size: 12px;
  color: var(--text3);
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
}
.scr.on {
  display: flex;
}

/* ── Header ── */
.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 52px 16px 11px;
  background: rgba(7, 10, 7, 0.97);
  border-bottom: 0.5px solid rgba(200, 150, 12, 0.3);
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  z-index: 10;
}
.htitle {
  font-family: "Bebas Neue";
  font-size: 15px;
  letter-spacing: 1px;
  flex: 1;
  text-align: center;
  color: var(--text);
}
.hact {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text3);
  font-size: 18px;
  flex-shrink: 0;
}

/* ── Logo Block (Home) ── */
.logo-block {
  flex-shrink: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px 7px;
  border-bottom: 0.5px solid rgba(200, 150, 12, 0.35);
  position: relative;
}
.logo-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 120%,
    rgba(46, 139, 58, 0.1),
    transparent 60%
  );
  pointer-events: none;
}
.logo-block img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
}
.logo-separator {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 60%;
  margin-top: 5px;
  position: relative;
  z-index: 1;
}
.logo-separator::before,
.logo-separator::after {
  content: "";
  flex: 1;
  height: 0.5px;
}
.logo-separator::before {
  background: linear-gradient(90deg, transparent, rgba(200, 150, 12, 0.6));
}
.logo-separator::after {
  background: linear-gradient(90deg, rgba(200, 150, 12, 0.6), transparent);
}
.logo-separator span {
  font-family: "Bebas Neue";
  font-size: 10px;
  color: var(--gold2);
  letter-spacing: 4px;
  font-weight: 700;
}

/* ── Bottom Navigation ── */
.bnav {
  display: flex;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: rgba(7, 10, 7, 0.98);
  border-top: 0.5px solid rgba(200, 150, 12, 0.25);
  padding: 8px 0 22px;
  flex-shrink: 0;
}
.ni {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 5px 0;
  color: var(--text3);
  font-size: 10px;
  font-weight: 500;
  position: relative;
}
.ni.on {
  color: var(--gold2);
}
.ni svg {
  width: 20px;
  height: 20px;
}
.ni-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 16px);
  min-width: 16px;
  height: 16px;
  background: var(--red);
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1.5px solid var(--dark);
}
.ni-badge.on {
  display: flex;
}
.fab-w {
  position: relative;
  top: -10px;
}
.fab {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--g2), var(--g1));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(46, 139, 58, 0.5);
}

/* ── Scroll Container ── */
.sc {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 100px; /* bottom clearance for the absolutely-positioned .bnav docked over .scr */
  scrollbar-width: none;
}
.sc::-webkit-scrollbar {
  display: none;
}

/* ── Cards ── */
.card {
  background: var(--glass);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 9px;
}
.card-gold {
  border-color: rgba(200, 150, 12, 0.4);
  background: rgba(200, 150, 12, 0.05);
}

/* ── List Items ── */
.li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--glass);
  border: 0.5px solid var(--border);
  border-radius: 9px;
  margin-bottom: 7px;
  cursor: pointer;
}
.li:active {
  background: var(--glass2);
}
.li.pending {
  border-color: rgba(200, 150, 12, 0.5);
  background: rgba(200, 150, 12, 0.04);
}
.li.confirmed {
  border-color: rgba(46, 139, 58, 0.5);
  background: rgba(46, 139, 58, 0.05);
}
.li.new {
  border-color: rgba(61, 170, 72, 0.55);
  background: rgba(46, 139, 58, 0.07);
}
.li-ico {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(46, 139, 58, 0.12);
  border: 0.5px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 17px;
}
.li-tx {
  flex: 1;
  min-width: 0;
}
.li-t {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.li-s {
  font-size: 11px;
  color: var(--text2);
  margin-top: 1px;
}

/* ── Buttons ── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: "DM Sans";
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  width: 100%;
  margin-bottom: 8px;
}
.btn-g {
  background: linear-gradient(135deg, var(--g2), var(--g1));
  color: #fff;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold3));
  color: #fff;
  box-shadow: 0 3px 12px rgba(200, 150, 12, 0.3);
}
.btn-o {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text);
}
.btn-r {
  background: rgba(217, 79, 79, 0.15);
  border: 1px solid rgba(217, 79, 79, 0.4);
  color: var(--red);
}
.btn-orange {
  background: rgba(224, 128, 48, 0.15);
  border: 1px solid rgba(224, 128, 48, 0.5);
  color: var(--orange);
}
.btn-print {
  background: transparent;
  border: 0.5px solid var(--border);
  color: var(--text3);
  font-size: 12px;
}
.btn-confirm {
  background: linear-gradient(135deg, var(--g2), var(--g3));
  color: #fff;
  border: none;
  padding: 14px 16px;
  border-radius: 11px;
  font-family: "DM Sans";
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-bottom: 8px;
  box-shadow: 0 4px 16px rgba(46, 139, 58, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ── Badges ── */
.bdg {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.bdg-g {
  background: rgba(46, 139, 58, 0.2);
  color: var(--g3);
  border: 0.5px solid rgba(46, 139, 58, 0.4);
}
.bdg-gold {
  background: rgba(200, 150, 12, 0.2);
  color: var(--gold2);
  border: 0.5px solid rgba(200, 150, 12, 0.4);
}
.bdg-r {
  background: rgba(217, 79, 79, 0.2);
  color: var(--red);
  border: 0.5px solid rgba(217, 79, 79, 0.4);
}
.bdg-b {
  background: rgba(74, 144, 196, 0.2);
  color: var(--blue);
  border: 0.5px solid rgba(74, 144, 196, 0.4);
}
.new-bdg {
  display: inline-block;
  background: rgba(46, 139, 58, 0.3);
  color: var(--g3);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Forms ── */
.fg {
  margin-bottom: 10px;
}
.fl {
  font-size: 10px;
  color: var(--text2);
  margin-bottom: 4px;
  display: block;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.fi {
  width: 100%;
  background: var(--glass);
  border: 0.5px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  color: var(--text);
  font-family: "DM Sans";
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.fi:focus {
  border-color: var(--g3);
}
.fi::placeholder {
  color: var(--text3);
}
select.fi option {
  background: #141a14;
}

/* ── Chips / Filter Pills ── */
.chip {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  border: 0.5px solid var(--border);
  background: transparent;
  color: var(--text3);
  margin: 2px;
  font-family: "DM Sans";
  white-space: nowrap;
}
.chip.on {
  background: rgba(46, 139, 58, 0.18);
  border-color: var(--border2);
  color: var(--g3);
}

/* ── Stat Cards (Dashboard / Home) ── */
.g2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.sm {
  background: var(--glass);
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
}
.sm-v {
  font-family: "Bebas Neue";
  font-size: 22px;
  color: var(--gold2);
}
.sm-l {
  font-size: 9px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Avatar ── */
.av {
  border-radius: 50%;
  background: rgba(46, 139, 58, 0.2);
  border: 1.5px solid var(--g2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--g3);
  flex-shrink: 0;
}

/* ── Section Title ── */
.stitle {
  font-family: "Bebas Neue";
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--text3);
  text-transform: uppercase;
  margin: 10px 0 6px;
}
.stitle:first-child {
  margin-top: 0;
}

/* ── Divider ── */
.divider {
  height: 0.5px;
  background: var(--border);
  margin: 11px 0;
}

/* ── Quantity Input ── */
.qinput {
  width: 42px;
  height: 26px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  background: var(--dark2);
  border: none;
  border-left: 0.5px solid var(--border);
  border-right: 0.5px solid var(--border);
  outline: none;
  font-family: "DM Sans";
  padding: 0;
}
.qinput::-webkit-outer-spin-button,
.qinput::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qinput[type="number"] {
  -moz-appearance: textfield;
}

/* ── Storage Bar ── */
.sbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(46, 139, 58, 0.06);
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}
.sdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--g3);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* ── Edit Banner ── */
.edit-banner {
  background: rgba(224, 128, 48, 0.12);
  border-bottom: 0.5px solid rgba(224, 128, 48, 0.4);
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.edit-banner span {
  font-size: 11px;
  color: var(--orange);
  font-weight: 600;
  flex: 1;
}
.edit-banner button {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(224, 128, 48, 0.2);
  border: 0.5px solid rgba(224, 128, 48, 0.5);
  color: var(--orange);
  cursor: pointer;
  font-family: "DM Sans";
}

/* ── Confirmation Screen ── */
.cchk {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--g2), var(--g3));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow:
    0 0 0 12px rgba(46, 139, 58, 0.15),
    0 0 0 24px rgba(46, 139, 58, 0.06);
}

/* ── Chat Bubbles ── */
.bbl {
  max-width: 76%;
  margin-bottom: 8px;
}
.bbl.me {
  align-self: flex-end;
}
.bbl.them {
  align-self: flex-start;
}
.bbl-t {
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.5;
}
.bbl.me .bbl-t {
  background: rgba(46, 139, 58, 0.2);
  border: 0.5px solid var(--border2);
}
.bbl.them .bbl-t {
  background: var(--glass2);
  border: 0.5px solid var(--border);
}
.bbl-m {
  font-size: 9px;
  color: var(--text3);
  margin-top: 2px;
  padding: 0 3px;
}
.bbl.me .bbl-m {
  text-align: right;
}

/* ── Toast ── */
#toast {
  position: absolute;
  top: 90px;
  left: 14px;
  right: 14px;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #fff;
  pointer-events: none;
}
#toast.show    { opacity: 1; transform: translateY(0); }
#toast.success { background: var(--g2); }
#toast.error   { background: var(--red); }
#toast.info    { background: var(--blue); }
#toast-icon    { font-size: 14px; flex-shrink: 0; }

/* ── Copyright ── */
.cp {
  font-size: 9px;
  color: var(--text3);
  text-align: center;
  padding: 5px;
  flex-shrink: 0;
}

/* ── Onboarding ── */
.ob-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 16px 0;
  flex-shrink: 0;
}
.ob-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s;
}
.ob-dot.on {
  background: var(--gold2);
  width: 22px;
  border-radius: 4px;
}

/* ── Role Switcher Bar ── */
.role-bar {
  display: flex;
  gap: 5px;
  padding: 5px 12px;
  background: rgba(7, 10, 7, 0.9);
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.role-bar::-webkit-scrollbar {
  display: none;
}
.role-btn {
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text3);
  font-family: "DM Sans";
  white-space: nowrap;
}
.role-btn.on {
  border-color: rgba(200, 150, 12, 0.5);
  background: rgba(200, 150, 12, 0.15);
  color: var(--gold2);
}

/* ── Badge: Processing ── */
.bdg-orange {
  background: rgba(224, 128, 48, 0.2);
  color: var(--orange);
  border: 0.5px solid rgba(224, 128, 48, 0.4);
}

/* ── 3-Column Stat Grid ── */
.g3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

/* ── Bottom Nav Icon ── */
.ni-ico {
  font-size: 19px;
  line-height: 1;
  position: relative;
}

/* ── Header Subtitle ── */
.topbar-sub {
  font-size: 9px;
  color: var(--text3);
  margin-top: 2px;
  letter-spacing: 0.3px;
}

/* ── Onboarding ── */
.ob-slides {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.ob-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 36px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.ob-slide.on {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.ob-logo-box img {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  margin-bottom: 18px;
}
.ob-big-icon {
  font-size: 64px;
  margin-bottom: 18px;
}
.ob-title {
  font-family: "Bebas Neue";
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 8px;
}
.ob-desc {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.6;
  max-width: 260px;
}
.ob-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px 16px;
  flex-shrink: 0;
}

/* ── Login ── */
.login-header {
  flex-shrink: 0;
  text-align: center;
  padding: 0;
}
.login-logo-box img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin-bottom: 12px;
}
/* Logo officiel pleine largeur (login + accueil) */
.brand-logo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border: none;
  box-shadow: none;
  background: none;
  margin: 0 0 18px; /* respiration avant le formulaire de connexion */
}
.home-logo-wrap {
  flex-shrink: 0;
}
/* Sur l'accueil : pleine largeur mais hauteur plafonnée pour ne pas dominer */
.brand-logo-home {
  max-height: 150px;
  margin: 6px 0 12px;
}
.login-brand {
  font-family: "Bebas Neue";
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--text);
}
.login-sub {
  font-size: 11px;
  color: var(--text3);
  margin-top: 4px;
}
.login-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-err {
  display: none;
  font-size: 11px;
  color: var(--red);
  text-align: center;
}
.demo-row {
  text-align: center;
}
.demo-row p {
  font-size: 9px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/* ── Home ── */
.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  flex-shrink: 0;
}
.home-cta-card {
  background: linear-gradient(135deg, rgba(46,139,58,0.18), rgba(61,170,72,0.10));
  border: 0.5px solid rgba(61,170,72,0.35);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 10px;
}
.home-alert {
  transition: opacity 0.15s;
}
.home-alert:active {
  opacity: 0.75;
}
.home-greeting-sub {
  font-size: 11px;
  color: var(--text3);
}
.home-greeting-name {
  font-family: "Bebas Neue";
  font-size: 19px;
  letter-spacing: 0.5px;
  color: var(--text);
  margin: 1px 0 4px;
}
.role-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(200, 150, 12, 0.15);
  color: var(--gold2);
  border: 0.5px solid rgba(200, 150, 12, 0.35);
}
.quick-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.quick-actions::-webkit-scrollbar {
  display: none;
}
.qa-btn {
  flex: 1;
  min-width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  background: var(--glass);
  border: 0.5px solid var(--border);
  border-radius: 11px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text2);
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
}
.qa-icon {
  font-size: 20px;
}

/* ── Search Bar ── */
.search-bar {
  padding: 10px 16px;
  flex-shrink: 0;
}
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 12px;
  font-size: 13px;
  pointer-events: none;
}
.search-wrap .fi {
  padding-left: 34px;
}

/* ── Tab / Chip Containers ── */
.filter-tabs,
.cat-tabs,
.lang-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 14px 2px;
  flex-shrink: 0;
}
.lang-btns {
  display: inline-flex;
  padding: 0;
  margin-left: auto;
}

/* ── Order Detail ── */
.detail-hdr {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 20px 16px;
  flex-shrink: 0;
}
.detail-order-id {
  font-family: "Bebas Neue";
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--text);
  margin-top: 6px;
}
.detail-client-name {
  font-size: 13px;
  color: var(--text2);
  margin-top: 2px;
}
.detail-date {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}
.detail-modified {
  font-size: 11px;
  color: var(--gold2);
  opacity: 0.85;
  margin-top: 3px;
}

/* ── Item Rows (Detail / Confirmation Recap) ── */
.item-row,
.confirm-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 0.5px solid var(--border);
}
.item-row:last-child,
.confirm-item-row:last-child {
  border-bottom: none;
}
.item-emoji,
.confirm-item-emoji {
  font-size: 18px;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}
.item-name,
.confirm-item-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.confirm-item-name {
  flex: 1;
}
.item-qty {
  font-size: 10px;
  color: var(--text3);
  margin-top: 2px;
}
.confirm-item-qty {
  font-size: 11px;
  color: var(--text3);
}

/* ── Card row / title ── */
.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Confirmation Screen ── */
.confirm-check-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 36px auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.confirm-ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(46, 139, 58, 0.25);
  animation: confirmRipple 1.6s ease-out infinite;
}
@keyframes confirmRipple {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}
.confirm-circle {
  position: relative;
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--g2), var(--g3));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.confirm-circle svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.confirm-title {
  font-family: "Bebas Neue";
  font-size: 21px;
  letter-spacing: 1px;
  text-align: center;
  color: var(--text);
}
.confirm-num {
  font-size: 12px;
  color: var(--text2);
  text-align: center;
  margin-top: 4px;
}
.confirm-delivery {
  font-size: 11px;
  color: var(--g3);
  text-align: center;
  margin: 6px 0 18px;
}
.confirm-recap,
.confirm-notes-box {
  background: var(--glass);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin: 0 16px 12px;
}
.confirm-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px 16px;
  background: rgba(7, 10, 7, 0.97);
  border-top: 0.5px solid var(--border);
  flex-shrink: 0;
}

/* ── Fiche Client ── */
.fiche-hdr {
  text-align: center;
  padding: 8px 16px 16px;
}
.fiche-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text2);
  padding: 7px 0;
}
.fiche-info-row span {
  font-size: 14px;
  width: 22px;
  text-align: center;
}

/* ── Profil ── */
.profil-hdr {
  text-align: center;
  padding: 16px 16px 8px;
}
.profil-name {
  font-family: "Bebas Neue";
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--text);
}
.profil-role {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}
.settings-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 4px;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
}
.s-icon {
  font-size: 17px;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}
.s-label {
  flex: 1;
  font-size: 13px;
  color: var(--text);
}
.s-value {
  font-size: 11px;
  color: var(--text3);
}
.s-arrow {
  font-size: 15px;
  color: var(--text3);
}

/* ── Product Picker (Nouvelle commande) ── */
.product-pick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 0.5px solid var(--border);
}
.product-pick-row:last-child {
  border-bottom: none;
}
.ps-emoji {
  font-size: 17px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ps-name {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.qty-stepper {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.qbtn {
  width: 26px;
  height: 26px;
  border: none;
  background: var(--dark2);
  color: var(--text2);
  font-size: 14px;
  font-weight: 700;
  font-family: "DM Sans";
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.qbtn:first-child { border-radius: 4px 0 0 4px; }
.qbtn:last-child { border-radius: 0 4px 4px 0; }
.unit-btns {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.ubtn {
  width: 22px;
  height: 26px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 700;
  font-family: "DM Sans";
  background: transparent;
  color: #607060;
  border: 1px solid rgba(46,139,58,.25);
  cursor: pointer;
  padding: 0;
}
.ubtn.on {
  background: rgba(46,139,58,.25);
  color: #3DAA48;
  border: 1px solid rgba(61,170,72,.6);
}

/* ── Chat ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
}
.chat-messages::-webkit-scrollbar {
  display: none;
}
.ai-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--g3);
  margin-bottom: 3px;
}
.chat-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 74px; /* clears the absolutely-positioned .bnav docked over .scr */
  background: rgba(7, 10, 7, 0.97);
  border-top: 0.5px solid var(--border);
  flex-shrink: 0;
}
.chat-bar .fi {
  resize: none;
  max-height: 80px;
}
.chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--g2), var(--g1));
  border: none;
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.typing-wrap {
  display: flex;
  gap: 4px;
  padding: 4px 2px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text3);
  animation: typingDot 1.2s infinite ease-in-out;
}
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.chat-suggests {
  display: flex;
  gap: 7px;
  padding: 7px 12px;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: rgba(7, 10, 7, 0.9);
  border-top: 0.5px solid var(--border);
}
.chat-suggests::-webkit-scrollbar { display: none; }
.chat-suggest-chip {
  white-space: nowrap;
  background: rgba(61, 170, 72, 0.10);
  border: 0.5px solid rgba(61, 170, 72, 0.3);
  color: var(--g3);
  border-radius: 20px;
  padding: 5px 13px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  transition: opacity 0.15s;
}
.chat-suggest-chip:active { opacity: 0.6; }

/* ── Nouvelle Commande améliorée ── */
.nc-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: rgba(61, 170, 72, 0.08);
  border-bottom: 0.5px solid var(--border);
  font-size: 12px;
  flex-shrink: 0;
}
.nc-sum-items { font-weight: 700; color: var(--g3); }
.nc-sum-totals { color: var(--text3); font-size: 11px; }
.nc-delivery-warn {
  font-size: 11px;
  color: var(--gold2);
  background: rgba(255, 184, 0, 0.08);
  border: 0.5px solid rgba(255, 184, 0, 0.35);
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 6px;
}
.nc-notes-count {
  font-size: 10px;
  color: var(--text3);
  text-align: right;
  margin-top: 3px;
  opacity: 0.7;
}
.nc-actions {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 74px;
  background: rgba(7, 10, 7, 0.97);
  border-top: 0.5px solid var(--border);
  flex-shrink: 0;
}
.nc-actions .btn { width: auto; }

/* ── Messagerie ── */
.msg-input-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 74px;
  background: rgba(7,10,7,0.97);
  border-top: 0.5px solid var(--border);
  flex-shrink: 0;
}
.msg-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 0.5px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-size: 14px;
  padding: 10px 14px;
  resize: none;
  outline: none;
  max-height: 100px;
  overflow-y: auto;
  font-family: inherit;
  line-height: 1.4;
}
.msg-input::placeholder { color: var(--text3); }
.msg-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--g3);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.msg-bbl-wrap {
  display: flex;
  flex-direction: column;
  padding: 12px 12px 4px;
  gap: 2px;
}
.msg-bbl {
  display: flex;
  flex-direction: column;
  max-width: 78%;
  margin-bottom: 8px;
}
.msg-me  { align-self: flex-end;  align-items: flex-end; }
.msg-them { align-self: flex-start; align-items: flex-start; }
.msg-text {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.msg-me   .msg-text { background: var(--g3); color:#fff; border-bottom-right-radius:4px; }
.msg-them .msg-text { background: rgba(255,255,255,0.08); color:var(--text); border-bottom-left-radius:4px; }
.msg-time { font-size:10px; color:var(--text3); margin-top:3px; padding:0 4px; }
.msg-transl-hint {
  font-size: 10px;
  color: var(--text3);
  font-style: italic;
  margin-top: 4px;
  padding: 0 4px;
  line-height: 1.4;
  max-width: 260px;
  opacity: 0.75;
}
#msg-conv-body { padding-bottom: 0; }

/* ── Notifications ── */
.notif-banner {
  background: linear-gradient(90deg, #D4700A 0%, #E8881A 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 16px;
  text-align: center;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: 0.2px;
}
.bdg-new {
  display: inline-block;
  background: var(--g3);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  vertical-align: middle;
  letter-spacing: 0.3px;
}
.sound-toggle {
  width: 42px;
  height: 24px;
  border-radius: 12px;
  background: var(--border);
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
  margin-left: auto;
}
.sound-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.sound-toggle.on { background: var(--g3); }
.sound-toggle.on::after { transform: translateX(18px); }
.profil-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text3);
  padding: 14px 16px 6px;
  opacity: 0.7;
}
.profil-last-backup {
  font-size: 11px;
  color: var(--text3);
  padding: 4px 16px 12px;
  opacity: 0.6;
}

/* ── Fiche Produit ── */
.pd-img-zone {
  width: 100%;
  height: 200px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid var(--g3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.pd-lang-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text3);
  min-width: 28px;
  flex-shrink: 0;
}

/* ── Dashboard Charts ── */
.dash-card {
  background: var(--glass);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}
.barchart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  height: 110px;
  margin-top: 12px;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
}
.bar-val {
  font-size: 9px;
  color: var(--text3);
  height: 12px;
}
.bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.bar-fill {
  width: 60%;
  min-height: 3px;
  background: linear-gradient(180deg, var(--g3), var(--g1));
  border-radius: 4px 4px 0 0;
}
.bar-day {
  font-size: 9px;
  color: var(--text3);
  text-transform: uppercase;
}
.top-prod-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
}
.top-rank {
  font-family: "Bebas Neue";
  font-size: 14px;
  color: var(--gold2);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.top-emoji {
  font-size: 15px;
  flex-shrink: 0;
}
.top-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  width: 84px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--dark2);
  border-radius: 4px;
  overflow: hidden;
}
.top-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--g2), var(--g3));
  border-radius: 4px;
}
.top-qty {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  width: 26px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Donut Chart ── */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding-bottom: 4px;
}
.donut {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.donut::after {
  content: '';
  position: absolute;
  inset: 22px;
  background: var(--dark);
  border-radius: 50%;
}
.donut-legend {
  flex: 1;
}
.donut-leg-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}
.donut-leg-row:last-child {
  margin-bottom: 0;
}
.donut-leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.donut-leg-lbl {
  font-size: 11px;
  color: var(--text2);
  flex: 1;
}
.donut-leg-pct {
  font-family: "Bebas Neue";
  font-size: 16px;
  color: var(--text);
  min-width: 36px;
  text-align: right;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 50px 20px;
}
.empty-icon {
  font-size: 38px;
  margin-bottom: 8px;
  opacity: 0.6;
}
.empty-text {
  font-size: 12px;
  color: var(--text3);
}

/* ── Modal (API Key) ── */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 7, 0.7);
  display: flex;
  align-items: flex-end;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-sheet {
  width: 100%;
  background: var(--dark2);
  border-top: 0.5px solid var(--border2);
  border-radius: 18px 18px 0 0;
  padding: 20px;
  transform: translateY(20px);
  transition: transform 0.2s;
}
.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}
.modal-title {
  font-family: "Bebas Neue";
  font-size: 17px;
  letter-spacing: 0.5px;
  color: var(--text);
  margin-bottom: 6px;
}
.modal-desc {
  font-size: 11px;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 14px;
}
.modal-btns {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.modal-btns .btn {
  flex: 1;
}

/* ── Sous-menu clients démo (login) ── */
.client-demo-menu {
  display: none;
  /* fixed → échappe à l'overflow:hidden de #app/.scr/.login-body */
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background: var(--dark2);
  border: 0.5px solid var(--border2);
  border-radius: 12px;
  padding: 6px;
  width: 260px;
  max-width: calc(100vw - 40px);
  max-height: 400px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  text-align: left;
}
.client-demo-menu.open {
  display: block;
}
.client-demo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.12s;
}
.client-demo-item:hover {
  background: var(--glass2);
}
.client-demo-item svg {
  width: 24px;
  height: 17px;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.18);
}
.client-demo-item .cdi-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}
.client-demo-item .cdi-sub {
  font-size: 10px;
  color: var(--text3);
  margin-top: 1px;
}
.client-demo-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.client-demo-item.disabled:hover {
  background: transparent;
}

/* ── Responsive — plein écran sur mobile ── */
@media (max-width: 440px) {
  body {
    background: var(--dark);
  }
  #app {
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
}

/* ── Commandes du jour / Bons de préparation ── */
.ot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}
.ot-back {
  font-size: 13px;
  font-weight: 600;
  color: var(--g3);
  cursor: pointer;
}
.ot-print-btn {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #1a6b25, #2e8b3a);
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
}
.ot-head {
  padding: 6px 2px 12px;
}
.ot-title {
  font-family: "Bebas Neue";
  font-size: 26px;
  letter-spacing: 1px;
  color: var(--text);
}
.ot-sub {
  font-size: 12px;
  color: var(--text3);
  margin-top: 2px;
}
.ot-card {
  background: var(--glass);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.ot-num {
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 4px;
}
.ot-name {
  font-family: "Bebas Neue";
  font-size: 22px;
  letter-spacing: 0.5px;
  color: var(--text);
  line-height: 1.1;
}
.ot-addr {
  font-size: 12px;
  color: var(--text2);
  margin-top: 3px;
}
.ot-sep {
  height: 0.5px;
  background: var(--border);
  margin: 10px 0;
}
.ot-li {
  font-size: 13px;
  color: var(--text);
  padding: 2px 0;
}
/* Le bon imprimé n'apparaît qu'à l'impression */
.bon-print {
  display: none;
}
/* Le <hr> de saut de page est invisible à l'écran */
.page-break-hr {
  display: none;
}

/* ── Impression : un bon de préparation par page A4 ── */
@media print {
  @page {
    size: A4 portrait;
    margin: 2cm;
  }
  #datetime-bar,
  #bottom-nav,
  #toast,
  .ot-bar,
  .ot-head {
    display: none !important;
  }
  body,
  #app {
    background: #fff !important;
  }
  #app {
    height: auto !important;
    max-width: none !important;
    overflow: visible !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .scr {
    display: none !important;
    position: static !important;
    padding: 0 !important;
    overflow: visible !important; /* un ancêtre overflow:hidden supprime les sauts de page */
  }
  .scr.on {
    display: block !important;
    overflow: visible !important;
  }
  .sc {
    overflow: visible !important;
    padding: 0 !important;
  }
  .bon-screen {
    display: none !important;
  }
  #screen-orders-today .ot-card {
    background: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #000 !important;
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  #screen-orders-today .ot-card:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }
  /* Conteneur direct des bons en display:block (un flex/grid empêcherait
     le navigateur d'honorer page-break). Ciblé sur le vrai parent (#ot-body),
     sans toucher .ot-bar/.ot-head qui restent masqués. */
  #ot-body,
  #screen-orders-today .sc {
    display: block !important;
  }
  /* Fallback robuste : saut de page AVANT chaque carte sauf la première
     (plus fiable que page-break-after en contexte flex/grid résiduel) */
  #screen-orders-today .ot-card + .ot-card {
    page-break-before: always !important;
    break-before: page !important;
  }
  /* Plan B : saut de page forcé via <hr> dédié inséré en JS avant impression */
  #screen-orders-today .page-break-hr {
    page-break-after: always !important;
    break-after: page !important;
    visibility: hidden;
    margin: 0;
    padding: 0;
    border: none;
    height: 0;
    display: block !important;
  }
  .bon-print {
    display: block !important;
    color: #000;
    font-family: "DM Sans", sans-serif;
  }
  .bon-title {
    font-family: "Bebas Neue";
    font-size: 34px;
    letter-spacing: 1px;
    margin-bottom: 14px;
  }
  .bon-num {
    font-family: "Courier New", Consolas, monospace;
    font-size: 20px;
    font-weight: bold;
  }
  .bon-date {
    font-size: 13px;
    margin-top: 4px;
  }
  .bon-rule {
    border-top: 2px solid #000;
    margin: 16px 0;
  }
  .bon-row {
    font-size: 14px;
    margin: 4px 0;
  }
  .bon-lbl {
    font-weight: bold;
  }
  .bon-prodlbl {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
  }
  .bon-items {
    margin-top: 4px;
  }
  .bon-li {
    display: flex;
    gap: 12px;
    align-items: baseline;
    font-size: 15px;
    margin: 8px 0;
  }
  .bon-chk {
    font-size: 18px;
  }
  .bon-q {
    min-width: 90px;
    font-weight: bold;
  }
  .bon-foot {
    margin-top: 60px;
    text-align: center;
    font-size: 11px;
    color: #000;
  }
}
