/* =========================================================================
   Pâtisserie Manager — thème "Atelier"
   Palette caramel/espresso + accent confiture, typographie Fraunces + Plus
   Jakarta Sans, signature festonnée (bord de boîte à pâtisserie).
   ========================================================================= */

:root {
  --brand: #b8722c;
  --brand-light: #e7a860;
  --brand-dark: #6e3b12;
  --accent: #9c3f49;      /* confiture — alertes, crédit, suppression */
  --accent-soft: #f3dfe0;
  --success: #3f7d58;     /* vert forêt sourd, remplace le vert bootstrap */
  --success-soft: #e1efe4;
  --gros-accent: #7a4fa8;       /* violet prune — distingue la vente en gros du détail */
  --gros-accent-light: #a97fd1;
  --gros-accent-dark: #4e2f70;
  --bg-soft: #faf6ee;
  --surface: #ffffff;
  --ink: #2a1d14;
  --ink-soft: #8d7c68;
  --border: #efe3d2;
  --font-main: 'Plus Jakarta Sans', 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
}

* { font-family: var(--font-main); }

body {
  background: var(--bg-soft);
  font-family: var(--font-main);
  color: var(--ink);
}

a { color: var(--brand-dark); }

::selection { background: var(--brand-light); color: #2a1d14; }

/* Anneau de focus cohérent avec la marque */
.btn:focus, .form-control:focus, .form-select:focus, button:focus-visible, a:focus-visible {
  box-shadow: 0 0 0 .2rem rgba(184,114,44,.22) !important;
  border-color: var(--brand) !important;
}

.sidebar-logo {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 8px;
  background: #fff;
}

.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: 258px;
  background: linear-gradient(195deg, #3d2411 0%, #2a1608 55%, #1c0f06 100%);
  color: #fff;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 24px 20px;
  font-size: 1.1rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.01em;
  border-bottom: 1px solid rgba(255,255,255,.09);
  display: flex;
  align-items: center;
  gap: 11px;
}
.sidebar-brand i {
  font-size: 1.3rem;
  color: var(--brand-light);
}

.sidebar-nav {
  padding: 16px 12px;
}

.sidebar-nav .nav-link {
  color: rgba(255,255,255,.62);
  padding: 11px 14px;
  font-size: .88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 11px;
  margin-bottom: 3px;
  border-left: 3px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.sidebar-nav .nav-link i {
  font-size: 1.05rem;
  width: 18px;
  text-align: center;
  color: rgba(255,255,255,.5);
  transition: color .15s ease;
}

.sidebar-nav .nav-link:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}
.sidebar-nav .nav-link:hover i { color: var(--brand-light); }

.sidebar-nav .nav-link.active {
  background: rgba(232,167,101,.14);
  color: #fff;
  font-weight: 700;
  border-left-color: var(--brand-light);
}
.sidebar-nav .nav-link.active i { color: var(--brand-light); }

.sidebar-section-label {
  color: rgba(255,255,255,.4);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 14px 14px 6px;
}

.cart-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 4px;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  border-radius: 999px;
  vertical-align: middle;
}

/* --- Main content --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background: rgba(250,246,238,.92);
  backdrop-filter: blur(8px);
  padding: 18px 30px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 20;
}
/* Signature : bord festonné, comme un couvercle de boîte à pâtisserie */
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -9px;
  height: 10px;
  background-image: radial-gradient(circle at 10px 0, transparent 9px, var(--bg-soft) 9.5px);
  background-size: 20px 10px;
  background-repeat: repeat-x;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--brand-dark);
  margin: 0;
  flex: 1;
}

.page-content {
  padding: 30px 30px 40px;
}

.topbar-user {
  font-size: .9rem;
}
.topbar-user > a {
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* --- Cards / KPI --- */
.kpi-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(110,59,18,.06);
  padding: 20px;
  height: 100%;
  transition: transform .15s ease, box-shadow .15s ease;
}
.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(110,59,18,.11);
}

