/* ════════════════════════════════════════════════════════════════════════════════════════════════
   NOUVELLE INTERFACE (/pc-beta) — Toni, 30/09/2026.
   Chargée APRÈS base.css et theme-tabs.css, sur <body class="pc-v3 pc-beta"> uniquement : l'ancienne
   interface (/pc-v3) n'est pas touchée. Mêmes écrans, mêmes données, mêmes boutons : seul l'habillage
   change. Principes (maquette validée) : une seule couleur d'accent (le vert-bleu A&D), des gris
   légèrement froids, des chiffres en Geist Mono tabulaire, l'état (vert / orange / rouge) séparé de
   l'accent, peu d'ombres, des lignes fines plutôt que des cartes partout.
   Règles d'interface Vercel appliquées : focus visible, pas de « transition: all », mouvements
   réduits respectés, chiffres tabulaires, débordements contenus.
   Thème clair seulement pour l'instant : plusieurs écrans ont encore des blancs codés en dur ; le
   sombre viendra écran par écran.
   ════════════════════════════════════════════════════════════════════════════════════════════════ */

body.pc-v3.pc-beta {
  --b-bg: #f3f5f8;
  --b-surface: #ffffff;
  --b-surface-2: #eef1f5;
  --b-line: #dde3ea;
  --b-line-strong: #c3ccd6;
  --b-fg: #101828;
  --b-fg-2: #4b5565;
  --b-fg-3: #7b8794;
  --b-accent: #0d8a7c;
  --b-accent-ink: #ffffff;
  --b-accent-soft: #dcf2ee;
  --b-good: #1f9d55;
  --b-good-soft: #e1f5e9;
  --b-warn: #b86e00;
  --b-warn-soft: #fff1d9;
  --b-bad: #d43d3d;
  --b-bad-soft: #fde6e6;
  --b-radius: 12px;
  --b-radius-lg: 16px;
  --b-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px rgba(16, 24, 40, .05);
  --b-font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --b-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Les jetons de l'ancien thème pointent sur les nouveaux : tout écran qui les utilise suit. */
  --bg: var(--b-bg);
  --panel: var(--b-surface);
  --ink: var(--b-fg);
  --muted: var(--b-fg-2);
  --line: var(--b-line);
  --teal: var(--b-accent);
  --blue: var(--b-accent);
  --shadow: var(--b-shadow);
  --tab-ink: var(--b-fg);
  --tab-muted: var(--b-fg-3);
  --tab-line: var(--b-line);
  --tab-accent: var(--b-accent);
  --sidebar-width: 236px;

  font-family: var(--b-font) !important;
  color: var(--b-fg);
  background: var(--b-bg) !important;
  -webkit-tap-highlight-color: transparent;
}
body.pc-v3.pc-beta button,
body.pc-v3.pc-beta input,
body.pc-v3.pc-beta select,
body.pc-v3.pc-beta textarea { font-family: inherit; }

body.pc-v3.pc-beta :focus-visible {
  outline: 2px solid var(--b-accent) !important;
  outline-offset: 2px;
}

body.pc-v3.pc-beta .num,
body.pc-v3.pc-beta table td,
body.pc-v3.pc-beta .summary-card strong,
body.pc-v3.pc-beta .stock-kpi strong,
body.pc-v3.pc-beta .stats-kpi .val,
body.pc-v3.pc-beta .kpi-value {
  font-variant-numeric: tabular-nums;
}
body.pc-v3.pc-beta .num,
body.pc-v3.pc-beta .summary-card strong,
body.pc-v3.pc-beta .stock-kpi strong,
body.pc-v3.pc-beta .kpi-value { font-family: var(--b-mono); letter-spacing: -.01em; }

body.pc-v3.pc-beta .muted { color: var(--b-fg-2) !important; }

/* ── Cadre : menu, zone principale, barre du haut ─────────────────────────────────────────── */
body.pc-v3.pc-beta .app-shell,
body.pc-v3.pc-beta .main { background: var(--b-bg) !important; }
body.pc-v3.pc-beta .main { padding: 0 28px 40px !important; }

body.pc-v3.pc-beta .sidebar {
  background: var(--b-surface) !important;
  border-right: 1px solid var(--b-line) !important;
  box-shadow: none !important;
  padding: 16px 12px !important;
}
body.pc-v3.pc-beta .brand { min-height: 0 !important; padding: 4px 6px 14px !important; margin-bottom: 6px !important; }
/* Le menu est une colonne de hauteur fixe : quand la liste est plus haute que l'écran (grand zoom),
   le logo et « Voir en tant que » se faisaient écraser l'un sur l'autre. Ils gardent leur taille,
   c'est la liste qui défile. */
body.pc-v3.pc-beta .sidebar > :is(.brand, #basculeProfil) { flex-shrink: 0 !important; }
body.pc-v3.pc-beta .sidebar > .nav-list { min-height: 0; overflow-y: auto; }
body.pc-v3.pc-beta .brand::after { background: var(--b-line) !important; }
body.pc-v3.pc-beta .brand-mark {
  width: 32px !important; height: 32px !important; border-radius: 9px !important;
  background: var(--b-accent) !important; color: var(--b-accent-ink) !important;
  box-shadow: none !important; font-size: .7rem !important; font-weight: 700 !important; letter-spacing: -.01em !important;
}
body.pc-v3.pc-beta .brand strong { font-size: .95rem !important; font-weight: 650 !important; color: var(--b-fg) !important; letter-spacing: -.01em; }
body.pc-v3.pc-beta .brand span { font-size: .68rem !important; letter-spacing: .02em !important; text-transform: none !important; color: var(--b-fg-3) !important; }

body.pc-v3.pc-beta .nav-list { gap: 1px !important; }
body.pc-v3.pc-beta .nav-section-title {
  padding: 14px 10px 5px !important;
  font-size: .66rem !important; font-weight: 650 !important; letter-spacing: .09em !important;
  text-transform: uppercase; color: var(--b-fg-3) !important; background: none !important; border: 0 !important;
}
body.pc-v3.pc-beta .nav-item {
  display: flex !important; align-items: center !important; gap: 10px !important;
  min-height: 0 !important; padding: 7px 10px !important;
  border: 0 !important; border-left: 0 !important; border-radius: 8px !important;
  background: transparent !important; box-shadow: none !important;
  color: var(--b-fg-2) !important; transform: none !important;
  transition: background-color .12s, color .12s !important;
}
body.pc-v3.pc-beta .nav-item:hover { background: var(--b-surface-2) !important; color: var(--b-fg) !important; box-shadow: none !important; }
body.pc-v3.pc-beta .nav-item.active {
  background: var(--b-accent-soft) !important; color: var(--b-fg) !important;
}
body.pc-v3.pc-beta .nav-item .nav-symbol,
body.pc-v3.pc-beta .nav-symbol {
  width: 18px !important; height: 18px !important; min-width: 18px; border-radius: 0 !important;
  background: none !important; box-shadow: none !important; color: var(--b-fg-3) !important;
  display: grid !important; place-items: center !important; margin: 0 !important;
}
body.pc-v3.pc-beta .nav-symbol svg { width: 17px !important; height: 17px !important; }
body.pc-v3.pc-beta .nav-item.active .nav-symbol { color: var(--b-accent) !important; }
body.pc-v3.pc-beta .nav-item > span:not(.nav-symbol) { font-size: .86rem !important; font-weight: 500 !important; line-height: 1.2 !important; color: inherit !important; }
body.pc-v3.pc-beta .nav-item.active > span:not(.nav-symbol) { font-weight: 650 !important; }
body.pc-v3.pc-beta .nav-item small { display: none !important; }
/* Une entrée de menu NON PERMISE reste cachée (acces.js pose hidden + display:none en ligne) : le
   « display: flex !important » ci-dessus l'emportait sur le style en ligne — « Mon compte » apparaissait
   chez Toni et renvoyait au Live (01/10/2026), et un compte invité voyait des entrées interdites. */
body.pc-v3.pc-beta .nav-item[hidden],
body.pc-v3.pc-beta .nav-section-title[hidden] { display: none !important; }

body.pc-v3.pc-beta .sidebar-toggle {
  background: var(--b-surface) !important; border: 1px solid var(--b-line) !important;
  box-shadow: none !important; color: var(--b-fg-2) !important; border-radius: 8px !important;
}
body.pc-v3.pc-beta.sidebar-collapsed .nav-item { width: 44px !important; min-height: 40px !important; padding: 8px !important; justify-content: center !important; }

body.pc-v3.pc-beta .topbar {
  position: sticky !important; top: 0 !important; z-index: 20 !important;
  min-height: 0 !important; margin: 0 -28px 20px !important; padding: 14px 28px !important;
  background: color-mix(in srgb, var(--b-bg) 88%, transparent) !important;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--b-line) !important;
}
body.pc-v3.pc-beta .topbar .eyebrow { display: none !important; }
body.pc-v3.pc-beta #pageTitle {
  font-size: 1.4rem !important; font-weight: 650 !important; letter-spacing: -.02em !important;
  color: var(--b-fg) !important; margin: 0 !important; text-wrap: balance;
}
body.pc-v3.pc-beta .topbar-actions { gap: 8px !important; }
body.pc-v3.pc-beta .zoom-control {
  background: var(--b-surface) !important; border: 1px solid var(--b-line) !important;
  border-radius: 9px !important; box-shadow: none !important;
}
body.pc-v3.pc-beta .gsearch input {
  height: 34px; border-radius: 9px !important; border: 1px solid var(--b-line) !important;
  background: var(--b-surface) !important; box-shadow: none !important;
}
body.pc-v3.pc-beta .topbar-actions .ghost-btn,
body.pc-v3.pc-beta .topbar-actions .primary-btn {
  height: 34px !important; min-height: 34px !important; padding: 0 12px !important;
  display: inline-flex !important; align-items: center !important; font-size: .82rem !important;
}

/* ── Boutons ──────────────────────────────────────────────────────────────────────────────── */
body.pc-v3.pc-beta .ghost-btn,
body.pc-v3.pc-beta .fcf-btn,
body.pc-v3.pc-beta .fcf-btn-secondary,
body.pc-v3.pc-beta .fid-btn,
body.pc-v3.pc-beta .mv-btn,
body.pc-v3.pc-beta .btn-actualiser,
body.pc-v3.pc-beta .machine-filter-btn {
  background: var(--b-surface) !important;
  color: var(--b-fg) !important;
  border: 1px solid var(--b-line) !important;
  border-radius: 9px !important;
  box-shadow: none !important;
  font-weight: 500 !important;
  transform: none !important;
  transition: border-color .12s, background-color .12s, color .12s !important;
}
body.pc-v3.pc-beta .ghost-btn:hover,
body.pc-v3.pc-beta .fcf-btn:hover,
body.pc-v3.pc-beta .fcf-btn-secondary:hover,
body.pc-v3.pc-beta .fid-btn:hover,
body.pc-v3.pc-beta .mv-btn:hover,
body.pc-v3.pc-beta .machine-filter-btn:hover { border-color: var(--b-line-strong) !important; background: var(--b-surface-2) !important; }
body.pc-v3.pc-beta .primary-btn,
body.pc-v3.pc-beta .fcf-btn-primary {
  background: var(--b-accent) !important;
  color: var(--b-accent-ink) !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  box-shadow: none !important;
  font-weight: 600 !important;
  transform: none !important;
  transition: filter .12s !important;
}
body.pc-v3.pc-beta .primary-btn:hover,
body.pc-v3.pc-beta .fcf-btn-primary:hover { filter: brightness(1.06); }
body.pc-v3.pc-beta .danger-btn { border-radius: 9px !important; box-shadow: none !important; }
body.pc-v3.pc-beta .machine-filter-btn.active,
body.pc-v3.pc-beta .ghost-btn.is-active {
  background: var(--b-accent-soft) !important; border-color: var(--b-accent) !important; color: var(--b-fg) !important;
}

/* ── Blocs et cartes ──────────────────────────────────────────────────────────────────────── */
body.pc-v3.pc-beta .hero-panel,
body.pc-v3.pc-beta .card,
body.pc-v3.pc-beta .stock-card,
body.pc-v3.pc-beta .stats-card,
body.pc-v3.pc-beta .mc-card,
body.pc-v3.pc-beta .mm-card,
body.pc-v3.pc-beta .mp2-card,
body.pc-v3.pc-beta .stock-table-wrap,
body.pc-v3.pc-beta .live-orders-card,
body.pc-v3.pc-beta .loading-card,
body.pc-v3.pc-beta .empty-state {
  background: var(--b-surface) !important;
  border: 1px solid var(--b-line) !important;
  border-radius: var(--b-radius-lg) !important;
  box-shadow: none !important;
}
body.pc-v3.pc-beta .hero-panel { padding: 18px 20px !important; margin-bottom: 16px !important; }
body.pc-v3.pc-beta .panel-title,
body.pc-v3.pc-beta .hero-panel h2,
body.pc-v3.pc-beta .stock-card h3 {
  font-size: 1rem !important; font-weight: 650 !important; letter-spacing: -.01em !important; color: var(--b-fg) !important;
}
body.pc-v3.pc-beta .summary-card,
body.pc-v3.pc-beta .stock-kpi,
body.pc-v3.pc-beta .fid-stat {
  background: var(--b-surface) !important;
  border: 1px solid var(--b-line) !important;
  border-radius: var(--b-radius) !important;
  box-shadow: none !important;
}
body.pc-v3.pc-beta .summary-card strong,
body.pc-v3.pc-beta .stock-kpi strong { font-weight: 600 !important; color: var(--b-fg) !important; }
body.pc-v3.pc-beta .summary-card span,
body.pc-v3.pc-beta .stock-kpi span { color: var(--b-fg-2) !important; }
body.pc-v3.pc-beta .empty-state { color: var(--b-fg-3) !important; }

/* ── Tableaux ─────────────────────────────────────────────────────────────────────────────── */
body.pc-v3.pc-beta table th {
  background: transparent !important;
  color: var(--b-fg-3) !important;
  font-size: .68rem !important; font-weight: 650 !important; letter-spacing: .07em !important; text-transform: uppercase;
  border-bottom: 1px solid var(--b-line) !important;
}
body.pc-v3.pc-beta table td { border-bottom: 1px solid var(--b-line) !important; color: var(--b-fg); }
body.pc-v3.pc-beta table tbody tr:hover td { background: color-mix(in srgb, var(--b-surface-2) 65%, transparent) !important; }

/* ── Champs ───────────────────────────────────────────────────────────────────────────────── */
body.pc-v3.pc-beta input[type="text"],
body.pc-v3.pc-beta input[type="search"],
body.pc-v3.pc-beta input[type="number"],
body.pc-v3.pc-beta input[type="date"],
body.pc-v3.pc-beta input[type="email"],
body.pc-v3.pc-beta input[type="password"],
body.pc-v3.pc-beta input[type="tel"],
body.pc-v3.pc-beta select,
body.pc-v3.pc-beta textarea,
body.pc-v3.pc-beta .mm-input {
  border: 1px solid var(--b-line) !important;
  border-radius: 9px !important;
  background: var(--b-surface) !important;
  color: var(--b-fg) !important;
  box-shadow: none !important;
}
body.pc-v3.pc-beta input:focus,
body.pc-v3.pc-beta select:focus,
body.pc-v3.pc-beta textarea:focus {
  border-color: var(--b-accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--b-accent) 18%, transparent) !important;
  outline: none !important;
}

/* ── Fenêtres ─────────────────────────────────────────────────────────────────────────────── */
body.pc-v3.pc-beta .modal-overlay { background: rgba(16, 24, 40, .38) !important; }
body.pc-v3.pc-beta .modal {
  border-radius: var(--b-radius-lg) !important;
  border: 1px solid var(--b-line) !important;
  box-shadow: 0 24px 60px rgba(16, 24, 40, .22) !important;
}
body.pc-v3.pc-beta .modal-head {
  background: var(--b-surface) !important; color: var(--b-fg) !important;
  border-bottom: 1px solid var(--b-line) !important;
}
body.pc-v3.pc-beta .modal-head h2,
body.pc-v3.pc-beta .modal-head h3,
body.pc-v3.pc-beta .modal-head strong { color: var(--b-fg) !important; }
body.pc-v3.pc-beta .modal-head p,
body.pc-v3.pc-beta .modal-head span { color: var(--b-fg-2) !important; }

/* ── Onglets (Stock, Paiements, Stats, Gestion machine) ───────────────────────────────────── */
body.pc-v3.pc-beta .stock-tab.active,
body.pc-v3.pc-beta .payments-mode-tabs button.active,
body.pc-v3.pc-beta .payments-mode-tabs button.on,
body.pc-v3.pc-beta .stats-tabs button.on {
  background: transparent !important;
  border-bottom: 2px solid var(--b-accent) !important;
  color: var(--b-fg) !important;
  font-weight: 650 !important;
}

/* ════ TOUS LES ÉCRANS : le langage du Live (Toni, 01/10/2026 : « ok nickel, applique à tout ») ═════════
   Relevé écran par écran sur la démo (sonde des éléments hors style) : tuiles de chiffres en dégradés de
   couleur, bandeaux pleins (bleu, rouge, violet, bleu nuit), puces « sélectionnées » violettes ou bleues,
   badges violets, barres en dégradé. Tout revient à : surfaces blanches et lignes fines, UNE couleur
   d'accent pour ce qui est choisi ou à faire, vert / orange / rouge seulement pour un état. */

/* Tuiles de chiffres (Stock, Hebdo, Paiements, Charges, Fournisseurs) : blanches, chiffre en Geist Mono. */
body.pc-v3.pc-beta :is(.stock-kpi, .charges-kpi, .fcf-stat-card) {
  background: var(--b-surface) !important; background-image: none !important; color: var(--b-fg) !important;
  border: 1px solid var(--b-line) !important; border-radius: var(--b-radius) !important; box-shadow: none !important;
  text-align: left !important; filter: none !important; transform: none !important; min-height: 0 !important;
}
body.pc-v3.pc-beta :is(.stock-kpi, .charges-kpi, .fcf-stat-card)::before,
body.pc-v3.pc-beta :is(.stock-kpi, .charges-kpi, .fcf-stat-card)::after { display: none !important; }
body.pc-v3.pc-beta :is(.stock-kpi > span, .charges-kpi-label, .fcf-stat-label) {
  color: var(--b-fg-3) !important; opacity: 1 !important; padding-right: 0 !important;
  font-size: .68rem !important; font-weight: 650 !important; letter-spacing: .07em !important; text-transform: uppercase;
}
body.pc-v3.pc-beta :is(.stock-kpi strong, .charges-kpi-value, .fcf-stat-value) {
  color: var(--b-fg) !important; font-family: var(--b-mono) !important; font-weight: 600 !important; letter-spacing: -.02em !important;
}
body.pc-v3.pc-beta :is(.stock-kpi small, .charges-kpi small, .charges-kpi .muted) { color: var(--b-fg-3) !important; opacity: 1 !important; }
body.pc-v3.pc-beta .fcf-stat-card.s-paye .fcf-stat-value { color: var(--b-good) !important; }
body.pc-v3.pc-beta .fcf-stat-card.s-impaye .fcf-stat-value { color: var(--b-bad) !important; }
body.pc-v3.pc-beta .fcf-stat-card.s-nonlivre .fcf-stat-value { color: var(--b-warn) !important; }
body.pc-v3.pc-beta .fcf-stat-card.clickable:hover { border-color: var(--b-line-strong) !important; background: var(--b-surface-2) !important; }
body.pc-v3.pc-beta .charges-kpi:nth-child(2) .charges-kpi-value { color: var(--b-good) !important; }
body.pc-v3.pc-beta .charges-kpi:nth-child(3) .charges-kpi-value { color: var(--b-bad) !important; }
body.pc-v3.pc-beta .charges-kpi-bar { background: var(--b-surface-2) !important; }
body.pc-v3.pc-beta .charges-kpi-bar > i { background: var(--b-accent) !important; }

/* Bandeaux pleins en tête d'écran (Gestion machine, Mécanisme, Optimisation, Promo, Fidélité, Machine
   virtuelle, Fournisseurs, analyse IA) : une carte blanche, l'icône sur un carré d'accent clair. */
body.pc-v3.pc-beta :is(.mf-hero, .mc-hero, .opt-intro, .mp2-hero, .mv-intro, .mm-hero, .fcf-panel-header, .ai-card) {
  background: var(--b-surface) !important; background-image: none !important; color: var(--b-fg) !important;
  border: 1px solid var(--b-line) !important; border-radius: var(--b-radius-lg) !important; box-shadow: none !important;
}
body.pc-v3.pc-beta :is(.mf-hero, .mc-hero, .opt-intro, .mp2-hero, .mv-intro, .mm-hero, .fcf-panel-header, .ai-card) :is(h1, h2, h3, h4, strong) {
  color: var(--b-fg) !important; letter-spacing: -.01em;
}
body.pc-v3.pc-beta :is(.mf-hero, .mc-hero, .opt-intro, .mp2-hero, .mv-intro, .mm-hero, .fcf-panel-header, .ai-card) :is(p, small, .aisub, li) {
  color: var(--b-fg-2) !important; opacity: 1 !important;
}
body.pc-v3.pc-beta :is(.mf-hero, .mc-hero, .mp2-hero, .mm-hero) .ic { background: var(--b-accent-soft) !important; color: var(--b-accent) !important; }
body.pc-v3.pc-beta .ai-card :is(div, span):not([class*="btn"]) { color: inherit; }

/* Ce qui est CHOISI (puces, filtres, segments, périodes) : la couleur d'accent, partout la même. */
body.pc-v3.pc-beta :is(.md-chip.on, .met-seg button.on, .tg button.on, .mh-chip.on, .mh-mchip.on, .mc-act.on, .mv-draft.on,
  .mv-qtog button.on, .preset.on, .mm-pf.on, .bnf-tri button.on, .stats-periode button.on, .stats-mfilter button.on,
  .invd-dec button.on, .voucher-cls-btn.on) {
  background: var(--b-accent) !important; background-image: none !important; border-color: var(--b-accent) !important;
  color: var(--b-accent-ink) !important; box-shadow: none !important;
}
body.pc-v3.pc-beta :is(.mm-mtile.on, .ec-tuile.on, .fid-tile.on) {
  border-color: var(--b-accent) !important; box-shadow: 0 0 0 3px var(--b-accent-soft) !important; background: var(--b-surface) !important;
}

/* Boutons d'action colorés (créer, ajouter, analyser) : le bouton principal, couleur d'accent. */
body.pc-v3.pc-beta :is(.mm-create, .rel-add-btn, .ai-btn, #aiAnalyseBtn) {
  background: var(--b-accent) !important; background-image: none !important; color: var(--b-accent-ink) !important;
  border: 1px solid transparent !important; border-radius: 9px !important; box-shadow: none !important; font-weight: 600 !important;
}
body.pc-v3.pc-beta #stockNegativeBtn { background: var(--b-surface) !important; color: var(--b-warn) !important; border: 1px solid color-mix(in srgb, var(--b-warn) 40%, var(--b-line)) !important; }

