/* =====================================================================
   NEXUS — Stylesheet v1.0 (Bloc 2 skeleton)
   Palette : --fz-red #cc0000 / --fz-black #0a0a0a / --fz-bg #f4f4f0
   Mobile-first + breakpoint desktop ≥ 1024px
   ===================================================================== */

:root {
  --fz-red:        #cc0000;
  --fz-red-dark:   #a30000;
  --fz-red-light:  #ee2222;
  --fz-black:      #0a0a0a;
  --fz-grey-1:     #1a1a1a;
  --fz-grey-2:     #2a2a2a;
  --fz-grey-3:     #4a4a4a;
  --fz-grey-4:     #888888;
  --fz-grey-5:     #cccccc;
  --fz-bg:         #f4f4f0;
  --fz-white:      #ffffff;

  --status-green:  #16a34a;
  --status-orange: #ea580c;
  --status-red:    #dc2626;
  --status-blue:   #2563eb;
  --status-amber:  #d97706;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.18);

  --topbar-h: 60px;
  --bottomnav-h: 60px;
  --sidebar-w: 240px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--fz-black);
  background: var(--fz-bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body { min-height: 100dvh; }

.mono { font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace; }

/* =====================================================================
   1. PLACEHOLDER PUBLIQUE
   ===================================================================== */
.nx-placeholder {
  min-height: 100dvh;
  background: var(--fz-black);
  color: var(--fz-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.nx-placeholder-inner {
  text-align: center;
  max-width: 480px;
}
.nx-placeholder-logo {
  font-size: clamp(48px, 16vw, 96px);
  font-weight: 900;
  letter-spacing: -3px;
  color: var(--fz-red);
  margin: 0;
  animation: nx-pulse 2.6s ease-in-out infinite;
}
@keyframes nx-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.75; transform: scale(0.98); }
}
.nx-placeholder-tag {
  margin-top: 16px;
  font-size: 18px;
  color: var(--fz-grey-5);
  font-weight: 500;
}
.nx-placeholder-sub {
  margin-top: 8px;
  font-size: 14px;
  color: var(--fz-grey-4);
}
.nx-placeholder-back {
  display: inline-block;
  margin-top: 48px;
  color: var(--fz-grey-4);
  text-decoration: none;
  font-size: 13px;
}
.nx-placeholder-back:hover { color: var(--fz-bg); }

/* =====================================================================
   2. LOGIN
   ===================================================================== */
.nx-login {
  min-height: 100dvh;
  background: var(--fz-black);
  color: var(--fz-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  user-select: none;
}
.nx-login-logo {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: -3px;
  color: var(--fz-red);
  margin: 0 0 8px;
}
.nx-login-sub {
  color: var(--fz-grey-4);
  font-size: 13px;
  margin-bottom: 40px;
}
.nx-login-step {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nx-user-btn {
  background: var(--fz-grey-1);
  border: 2px solid var(--fz-grey-2);
  color: var(--fz-bg);
  padding: 18px 24px;
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s;
}
.nx-user-btn:hover, .nx-user-btn:focus-visible {
  border-color: var(--fz-red);
  background: var(--fz-grey-2);
  outline: none;
}
.nx-user-btn .role {
  margin-left: auto;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--fz-grey-4);
  letter-spacing: 1px;
}
.nx-user-name-display {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px;
  text-align: center;
  color: var(--fz-white);
}
.nx-holder-input {
  background: var(--fz-grey-1);
  border: 2px solid var(--fz-grey-2);
  color: var(--fz-bg);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-family: inherit;
  width: 100%;
}
.nx-holder-input:focus { outline: none; border-color: var(--fz-red); }

.nx-pin-dots {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 16px 0 24px;
}
.nx-pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--fz-grey-3);
  transition: all 0.15s;
}
.nx-pin-dot.filled {
  background: var(--fz-red);
  border-color: var(--fz-red);
}
.nx-login.shake .nx-pin-dot { border-color: var(--status-red); }
.nx-login.shake .nx-pin-dots { animation: nx-shake 0.3s; }
@keyframes nx-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.nx-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}
.nx-pad-key {
  background: var(--fz-grey-1);
  border: 2px solid var(--fz-grey-2);
  color: var(--fz-bg);
  font-size: 24px;
  font-weight: 600;
  padding: 18px 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s;
}
.nx-pad-key:hover { background: var(--fz-grey-2); }
.nx-pad-key:active { background: var(--fz-grey-3); transform: scale(0.97); }
.nx-pad-key.back { color: var(--fz-grey-4); font-size: 18px; }

.nx-login-back {
  margin-top: 24px;
  background: transparent;
  border: none;
  color: var(--fz-grey-4);
  font-size: 13px;
  cursor: pointer;
}
.nx-login-back:hover { color: var(--fz-bg); }

.nx-login-error {
  color: var(--status-red);
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
  min-height: 16px;
}

/* =====================================================================
   3. LAYOUT PRINCIPAL
   ===================================================================== */
.nx-app {
  display: grid;
  grid-template-areas:
    "topbar"
    "main"
    "nav";
  grid-template-rows: var(--topbar-h) 1fr var(--bottomnav-h);
  min-height: 100dvh;
}

@media (min-width: 1024px) {
  .nx-app {
    grid-template-areas:
      "sidebar topbar"
      "sidebar main";
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: var(--topbar-h) 1fr;
  }
  .nx-bottomnav { display: none; }
}

/* --- topbar --- */
.nx-topbar {
  grid-area: topbar;
  background: var(--fz-white);
  border-bottom: 1px solid var(--fz-grey-5);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.nx-topbar-logo {
  font-weight: 900;
  font-size: 22px;
  color: var(--fz-red);
  letter-spacing: -1px;
}
@media (min-width: 1024px) {
  .nx-topbar-logo { display: none; }
}
.nx-breadcrumb {
  font-size: 14px;
  color: var(--fz-grey-3);
  display: none;
}
@media (min-width: 1024px) { .nx-breadcrumb { display: block; } }
.nx-topbar-spacer { flex: 1; }
.nx-search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--fz-bg);
  border: 1px solid var(--fz-grey-5);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 14px;
  color: var(--fz-grey-3);
  cursor: text;
  font-family: inherit;
  min-width: 0;
}
.nx-search-trigger .kbd {
  margin-left: 12px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  background: var(--fz-grey-5);
  color: var(--fz-grey-2);
  padding: 2px 6px;
  border-radius: 4px;
  display: none;
}
@media (min-width: 1024px) {
  .nx-search-trigger { width: 320px; padding: 8px 14px; }
  .nx-search-trigger .kbd { display: inline-block; }
  .nx-search-trigger .label { display: inline; }
}
@media (max-width: 1023px) {
  .nx-search-trigger { padding: 8px; width: 40px; justify-content: center; }
  .nx-search-trigger .label { display: none; }
}
.nx-icon-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.nx-icon-btn:hover { background: var(--fz-bg); }
.nx-user-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--fz-grey-3);
}
.nx-user-chip .name { font-weight: 600; color: var(--fz-black); }

/* --- sidebar desktop --- */
.nx-sidebar {
  grid-area: sidebar;
  display: none;
  background: var(--fz-black);
  color: var(--fz-bg);
  padding: 16px 12px;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--fz-grey-2);
}
@media (min-width: 1024px) { .nx-sidebar { display: flex; } }