.kpi-card .kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
}

.kpi-label {
  color: var(--ink-soft);
  font-size: .8rem;
  font-weight: 500;
}

.card {
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(110,59,18,.05);
}
.card, .kpi-card { background: var(--surface); }

.btn-brand {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-color: var(--brand-dark);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(184,114,44,.32);
}
.btn-brand:hover {
  background: linear-gradient(135deg, var(--brand-dark), #4a2609);
  border-color: var(--brand-dark);
  color: #fff;
}

.btn-outline-secondary {
  border-color: var(--border);
  color: var(--ink-soft);
}
.btn-outline-secondary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}

.btn-outline-danger { border-color: #e4c3c6; color: var(--accent); }
.btn-outline-danger:hover { background: var(--accent); border-color: var(--accent); }

.btn, .form-control, .form-select {
  border-radius: 10px;
}
.form-control, .form-select {
  border-color: var(--border);
}
.form-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink);
}

table.table thead th {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-soft);
  border-bottom-width: 1px;
  border-color: var(--border);
  font-weight: 700;
}

table.table tbody tr {
  border-color: var(--border);
}

table.table tbody tr:hover {
  background: #fbf6ee;
}

.badge { font-weight: 600; letter-spacing: .01em; }

.badge-stock-low, .bg-danger {
  background-color: var(--accent) !important;
}
.badge-stock-ok, .bg-success {
  background-color: var(--success) !important;
}
.bg-warning {
  background-color: #d99a3d !important;
  color: #2a1d14 !important;
}

.alert-success {
  background: var(--success-soft);
  border-color: #cfe4d5;
  color: #244a34;
}
.alert-danger {
  background: var(--accent-soft);
  border-color: #e6cdd0;
  color: #5c2129;
}

/* --- Connexion --- */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background:
    radial-gradient(circle at 20% 20%, rgba(232,167,101,.18), transparent 45%),
    linear-gradient(135deg, #2a1608, #7a4315 65%, #b8722c);
}

.login-card {
  width: 100%;
  max-width: 390px;
  border-radius: 20px;
  padding: 6px;
  position: relative;
  margin-top: 12px;
}
/* Signature : petit feston au-dessus de la carte, comme une nappe à dentelle */
.login-card::before {
  content: "";
  position: absolute;
  left: 10px; right: 10px; top: -9px;
  height: 10px;
  background-image: radial-gradient(circle at 10px 10px, transparent 9px, #fff 9.5px);
  background-size: 20px 10px;
  background-repeat: repeat-x;
  background-position: top;
}

.login-card h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--brand-dark);
}

/* =========================================================================
   Responsivité — desktop / tablette / mobile
   ========================================================================= */

/* Grand écran : on borne la largeur du contenu pour éviter les lignes trop
   longues sur les très grands moniteurs, sans toucher à la sidebar */
@media (min-width: 1600px) {
  .page-content { max-width: 1500px; margin: 0 auto; }
}

/* Tablette et mobile : la sidebar devient un tiroir coulissant */
@media (max-width: 991px) {
  .sidebar {
    position: fixed;
    z-index: 1055;
    left: -270px;
    top: 0;
    transition: left .22s ease;
  }
  .sidebar.show { left: 0; }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20,10,4,.45);
    z-index: 1045;
  }
  .sidebar-backdrop.show { display: block; }

  .page-content { padding: 20px 18px 34px; }
  .topbar { padding: 14px 18px 20px; flex-wrap: wrap; }
  .page-title { font-size: 1.25rem; }
}

/* Tablette (768–991px) : deux colonnes pour les grilles KPI/formulaires larges */
@media (min-width: 768px) and (max-width: 991px) {
  .page-content { padding: 24px 24px 38px; }
}