/* Étiquettes et badges : neutres, sauf quand ils disent un état. */
body.pc-v3.pc-beta :is(.payment-month-badge, .weekly-week-badge, .mm-tag, .mm-vbadge) {
  background: var(--b-surface-2) !important; background-image: none !important; color: var(--b-fg-2) !important;
  border: 0 !important; font-weight: 600 !important; border-radius: 6px !important; box-shadow: none !important;
}
body.pc-v3.pc-beta .mp2-sec { color: var(--b-fg-3) !important; }
body.pc-v3.pc-beta .mm-mvirt { border: 1.5px dashed var(--b-line-strong) !important; background: var(--b-surface) !important; }
body.pc-v3.pc-beta .mm-mvirt .nm { color: var(--b-fg) !important; }
body.pc-v3.pc-beta .mm-grid .pr, body.pc-v3.pc-beta .mm-card .pr { color: var(--b-fg) !important; }

/* Hebdo : semaine en cours, meilleur jour et jauges, à plat. */
body.pc-v3.pc-beta .weekly-summary-card.current { border-color: var(--b-accent) !important; box-shadow: 0 0 0 3px var(--b-accent-soft) !important; }
/* Hebdo : chaque journée teintée sur l'échelle de Toni (01/10/2026) — rouge sous 500 €, vert à partir de
   1 000 €, dégradé entre les deux (--h, posé par weekly.js) ; un jour sans vente reste gris ; le meilleur
   jour de la semaine cerclé d'or. */
body.pc-v3.pc-beta .weekly-day-cell { background: var(--b-surface-2) !important; border-color: var(--b-line) !important; box-shadow: none !important; }
body.pc-v3.pc-beta .weekly-day-cell.a-vendu {
  background: hsl(var(--h) 85% 93%) !important; border-color: hsl(var(--h) 55% 72%) !important;
}
body.pc-v3.pc-beta .weekly-day-cell.best { border: 2px solid #e0a106 !important; box-shadow: 0 0 0 3px color-mix(in srgb, #e0a106 22%, transparent) !important; }
body.pc-v3.pc-beta .weekly-day-meter > b { background: hsl(var(--h, 0) 70% 44%) !important; }
body.pc-v3.pc-beta .weekly-day-cell.lvl-low .weekly-day-meter > b { background: var(--b-bad) !important; }
body.pc-v3.pc-beta .weekly-day-cell.lvl-mid .weekly-day-meter > b { background: var(--b-warn) !important; }
body.pc-v3.pc-beta :is(.weekly-day-cell.lvl-good, .weekly-day-cell.lvl-top) .weekly-day-meter > b { background: var(--b-good) !important; }
body.pc-v3.pc-beta :is(.weekly-bars, .chart-bg) { background: var(--b-surface-2) !important; background-image: none !important; border-color: var(--b-line) !important; }
body.pc-v3.pc-beta :is(.weekly-bar span, .payments-month-bar span) { background: var(--b-accent) !important; box-shadow: none !important; }
body.pc-v3.pc-beta .mm-mgo { color: var(--b-accent) !important; }
body.pc-v3.pc-beta :is(.mm-retour, .mf-back) {
  background: var(--b-surface) !important; background-image: none !important; color: var(--b-fg) !important;
  border: 1px solid var(--b-line) !important; border-radius: 9px !important; box-shadow: none !important; font-weight: 600 !important;
}
body.pc-v3.pc-beta :is(.mm-retour, .mf-back):hover { border-color: var(--b-line-strong) !important; background: var(--b-surface-2) !important; }

/* Paiements : la période en cours sur fond d'accent très clair. */
body.pc-v3.pc-beta .payments-table .payment-row-current td { background: color-mix(in srgb, var(--b-accent-soft) 55%, transparent) !important; }
body.pc-v3.pc-beta .payments-table tbody tr:hover td { background: color-mix(in srgb, var(--b-surface-2) 70%, transparent) !important; }

/* Réglages : tuiles d'entrée, icône sur fond d'accent clair, la tuile ouverte en accent. */
body.pc-v3.pc-beta .rs-tile-ico { background: var(--b-accent-soft) !important; background-image: none !important; }
body.pc-v3.pc-beta .rs-tile.actif { background: var(--b-surface) !important; background-image: none !important; border-color: var(--b-accent) !important; box-shadow: 0 0 0 3px var(--b-accent-soft) !important; }
body.pc-v3.pc-beta .rs-tile.actif .rs-tile-ico { background: var(--b-accent) !important; }

/* Fournisseurs : archives et en-têtes de fenêtres à plat. */
body.pc-v3.pc-beta :is(.fcf-archive-toggle, .fcf-modal-header) {
  background: var(--b-surface) !important; background-image: none !important; color: var(--b-fg) !important; border-color: var(--b-line) !important;
}
body.pc-v3.pc-beta .fcf-modal-header :is(h2, h3, p, span) { color: var(--b-fg) !important; }

/* Couleurs posées EN LIGNE dans le HTML de certains écrans (Compta : barres violettes, chiffres colorés) :
   on les reconnaît à leur valeur. Violet = l'ancienne couleur d'accent, elle devient l'accent. */
body.pc-v3.pc-beta [style*="linear-gradient(180deg,#a78bfa,#7c3aed)"] { background: var(--b-accent) !important; }
body.pc-v3.pc-beta [style*="linear-gradient(180deg,#fca5a5,#ef4444)"] { background: color-mix(in srgb, var(--b-bad) 70%, var(--b-surface)) !important; }
body.pc-v3.pc-beta [style*="linear-gradient(180deg,#fafcff,#f6f8fd)"] { background: var(--b-surface-2) !important; }
body.pc-v3.pc-beta [style*="color:#7c3aed"] { color: var(--b-accent) !important; }
body.pc-v3.pc-beta [style*="font-size:1.5rem;font-weight:800;color:"] { color: var(--b-fg) !important; font-family: var(--b-mono); font-weight: 600 !important; }
body.pc-v3.pc-beta [style*="background:#fff;border:1px solid #eef2f7;border-radius:15px"] { border-color: var(--b-line) !important; border-radius: var(--b-radius) !important; }

/* ════ LIVE (live.js › renderLiveBeta) — le fil des ventes au centre, le jour et les machines en colonne ════ */
body.pc-beta .lb { display: flex; flex-direction: column; gap: 14px; }
body.pc-beta .lb-label { font-size: .68rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--b-fg-3); }
body.pc-beta .lb-faint { color: var(--b-fg-3); }
body.pc-beta .lb-small { font-size: .78rem; }
body.pc-beta .lb-up { color: var(--b-good); font-weight: 600; }
body.pc-beta .lb-down { color: var(--b-bad); font-weight: 600; }
body.pc-beta .lb-cents { font-size: .72em; color: var(--b-fg-2); font-weight: 500; letter-spacing: 0; }
body.pc-beta .lb-spacer { flex: 1; }
body.pc-beta .lb-vide { color: var(--b-fg-3); padding: 28px 20px; text-align: center; }

body.pc-beta .lb-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px;
  font-size: .74rem; font-weight: 600; white-space: nowrap; line-height: 1.6;
}
body.pc-beta .lb-pill.good { background: var(--b-good-soft); color: var(--b-good); }
body.pc-beta .lb-pill.warn { background: var(--b-warn-soft); color: var(--b-warn); }
body.pc-beta .lb-pill.bad { background: var(--b-bad-soft); color: var(--b-bad); }
body.pc-beta .lb-pill.neutral { background: var(--b-surface-2); color: var(--b-fg-2); }
body.pc-beta .lb-tag {
  display: inline-flex; align-items: center; margin-left: 6px; padding: 0 7px; border-radius: 6px;
  background: var(--b-surface-2); color: var(--b-fg-2); font-size: .72rem; font-weight: 500; line-height: 1.6; white-space: nowrap;
}
body.pc-beta .lb-row-main .fid-tag { margin-left: 6px; }

body.pc-beta .lb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.pc-beta .lb-btn {
  height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--b-line); background: var(--b-surface);
  color: var(--b-fg); font-weight: 500; font-size: .82rem; cursor: pointer; white-space: nowrap;
  transition: border-color .12s, background-color .12s;
}
body.pc-beta .lb-btn:hover { border-color: var(--b-line-strong); background: var(--b-surface-2); }
body.pc-beta .lb-btn.primary { background: var(--b-accent); color: var(--b-accent-ink); border-color: transparent; font-weight: 600; }
body.pc-beta .lb-btn.primary:hover { filter: brightness(1.06); background: var(--b-accent); }
body.pc-beta .lb-btn.ntfy-toggle.on { border-color: color-mix(in srgb, var(--b-good) 45%, var(--b-line)); color: var(--b-good); }
body.pc-beta .lb-btn.ntfy-toggle.off { color: var(--b-fg-3); }
body.pc-beta .lb-btn:disabled { opacity: .6; cursor: default; }

body.pc-beta .lb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
body.pc-beta .lb-card,
body.pc-beta .lb-feed { border: 1px solid var(--b-line); border-radius: var(--b-radius-lg); background: var(--b-surface); overflow: hidden; }
body.pc-beta .lb-card-head,
body.pc-beta .lb-feed-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--b-line); }
body.pc-beta .lb-card-head h2,
body.pc-beta .lb-feed-head h2 { font-size: 1rem; font-weight: 650; margin: 0; letter-spacing: -.01em; color: var(--b-fg); }
body.pc-beta .lb-feed-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* Le fil : une ligne par vente, la plus récente en haut. */
body.pc-beta .lb-feed-rows { display: flex; flex-direction: column; }
body.pc-beta .lb-row {
  display: grid; grid-template-columns: 50px 10px minmax(0, 1fr) auto 104px; gap: 12px; align-items: center;
  padding: 11px 18px; border-top: 1px solid var(--b-line); cursor: pointer;
  transition: background-color .12s;
}
body.pc-beta .lb-row:first-child { border-top: 0; }
body.pc-beta .lb-row:hover { background: color-mix(in srgb, var(--b-surface-2) 70%, transparent); }
body.pc-beta .lb-row-time { color: var(--b-fg-2); font-size: .86rem; font-weight: 500; }
body.pc-beta .lb-row-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
body.pc-beta .lb-row-main > b { font-weight: 550; font-size: .92rem; color: var(--b-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.pc-beta .lb-row-main > span { font-size: .78rem; color: var(--b-fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.pc-beta .lb-row-state { display: flex; justify-content: flex-end; }
body.pc-beta .lb-row-amt { text-align: right; font-weight: 600; font-size: 1rem; color: var(--b-fg); }
body.pc-beta .lb-row-amt.is-tente { color: var(--b-fg-3); font-weight: 500; text-decoration: line-through; }
body.pc-beta .lb-row.order-hidden { opacity: .45; }
body.pc-beta .lb-row.is-refund .lb-row-amt { color: var(--b-fg-3); text-decoration: line-through; }
body.pc-beta .lb-row.is-fail { background: color-mix(in srgb, var(--b-bad-soft) 40%, transparent); }
body.pc-beta .lb-row.is-encours { cursor: default; background: color-mix(in srgb, var(--b-warn-soft) 80%, var(--b-surface)); }
body.pc-beta .lb-row.is-new { animation: lbNouvelle 2.4s ease-out; }
@keyframes lbNouvelle { 0% { background: color-mix(in srgb, var(--b-accent-soft) 100%, transparent); } 100% { background: transparent; } }
body.pc-beta .lb-live { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 650; color: var(--b-warn); white-space: nowrap; }
body.pc-beta .lb-live i { width: 8px; height: 8px; border-radius: 999px; background: var(--b-warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--b-warn) 22%, transparent); animation: lbPouls 1.4s ease-in-out infinite; }
@keyframes lbPouls { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--b-warn) 8%, transparent); } }
body.pc-beta .lb-feed-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--b-line); background: var(--b-surface-2); }

/* La colonne : le chiffre du jour, puis les machines. */
body.pc-beta .lb-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
body.pc-beta .lb-today { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
body.pc-beta .lb-big { font-size: 2.7rem; font-weight: 600; line-height: 1; letter-spacing: -.035em; color: var(--b-fg); }
body.pc-beta .lb-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; padding: 10px 0; border-top: 1px solid var(--b-line); border-bottom: 1px solid var(--b-line); }
body.pc-beta .lb-trio > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.pc-beta .lb-trio b { font-size: 1.05rem; font-weight: 600; color: var(--b-fg); white-space: nowrap; }
body.pc-beta .lb-trio span { font-size: .72rem; color: var(--b-fg-3); }
body.pc-beta .lb-prev { display: flex; flex-direction: column; gap: 6px; text-align: left; background: none; border: 0; padding: 4px 0 0; cursor: pointer; color: inherit; font: inherit; width: 100%; }
body.pc-beta .lb-prev-track { position: relative; display: block; height: 8px; border-radius: 999px; background: var(--b-surface-2); overflow: hidden; }
body.pc-beta .lb-prev-track > i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--b-accent); }
body.pc-beta .lb-prev-legend { display: flex; justify-content: space-between; gap: 10px; font-size: .82rem; color: var(--b-fg-2); }
body.pc-beta .lb-prev-legend b { color: var(--b-fg); }
body.pc-beta .lb-prev:hover .lb-prev-legend > span:first-child { text-decoration: underline; }
body.pc-beta .lb-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--b-line); }
body.pc-beta .lb-duo > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
body.pc-beta .lb-duo b { font-size: 1.2rem; font-weight: 600; letter-spacing: -.02em; color: var(--b-fg); white-space: nowrap; }

body.pc-beta .lb-mc-rows { display: flex; flex-direction: column; }
/* Machines : une ligne fine chacune (Toni, 01/10 : « la place que prend Machines est trop grande »).
   Point d'état, nom, nombre de ventes, encaissé ; « Hors ligne » écrit seulement quand c'est le cas. */
body.pc-beta .lb-machines .lb-card-head { padding: 10px 14px; }
body.pc-beta .lb-machines .lb-card-head h2 { font-size: .9rem; }
body.pc-beta .lb-mc {
  display: grid; grid-template-columns: 8px minmax(0, 1fr) auto 22px; gap: 10px; align-items: center;
  padding: 7px 8px 7px 14px; border-top: 1px solid var(--b-line); cursor: pointer; transition: background-color .12s;
}
body.pc-beta .lb-mc:first-child { border-top: 0; }
body.pc-beta .lb-mc:hover { background: color-mix(in srgb, var(--b-surface-2) 70%, transparent); }
body.pc-beta .lb-mc.is-filtre { background: var(--b-accent-soft); }
body.pc-beta .lb-mc-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--b-fg-3); align-self: start; margin-top: 6px; }
body.pc-beta .lb-mc.is-online .lb-mc-dot { background: var(--b-good); }
body.pc-beta .lb-mc.is-offline .lb-mc-dot { background: var(--b-bad); }
body.pc-beta .lb-mc-name { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
body.pc-beta .lb-mc-name > b { font-weight: 550; font-size: .86rem; color: var(--b-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.pc-beta .lb-mc-name > span { font-size: .72rem; white-space: nowrap; }
body.pc-beta .lb-mc-off { color: var(--b-bad); font-weight: 600; }
body.pc-beta .lb-mc-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
body.pc-beta .lb-mc-amt b { font-weight: 600; font-size: .86rem; color: var(--b-fg); white-space: nowrap; }
body.pc-beta .lb-mc-amt span { font-size: .7rem; color: var(--b-fg-3); white-space: nowrap; }

/* La connexion : quatre barres et le type (4G, Wi-Fi, Câble). */
body.pc-beta .lb-net { display: inline-flex; align-items: center; gap: 6px; color: var(--b-fg-2); font-weight: 500; }
body.pc-beta .lb-net-bars { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 10px; }
body.pc-beta .lb-net-bars i { display: block; width: 3px; border-radius: 1px; background: var(--b-line-strong); }
body.pc-beta .lb-net-bars i:nth-child(1) { height: 30%; }
body.pc-beta .lb-net-bars i:nth-child(2) { height: 55%; }
body.pc-beta .lb-net-bars i:nth-child(3) { height: 78%; }
body.pc-beta .lb-net-bars i:nth-child(4) { height: 100%; }
body.pc-beta .lb-net.is-bon .lb-net-bars i.on { background: var(--b-good); }
body.pc-beta .lb-net.is-moyen .lb-net-bars i.on { background: var(--b-warn); }
body.pc-beta .lb-net.is-faible .lb-net-bars i.on { background: var(--b-bad); }
body.pc-beta .lb-net.is-faible { color: var(--b-bad); }
body.pc-beta .lb-net.is-inconnu { color: var(--b-fg-3); }
body.pc-beta .lb-mc-gear {
  width: 22px; height: 22px; border-radius: 6px; border: 1px solid transparent; background: none; color: var(--b-fg-3);
  font-size: .9rem; line-height: 1; cursor: pointer; padding: 0;
}
body.pc-beta .lb-mc-gear:hover { border-color: var(--b-line); background: var(--b-surface); color: var(--b-fg); }
/* La ligne d'une machine ouvre sa couleur ; son nom est écrit dans un rectangle à SA couleur (Toni,
   01/10/2026), la même que l'heure des ventes et les popups. L'entonnoir au bout filtre le fil. */
body.pc-beta .lb-mc { grid-template-columns: 8px minmax(0, 1fr) auto 26px; padding-top: 8px; padding-bottom: 8px; }
body.pc-beta .lb-mc-name { gap: 4px; }
body.pc-v3.pc-beta .lb-mc-name > b.lb-mc-tag {
  align-self: flex-start; max-width: 100%; padding: 3px 10px; border-radius: 7px;
  background: var(--m, var(--b-accent)); color: var(--m-encre, #fff) !important; font-weight: 650 !important;
}
body.pc-beta .lb-mc-filtre { display: grid; place-items: center; width: 26px; height: 26px; }
body.pc-beta .lb-mc-filtre[aria-pressed="true"] { background: var(--b-accent); border-color: var(--b-accent); color: var(--b-accent-ink); }
body.pc-v3.pc-beta .machine-color-portee { margin: 0 0 12px; font-size: .84rem; color: var(--b-fg-2); line-height: 1.45; }

@media (max-width: 1180px) {
  body.pc-beta .lb-grid { grid-template-columns: 1fr; }
  body.pc-beta .lb-side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 820px) {
  body.pc-v3.pc-beta .main { padding: 0 16px 32px !important; }
  body.pc-v3.pc-beta .topbar { margin: 0 -16px 16px !important; padding: 12px 16px 12px 64px !important; flex-wrap: wrap; gap: 8px; }
  body.pc-v3.pc-beta #pageTitle { font-size: 1.15rem !important; }
  body.pc-v3.pc-beta .zoom-control { display: none !important; }
  body.pc-beta .lb-side { grid-template-columns: 1fr; }
  body.pc-beta .lb-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; padding: 11px 14px; }
  body.pc-beta .lb-row-state { grid-column: 2 / -1; justify-content: flex-start; }
  body.pc-beta .lb-row-state:empty { display: none; }
  body.pc-beta .lb-row-amt { grid-column: 3; grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) {
  body.pc-beta .lb-live i,
  body.pc-beta .lb-row.is-new { animation: none; }
  body.pc-beta * { transition: none !important; }
}

/* ════ STOCK (stock.js › renderStockBeta) — Toni, 01/10/2026 : refait en profondeur comme le Live ════
   Une liste dense par défaut (une ligne par produit, colonnes alignées), la recherche en tête, des filtres
   en pastilles, les outils ponctuels dans un menu. La grille reste à un clic. */
body.pc-v3.pc-beta .stock-source-line { display: none !important; }
body.pc-beta .sb { display: flex; flex-direction: column; gap: 14px; }

/* La bande des chiffres : une seule carte, des séparateurs fins. */
body.pc-beta .sb-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--b-line); border-radius: var(--b-radius-lg); background: var(--b-surface); overflow: hidden;
}
body.pc-beta .sb-kpi {
  display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 14px 18px; text-align: left;
  border: 0; border-left: 1px solid var(--b-line); background: none; color: inherit; font: inherit; margin: -1px 0 0 -1px;
  border-top: 1px solid var(--b-line);
}
body.pc-beta .sb-kpi > span { font-size: .68rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--b-fg-3); }
body.pc-beta .sb-kpi > strong { font-family: var(--b-mono); font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; color: var(--b-fg); white-space: nowrap; }
body.pc-beta .sb-kpi > small { font-size: .74rem; color: var(--b-fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.pc-beta .sb-kpi.warn > small { color: var(--b-warn); }
body.pc-beta .sb-kpi.bad > strong { color: var(--b-bad); }
body.pc-beta button.sb-kpi { cursor: pointer; transition: background-color .12s; }
body.pc-beta button.sb-kpi > strong { color: var(--b-warn); }
body.pc-beta button.sb-kpi:hover { background: var(--b-surface-2); }
body.pc-beta button.sb-kpi.on { background: var(--b-warn-soft); }

/* La barre : recherche, actions, puis les filtres. */
body.pc-beta .sb-tools {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--b-line);
}
body.pc-beta .sb-search {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; min-width: 0;
  border: 1px solid var(--b-line); border-radius: 10px; background: var(--b-surface-2);
  transition: border-color .12s, background-color .12s;
}
body.pc-beta .sb-search:focus-within { border-color: var(--b-accent); background: var(--b-surface); box-shadow: 0 0 0 3px var(--b-accent-soft); }
body.pc-beta .sb-search > span { color: var(--b-fg-3); font-size: 1.1rem; line-height: 1; }
body.pc-v3.pc-beta .sb-search input:is(#stockSearchInput, #optimSearchInput) {
  flex: 1; min-width: 0; height: 100%; border: 0 !important; background: none !important; box-shadow: none !important;
  outline: none !important; padding: 0 !important; font-size: .95rem; color: var(--b-fg);
}
body.pc-beta .sb-actions { display: flex; align-items: center; gap: 8px; }
body.pc-beta .sb-filters { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
body.pc-beta .sb-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--b-line); background: var(--b-surface); color: var(--b-fg-2);
  font-size: .8rem; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: border-color .12s, background-color .12s, color .12s;
}
body.pc-v3.pc-beta .sb #stockNegativeBtn:not(.is-active) { background: var(--b-surface) !important; color: var(--b-fg-2) !important; border-color: var(--b-line) !important; }
body.pc-v3.pc-beta .sb #stockNegativeBtn.is-active { background: var(--b-accent-soft) !important; color: var(--b-accent) !important; border-color: color-mix(in srgb, var(--b-accent) 45%, var(--b-line)) !important; }
body.pc-beta .sb-chip .num { color: var(--b-fg-3); font-size: .74rem; }
body.pc-beta .sb-chip:hover { border-color: var(--b-line-strong); color: var(--b-fg); }
body.pc-beta .sb-chip:is(.on, .is-active) { background: var(--b-accent-soft); border-color: color-mix(in srgb, var(--b-accent) 45%, var(--b-line)); color: var(--b-accent); }
body.pc-beta .sb-chip:is(.on, .is-active) .num { color: var(--b-accent); }
body.pc-beta .sb-select {
  height: 30px; padding: 0 28px 0 10px; border-radius: 8px; border: 1px solid var(--b-line); background-color: var(--b-surface);
  color: var(--b-fg-2); font-size: .8rem; font-weight: 500; cursor: pointer;
}
body.pc-beta .sb-vue { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--b-surface-2); border: 1px solid var(--b-line); }
body.pc-beta .sb-vue button {
  height: 24px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--b-fg-3);
  font-size: .78rem; font-weight: 550; cursor: pointer;
}
body.pc-beta .sb-vue button.on { background: var(--b-surface); color: var(--b-fg); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }

/* Le menu Outils. */
body.pc-beta .sb-outils { position: relative; }
body.pc-beta .sb-outils > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; }
body.pc-beta .sb-outils > summary::-webkit-details-marker { display: none; }
body.pc-beta .sb-outils > summary::after { content: "▾"; font-size: .7rem; color: var(--b-fg-3); }
body.pc-beta .sb-outils[open] > summary { border-color: var(--b-line-strong); background: var(--b-surface-2); }
body.pc-beta .sb-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 270px; padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  border: 1px solid var(--b-line); border-radius: 12px; background: var(--b-surface); box-shadow: var(--b-shadow);
}
body.pc-beta .sb-menu button {
  display: flex; flex-direction: column; gap: 1px; align-items: flex-start; text-align: left; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--b-fg); cursor: pointer;
}
body.pc-beta .sb-menu button:hover { background: var(--b-surface-2); }
body.pc-beta .sb-menu button b { font-size: .86rem; font-weight: 600; }
body.pc-beta .sb-menu button span { font-size: .74rem; color: var(--b-fg-3); }

body.pc-beta .sb-count { padding: 10px 18px; font-size: .8rem; color: var(--b-fg-3); border-bottom: 1px solid var(--b-line); }
body.pc-beta .sb-count b { color: var(--b-fg); font-weight: 600; }
body.pc-beta .sb-list .stock-sans-stock { margin: 12px 18px !important; }

/* La liste : une ligne par produit. */
body.pc-beta .sb-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 118px 150px 82px 82px 96px; gap: 14px; align-items: center;
  padding: 9px 18px; border-top: 1px solid var(--b-line); cursor: pointer; transition: background-color .12s;
}
body.pc-beta .sb-table > .sb-row:nth-child(2) { border-top: 0; }
body.pc-beta .sb-row:hover { background: color-mix(in srgb, var(--b-surface-2) 70%, transparent); }
body.pc-beta .sb-row-head {
  cursor: default; padding-top: 8px; padding-bottom: 8px; border-top: 0;
  background: var(--b-surface-2); border-bottom: 1px solid var(--b-line);
  font-size: .66rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--b-fg-3);
}
body.pc-beta .sb-row-head:hover { background: var(--b-surface-2); }
body.pc-beta .sb-thumb {
  position: relative; width: 44px; height: 44px; border-radius: 9px; overflow: hidden; background: var(--b-surface-2);
  display: grid; place-items: center; font-size: 1.1rem; color: var(--b-fg-3);
}
body.pc-beta .sb-thumb > span { opacity: .5; }
body.pc-beta .sb-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--b-surface); }
body.pc-beta .sb-name { min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
body.pc-beta .sb-name > b { max-width: 100%; font-weight: 550; font-size: .9rem; color: var(--b-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.pc-beta .sb-name > span { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; font-size: .76rem; color: var(--b-fg-3); }
body.pc-beta .sb-name > span > i { font-style: normal; opacity: .6; }
body.pc-beta .sb-ref { font-family: var(--b-mono); font-size: .72rem; color: var(--b-fg-2); }
body.pc-beta .sb-flag { color: var(--b-warn); font-weight: 550; }
body.pc-beta .sb .stock-badge-noachat {
  margin: 2px 0 0 !important; padding: 1px 8px !important; border: 0 !important; border-radius: 6px !important;
  background: var(--b-warn-soft) !important; color: var(--b-warn) !important; font-size: .72rem !important; font-weight: 600 !important;
}
body.pc-beta .sb-qty { display: flex; align-items: center; gap: 8px; }
body.pc-beta .sb-qty > b { font-size: 1.05rem; font-weight: 600; color: var(--b-fg); min-width: 2.2ch; text-align: right; }
body.pc-beta .sb-row.warning .sb-qty > b { color: var(--b-warn); }
body.pc-beta .sb-row.danger .sb-qty > b { color: var(--b-bad); }
body.pc-beta .sb .stock-split { display: flex; gap: 12px; margin: 0; flex-wrap: nowrap; }
body.pc-beta .sb .stock-split-chip {
  display: inline-flex; align-items: baseline; gap: 4px; padding: 0; border: 0; border-radius: 0; background: none;
  font-size: .74rem; font-weight: 500; color: var(--b-fg-3); white-space: nowrap;
}
body.pc-beta .sb .stock-split-chip b { font-family: var(--b-mono); font-size: .86rem; font-weight: 600; color: var(--b-fg); }
body.pc-beta .sb .stock-split-chip em { font-style: normal; }
body.pc-beta .sb .stock-split-warn .stock-split-reserve,
body.pc-beta .sb .stock-split-warn .stock-split-reserve b { background: none; color: var(--b-bad); }
body.pc-beta .sb-col { text-align: right; }
body.pc-beta .sb-col b { font-size: .88rem; font-weight: 550; color: var(--b-fg); white-space: nowrap; }
body.pc-beta .sb b.sq-good { color: var(--b-good); }
body.pc-beta .sb b.sq-bad { color: var(--b-bad); }
body.pc-beta .sb-valeur b { color: var(--b-fg-2); }

/* Les tuiles (par défaut — Toni : « plus lisible ») : l'image, le stock en gros, puis machine et entrepôt
   dans deux cases, puis prix / bénéfice / valeur. */
body.pc-beta .sb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 14px; padding: 16px 18px 18px; }
body.pc-beta .sb-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; cursor: pointer;
  border: 1px solid var(--b-line); border-radius: var(--b-radius); background: var(--b-surface);
  transition: border-color .12s, box-shadow .12s;
}
body.pc-beta .sb-card:hover { border-color: var(--b-line-strong); box-shadow: var(--b-shadow); }
body.pc-beta .sb-card.danger { border-color: color-mix(in srgb, var(--b-bad) 35%, var(--b-line)); }
body.pc-beta .sb-card-img { position: relative; aspect-ratio: 1 / 1; max-width: 100%; background: var(--b-surface-2); }
body.pc-beta .sb-card-pic { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.4rem; color: var(--b-fg-3); }
body.pc-beta .sb-card-pic > span { opacity: .4; }
body.pc-beta .sb-card-pic img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain; }
body.pc-beta .sb-card-qty {
  position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; align-items: center; min-width: 52px;
  padding: 5px 10px 4px; border-radius: 10px; background: var(--b-surface); box-shadow: 0 1px 3px rgba(16, 24, 40, .14);
}
body.pc-beta .sb-card-qty b { font-size: 1.45rem; font-weight: 650; line-height: 1.05; color: var(--b-fg); }
body.pc-beta .sb-card-qty small { font-size: .62rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--b-fg-3); }
body.pc-beta .sb-card.warning .sb-card-qty { background: var(--b-warn-soft); }
body.pc-beta .sb-card.warning .sb-card-qty b { color: var(--b-warn); }
body.pc-beta .sb-card.danger .sb-card-qty { background: var(--b-bad-soft); }
body.pc-beta .sb-card.danger .sb-card-qty b { color: var(--b-bad); }
body.pc-beta .sb-card-lang { position: absolute; top: 10px; left: 10px; font-size: 1.1rem; }
body.pc-beta .sb-card-etat { position: absolute; left: 10px; bottom: 10px; }
body.pc-beta .sb-card-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; min-width: 0; flex: 1; }
body.pc-beta .sb-card-name {
  min-height: 2.6em; font-size: .95rem; font-weight: 600; color: var(--b-fg); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
body.pc-beta .sb-card-meta { margin-top: -4px; font-size: .74rem; color: var(--b-fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.pc-beta .sb .sb-card-split { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
body.pc-beta .sb .sb-card-split .stock-split-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 10px; border-radius: 8px; background: var(--b-surface-2);
}
body.pc-beta .sb .sb-card-split .stock-split-machine { background: var(--b-accent-soft); }
body.pc-beta .sb .sb-card-split .stock-split-chip b { font-size: 1.1rem; }
body.pc-beta .sb .sb-card-split .stock-split-chip em { font-size: .68rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--b-fg-3); }
body.pc-beta .sb .sb-card-split .stock-split-machine b { color: var(--b-accent); }
body.pc-beta .sb .sb-card-split.stock-split-warn .stock-split-reserve { background: var(--b-bad-soft); }
body.pc-beta .sb-card-nums { margin-top: auto; display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 6px; padding-top: 8px; border-top: 1px solid var(--b-line); }
body.pc-beta .sb-card-nums > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
body.pc-beta .sb-card-nums > span:last-child { align-items: flex-end; }
body.pc-beta .sb-card-nums small { font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: var(--b-fg-3); }
body.pc-beta .sb-card-nums b { font-family: var(--b-font) !important; font-variant-numeric: tabular-nums; font-size: .9rem; font-weight: 600; color: var(--b-fg); white-space: nowrap; }

/* Le catalogue sans achat, replié. */
body.pc-beta .sb-catalogue > summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 14px 18px; cursor: pointer; list-style: none;
}
body.pc-beta .sb-catalogue > summary::-webkit-details-marker { display: none; }
body.pc-beta .sb-catalogue > summary::before { content: "▸"; color: var(--b-fg-3); }
body.pc-beta .sb-catalogue[open] > summary::before { content: "▾"; }
body.pc-beta .sb-catalogue > summary b { font-size: .92rem; font-weight: 600; color: var(--b-fg); }
body.pc-beta .sb-catalogue > summary span { font-size: .8rem; color: var(--b-fg-3); }
body.pc-beta .sb-catalogue .stock-catalog-card { border: 0 !important; border-top: 1px solid var(--b-line) !important; border-radius: 0 !important; box-shadow: none !important; margin: 0 !important; }
body.pc-beta .sb-catalogue .stock-catalog-card .stock-card-head { display: none; }

@media (max-width: 1180px) {
  body.pc-beta .sb-row { grid-template-columns: 44px minmax(0, 1fr) 104px 140px 76px 76px; }
  body.pc-beta .sb-row > .sb-valeur,
  body.pc-beta .sb-row-head > span:last-child { display: none; }
}
@media (max-width: 820px) {
  body.pc-beta .sb-tools { grid-template-columns: 1fr; padding: 12px 14px; }
  body.pc-beta .sb-actions { justify-content: space-between; }
  body.pc-beta .sb-kpi { padding: 12px 14px; }
  body.pc-beta .sb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.pc-beta .sb-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  body.pc-beta .sb-row-head { display: none; }
  body.pc-beta .sb-row {
    grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "img nom qty" "img split prix"; gap: 4px 12px; padding: 10px 14px;
  }
  body.pc-beta .sb-table > .sb-row:nth-child(2) { border-top: 1px solid var(--b-line); }
  body.pc-beta .sb-thumb { grid-area: img; align-self: start; }
  body.pc-beta .sb-name { grid-area: nom; }
  body.pc-beta .sb-qty { grid-area: qty; justify-content: flex-end; }
  body.pc-beta .sb-row > .sb-split { grid-area: split; }
  body.pc-beta .sb-row > .sb-prix { grid-area: prix; }
  body.pc-beta .sb-row > :is(.sb-benef, .sb-valeur) { display: none; }
  body.pc-beta .sb-qty .lb-pill { display: none; }
  body.pc-beta .sb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 14px; gap: 10px; }
  body.pc-beta .sb-card-body { padding: 10px 10px 12px; gap: 6px; }
  body.pc-beta .sb-card-name { font-size: .86rem; }
  body.pc-beta .sb-card-qty { min-width: 44px; padding: 4px 8px 3px; }
  body.pc-beta .sb-card-qty b { font-size: 1.2rem; }
  body.pc-beta .sb .sb-card-split .stock-split-chip { padding: 5px 7px; }
  body.pc-beta .sb-card-nums { grid-template-columns: repeat(2, auto); }
  body.pc-beta .sb-card-nums > span:last-child { display: none; }
  body.pc-beta .sb-count { padding: 10px 14px; }
}

/* ════ AJOUTER / MODIFIER UN ACHAT (stock.js › addModalHtml) — Toni, 01/10/2026 : « plutôt en largeur » ════
   Le produit et sa photo en tête, six champs sur deux rangées de trois, puis le total du lot et le prix
   de vente conseillé côte à côte (le conseil, glissé dans la grille, décalait les champs). */
body.pc-v3.pc-beta .modal.stock-lot-modal { width: min(920px, calc(100vw - 32px)) !important; max-width: none !important; }
body.pc-v3.pc-beta .stock-lot-modal .modal-body { display: flex; flex-direction: column; gap: 16px; }
body.pc-beta .slm-produit { display: flex; align-items: flex-end; gap: 14px; }
body.pc-beta .slm-produit > .form-field { flex: 1; min-width: 0; margin: 0; }
body.pc-beta .slm-thumb {
  flex: none; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--b-surface-2);
  border: 1px solid var(--b-line); display: grid; place-items: center; font-size: 1.5rem; color: var(--b-fg-3);
}
body.pc-beta .slm-thumb[hidden] { display: none; }
body.pc-beta .slm-thumb img { width: 100%; height: 100%; object-fit: contain; background: var(--b-surface); }
body.pc-v3.pc-beta .stock-lot-modal .slm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; align-items: start; }
body.pc-beta .stock-lot-modal .slm-grid .form-field { margin: 0; }
body.pc-beta .stock-lot-modal .form-field small { display: block; margin-top: 5px; font-size: .74rem; color: var(--b-fg-3); line-height: 1.35; }
body.pc-beta .slm-bas { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: stretch; }
body.pc-beta .slm-total {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 12px 16px;
  border: 1px solid var(--b-line); border-radius: 12px; background: var(--b-surface-2);
}
body.pc-beta .slm-total span { font-size: .68rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--b-fg-3); }
body.pc-beta .slm-total b { font-family: var(--b-mono); font-size: 1.4rem; font-weight: 600; color: var(--b-fg); }
body.pc-beta .slm-total small { font-size: .76rem; color: var(--b-fg-3); }
body.pc-v3.pc-beta .stock-lot-modal .stock-price-hint {
  margin: 0 !important; padding: 12px 16px !important; border-radius: 12px !important;
  border: 1px solid color-mix(in srgb, var(--b-accent) 30%, var(--b-line)) !important; background: var(--b-accent-soft) !important;
  font-size: .86rem !important; color: var(--b-fg-2) !important;
}
body.pc-beta .stock-lot-modal .sph-title { color: var(--b-accent) !important; font-weight: 650 !important; margin-bottom: 6px !important; }
body.pc-beta .stock-lot-modal .sph-range { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--b-fg-2); }
body.pc-beta .stock-lot-modal .sph-range b,
body.pc-beta .stock-lot-modal .sph-cur b { color: var(--b-fg) !important; }
body.pc-beta .stock-lot-modal .sph-cur { margin-top: 6px !important; padding-top: 6px !important; border-top: 1px dashed color-mix(in srgb, var(--b-accent) 30%, transparent) !important; }
body.pc-beta .stock-lot-modal .sph-cur.ok b:last-child { color: var(--b-good) !important; }
body.pc-beta .stock-lot-modal .sph-cur.warn b:last-child { color: var(--b-warn) !important; }
body.pc-beta .stock-lot-modal .sph-cur.bad b:last-child { color: var(--b-bad) !important; }
body.pc-beta .stock-lot-modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
body.pc-beta .stock-lot-modal .modal-actions button { min-width: 150px; }

/* ════ PRIX & STOCK (COMPTA) (stock.js › renderOptimisationBeta) — des tuiles comme le Stock ════ */
body.pc-beta button.ob-kpi > strong { color: var(--b-fg); }
body.pc-beta button.ob-kpi.bad > strong { color: var(--b-bad); }
body.pc-beta button.ob-kpi.warn > strong { color: var(--b-warn); }
body.pc-beta button.ob-kpi.on { background: var(--b-accent-soft); box-shadow: inset 0 -2px 0 var(--b-accent); }
body.pc-beta .ob-card { cursor: default; }
body.pc-beta .ob-benef { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
body.pc-beta .ob-benef > div { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: 8px; background: var(--b-surface-2); }
body.pc-beta .ob-benef > div:first-child { background: var(--b-accent-soft); }
body.pc-beta .ob-benef small { font-size: .64rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--b-fg-3); white-space: nowrap; }
body.pc-beta .ob-benef b { font-size: 1.15rem; font-weight: 600; color: var(--b-fg); }
body.pc-beta .sb b.sq-warn,
body.pc-beta .ob-simu .sq-warn { color: var(--b-warn); }
body.pc-beta .ob-prix { display: flex; flex-direction: column; gap: 3px; margin: 0; padding-top: 8px; border-top: 1px solid var(--b-line); }
body.pc-beta .ob-prix > div { display: flex; justify-content: space-between; gap: 8px; font-size: .82rem; }
body.pc-beta .ob-prix dt { color: var(--b-fg-3); }
body.pc-beta .ob-prix dd { margin: 0; font-weight: 600; color: var(--b-fg); white-space: nowrap; }
body.pc-beta .ob-raisons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: .76rem; color: var(--b-fg-2); }
body.pc-beta .ob-raisons li::before { content: "• "; color: var(--b-fg-3); }
body.pc-beta .ob-sim { margin-top: auto; width: 100%; }
body.pc-beta .ob-sim:hover { border-color: var(--b-accent); color: var(--b-accent); }

body.pc-beta .ob-simu { scroll-margin-top: 90px; border-color: color-mix(in srgb, var(--b-accent) 40%, var(--b-line)); }
body.pc-beta .ob-simu-titre { display: flex; align-items: center; gap: 12px; min-width: 0; }
body.pc-beta .ob-simu-titre h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.pc-beta .ob-simu-titre > div:last-child { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
body.pc-beta .ob-simu-corps { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; padding: 18px; align-items: center; }
body.pc-beta .ob-simu-prix { display: flex; flex-direction: column; gap: 8px; }
body.pc-beta .ob-simu-prix > b { font-size: 2.2rem; font-weight: 600; letter-spacing: -.03em; color: var(--b-fg); }
body.pc-beta .ob-simu-prix input[type="range"] { width: 100%; accent-color: var(--b-accent); }
body.pc-beta .ob-simu-prix small { font-size: .8rem; color: var(--b-fg-3); }
body.pc-beta .ob-simu-prix small b { color: var(--b-fg); }
body.pc-beta .ob-simu-nums { display: flex; flex-direction: column; margin: 0; border: 1px solid var(--b-line); border-radius: 12px; overflow: hidden; }
body.pc-beta .ob-simu-nums > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--b-line); }
body.pc-beta .ob-simu-nums > div:first-child { border-top: 0; }
body.pc-beta .ob-simu-nums dt { font-size: .84rem; color: var(--b-fg-2); }
body.pc-beta .ob-simu-nums dd { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--b-fg); }

@media (max-width: 820px) {
  body.pc-v3.pc-beta .stock-lot-modal .slm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.pc-beta .slm-bas { grid-template-columns: 1fr; }
  body.pc-beta .stock-lot-modal .modal-actions button { min-width: 0; flex: 1; }
  body.pc-beta .ob-simu-corps { grid-template-columns: 1fr; }
  body.pc-beta .ob-benef small { white-space: normal; }
}
body.pc-v3.pc-beta .ob-simu-prix > b.optim-sim-price { background: none !important; color: var(--b-fg) !important; padding: 0 !important; border-radius: 0 !important; box-shadow: none !important; display: block; text-align: left; }

/* ════ RENTABILITÉ MACHINES (machine-renta.js › renduRentaBeta) — Toni, 01/10/2026 : refonte complète ════
   Le parc en une bande, les machines classées par bénéfice net avec une barre à l'échelle, puis les types
   de produit et l'affectation des charges côte à côte. */