.nx-sidebar-logo {
  font-size: 26px;
  font-weight: 900;
  color: var(--fz-red);
  letter-spacing: -1px;
  padding: 4px 12px 12px;
  border-bottom: 1px solid var(--fz-grey-2);
  margin-bottom: 12px;
}
.nx-sidebar-store {
  font-size: 12px;
  color: var(--fz-grey-4);
  padding: 0 12px 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.nx-sidebar-user {
  background: var(--fz-grey-1);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nx-sidebar-user .name { font-weight: 600; font-size: 14px; }
.nx-sidebar-user .role {
  font-size: 11px;
  color: var(--fz-grey-4);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.nx-sidebar-user .holder {
  font-size: 11px;
  color: var(--fz-red-light);
  margin-top: 2px;
}
.nx-sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--fz-grey-4);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 12px 12px 6px;
}
.nx-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--fz-grey-5);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  border: none;
  text-align: left;
  font-family: inherit;
}
.nx-sidebar-link:hover { background: var(--fz-grey-1); color: var(--fz-bg); }
.nx-sidebar-link.active { background: var(--fz-red); color: var(--fz-white); }
.nx-sidebar-link .ico { font-size: 18px; width: 24px; text-align: center; }

.nx-sidebar-spacer { flex: 1; }
.nx-sidebar-bottom {
  padding-top: 12px;
  border-top: 1px solid var(--fz-grey-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nx-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-green);
  margin-right: 6px;
}
.nx-status-dot.off { background: var(--status-red); }

/* --- bottom nav mobile --- */
.nx-bottomnav {
  grid-area: nav;
  background: var(--fz-white);
  border-top: 1px solid var(--fz-grey-5);
  display: flex;
  position: sticky;
  bottom: 0;
  z-index: 10;
}
.nx-bottomnav-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 8px 4px;
  font-family: inherit;
  font-size: 11px;
  color: var(--fz-grey-3);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.nx-bottomnav-btn .ico { font-size: 22px; }
.nx-bottomnav-btn.active { color: var(--fz-red); }

/* --- main --- */
.nx-main {
  grid-area: main;
  padding: 16px;
  overflow-y: auto;
}
@media (min-width: 1024px) { .nx-main { padding: 24px 32px; } }

.nx-page-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}
.nx-page-sub {
  font-size: 14px;
  color: var(--fz-grey-3);
  margin: 0 0 24px;
}

.nx-card {
  background: var(--fz-white);
  border: 1px solid var(--fz-grey-5);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.nx-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--fz-grey-3);
}
.nx-empty .ico { font-size: 48px; opacity: 0.4; margin-bottom: 12px; }
.nx-empty .title { font-size: 16px; font-weight: 600; margin-bottom: 4px; color: var(--fz-grey-2); }
.nx-empty .hint { font-size: 13px; }

.nx-btn {
  background: var(--fz-red);
  color: var(--fz-white);
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.nx-btn:hover { background: var(--fz-red-dark); }
.nx-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.nx-btn.ghost { background: transparent; color: var(--fz-grey-2); border: 1px solid var(--fz-grey-5); }
.nx-btn.ghost:hover { background: var(--fz-bg); }

/* --- table générique --- */
.nx-table-wrap {
  background: var(--fz-white);
  border: 1px solid var(--fz-grey-5);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.nx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.nx-table th, .nx-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--fz-grey-5); }
.nx-table th {
  background: var(--fz-bg);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fz-grey-3);
  font-weight: 600;
}
.nx-table tr:last-child td { border-bottom: none; }
.nx-table .num { text-align: right; font-variant-numeric: tabular-nums; font-family: 'JetBrains Mono', monospace; }
.nx-table .badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--fz-bg);
  color: var(--fz-grey-2);
}
.nx-table .badge.green  { background: #dcfce7; color: #166534; }
.nx-table .badge.orange { background: #ffedd5; color: #9a3412; }
.nx-table .badge.red    { background: #fee2e2; color: #991b1b; }

/* --- Mode CARTES mobile (<768px) — scopé .nx-cards (H+1-f : liste Atelier) --- */
@media (max-width: 768px) {
  /* le wrap ne doit ni clipper ni encadrer les cartes */
  .nx-cardwrap { overflow: visible; border: none; border-radius: 0; background: transparent; }
  .nx-table.nx-cards thead { display: none; }                 /* en-têtes (tri) masqués sur mobile */
  .nx-table.nx-cards, .nx-table.nx-cards tbody { display: block; }
  .nx-table.nx-cards tr {
    display: block;
    border: 1px solid var(--fz-grey-5);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    margin-bottom: 12px;
    background: var(--fz-white);
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.04));
  }
  .nx-table.nx-cards td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 5px 0;
    border: none;
    text-align: right;
    font-size: 14px;
  }
  .nx-table.nx-cards td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--fz-grey-3);
    text-align: left;
    flex: 0 0 auto;
  }
  /* 1re cellule (Fiche) = header de carte : gros, bold, sans libellé */
  .nx-table.nx-cards td:first-child {
    justify-content: flex-start;
    font-size: 17px;
    font-weight: 700;
    padding: 0 0 8px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--fz-grey-5);
  }
  .nx-table.nx-cards td:first-child::before { display: none; }
  /* la valeur (à droite) garde sa typo mono/num héritée */
  .nx-table.nx-cards td.num { font-family: inherit; }
  /* dernière cellule (Actions) = bouton Éditer pleine largeur */
  .nx-table.nx-cards td:last-child { padding-top: 10px; }
  .nx-table.nx-cards td:last-child::before { display: none; }
  .nx-table.nx-cards td:last-child .nx-btn { width: 100%; justify-content: center; }
  /* ligne "aucun résultat" (colspan) : message centré, sans libellé */
  .nx-table.nx-cards td.clih-empty { justify-content: center; text-align: center; }
  .nx-table.nx-cards td.clih-empty::before { display: none; }
}