/* Mobile (≤ 575px) */
@media (max-width: 575px) {
  .page-content { padding: 16px 12px 30px; }
  .topbar { padding: 12px 14px 18px; gap: 8px; }
  .page-title { font-size: 1.1rem; }
  .kpi-value { font-size: 1.2rem; }
  .card, .kpi-card { border-radius: 14px; }
  .topbar-user span small { display: none; } /* rôle masqué, garde le nom */

  /* Boutons et champs : cibles tactiles confortables */
  .btn, .form-control, .form-select { min-height: 42px; }
  .btn-sm { min-height: 34px; }

  /* Les groupes de boutons d'action dans les tableaux passent à la ligne */
  td .btn, td .btn-sm { margin-bottom: 4px; }

  /* En-têtes de page : titre et actions s'empilent proprement */
  .d-flex.justify-content-between.align-items-center.mb-3 {
    align-items: flex-start !important;
  }
}

/* Tableaux : meilleure lisibilité et défilement horizontal net sur petit écran */
@media (max-width: 767px) {
  .table-responsive {
    border-radius: 12px;
  }
  table.table { font-size: .82rem; }
  table.table thead th { white-space: nowrap; }
  table.table td, table.table th { padding: .55rem .6rem; }
}

/* Modales : marges confortables sur mobile */
@media (max-width: 575px) {
  .modal-dialog { margin: 10px; }
}

/* --- Impression des rapports --- */
@media print {
  .sidebar, .topbar, .no-print, .modal, .btn, form button {
    display: none !important;
  }
  .app-wrapper, .main-content, .page-content {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body { background: #fff; }
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    break-inside: avoid;
  }
}

.modal-content {
  border-radius: 18px;
  border: none;
}
.modal-header {
  border-bottom: 1px solid var(--border);
}
.modal-header .modal-title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--brand-dark);
}
.modal-footer {
  border-top: 1px solid var(--border);
}

/* --- Barre de recherche / filtre réutilisable --- */
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.filter-search {
  position: relative;
  flex: 1 1 240px;
}
.filter-search i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #b6a793;
}
.filter-search input {
  padding-left: 36px;
  border-radius: 10px;
}
.filter-toolbar select {
  width: auto;
}
.filter-toolbar .filter-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.table-row-hidden { display: none !important; }

/* --- Aide à l'impression --- */
.print-only { display: none; }
.print-header {
  display: none;
}
@media print {
  .print-only { display: block !important; }
  .print-header {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid var(--ink);
    padding-bottom: 10px;
    margin-bottom: 18px;
  }
  .print-header h2 {
    font-family: var(--font-display);
    font-weight: 700;
    margin: 0;
  }
.print-header .print-meta {
    text-align: right;
    font-size: .85rem;
    color: #444;
  }
}

/* =====================================================================
   Interface POS partagée (caisse détail + vente en gros)
   ===================================================================== */
