/* ============================================================
   RABC Traçabilité — Styles
   ============================================================ */

:root {
  --blue-dark:  #0f2d5a;
  --blue:       #1a56b0;
  --blue-mid:   #2d7dd2;
  --blue-pale:  #e8f0fc;
  --orange:     #d95800;
  --green:      #1a7c3e;
  --green-pale: #e8f8ee;
  --amber:      #c87d00;
  --amber-pale: #fff4e0;
  --red:        #c0392b;
  --red-pale:   #fdf0ef;
  --gray-50:    #f9fafb;
  --gray-100:   #f4f6f9;
  --gray-200:   #e8ecf2;
  --gray-300:   #d0d7e3;
  --gray-400:   #a0aabe;
  --gray-500:   #7a8499;
  --gray-700:   #3d4558;
  --gray-900:   #1a1f2e;
  --white:      #ffffff;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 28px rgba(0,0,0,.18);
  --radius:     8px;
  --radius-sm:  5px;
  --sidebar-w:  236px;
  --topbar-h:   56px;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; height: 100%; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  background: var(--gray-100);
  color: var(--gray-900);
  min-height: 100%;
  line-height: 1.55;
}
a { color: var(--blue); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
table { border-collapse: collapse; width: 100%; }
ul, ol { list-style: none; }

/* ----- Layout ----- */
.layout { display: flex; min-height: 100vh; }

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--blue-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform .25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.brand-title { display: block; font-weight: 700; font-size: 14px; color: #fff; }
.brand-sub   { display: block; font-size: 11px; color: rgba(255,255,255,.5); }

.sidebar-nav {
  flex: 1;
  padding: 10px 8px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.7);
  font-size: 14px;
  transition: background .15s, color .15s;
  cursor: pointer;
  user-select: none;
  margin-bottom: 2px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active { background: var(--blue-mid); color: #fff; }
.nav-ico { font-size: 15px; min-width: 20px; text-align: center; flex-shrink: 0; }
.nav-lbl { flex: 1; }
.nav-count {
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.nav-count:empty { display: none; }

.sidebar-foot {
  padding: 10px 16px;
  font-size: 11px;
  color: rgba(255,255,255,.3);
  border-top: 1px solid rgba(255,255,255,.08);
}
.role-box { margin-bottom: 8px; }
.role-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.role-admin { background: rgba(231,169,42,.18); color: #f3c861; }
.role-user  { background: rgba(255,255,255,.12); color: rgba(255,255,255,.75); }

/* Écran de connexion */
.login-overlay {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-dark);
  padding: 20px;
}
.login-box {
  width: 100%; max-width: 360px;
  background: #fff; border-radius: 14px;
  padding: 32px 28px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  text-align: center;
}
.login-logo { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.login-title { font-size: 20px; font-weight: 800; color: var(--blue-dark); margin: 0; }
.login-sub { font-size: 13px; color: var(--gray-500); margin: 2px 0 22px; }
.login-box .form-lbl { display: block; text-align: left; }
.login-error { color: #c0392b; font-size: 13px; margin-top: 10px; min-height: 16px; }
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 99;
}

/* ============================================================
   Main
   ============================================================ */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--gray-700);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
}
.menu-toggle:hover { background: var(--gray-100); }
.page-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-900);
  flex: 1;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-date  { font-size: 13px; color: var(--gray-500); white-space: nowrap; }

.page-content {
  flex: 1;
  padding: 26px 28px;
  overflow-y: auto;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: none;
  transition: background .15s, box-shadow .15s, opacity .15s;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm  { padding: 5px 12px; font-size: 13px; }
.btn-lg  { padding: 10px 26px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-mid); }

.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #22a050; }

.btn-warning { background: var(--amber); color: #fff; }
.btn-warning:hover { background: #e0a000; }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #e04030; }

.btn-outline { background: transparent; border: 1px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { background: var(--gray-100); border-color: var(--gray-400); }

.btn-ghost { background: none; border: none; color: var(--blue); font-size: 13px; padding: 4px 8px; }
.btn-ghost:hover { text-decoration: underline; }

.btn-dark { background: var(--blue-dark); color: #fff; }
.btn-dark:hover { background: var(--blue); }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.card-hd {
  padding: 15px 20px 13px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-title { font-size: 14px; font-weight: 600; color: var(--gray-900); }
.card-body  { padding: 20px; }

/* ============================================================
   Dashboard stats
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--blue);
  cursor: default;
}
.stat-card.c-orange { border-left-color: var(--orange); }
.stat-card.c-green  { border-left-color: var(--green); }
.stat-card.c-amber  { border-left-color: var(--amber); }
.stat-card.c-red    { border-left-color: var(--red); }
.stat-lbl {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-500);
  margin-bottom: 6px;
}
.stat-val {
  font-size: 30px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
}
.stat-sub { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

/* ============================================================
   Tables
   ============================================================ */
.table-wrap { overflow-x: auto; }
.table { font-size: 13.5px; }
.table th {
  background: var(--gray-50);
  padding: 9px 13px;
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.table td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
  color: var(--gray-900);
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--gray-50); }
.table .col-actions { text-align: right; white-space: nowrap; }
.table .col-mono { font-family: 'Courier New', monospace; font-size: 13px; font-weight: 600; }

/* ============================================================
   Badges & Statuts
   ============================================================ */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.b-transit   { background: #dbeafe; color: #1d4ed8; }
.b-spay      { background: #fef3c7; color: #92400e; }
.b-client    { background: #ede9fe; color: #6d28d9; }
.b-delivered { background: var(--green-pale); color: var(--green); }
.b-anomaly   { background: var(--red-pale); color: var(--red); }

.seal-ok { color: var(--green); font-weight: 700; }
.seal-ko { color: var(--red); font-weight: 700; }
.seal-nd { color: var(--gray-400); }

/* ============================================================
   Forms
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid.g3  { grid-template-columns: repeat(3, 1fr); }
.form-grid.g1  { grid-template-columns: 1fr; }
.form-full { grid-column: 1 / -1; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}
.form-lbl .req { color: var(--red); margin-left: 2px; }

.form-ctrl {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.form-ctrl:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,86,176,.12);
}
.form-ctrl:disabled { background: var(--gray-100); color: var(--gray-500); }
select.form-ctrl { appearance: auto; }
textarea.form-ctrl { resize: vertical; min-height: 72px; }

.form-hint  { font-size: 12px; color: var(--gray-500); }
.form-error { font-size: 12px; color: var(--red); }

.form-section {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--blue);
  padding: 10px 0 6px;
  border-bottom: 2px solid var(--blue-pale);
  margin-bottom: 4px;
  grid-column: 1 / -1;
}
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
  grid-column: 1 / -1;
}

/* Contenu bac (liste dynamique) */
.contenu-list { display: flex; flex-direction: column; gap: 8px; }
.contenu-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.contenu-row .form-ctrl { flex: 1; min-width: 0; }
.contenu-row .qty { flex: 0 0 90px; }
.btn-rm-row {
  background: var(--red-pale);
  color: var(--red);
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 0;
}
.btn-rm-row:hover { background: var(--red); color: #fff; }

/* ----- Filter bar ----- */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-bar .form-ctrl { max-width: 220px; }

/* ============================================================
   Detail bac / étapes
   ============================================================ */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.detail-field { }
.detail-key {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--gray-500);
  margin-bottom: 2px;
}
.detail-val {
  font-size: 14px;
  color: var(--gray-900);
  font-weight: 500;
}
.detail-val.mono { font-family: 'Courier New', monospace; font-size: 15px; font-weight: 700; letter-spacing: .5px; }

/* Timeline */
.timeline {
  position: relative;
  padding-left: 30px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: var(--gray-200);
}
.tl-step {
  position: relative;
  padding: 0 0 20px 16px;
}
.tl-step:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute;
  left: -23px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gray-300);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--gray-300);
}
.tl-dot.done    { background: var(--green);  box-shadow: 0 0 0 2px var(--green); }
.tl-dot.current { background: var(--blue);   box-shadow: 0 0 0 2px var(--blue); }
.tl-dot.anomaly { background: var(--red);    box-shadow: 0 0 0 2px var(--red); }
.tl-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--gray-500); }
.tl-date  { font-size: 14px; font-weight: 600; color: var(--gray-900); }
.tl-info  { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* ============================================================
   Empty state
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 24px;
  color: var(--gray-400);
  text-align: center;
  gap: 8px;
}
.empty-ico  { font-size: 44px; opacity: .5; }
.empty-txt  { font-size: 15px; font-weight: 600; color: var(--gray-500); }
.empty-sub  { font-size: 13px; }

/* ============================================================
   Alerts
   ============================================================ */
.alert {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
  border-left: 3px solid transparent;
}
.alert-info    { background: var(--blue-pale);  color: var(--blue);  border-left-color: var(--blue); }
.alert-success { background: var(--green-pale); color: var(--green); border-left-color: var(--green); }
.alert-warning { background: var(--amber-pale); color: var(--amber); border-left-color: var(--amber); }
.alert-danger  { background: var(--red-pale);   color: var(--red);   border-left-color: var(--red); }

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,20,40,.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-hd {
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--gray-400);
  line-height: 1;
  padding: 0 4px;
}
.modal-close:hover { color: var(--gray-900); }
.modal-body { padding: 22px; overflow-y: auto; }

/* ============================================================
   Toasts
   ============================================================ */
.toast-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--gray-900);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  box-shadow: var(--shadow-md);
  animation: toastIn .2s ease;
  min-width: 220px;
  pointer-events: auto;
}
.toast.t-success { background: var(--green); }
.toast.t-error   { background: var(--red); }
.toast.t-warning { background: var(--amber); }
@keyframes toastIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ============================================================
   Steps nav (wizard)
   ============================================================ */
.steps-nav {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.step-tab {
  flex: 1;
  padding: 10px 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--gray-50);
  border-right: 1px solid var(--gray-200);
  cursor: pointer;
  transition: background .15s;
}
.step-tab:last-child { border-right: none; }
.step-tab.active { background: var(--blue); color: #fff; font-weight: 600; }
.step-tab.done   { background: var(--green-pale); color: var(--green); }

/* ============================================================
   Circuit logistique (livraison detail)
   ============================================================ */
.circuit-bar {
  display: flex;
  align-items: center;
  margin: 16px 0;
  font-size: 13px;
}
.circuit-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 80px;
}
.circuit-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-500);
  border: 2px solid var(--gray-300);
}
.circuit-dot.done    { background: var(--green); color: #fff; border-color: var(--green); }
.circuit-dot.current { background: var(--blue);  color: #fff; border-color: var(--blue); }
.circuit-dot.anomaly { background: var(--red);   color: #fff; border-color: var(--red); }
.circuit-label { font-size: 11px; font-weight: 600; color: var(--gray-500); text-align: center; }
.circuit-line  { flex: 1; height: 2px; background: var(--gray-200); margin: 0 4px; margin-bottom: 20px; }
.circuit-line.done { background: var(--green); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 800px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-backdrop.show { display: block; }
  .main-wrap { margin-left: 0; }
  .menu-toggle { display: block; }
  .form-grid   { grid-template-columns: 1fr; }
  .form-grid.g3 { grid-template-columns: 1fr; }
  .stats-grid  { grid-template-columns: repeat(2, 1fr); }
  .topbar-date { display: none; }
  .page-content { padding: 16px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .circuit-bar { overflow-x: auto; }
}

/* ============================================================
   Bacs dynamiques
   ============================================================ */
.bacs-list { display: flex; flex-direction: column; gap: 10px; }

/* Carte par bac */
.bac-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--white);
}
.bac-card-hd {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}
.bac-idx {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue-dark);
  text-align: center;
  background: var(--blue-pale);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  white-space: nowrap;
}
.bac-contenu {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bac-contenu-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 2px;
}
.bac-contenu-row {
  display: grid;
  grid-template-columns: 1fr 80px auto;
  gap: 6px;
  align-items: center;
}
.bac-contenu-row .form-ctrl { padding: 5px 8px; }
@media (max-width: 600px) {
  .bac-card-hd { grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; }
  .bac-card-hd input:last-of-type { grid-column: 1 / 3; }
}

/* Inventaire */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.inv-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  background: var(--white);
}
.inv-card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-500);
  margin-bottom: 6px;
}
.inv-card-val { font-size: 24px; font-weight: 800; color: var(--blue-dark); }
.inv-card-sub { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.inv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.inv-table th { background: var(--gray-100); padding: 7px 10px; text-align: left; font-size: 12px; border-bottom: 2px solid var(--gray-200); }
.inv-table td { padding: 7px 10px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.inv-progress { height: 6px; background: var(--gray-200); border-radius: 3px; margin-top: 4px; overflow: hidden; }
.inv-progress-bar { height: 100%; background: var(--blue); border-radius: 3px; }

/* Tableau de vérification des scellés */
.scell-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.scell-table th {
  background: var(--blue-dark);
  color: #fff;
  padding: 7px 10px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.scell-table td { padding: 7px 10px; border-bottom: 1px solid var(--gray-200); }
.scell-table tr:last-child td { border-bottom: none; }
.scell-table select { padding: 4px 8px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-size: 13px; }

/* ============================================================
   Nav group labels
   ============================================================ */
.nav-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: rgba(255,255,255,.35);
  padding: 12px 12px 4px;
  margin-top: 4px;
}

/* ============================================================
   Signature capture — fullscreen modal (smartphone-first)
   ============================================================ */
.sig-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
@media (min-width: 600px) {
  .sig-modal-overlay { align-items: center; }
}
.sig-modal {
  background: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-width: 620px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
@media (min-width: 600px) {
  .sig-modal { border-radius: var(--radius); }
}
.sig-modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--blue-dark);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}
.sig-modal-hd button {
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.sig-modal-hd button:hover { color: #fff; }
.sig-modal-body { padding: 16px 18px 22px; }
.sig-hint { font-size: 13px; color: var(--gray-500); margin-bottom: 10px; }
.sig-canvas-wrap {
  border: 2px solid var(--blue);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  margin-bottom: 14px;
}
.sig-canvas {
  display: block;
  width: 100%;
  height: 180px;
  cursor: crosshair;
  touch-action: none;
  background: repeating-linear-gradient(
    180deg,
    transparent 0px,
    transparent 29px,
    #e8ecf2 29px,
    #e8ecf2 30px
  );
}
.sig-btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.sig-preview {
  max-width: 160px;
  max-height: 50px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  display: block;
  background: #fff;
}
.sig-placeholder {
  display: inline-block;
  color: var(--gray-400);
  font-size: 12px;
  font-style: italic;
}

/* ============================================================
   Badges retour
   ============================================================ */
.b-ret-collecte { background: #fef9c3; color: #713f12; }
.b-ret-spay     { background: #dcfce7; color: #166534; }
.b-ret-transit  { background: #ede9fe; color: #5b21b6; }
.b-ret-recu     { background: #e0f2fe; color: #075985; }

/* ============================================================
   Print — masquer l'appli, montrer uniquement le BL
   ============================================================ */
@media print {
  .layout, .toast-stack, .modal-overlay, .sig-modal-overlay { display: none !important; }
}