/* ===== Module DOMICILE — planning grille + status (Phase A 2026-06-05) ===== */
.dom-techfilter, .dom-dayfilter { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.dom-grid { display: flex; flex-direction: column; border: 1px solid var(--fz-grey-5); border-radius: var(--radius-lg); overflow: hidden; background: var(--fz-white); }
.dom-grow { display: grid; grid-template-columns: 62px repeat(6, 1fr); border-bottom: 1px solid var(--fz-grey-5); }
.dom-grow:last-child { border-bottom: none; }
.dom-ghead { background: var(--fz-bg); }
.dom-slotcol { padding: 8px 6px; font-size: 11px; font-weight: 600; color: var(--fz-grey-3); display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--fz-grey-5); background: var(--fz-bg); }
.dom-dhead { padding: 8px 4px; text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--fz-grey-3); border-right: 1px solid var(--fz-grey-5); }
.dom-dhead:last-child { border-right: none; }
.dom-dhead span { display: block; font-size: 15px; color: #111; }
.dom-dhead.today, .dom-dhead.today span { color: var(--fz-red); }
.dom-cell { min-height: 46px; padding: 4px; border-right: 1px solid var(--fz-grey-5); display: flex; flex-direction: column; gap: 3px; }
.dom-cell:last-child { border-right: none; }
.dom-libre { background: transparent; border: none; cursor: pointer; width: 100%; transition: background .15s; }
.dom-libre:hover { background: rgba(204,0,0,.06); }
.dom-rdv { width: 100%; text-align: left; border: 1px solid transparent; border-radius: 7px; padding: 4px 6px; font-size: 12px; font-weight: 600; cursor: pointer; line-height: 1.2; }
.dom-rdv small { display: block; font-size: 10px; font-weight: 500; opacity: .8; }
.dom-reserve  { background: #fef9c3; color: #854d0e; border-color: #fde047; }
.dom-confirme { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.dom-enroute  { background: #ede9fe; color: #6d28d9; border-color: #c4b5fd; }
.dom-encours  { background: #e0e7ff; color: #3730a3; border-color: #a5b4fc; }
.dom-termine  { background: #dcfce7; color: #166534; border-color: #86efac; }
.dom-annule   { background: #fee2e2; color: #991b1b; border-color: #fca5a5; text-decoration: line-through; }
/* Vue mobile : liste verticale par jour */
.dom-mlist { display: flex; flex-direction: column; gap: 8px; }
.dom-mrow { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: start; background: var(--fz-white); border: 1px solid var(--fz-grey-5); border-radius: var(--radius-md); padding: 10px 12px; }
.dom-mslot { font-size: 13px; font-weight: 700; color: var(--fz-grey-3); padding-top: 4px; }
.dom-mcell { display: flex; flex-direction: column; gap: 6px; }
.dom-mcell .dom-libre { min-height: 36px; border: 1px dashed var(--fz-grey-5); border-radius: 8px; color: var(--fz-grey-3); font-size: 13px; display: flex; align-items: center; justify-content: center; }
.dom-mcell .dom-libre:hover { border-color: var(--fz-red); }
.dom-istoday { box-shadow: inset 0 -2px 0 var(--fz-red); }

/* =====================================================================
   4. SEARCH MODAL
   ===================================================================== */
.nx-search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}
.nx-search-modal.hidden { display: none; }
.nx-search-box {
  background: var(--fz-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  margin: 0 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.nx-search-input {
  width: 100%;
  border: none;
  padding: 18px 20px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  border-bottom: 1px solid var(--fz-grey-5);
}
.nx-search-results {
  max-height: 400px;
  overflow-y: auto;
}
.nx-search-result {
  padding: 12px 20px;
  border-bottom: 1px solid var(--fz-grey-5);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nx-search-result:hover { background: var(--fz-bg); }
.nx-search-result .type-ico { font-size: 18px; }
.nx-search-result .main { flex: 1; font-weight: 600; }
.nx-search-result .meta { font-size: 12px; color: var(--fz-grey-3); font-family: 'JetBrains Mono', monospace; }

/* =====================================================================
   5. INACTIVITY LOCK MODAL
   ===================================================================== */
.nx-lock-modal {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.92);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fz-bg);
  text-align: center;
  padding: 24px;
}
.nx-lock-modal.hidden { display: none; }
.nx-lock-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.nx-lock-sub { font-size: 14px; color: var(--fz-grey-4); margin-bottom: 24px; }

/* =====================================================================
   6. HUBS LIGHTSPEED-STYLE (Bloc 2.5)
   ===================================================================== */
.hub-section {
  margin-bottom: 32px;
}
.hub-section h2 {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--fz-grey-4);
  font-weight: 700;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--fz-grey-5);
}
.hub-section .hub-section-desc {
  font-size: 13px;
  color: var(--fz-grey-3);
  margin: -8px 0 14px;
}
.hub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.hub-grid.cols-1 { grid-template-columns: 1fr; }
.hub-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.hub-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) {
  .hub-grid, .hub-grid.cols-3, .hub-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .hub-grid.cols-1 { grid-template-columns: 1fr; }
}

.hub-card {
  background: var(--fz-white);
  border: 1.5px solid var(--fz-grey-5);
  border-radius: var(--radius-lg);
  padding: 24px 14px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s, background 0.18s;
  min-height: 130px;
  font-family: inherit;
  font-size: inherit;
}
.hub-card:hover,
.hub-card:focus-visible {
  border-color: var(--fz-red);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(204, 0, 0, 0.08);
  outline: none;
}
.hub-card:active { transform: translateY(0); }

.hub-card.primary {
  background: var(--fz-red);
  border-color: var(--fz-red);
}
.hub-card.primary:hover {
  background: var(--fz-red-dark);
  border-color: var(--fz-red-dark);
  box-shadow: 0 8px 24px rgba(204, 0, 0, 0.25);
}

.hub-card .shortcut {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--fz-grey-3);
  background: var(--fz-bg);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.hub-card.primary .shortcut {
  background: rgba(255, 255, 255, 0.18);
  color: var(--fz-white);
}

.hub-card .icon {
  font-size: 38px;
  line-height: 1;
}
.hub-card .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fz-black);
  line-height: 1.25;
}
.hub-card.primary .label { color: var(--fz-white); }

/* Flash animation déclenchée par keyboard.js */
@keyframes hub-flash {
  0%   { box-shadow: 0 0 0 0 rgba(204, 0, 0, 0.6); transform: scale(1); }
  40%  { box-shadow: 0 0 0 8px rgba(204, 0, 0, 0.25); transform: scale(1.04); }
  100% { box-shadow: 0 0 0 0 rgba(204, 0, 0, 0); transform: scale(1); }
}
.hub-card.flash { animation: hub-flash 0.4s ease-out; }

/* Bloc stats live (en bas/haut du hub) */
.hub-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 24px;
  padding: 14px 18px;
  background: var(--fz-white);
  border: 1px solid var(--fz-grey-5);
  border-radius: var(--radius-md);
}
.hub-stats .stat {
  flex: 1;
  min-width: 130px;
}
.hub-stats .stat .num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--fz-black);
  display: block;
}
.hub-stats .stat .lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fz-grey-3);
  font-weight: 600;
}
.hub-stats .mock-tag {
  font-size: 10px;
  font-style: italic;
  color: var(--fz-grey-4);
  align-self: center;
  margin-left: auto;
}

/* Sub-view back button */
.hub-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--fz-grey-3);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 8px;
  margin: -4px 0 12px -8px;
  border-radius: 6px;
}
.hub-back:hover { background: var(--fz-bg); color: var(--fz-black); }

/* =====================================================================
   7. MODAL "Coming soon Phase 3" (générique, réutilisable)
   ===================================================================== */