.pos-wrapper { display: flex; gap: 18px; align-items: flex-start; }
.pos-main { flex: 1 1 auto; min-width: 0; }
.pos-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.pos-search { position: relative; flex: 1 1 260px; }
.pos-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #b6a793; }
.pos-search input { padding-left: 38px; border-radius: 12px; height: 46px; }
.pos-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.pos-cats::-webkit-scrollbar { height: 5px; }
.cat-pill {
  border: 1px solid #eadfcf; background: #fff; color: var(--ink);
  border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: .85rem;
  white-space: nowrap; cursor: pointer; transition: all .15s ease;
}
.cat-pill:hover { border-color: var(--brand-light); }
.cat-pill.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; border-color: var(--brand-dark); box-shadow: 0 4px 12px rgba(193,122,46,.3);
}
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.pos-tile {
  background: #fff; border: 1px solid #f0e7db; border-radius: 16px; padding: 14px 12px;
  cursor: pointer; text-align: left; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  position: relative; overflow: hidden; user-select: none;
}
.pos-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(80,50,20,.12); border-color: var(--brand-light); }
.pos-tile:active { transform: translateY(0) scale(.98); }
.pos-tile .tile-icon {
  width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; color: #fff; margin-bottom: 10px; background: linear-gradient(135deg, var(--brand-light), var(--brand));
}
.pos-tile .tile-nom {
  font-weight: 700; font-size: .88rem; line-height: 1.25; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.2em;
}
.pos-tile .tile-prix { font-weight: 800; color: var(--brand-dark); font-size: .92rem; }
.pos-tile .tile-stock { font-size: .7rem; color: #a89a89; margin-top: 2px; }
.pos-tile.stock-bas .tile-stock { color: #dc3545; font-weight: 600; }
.pos-tile.in-cart { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(193,122,46,.25) inset; }
.pos-tile .tile-qte-badge {
  position: absolute; top: 8px; right: 8px; background: var(--brand-dark); color: #fff;
  font-size: .72rem; font-weight: 800; border-radius: 999px; min-width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center; padding: 0 6px;
}
.pos-empty { grid-column: 1 / -1; text-align: center; color: #a89a89; padding: 50px 0; }
.pos-cart {
  width: 380px; flex: 0 0 380px; position: sticky; top: 88px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 12px 32px rgba(80,50,20,.10);
  display: flex; flex-direction: column; max-height: calc(100vh - 108px);
}
.pos-cart-header {
  padding: 18px 20px 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, #fff8ef, #ffffff);
  border-radius: 20px 20px 0 0;
}
.pos-cart-header h5 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--brand-dark); }
.pos-cart-body { flex: 1; overflow-y: auto; padding: 6px 18px; min-height: 220px; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 12px 2px; border-bottom: 1px dashed var(--border); animation: cartLineIn .18s ease; }
@keyframes cartLineIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.cart-line:last-child { border-bottom: none; }
.cart-line .cl-info { flex: 1; min-width: 0; }
.cart-line .cl-nom { font-weight: 700; font-size: .87rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.cart-line .cl-prix { font-size: .74rem; color: var(--ink-soft); }
.cart-line .cl-qte { display: flex; align-items: center; gap: 4px; }
.cart-line .cl-qte button { width: 27px; height: 27px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--brand-dark); font-weight: 800; line-height: 1; }
.cart-line .cl-qte button:hover { background: var(--brand-light); color: #fff; border-color: var(--brand-light); }
.cart-line .cl-qte input { width: 46px; text-align: center; border: 1px solid var(--border); border-radius: 8px; height: 27px; padding: 0; font-size: .82rem; font-weight: 700; }
.cart-line .cl-soustotal { width: 76px; text-align: right; font-weight: 800; font-size: .83rem; color: var(--ink); }
.cart-line .cl-del { color: var(--accent); background: none; border: none; font-size: 1.05rem; padding: 0 2px; opacity: .6; transition: opacity .12s ease; }
.cart-line .cl-del:hover { opacity: 1; }
.pos-cart-empty { text-align: center; color: var(--ink-soft); padding: 44px 14px; }
.pos-cart-empty i { font-size: 2.1rem; display: block; margin-bottom: 10px; color: var(--brand-light); }
.pos-cart-footer { padding: 12px 18px 16px; border-top: 1px solid var(--border); background: #fffdfa; border-radius: 0 0 20px 20px; }
.pos-total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.pos-total-row .lbl { color: var(--ink-soft); font-weight: 600; font-size: .85rem; }
.pos-total-row .val { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--brand-dark); }
.pay-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 8px; }
.pay-mode-btn {
  border: 1px solid var(--border); background: var(--bg-soft); border-radius: 8px;
  padding: 6px 4px; font-size: .68rem; font-weight: 700; color: var(--ink); text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 4px; line-height: 1;
}
.pay-mode-btn i { font-size: .85rem; }
.pay-mode-btn.active { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; border-color: var(--brand-dark); }
.quick-amounts { display: flex; gap: 5px; margin-bottom: 6px; flex-wrap: wrap; }
.quick-amounts button { flex: 1 1 auto; border: 1px solid var(--border); background: var(--bg-soft); border-radius: 7px; padding: 4px 6px; font-size: .72rem; font-weight: 700; color: var(--brand-dark); }
.pos-change { font-size: .82rem; font-weight: 700; margin-top: 6px; }
.pos-change.ok { color: #198754; }
.pos-change.due { color: #dc3545; }

.pos-cart-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  margin-left: 6px;
  background: var(--brand-dark);
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  border-radius: 999px;
  vertical-align: middle;
}

/* Barre flottante "voir le panier" (mobile uniquement) */
.mobile-cart-bar {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1040;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  border-radius: 16px;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 10px 28px rgba(46,24,8,.35);
  border: none;
  width: calc(100% - 24px);
}
.mobile-cart-bar .mcb-info {
  font-size: .85rem;
  font-weight: 700;
  text-align: left;
}
.mobile-cart-bar .mcb-info small {
  display: block;
  font-weight: 500;
  opacity: .85;
  font-size: .72rem;
}
.mobile-cart-bar .mcb-action {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 991px) and (min-width: 768px) {
  .pos-cart { width: 320px; flex: 0 0 320px; }
}

@media (max-width: 767px) {
  .pos-wrapper { flex-direction: column-reverse; }
  .pos-cart { width: 100%; flex: 1 1 auto; position: relative; top: 0; max-height: none; }
  .mobile-cart-bar.has-items { display: flex; }
  .pos-main { padding-bottom: 70px; }
}

/* --- Variante "vente en gros" : accent violet/prune pour se distinguer du détail --- */
.pos-wrapper.pos-gros .pos-cart-header {
  background: linear-gradient(180deg, #f5eefb, #ffffff);
}
.pos-wrapper.pos-gros .pos-cart-header h5 { color: var(--gros-accent-dark); }
.pos-wrapper.pos-gros .pos-cart {
  border-color: #e7d9f2;
}
.pos-wrapper.pos-gros .pos-tile .tile-icon {
  background: linear-gradient(135deg, var(--gros-accent-light), var(--gros-accent));
}
.pos-wrapper.pos-gros .pos-tile:hover { border-color: var(--gros-accent-light); }
.pos-wrapper.pos-gros .pos-tile.in-cart { border-color: var(--gros-accent); box-shadow: 0 0 0 2px rgba(122,79,168,.22) inset; }
.pos-wrapper.pos-gros .pos-total-row .val { color: var(--gros-accent-dark); }
.pos-wrapper.pos-gros .pos-cart-count-badge { background: var(--gros-accent-dark); }
.pos-wrapper.pos-gros .cart-line .cl-qte button { color: var(--gros-accent-dark); }
.pos-wrapper.pos-gros .cart-line .cl-qte button:hover { background: var(--gros-accent-light); border-color: var(--gros-accent-light); }

.pos-gros-revendeur {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 18px 12px;
  background: #fbf8ff;
}
.pos-gros-revendeur label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 6px;
  display: block;
}
.pos-gros-revendeur .form-select { border-radius: 10px; }
.pos-gros-revendeur .new-revendeur-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--gros-accent-dark);
}
.pos-gros-stock-banner {
  border: 1px solid #f3d9a8;
  background: #fff8ea;
  color: #8a5a12;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.pos-gros-stock-banner i { font-size: 1.2rem; }
.pos-gros-stock-banner a { font-weight: 700; text-decoration: underline; }

.gros-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f5eefb;
  color: var(--gros-accent-dark);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: .72rem;
  font-weight: 700;
}

/* =====================================================================
   Rapport global — titres de section et rendu à l'impression
   ===================================================================== */
.report-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand-light);
}
.report-section-title:first-of-type { margin-top: 6px; }
.report-section-title.report-section-gros {
  color: var(--gros-accent-dark);
  border-bottom-color: var(--gros-accent-light);
}

.badge.bg-brand-plum { background: var(--gros-accent-dark) !important; }

@media print {
  .report-section-title {
    break-after: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .kpi-icon {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .row.g-3 { break-inside: avoid; }
  canvas { max-height: 220px; }
}