body.pc-beta .rb-kpi-net { color: var(--b-good) !important; }
body.pc-beta .rb-kpi-net.neg { color: var(--b-bad) !important; }
body.pc-beta .rb-row {
  display: grid; grid-template-columns: 28px minmax(140px, 1.1fr) minmax(90px, 1.4fr) 104px 112px 96px 96px 78px 84px;
  gap: 14px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--b-line);
}
body.pc-beta .rb-table > .rb-row:nth-child(2) { border-top: 0; }
body.pc-beta .rb-head {
  padding-top: 8px; padding-bottom: 8px; border-top: 0; background: var(--b-surface-2); border-bottom: 1px solid var(--b-line);
  font-size: .66rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--b-fg-3);
}
body.pc-beta .rb-head > span:nth-child(3) { grid-column: 3 / 5; }
body.pc-beta .rb-head > span:nth-child(4) { display: none; }
body.pc-beta .rb-rang { color: var(--b-fg-3); font-size: .82rem; text-align: right; }
body.pc-beta .rb-nom { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
body.pc-beta .rb-nom b { font-weight: 600; font-size: .92rem; color: var(--b-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.pc-beta .rb-nom span { font-size: .74rem; color: var(--b-fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.pc-beta .rb-barre { height: 10px; border-radius: 999px; background: var(--b-surface-2); overflow: hidden; }
body.pc-beta .rb-barre i { display: block; height: 100%; border-radius: 999px; background: var(--b-good); }
body.pc-beta .rb-row.is-perte .rb-barre i { background: var(--b-bad); }
body.pc-beta .rb-net { font-size: 1rem; font-weight: 600; color: var(--b-good); text-align: right; white-space: nowrap; }
body.pc-beta .rb-row.is-perte .rb-net { color: var(--b-bad); }
body.pc-beta .rb-col { text-align: right; font-size: .86rem; color: var(--b-fg-2); white-space: nowrap; }
body.pc-beta .rb-etat { display: flex; justify-content: flex-end; }
body.pc-beta .rb-row:not(.rb-head):hover { background: color-mix(in srgb, var(--b-surface-2) 70%, transparent); }
body.pc-beta .rb-note { font-size: .84rem; color: var(--b-warn); }
body.pc-beta .rb-note b { color: var(--b-warn); }

body.pc-beta .rb-duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
body.pc-beta .rb-tab-wrap { overflow-x: auto; }
body.pc-v3.pc-beta .rb-tab { width: 100%; min-width: 0 !important; border-collapse: collapse; }
body.pc-v3.pc-beta .rb-tab :is(th, td) { padding: 9px 18px !important; border-bottom: 1px solid var(--b-line) !important; text-align: right; font-size: .86rem; white-space: nowrap; background: none !important; }
body.pc-v3.pc-beta .rb-tab :is(th, td):first-child { text-align: left; white-space: normal; }
body.pc-v3.pc-beta .rb-tab thead th { background: var(--b-surface-2) !important; font-size: .66rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--b-fg-3) !important; }
body.pc-v3.pc-beta .rb-tab tfoot td { font-weight: 650; color: var(--b-fg); border-bottom: 0 !important; }
body.pc-beta .rb-tab td.pos { color: var(--b-good); font-weight: 600; }
body.pc-beta .rb-tab td.neg { color: var(--b-bad); font-weight: 600; }
body.pc-beta .rb-charges td:last-child { text-align: right; }
body.pc-beta .rb-charges .sb-select { max-width: 220px; }
body.pc-beta .rb-save { margin: 0; padding: 10px 18px; font-size: .82rem; }
body.pc-beta .rb-save:empty { display: none; }

@media (max-width: 1180px) {
  body.pc-beta .rb-row { grid-template-columns: 28px minmax(120px, 1fr) minmax(70px, 1fr) 100px 104px 84px; }
  body.pc-beta .rb-row > :nth-child(7),
  body.pc-beta .rb-row > :nth-child(8),
  body.pc-beta .rb-row > :nth-child(9) { display: none; }
  body.pc-beta .rb-duo { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  body.pc-beta .rb-head { display: none; }
  body.pc-beta .rb-row { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "rang nom net" "rang barre barre"; gap: 6px 10px; padding: 10px 14px; }
  body.pc-beta .rb-table > .rb-row:nth-child(2) { border-top: 1px solid var(--b-line); }
  body.pc-beta .rb-rang { grid-area: rang; align-self: start; }
  body.pc-beta .rb-nom { grid-area: nom; }
  body.pc-beta .rb-net { grid-area: net; }
  body.pc-beta .rb-barre { grid-area: barre; }
  body.pc-beta .rb-row > :is(.rb-col, .rb-etat) { display: none; }
}
body.pc-beta .rb-head .rb-col { font-size: inherit; color: inherit; }

/* ════ LIVE : miniatures des produits vendus avec leur quantité (Toni, 01/10/2026) ════ */
/* Les miniatures puis le texte, dans la même case : toutes les photos, autant qu'il y a de produits. */
body.pc-beta .lb-row { grid-template-columns: 62px minmax(0, 1fr) auto 104px; }
body.pc-beta .lb-row-quoi { display: flex; align-items: center; gap: 12px; min-width: 0; }
body.pc-beta .lb-row-quoi > .lb-row-main { flex: 1; }
/* L'heure dans un carré à la couleur de la machine : on reconnaît la machine de loin. */
body.pc-beta .lb-row-time {
  display: grid; place-items: center; height: 40px; border-radius: 9px;
  background: var(--m, var(--b-accent)); color: var(--m-encre, #fff) !important; font-weight: 700 !important; font-size: .9rem !important;
}
body.pc-beta .lb-thumbs { display: flex; gap: 6px; align-items: center; flex: none; }
body.pc-beta .lb-thumbs:empty { display: none; }
body.pc-beta .lb-thumb {
  position: relative; flex: none; width: 44px; height: 44px; border-radius: 9px; overflow: hidden;
  background: var(--b-surface-2); border: 1px solid var(--b-line); display: grid; place-items: center;
}
body.pc-beta .lb-thumb > i { font-style: normal; font-size: 1rem; opacity: .45; }
body.pc-beta .lb-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--b-surface); }
body.pc-beta .lb-thumb > b {
  position: absolute; right: 2px; bottom: 2px; padding: 0 4px; border-radius: 5px; line-height: 1.35;
  background: var(--b-fg); color: var(--b-surface); font-size: .66rem; font-weight: 700;
}
@media (max-width: 820px) {
  body.pc-beta .lb-row { grid-template-columns: 54px minmax(0, 1fr) auto; }
  body.pc-beta .lb-row-quoi { flex-direction: column; align-items: flex-start; gap: 6px; }
  body.pc-beta .lb-row-quoi > .lb-row-main { width: 100%; }
  body.pc-beta .lb-thumbs { flex-wrap: wrap; flex: initial; }
  body.pc-beta .lb-row-time { height: 36px; font-size: .8rem !important; }
  body.pc-beta .lb-row-state { grid-column: 2 / -1; }
  body.pc-beta .lb-row-amt { grid-column: 3; grid-row: 1; }
  body.pc-beta .lb-thumb { width: 38px; height: 38px; }
}

/* ════ GESTION MACHINE — Toni, 01/10/2026 ════
   Le choix de la machine : son nom dans SA couleur du Live (la même que l'heure des ventes et les
   popups), sans « A&D TCG ». Le remplissage : une jauge par case, et la barre ne répète plus « ← Machines »
   ni le nom (déjà dans l'en-tête de la machine). */
body.pc-v3.pc-beta .mm-mtile.mm-mtile-b { gap: 8px; }
body.pc-beta .mm-mtag {
  align-self: flex-start; max-width: 100%; padding: 6px 12px; border-radius: 9px;
  background: var(--m, var(--b-accent)); color: var(--m-encre, #fff);
  font-weight: 650; font-size: 1rem; line-height: 1.25; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.pc-v3.pc-beta .mm-mtile.mm-mtile-b.on { box-shadow: 0 0 0 2px var(--m, var(--b-accent)) !important; }

body.pc-beta #mmSub .mf-top > #mfBack,
body.pc-beta #mmSub .mf-top > #mfBack + div { display: none; }
body.pc-beta .mf-jauge { display: block; align-self: stretch; flex: none; height: 5px; margin: 6px 22px 0; border-radius: 999px; background: var(--b-surface-2); overflow: hidden; }
body.pc-beta .mf-jauge > i { display: block; height: 100%; border-radius: 999px; background: var(--b-good); }
body.pc-beta .mf-jauge.bas > i { background: var(--b-warn); }
body.pc-beta .mf-jauge.vide { background: var(--b-bad-soft); }

/* ════ STATISTIQUES — Toni, 01/10/2026 : le langage du Live ════
   Filtre des machines : le nom dans SA couleur (sans « A&D TCG »), l'actif entouré ; « Ce que rapporte
   chaque machine » : nom et barre à la couleur de la machine ; photos produit plus grandes. */
body.pc-v3.pc-beta .stats-mfilter { gap: 6px; }
body.pc-v3.pc-beta .stats-mfilter button.mtag {
  background: var(--m) !important; border: 0 !important; color: var(--m-encre, #fff) !important;
  padding: 6px 12px !important; border-radius: 8px !important; font-weight: 650 !important; box-shadow: none !important;
  transition: box-shadow .12s, filter .12s;
}
body.pc-v3.pc-beta .stats-mfilter button.mtag:hover { filter: brightness(1.05); }
body.pc-v3.pc-beta .stats-mfilter button.mtag.on { box-shadow: 0 0 0 2px var(--b-surface), 0 0 0 4px var(--m) !important; }
/* Une machine sans couleur connue (ex. « Vente directe ») : même forme, en gris. */
body.pc-v3.pc-beta .stats-mfilter button.mtag.neutre { --m: var(--b-fg-3); background: var(--b-surface-2) !important; color: var(--b-fg-2) !important; border: 1px solid var(--b-line) !important; }
body.pc-beta .bnf-rangee-m.neutre,
body.pc-beta .bnf-machine-c.neutre { --m: var(--b-fg-3); --m-encre: #ffffff; }

/* Les onglets des Statistiques, bien DÉLIMITÉS (Toni, 01/10/2026 : « les onglets sont pas délimités ») :
   une barre segmentée, chaque onglet dans sa case, l'actif en blanc sur la barre grise. */
body.pc-v3.pc-beta .stats-tabs {
  gap: 4px !important; padding: 4px !important; margin: 14px 0 12px !important;
  background: var(--b-surface-2) !important; border: 1px solid var(--b-line) !important; border-radius: 12px !important;
  flex-wrap: nowrap !important; overflow-x: auto;
}
body.pc-v3.pc-beta .stats-tabs button {
  flex: 1 1 0 !important; margin: 0 !important; padding: 9px 12px !important;
  border: 1px solid transparent !important; border-radius: 9px !important;
  color: var(--b-fg-2) !important; font-weight: 600 !important; white-space: nowrap;
}
body.pc-v3.pc-beta .stats-tabs button:hover { background: color-mix(in srgb, var(--b-surface) 60%, transparent) !important; color: var(--b-fg) !important; }
body.pc-v3.pc-beta .stats-tabs button.on {
  background: var(--b-surface) !important; color: var(--b-accent) !important; font-weight: 700 !important;
  border: 1px solid var(--b-line) !important; border-bottom: 1px solid var(--b-line) !important;
  border-radius: 9px !important; box-shadow: 0 1px 3px rgba(16, 24, 40, .1) !important;
}
body.pc-beta .bnf-mtag {
  display: inline-block; max-width: 100%; padding: 2px 9px; border-radius: 6px; vertical-align: middle;
  background: var(--m); color: var(--m-encre, #fff); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.pc-v3.pc-beta .bnf-rangee-m .bnf-jauge > i:not(.perte) { background: var(--m) !important; }
body.pc-v3.pc-beta .bnf-rangee .topimg,
body.pc-v3.pc-beta .bnf-rangee .topph { width: 44px !important; height: 44px !important; border-radius: 9px !important; object-fit: contain; background: var(--b-surface); border: 1px solid var(--b-line); }
body.pc-v3.pc-beta .bnf-machine-c .bm-part > i { background: var(--m) !important; }

/* ════ GESTION ÉCRAN — Toni, 01/10/2026 ════
   Le choix de la borne : son nom dans SA couleur du Live ; plus de second en-tête « Gestion écran »
   (déjà en haut de page). */
body.pc-beta .ec-mtag {
  align-self: flex-start; max-width: 100%; padding: 4px 10px; border-radius: 8px;
  background: var(--m); color: var(--m-encre, #fff); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.pc-v3.pc-beta .ec-tuile.ec-tuile-c.on { box-shadow: 0 0 0 2px var(--b-surface), 0 0 0 4px var(--m) !important; border-color: transparent !important; }
body.pc-beta #ecCorps .mp2-hero { display: none; }
body.pc-v3.pc-beta .mp2-fond-btn.on { background: var(--b-accent) !important; border-color: var(--b-accent) !important; color: var(--b-accent-ink) !important; }

/* ════ SORTIES (releases.js) — Toni, 01/10/2026 ════
   La photo d'abord, la date en petit calendrier posé dessus, le jeu en pastille à sa couleur (--g) ;
   les sorties passées repliées. */
body.pc-v3.pc-beta .rel-month-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important; gap: 12px !important; }
body.pc-v3.pc-beta .rel-tile.rel-tile-b {
  position: relative; display: flex !important; flex-direction: column; align-items: stretch; gap: 6px; text-align: left;
  padding: 8px 8px 10px !important; border: 1px solid var(--b-line) !important; border-top: 1px solid var(--b-line) !important;
  border-radius: var(--b-radius) !important; background: var(--b-surface) !important; box-shadow: none !important;
  min-height: 0 !important; cursor: pointer; transition: border-color .12s, box-shadow .12s;
}
body.pc-v3.pc-beta .rel-tile.rel-tile-b:hover { border-color: var(--g, var(--b-line-strong)) !important; box-shadow: var(--b-shadow) !important; }
body.pc-v3.pc-beta .rel-tile-b .rel-tile-thumb {
  display: grid !important; place-items: center; width: 100% !important; height: auto !important; aspect-ratio: 1 / 1; max-width: 100%;
  border-radius: 9px !important; background: var(--b-surface-2) !important; overflow: hidden; margin: 0 !important;
}
body.pc-v3.pc-beta .rel-tile-b .rel-tile-thumb img { width: 100% !important; height: 100% !important; object-fit: contain !important; padding: 8px; }
body.pc-v3.pc-beta .rel-tile-b .rel-tile-thumb.noimg::after { content: attr(data-code); font-weight: 700; font-size: 1.1rem; color: var(--g, var(--b-fg-3)); }
body.pc-beta .rlb-date {
  position: absolute; top: 14px; left: 14px; display: flex; flex-direction: column; align-items: center;
  min-width: 42px; padding: 3px 6px 4px; border-radius: 8px; background: var(--b-surface);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .18); line-height: 1.05;
}
body.pc-beta .rlb-date b { font-size: 1.15rem; font-weight: 700; color: var(--b-fg); }
body.pc-beta .rlb-date small { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--g, var(--b-accent)); }
body.pc-v3.pc-beta .rel-tile-b .rel-tile-code { position: absolute; top: 14px; right: 14px; }
body.pc-v3.pc-beta .rel-tile-b .rel-tile-name {
  font-size: .84rem !important; font-weight: 600 !important; line-height: 1.3; color: var(--b-fg) !important; min-height: 2.6em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
body.pc-beta .rlb-jeu {
  align-self: flex-start; padding: 2px 8px; border-radius: 6px; font-size: .72rem; font-weight: 600;
  background: color-mix(in srgb, var(--g, var(--b-accent)) 16%, var(--b-surface)); color: color-mix(in srgb, var(--g, var(--b-accent)) 70%, var(--b-fg));
}
body.pc-v3.pc-beta .rel-band-passees > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
body.pc-v3.pc-beta .rel-band-passees > summary::-webkit-details-marker { display: none; }
body.pc-beta .rel-band-ouvrir { font-size: .82rem; font-weight: 600; color: var(--b-accent); }
body.pc-beta .rel-band-passees[open] .rel-band-ouvrir { font-size: 0; }
body.pc-beta .rel-band-passees[open] .rel-band-ouvrir::after { content: "Replier"; font-size: .82rem; }
body.pc-v3.pc-beta .rel-band-passees[open] > summary { margin-bottom: 12px; }

/* Hebdo : la semaine se lit d'un coup — mini-courbe des 7 jours, gros total, écart en pastille. */
body.pc-beta .weekly-spark { display: inline-flex; align-items: stretch; gap: 4px; height: 48px; margin-left: auto; margin-right: 18px; }
body.pc-beta .weekly-spark .ws-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; width: 12px; }
body.pc-beta .weekly-spark .ws-col > i { display: block; width: 10px; max-height: 34px; border-radius: 3px; background: hsl(var(--h) 70% 46%); }
body.pc-beta .weekly-spark .ws-col > i.vide { background: var(--b-line-strong); }
body.pc-beta .weekly-spark .ws-col > b { font-size: .62rem; font-weight: 700; line-height: 1; color: var(--b-fg-3); }
body.pc-v3.pc-beta .weekly-card-total > strong { font-size: 1.7rem !important; letter-spacing: -.02em; }
body.pc-v3.pc-beta .weekly-card-total > :is(.good-text, .danger-text) {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-weight: 700 !important; font-size: .76rem !important;
}
body.pc-v3.pc-beta .weekly-card-total > .good-text { background: var(--b-good-soft); color: var(--b-good) !important; }
body.pc-v3.pc-beta .weekly-card-total > .danger-text { background: var(--b-bad-soft); color: var(--b-bad) !important; }
body.pc-v3.pc-beta .weekly-summary-card.current { border-left: 4px solid var(--b-accent) !important; }
@media (max-width: 820px) { body.pc-beta .weekly-spark { display: none; } }
body.pc-v3.pc-beta .weekly-day-cell:not(.a-vendu) .weekly-day-meter > b { visibility: hidden; }

/* ════ FOURNISSEURS (suppliers.js › renderSuppliersViewBeta) — Toni, 01/10/2026 ════
   En-tête sur une ligne, chiffres en bande, fournisseurs en cartes compactes, une ligne claire par
   commande (au lieu du tableau de 13 colonnes). */
body.pc-beta .fo { display: flex; flex-direction: column; gap: 14px; }
body.pc-beta .fo-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
body.pc-beta .fo-tete h1 { margin: 0; font-size: 1.25rem; font-weight: 650; letter-spacing: -.01em; color: var(--b-fg); }
body.pc-beta .fo-save { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: .78rem; color: var(--b-fg-3); }
body.pc-beta .fo-save i { width: 7px; height: 7px; border-radius: 999px; background: var(--b-good); }
body.pc-v3.pc-beta .fo-recherche { position: relative; margin: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }
body.pc-v3.pc-beta .fo-recherche input#fcf-prod-search {
  flex: 1; min-width: 0; height: 100%; border: 0 !important; background: none !important; box-shadow: none !important;
  outline: none !important; padding: 0 !important; font-size: .95rem; color: var(--b-fg);
}
body.pc-beta button.fo-kpi-clic { cursor: pointer; }
body.pc-beta button.fo-kpi-clic > strong { color: var(--b-fg); }
body.pc-beta button.fo-kpi-clic.bad > strong { color: var(--b-bad); }
body.pc-beta button.fo-kpi-clic.warn > strong { color: var(--b-warn); }
body.pc-beta .fo-kpi-paye > strong { color: var(--b-good); }

body.pc-beta .fo-fours { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 14px 18px 18px; }
body.pc-v3.pc-beta .fcf-supplier-tile.fo-four {
  display: flex !important; flex-direction: row !important; align-items: center; gap: 12px; text-align: left;
  min-height: 0 !important; height: auto !important; aspect-ratio: auto !important; justify-content: flex-start !important;
  padding: 10px 12px !important; border: 1px solid var(--b-line) !important; border-radius: 12px !important;
  background: var(--b-surface) !important; box-shadow: none !important; cursor: pointer; transition: border-color .12s;
}
body.pc-v3.pc-beta .fcf-supplier-tile.fo-four:hover { border-color: var(--b-line-strong) !important; background: var(--b-surface-2) !important; }
body.pc-v3.pc-beta .fo-four .fcf-st-avatar { flex: none; width: 40px !important; height: 40px !important; margin: 0 !important; font-size: .82rem; }
body.pc-beta .fo-four-txt { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
body.pc-beta .fo-four-txt > b { font-size: .9rem; font-weight: 600; color: var(--b-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.pc-beta .fo-four-txt > span { display: flex; flex-wrap: wrap; gap: 4px; }
body.pc-beta .fo-four-ok { font-size: .74rem; color: var(--b-fg-3); }

body.pc-beta .fo-liste { display: flex; flex-direction: column; }
body.pc-beta .fo-ligne {
  display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(0, 1.6fr) 120px minmax(0, 1.3fr) auto; gap: 16px; align-items: center;
  padding: 12px 18px; border-top: 1px solid var(--b-line); cursor: pointer; transition: background-color .12s;
}
body.pc-beta .fo-liste > .fo-ligne:first-child { border-top: 0; }
body.pc-beta .fo-ligne:hover { background: color-mix(in srgb, var(--b-surface-2) 70%, transparent); }
body.pc-beta .fo-qui { display: flex; align-items: center; gap: 10px; min-width: 0; }
body.pc-beta .fo-qui > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
body.pc-beta .fo-qui b { font-size: .9rem; font-weight: 600; color: var(--b-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.pc-beta .fo-qui span { font-size: .76rem; color: var(--b-fg-3); }
body.pc-beta .fo-quoi { font-size: .84rem; color: var(--b-fg-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.pc-beta .fo-montant { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
body.pc-beta .fo-montant b { font-size: .98rem; font-weight: 600; color: var(--b-fg); }
body.pc-beta .fo-montant span { font-size: .74rem; color: var(--b-bad); font-weight: 600; }
body.pc-beta .fo-montant .fo-solde { color: var(--b-good); font-weight: 500; }
body.pc-beta .fo-etats { display: flex; flex-wrap: wrap; gap: 5px; }
body.pc-beta .fo-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
body.pc-beta .fo-mini { height: 28px; padding: 0 10px; font-size: .76rem; }
body.pc-beta .fo-suppr {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--b-fg-3);
  cursor: pointer; font-size: .82rem;
}
body.pc-beta .fo-suppr:hover { border-color: color-mix(in srgb, var(--b-bad) 40%, var(--b-line)); color: var(--b-bad); background: var(--b-bad-soft); }
body.pc-beta .fcf-blink { animation: foClign 1.2s ease-in-out infinite; }
@keyframes foClign { 50% { opacity: .45; } }
body.pc-beta .fo-archives > summary { cursor: pointer; list-style: none; }
body.pc-beta .fo-archives > summary::-webkit-details-marker { display: none; }
body.pc-beta .fo-ouvrir { font-size: .82rem; font-weight: 600; color: var(--b-accent); }
body.pc-beta .fo-archives[open] .fo-ouvrir { font-size: 0; }
body.pc-beta .fo-archives[open] .fo-ouvrir::after { content: "Replier"; font-size: .82rem; }
@media (max-width: 1180px) {
  body.pc-beta .fo-ligne { grid-template-columns: minmax(0, 1fr) 110px; grid-template-areas: "qui montant" "quoi quoi" "etats actions"; gap: 8px 12px; }
  body.pc-beta .fo-qui { grid-area: qui; }
  body.pc-beta .fo-quoi { grid-area: quoi; }
  body.pc-beta .fo-montant { grid-area: montant; }
  body.pc-beta .fo-etats { grid-area: etats; }
  body.pc-beta .fo-actions { grid-area: actions; }
}
@media (prefers-reduced-motion: reduce) { body.pc-beta .fcf-blink { animation: none; } }

/* ── Tuiles des commandes (Toni, 10/10/2026) : vignettes en haut, infos dessous, drapeaux à pastille ── */
body.pc-beta .fo-feed-head { flex-wrap: wrap; gap: 10px 18px; }
body.pc-beta .fo-filtres { display: flex; gap: 6px; flex-wrap: wrap; }
body.pc-beta .fo-filtre {
  height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--b-line-strong); background: var(--b-surface);
  color: var(--b-fg-2); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: background-color .12s, border-color .12s, color .12s;
}
body.pc-beta .fo-filtre:hover { border-color: var(--b-accent); color: var(--b-fg); }
body.pc-beta .fo-filtre[aria-pressed="true"] { background: var(--b-accent); border-color: var(--b-accent); color: var(--b-accent-ink); }
body.pc-beta .fo-filtre-n { font-size: .72rem; padding: 1px 7px; border-radius: 999px; background: var(--b-surface-2); color: var(--b-fg-2); }
body.pc-beta .fo-filtre[aria-pressed="true"] .fo-filtre-n { background: rgba(255, 255, 255, .22); color: var(--b-accent-ink); }
body.pc-beta .fo-tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; padding: 16px 18px; }
body.pc-beta .fo-tuiles > .lb-vide { grid-column: 1 / -1; }
body.pc-beta .fo-tuile {
  display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--b-line); border-radius: var(--b-radius-lg); background: var(--b-surface);
  cursor: pointer; overflow: hidden; transition: border-color .12s, box-shadow .12s;
}
body.pc-beta .fo-tuile:hover, body.pc-beta .fo-tuile:focus-visible { border-color: var(--b-line-strong); box-shadow: var(--b-shadow); outline: none; }
body.pc-beta .fo-tuile-visuels { display: flex; gap: 6px; padding: 10px 10px 0; background: var(--b-surface-2); border-bottom: 1px solid var(--b-line); min-height: 92px; }
body.pc-beta .fo-vignette {
  flex: 1 1 0; min-width: 0; max-width: 96px; aspect-ratio: 3 / 4; margin: 0; border-radius: 8px 8px 0 0; overflow: hidden; background: var(--b-surface);
  border: 1px solid var(--b-line); border-bottom: 0; display: flex; align-items: center; justify-content: center;
}
body.pc-beta .fo-vignette img { width: 100%; height: 100%; object-fit: contain; display: block; }
body.pc-beta .fo-vignette.vide span, body.pc-beta .fo-vignette.plus span { font-size: .9rem; font-weight: 700; color: var(--b-fg-3); letter-spacing: .04em; }
body.pc-beta .fo-vignette.plus { background: var(--b-accent-soft); border-color: transparent; }
body.pc-beta .fo-vignette.plus span { color: var(--b-accent); }
body.pc-beta .fo-tuile-corps { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 10px; flex: 1 1 auto; }
body.pc-beta .fo-tuile-resume { font-size: .8rem; color: var(--b-fg-3); }
body.pc-beta .fo-tuile-montant { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
body.pc-beta .fo-tuile-montant b { font-size: 1.12rem; font-weight: 600; color: var(--b-fg); }
body.pc-beta .fo-tuile-montant .fo-reste { font-size: .76rem; color: var(--b-bad); font-weight: 600; }
body.pc-beta .fo-tuile-montant .fo-solde { font-size: .76rem; color: var(--b-good); font-weight: 600; }
body.pc-beta .fo-flags { display: flex; flex-wrap: wrap; gap: 5px; }
body.pc-beta .fo-flag {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 7px; border-radius: 999px; font-size: .74rem; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap;
}
body.pc-beta .fo-flag i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
body.pc-beta .fo-flag.good { background: var(--b-good-soft); color: var(--b-good); }
body.pc-beta .fo-flag.warn { background: var(--b-warn-soft); color: var(--b-warn); }
body.pc-beta .fo-flag.bad { background: var(--b-bad-soft); color: var(--b-bad); }
body.pc-beta .fo-flag.neutral { background: var(--b-surface-2); color: var(--b-fg-2); border-color: var(--b-line); }
body.pc-beta .fo-tuile-pied { display: flex; align-items: center; gap: 6px; justify-content: flex-end; padding: 8px 10px; border-top: 1px solid var(--b-line); background: color-mix(in srgb, var(--b-surface-2) 45%, transparent); }
body.pc-beta .fo-tuile-pied .fo-suppr { margin-left: auto; }
body.pc-beta .fo-tuile-pied .fo-mini + .fo-suppr { margin-left: 0; }
@media (max-width: 640px) {
  body.pc-beta .fo-tuiles { grid-template-columns: 1fr; padding: 12px; gap: 10px; }
}

/* ════ FENÊTRE D'UNE COMMANDE FOURNISSEUR (détail, paiement, réception, modifier) — Toni, 01/10/2026 ════
   Haut compact et TOUJOURS visible (fournisseur, n° et date, états, onglets) ; états en petites cases ;
   onglets délimités ; boutons en minuscules ; en « Modifier », Enregistrer / Annuler collés en bas. */
/* Un bouton principal survolé restait gris avec son texte blanc (illisible) : il garde l'accent. */
body.pc-v3.pc-beta .fcf-btn.fcf-btn-primary:hover,
body.pc-v3.pc-beta .primary-btn:hover { background: var(--b-accent) !important; color: var(--b-accent-ink) !important; filter: brightness(1.07); }
body.pc-v3.pc-beta .fcf-modal .fcf-btn {
  text-transform: none !important; letter-spacing: 0 !important; font-size: .85rem !important; padding: 8px 14px !important;
}
body.pc-v3.pc-beta .fcf-modal-xl .fcf-modal-header { padding: 12px 24px !important; min-height: 0; }
body.pc-v3.pc-beta .fcf-modal-xl .fcf-modal-header h3 { font-size: .95rem !important; color: var(--b-fg-2) !important; font-weight: 600 !important; }
body.pc-v3.pc-beta .fcf-od-top {
  position: sticky; top: 49px; z-index: 9; padding: 14px 24px 12px !important;
  background: var(--b-surface) !important; border-bottom: 1px solid var(--b-line);
}
body.pc-v3.pc-beta .fcf-od-head { margin-bottom: 12px !important; gap: 12px !important; }
body.pc-v3.pc-beta .fcf-od-head > :first-child { width: 44px !important; height: 44px !important; min-width: 44px; font-size: .82rem !important; }
body.pc-v3.pc-beta .fcf-od-head-name { font-size: 1.15rem !important; font-weight: 650 !important; color: var(--b-fg) !important; }
body.pc-v3.pc-beta .fcf-od-head-sub { font-size: .82rem !important; color: var(--b-fg-3) !important; }
body.pc-v3.pc-beta .fcf-od-stats { gap: 8px !important; margin-bottom: 12px !important; }
body.pc-v3.pc-beta .fcf-od-stat { padding: 8px 12px !important; border-radius: 10px !important; }
body.pc-v3.pc-beta .fcf-od-stat span { margin-bottom: 2px !important; font-size: .64rem !important; font-weight: 650 !important; }
body.pc-v3.pc-beta .fcf-od-stat strong { font-size: .98rem !important; font-weight: 650 !important; }
body.pc-v3.pc-beta .fcf-od-stat small { font-size: .7rem; }
body.pc-v3.pc-beta .fcf-tabs {
  margin: 0 !important; padding: 4px !important; gap: 4px !important; flex-wrap: nowrap !important;
  background: var(--b-surface-2) !important; border: 1px solid var(--b-line) !important; border-radius: 11px !important;
}
body.pc-v3.pc-beta .fcf-tab {
  flex: 1 1 0; justify-content: center; margin: 0 !important; padding: 8px 12px !important;
  border: 1px solid transparent !important; border-radius: 8px !important; box-shadow: none !important;
  font-size: .88rem !important; font-weight: 600 !important; color: var(--b-fg-2) !important; background: transparent !important;
}
body.pc-v3.pc-beta .fcf-tab:hover { background: color-mix(in srgb, var(--b-surface) 60%, transparent) !important; color: var(--b-fg) !important; }
body.pc-v3.pc-beta .fcf-tab.active {
  background: var(--b-surface) !important; color: var(--b-accent) !important; font-weight: 700 !important;
  border-color: var(--b-line) !important; box-shadow: 0 1px 3px rgba(16, 24, 40, .1) !important;
}
body.pc-v3.pc-beta .fcf-od-pane { padding: 18px 24px 24px !important; background: var(--b-bg) !important; }
body.pc-v3.pc-beta .fcf-od-actions { margin-bottom: 14px !important; padding-bottom: 12px !important; border-bottom-color: var(--b-line) !important; }
/* « Modifier » : Enregistrer / Annuler toujours à portée, collés au bas de la fenêtre. */
body.pc-v3.pc-beta .fcf-modal .fcf-popup-form-actions {
  position: sticky; bottom: 0; z-index: 8; display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 16px !important; padding: 12px 0 !important; background: var(--b-bg) !important;
  border-top: 1px solid var(--b-line); box-shadow: 0 -8px 16px -12px rgba(16, 24, 40, .25);
}
body.pc-v3.pc-beta .fcf-modal .fcf-popup-form-actions .fcf-btn-primary { order: 2; }
@media (max-width: 820px) {
  body.pc-v3.pc-beta .fcf-od-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.pc-v3.pc-beta .fcf-od-top { position: static; }
}

/* Fidélité : le bouton d'action principal (« Créer le bon », « Créer / Mettre à jour »…) en accent ;
   les gris, discrets et ceux qui portent leur propre couleur (Supprimer en rouge) gardent la leur. */
body.pc-v3.pc-beta .fid-btn:not(.gris):not(.ghost):not([style*="background"]) {
  background: var(--b-accent) !important; color: var(--b-accent-ink) !important; border-color: transparent !important; font-weight: 600 !important;
}
body.pc-v3.pc-beta .fid-btn:not(.gris):not(.ghost):not([style*="background"]):hover { background: var(--b-accent) !important; filter: brightness(1.07); }
body.pc-v3.pc-beta .fid-btn:disabled { background: var(--b-surface-2) !important; color: var(--b-fg-3) !important; border-color: var(--b-line) !important; cursor: not-allowed; filter: none; }

/* ════ FORMULAIRE D'UNE COMMANDE FOURNISSEUR (neuve ou « Modifier ») — Toni, 01/10/2026 : « pousse plus » ════
   Chaque ligne produit = une carte : photo, ce qu'on achète et ce qui entre en stock, les chiffres sur
   une ligne avec le total en direct, le type et ses options en pastilles. */
body.pc-v3.pc-beta .fcf-product-block.fpb {
  position: relative; display: flex; flex-direction: column; gap: 14px; margin: 0 0 12px !important;
  padding: 16px 18px !important; border: 1px solid var(--b-line) !important; border-left: 4px solid var(--accent, var(--b-accent)) !important;
  border-radius: 14px !important; background: var(--b-surface) !important; box-shadow: 0 1px 2px rgba(16, 24, 40, .04) !important;
}
body.pc-beta .fpb-tete { display: grid; grid-template-columns: auto 64px minmax(0, 1fr) auto; gap: 14px; align-items: start; }
body.pc-beta .fpb-num {
  display: grid; place-items: center; width: 24px; height: 24px; margin-top: 2px; border-radius: 999px;
  background: var(--accent, var(--b-accent)); color: #fff; font-size: .78rem; font-weight: 700;
}
body.pc-beta .fpb-photo .fcf-thumb { border-radius: 12px !important; border: 1px solid var(--b-line); background-color: var(--b-surface-2) !important; }
body.pc-beta .fpb-photo .fcf-thumb img { object-fit: contain !important; }
body.pc-beta .fpb-noms { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
body.pc-beta .fpb-lbl { font-size: .68rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--b-fg-3); }
body.pc-beta .fpb-lbl-stock { margin-top: 6px; color: var(--b-accent); }
body.pc-v3.pc-beta .fpb :is(input[type="text"], input[type="number"], select) {
  width: 100%; min-width: 0; height: 38px; padding: 0 11px !important; border: 1px solid var(--b-line) !important; border-radius: 9px !important;
  background: var(--b-surface) !important; font-size: .9rem !important; color: var(--b-fg) !important; box-shadow: none !important;
}
body.pc-v3.pc-beta .fpb input:focus, body.pc-v3.pc-beta .fpb select:focus { border-color: var(--b-accent) !important; box-shadow: 0 0 0 3px var(--b-accent-soft) !important; outline: none !important; }
body.pc-v3.pc-beta .fpb input.fpb-nom { font-weight: 600 !important; font-size: .95rem !important; }
body.pc-v3.pc-beta .fpb input.fpb-stock { background: color-mix(in srgb, var(--b-accent-soft) 45%, var(--b-surface)) !important; }
body.pc-beta .fpb-suppr {
  width: 32px !important; height: 32px !important; border-radius: 9px !important; border: 1px solid transparent !important;
  background: none !important; color: var(--b-fg-3) !important; font-size: .9rem !important; cursor: pointer;
}
body.pc-beta .fpb-suppr:hover:not(:disabled) { border-color: color-mix(in srgb, var(--b-bad) 40%, var(--b-line)) !important; color: var(--b-bad) !important; background: var(--b-bad-soft) !important; }
body.pc-beta .fpb-suppr:disabled { opacity: .25; cursor: default; }
body.pc-beta .fpb-chiffres { display: grid; grid-template-columns: 130px minmax(200px, 1fr) minmax(150px, auto); gap: 12px; align-items: end; padding-left: 38px; }
body.pc-beta .fpb-case { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 0; }
body.pc-beta .fpb-case > span:first-child { font-size: .68rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--b-fg-3); }
body.pc-beta .fpb-case small { font-size: .74rem; color: var(--b-fg-3); }
body.pc-beta .fpb-prix-ligne { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 6px; }
body.pc-beta .fpb-total { align-items: flex-end; padding: 6px 12px; border-radius: 10px; background: var(--b-surface-2); }
body.pc-beta .fpb-total b { font-size: 1.25rem; font-weight: 650; color: var(--b-fg); }
body.pc-beta .fpb-type { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 12px 0 0 38px; border-top: 1px dashed var(--b-line); }
body.pc-beta .fpb-typesel { width: 210px; }
body.pc-beta .fpb-opts { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 2px; }
body.pc-beta .fpb-opt {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--b-line); background: var(--b-surface); color: var(--b-fg-2); font-size: .82rem; font-weight: 600; user-select: none;
}
body.pc-beta .fpb-opt input { width: 15px !important; height: 15px !important; margin: 0; accent-color: var(--b-accent); }
body.pc-beta .fpb-opt:hover { border-color: var(--b-line-strong); }
body.pc-beta .fpb-opt.on { border-color: var(--b-accent); background: var(--b-accent-soft); color: var(--b-accent); }
body.pc-beta .fpb-boosters { width: 140px; }
body.pc-beta .fpb-boosters.is-off { opacity: .45; }
body.pc-beta .fpb-parbooster { padding-bottom: 9px; font-size: .8rem; font-weight: 600; color: var(--b-accent); }
body.pc-beta .fpb-multi { margin-left: 38px; }
/* Le reste du formulaire : sections en cartes, cases à cocher en interrupteurs. */
body.pc-v3.pc-beta .fcf-modal :is(.fcf-tracking-section, .fcf-products-section) {
  border: 1px solid var(--b-line) !important; border-radius: 14px !important; background: var(--b-surface) !important; box-shadow: none !important;
}
body.pc-v3.pc-beta .fcf-modal .fcf-products-section { background: transparent !important; border: 0 !important; padding: 0 !important; }
body.pc-v3.pc-beta .fcf-modal :is(.fcf-tracking-section-title, .fcf-products-section-title) { color: var(--b-fg-2) !important; font-size: .72rem !important; letter-spacing: .07em !important; }
body.pc-v3.pc-beta .fcf-modal .fcf-add-product-btn {
  border: 1.5px dashed color-mix(in srgb, var(--b-accent) 45%, var(--b-line)) !important; border-radius: 12px !important;
  background: color-mix(in srgb, var(--b-accent-soft) 40%, transparent) !important; color: var(--b-accent) !important; font-weight: 650 !important; height: 44px;
}
body.pc-v3.pc-beta .fcf-modal .fcf-popup-form-checkboxes { display: flex; flex-wrap: wrap; gap: 8px; }
body.pc-v3.pc-beta .fcf-modal .fcf-popup-form-checkboxes > label {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--b-line); background: var(--b-surface); font-weight: 600; color: var(--b-fg-2);
}
body.pc-v3.pc-beta .fcf-modal .fcf-popup-form-checkboxes > label:has(input:checked) { border-color: var(--b-good); background: var(--b-good-soft); color: var(--b-good); }
body.pc-v3.pc-beta .fcf-modal .fcf-popup-form-checkboxes input { accent-color: var(--b-good); width: 16px; height: 16px; }
@media (max-width: 820px) {
  body.pc-beta .fpb-tete { grid-template-columns: 48px minmax(0, 1fr) auto; }
  body.pc-beta .fpb-num { display: none; }
  body.pc-beta .fpb-photo .fcf-thumb { width: 48px !important; height: 48px !important; }
  body.pc-beta .fpb-chiffres { grid-template-columns: 1fr 1fr; padding-left: 0; }
  body.pc-beta .fpb-total { grid-column: 1 / -1; }
  body.pc-beta .fpb-type { padding-left: 0; }
  body.pc-beta .fpb-multi { margin-left: 0; }
}

/* ════ PRODUITS (machine.js › renderProductSearchTab) — Toni, 01/10/2026 ════
   Recherche en tête, « Créer un produit » en bouton principal, outils en menu, filtres en pastilles,
   tuiles compactes (photo entière, nom, prix, « En machine » pour ce qui est en vente). */
body.pc-v3.pc-beta .pr-b .mm-pf {
  height: 30px !important; padding: 0 12px !important; border-radius: 999px !important; border: 1px solid var(--b-line) !important;
  background: var(--b-surface) !important; background-image: none !important; color: var(--b-fg-2) !important;
  font-size: .8rem !important; font-weight: 550 !important; box-shadow: none !important;
}
body.pc-v3.pc-beta .pr-b .mm-pf.on { background: var(--b-accent-soft) !important; border-color: color-mix(in srgb, var(--b-accent) 45%, var(--b-line)) !important; color: var(--b-accent) !important; }
body.pc-v3.pc-beta .pr-b .sb-search input#mpProdSearch {
  flex: 1; min-width: 0; max-width: none !important; height: 100%; border: 0 !important; background: none !important; box-shadow: none !important;
  outline: none !important; padding: 0 !important; font-size: .95rem; color: var(--b-fg);
}
body.pc-beta .pr-count { display: flex; gap: 10px; flex-wrap: wrap; }
body.pc-v3.pc-beta .pr-count .mm-hdcount { color: var(--b-fg-3) !important; font-size: .78rem !important; font-weight: 500 !important; text-transform: none !important; letter-spacing: 0 !important; }
body.pc-v3.pc-beta .pr-tuiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; gap: 12px !important; padding: 16px 18px 18px; }
body.pc-v3.pc-beta .pr-tuiles .mm-tile {
  border: 1px solid var(--b-line) !important; border-radius: 12px !important; box-shadow: none !important; background: var(--b-surface) !important;
  transition: border-color .12s, box-shadow .12s !important;
}
body.pc-v3.pc-beta .pr-tuiles .mm-tile:hover { transform: none !important; border-color: var(--b-line-strong) !important; box-shadow: var(--b-shadow) !important; }
body.pc-v3.pc-beta .pr-tuiles .mm-tile .ph { aspect-ratio: 3 / 4 !important; margin: 8px 8px 0; border-radius: 9px; background: var(--b-surface-2) !important; background-image: none !important; }
body.pc-v3.pc-beta .pr-tuiles .mm-tile .ph img { max-width: 92% !important; max-height: 92% !important; filter: none !important; }
body.pc-v3.pc-beta .pr-tuiles .mm-tile:hover .ph img { transform: none !important; }
body.pc-v3.pc-beta .pr-tuiles .mm-flagwrap { top: 12px !important; right: 12px !important; transform: scale(.78); transform-origin: top right; }
body.pc-v3.pc-beta .pr-tuiles .mm-tile .info { padding: 8px 10px 10px !important; display: flex; flex-direction: column; gap: 3px; }
body.pc-v3.pc-beta .pr-tuiles .mm-tile .nm { font-size: .82rem !important; font-weight: 600 !important; color: var(--b-fg) !important; }
body.pc-v3.pc-beta .pr-tuiles .mm-tile .pr { margin: 0 !important; color: var(--b-fg) !important; font-family: var(--b-mono); font-size: .92rem !important; font-weight: 600 !important; }
body.pc-v3.pc-beta .pr-tuiles .mm-tags { margin-top: 2px; }
body.pc-v3.pc-beta .pr-tuiles .mm-tag { background: var(--b-surface-2) !important; color: var(--b-fg-2) !important; border: 0 !important; font-size: .68rem !important; }
/* Ce qui est EN VENTE (dans une machine) le dit, en haut à gauche de la photo. */
body.pc-beta .pr-tuiles .mm-tile[data-inm="1"]::before {
  content: "En machine"; position: absolute; top: 12px; left: 12px; z-index: 3; padding: 2px 8px; border-radius: 999px;
  background: var(--b-good); color: #fff; font-size: .66rem; font-weight: 700; letter-spacing: .02em;
}

/* ════ « MODIFIER LE PRODUIT » (machine.js › openEditProduct) — Toni, 01/10/2026 ════
   Fenêtre large en deux colonnes : la photo en grand à gauche (avec ses options), la fiche à droite ;
   Supprimer / Annuler / Enregistrer collés en bas. Même formulaire, mêmes id. */
body.pc-v3.pc-beta .mm-edit-ov .mm-edit-box { max-width: 940px !important; border-radius: 16px !important; border: 1px solid var(--b-line); }
body.pc-v3.pc-beta .mm-edit-ov .mm-edit-head { padding: 14px 22px !important; border-bottom: 1px solid var(--b-line) !important; background: var(--b-surface) !important; }
body.pc-v3.pc-beta .mm-edit-ov .mm-edit-body {
  display: grid; grid-template-columns: 280px minmax(0, 1fr); column-gap: 26px; align-items: start; padding: 18px 22px 0 !important;
}
body.pc-v3.pc-beta .mm-edit-ov .mm-edit-body > * { grid-column: 2; min-width: 0; }
body.pc-v3.pc-beta .mm-edit-ov .mm-edit-body > .mm-field:has(#ePrev) {
  grid-column: 1; grid-row: 1 / span 12; position: sticky; top: 70px; margin: 0 !important;
  padding: 14px; border: 1px solid var(--b-line); border-radius: 14px; background: var(--b-surface-2);
}
body.pc-v3.pc-beta .mm-edit-ov .mm-imgrow { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
body.pc-v3.pc-beta .mm-edit-ov #ePrev { display: grid; place-items: center; width: 100%; aspect-ratio: 9 / 14; max-width: 100%; border-radius: 12px; background: var(--b-surface); border: 1px solid var(--b-line); overflow: hidden; }
body.pc-v3.pc-beta .mm-edit-ov #ePrev img { width: 100% !important; height: 100% !important; object-fit: contain !important; border-radius: 0 !important; }
body.pc-v3.pc-beta .mm-edit-ov #eImage { max-width: 100% !important; font-size: .8rem; }
body.pc-v3.pc-beta .mm-edit-ov #eImage::file-selector-button {
  margin-right: 8px; padding: 6px 12px; border: 1px solid var(--b-line); border-radius: 8px; background: var(--b-surface); color: var(--b-fg); font-weight: 600; cursor: pointer;
}
body.pc-v3.pc-beta .mm-edit-ov .mm-edit-body > div[style*="justify-content:space-between"] {
  grid-column: 1 / -1; position: sticky; bottom: 0; z-index: 4; margin: 16px -22px 0 !important; padding: 12px 22px;
  background: var(--b-surface); border-top: 1px solid var(--b-line); box-shadow: 0 -8px 16px -12px rgba(16, 24, 40, .25);
}
body.pc-v3.pc-beta .mm-edit-ov .mm-edit-body > #eNote { grid-column: 1 / -1; padding-bottom: 12px; }
body.pc-v3.pc-beta .mm-edit-ov .mm-input { height: 38px; border-radius: 9px !important; border: 1px solid var(--b-line) !important; }
body.pc-v3.pc-beta .mm-edit-ov .mm-del { border-radius: 9px !important; }
@media (max-width: 820px) {
  body.pc-v3.pc-beta .mm-edit-ov .mm-edit-body { grid-template-columns: 1fr; }
  body.pc-v3.pc-beta .mm-edit-ov .mm-edit-body > * { grid-column: 1; }
  body.pc-v3.pc-beta .mm-edit-ov .mm-edit-body > .mm-field:has(#ePrev) { grid-row: auto; position: static; }
  body.pc-v3.pc-beta .mm-edit-ov #ePrev { aspect-ratio: auto; height: 220px; }
}

/* ════ FENÊTRES LES PLUS OUVERTES (02/10/2026) : fiche produit du Stock, détail d'une vente ══════════════ */

/* La croix de fermeture était blanche sur un entête devenu blanc : invisible dans toutes les fenêtres. */
body.pc-v3.pc-beta .modal-close-btn {
  position: relative; flex: none; width: 34px; height: 34px; padding: 0; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--b-line) !important; background: var(--b-surface) !important;
  color: transparent !important; font-size: 0 !important;
}
body.pc-v3.pc-beta .modal-close-btn::before {
  content: "✕"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 14px; font-weight: 500; color: var(--b-fg-2);
}
body.pc-v3.pc-beta .modal-close-btn:hover { background: var(--b-surface-2) !important; }
body.pc-v3.pc-beta .modal-close-btn:hover::before { color: var(--b-fg); }
/* Une fenêtre ne dépasse jamais de l'écran, même agrandie par l'échelle d'affichage (grands écrans). */
body.pc-v3.pc-beta .modal { max-height: min(760px, calc(92vh / var(--pc-zoom, 1))); }

/* ── Fiche produit du Stock ─────────────────────────────────────────────────────────────────────────── */
body.pc-v3.pc-beta .modal.stock-product-detail-modal.fp-b {
  width: min(1080px, calc(100vw / var(--pc-zoom, 1) - 36px)); max-width: none;
  max-height: calc(92vh / var(--pc-zoom, 1));
  display: flex; flex-direction: column; overflow: hidden;
}
body.pc-v3.pc-beta .fp-b .fp-head { flex: none; padding: 20px 64px 18px 22px; }
body.pc-beta .fp-tete { display: flex; align-items: center; gap: 18px; min-width: 0; }
body.pc-v3.pc-beta .fp-b .fp-photo {
  width: 112px; height: 112px; flex: none; border-radius: 14px;
  background: var(--b-surface-2); border: 1px solid var(--b-line);
}
body.pc-beta .fp-b .fp-photo img { object-fit: contain; }
body.pc-beta .fp-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
body.pc-v3.pc-beta .fp-b .fp-id h2 { margin: 0; font-size: 1.3rem; font-weight: 650; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
body.pc-beta .fp-puces { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
body.pc-v3.pc-beta .fp-b .fp-puce {
  padding: 3px 9px; border-radius: 999px; background: var(--b-surface-2);
  font-size: .76rem; font-weight: 550; color: var(--b-fg-2) !important; white-space: nowrap;
}
body.pc-beta .fp-jauge { height: 6px; border-radius: 99px; background: var(--b-surface-2); overflow: hidden; max-width: 420px; }
body.pc-beta .fp-jauge > i { display: block; height: 100%; border-radius: 99px; background: var(--b-accent); }
body.pc-v3.pc-beta .fp-b .fp-jauge-txt { font-size: .78rem; color: var(--b-fg-3) !important; }
body.pc-v3.pc-beta .fp-b .fp-jauge-txt b { color: var(--b-fg-2) !important; font-weight: 600; }
body.pc-beta .fp-restant {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 108px; padding: 12px 16px; border-radius: 14px; background: var(--b-accent-soft);
}
body.pc-v3.pc-beta .fp-b .fp-restant b { font-size: 2.1rem; font-weight: 650; line-height: 1; color: var(--b-accent) !important; }
body.pc-v3.pc-beta .fp-b .fp-restant small { font-size: .66rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--b-fg-2) !important; }
body.pc-beta .fp-restant.warning { background: var(--b-warn-soft); }
body.pc-v3.pc-beta .fp-b .fp-restant.warning b { color: var(--b-warn) !important; }
body.pc-beta .fp-restant.danger { background: var(--b-bad-soft); }
body.pc-v3.pc-beta .fp-b .fp-restant.danger b { color: var(--b-bad) !important; }

body.pc-v3.pc-beta .fp-b .fp-corps {
  flex: 1; min-height: 0; overflow: auto; background: var(--b-bg);
  display: flex; flex-direction: column; gap: 16px; padding: 18px 22px;
}
body.pc-beta .fp-prix {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px;
  border: 1px solid var(--b-line); border-radius: var(--b-radius); overflow: hidden; background: var(--b-line);
}
body.pc-beta .fp-case { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; background: var(--b-surface); min-width: 0; }
body.pc-beta .fp-case b { font-size: 1.15rem; font-weight: 650; color: var(--b-fg); white-space: nowrap; }
body.pc-beta .fp-case b em { font-style: normal; font-size: .74rem; font-weight: 600; margin-left: 4px; opacity: .85; }
body.pc-beta .fp-case small { font-size: .7rem; font-weight: 550; color: var(--b-fg-3); line-height: 1.25; }
body.pc-beta .fp-case.good b { color: var(--b-good); }
body.pc-beta .fp-case.warn b { color: var(--b-warn); }
body.pc-beta .fp-case.bad b { color: var(--b-bad); }
body.pc-beta .fp-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
body.pc-beta .fp-col {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px;
  background: var(--b-surface); border: 1px solid var(--b-line); border-radius: var(--b-radius);
}
body.pc-v3.pc-beta .fp-b .stock-detail-section-title { margin: 0; align-items: baseline; }
body.pc-v3.pc-beta .fp-b .stock-detail-section-title span { font-size: .92rem; font-weight: 650; color: var(--b-fg); }
body.pc-v3.pc-beta .fp-b .stock-detail-section-title small { font-size: .72rem; font-weight: 500; color: var(--b-fg-3); max-width: 60%; }
body.pc-v3.pc-beta .fp-b .fp-col > .stock-detail-section-title:not(:first-child) { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--b-line); }
body.pc-v3.pc-beta .fp-b .stock-product-lot-row {
  grid-template-columns: 26px minmax(0, 1fr) repeat(3, auto); gap: 12px; min-height: 0; padding: 9px 12px;
  border: 1px solid var(--b-line); border-radius: 10px; background: var(--b-surface); box-shadow: none; font-family: inherit;
}
body.pc-v3.pc-beta .fp-b button.stock-product-lot-row:hover { border-color: var(--b-accent); background: var(--b-accent-soft); }
body.pc-v3.pc-beta .fp-b .stock-product-lot-row.depleted { background: var(--b-surface-2); opacity: .7; }
body.pc-v3.pc-beta .fp-b .stock-product-lot-row b { font-size: .88rem; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
body.pc-v3.pc-beta .fp-b .stock-product-lot-row small { font-size: .66rem; font-weight: 500; color: var(--b-fg-3); text-align: right; }
body.pc-v3.pc-beta .fp-b .stock-product-lot-main strong { font-size: .86rem; font-weight: 600; }
body.pc-v3.pc-beta .fp-b .stock-product-lot-main small { text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.pc-v3.pc-beta .fp-b .stock-lot-index {
  width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px;
  background: var(--b-surface-2); color: var(--b-fg-2); font-size: .74rem; font-weight: 650;
}
body.pc-v3.pc-beta .fp-b .stock-lot-del-btn {
  border: 1px solid var(--b-line) !important; color: var(--b-fg-3) !important; background: var(--b-surface) !important;
  border-radius: 10px !important; padding: 0 11px !important; font-weight: 500 !important;
}
body.pc-v3.pc-beta .fp-b .stock-lot-del-btn:hover { border-color: var(--b-bad) !important; color: var(--b-bad) !important; background: var(--b-bad-soft) !important; }
body.pc-v3.pc-beta .fp-b .stock-product-price-history { max-height: none !important; margin: 0 !important; overflow: visible !important; }
body.pc-v3.pc-beta .fp-b .stock-price-history-table th {
  font-size: .64rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--b-fg-3) !important;
  padding: 0 8px 6px !important; border-bottom: 1px solid var(--b-line);
}
body.pc-v3.pc-beta .fp-b .stock-price-history-table td { padding: 8px !important; font-variant-numeric: tabular-nums; }
body.pc-v3.pc-beta .fp-b .stock-price-history-table tr[data-prix-ventes] { border-top: 1px solid var(--b-line) !important; }
body.pc-v3.pc-beta .fp-b .stock-price-history-table tr[data-prix-ventes]:hover td { background: var(--b-surface-2); }
body.pc-v3.pc-beta .fp-b .stock-price-history-table strong { font-size: .92rem; font-weight: 650; }
body.pc-beta .fp-outils { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
body.pc-beta .fp-outils > * { margin: 0 !important; min-width: 0; }
body.pc-v3.pc-beta .fp-b .fp-outils > * {
  background: var(--b-surface) !important; border: 1px solid var(--b-line) !important; border-radius: var(--b-radius) !important;
}
body.pc-v3.pc-beta .fp-b .fp-outils > :not(details) { padding: 14px; }
body.pc-v3.pc-beta .fp-b .stock-assoc-details > summary { background: transparent; padding: 14px; }
body.pc-v3.pc-beta .fp-b .stock-assoc-details > summary span { font-size: .92rem; font-weight: 650; color: var(--b-fg); }
body.pc-v3.pc-beta .fp-b .stock-assoc-details > summary small { font-size: .74rem; color: var(--b-fg-3); }
body.pc-beta .fp-pied { flex: none; padding: 12px 22px; background: var(--b-surface); border-top: 1px solid var(--b-line); }
body.pc-v3.pc-beta .fp-b .fp-pied .modal-actions { margin: 0; padding: 0; border: 0; display: flex; justify-content: flex-end; gap: 10px; }
body.pc-v3.pc-beta .fp-b .fp-pied .modal-actions > button { flex: none; min-width: 150px; }
@media (max-width: 900px) {
  body.pc-beta .fp-cols, body.pc-beta .fp-outils { grid-template-columns: minmax(0, 1fr); }
  body.pc-beta .fp-tete { flex-wrap: wrap; }
  body.pc-v3.pc-beta .fp-b .fp-photo { width: 76px; height: 76px; }
}

/* ── Détail d'une vente (Live) ──────────────────────────────────────────────────────────────────────── */
body.pc-v3.pc-beta .modal.order-detail-modal.vd-b {
  width: min(600px, calc(100vw / var(--pc-zoom, 1) - 36px));
  max-height: calc(92vh / var(--pc-zoom, 1)); display: flex; flex-direction: column; overflow: hidden;
}
body.pc-v3.pc-beta .vd-b .order-detail-head { flex: none; align-items: flex-start; padding: 20px 22px 16px; background: var(--b-surface) !important; }
body.pc-beta .vd-tete { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
body.pc-v3.pc-beta .vd-b .vd-tete h2 { margin: 0; font-size: 1rem; line-height: 1; }
body.pc-v3.pc-beta .vd-b .vd-mtag {
  display: inline-block; padding: 5px 11px; border-radius: 8px; background: var(--m);
  color: var(--m-encre) !important; font-size: .82rem; font-weight: 650; letter-spacing: .01em;
}
body.pc-v3.pc-beta .vd-b .vd-montant { font-size: 2.3rem; font-weight: 650; line-height: 1.05; letter-spacing: -.02em; color: var(--b-fg); }
body.pc-v3.pc-beta .vd-b .vd-montant .lb-cents { color: var(--b-fg-2) !important; }
body.pc-v3.pc-beta .vd-b .vd-quand { margin: 0; font-size: .86rem; color: var(--b-fg-2) !important; }
body.pc-v3.pc-beta .vd-b .vd-quand::first-letter { text-transform: uppercase; }
body.pc-v3.pc-beta .vd-b .modal-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 16px 22px 18px; }
body.pc-beta .vd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.pc-beta .vd-meta .fid-tag { margin: 0; }
body.pc-beta .vd-no { margin-left: auto; font-style: normal; font-size: .76rem; color: var(--b-fg-3); }
body.pc-v3.pc-beta .vd-b .order-detail-items { gap: 8px; max-height: none; overflow: visible; }
body.pc-v3.pc-beta .vd-b .order-detail-item {
  gap: 14px; padding: 10px 14px 10px 10px; border: 1px solid var(--b-line); border-radius: var(--b-radius); background: var(--b-surface);
}
body.pc-v3.pc-beta .vd-b .odi-thumb {
  position: relative; flex: 0 0 64px; width: 64px; height: 64px; overflow: visible;
  border-radius: 10px; background: var(--b-surface-2); border: 1px solid var(--b-line);
}
body.pc-v3.pc-beta .vd-b .odi-thumb img { object-fit: contain; border-radius: 9px; background: var(--b-surface); }
body.pc-beta .vd-qte {
  position: absolute; right: -6px; bottom: -6px; min-width: 24px; padding: 2px 6px; border-radius: 99px; text-align: center;
  background: var(--b-fg); color: #fff; font-size: .72rem; font-weight: 650; line-height: 1.3; border: 2px solid var(--b-surface);
}
body.pc-v3.pc-beta .vd-b .odi-main strong { font-size: .95rem; font-weight: 600; color: var(--b-fg); }
body.pc-v3.pc-beta .vd-b .odi-main small { font-size: .76rem; color: var(--b-fg-3); }
body.pc-v3.pc-beta .vd-b .odi-price b { font-size: 1.05rem; font-weight: 650; color: var(--b-fg); font-variant-numeric: tabular-nums; }
body.pc-v3.pc-beta .vd-b .odi-price small { font-size: .74rem; color: var(--b-fg-3); }
body.pc-beta .vd-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 12px 4px 0; border-top: 1px solid var(--b-line); font-size: .88rem; color: var(--b-fg-2);
}
body.pc-beta .vd-total b { margin-left: 8px; font-size: 1.15rem; font-weight: 650; color: var(--b-fg); }
body.pc-beta .vd-pied {
  flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px;
  padding: 12px 22px; background: var(--b-surface); border-top: 1px solid var(--b-line);
}
body.pc-v3.pc-beta .vd-b .vd-pied > button { padding: 9px 16px; font-size: .86rem; }
/* La croix de la fiche produit reste dans le coin (elle est posée en absolu, pas dans le flux). */
body.pc-v3.pc-beta .stock-modal-close { position: absolute; top: 16px; right: 18px; }
/* Chiffres de la fiche et total de la vente : police de texte à chiffres alignés (la police à chasse
   fixe écarte trop « 5,08 € » dans une petite case). */
body.pc-v3.pc-beta .fp-b .num,
body.pc-v3.pc-beta .vd-total .num { font-family: var(--b-font); font-variant-numeric: tabular-nums; letter-spacing: 0; }
body.pc-v3.pc-beta .fp-b .fp-codes > :first-child { margin-top: 0; }
body.pc-v3.pc-beta .vd-b .vd-pied > button.primary {
  background: var(--b-accent) !important; border: 1px solid var(--b-accent) !important; color: var(--b-accent-ink) !important;
  border-radius: 10px; font-weight: 600; cursor: pointer;
}

/* ════ STOCK : Stock machine, Inventaire, Optimisation (02/10/2026) ════════════════════════════════════ */
/* ── Stock machine : une carte par machine, son nom dans SA couleur ─────────────────────────────────── */
body.pc-beta .smb-mtag {
  min-width: 0; max-width: 100%; padding: 5px 11px; border-radius: 8px;
  background: var(--m, var(--b-accent)); color: var(--m-encre, #fff);
  font-size: .92rem; font-weight: 650; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body.pc-beta .smb-mtag.neutre { background: var(--b-surface-2); color: var(--b-fg); }
body.pc-v3.pc-beta .smv-machine-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
body.pc-v3.pc-beta .smv-machine-card.smb-card {
  gap: 14px; padding: 14px; border: 1px solid var(--b-line); border-radius: var(--b-radius);
  background: var(--b-surface); box-shadow: none; transform: none; cursor: pointer;
}
body.pc-v3.pc-beta .smv-machine-card.smb-card:hover { border-color: var(--b-line-strong); box-shadow: var(--b-shadow); transform: none; }
body.pc-v3.pc-beta .smv-machine-card.smb-card:focus-visible { outline: 2px solid var(--b-accent); outline-offset: 2px; }
body.pc-v3.pc-beta .smb-card.offline { opacity: 1; background: var(--b-surface-2); }
body.pc-v3.pc-beta .smb-card > header { display: flex; align-items: center; gap: 8px; min-width: 0; }
body.pc-v3.pc-beta .smb-card > header .lb-pill { margin-left: auto; flex: none; }
body.pc-beta .smb-nums { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 18px; align-items: end; }
body.pc-beta .smb-nums > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.pc-beta .smb-nums > span:last-child { align-items: flex-end; text-align: right; }
body.pc-v3.pc-beta .smb-nums b { font-family: var(--b-font); font-variant-numeric: tabular-nums; font-size: 1.05rem; font-weight: 650; color: var(--b-fg); white-space: nowrap; }
body.pc-v3.pc-beta .smb-nums > span:first-child b { font-size: 1.6rem; line-height: 1; }
body.pc-beta .smb-nums small { font-size: .64rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--b-fg-3); }
body.pc-v3.pc-beta .smb-card > footer { padding-top: 10px; border-top: 1px solid var(--b-line); }
body.pc-beta .smb-voir { font-size: .8rem; font-weight: 600; color: var(--b-accent); }
body.pc-beta .smb-voir i { font-style: normal; display: inline-block; transition: transform .15s ease; }
body.pc-beta .smb-card:hover .smb-voir i { transform: translateX(3px); }
body.pc-v3.pc-beta .smv-head h3 { display: flex; align-items: center; gap: 8px; }
body.pc-v3.pc-beta .smv-head h3 .smb-mtag { font-size: 1.05rem; padding: 6px 13px; }
body.pc-v3.pc-beta .smv-ecart-strip {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; max-width: 620px;
  border: 1px solid var(--b-line); border-radius: var(--b-radius); overflow: hidden; background: var(--b-line);
}
body.pc-v3.pc-beta .smv-ecart-strip > span { border: 0; border-radius: 0; background: var(--b-surface); padding: 12px 16px; }
body.pc-v3.pc-beta .smv-ecart-strip b { font-size: 1.4rem; font-weight: 650; font-variant-numeric: tabular-nums; }
body.pc-v3.pc-beta .smv-ecart-strip .smv-ecart-diff b { color: var(--b-warn); }

/* ── Inventaire : les deux vrais boutons (demande du 24/09) gardés, dans le style de l'interface ────── */
body.pc-v3.pc-beta .inv-switch {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; margin: 0 0 14px;
  background: var(--b-surface-2); border: 1px solid var(--b-line); border-radius: 14px;
}
body.pc-v3.pc-beta .inv-switch-btn {
  min-width: 0; min-height: 48px; border: 0 !important; border-radius: 10px; background: transparent !important;
  color: var(--b-fg-2) !important; font-size: .98rem; font-weight: 600; font-family: inherit; box-shadow: none !important;
}
body.pc-v3.pc-beta .inv-switch-btn:hover { color: var(--b-fg) !important; }
body.pc-v3.pc-beta .inv-switch-btn.active {
  background: var(--b-surface) !important; color: var(--b-fg) !important; font-weight: 650;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 0 0 1px var(--b-line) !important;
}
body.pc-v3.pc-beta .inv-switch-btn small,
body.pc-v3.pc-beta .inv-switch-btn.active small { color: var(--b-accent) !important; font-weight: 600; }
/* La zone de scan : claire, bordée de l'accent — elle reste LA chose à viser sur la page. */
body.pc-v3.pc-beta .invd-scan {
  background: var(--b-accent-soft) !important; color: var(--b-fg) !important;
  border: 1px solid color-mix(in srgb, var(--b-accent) 35%, var(--b-line)); border-radius: var(--b-radius);
}
body.pc-v3.pc-beta .invd-scan label { color: var(--b-fg-2) !important; }
body.pc-v3.pc-beta .invd-scan input[type=text],
body.pc-v3.pc-beta .invd-scan input[type=number] { border: 1.5px solid var(--b-line-strong) !important; background: var(--b-surface) !important; font-family: inherit; }
body.pc-v3.pc-beta .invd-scan input[type=text] { font-weight: 650; }
body.pc-v3.pc-beta .invd-focus { color: var(--b-warn) !important; font-weight: 600; }
body.pc-v3.pc-beta .invd-focus.ok { color: var(--b-accent) !important; }
/* Inventaire physique : photo plus grande, trois compteurs alignés, plus de phrase répétée sur chaque tuile. */
body.pc-v3.pc-beta .inv-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
body.pc-v3.pc-beta .inv-tile { gap: 12px; padding: 12px; border: 1px solid var(--b-line); border-radius: var(--b-radius); transition: border-color .12s ease; }
body.pc-v3.pc-beta .inv-tile:hover { border-color: var(--b-accent); }
body.pc-v3.pc-beta .inv-tile.inv-done { opacity: 1; background: var(--b-good-soft); border-color: color-mix(in srgb, var(--b-good) 40%, var(--b-line)); }
body.pc-v3.pc-beta .inv-tile.inv-ecart { background: var(--b-bad-soft); border-color: color-mix(in srgb, var(--b-bad) 40%, var(--b-line)); }
body.pc-v3.pc-beta .inv-tile .stock-product-media { width: 60px; height: 60px; flex: none; border-radius: 10px; background: var(--b-surface-2); border: 1px solid var(--b-line); }
body.pc-v3.pc-beta .inv-tile .stock-product-media img { object-fit: contain; }
body.pc-v3.pc-beta .inv-meta h4 { font-size: .9rem; font-weight: 600; line-height: 1.25; }
body.pc-v3.pc-beta .inv-ref { background: transparent; padding: 0; font-size: .72rem; color: var(--b-fg-3); }
body.pc-v3.pc-beta .inv-check { width: 24px; height: 24px; accent-color: var(--b-good); }
body.pc-v3.pc-beta .inv-tile .inv-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: auto; font-size: .7rem; font-weight: 550; }
body.pc-v3.pc-beta .inv-tile .inv-nums > span {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 9px; border-radius: 9px; border: 0;
  background: var(--b-surface-2) !important; color: var(--b-fg-3) !important; font-size: 0; min-width: 0;
}
body.pc-v3.pc-beta .inv-tile .inv-nums > span::after { font-size: .64rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--b-fg-3); }
body.pc-v3.pc-beta .inv-tile .inv-nums > .stock-split-machine::after { content: "machine"; }
body.pc-v3.pc-beta .inv-tile .inv-nums > .stock-split-reserve::after { content: "réserve"; }
body.pc-v3.pc-beta .inv-tile .inv-nums > span b { font-size: 1.1rem; font-weight: 650; color: var(--b-fg); font-variant-numeric: tabular-nums; }
body.pc-v3.pc-beta .inv-tile .inv-nums > .stock-split-machine { background: var(--b-accent-soft) !important; }
body.pc-v3.pc-beta .inv-tile .inv-nums > .stock-split-machine b { color: var(--b-accent); }
body.pc-v3.pc-beta .inv-tile .inv-nums > .inv-comptable::after { content: "comptable"; }
body.pc-v3.pc-beta .inv-tile .inv-nums > .inv-comptable { box-shadow: inset 0 0 0 1px var(--b-line-strong); background: var(--b-surface) !important; }
body.pc-v3.pc-beta .inv-tile .inv-hint { display: none; }
body.pc-v3.pc-beta .inv-progress { font-weight: 650; background: var(--b-surface-2); font-variant-numeric: tabular-nums; }

/* ── Optimisation bénéfice (machines) : le bouton à presser est LE bouton de la carte ───────────────── */
body.pc-v3.pc-beta .opt-run {
  background: var(--b-accent) !important; color: var(--b-accent-ink) !important; box-shadow: none !important;
  border-radius: 10px; padding: 11px 20px; font-weight: 600; font-family: inherit;
}
body.pc-v3.pc-beta .opt-run:hover:not(:disabled) { background: color-mix(in srgb, var(--b-accent) 88%, #000) !important; }

/* ════ FIDÉLITÉ : clients et fiche client (02/10/2026) ═════════════════════════════════════════════════
   Restes de l'ancien habillage : pastilles dorées en dégradé, titres violets, jauge orange, encadré
   violet. Une seule couleur d'accent, les états en vert / orange / rouge. */
body.pc-v3.pc-beta .fid-av {
  background: var(--b-accent-soft); color: var(--b-accent); font-weight: 650; letter-spacing: .02em;
}
body.pc-v3.pc-beta .fid-tiles { gap: 10px; }
body.pc-v3.pc-beta .fid-tile { border: 1px solid var(--b-line); border-radius: var(--b-radius); box-shadow: none; font-family: inherit; }
body.pc-v3.pc-beta .fid-tile:hover { border-color: var(--b-line-strong); box-shadow: var(--b-shadow); }
body.pc-v3.pc-beta .fid-tile.on { background: var(--b-accent-soft); }
body.pc-v3.pc-beta .fid-tile .nm { font-weight: 600; color: var(--b-fg); }
body.pc-v3.pc-beta .fid-tile .sub { color: var(--b-fg-3); font-variant-numeric: tabular-nums; }
body.pc-v3.pc-beta .fid-tile .pts { color: var(--b-fg-2); font-weight: 600; font-variant-numeric: tabular-nums; }
body.pc-v3.pc-beta .fid-flag { background: var(--b-warn-soft); color: var(--b-warn); font-weight: 650; }
body.pc-v3.pc-beta .fid-alert { background: var(--b-warn-soft); border: 1px solid color-mix(in srgb, var(--b-warn) 35%, var(--b-line)); color: var(--b-fg); border-radius: var(--b-radius); }
body.pc-v3.pc-beta .fid-head { gap: 18px; padding-bottom: 16px; border-bottom-color: var(--b-line); }
body.pc-v3.pc-beta .fid-head .big { width: 68px; height: 68px; font-size: 1.45rem; }
body.pc-v3.pc-beta .fid-head > div > div:first-child { font-size: 1.4rem !important; font-weight: 650 !important; color: var(--b-fg) !important; letter-spacing: -.01em; }
body.pc-v3.pc-beta .fid-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 16px 0;
  border: 1px solid var(--b-line); border-radius: var(--b-radius); overflow: hidden; background: var(--b-line);
}
body.pc-v3.pc-beta .fid-stats .fid-stat { border: 0 !important; border-radius: 0 !important; background: var(--b-surface) !important; padding: 12px 16px; }
body.pc-v3.pc-beta .fid-stat .k { font-size: .66rem; font-weight: 600; letter-spacing: .06em; color: var(--b-fg-3); }
body.pc-v3.pc-beta .fid-stat .v { font-size: 1.45rem; font-weight: 650; font-variant-numeric: tabular-nums; }
body.pc-v3.pc-beta .fid-gauge { height: 8px; background: var(--b-surface-2); }
body.pc-v3.pc-beta .fid-gauge i { background: var(--b-accent); border-radius: 999px; }
body.pc-v3.pc-beta .fid-cols { gap: 16px; margin-top: 18px; }
body.pc-v3.pc-beta .fid-cols > div { padding: 14px; border: 1px solid var(--b-line); border-radius: var(--b-radius); min-width: 0; }
body.pc-v3.pc-beta .fid-h4 { color: var(--b-fg-3); font-weight: 600; letter-spacing: .06em; font-size: .7rem; margin-bottom: 8px; }
body.pc-v3.pc-beta .fid-li { padding: 9px 0; border-bottom-color: var(--b-line); font-size: .86rem; line-height: 1.4; font-variant-numeric: tabular-nums; }
body.pc-v3.pc-beta .fid-list > .fid-li:last-child { border-bottom: 0; }
body.pc-v3.pc-beta .fid-li b { font-weight: 650; }
body.pc-v3.pc-beta .fid-li.used { color: var(--b-fg-3); }
body.pc-v3.pc-beta .fid-check { background: var(--b-surface-2); border: 1px solid var(--b-line); border-radius: var(--b-radius); }
body.pc-v3.pc-beta .fid-check .q { border-bottom-color: var(--b-line); }
body.pc-v3.pc-beta .fid-check .a { background: var(--b-surface); box-shadow: inset 0 0 0 1px var(--b-line-strong); }
body.pc-v3.pc-beta #fidOut details > summary { color: var(--b-fg) !important; font-weight: 600 !important; }
body.pc-v3.pc-beta .fid-acts { gap: 10px; align-items: flex-end; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--b-line); }
/* « Créditer un bon » est LE geste de la fiche : le code par SMS redevient un bouton secondaire. */
body.pc-v3.pc-beta .fid-btn.violet:not(.gris):not(.ghost):not([style*="background"]) {
  background: var(--b-surface) !important; color: var(--b-fg) !important; border-color: var(--b-line) !important; font-weight: 500 !important;
}
body.pc-v3.pc-beta .fid-btn.violet:not(.gris):not(.ghost):not([style*="background"]):hover { background: var(--b-surface-2) !important; filter: none; }
/* Programme : « Régler » enregistre la règle — c'est le bouton principal de sa carte. */
body.pc-v3.pc-beta #fidCfgSave { background: var(--b-accent) !important; color: var(--b-accent-ink) !important; border-color: transparent !important; font-weight: 600 !important; }
/* Stock machine, détail : la pastille dit toujours quelque chose (« 4 vendus », « 0 vendu ») — un tiret
   seul ressemblait à une barre vide (Toni, 02/10/2026). */
body.pc-v3.pc-beta .smv-product .smv-flow { font-size: .72rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
body.pc-v3.pc-beta .smv-product.smv-flow-none .smv-flow { background: var(--b-surface-2); color: var(--b-fg-3); }
body.pc-v3.pc-beta .smv-product .smv-sold { color: var(--b-fg-3); }

/* ════ GESTION MACHINE : outils et consommation de données (02/10/2026) ════════════════════════════════ */
body.pc-v3.pc-beta .mm-sec { color: var(--b-fg-3); font-weight: 600; letter-spacing: .06em; }
body.pc-v3.pc-beta #mmSub > .mm-card { padding: 16px 18px; }
body.pc-v3.pc-beta .md-pick { gap: 6px; margin-bottom: 14px; }
body.pc-v3.pc-beta .md-chip { border: 1px solid var(--b-line); border-radius: 9px; padding: 6px 12px; font-weight: 550; font-family: inherit; color: var(--b-fg-2); transition: border-color .12s ease, color .12s ease; }
body.pc-v3.pc-beta .md-chip:hover:not(:disabled) { border-color: var(--b-line-strong); color: var(--b-fg); }
body.pc-v3.pc-beta .md-tiles {
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0 0 10px;
  border: 1px solid var(--b-line); border-radius: var(--b-radius); overflow: hidden; background: var(--b-line);
}
body.pc-v3.pc-beta .md-tile { border: 0; border-radius: 0; background: var(--b-surface); padding: 14px 16px; }
body.pc-v3.pc-beta .md-lab { font-size: .66rem; font-weight: 600; letter-spacing: .06em; color: var(--b-fg-3); }
body.pc-v3.pc-beta .md-val { font-size: 1.7rem; font-weight: 650; }
body.pc-v3.pc-beta .md-seg.out { background: var(--b-accent); }
body.pc-v3.pc-beta .md-seg.in { background: var(--b-line-strong); }
body.pc-v3.pc-beta .md-leg i[style*="0ea5e9"] { background: var(--b-accent) !important; }
body.pc-v3.pc-beta .md-leg i[style*="a78bfa"] { background: var(--b-line-strong) !important; }
body.pc-v3.pc-beta .md-chart { border-bottom-color: var(--b-line); }
body.pc-v3.pc-beta .md-rythme { background: var(--b-surface-2); border-color: var(--b-line); color: var(--b-fg-2); }
@media (max-width: 760px) { body.pc-v3.pc-beta .md-tiles { grid-template-columns: minmax(0, 1fr); } }

/* Tuiles de choix (outils d'une machine, catégories des Outils et de Fidélité) : une même tuile partout —
   icône dans un carré neutre, nom, une ligne d'explication ; plus de pastels ni de relief. */
body.pc-v3.pc-beta :is(.mc-cats, .fid-cats) { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
body.pc-v3.pc-beta :is(.mc-cat, .fid-cat) {
  aspect-ratio: auto; display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto auto;
  column-gap: 14px; row-gap: 2px; align-items: center; justify-items: start; text-align: left;
  padding: 14px 16px; border: 1px solid var(--b-line); border-radius: var(--b-radius); background: var(--b-surface);
  box-shadow: none; transform: none; font-family: inherit; transition: border-color .12s ease, box-shadow .12s ease;
}
body.pc-v3.pc-beta :is(.mc-cat, .fid-cat):hover { border-color: var(--b-accent); box-shadow: var(--b-shadow); transform: none; }
body.pc-v3.pc-beta :is(.mc-cat, .fid-cat) .ic {
  grid-row: 1 / span 2; width: 48px; height: 48px; border-radius: 12px; font-size: 24px;
  background: var(--b-surface-2) !important; box-shadow: none;
}
body.pc-v3.pc-beta :is(.mc-cat, .fid-cat) .nm { align-self: end; font-size: .95rem; font-weight: 650; color: var(--b-fg); }
body.pc-v3.pc-beta :is(.mc-cat, .fid-cat) .ds { align-self: start; font-size: .78rem; color: var(--b-fg-3); line-height: 1.35; }
body.pc-v3.pc-beta #mmOutils { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
body.pc-v3.pc-beta #mmOutils > .mm-mtile { align-items: flex-start; text-align: left; gap: 6px; padding: 16px; border-radius: var(--b-radius); }
body.pc-v3.pc-beta #mmOutils > .mm-mtile:hover:not(:disabled) { border-color: var(--b-accent); }
body.pc-v3.pc-beta #mmOutils > .mm-mtile > div:nth-child(2) { font-weight: 650 !important; color: var(--b-fg) !important; }

/* Stock machine, détail d'une machine : trois couleurs qu'on distingue de loin (Toni, 02/10/2026 :
   « le orange, on n'arrive pas à le distinguer du rouge, fais un orange plus marqué »). Pastilles PLEINES :
   vert, orange franc (texte foncé), rouge (texte blanc). Le bord prend la même couleur sur tout le tour. */
body.pc-v3.pc-beta .smv-product { border-left-width: 1px; border-width: 2px; }
body.pc-v3.pc-beta .smv-product.smv-flow-fast { border-color: #1f9d55; }
body.pc-v3.pc-beta .smv-product.smv-flow-fast .smv-flow { background: #1f9d55; color: #fff; }
body.pc-v3.pc-beta .smv-product.smv-flow-mid { border-color: #ff9500; }
body.pc-v3.pc-beta .smv-product.smv-flow-mid .smv-flow { background: #ff9500; color: #2b1800; }
body.pc-v3.pc-beta .smv-product.smv-flow-slow .smv-flow { background: #d92d2d; color: #fff; }
body.pc-v3.pc-beta .smv-product.smv-flow-none { border-color: var(--b-line); }
body.pc-v3.pc-beta .smv-legend .smv-flow-fast { color: #1f9d55; }
body.pc-v3.pc-beta .smv-legend .smv-flow-mid { color: #d97a00; }
body.pc-v3.pc-beta .smv-legend .smv-flow-slow { color: #d92d2d; }
/* Un produit « Lent — à envisager de changer » a un bord rouge qui CLIGNOTE (« pour que ce soit direct
   lisible »). Mouvements réduits demandés au système : le bord reste rouge et épais, sans clignoter. */
@keyframes smb-lent { 50% { border-color: var(--b-line); box-shadow: 0 0 0 2px transparent; } }
body.pc-v3.pc-beta .smv-product.smv-flow-slow { border-color: #d92d2d; box-shadow: 0 0 0 2px #d92d2d; animation: smb-lent 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  body.pc-v3.pc-beta .smv-product.smv-flow-slow { animation: none; }
}

/* ════ CALENDRIER DES CHARGES (02/10/2026) ═════════════════════════════════════════════════════════════
   Les blocs ont reçu un cadre avec la nouvelle interface, mais pas de marge intérieure : titres et
   contenus étaient collés au bord du cadre. */
body.pc-v3.pc-beta .charges-card { padding: 16px 18px; margin-top: 16px; }
body.pc-v3.pc-beta .charges-card-head { margin-bottom: 12px; }
body.pc-v3.pc-beta .charges-card-head h3 { font-size: 1rem; font-weight: 650; }
body.pc-v3.pc-beta .charges-grid { gap: 16px; align-items: start; }
body.pc-v3.pc-beta .charges-grid > .charges-card { margin-top: 16px; }
body.pc-v3.pc-beta .charges-timeline { border-color: var(--b-line); border-radius: var(--b-radius); overflow: hidden; }
body.pc-v3.pc-beta .charges-summary-bar { border-top-color: var(--b-line); }
body.pc-v3.pc-beta .charges-summary-cell strong { font-weight: 650; font-variant-numeric: tabular-nums; }

/* Réglages : mêmes tuiles de choix que Gestion machine et Fidélité. */
body.pc-v3.pc-beta .rs-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
body.pc-v3.pc-beta .rs-tile {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; align-items: center; text-align: left;
  padding: 14px 16px; border: 1px solid var(--b-line); border-radius: var(--b-radius); background: var(--b-surface);
  box-shadow: none; transform: none; font-family: inherit; transition: border-color .12s ease, box-shadow .12s ease;
}
body.pc-v3.pc-beta .rs-tile:hover { border-color: var(--b-accent); box-shadow: var(--b-shadow); transform: none; }
body.pc-v3.pc-beta .rs-tile.actif { border-color: var(--b-accent); background: var(--b-accent-soft); box-shadow: none; }
body.pc-v3.pc-beta .rs-tile.actif .rs-tile-ico { background: var(--b-surface) !important; }
body.pc-v3.pc-beta .rs-tiles { margin-bottom: 16px; }
/* Chaque rubrique ouverte : un cadre AVEC sa marge (titre et tableau étaient collés au bord). */
body.pc-v3.pc-beta .rs-panel > :is(.card, section, .stock-card) { padding: 16px 18px; }
body.pc-v3.pc-beta .rs-panel .stock-table-wrap { margin-top: 12px; }
body.pc-v3.pc-beta .rs-tile-ico { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; font-size: 24px; background: var(--b-surface-2) !important; box-shadow: none; }
body.pc-v3.pc-beta .rs-tile-txt strong { display: block; font-size: .95rem; font-weight: 650; color: var(--b-fg); line-height: 1.2; }
body.pc-v3.pc-beta .rs-tile-txt small { display: block; margin-top: 2px; font-size: .78rem; color: var(--b-fg-3); line-height: 1.35; }
/* État & configuration : tuiles sans liseré dégradé, valeur en police de texte. */
body.pc-v3.pc-beta .rs-panel .summary-card::before,
body.pc-v3.pc-beta .rs-panel .summary-card::after { display: none !important; }
body.pc-v3.pc-beta .rs-panel .summary-card { border-left: 1px solid var(--b-line) !important; padding: 14px 16px; }
body.pc-v3.pc-beta .rs-panel .summary-card strong { font-family: var(--b-font) !important; font-size: 1.25rem; font-weight: 650 !important; letter-spacing: -.01em; }
body.pc-v3.pc-beta .rs-panel .summary-card span { font-size: .66rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--b-fg-3) !important; margin-top: 6px; }

/* ════ COMPTA : Ventes et Inventaire compta (02/10/2026) ═══════════════════════════════════════════════ */
/* Les deux tableaux côte à côte étaient trop étroits (le second était coupé) : l'un sous l'autre tant
   que la page n'est pas vraiment large. */
body.pc-v3.pc-beta .stock-split-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 760px), 1fr)); gap: 16px; }
/* Chiffres des tableaux : police de texte à chiffres alignés (la chasse fixe écartait « 1 122,77 € »). */
body.pc-v3.pc-beta .stock-table td.num,
body.pc-v3.pc-beta .stock-table th.num { font-family: var(--b-font) !important; font-variant-numeric: tabular-nums; letter-spacing: 0 !important; }
/* « Lien achats / stock / ventes » : les quatre chiffres étaient collés à leur libellé, sans mise en forme. */
body.pc-v3.pc-beta .inventory-flow-kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 12px 0 14px;
  border: 1px solid var(--b-line); border-radius: var(--b-radius); overflow: hidden; background: var(--b-line);
}
body.pc-v3.pc-beta .inventory-flow-kpis > span { display: flex; flex-direction: column; gap: 3px; padding: 12px 16px; background: var(--b-surface); min-width: 0; }
body.pc-v3.pc-beta .inventory-flow-kpis strong { font-size: 1.3rem; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--b-fg); white-space: nowrap; }
body.pc-v3.pc-beta .inventory-flow-kpis small { font-size: .72rem; color: var(--b-fg-3); line-height: 1.3; }
@media (max-width: 900px) { body.pc-v3.pc-beta .inventory-flow-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Bandeaux de chiffres de Compta : autant de cases par ligne que la largeur le permet (une case ne reste
   plus seule sur une deuxième ligne). */
body.pc-v3.pc-beta .stock-kpi-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important; }

/* ════ PAIEMENTS (02/10/2026) : derniers restes de l'ancien habillage ══════════════════════════════════ */
body.pc-v3.pc-beta .payments-table tr.payment-row-current > td:first-child { box-shadow: inset 3px 0 0 0 var(--b-accent); }
body.pc-v3.pc-beta .payment-status-badge.next { background: var(--b-accent-soft); color: var(--b-accent); }
body.pc-v3.pc-beta .payment-status-badge.current { background: var(--b-good-soft); color: var(--b-good); }
body.pc-v3.pc-beta .payment-status-badge.completed { background: var(--b-surface-2); color: var(--b-fg-2); }
body.pc-v3.pc-beta .payment-status-badge.upcoming { background: var(--b-warn-soft); color: var(--b-warn); }
/* Dépenses : les deux titres de section en texte normal (orange et bleu ne disaient rien de plus). */
body.pc-v3.pc-beta .dep-section-head { margin-top: 20px; font-size: 1rem; font-weight: 650; color: var(--b-fg) !important; }
body.pc-v3.pc-beta .dep-section-head b { color: var(--b-fg) !important; font-variant-numeric: tabular-nums; }
body.pc-v3.pc-beta .dep-section-head > span > span { background: var(--b-surface-2) !important; color: var(--b-fg-2); font-weight: 550 !important; }
body.pc-v3.pc-beta .dep-balance-display { font-family: var(--b-font) !important; border-bottom-color: var(--b-line-strong); }
body.pc-v3.pc-beta .dep-balance-display:hover { border-bottom-color: var(--b-accent); }
body.pc-v3.pc-beta .dep-cycle-select { min-width: 260px; }

/* ════ MACHINE VIRTUELLE (02/10/2026) : titres et chiffres dans le style commun ════════════════════════ */
body.pc-v3.pc-beta .mv-sec { color: var(--b-fg-3); font-weight: 600; letter-spacing: .06em; font-size: .7rem; }
body.pc-v3.pc-beta .mv-heroes { gap: 1px; border: 1px solid var(--b-line); border-radius: var(--b-radius); overflow: hidden; background: var(--b-line); }
body.pc-v3.pc-beta .mv-hero { border: 0 !important; border-radius: 0 !important; background: var(--b-surface) !important; padding: 12px 16px; }
body.pc-v3.pc-beta .mv-hero .v { font-size: 1.35rem; font-weight: 650; color: var(--b-fg) !important; font-variant-numeric: tabular-nums; }
body.pc-v3.pc-beta .mv-hero .l { font-size: .72rem; font-weight: 500; color: var(--b-fg-3); }
body.pc-v3.pc-beta .mv-hero.benef .v { color: var(--b-good) !important; }

/* ════ COMPTES & ACCÈS (02/10/2026) : lien et pastille bleus de l'ancien habillage ═════════════════════ */
body.pc-v3.pc-beta span[style*="color:#2563eb"] { color: var(--b-accent) !important; }
body.pc-v3.pc-beta span[style*="background:#e0e7ff"] { background: var(--b-surface-2) !important; color: var(--b-fg-2) !important; }

/* ════ FIDÉLITÉ : clients premium (Toni, 02/10/2026) ═══════════════════════════════════════════════════
   « Les clients qui ont dépensé plus de 300 euros dans la machine : mets un bord doré, que je voie que ce
   sont des clients premium. » Bord doré franc, pastille d'initiales dorée, et un bouton pour ne voir qu'eux. */
body.pc-v3.pc-beta .fid-tile.premium { border: 2px solid #d4a017; background: linear-gradient(180deg, #fffaeb, var(--b-surface) 70%); }
body.pc-v3.pc-beta .fid-tile.premium:hover { border-color: #b8860b; }
body.pc-v3.pc-beta .fid-tile.premium.on { background: #fff4d1; }
body.pc-v3.pc-beta .fid-tile.premium .fid-av { background: #fbe9b0; color: #8a6100; }
body.pc-v3.pc-beta .fid-premium-tag { color: #8a6100; font-weight: 650; }
body.pc-v3.pc-beta #fidPremium.on { background: #fff4d1 !important; border-color: #d4a017 !important; color: #8a6100 !important; font-weight: 650 !important; }
body.pc-v3.pc-beta .fid-lien {
  padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: var(--b-fg-3);
  text-decoration: underline; text-underline-offset: 2px;
}
body.pc-v3.pc-beta .fid-lien:hover { color: var(--b-fg); }

/* ════ LIVE : la ligne d'une machine clignote quand il s'y passe quelque chose (02/10/2026) ═════════════
   Vente payée (vert), paiement en cours (orange), échec (rouge), mouvement vu par la caméra (accent).
   Ce clignotement existait sur les tuiles de l'ancienne interface ; il visait des éléments qui n'existent
   plus. Mouvements réduits demandés au système : un liseré fixe à la place. */
@keyframes lbMachineFlash { 50% { background: color-mix(in srgb, var(--f) 20%, var(--b-surface)); } }
body.pc-beta .lb-mc.flash-sale { --f: var(--b-good); animation: lbMachineFlash .85s ease-in-out 6; }
body.pc-beta .lb-mc.flash-unpaid { --f: var(--b-warn); animation: lbMachineFlash .85s ease-in-out 6; }
body.pc-beta .lb-mc.flash-cancelled { --f: var(--b-bad); animation: lbMachineFlash .85s ease-in-out 6; }
body.pc-beta .lb-mc.flash-motion { --f: var(--b-accent); animation: lbMachineFlash 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  body.pc-beta .lb-mc:is(.flash-sale, .flash-unpaid, .flash-cancelled, .flash-motion) { animation: none; box-shadow: inset 3px 0 0 var(--f); }
}

/* Gestion écran : « Envoyer un fichier » dans la couleur d'accent (il était resté indigo). */
body.pc-v3.pc-beta .mp2-btn:not([style*="background"]) { background: var(--b-accent); color: var(--b-accent-ink); border-radius: 10px; padding: 10px 18px; font-size: .9rem; font-weight: 600; }
body.pc-v3.pc-beta .mp2-btn:not([style*="background"]):hover:not(:disabled) { background: color-mix(in srgb, var(--b-accent) 88%, #000); }

/* Popups de vente : le NOM DE LA MACHINE en gros, en haut, en aplat de SA couleur (Toni, 03/10/2026).
   La popup « vente en cours » ne mélange plus d'orange dans la couleur de la machine (un bleu tournait
   au gris) : l'état « en cours » se lit au halo orange qui pulse, au point orange et au titre. */
body.pc-beta .sale-popup-machine { display: block; margin: 0 34px 14px; padding: 10px 16px; border-radius: 16px; border: 0; background: var(--machine-border, #10b981); color: var(--machine-encre, #ffffff); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; line-height: 1.1; letter-spacing: .01em; text-transform: none; text-wrap: balance; box-shadow: 0 6px 16px color-mix(in srgb, var(--machine-border, #10b981) 40%, transparent); }
body.pc-beta .sale-popup.potential { background: radial-gradient(circle at 24% -8%, #ffffff, transparent 48%), linear-gradient(160deg, color-mix(in srgb, var(--machine-border, #10b981) 15%, #ffffff), color-mix(in srgb, var(--machine-border, #10b981) 34%, #ffffff)); border: 2px solid #f59e0b; }

/* Paiements : une carte par versement (Toni, 04/10/2026) — total avant Nayax → frais → total après
   Nayax, puis la barre qui partage ce qu'on reçoit en fixes / bénéfice récupérable / rachat stock. */
body.pc-v3.pc-beta .pv-liste { display: grid; gap: 14px; margin: 4px 0 18px; }
body.pc-v3.pc-beta .pv-card { --pv-fixes: var(--b-fg-3); --pv-redevance: #e8541c; --pv-benef: #c8920a; --pv-stock: var(--b-accent); border: 1px solid var(--b-line); border-radius: var(--b-radius-lg); background: var(--b-surface); padding: 16px 18px; display: grid; gap: 14px; }
body.pc-v3.pc-beta .pv-card.next { border-color: color-mix(in srgb, var(--b-accent) 45%, var(--b-line)); box-shadow: inset 4px 0 0 0 var(--b-accent); }
body.pc-v3.pc-beta .pv-card.current { box-shadow: inset 4px 0 0 0 var(--b-good); }
body.pc-v3.pc-beta .pv-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: flex-start; }
body.pc-v3.pc-beta .pv-head > div:first-child { display: grid; gap: 2px; }
body.pc-v3.pc-beta .pv-head b { font-size: 1.05rem; }
body.pc-v3.pc-beta .pv-head span, body.pc-v3.pc-beta .pv-statut > span:last-child { color: var(--b-fg-2); font-size: .82rem; }
body.pc-v3.pc-beta .pv-statut { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
body.pc-v3.pc-beta .pv-flux { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; }
body.pc-v3.pc-beta .pv-fleche { color: var(--b-fg-3); font-size: 1.3rem; }
body.pc-v3.pc-beta .pv-bloc, body.pc-v3.pc-beta .pv-part { display: grid; gap: 3px; min-width: 0; }
body.pc-v3.pc-beta .pv-bloc small, body.pc-v3.pc-beta .pv-part small { font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--b-fg-2); }
body.pc-v3.pc-beta :is(.pv-bloc, .pv-part) b.num { font-family: var(--b-font); }
body.pc-v3.pc-beta .pv-bloc b { font-size: 1.55rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
body.pc-v3.pc-beta .pv-bloc.frais b { color: var(--b-bad); font-size: 1.15rem; }
body.pc-v3.pc-beta .pv-bloc.apres b { color: var(--b-good); }
body.pc-v3.pc-beta .pv-bloc span, body.pc-v3.pc-beta .pv-part span { font-size: .78rem; color: var(--b-fg-2); }
body.pc-v3.pc-beta .pv-barre { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--b-surface-2); }
body.pc-v3.pc-beta .pv-barre i { display: block; height: 100%; }
body.pc-v3.pc-beta .pv-barre i + i { border-left: 2px solid var(--b-surface); }
body.pc-v3.pc-beta .pv-barre i.fixes { background: var(--pv-fixes); }
body.pc-v3.pc-beta .pv-barre i.benef { background: var(--pv-benef); }
body.pc-v3.pc-beta .pv-barre i.redevance { background: var(--pv-redevance); }
body.pc-v3.pc-beta .pv-part.redevance { border-left-color: var(--pv-redevance); }
body.pc-v3.pc-beta .pv-part.redevance b { color: var(--pv-redevance); }
body.pc-v3.pc-beta .pv-barre i.stock { background: var(--pv-stock); }
body.pc-v3.pc-beta .pv-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
body.pc-v3.pc-beta .pv-part { padding-left: 10px; border-left: 4px solid var(--pv-fixes); }
body.pc-v3.pc-beta .pv-part b { font-size: 1.2rem; font-weight: 750; font-variant-numeric: tabular-nums; }
body.pc-v3.pc-beta .pv-part.benef { border-left-color: var(--pv-benef); }
body.pc-v3.pc-beta .pv-part.benef b { color: var(--pv-benef); font-size: 1.45rem; }
body.pc-v3.pc-beta .pv-part.stock { border-left-color: var(--pv-stock); }
body.pc-v3.pc-beta .pv-part.stock b { color: var(--pv-stock); font-size: 1.45rem; }
body.pc-v3.pc-beta .pv-manque { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--b-warn-soft); color: var(--b-warn); font-weight: 600; font-size: .85rem; }
body.pc-v3.pc-beta .payments-table .pv-benef strong { color: #c8920a; }
body.pc-v3.pc-beta .payments-table .pv-stock strong { color: var(--b-accent); }
@media (max-width: 760px) {
  body.pc-v3.pc-beta .pv-flux { grid-template-columns: minmax(0, 1fr); }
  body.pc-v3.pc-beta .pv-fleche { display: none; }
  body.pc-v3.pc-beta .pv-parts { grid-template-columns: minmax(0, 1fr); }
}

/* Stock → Outils → Achats manquants (Toni, 04/10/2026) : tableau à compléter, puis création. */
body.pc-beta .am-overlay { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(2, 6, 23, .55); }
body.pc-beta .am-box { width: min(1180px, 100%); max-height: 92vh; overflow: auto; background: var(--b-surface); color: var(--b-fg); border-radius: var(--b-radius-lg); padding: 20px 22px; display: grid; gap: 14px; box-shadow: var(--b-shadow); }
body.pc-beta .am-tete { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; }
body.pc-beta .am-tete h2 { margin: 0 0 4px; font-size: 1.25rem; }
body.pc-beta .am-tete p { margin: 0; font-size: .86rem; line-height: 1.5; max-width: 80ch; }
body.pc-beta .am-table-wrap { overflow: auto; border: 1px solid var(--b-line); border-radius: var(--b-radius); }
body.pc-beta .am-table { width: 100%; border-collapse: collapse; font-size: .86rem; font-family: var(--b-font); }
body.pc-beta .am-table th { position: sticky; top: 0; background: var(--b-surface-2); text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--b-fg-2); padding: 8px 10px; white-space: nowrap; }
body.pc-beta .am-table td { padding: 7px 10px; border-top: 1px solid var(--b-line); vertical-align: middle; }
body.pc-beta .am-table :is(th, td).num { text-align: right; font-variant-numeric: tabular-nums; }
body.pc-beta .am-table td b { display: block; font-weight: 650; }
body.pc-beta .am-table td small { display: block; color: var(--b-fg-2); font-size: .74rem; margin-top: 2px; }
body.pc-beta .am-table input[type="number"] { width: 92px; text-align: right; padding: 5px 8px; border: 1px solid var(--b-line-strong); border-radius: 8px; background: var(--b-surface); color: var(--b-fg); font: inherit; }
body.pc-beta .am-table input[type="date"] { padding: 4px 6px; border: 1px solid var(--b-line-strong); border-radius: 8px; background: var(--b-surface); color: var(--b-fg); font: inherit; }
body.pc-beta .am-table .am-neg { color: var(--b-bad); font-weight: 650; }
body.pc-beta .am-table tr.am-incomplet td { background: var(--b-warn-soft); }
body.pc-beta .am-table tr.am-incomplet [data-am-prix]:placeholder-shown { border-color: var(--b-warn); }
body.pc-beta .am-pied { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
body.pc-beta .am-attention { color: var(--b-warn); font-weight: 600; }
body.pc-beta .am-statut { margin: 0; font-size: .86rem; color: var(--b-fg-2); }
body.pc-beta .am-statut.error { color: var(--b-bad); font-weight: 600; }
body.pc-beta .am-vide { margin: 0; padding: 18px; border-radius: var(--b-radius); background: var(--b-good-soft); color: var(--b-good); font-weight: 600; }
body.pc-beta .slm-origine { margin: 6px 0 0; font-size: .9rem; }

/* Stock par machine : l'heure à laquelle les machines ont été lues, à côté d'« Actualiser ». */
body.pc-beta .smv-fraicheur { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
body.pc-beta .smv-fraicheur small { color: var(--b-fg-2); font-size: .8rem; white-space: nowrap; }

/* Produits : étiquette et pastille « Sans marque » (Toni, 05/10/2026) — les fiches à compléter. */
body.pc-beta .mm-tag.mm-tag-vide { background: var(--b-warn-soft) !important; color: var(--b-warn) !important; border-color: transparent !important; }
body.pc-beta .mm-pf .mm-pf-n { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--b-warn-soft); color: var(--b-warn); font-size: .78em; font-weight: 700; }

/* Commande fournisseur, multi-série (Toni, 06/10/2026 : « si j'ai mis multi-série je perds l'affichage
   des séries dans le pack »). La règle générale des champs du formulaire (.fpb, width: 100 %) l'emportait
   sur la largeur fixe de la QUANTITÉ : elle prenait toute la ligne et le champ du produit (la série),
   réduit à zéro, disparaissait. Ici, la quantité reprend sa largeur et la série reprend la place. */
body.pc-v3.pc-beta .fpb .fcf-multi-row { display: flex; align-items: center; gap: 8px; }
body.pc-v3.pc-beta .fpb .fcf-multi-row input.fcf-multi-qty { width: 84px; flex: 0 0 84px; text-align: center; }
body.pc-v3.pc-beta .fpb .fcf-multi-row input.fcf-multi-name { width: auto; flex: 1 1 auto; min-width: 0; }
body.pc-v3.pc-beta .fpb .fcf-multi-row .fcf-multi-x { flex: none; color: var(--b-fg-3); }
body.pc-v3.pc-beta .fpb .fcf-multi-row .fcf-multi-del { flex: none; }

/* Commande fournisseur, onglet Détail sans « Modifier » (Toni, 07/10/2026) : la dernière tuile ajoute un
   produit, le bloc « Infos » (date, suivi, facture) s'enregistre champ par champ, « Supprimer » en bas. */
body.pc-v3.pc-beta .fcf-modal .fcf-prod-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; border: 2px dashed var(--b-line-strong) !important; background: transparent !important; color: var(--b-fg-2); font: inherit; font-weight: 600; cursor: pointer; box-shadow: none !important; }
body.pc-v3.pc-beta .fcf-modal .fcf-prod-add:hover { border-color: var(--b-accent) !important; color: var(--b-accent); background: var(--b-accent-soft) !important; }
body.pc-v3.pc-beta .fcf-modal .fcf-prod-add-plus { font-size: 1.9rem; line-height: 1; font-weight: 500; }
body.pc-v3.pc-beta .fcf-modal .fcf-od-infos-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr) minmax(0, 1.4fr); gap: 14px; }
body.pc-v3.pc-beta .fcf-modal .fcf-od-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
body.pc-v3.pc-beta .fcf-modal .fcf-od-info > span { font-size: .72rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--b-fg-3); }
body.pc-v3.pc-beta .fcf-modal .fcf-od-info-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
body.pc-v3.pc-beta .fcf-modal .fcf-od-info-row select { flex: 0 1 170px; min-width: 120px; }
body.pc-v3.pc-beta .fcf-modal .fcf-od-info-row input[type="text"] { flex: 1 1 140px; min-width: 0; }
body.pc-v3.pc-beta .fcf-modal .fcf-od-info-vide { color: var(--b-fg-3); font-size: .86rem; }
body.pc-v3.pc-beta .fcf-modal .fcf-lien { background: none; border: 0; padding: 0; font: inherit; color: var(--b-accent); text-decoration: underline; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.pc-v3.pc-beta .fcf-modal .fcf-lien.fcf-lien-danger { color: var(--b-bad); }
body.pc-v3.pc-beta .fcf-modal .fcf-od-fichier { cursor: pointer; }
body.pc-v3.pc-beta .fcf-modal .fcf-od-actions-bas { margin-top: 18px !important; margin-bottom: 0 !important; padding-top: 12px !important; padding-bottom: 0 !important; border-bottom: 0 !important; border-top: 1px solid var(--b-line); }
body.pc-v3.pc-beta .fcf-modal .fcf-tile-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.pc-v3.pc-beta .fcf-modal .fcf-tile-form-actions .fcf-spacer { flex: 1; }
@media (max-width: 760px) {
  body.pc-v3.pc-beta .fcf-modal .fcf-od-infos-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Paiements → Redevance Sod.Games (Toni, 08/10/2026). */
body.pc-v3.pc-beta .rd .rd-grille { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; margin-top: 14px; }
body.pc-v3.pc-beta .rd .rd-bloc { border: 1px solid var(--b-line); border-radius: var(--b-radius-lg); background: var(--b-surface); padding: 14px 16px; margin-top: 16px; min-width: 0; }
body.pc-v3.pc-beta .rd .rd-grille .rd-bloc { margin-top: 0; }
body.pc-v3.pc-beta .rd .rd-bloc h4 { margin: 0 0 10px; font-size: .98rem; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
body.pc-v3.pc-beta .rd .rd-bloc h4 small { color: var(--b-fg-2); font-weight: 500; font-size: .8rem; }
body.pc-v3.pc-beta .rd .rd-table { width: 100%; border-collapse: collapse; font-size: .88rem; font-family: var(--b-font); }
body.pc-v3.pc-beta .rd .rd-table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--b-fg-3); padding: 6px 8px; border-bottom: 1px solid var(--b-line); white-space: nowrap; }
body.pc-v3.pc-beta .rd .rd-table td { padding: 8px; border-bottom: 1px solid var(--b-line); vertical-align: middle; }
body.pc-v3.pc-beta .rd .rd-table tfoot td { border-bottom: 0; border-top: 2px solid var(--b-line-strong); }
body.pc-v3.pc-beta .rd .rd-table :is(th, td).num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.pc-v3.pc-beta .rd .rd-table td small { display: block; color: var(--b-fg-2); font-size: .74rem; margin-top: 2px; }
body.pc-v3.pc-beta .rd .rd-table input[type="number"] { width: 130px; text-align: right; padding: 5px 8px; border: 1px solid var(--b-line-strong); border-radius: 8px; background: var(--b-surface); color: var(--b-fg); font: inherit; }
body.pc-v3.pc-beta .rd .rd-table input[type="date"] { padding: 4px 6px; border: 1px solid var(--b-line-strong); border-radius: 8px; background: var(--b-surface); color: var(--b-fg); font: inherit; }
body.pc-v3.pc-beta .rd tr.rd-manquant td { background: var(--b-warn-soft); }
body.pc-v3.pc-beta .rd .rd-histo tbody tr { cursor: pointer; }
body.pc-v3.pc-beta .rd .rd-histo tbody tr:hover td { background: var(--b-surface-2); }
body.pc-v3.pc-beta .rd .rd-histo tr.rd-courant td { background: var(--b-accent-soft); }
body.pc-v3.pc-beta .rd .rd-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--b-surface-2); color: var(--b-fg-2); font-size: .74rem; font-weight: 600; white-space: nowrap; }
body.pc-v3.pc-beta .rd .rd-tag-auto { background: var(--b-good-soft); color: var(--b-good); }
body.pc-v3.pc-beta .rd .rd-tag-manque { background: var(--b-warn-soft); color: var(--b-warn); }
body.pc-v3.pc-beta .rd .rd-aide { margin: 10px 0 0; font-size: .8rem; color: var(--b-fg-2); line-height: 1.5; }
body.pc-v3.pc-beta .rd .rd-ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--b-line); }
body.pc-v3.pc-beta .rd .rd-ligne span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.pc-v3.pc-beta .rd .rd-ligne small { color: var(--b-fg-2); font-size: .76rem; }
body.pc-v3.pc-beta .rd .rd-ligne b.num { font-family: var(--b-font); font-size: 1.1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.pc-v3.pc-beta .rd .rd-total { border-bottom: 0; padding-top: 12px; }
body.pc-v3.pc-beta .rd .rd-total span { font-weight: 700; font-size: 1rem; }
body.pc-v3.pc-beta .rd .rd-total b.num { font-size: 1.6rem; color: var(--b-accent); }
body.pc-v3.pc-beta .rd .rd-facture { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--b-line-strong); }
body.pc-v3.pc-beta .rd .rd-facture label, body.pc-v3.pc-beta .rd .rd-reglages label, body.pc-v3.pc-beta .rd .rd-inline { display: flex; flex-direction: column; gap: 4px; font-size: .74rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--b-fg-3); }
body.pc-v3.pc-beta .rd :is(.rd-facture, .rd-reglages, .rd-inline, .rd-ajout) input, body.pc-v3.pc-beta .rd .rd-ajout select { font: inherit; font-size: .9rem; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--b-fg); padding: 6px 9px; border: 1px solid var(--b-line-strong); border-radius: 8px; background: var(--b-surface); min-width: 0; }
body.pc-v3.pc-beta .rd .rd-limite { grid-column: 1 / -1; font-size: .86rem; color: var(--b-fg-2); }
body.pc-v3.pc-beta .rd .rd-reglages { margin-top: 14px; padding: 14px 16px; border: 1px dashed var(--b-line-strong); border-radius: var(--b-radius-lg); background: var(--b-surface-2); }
body.pc-v3.pc-beta .rd .rd-reglages h4 { margin: 14px 0 8px; font-size: .95rem; }
body.pc-v3.pc-beta .rd .rd-reglages-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
body.pc-v3.pc-beta .rd .rd-ajout { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
body.pc-v3.pc-beta .rd .rd-inline { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
body.pc-v3.pc-beta .rd .rd-ok { color: var(--b-good); font-weight: 700; }
body.pc-v3.pc-beta .rd-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--b-fg); color: var(--b-bg); padding: 10px 16px; border-radius: 999px; font-size: .88rem; font-weight: 600; z-index: 100002; transition: opacity .2s, transform .2s; pointer-events: none; }
body.pc-v3.pc-beta .rd-toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 860px) {
  body.pc-v3.pc-beta .rd .rd-grille { grid-template-columns: minmax(0, 1fr); }
  body.pc-v3.pc-beta .rd .rd-facture { grid-template-columns: minmax(0, 1fr); }
}

body.pc-v3.pc-beta .rd .rd-facture-fichier { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .86rem; }
body.pc-v3.pc-beta .rd .rd-btn-fichier { cursor: pointer; }
body.pc-v3.pc-beta .rd .rd-histo td small { display: block; }
body.pc-v3.pc-beta .pv-parts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* Marque : le logo rond Sod.Games en haut à gauche (Toni, 08/10/2026 : « mets ce logo »). */
body.pc-v3.pc-beta .brand { display: flex !important; align-items: center !important; gap: 10px !important; }
body.pc-v3.pc-beta .brand .brand-logo { width: 44px; height: 44px; border-radius: 50%; flex: none; object-fit: cover; box-shadow: 0 1px 4px rgba(15, 23, 42, .18); }
body.pc-v3.pc-beta .brand strong { font-size: 1rem !important; }

/* Redevance : petits boutons de la ligne du mois (facture, export), même style partout (Toni, 08/10 : « c'est moche »). */
body.pc-v3.pc-beta .rd .rd-mini { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--b-line-strong); background: var(--b-surface); color: var(--b-fg); font: inherit; font-size: .8rem; font-weight: 600; line-height: 1.1; cursor: pointer; white-space: nowrap; max-width: 100%; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
body.pc-v3.pc-beta .rd .rd-mini:hover { border-color: var(--b-accent); color: var(--b-accent); background: var(--b-accent-soft); }
body.pc-v3.pc-beta .rd .rd-mini-ok { border-color: color-mix(in srgb, var(--b-good) 45%, var(--b-line)); color: var(--b-good); background: var(--b-good-soft); overflow: hidden; text-overflow: ellipsis; }
body.pc-v3.pc-beta .rd .rd-mini-danger { color: var(--b-bad); }
body.pc-v3.pc-beta .rd .rd-mini-danger:hover { border-color: var(--b-bad); background: var(--b-bad-soft); color: var(--b-bad); }
body.pc-v3.pc-beta .rd .rd-histo td:last-child { white-space: nowrap; }