.nx-cs-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.55);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.nx-cs-modal.hidden { display: none; }
.nx-cs-box {
  background: var(--fz-white);
  border-radius: var(--radius-lg);
  max-width: 380px;
  width: 100%;
  padding: 32px 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.nx-cs-icon { font-size: 64px; margin-bottom: 8px; line-height: 1; }
.nx-cs-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.nx-cs-kbd {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  background: var(--fz-bg);
  color: var(--fz-grey-3);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-bottom: 12px;
  font-weight: 600;
}
.nx-cs-sub {
  font-size: 13px;
  color: var(--fz-grey-3);
  margin-bottom: 22px;
  line-height: 1.5;
}
.nx-cs-close {
  background: var(--fz-black);
  color: var(--fz-white);
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.nx-cs-close:hover { background: var(--fz-grey-2); }

/* =====================================================================
   8. PEC — Formulaire prise en charge (Phase I-4)
   ===================================================================== */
.pec-form { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.pec-form.hidden { display: none; }
.pec-section {
  background: var(--fz-white);
  border: 1px solid var(--fz-grey-5);
  border-radius: var(--radius-md);
  padding: 16px 16px 18px;
}
.pec-h2 { font-size: 14px; font-weight: 700; margin: 0 0 12px; color: var(--fz-black); }
.pec-row { display: flex; gap: 12px; flex-wrap: wrap; }
.pec-field { display: flex; flex-direction: column; gap: 5px; flex: 1 1 auto; margin-bottom: 12px; }
.pec-row > .pec-field:last-child, .pec-section > .pec-field:last-child { margin-bottom: 0; }
.pec-field.grow { flex: 1 1 140px; }
.pec-field > span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fz-grey-3); }
.pec-input {
  width: 100%; box-sizing: border-box;
  font-family: inherit; font-size: 16px; /* 16px → pas de zoom auto iOS */
  padding: 11px 12px;
  border: 1px solid var(--fz-grey-5);
  border-radius: var(--radius-sm);
  background: var(--fz-white); color: var(--fz-black);
}
.pec-input:focus { outline: none; border-color: var(--fz-red); box-shadow: 0 0 0 3px rgba(204,0,0,0.12); }
textarea.pec-input { resize: vertical; }
.pec-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--fz-black); margin-top: 4px; cursor: pointer; }
.pec-check input { width: 20px; height: 20px; accent-color: var(--fz-red); }
.pec-results { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.pec-client-result {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  text-align: left; width: 100%; cursor: pointer;
  background: var(--fz-bg); border: 1px solid var(--fz-grey-5); border-radius: var(--radius-sm);
  padding: 10px 12px; font-family: inherit;
}
.pec-client-result:hover { border-color: var(--fz-red); }
.pec-client-result .name { font-weight: 600; font-size: 14px; color: var(--fz-black); }
.pec-client-result .meta { font-size: 12px; color: var(--fz-grey-3); font-family: 'JetBrains Mono', monospace; }
.pec-noresult { font-size: 13px; color: var(--fz-grey-4); padding: 8px 2px; }

/* ---- Historique client (clih) ---- */
.clih-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--fz-white); border: 1px solid var(--fz-grey-5); border-radius: var(--radius-sm); overflow: hidden; }
.clih-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--fz-grey-3); padding: 8px 10px; background: var(--fz-bg); border-bottom: 1px solid var(--fz-grey-5); }
.clih-table td { padding: 8px 10px; border-bottom: 1px solid var(--fz-grey-5); color: var(--fz-black); }
.clih-table tr:last-child td { border-bottom: none; }
.clih-table .num { text-align: right; font-family: 'JetBrains Mono', monospace; }
.clih-empty { color: var(--fz-grey-4); text-align: center; font-style: italic; }
.clih-count { font-size: 13px; font-weight: 400; color: var(--fz-grey-3); }
.clih-cap { font-size: 12px; color: var(--fz-grey-3); margin-top: 8px; padding: 6px 10px; background: var(--fz-bg); border-radius: var(--radius-sm); }

/* ---- Récemment consulté (hub Atelier) ---- */
.atl-recent-head { display: flex; align-items: center; justify-content: space-between; }
.atl-recent-clear { border: none; background: transparent; color: var(--fz-grey-4); font-size: 12px; cursor: pointer; text-decoration: underline; }
.atl-recent-clear:hover { color: var(--fz-red); }
.atl-recent-list { display: flex; flex-direction: column; gap: 6px; }
.atl-recent-item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; text-align: left; width: 100%;
  background: var(--fz-white); border: 1px solid var(--fz-grey-5); border-radius: var(--radius-sm); padding: 10px 14px; cursor: pointer; }
.atl-recent-item:hover { border-color: var(--fz-red); }
.atl-recent-item .rf-num { font-family: 'JetBrains Mono', monospace; font-weight: 600; color: var(--fz-black); }
.atl-recent-item .rf-app { color: var(--fz-black); }
.atl-recent-item .rf-cli { color: var(--fz-grey-3); font-size: 13px; }
.atl-recent-item .rf-ago { color: var(--fz-grey-4); font-size: 12px; white-space: nowrap; }

/* ---- Rendez-vous / Planning (atelier) ---- */
.pl-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 16px; }
.pl-nav { display: flex; gap: 8px; }
.pl-week-label { font-weight: 700; color: var(--fz-black); margin: 0 auto 0 8px; }
.pl-grid { display: flex; flex-direction: column; gap: 10px; }
.pl-day { background: var(--fz-white); border: 1px solid var(--fz-grey-5); border-radius: var(--radius-sm); overflow: hidden; }
.pl-day.today { border-color: var(--fz-red); box-shadow: 0 0 0 1px var(--fz-red) inset; }
.pl-day-head { background: var(--fz-bg); padding: 8px 14px; font-weight: 700; font-size: 13px; text-transform: capitalize; border-bottom: 1px solid var(--fz-grey-5); }
.pl-slots { display: flex; flex-direction: column; }
.pl-slot { display: grid; grid-template-columns: auto auto 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--fz-grey-5); }
.pl-slot:last-child { border-bottom: none; }
.pl-time { font-family: 'JetBrains Mono', monospace; font-weight: 600; color: var(--fz-black); }
.pl-cli { color: var(--fz-red); font-weight: 600; cursor: pointer; text-decoration: underline; }
.pl-motif { color: var(--fz-grey-2, var(--fz-grey-3)); font-size: 13px; }
.pl-empty-day { padding: 10px 14px; color: var(--fz-grey-4); font-size: 13px; font-style: italic; }
.nx-btn.danger { background: var(--status-red, #dc2626); color: #fff; border-color: var(--status-red, #dc2626); }
.nx-btn.danger:hover { filter: brightness(0.94); }

/* ---- Paniers en attente (Continuer la vente) ---- */
.hold-grid { display: flex; flex-direction: column; gap: 10px; }
.hold-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--fz-white); border: 1px solid var(--fz-grey-5); border-radius: var(--radius-sm); padding: 12px 16px; }
.hold-sum { font-size: 15px; color: var(--fz-black); }
.hold-meta { font-size: 12px; color: var(--fz-grey-3); margin-top: 2px; }
.hold-actions { display: flex; gap: 8px; }

/* ---- Inventaire / Dénombrement ---- */
.inv-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0 14px; }
.inv-toolbar .nx-btn { margin-left: 0; }
.inv-table .inv-ecart { font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.inv-ecart.zero { color: var(--fz-grey-4); }
.inv-ecart.nonzero { color: var(--fz-red); }
.inv-ecart.big { color: #fff; background: var(--status-red, #dc2626); border-radius: 4px; }
.inv-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.inv-pending { font-size: 13px; color: var(--fz-grey-3); }
.inv-warn { background: #fff4e5; border: 1px solid #f0a; border-color: var(--status-orange, #f59e0b); color: #92400e; padding: 8px 12px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 12px; }
.inv-modal-list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.inv-ml-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 6px 8px; border-radius: 4px; background: var(--fz-bg); }
.inv-ml-row.big { background: #fde8e8; }

/* ---- Étiquettes : compositeur ---- */
.lblc-grid { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; }
@media (max-width: 760px) { .lblc-grid { grid-template-columns: 1fr; } }
.lblc-preview-wrap { background: var(--fz-bg); border: 1px solid var(--fz-grey-5); border-radius: var(--radius-sm); padding: 16px; display: flex; justify-content: center; }
.lblc-actions { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.lblc-copies { font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lbl-cp { border: 1px solid var(--fz-grey-5); background: var(--fz-white); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.lbl-cp.active { background: var(--fz-black); color: #fff; border-color: var(--fz-black); }
.lblc-panel { display: flex; flex-direction: column; gap: 8px; }
.lblc-tplrow { font-size: 13px; color: var(--fz-grey-2,var(--fz-grey-3)); margin-bottom: 4px; }
.lblc-sec { border: 1px solid var(--fz-grey-5); border-radius: var(--radius-sm); padding: 8px 10px; background: var(--fz-white); }
.lblc-sec.off { opacity: 0.5; }
.lblc-sec-head { display: flex; align-items: center; gap: 8px; }
.lblc-ord button { border: 1px solid var(--fz-grey-5); background: var(--fz-bg); border-radius: 4px; width: 22px; cursor: pointer; }
.lblc-ord button:disabled { opacity: 0.3; cursor: default; }
.lblc-toggle { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.lblc-sec-body { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.lblc-sec-body .lbl-f { flex: 1; min-width: 90px; }
.lbl-mini { font-size: 12px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.lbl-clear { border: none; background: transparent; cursor: pointer; font-size: 12px; }
.lbl-hint { font-size: 12px; color: var(--fz-grey-4); }
.lbl-bul { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.lbl-bul-row { display: flex; gap: 6px; align-items: center; }

/* ---- Étiquette : aperçu écran (miroir de l'impression) ---- */
.lbl { width: 300px; background: #fff; color: #000; padding: 12px; border: 1px solid #ddd; text-align: center; font-family: Arial, Helvetica, sans-serif; }
.lbl-logo { font-size: 11px; letter-spacing: 2px; font-weight: 700; text-align: left; }
.lbl-badge { display: inline-block; font-weight: 800; font-size: 14px; padding: 2px 10px; margin: 4px 0; }
.lbl-badge.etat { border: 2px solid #000; }
.lbl-badge.grade.grade-A { background: #000; color: #fff; }
.lbl-badge.grade.grade-B { background: repeating-linear-gradient(45deg,#000,#000 2px,#fff 2px,#fff 5px); color: #000; border: 1px solid #000; }
.lbl-badge.grade.grade-C { border: 2px solid #000; color: #000; }
.lbl-marque { font-size: 13px; font-weight: 600; text-align: left; }
.lbl-nom { font-size: 17px; font-weight: 700; text-align: left; margin-bottom: 6px; }
.lbl-promo { background: #000; color: #fff; font-weight: 800; font-size: 14px; padding: 4px 8px; letter-spacing: 1px; margin-bottom: 8px; }
.lbl-price-row { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.lbl-barre { text-decoration: line-through; font-size: 14px; color: #555; }
.lbl-price { font-size: 40px; font-weight: 900; line-height: 1; }
.lbl-eco { display: inline-block; border: 2px solid #000; font-weight: 800; font-size: 14px; padding: 1px 8px; margin: 4px 0; }
.lbl-bullets { list-style: none; padding: 0; margin: 8px 0; text-align: left; font-size: 13px; }
.lbl-bullets li::before { content: "✓ "; font-weight: 700; }
.lbl-ref { font-size: 18px; font-weight: 800; margin-top: 6px; }
.lbl-barcode svg { max-width: 100%; }
.lbl-qr { display: flex; justify-content: center; margin-top: 6px; }
.lbl-qr img, .lbl-qr canvas { width: 70px; height: 70px; }

/* ---- Statistiques (admin) ---- */
.st-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 700px) { .st-kpis { grid-template-columns: 1fr; } }
.st-kpi { background: var(--fz-white); border: 1px solid var(--fz-grey-5); border-radius: var(--radius-sm); padding: 14px 16px; }
.st-kpi-lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--fz-grey-3); }
.st-kpi-val { font-size: 24px; font-weight: 800; margin: 4px 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.st-kpi-sub { font-size: 12px; color: var(--fz-grey-3); }
.st-pct { font-size: 13px; font-weight: 700; }
.st-pct.up { color: var(--status-green, #16a34a); }
.st-pct.down { color: var(--status-red, #dc2626); }
.st-pct.flat { color: var(--fz-grey-4); }
.st-meta { display: flex; align-items: center; font-size: 14px; margin: 14px 0 4px; }
.st-chart { display: flex; align-items: flex-end; gap: 2px; height: 140px; padding: 8px; background: var(--fz-white); border: 1px solid var(--fz-grey-5); border-radius: var(--radius-sm); }
.st-bar { flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.st-bar-fill { width: 70%; background: var(--fz-black); border-radius: 2px 2px 0 0; }
.st-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .st-cols { grid-template-columns: 1fr; } }
.st-mode { display: grid; grid-template-columns: 90px 1fr 150px; gap: 10px; align-items: center; margin: 6px 0; font-size: 13px; }
.st-mode-bar { background: var(--fz-bg); border-radius: 4px; height: 12px; overflow: hidden; }
.st-mode-bar > span { display: block; height: 100%; background: var(--fz-red); }
.st-mode-v { text-align: right; color: var(--fz-grey-3); font-family: 'JetBrains Mono', monospace; font-size: 12px; }

/* ---- Notifications (admin) ---- */
.nt-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--fz-grey-5); font-size: 14px; }
.nt-row:last-child { border-bottom: none; }
.nt-row .dl { color: var(--fz-grey-3); }
.nt-test { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.nt-list { list-style: none; padding: 0; margin: 0 0 8px; columns: 2; font-size: 13px; }
@media (max-width: 600px) { .nt-list { columns: 1; } }
.pec-newclient { width: 100%; margin-top: 4px; }
.pec-client-card {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--fz-bg); border: 1px solid var(--fz-grey-5); border-radius: var(--radius-sm); padding: 12px 14px;
}
.pec-client-card .name { font-weight: 700; font-size: 15px; color: var(--fz-black); }
.pec-client-card .meta { font-size: 12px; color: var(--fz-grey-3); }
.pec-error { color: var(--status-red); font-size: 13px; font-weight: 600; }
.pec-error.show { padding: 2px 0; }
.pec-submit { width: 100%; padding: 15px; font-size: 16px; }
.pec-success { background: var(--fz-white); border: 1px solid var(--fz-grey-5); border-radius: var(--radius-lg); padding: 32px 24px; text-align: center; max-width: 640px; }
.pec-success.hidden { display: none; }
.pec-success-icon { font-size: 56px; line-height: 1; }
.pec-success-title { font-size: 20px; font-weight: 700; margin-top: 8px; }
.pec-success-num { font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 600; color: var(--fz-red); margin: 6px 0; }
.pec-success-sub { font-size: 13px; color: var(--fz-grey-3); margin-bottom: 20px; line-height: 1.5; }
.pec-success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============ POS — Nouvelle vente (I-3) ============ */
.pos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.pos-col { display: flex; flex-direction: column; gap: 16px; }
.pos-grid.hidden { display: none; }
@media (max-width: 880px) { .pos-grid { grid-template-columns: 1fr; } }

/* panier */
.pos-cart-line { display: grid; grid-template-columns: 1fr auto 92px auto auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--fz-grey-5); }
.pos-cart-line:last-child { border-bottom: none; }
.pcl-main { min-width: 0; }
.pcl-name { font-weight: 600; font-size: 14px; color: var(--fz-black); overflow: hidden; text-overflow: ellipsis; }
.pcl-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--status-blue); background: rgba(37,99,235,0.1); padding: 1px 5px; border-radius: 4px; }
.pcl-sub { font-size: 11px; color: var(--fz-grey-4); }
.pcl-price { max-width: 92px; padding: 6px 8px !important; text-align: right; font-size: 13px; }
.pcl-total { font-weight: 700; font-size: 14px; min-width: 72px; text-align: right; font-family: 'JetBrains Mono', monospace; }
.pcl-del { border: none; background: transparent; color: var(--fz-grey-4); font-size: 16px; cursor: pointer; padding: 2px 6px; }
.pcl-del:hover { color: var(--status-red); }
.pos-qty { display: inline-flex; align-items: center; gap: 6px; }
.pq-btn { width: 28px; height: 28px; border: 1px solid var(--fz-grey-5); background: var(--fz-white); border-radius: var(--radius-sm); font-size: 16px; line-height: 1; cursor: pointer; color: var(--fz-black); }
.pq-btn:hover { background: var(--fz-bg); border-color: var(--fz-red); }
.pq-val { min-width: 22px; text-align: center; font-weight: 600; }

/* totaux + ventilation TVA */
.pos-totals { background: var(--fz-white); border: 1px solid var(--fz-grey-5); border-radius: var(--radius-md); padding: 14px 16px; }
.pos-tot-line, .pos-tva-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 3px 0; }
.pos-tva-row { font-size: 12px; color: var(--fz-grey-3); }
.pos-tot-line.strong { font-size: 19px; font-weight: 800; color: var(--fz-red); border-top: 1px solid var(--fz-grey-5); margin-top: 6px; padding-top: 8px; }

/* paiement */
.pos-pay-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pos-pay-btn { flex: 1 1 auto; min-width: 72px; padding: 12px 10px; border: 1.5px solid var(--fz-grey-5); background: var(--fz-white); border-radius: var(--radius-md); font-weight: 600; font-size: 14px; cursor: pointer; color: var(--fz-grey-2); }
.pos-pay-btn:hover { border-color: var(--fz-red); }
.pos-pay-btn.active { background: var(--fz-red); border-color: var(--fz-red); color: #fff; }
.pos-mixte-hint { font-size: 13px; font-weight: 600; margin-top: 6px; }

.pos-success { display: flex; flex-direction: column; align-items: center; }
.pos-success.hidden { display: none; }

/* ticket (écran + impression) */
.nx-ticket { background: #fff; color: #000; border: 1px solid var(--fz-grey-5); border-radius: var(--radius-md); padding: 14px 16px; margin: 16px auto; width: 320px; max-width: 100%; font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.45; text-align: left; }
.tk-head { text-align: center; margin-bottom: 8px; }
.tk-shop { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 900; font-size: 20px; letter-spacing: 0.04em; }
.tk-shop-sub { font-size: 11px; color: #444; }
.tk-meta { font-size: 11px; color: #222; }
.tk-meta > div { margin: 1px 0; }
.tk-sep { border-top: 1px dashed #999; margin: 8px 0; }
.tk-line { display: flex; justify-content: space-between; gap: 8px; }
.tk-qn { flex: 1 1 auto; }
.tk-lp { white-space: nowrap; }
.tk-tva-head { font-weight: 700; margin: 4px 0 2px; }
.tk-tva { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: #333; }
.tk-tot { display: flex; justify-content: space-between; gap: 8px; margin: 2px 0; }
.tk-tot.strong { font-weight: 800; font-size: 15px; border-top: 1px solid #000; margin-top: 6px; padding-top: 4px; }
.tk-pay { margin-top: 4px; }
.tk-foot { text-align: center; margin-top: 10px; font-weight: 600; }
.nx-ticket.ticket-a4 { width: 600px; font-size: 14px; }

@media print {
  body * { visibility: hidden; }
  .nx-ticket-print, .nx-ticket-print * { visibility: visible; }
  .nx-ticket-print { position: absolute; left: 0; top: 0; width: 100%; margin: 0; border: none; border-radius: 0; }
}

/* ============ Recherche universelle (I-2) ============ */
.nx-search-section-title {
  padding: 10px 20px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--fz-grey-4); background: var(--fz-bg);
  position: sticky; top: 0;
}
.nx-search-result[data-id] { transition: background 0.1s; }

/* tiroir détail */
.nx-detail { padding: 16px 20px; }
.nx-detail-loading { color: var(--fz-grey-4); padding: 12px 0; }
.nx-detail-head { font-size: 18px; font-weight: 800; margin: 10px 0 12px; }
.nx-detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--fz-grey-5); font-size: 14px; }
.nx-detail-row:last-of-type { border-bottom: none; }
.nx-detail-row .dl { color: var(--fz-grey-3); font-weight: 600; }
.nx-detail-row .dv { text-align: right; }
.nx-detail-sub { font-size: 12px; color: var(--fz-grey-4); margin-top: 8px; font-family: 'JetBrains Mono', monospace; }
.nx-detail-items { margin-bottom: 8px; }
.nx-detail-item { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 3px 0; font-family: 'JetBrains Mono', monospace; }
.nx-detail-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* ============ Connectivité (I-5) ============ */
.nx-offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: var(--status-red); color: #fff; text-align: center;
  padding: 8px 16px; display: flex; flex-direction: column; gap: 1px;
  box-shadow: var(--shadow-md);
}
.nx-offline-banner .nob-main { font-weight: 700; font-size: 13px; }
.nx-offline-banner .nob-sub { font-size: 11px; opacity: 0.9; }
.nx-online-toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%) translateY(-20px);
  z-index: 10000; background: var(--status-green); color: #fff; font-weight: 700; font-size: 14px;
  padding: 10px 20px; border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
}
.nx-online-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ Atelier — Ordres de travail (Phase A) ============ */
.atl-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.atl-chip { padding: 6px 14px; border: 1px solid var(--fz-grey-5); background: var(--fz-white); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--fz-grey-2); cursor: pointer; }
.atl-chip:hover { border-color: var(--fz-red); }
.atl-chip.active { background: var(--fz-red); border-color: var(--fz-red); color: #fff; }
.atl-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.atl-page-info { font-size: 13px; color: var(--fz-grey-3); }
.atl-reste { font-size: 11px; color: var(--status-orange); font-family: 'JetBrains Mono', monospace; }
.atl-edit { padding: 5px 12px !important; font-size: 13px; }

.st-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; }
.st-badge.green { background: var(--status-green); }
.st-badge.orange { background: var(--status-orange); }
.st-badge.red { background: var(--status-red); }
.st-badge.blue { background: var(--status-blue); }
.st-badge.amber { background: var(--status-amber); }
.st-badge.grey { background: var(--fz-grey-4); }

/* modal générique (édition fiche) */
.nx-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.5); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.nx-modal.hidden { display: none; }
.nx-modal-box { background: var(--fz-white); border-radius: var(--radius-lg); padding: 22px 24px; width: 560px; max-width: 100%; box-shadow: var(--shadow-lg); }
.nx-modal-head { display: flex; align-items: center; justify-content: space-between; font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.nx-modal-x { border: none; background: transparent; font-size: 18px; cursor: pointer; color: var(--fz-grey-4); }
.nx-modal-x:hover { color: var(--fz-black); }
.nx-modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.atl-ro { background: var(--fz-bg); border-radius: var(--radius-md); padding: 10px 14px; margin-bottom: 14px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.atl-ro .dl { color: var(--fz-grey-3); font-weight: 600; display: inline-block; min-width: 72px; }
.atl-ro-tag { font-size: 10px; color: var(--status-amber); font-weight: 700; text-transform: uppercase; }
.atl-notes-existing { background: var(--fz-bg); border: 1px solid var(--fz-grey-5); border-radius: var(--radius-sm); padding: 8px 12px; max-height: 120px; overflow-y: auto; font-size: 12px; white-space: pre-wrap; word-break: break-word; color: var(--fz-grey-2); font-family: 'JetBrains Mono', monospace; }

/* ============ Ventes — Historique (Phase B) ============ */
.vh-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 4px 0 16px; }
.vh-bar .atl-filters { margin: 0; }
.vh-pay { font-size: 12px; font-weight: 600; color: var(--fz-grey-3); display: flex; align-items: center; gap: 6px; }
.vh-pay .pec-input { padding: 6px 8px; }
.vh-ca { margin-left: auto; font-size: 15px; color: var(--fz-grey-2); }
.vh-ca b { color: var(--fz-red); font-size: 18px; }
.vh-notes { background: var(--fz-bg); border-radius: var(--radius-sm); padding: 8px 12px; margin-top: 12px; font-size: 12px; color: var(--fz-grey-2); white-space: pre-wrap; word-break: break-word; }
.nx-ticket.ticket-80 { margin: 0 auto; }

/* ============ Remboursement (Phase C-1) ============ */
.vh-refund-banner { border-radius: var(--radius-md); padding: 8px 12px; font-size: 13px; font-weight: 700; margin-bottom: 12px; text-align: center; }
.vh-refund-banner.full { background: rgba(220,38,38,0.12); color: var(--status-red); border: 1px solid var(--status-red); }
.vh-refund-banner.partial { background: rgba(234,88,12,0.12); color: var(--status-orange); border: 1px solid var(--status-orange); }
.vh-refunds { margin-top: 10px; font-size: 12px; color: var(--fz-grey-2); display: flex; flex-direction: column; gap: 3px; font-family: 'JetBrains Mono', monospace; }
.vh-confirm { background: var(--fz-bg); border: 1px solid var(--status-red); border-radius: var(--radius-md); padding: 14px 16px; font-size: 15px; line-height: 1.5; }
.vh-confirm-reason { margin-top: 8px; font-size: 13px; color: var(--fz-grey-3); }
.vh-confirm-warn { margin-top: 10px; font-size: 12px; color: var(--status-red); }

/* ============ Clôture Z (Phase C-2) ============ */
.z-doc { background: var(--fz-white); border: 1px solid var(--fz-grey-5); border-radius: var(--radius-md); padding: 20px 24px; max-width: 560px; }
.z-title { font-size: 18px; font-weight: 800; margin: 0 0 14px; }
.z-section { margin-bottom: 16px; }
.z-h { font-weight: 700; font-size: 14px; margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid var(--fz-grey-5); }
.z-line { display: flex; justify-content: space-between; font-size: 14px; padding: 3px 0; }
.z-line.sub { font-size: 12px; color: var(--fz-grey-3); }
.z-net { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; color: var(--fz-red); border-top: 2px solid var(--fz-black); margin-top: 10px; padding-top: 10px; }
.z-disclaimer { margin-top: 16px; font-size: 11px; color: var(--fz-grey-4); font-style: italic; line-height: 1.4; }

/* ===== Catalogue (H-3) ===== */
.cat-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cat-tabs { display: flex; gap: 8px; }
.cat-tab.active { background: var(--fz-black); color: var(--fz-white); border-color: var(--fz-black); }
.cat-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ===== Équipe (H-4) ===== */
.eq-pin-reveal { font-family: ui-monospace, Menlo, monospace; font-size: 44px; font-weight: 800; letter-spacing: 10px; text-align: center; padding: 18px 0; margin: 8px 0; background: var(--fz-bg); border: 2px dashed var(--fz-grey-4); border-radius: var(--radius-md); color: var(--fz-black); }

/* ===== H+1-a : UX listes (recherche / tri / chips tech / tiroir client) ===== */
.nx-listbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 12px; }
.nx-listsearch { max-width: 320px; }
.nx-listcount { font-size: 13px; color: var(--fz-grey-3); }
.nx-th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.nx-th-sort:hover { color: var(--fz-red); }
.nx-th-sort.active { color: var(--fz-red); }
.nx-link { background: none; border: none; padding: 0; color: var(--fz-red); font: inherit; cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.nx-link:hover { opacity: .75; }
.atl-tech { margin-top: -4px; }
.atl-chip.sm { font-size: 12px; padding: 4px 10px; }
.nx-chip-lbl { font-size: 12px; color: var(--fz-grey-3); align-self: center; margin-right: 4px; }

/* mini-tiroir client */
.nx-drawer-ov { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1200; opacity: 0; pointer-events: none; transition: opacity .2s; }
.nx-drawer-ov.open { opacity: 1; pointer-events: auto; }
.nx-drawer { position: absolute; top: 0; right: 0; height: 100%; width: 340px; max-width: 88vw; background: var(--fz-white); box-shadow: -4px 0 24px rgba(0,0,0,.18); padding: 18px; overflow-y: auto; transform: translateX(100%); transition: transform .2s ease; }
.nx-drawer-ov.open .nx-drawer { transform: translateX(0); }
.nx-drawer-head { display: flex; align-items: center; justify-content: space-between; font-size: 18px; font-weight: 800; margin-bottom: 2px; }
.nx-drawer-sub { font-size: 13px; color: var(--fz-grey-3); margin-bottom: 14px; }
.nx-drawer-contact { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.nx-drawer-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--fz-black); text-decoration: none; padding: 8px 10px; background: var(--fz-bg); border-radius: 10px; }
a.nx-drawer-row:hover { background: #ececef; }
.nx-drawer-row.muted { color: var(--fz-grey-4); }
.nx-drawer-call { margin-left: auto; }
.nx-drawer-stats { display: flex; justify-content: space-between; text-align: center; gap: 8px; padding: 12px 0; border-top: 1px solid var(--fz-grey-5); border-bottom: 1px solid var(--fz-grey-5); margin-bottom: 16px; }
.nx-drawer-stats > div { flex: 1; }
.nx-drawer-stats b { display: block; font-size: 18px; font-weight: 800; }
.nx-drawer-stats span { font-size: 11px; color: var(--fz-grey-3); }
.nx-drawer-actions { display: flex; flex-direction: column; gap: 8px; }
.nx-drawer-actions .nx-btn { width: 100%; }

/* ===== H+1-b : 📞 liste · crochet inline · toast ===== */
.atl-tel { background: none; border: none; cursor: pointer; font-size: 14px; padding: 0 2px; line-height: 1; vertical-align: middle; }
.atl-tel:hover { opacity: .6; }
.atl-crochet { cursor: pointer; }
.atl-crochet:hover { background: var(--fz-bg); outline: 1px dashed var(--fz-grey-4); }
.atl-crochet-input { width: 90px; padding: 3px 6px; font: inherit; font-family: ui-monospace, Menlo, monospace; border: 1px solid var(--fz-red); border-radius: 6px; }
.atl-crochet-input.err { border-color: var(--status-red, #cc0000); background: #fff0f0; }
.nx-toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); background: var(--fz-black, #111); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 1400; }
.nx-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== H+1-c : ancienneté · il y a Xj · badge paiement · KPI cliquables ===== */
.st-badge.age-light { background: #f7b955; }   /* À réparer < 3j */
.st-badge.age-dark  { background: #e07c00; }   /* À réparer 3–7j */
/* > 7j → .st-badge.red (existant) */
.rel-ago { color: var(--fz-grey-4); font-weight: 400; }
.pay-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pay-badge.green { background: #d6f5e3; color: #0a7a3d; }
.pay-badge.orange { background: #ffe7c2; color: #8a5200; }
.pay-badge.red { background: #ffd9d9; color: #b30000; }
.pay-amt { font-size: 12px; color: var(--fz-grey-3); }
button.stat { cursor: pointer; border: 1px solid transparent; font: inherit; }
button.stat.stat-click:hover { border-color: var(--fz-red); background: var(--fz-bg); }

/* ===== H+3 : liaison vente/restitution ===== */
.nx-btn-restit { background: #1aa356; }
.nx-btn-restit:hover { background: #178f4b; }
.pos-cart-line.locked { background: #f4fbf6; border-left: 3px solid #1aa356; }
.pcl-price-locked { min-width: 70px; text-align: right; font-weight: 600; color: var(--fz-grey-2); }
.pcl-lock { opacity: .6; }
.pec-success-restit { font-weight: 700; color: #1aa356; margin: 4px 0 2px; }
/* Chantier 6 : QR auto à la création de fiche */
.pec-qr { display: flex; justify-content: center; margin: 16px 0 4px; }
.pec-qr-sub { text-align: center; font-size: 11px; color: var(--fz-grey-4); font-family: ui-monospace, Menlo, monospace; margin-bottom: 8px; word-break: break-all; }

/* ============ FICHE CLIENT 360 (Phase 1 CRM) ============ */
.nx-btn.sm { padding: 6px 12px; font-size: 13px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; gap: 4px; text-decoration: none; line-height: 1; }
a.nx-btn { text-decoration: none; }
.nx360-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.nx360-head .muted { color: var(--fz-grey-4); }
.nx360-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.nx360-kpis { margin-bottom: 18px; }
.nx360-timeline { display: flex; flex-direction: column; gap: 8px; }
.nx360-ev {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: start;
  background: var(--fz-white); border: 1px solid #e6e6e0; border-left: 4px solid var(--fz-grey-5);
  border-radius: var(--radius-md); padding: 10px 14px; box-shadow: var(--shadow-sm);
}
.nx360-ev.k-repair   { border-left-color: var(--status-blue); }
.nx360-ev.k-order    { border-left-color: var(--status-green); }
.nx360-ev.k-sale     { border-left-color: var(--status-green); }
.nx360-ev.k-lead     { border-left-color: var(--status-amber); }
.nx360-ev.k-domicile { border-left-color: #7c3aed; }
.nx360-ev.is-cancelled { opacity: .55; }
.nx360-ic { font-size: 20px; line-height: 1.2; text-align: center; }
.nx360-body { min-width: 0; }
.nx360-line1 { font-size: 13px; color: var(--fz-grey-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nx360-title { font-weight: 700; color: var(--fz-black); font-size: 15px; margin-top: 1px; }
.nx360-sub { font-size: 12.5px; color: var(--fz-grey-4); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; }
.nx360-ref { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--fz-grey-3); }
.nx360-badge { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--fz-bg); color: var(--fz-grey-2); border: 1px solid #e0e0d8; }
.nx360-badge.cancelled { background: #fbe9e9; color: var(--status-red); border-color: #f3caca; }
.nx360-croc { font-size: 11px; color: var(--fz-grey-3); }
.nx360-right { text-align: right; white-space: nowrap; }
.nx360-amt { font-weight: 800; font-size: 15px; color: var(--fz-grey-2); }
.nx360-amt.paid { color: var(--status-green); }
.nx360-amt.pending { color: var(--status-amber); font-weight: 700; font-size: 13px; }
.nx360-amt .est { font-weight: 500; font-size: 10px; color: var(--fz-grey-4); }
.nx360-date { font-size: 11.5px; color: var(--fz-grey-4); margin-top: 2px; }
@media (max-width: 640px) {
  .nx360-ev { grid-template-columns: 28px 1fr; }
  .nx360-right { grid-column: 1 / -1; text-align: left; padding-left: 40px; }
  .nx360-date { display: inline; margin-left: 8px; }
}

/* ============ RELANCES CRM (Phase 2) ============ */
.rl-card {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  background: var(--fz-white);
  border: 1px solid var(--fz-grey-5);
  border-left: 4px solid var(--fz-grey-4);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.rl-card.rl-prio1 { border-left-color: var(--status-red); }
.rl-card.rl-prio2 { border-left-color: var(--status-amber); }
.rl-card.rl-prio3 { border-left-color: var(--fz-grey-4); }
.rl-ic { font-size: 26px; line-height: 1; text-align: center; }
.rl-body { min-width: 0; }
.rl-line1 { font-size: 15px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rl-tag {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  color: var(--fz-grey-3); background: var(--fz-bg);
  padding: 2px 8px; border-radius: 20px;
}
.rl-title { font-size: 14px; color: var(--fz-grey-2); margin-top: 3px; }
.rl-sub { font-size: 13px; color: var(--fz-grey-3); margin-top: 2px; word-break: break-word; }
.rl-meta { font-size: 12px; color: var(--fz-grey-4); margin-top: 4px; }
.rl-amt { color: var(--status-red); font-weight: 700; }
.rl-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.rl-actions .rl-spacer { flex: 1 1 auto; }
.rl-notel { font-size: 12px; color: var(--fz-grey-4); }
@media (max-width: 640px) {
  .rl-card { grid-template-columns: 32px 1fr; padding: 12px; }
  .rl-actions .rl-spacer { flex-basis: 100%; height: 0; }
}

/* ============ REPORTING CRM (Phase 3) ============ */
.rp-kpis { margin-bottom: 4px; }
/* série temporelle — barres verticales CSS */
.rp-chart {
  display: flex; align-items: flex-end; gap: 4px;
  height: 160px; padding: 8px 4px 0;
  background: var(--fz-white); border: 1px solid var(--fz-grey-5);
  border-radius: var(--radius-md); overflow-x: auto;
}
.rp-bar { flex: 1 0 18px; min-width: 18px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.rp-bar-fill { width: 70%; min-height: 2px; background: var(--fz-red); border-radius: 3px 3px 0 0; transition: height .2s; }
.rp-bar:hover .rp-bar-fill { background: var(--fz-red-light); }
.rp-bar-lbl { font-size: 10px; color: var(--fz-grey-4); white-space: nowrap; }
.rp-empty-inline { color: var(--fz-grey-4); font-size: 13px; padding: 8px; }
/* canaux */
.rp-chans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rp-chan { background: var(--fz-white); border: 1px solid var(--fz-grey-5); border-radius: var(--radius-md); padding: 12px 14px; }
.rp-chan.is-empty { opacity: .6; }
.rp-chan-top { font-size: 13px; font-weight: 700; color: var(--fz-grey-3); }
.rp-chan-ca { font-size: 22px; font-weight: 800; margin: 4px 0 2px; }
.rp-chan-meta { font-size: 12px; color: var(--fz-grey-4); }
.rp-chan-meta i { color: var(--status-amber); font-style: normal; }
/* top clients */
.rp-top { display: flex; flex-direction: column; gap: 4px; }
.rp-top-row { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 10px; align-items: center;
  background: var(--fz-white); border: 1px solid var(--fz-grey-5); border-radius: var(--radius-sm);
  padding: 8px 12px; text-align: left; cursor: pointer; font-size: 14px; }
.rp-top-row:hover { border-color: var(--fz-red); }
.rp-top-rank { font-weight: 800; color: var(--fz-grey-4); }
.rp-top-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-top-ca { font-weight: 800; }
.rp-top-n { font-size: 12px; color: var(--fz-grey-4); }
/* barres horizontales (types) */
.rp-hbars { display: flex; flex-direction: column; gap: 6px; }
.rp-hbar { display: grid; grid-template-columns: 160px 1fr 36px; gap: 8px; align-items: center; font-size: 13px; }
.rp-hbar-lbl { color: var(--fz-grey-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-hbar-track { background: var(--fz-bg); border-radius: 20px; height: 14px; overflow: hidden; }
.rp-hbar-fill { display: block; height: 100%; background: var(--fz-red); border-radius: 20px; min-width: 2px; }
.rp-hbar-val { text-align: right; font-weight: 700; color: var(--fz-grey-3); }
/* pills statut / relances */
.rp-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-pill { font-size: 13px; background: var(--fz-white); border: 1px solid var(--fz-grey-5); border-radius: 20px; padding: 4px 12px; color: var(--fz-grey-3); }
.rp-pill b { color: var(--fz-black); }
@media (max-width: 640px) {
  .rp-chans { grid-template-columns: 1fr; }
  .rp-hbar { grid-template-columns: 110px 1fr 30px; }
}
