/* =====================================================================
   ASSA GestaConta — présentation
   Disposition : menu latéral foncé (ordinateur) · barre en bas (téléphone)
   Couleurs : bleu = action principale · vert = positif · orange/rouge = alerte
   ===================================================================== */
:root {
  --bg: #F3F6FB;
  --surface: #FFFFFF;
  --ink: #0F1B33;
  --muted: #5E6B82;
  --line: #E1E7F0;
  --side: #14213D;          /* menu latéral */
  --side-ink: #C9D3E6;
  --side-active: #2563EB;
  --primary: #2563EB;
  --primary-ink: #FFFFFF;
  --primary-fonce: #1D4ED8; --primary-doux: #EFF6FF;   /* couleur de l'établissement (metier/theme.js) */
  --good: #16A34A; --good-bg: #E7F6EC;
  --warn: #C2410C; --warn-bg: #FFF1E6;
  --bad: #DC2626;  --bad-bg: #FDECEC;
  --field: #F8FAFD;
  --radius: 14px;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: "Consolas", "SFMono-Regular", "Courier New", monospace;
  color-scheme: light;
}
* { box-sizing: border-box }
html, body { height: 100% }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-tap-highlight-color: transparent }
[hidden] { display: none !important }
img { max-width: 100% }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance }
h2 { font-size: 20px; font-weight: 800 }
h3 { font-size: 16px; font-weight: 700 }
.mono { font-family: var(--mono); letter-spacing: .02em }
.num { font-variant-numeric: tabular-nums }
.hint { color: var(--muted); font-size: 14px; margin: 0 }
.stack { display: grid; gap: 14px }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr } }
.ic { flex: none }

/* ---------- Champs et boutons ---------- */
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0 }
input, select, textarea { font: 16px var(--font); color: var(--ink); background: var(--field); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; min-width: 0 }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15) }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 15px var(--font); border-radius: 10px; padding: 11px 18px; cursor: pointer; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink) }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink) }
.btn.big { padding: 14px 20px; font-size: 16px }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 8px }
.btn.danger { color: var(--bad) }
.btn.confirm { background: var(--bad); border-color: var(--bad); color: #FFFFFF }
.btn:disabled { opacity: .5; cursor: not-allowed }
.btn:focus-visible, .tile:focus-visible, .side-item:focus-visible, .link:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px }
.link { background: none; border: 0; padding: 4px 0; color: var(--primary); font: 700 14px var(--font); cursor: pointer }
.links { display: flex; flex-wrap: wrap; gap: 4px 18px }
.msg { font-size: 14px; font-weight: 600 }
.msg.err { color: var(--bad) } .msg.ok { color: var(--good) }
.msg:empty { display: none }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap }
.pill.ok { background: var(--good-bg); color: var(--good) }
.pill.warn { background: var(--warn-bg); color: var(--warn) }
.pill.bad { background: var(--bad-bg); color: var(--bad) }
.pill.tag { background: #EEF2F8; color: var(--muted) }
.pill.soon { background: #EEF2FF; color: #4338CA }

/* ---------- Écran de connexion ---------- */
.lock { position: fixed; inset: 0; z-index: 50; background: linear-gradient(160deg, #14213D 0%, #1E3A8A 100%); display: grid; place-items: center; overflow-y: auto;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)) }
.lock-card { background: var(--surface); border-radius: 18px; padding: 26px; width: 100%; max-width: 440px; display: grid; gap: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25) }
.brand-big { display: flex; gap: 12px; align-items: center }
.brand-big strong { font-size: 22px; font-weight: 800; display: block }
.brand-big strong span { color: var(--primary) }
.brand-big small { color: var(--muted) }
/* Slogan en vert, comme la flèche de croissance de l'icône */
.brand-big .slogan { font-weight: 600; color: var(--good) }
.logo-mark { width: 40px; height: 40px; flex: none; display: block; object-fit: contain }
.brand-big .logo-mark { width: 52px; height: 52px }
body:not(.locked) .lock { display: none }
body.locked .app { display: none }

/* ---------- Disposition générale ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100% }
.sidebar { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; gap: 8px; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto }
.side-brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 14px; color: #FFFFFF }
.side-brand strong { display: block; font-size: 17px }
.side-brand small { color: var(--side-ink); font-size: 12px }
.side-nav { display: grid; gap: 2px; flex: 1; align-content: start }
.side-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--side-ink); text-decoration: none; font-weight: 600; font-size: 14.5px; border: 0; background: none; cursor: pointer; width: 100%; text-align: left; font-family: var(--font) }
.side-item:hover { background: rgba(255, 255, 255, .07); color: #FFFFFF }
.side-item.active { background: var(--side-active); color: #FFFFFF }
.side-item .soon-dot { margin-left: auto; font-size: 10px; font-weight: 700; background: rgba(255, 255, 255, .12); padding: 1px 7px; border-radius: 99px }
.side-sep { height: 1px; background: rgba(255, 255, 255, .08); margin: 8px 6px }
.side-foot { display: grid; gap: 4px; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 10px }
.side-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; background: none; border: 0; color: var(--side-ink); font: 600 14px var(--font); cursor: pointer; text-align: left }
.side-link:hover { background: rgba(255, 255, 255, .07); color: #FFFFFF }
.side-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--warn); color: #FFFFFF; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center }
.side-mode { display: grid; gap: 4px; font-size: 12px; padding: 4px 12px 8px }
.side-mode select { background: rgba(255, 255, 255, .08); color: #FFFFFF; border-color: rgba(255, 255, 255, .15); padding: 8px 10px; font-size: 14px }
.side-mode select option { color: var(--ink) }
.main { min-width: 0; display: flex; flex-direction: column }
.topbar { display: flex; align-items: center; gap: 12px; padding: calc(16px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left)); background: var(--bg); position: sticky; top: 0; z-index: 5 }
/* (iPhone : le haut de l'écran (encoche, heure) est laissé libre grâce à env(safe-area-inset-top)) */
.top-title { min-width: 0; flex: 1 }
.top-title h1 { font-size: 22px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.etab-switch { background: none; border: 0; padding: 0; font: 500 14px var(--font); color: var(--muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; max-width: 100% }
.etab-switch span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.etab-switch.single { cursor: default } .etab-switch.single .chev { display: none }
.etab-menu { position: absolute; z-index: 20; top: 70px; left: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(15, 27, 51, .15); padding: 6px; min-width: 260px; max-width: calc(100vw - 32px) }
.etab-menu button { display: grid; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 8px; cursor: pointer; font: 600 14px var(--font); color: var(--ink) }
.etab-menu button small { color: var(--muted); font-weight: 500 }
.etab-menu button:hover, .etab-menu button.active { background: var(--field) }
.top-right { display: flex; align-items: center; gap: 10px }
.btn-fichier { position: relative; cursor: pointer; overflow: hidden }
.btn-fichier input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer }
.top-logout { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--bad); font: 700 14px var(--font); cursor: pointer }
.top-logout:hover { background: var(--bad-bg); border-color: #F5C2C2 }
@media (max-width: 560px) { .top-logout span { display: none } .top-logout { padding: 8px } }
/* Console ASSA seule : les onglets sont dans le menu de gauche (on masque ceux de la page) */
body.console-seule #csTabs { display: none }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: #DBE5FF; color: var(--primary); display: grid; place-items: center; font-weight: 800 }
.icon-btn { width: 42px; height: 42px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink) }
.sync-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 0; font: 700 13px var(--font); cursor: pointer; background: var(--good-bg); color: var(--good) }
.sync-badge.offline { background: var(--warn-bg); color: var(--warn) }
.sync-badge.pending { background: #EEF2FF; color: #4338CA }
.sync-badge.error { background: var(--bad-bg); color: var(--bad) }
/* Petit écran : « En ligne » réduit à son icône ; le texte reste affiché en cas de coupure ou d'envoi */
@media (max-width: 480px) { .sync-badge:not(.offline):not(.pending):not(.error) span { display: none } .sync-badge { padding: 6px 9px } }
.content { padding: 4px max(20px, env(safe-area-inset-right)) 32px max(20px, env(safe-area-inset-left)); display: grid; gap: 20px; align-content: start; outline: none; max-width: 1280px; width: 100% }
.only-mobile { display: none }
.bottomnav { display: none }
.scrim { position: fixed; inset: 0; background: rgba(10, 18, 35, .45); z-index: 30 }

/* Téléphone et petite tablette : le menu devient un tiroir, la barre du bas apparaît */
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: min(290px, 86vw); transform: translateX(-102%); transition: transform .2s ease; padding-top: max(18px, env(safe-area-inset-top)) }
  body.drawer .sidebar { transform: none }
  .only-mobile { display: grid }
  .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)) }
  .bottomnav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)) }
  .bottomnav button { display: grid; justify-items: center; gap: 2px; background: none; border: 0; padding: 6px 2px; font: 700 11.5px var(--font); color: var(--muted); cursor: pointer }
  .bottomnav button.active { color: var(--primary) }
  .top-title h1 { font-size: 19px }
  .etab-menu { top: 64px; left: 16px }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none } }

/* ---------- Accueil : tuiles colorées ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px }
.tile { border: 0; border-radius: var(--radius); color: #FFFFFF; padding: 18px 14px; min-height: 118px; display: grid; justify-items: center; align-content: center; gap: 10px; cursor: pointer; font: 700 15px var(--font); text-align: center; position: relative; box-shadow: 0 6px 16px rgba(15, 27, 51, .12) }
.tile .ic { width: 40px; height: 40px }
.tile:hover { filter: brightness(1.06) }
.tile:active { transform: scale(.98) }
.tile .soon { position: absolute; top: 8px; right: 8px; font-size: 10px; background: rgba(255, 255, 255, .25); padding: 1px 7px; border-radius: 99px }
.tile.main { grid-column: span 1 }
@media (max-width: 720px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px } .tile { min-height: 112px } }
.mode-gestionnaire .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)) }
.mode-gestionnaire .tile { min-height: 100px; font-size: 13.5px; padding: 14px 8px }
.mode-gestionnaire .tile .ic { width: 32px; height: 32px }
@media (max-width: 1100px) { .mode-gestionnaire .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
@media (max-width: 720px) { .mode-gestionnaire .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)) } }

/* ---------- Cartes et indicateurs ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; min-width: 0 }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px }
/* Console ASSA : pleine largeur */
body.vue-console .content { max-width: none; padding-left: 12px; padding-right: 12px }
/* Statistiques ASSA : graphiques (une série = une couleur, grille discrète, texte en encre) */
.st-svg { width: 100%; height: auto; display: block; overflow: visible }
.grid2.st-egal { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) }
@media (max-width: 900px) { .grid2.st-egal { grid-template-columns: 1fr } }
.st-grille { stroke: var(--line); stroke-width: 1 }
.st-base { stroke: #B8C2D3; stroke-width: 1 }
.st-axe { font: 11px var(--font); fill: var(--muted) }
.st-val { font: 700 12px var(--font); fill: var(--ink) }
.st-barre { fill: #93B4F5 } .st-barre.actuel { fill: var(--primary) }
.st-col:hover .st-barre { fill: #1D4ED8 }
.st-rep { display: grid; gap: 10px }
.st-ligne { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 14px }
.st-ligne strong { text-align: right }
.st-piste { height: 12px; background: var(--bg); border-radius: 4px; overflow: hidden }
.st-rempli { display: block; height: 100%; background: var(--primary); border-radius: 0 4px 4px 0 }
.st-rempli.essai { background: #93B4F5 } .st-rempli.expire { background: var(--warn) }
.st-tab { margin-top: 8px; font-size: 14px } .st-tab summary { cursor: pointer; color: var(--primary); font-weight: 600 }
.st-bulle { position: absolute; z-index: 30; pointer-events: none; background: var(--ink); color: #FFFFFF; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; white-space: nowrap }
#csCorps { position: relative }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; gap: 12px; align-items: center; min-width: 0 }
.kpi .kico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none }
.kpi .kv { display: grid; min-width: 0 }
.kpi .kv small { color: var(--muted); font-weight: 600; font-size: 13px }
.kpi .kv strong { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.kpi .kv em { font-style: normal; color: var(--muted); font-size: 12px }
/* Deux devises sur deux lignes, même taille (accueil) ; un montant nul est plus discret */
.kpi .kv .duo { display: grid; line-height: 1.2; margin: 2px 0 }
.kpi .kv .duo b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap }
.kpi .kv .duo b.zero { color: #9AA6BA; font-weight: 700 }
@media (max-width: 560px) { .kpi .kv .duo b { font-size: 16px } }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr } }
.empty { text-align: center; color: var(--muted); padding: 22px 12px; font-size: 14px }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px }
.list { display: grid }
.list .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); min-width: 0; flex-wrap: wrap }
.list .row:last-child { border-bottom: 0 }
.list .row .who { min-width: 0; flex: 1 }
.list .row .who small { display: block; color: var(--muted); font-size: 12.5px }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap }

/* ---------- Écran « bientôt » ---------- */
.soon-card { background: var(--surface); border: 1px dashed #C7D2FE; border-radius: 18px; padding: 32px 22px; display: grid; justify-items: center; gap: 12px; text-align: center; max-width: 620px; margin: 10px auto }
.soon-card .big-ic { width: 76px; height: 76px; border-radius: 20px; display: grid; place-items: center; color: #FFFFFF }
.soon-card .big-ic .ic { width: 40px; height: 40px }

/* ---------- Formulaires des paramètres ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; align-items: end }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }
.tabs-inline { display: flex; gap: 6px; flex-wrap: wrap }
.tabs-inline button { border: 1.5px solid var(--line); background: var(--surface); border-radius: 99px; padding: 8px 14px; font: 700 13.5px var(--font); cursor: pointer; color: var(--muted) }
.tabs-inline button.active { background: var(--primary); border-color: var(--primary); color: #FFFFFF }
.perm-table { width: 100%; border-collapse: collapse; font-size: 14px }
.perm-table td, .perm-table th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left }
.perm-table select { padding: 7px 8px; font-size: 14px }
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface) }
table.data th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 12px; background: var(--field); border-bottom: 1px solid var(--line); white-space: nowrap }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle }
table.data tr:last-child td { border-bottom: 0 }
.chips { display: flex; gap: 6px; flex-wrap: wrap }
.chk { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; color: var(--ink) }
.chk input { width: auto }

/* ---------- Fenêtres et bulles ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(10, 18, 35, .5); display: grid; place-items: center; padding: 16px; overflow-y: auto }
.modal-card { background: var(--surface); border-radius: 16px; padding: 22px; width: 100%; max-width: 460px }
.toasts { position: fixed; z-index: 70; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)) }
@media (max-width: 1000px) { .toasts { bottom: calc(84px + env(safe-area-inset-bottom)) } }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--good); box-shadow: 0 8px 24px rgba(15, 27, 51, .16) }
.toast.err { border-left-color: var(--bad) }
.toast .ico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #FFFFFF; background: var(--good) }
.toast.err .ico { background: var(--bad) }
.toast .t { display: grid; font-size: 14px } .toast .t small { color: var(--muted) }
@media (prefers-reduced-motion: no-preference) { .toast { animation: tin .25s ease-out } @keyframes tin { from { transform: translateY(10px); opacity: 0 } } }

/* =====================================================================
   ÉTAPE B — catalogue, vente, caisse, clients, reçu
   ===================================================================== */
.neg { color: var(--bad) } td.pos, span.pos, strong.pos, em.pos { color: var(--good) }
.toolbar-line { display: flex; gap: 10px }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center }
.scroll-x { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin }
.chip { flex: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 99px; padding: 7px 14px; font: 700 13.5px var(--font); cursor: pointer; white-space: nowrap }
.chip.on { background: var(--primary); border-color: var(--primary); color: #FFFFFF }
.chip-sep { width: 1px; height: 22px; background: var(--line); flex: none }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; font-size: 14.5px; flex-wrap: wrap }
.banner > span { flex: 1; min-width: 200px }
.banner.warn { background: var(--warn-bg); color: #7C2D12 } .banner.bad { background: var(--bad-bg); color: #7F1D1D } .banner.info { background: #EEF2FF; color: #3730A3 }
.modal-card { max-height: calc(100vh - 32px); overflow-y: auto }
.modal-card.large { max-width: 640px }
.row-btn { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left; font: inherit; color: inherit }
.row-btn:hover { background: var(--field) }
.card.list { padding: 4px 16px }
tr.clic { cursor: pointer } tr.clic:hover td { background: var(--field) }
table.data td.r, table.data th.r { text-align: right }
table.data td.mono, table.data td.num { white-space: nowrap }
/* Tableaux « cartes » : sur un écran étroit, chaque ligne devient une petite carte (plus de défilement horizontal) */
@media (max-width: 760px) {
  table.data.cartes thead { display: none }
  table.data.cartes, table.data.cartes tbody, table.data.cartes tr, table.data.cartes td { display: block; width: 100% }
  table.data.cartes tr { padding: 10px 12px; border-bottom: 1px solid var(--line) }
  table.data.cartes td { border: 0; padding: 3px 0; white-space: normal }
  table.data.cartes td[data-l]:not([data-l=""])::before { content: attr(data-l); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted) }
}

/* Catalogue */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px }
.prod-card { display: grid; gap: 6px; justify-items: start; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; font: inherit; color: inherit; min-width: 0 }
.prod-card:hover { border-color: var(--primary) }
.prod-img, .pos-img, .photo-prev { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; background: #F1F5FB; display: grid; place-items: center; color: #94A3B8; overflow: hidden }
.prod-img img, .pos-img img, .photo-prev img { width: 100%; height: 100%; object-fit: cover }
.photo-prev { width: 72px; aspect-ratio: 1 }
.prod-nom { font-weight: 700; font-size: 14.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }
.prod-prix { font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums } .prod-prix small { color: var(--muted); font-weight: 500 }
.steps { display: flex; gap: 6px; flex-wrap: wrap }
.step { font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: #EEF2F8; color: var(--muted) }
.step.on { background: var(--primary); color: #FFFFFF } .step.done { background: var(--good-bg); color: var(--good) }
.seg2 { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface) }
.seg2 button { border: 0; background: none; padding: 10px 16px; font: 700 14px var(--font); color: var(--muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center }
.seg2 button + button { border-left: 1.5px solid var(--line) }
.seg2 button.on { background: var(--primary); color: #FFFFFF }
.seg2.small button { padding: 6px 12px; font-size: 13px }
.toggle { display: flex; gap: 10px; align-items: center; font-weight: 700; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer }
.toggle input { width: 22px; height: 22px }

/* Écran de vente */
div.pos { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 16px; align-items: start }
@media (max-width: 1000px) { div.pos { grid-template-columns: 1fr } }
.pos-cat { gap: 12px }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; max-height: min(64vh, 620px); overflow-y: auto; overscroll-behavior: contain; padding: 2px }
.pos-item { display: grid; gap: 4px; text-align: left; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); min-width: 0 }
.pos-item:hover { border-color: var(--primary) }
.pos-item .n { font-weight: 700; font-size: 13.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.pos-item .p { font-weight: 800; color: var(--primary); font-size: 14px; font-variant-numeric: tabular-nums }
.pos-item .s { font-size: 12px; color: var(--muted); min-height: 1em }
.pos-item.out { opacity: .45; cursor: not-allowed }
.pos-cart { position: sticky; top: calc(76px + env(safe-area-inset-top)) }
.cart { display: grid; max-height: 34vh; overflow-y: auto }
.cart-line { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line) }
.cart-line.warn { background: var(--warn-bg) }
.cl-img { width: 40px; height: 40px; border-radius: 8px; background: #F1F5FB; display: grid; place-items: center; overflow: hidden; color: #94A3B8 }
.cl-img img { width: 100%; height: 100%; object-fit: cover }
.cl-name { min-width: 0; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis }
.cl-name small { display: block; font-weight: 500; color: var(--muted); font-size: 12px }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden }
.qty button { border: 0; background: var(--field); width: 32px; height: 34px; font-size: 18px; cursor: pointer; color: var(--ink) }
.qty input { width: 48px; border: 0; border-radius: 0; text-align: center; padding: 6px 2px; font-size: 15px }
@media (max-width: 420px) { .cart-line { grid-template-columns: minmax(0, 1fr) auto; } .cl-img { display: none } .cart-line > strong { grid-column: 2 } }
.totaux { display: grid; gap: 4px; border-top: 2px solid var(--ink); padding-top: 8px }
.tl { display: flex; justify-content: space-between; align-items: center; font-size: 14.5px }
.tl.big { font-size: 22px; font-weight: 800 }
.pay-total { display: flex; justify-content: space-between; align-items: baseline; background: #EEF4FF; border-radius: 12px; padding: 12px 16px }
.pay-total strong { font-size: 26px; color: var(--primary); font-variant-numeric: tabular-nums }
.pay-line { display: grid; grid-template-columns: minmax(0, 1.3fr) 90px minmax(0, 1fr) auto; gap: 8px; align-items: center }
.pay-line .pay-ref { grid-column: 1 / -1 }
@media (max-width: 480px) { .pay-line { grid-template-columns: 1fr 1fr } .pay-line input { grid-column: 1 / -1 } }

/* Caisse */
.taux-card h3 { display: flex; gap: 8px; align-items: center }
.taux-val { margin: 0; font-size: 18px }
.taux-val strong { font-size: 22px }

/* Reçu (ticket 58/80 mm) */
.ticket { background: #FFFFFF; color: #111111; font: 13px/1.45 var(--mono); padding: 16px; border: 1px dashed #BBBBBB; border-radius: 6px; max-width: 340px; margin: 0 auto; width: 100% }
.tk-head { text-align: center; display: grid; gap: 1px; margin-bottom: 8px }
.tk-head strong { font-size: 15px; text-transform: uppercase }
.tk-row { display: flex; justify-content: space-between; gap: 8px }
.tk-row.small { font-size: 11px; color: #555555 }
.tk-lines { width: 100%; border-collapse: collapse; margin: 6px 0; border-top: 1px dashed #999999; border-bottom: 1px dashed #999999 }
.tk-lines td { padding: 1px 0; border: 0 } .tk-lines td.r { text-align: right }
.tk-tot { display: flex; justify-content: space-between; font-weight: 800; font-size: 16px; margin: 4px 0 }
.tk-stamp { text-align: center; font-weight: 800; color: #B91C1C; border: 2px solid #B91C1C; padding: 4px; margin: 6px 0 }
.tk-foot { text-align: center; margin-top: 10px }
.tk-foot small { display: block; margin-top: 6px; color: #555555 }
.tk-legal { font-size: 11px; color: #444444 }
.tk-titre { font-weight: 800; margin-top: 6px; letter-spacing: .04em; border-top: 1px dashed #999999; padding-top: 6px }
.tk-sep { border-top: 1px dashed #999999; margin: 4px 0 }
/* Colonnes de la facture : Qté · Prix · Remise · Unité · Montant */
.tk-cols { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 12px; border-top: 1px dashed #999999; border-bottom: 1px dashed #999999 }
.tk-cols th { font-weight: 700; text-align: right; padding: 2px 0 2px 4px; border: 0 }
.tk-cols thead tr:last-child th { border-bottom: 1px dashed #999999 }
.tk-cols td { text-align: right; padding: 0 0 0 4px; border: 0; white-space: nowrap }
.tk-cols th.l, .tk-cols td.l, .tk-cols tr.tk-nom td { text-align: left; padding-left: 0; white-space: normal }
.tk-cols tr.tk-nom td { padding-top: 4px }
.tk-totaux { border-bottom: 1px dashed #999999; padding-bottom: 4px }
.tk-merci { margin-top: 8px; font-weight: 700 }
.tk-mentions { font-size: 11px; color: #444444; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #BBBBBB }
/* Impression du ticket sur téléphone : règles créées au moment d'imprimer (outils.js, imprimerTicketPage) */
/* Marges du papier pour les rapports (le ticket de caisse a ses propres réglages, sans marge) */
@media print { @page { margin: 12mm } }

/* =====================================================================
   ÉTAPE C — dépenses, Mon argent, rapports
   ===================================================================== */
.kpis5 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) }
.bars { display: grid; gap: 10px }
.bar-row { display: grid; grid-template-columns: minmax(90px, 140px) minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13.5px }
.bar-lab { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.bar-vals { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-items: center }
.bar-vals b { font-variant-numeric: tabular-nums; font-size: 13px; white-space: nowrap }
.bar { height: 10px; background: #EEF2F8; border-radius: 99px; overflow: hidden }
.bar i { display: block; height: 100%; background: #DC2626; border-radius: 99px }
.bar.usd i { background: #F97316 }
.rapport-tete h2 { margin: 0 }
.list .row .r { text-align: right }
@media print {
  body.print-rapport #sidebar, body.print-rapport .topbar, body.print-rapport #bottomNav, body.print-rapport .no-print, body.print-rapport #toasts, body.print-rapport #aboBanner, body.print-rapport #refusBanner, body.print-rapport .modal { display: none !important }
  body.print-rapport #app, body.print-rapport main, body.print-rapport #content { margin: 0 !important; padding: 0 !important; display: block !important; overflow: visible !important }
  body.print-rapport .card, body.print-rapport .kpi { break-inside: avoid; box-shadow: none }
  body.print-rapport .grid2 { grid-template-columns: 1fr 1fr }
  body.print-rapport { background: #FFFFFF }
}
.list, .bars { align-content: start }
.kpis5 .kpi { padding: 14px 12px; gap: 10px }
.kpis5 .kpi .kico { width: 40px; height: 40px }
.kpis5 .kpi .kv strong { font-size: 18px; white-space: normal; overflow: visible }
.card { align-content: start }
/* Téléphone : indicateurs sur 2 colonnes, champs de recherche pleine largeur */
.actions > input[type=search] { min-width: 220px }
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px }
  .kpi { padding: 12px; }
  .kpi .kico { display: none }
  .kpi .kv strong, .kpis5 .kpi .kv strong { font-size: 17px; white-space: normal }
}

/* =====================================================================
   ÉTAPE D — stock, achats, fournisseurs
   ===================================================================== */
.inv-in { width: 96px; text-align: right; padding: 7px 8px }
.inv-box { max-height: 52vh; overflow-y: auto }
details.row summary { cursor: pointer; padding: 8px 0; line-height: 1.5 }
details.row table { margin: 6px 0 10px }

/* =====================================================================
   ÉTAPE E — abonnements
   ===================================================================== */
.abo-banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 20px 12px; max-width: 1240px; padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600 }
.abo-banner span { flex: 1; min-width: 200px }
.abo-banner.warn { background: var(--warn-bg); color: #7C2D12 } .abo-banner.bad { background: var(--bad-bg); color: #7F1D1D }
@media (max-width: 1000px) { .abo-banner { margin: 0 12px 10px } }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px }
.plan { display: grid; gap: 6px; text-align: left; padding: 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; font: inherit; color: var(--ink) }
.plan.on { border-color: var(--primary); box-shadow: 0 0 0 3px #DBE7FF }
.plan strong { font-size: 17px }
.plan-prix { font-size: 24px; font-weight: 800; color: var(--primary) } .plan-prix small { font-size: 13px; color: var(--muted); font-weight: 600 }
.etapes-paiement { margin: 0; padding-left: 20px; display: grid; gap: 10px; line-height: 1.5 }
.plan .pill { justify-self: start }
/* Espace d'administration ASSA (/admin) : pas d'inscription ni d'invitation */
.only-admin { display: none }
body.espace-admin .only-admin { display: block }
body.espace-admin .client-only { display: none }
.lot-in { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap } .lot-in input { width: 130px; padding: 6px 8px; font-size: 13px }

/* =====================================================================
   ÉTAPE F — écrans métiers
   ===================================================================== */
.pill.info { background: #E0ECFF; color: #1D4ED8 }
/* Restaurant */
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px }
.table-card { display: grid; gap: 4px; justify-items: start; text-align: left; min-height: 110px; padding: 14px; border-radius: 16px; border: 2px solid; cursor: pointer; font: inherit; color: var(--ink) }
.table-card strong { font-size: 18px }
.table-card.libre { background: #ECFDF3; border-color: #86EFAC }
.table-card.occupee { background: #FFF4E5; border-color: #FDBA74 }
.table-card small { color: var(--muted) }
.chip.table-chip.occupee { border-color: #FDBA74; color: #C2410C }
.chip.table-chip.occupee.on { background: #EA580C; border-color: #EA580C; color: #FFFFFF }
.note-in { display: block; width: 100%; margin-top: 4px; padding: 5px 8px; font-size: 12.5px; border-radius: 8px }
.cuisine-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start }
@media (max-width: 900px) { .cuisine-board { grid-template-columns: 1fr } }
.cuisine-board h3 { display: flex; gap: 8px; align-items: center; margin: 0 0 8px }
.bon { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid #F59E0B; border-radius: 14px; padding: 12px; display: grid; gap: 6px }
.bon.preparation { border-left-color: #3B82F6 } .bon.pret { border-left-color: #16A34A; opacity: .9 }
.bon.retard { box-shadow: 0 0 0 2px #FCA5A5 }
.bon-tete { display: flex; justify-content: space-between; font-size: 17px }
.bon ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 15.5px }
.bon em { display: block; color: #B45309; font-style: normal; font-size: 13px }
/* Salon */
.agenda .rdv { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center }
.agenda .rdv.annule, .agenda .rdv.absent { opacity: .55 }
.rdv-h { display: grid; text-align: center; background: #F1EAFE; color: #6D28D9; border-radius: 10px; padding: 6px 0 }
.rdv-h small { color: #7C3AED; font-size: 11.5px }
@media (max-width: 640px) { .agenda .rdv { grid-template-columns: 56px minmax(0, 1fr) } .agenda .rdv > .actions { grid-column: 1 / -1 } }
textarea { font: inherit; width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; background: var(--field); resize: vertical }
/* Impression d'un rapport journalier (transport) */
#zoneImpression { display: none }
@media print {
  body.print-zone * { visibility: hidden !important }
  body.print-zone #zoneImpression, body.print-zone #zoneImpression * { visibility: visible !important }
  body.print-zone #zoneImpression { display: block !important; position: absolute; left: 0; top: 0; width: 100%; font: 12px/1.45 Arial, sans-serif; color: #000000 }
}
.rp-tete { display: flex; gap: 12px; align-items: center } .rp-tete img { height: 54px }
.rp-table { width: 100%; border-collapse: collapse; margin-top: 10px } .rp-table th, .rp-table td { border: 1px solid #999999; padding: 4px 6px; text-align: left } .rp-table .r { text-align: right }
.rp-table tfoot td { background: #EEEEEE } .rp-sign { margin-top: 40px }

/* Bouton « Installer l'application » et ses explications */
.install-btn { width: 100%; justify-content: center; gap: 8px; border: 1px dashed var(--primary); color: var(--primary); background: #F2F6FF }
[data-installer] { display: inline-flex; align-items: center; gap: 10px }
[data-installer][hidden] { display: none }
.install-etapes { padding-left: 20px; display: grid; gap: 10px; margin: 0 }

/* Opérations refusées par le serveur : bandeau rouge persistant */
.refus-banner { display: block; width: 100%; text-align: left; border: 0; cursor: pointer; background: var(--bad); color: #fff; padding: 10px 16px; font: inherit; font-size: 14px; line-height: 1.4 }
.refus-banner[hidden] { display: none }
.refus-banner strong { font-weight: 800 }

/* Aide ASSA (propriétaire) : bouton du haut, pastille « nouveau message » */
.top-aide { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1px solid #1FA855; background: #1FA855; color: #FFFFFF; font: 700 14px var(--font); cursor: pointer }
.top-aide:hover { background: #178A45 }
[data-aide] .btn, .chat .btn.whatsapp { display: inline-flex; align-items: center; gap: 6px }
[data-ic] { display: inline-flex }
.top-aide[hidden] { display: none }
@media (max-width: 560px) { .top-aide span { display: none } .top-aide { padding: 8px } }
.a-lire { position: relative }
.a-lire::after { content: ""; position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--bad); border: 2px solid var(--surface) }
.btn.whatsapp { background: #1FA855; border-color: #1FA855; color: #fff; text-decoration: none }

/* Discussion */
.chat-fil { display: flex; flex-direction: column; gap: 8px; max-height: min(52vh, 460px); min-height: 160px; overflow-y: auto; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg) }
.bulle { max-width: 82%; padding: 8px 12px; border-radius: 14px; line-height: 1.45; word-wrap: break-word }
.bulle small { display: block; margin-top: 4px; font-size: 11px; opacity: .75 }
.bulle.moi { align-self: flex-end; background: var(--primary); color: var(--primary-ink); border-bottom-right-radius: 4px }
.bulle.autre { align-self: flex-start; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px }
.chat-saisie { display: flex; gap: 8px; align-items: flex-end }
.chat-saisie textarea { flex: 1; resize: vertical; min-height: 44px }
/* Console : liste des conversations à gauche, discussion à droite */
.cs-chat { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 14px }
@media (max-width: 860px) { .cs-chat { grid-template-columns: 1fr } }
.cs-fils { display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow-y: auto }
.cs-fil { text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit }
.cs-fil.active { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 25%, transparent) }
.cs-fil.non-lu strong::before { content: "● "; color: var(--bad) }
.cs-fil small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }

/* Page de connexion : gros boutons avec images (pour les personnes qui lisent peu) */
.choix-acces { display: grid; gap: 10px; margin-top: 6px }
.choix-titre { margin: 4px 0 0; font-weight: 700; color: var(--muted); text-align: center }
.choix { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); color: var(--ink); font: inherit; cursor: pointer; min-height: 72px }
.choix:hover, .choix:focus-visible { background: color-mix(in srgb, var(--primary) 16%, var(--surface)) }
.choix-ic { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--primary); color: #fff }
.choix-txt { flex: 1; display: grid; gap: 2px }
.choix-txt strong { font-size: 17px; color: var(--primary) }
.choix-txt small { font-size: 13.5px; color: var(--muted); line-height: 1.35 }
.choix-fleche { font-size: 32px; line-height: 1; color: var(--primary); font-weight: 700 }
.choix.vert { border-color: var(--good); background: color-mix(in srgb, var(--good) 8%, var(--surface)) }
.choix.vert:hover, .choix.vert:focus-visible { background: color-mix(in srgb, var(--good) 16%, var(--surface)) }
.choix.vert .choix-ic { background: var(--good) } .choix.vert strong, .choix.vert .choix-fleche { color: var(--good) }
.choix-petits { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center }
.choix-petits .btn { display: inline-flex; align-items: center; gap: 8px }

/* Discussion : répondre à un message, citation, message supprimé, actions sur une bulle */
.chat-outils { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end }
.chat-outils .btn, .bulle-actions .btn { display: inline-flex; align-items: center; gap: 6px }
.bulle { cursor: pointer }
.bulle.eclaire { box-shadow: 0 0 0 3px #F59E0B }
.bulle-cite { display: block; width: 100%; text-align: left; margin: 0 0 6px; padding: 6px 8px; border: 0; border-left: 4px solid #1FA855; border-radius: 6px; background: rgba(0, 0, 0, .08); color: inherit; font: inherit; font-size: 12.5px; cursor: pointer; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical }
.bulle.moi .bulle-cite { background: rgba(255, 255, 255, .18); border-left-color: #FFFFFF }
.bulle-cite strong { display: block; font-size: 12px }
.bulle-supprime { font-style: italic; opacity: .75; display: flex; align-items: center; gap: 4px }
.bulle-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 4px }
.bulle.moi + .bulle-actions { justify-content: flex-end }
.chat-reponse { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-left: 4px solid #1FA855; border-radius: 8px; background: var(--bg); font-size: 13.5px }
.chat-reponse[hidden] { display: none }
.chat-reponse span { display: block; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0 }
.chat-reponse span svg { vertical-align: -2px; margin-right: 4px }
.chat-reponse { min-width: 0; max-width: 100% }

/* ---------- Mon argent : des lignes avec icônes, sans cadres ---------- */
.ar-bloc { display: grid; gap: 4px; align-content: start; min-width: 0 }
.ar-bloc > h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 6px 0 2px }
.ar-liste { display: grid }
.ar-l { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line) }
.ar-l:last-of-type { border-bottom: 0 }
.ar-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center }
.ar-t { display: grid; gap: 2px; min-width: 0; font-weight: 600 }
.ar-t small { color: var(--muted); font-weight: 400; font-size: 12.5px; line-height: 1.35 }
.ar-v { display: grid; justify-items: end; gap: 3px; text-align: right }
.ar-v strong { font-size: 19px; font-weight: 800; white-space: nowrap }
.ar-fort .ar-v strong { font-size: 22px }
.ar-alerte .ar-t > span, .ar-alerte .ar-v strong { color: var(--bad) }
.ar-cmp { font-size: 12.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; white-space: nowrap }
.ar-cmp.ar-bon { color: var(--good); background: var(--good-bg) }
.ar-cmp.ar-mauvais { color: var(--bad); background: var(--bad-bg) }
.ar-cmp.ar-neutre { color: var(--muted); background: #EEF2F8 }
.ar-sous { color: var(--muted); font-size: 11.5px; font-weight: 400 }
.ar-pied { margin-top: 6px }
.ar-graph { width: 100%; max-width: 760px; height: auto; display: block; overflow: visible }
.ar-graph .ar-axe { stroke: var(--line); stroke-width: 1.5 }
.ar-graph .ar-chiffre { font-size: 12px; font-weight: 700; fill: var(--ink) }
.ar-graph .ar-chiffre.neg { fill: var(--bad) }
.ar-graph .ar-mois { font-size: 12.5px; fill: var(--muted) }
.ar-legende { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; font-weight: 600 }
.ar-legende i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px }
@media (max-width: 600px) { .ar-l { grid-template-columns: 38px minmax(0, 1fr); } .ar-ic { width: 38px; height: 38px } .ar-v { grid-column: 2; justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; align-items: center; gap: 8px } }

/* Rapport recopié pour le PDF A4 (hors de l'écran) : une seule colonne, tableaux entiers */
.pdf-a4 .grid2, .pdf-a4 .grid3 { grid-template-columns: 1fr !important }
.pdf-a4 .table-box { overflow: visible }
.pdf-a4 .card { box-shadow: none }

/* Navigation en icônes (Paramètres) : pas de boutons-carreaux, une icône colorée et son nom */
.tabs-icones { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); padding-bottom: 2px }
.tabs-icones::-webkit-scrollbar { display: none }
.tabs-icones button { flex: 0 0 auto; display: grid; justify-items: center; gap: 6px; min-width: 86px; padding: 8px 8px 10px; border: 0; background: none; cursor: pointer; color: var(--muted); font: 600 13px var(--font); border-bottom: 3px solid transparent; margin-bottom: -3px }
.tabs-icones .ti-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); transition: transform .15s }
.tabs-icones button:hover .ti-ic { transform: translateY(-2px) }
.tabs-icones button.active { color: var(--ink); border-bottom-color: var(--c) }
.tabs-icones button.active .ti-ic { background: var(--c); color: #FFFFFF; box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 35%, transparent) }
/* Téléphone : toutes les icônes visibles d'un coup (4 par ligne), sans défilement caché */
@media (max-width: 600px) { .tabs-icones { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; row-gap: 2px }
  .tabs-icones button { min-width: 0; padding: 6px 2px 8px; font-size: 11.5px } .tabs-icones .ti-ic { width: 42px; height: 42px } }
.btn .ic-auto { width: 20px; height: 20px; flex: none }

/* Mon argent : filtre « Du … Au … » et choix « $ Dollars | FC Francs » */
.ar-filtres { align-items: flex-end }
.ar-filtres .field { min-width: 0 }
.ar-filtres input[type=date] { width: 160px }
@media (max-width: 600px) { .ar-filtres { width: 100% } .ar-filtres .field { flex: 1 } .ar-filtres input[type=date] { width: 100% } }

/* =====================================================================
   CAISSE — présentation de la maquette du 25/10/2026
   ===================================================================== */
.cx { --cx-bleu: #2563EB; --cx-vert: #16A34A; --cx-vert-f: #1E9A55; --cx-rouge: #DC2626; --cx-violet: #7C3AED }
.cx-haut { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px }
.cx .card { border-radius: 16px }
.cx-titre { display: flex; align-items: center; gap: 10px; flex-wrap: wrap }
.cx-titre h3 { font-size: 18px; font-weight: 800; margin: 0 }
.cx-rond { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none }
.cx-rond.bleu { color: var(--cx-bleu); background: #E3ECFF } .cx-rond.vert { color: var(--cx-vert); background: #E3F6EA } .cx-rond.rouge { color: var(--cx-rouge); background: #FDECEC }
/* Taux */
.cx-taux { display: grid; gap: 10px }
.cx-date { font-size: 13px; font-weight: 600; color: var(--muted); background: #EEF2F8; border-radius: 8px; padding: 3px 10px }
.cx-date.ancien { color: #B45309; background: #FEF3C7 }
.cx-taux-v { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap }
.cx-taux-val { font-size: 30px; font-weight: 800; margin: 0; letter-spacing: -.01em }
.cx-info { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--muted) }
.cx-info .ic { color: var(--cx-bleu) }
/* État */
.cx-etat { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap }
.cx-etat-g { display: grid; gap: 8px; justify-items: start }
.cx-pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 5px 14px; font-weight: 700; font-size: 14px }
.cx-pill i { width: 9px; height: 9px; border-radius: 50%; background: currentColor }
.cx-pill.vert { color: #15803D; background: #DCF5E5 } .cx-pill.rouge { color: var(--cx-rouge); background: #FDECEC }
.cx-cloturer { font-size: 17px; padding: 15px 26px; border-radius: 12px }
/* Résumé : les 5 tuiles */
.cx-resume { display: grid; gap: 16px }
.cx-tuiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px }
.cx-tuile { border-radius: 14px; padding: 16px; display: grid; grid-template-columns: 44px 1fr; gap: 6px 12px; align-content: start; min-width: 0 }
.cx-tic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #FFFFFF }
.cx-tt { display: grid; align-content: center; font-size: 15px } .cx-tt small { color: inherit; opacity: .8; font-size: 13px }
.cx-tv { grid-column: 2; display: grid; justify-items: start; padding-top: 8px; gap: 2px }
.cx-tv b { font-size: 26px; font-weight: 800; white-space: nowrap } .cx-tv span { color: var(--muted); font-size: 14px } .cx-tv em { font-style: normal; font-size: 12px; color: var(--muted) }
.cx-tuile.bleu { background: #EEF4FF } .cx-tuile.bleu .cx-tic { background: #3B82F6 } .cx-tuile.bleu b { color: #1E3A8A }
.cx-tuile.vert { background: #E9F8EF } .cx-tuile.vert .cx-tic { background: var(--cx-vert) } .cx-tuile.vert b { color: #15803D }
.cx-tuile.rouge { background: #FDEEEE } .cx-tuile.rouge .cx-tic { background: #EF4444 } .cx-tuile.rouge b, .cx-tuile.rouge .cx-tt small { color: var(--cx-rouge) }
.cx-tuile.violet { background: #F2EEFE } .cx-tuile.violet .cx-tic { background: #8B5CF6 } .cx-tuile.violet b { color: #3B2A7A }
.cx-tuile.attendu { background: #F3FBF6; border: 2px solid var(--cx-vert) } .cx-tuile.attendu .cx-tic { background: #15803D } .cx-tuile.attendu b { color: #15803D; font-size: 30px }
/* Boutons d'action en couleur */
.cx-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px }
.cx-actions .btn { padding: 15px 10px; font-size: 15.5px; border-radius: 12px; border: 0; white-space: nowrap; gap: 10px }
.btn.cx-b-vert { background: var(--cx-vert-f); color: #FFFFFF } .btn.cx-b-vert:hover { background: #17834A }
.btn.cx-b-rouge { background: #FDECEC; color: var(--cx-rouge) }
.btn.cx-b-violet { background: #F1EAFE; color: #6D28D9 }
.btn.cx-b-bleu { background: #E8F0FE; color: #1D4ED8; border: 0 }
.btn.cx-b-blanc { background: #FFFFFF; color: var(--ink); border: 1.5px solid var(--line) !important }
.cx-points { letter-spacing: 1px; font-size: 14px }
.cx-actions .btn .ic { color: inherit !important }
/* Tableau des mouvements */
.cx-mvts-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px }
.cx-outils { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }
.cx-outils .btn { padding: 9px 14px; font-size: 14px; border-radius: 10px }
.cx-recherche { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--surface); min-width: 280px }
.cx-recherche input { border: 0; background: none; padding: 9px 0; outline: none; width: 100% }
.cx-filtre { position: relative } .cx-filtre select { border: 0; background: none; color: inherit; font: inherit; padding: 0; cursor: pointer; appearance: none }
.cx-table thead th { background: #F5F8FD }
.cx-table td .ic { vertical-align: -4px }
.cx-type, .cx-mode { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap }
.cx-type.vert, .cx-desc.vert { color: #15803D } .cx-type.rouge, .cx-desc.rouge { color: var(--cx-rouge) } .cx-type.violet, .cx-desc.violet { color: #6D28D9 }
.cx-type.bleu, .cx-desc.bleu { color: #1D4ED8 } .cx-type.orange, .cx-desc.orange { color: #C2410C } .cx-type.gris, .cx-desc.gris { color: var(--muted) }
.cx-mode .ic { color: #15803D }
.cx-table td.fort { font-weight: 800 }
.cx-table tfoot td { background: #EEF4FF; font-size: 16px; padding-top: 14px; padding-bottom: 14px }
.icon-btn.small { width: 34px; height: 28px; border-radius: 8px; font-size: 12px; letter-spacing: 1px }
/* Tablette et téléphone */
@media (max-width: 1400px) { .cx-tuile { grid-template-columns: 40px 1fr } .cx-tic { width: 40px; height: 40px } .cx-tv b { font-size: 23px } .cx-tuile.attendu b { font-size: 26px } }
@media (max-width: 1200px) { .cx-tuiles { grid-template-columns: repeat(3, minmax(0, 1fr)) } .cx-actions { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
@media (max-width: 800px) { .cx-haut { grid-template-columns: 1fr } .cx-tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)) } .cx-tuile.attendu { grid-column: 1 / -1 }
  .cx-actions { grid-template-columns: 1fr 1fr } .cx-recherche { min-width: 0; flex: 1 1 100% } .cx-cloturer { width: 100%; justify-content: center } }
@media (max-width: 800px) { .cx-actions .btn { white-space: normal; text-align: left; justify-content: flex-start; padding: 13px 12px }
  .cx-table th:nth-child(5), .cx-table td:nth-child(5), .cx-table th:nth-child(8), .cx-table td:nth-child(8) { display: none } }
@media (max-width: 480px) { .cx-tuiles { grid-template-columns: 1fr } .cx-tuile { grid-template-columns: 40px 1fr auto; align-items: center } .cx-tv { grid-column: 3; justify-items: end; padding-top: 0; text-align: right } }
@media (max-width: 420px) { .cx-tv b { font-size: 22px } .cx-tuile { padding: 12px } .cx-actions .btn { font-size: 14.5px } }

/* =====================================================================
   VENTES — présentation de la maquette du 25/10/2026
   ===================================================================== */
.vt .card { border-radius: 16px }
.vt-tete { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap }
.vt-tete h2 { font-size: 28px; font-weight: 800; margin: 0 }
.vt-periodes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center }
.vt-per { border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 16px; font: 600 14.5px var(--font); cursor: pointer; color: var(--ink) }
.vt-per.on { background: var(--primary); border-color: var(--primary); color: #FFFFFF }
.vt-date { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 0 12px; height: 44px }
.vt-date input { border: 0; background: none; font: 600 15px var(--font); padding: 0; outline: none }
.vt-perso { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap }
.vt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px }
.vt-kpi { display: flex; gap: 18px; align-items: flex-start; padding: 22px }
.vt-kic { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; flex: none }
.vt-kic.vert { background: #E3F6EA; color: #16A34A } .vt-kic.bleu { background: #E3ECFF; color: #2563EB } .vt-kic.orange { background: #FFEDDC; color: #F97316 } .vt-kic.violet { background: #EDE7FE; color: #7C3AED }
.vt-kv { display: grid; gap: 6px; min-width: 0 } .vt-kv small { color: var(--muted); font-size: 15px } .vt-kv strong { font-size: 30px; font-weight: 800; white-space: nowrap; letter-spacing: -.01em }
.vt-comp { display: grid; gap: 4px; justify-items: start } .vt-comp em { font-style: normal; font-size: 13px; color: var(--muted) }
.vt-evol { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px }
.vt-evol.haut { color: #15803D; background: #DCF5E5 } .vt-evol.bas { color: #DC2626; background: #FDECEC } .vt-evol.neutre { color: var(--muted); background: #EEF2F8 }
.vt-grille { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px }
.vt-carte { display: grid; gap: 12px; align-content: start; min-width: 0 }
.vt-carte-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap }
.vt-carte-h h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; margin: 0 } .vt-carte-h h3 .ic { color: var(--primary) }
.vt-leg { display: flex; gap: 18px; font-size: 14px; color: var(--muted) } .vt-leg i, .vt-tip i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; margin-right: 8px; vertical-align: middle }
.vt-leg i.b, .vt-tip i.b { background: #2563EB } .vt-leg i.v, .vt-tip i.v { background: #16A34A }
.vt-tip i { width: 9px; height: 9px; border-radius: 50% }
.vt-svg { position: relative } .vt-svg svg { width: 100%; height: auto; display: block; overflow: visible }
.vt-grid { stroke: #E7ECF3 } .vt-ax { font-size: 12.5px; fill: var(--muted) }
.vt-tip { position: absolute; z-index: 2; background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 23, 42, .12); padding: 10px 14px; display: grid; gap: 4px; font-size: 14px; pointer-events: none; min-width: 140px }
.vt-anneau { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center }
.vt-donut { width: 200px; height: 200px; flex: none } .vt-dt { font-size: 21px; font-weight: 800; fill: var(--ink) } .vt-ds { font-size: 13px; fill: var(--muted) }
.vt-modes { display: grid; gap: 14px; flex: 1; min-width: 200px }
.vt-modes div { display: grid; grid-template-columns: 16px 1fr auto auto; gap: 10px; align-items: center; font-size: 14.5px }
.vt-modes i { width: 14px; height: 14px; border-radius: 3px } .vt-modes em { font-style: normal; color: var(--muted); font-size: 13px }
.btn.vt-lien { background: #E8F0FE; color: #1D4ED8; border: 0; padding: 8px 14px; font-size: 14px; border-radius: 10px }
.vt-table thead th { background: #F5F8FD }
.vt-mode { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap } .vt-mode .ic { color: var(--m, #16A34A) }
.vt-trophee { font-size: 20px }
.vt-top { display: grid }
.vt-top-l { display: grid; grid-template-columns: 30px 48px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line) }
.vt-top-l:last-child { border-bottom: 0 }
.vt-rang { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #FFFFFF; background: #2563EB }
.vt-rang.r3 { background: #F97316 } .vt-rang.r4 { background: #E2E8F0; color: var(--ink) }
.vt-ph { width: 48px; height: 48px; border-radius: 10px; background: #F1F5FB; display: grid; place-items: center; overflow: hidden; color: #94A3B8 } .vt-ph img { width: 100%; height: 100%; object-fit: cover }
.vt-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
@media (max-width: 1100px) { .vt-grille { grid-template-columns: 1fr } }
@media (max-width: 600px) { .vt-tete h2 { font-size: 24px } .vt-periodes { width: 100% } .vt-per { flex: 1 1 calc(50% - 8px); padding: 10px 6px; font-size: 13.5px } .vt-date { flex: 1 1 100% }
  .vt-kpis { grid-template-columns: 1fr 1fr; gap: 10px } .vt-kpi { flex-direction: column; gap: 10px; padding: 14px } .vt-kic { width: 48px; height: 48px } .vt-kv strong { font-size: 21px }
  .vt-table th:nth-child(2), .vt-table td:nth-child(2), .vt-table th:nth-child(4), .vt-table td:nth-child(4), .vt-table th:nth-child(6), .vt-table td:nth-child(6), .vt-table th:nth-child(8), .vt-table td:nth-child(8), .vt-table th:nth-child(9), .vt-table td:nth-child(9) { display: none }
  .vt-top-l { grid-template-columns: 28px 40px minmax(0, 1fr) auto; } .vt-top-l .hint { display: none } .vt-donut { width: 170px; height: 170px } }
.vt-table th, .vt-table td { white-space: nowrap; padding-left: 8px; padding-right: 8px }
.vt-donut { width: 180px; height: 180px } .vt-modes { min-width: 180px }

/* =====================================================================
   MON STOCK — présentation de la maquette du 25/10/2026
   ===================================================================== */
.sk .card { border-radius: 16px }
.sk-tete { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap }
.sk-titre { display: flex; align-items: center; gap: 16px; flex: 1 1 320px; min-width: 0 } .sk-titre h2 { font-size: 34px; font-weight: 800; margin: 0; letter-spacing: -.01em }
.sk-cube { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; color: #FFFFFF; background: linear-gradient(135deg, #3B82F6, #1D4ED8) }
.sk-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }
.sk-actions .btn { padding: 12px 18px; border-radius: 12px }
.sk-pastille { display: inline-flex; align-items: center; gap: 8px; border-radius: 12px; padding: 11px 16px; font-weight: 700 }
.sk-pastille.vert { background: #DCF5E5; color: #15803D } .sk-pastille.orange { background: #FFEDD5; color: #C2410C }
.sk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px }
.sk-kpi { display: flex; gap: 18px; align-items: center; padding: 20px; border: 1.5px solid transparent }
.sk-kpi small { display: block; font-size: 16px; color: var(--ink) } .sk-kpi strong { display: block; font-size: 32px; font-weight: 800; margin: 2px 0 } .sk-kpi em { font-style: normal; color: var(--muted); font-size: 14.5px }
.sk-kic { width: 70px; height: 70px; border-radius: 18px; display: grid; place-items: center; flex: none; color: #FFFFFF }
.sk-kpi.bleu { background: #F2F6FF; border-color: #DCE7FF } .sk-kpi.bleu .sk-kic { background: linear-gradient(135deg, #60A5FA, #2563EB) } .sk-kpi.bleu strong { color: #1E3A8A }
.sk-kpi.vert { background: #EFFAF3; border-color: #D3F0DF } .sk-kpi.vert .sk-kic { background: linear-gradient(135deg, #4ADE80, #16A34A) } .sk-kpi.vert strong { color: #14532D }
.sk-kpi.orange { background: #FFF6EC; border-color: #FDE3C8 } .sk-kpi.orange .sk-kic { background: linear-gradient(135deg, #FDBA74, #F97316) } .sk-kpi.orange strong { color: #7C2D12 }
.sk-kpi.rouge { background: #FFF1F1; border-color: #FDD5D5 } .sk-kpi.rouge .sk-kic { background: linear-gradient(135deg, #F87171, #DC2626) } .sk-kpi.rouge small { color: #DC2626; font-weight: 600 } .sk-kpi.rouge strong { color: #7F1D1D }
.sk-liste { display: grid; gap: 12px; padding: 0; overflow: hidden }
.sk-filtres { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 16px 16px 0 }
.sk-recherche { flex: 1 1 340px; display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 14px; background: var(--surface) }
.sk-recherche input { border: 0; background: none; outline: none; padding: 12px 0; width: 100%; font-size: 15.5px }
.sk-etats { display: flex; gap: 8px; flex-wrap: wrap }
.sk-etat { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 16px; font: 600 14.5px var(--font); cursor: pointer; color: var(--ink) }
.sk-etat.on { background: var(--primary); border-color: var(--primary); color: #FFFFFF }
.sk-point { width: 12px; height: 12px; border-radius: 50%; display: inline-block } .sk-point.vert { background: #16A34A } .sk-point.orange { background: #F97316 } .sk-point.rouge { background: #DC2626 }
.sk-liste #skCats { padding: 0 16px } .sk-liste #skCats:empty { display: none }
.sk-liste .table-box { border: 0; border-top: 1px solid var(--line); border-radius: 0 }
.sk-liste > .hint { padding: 0 16px 14px }
.sk-table thead th { background: #F5F8FD; text-transform: none; font-size: 14px; color: var(--ink); letter-spacing: 0 }
.sk-table td { vertical-align: middle; padding-top: 12px; padding-bottom: 12px }
.sk-photo { width: 58px; height: 58px; border-radius: 10px; background: #F6F1E7; display: grid; place-items: center; overflow: hidden; color: #B08A4F } .sk-photo img { width: 100%; height: 100%; object-fit: cover }
.sk-nom { display: block; font-size: 16px } .sk-table small { display: block }
.sk-cat { background: #FDECCF; color: #8A4B08; border-radius: 8px; padding: 5px 12px; font-weight: 600; font-size: 14px; white-space: nowrap }
.sk-qte { display: grid; gap: 8px; min-width: 150px } .sk-qte span { font-size: 16px }
.sk-barre { height: 8px; border-radius: 4px; background: #E7ECF3; overflow: hidden } .sk-barre i { display: block; height: 100%; border-radius: 4px }
.sk-barre.vert i { background: #16A34A } .sk-barre.orange i { background: #F97316 } .sk-barre.rouge i { background: #DC2626 }
.sk-pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; padding: 6px 12px; font-weight: 700; font-size: 14px; white-space: nowrap }
.sk-pill i { width: 10px; height: 10px; border-radius: 50% }
.sk-pill.vert { background: #DCF5E5; color: #15803D } .sk-pill.vert i { background: #16A34A }
.sk-pill.orange { background: #FFEDD5; color: #C2410C } .sk-pill.orange i { background: #F97316 }
.sk-pill.rouge { background: #FDECEC; color: #B91C1C } .sk-pill.rouge i { background: #DC2626 }
.sk-bas { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px }
.sk-surv { background: #FFF8EF; border: 1.5px solid #FDE3C8; display: grid; gap: 14px }
.sk-surv-h { display: flex; align-items: flex-start; gap: 12px } .sk-surv-h > div { flex: 1 }
.sk-surv-h h3 { color: #EA580C; font-size: 22px; font-weight: 800; margin: 0 } .sk-attention { font-size: 30px; color: #F97316; line-height: 1 }
.btn.sk-voir { background: #FFE2C2; color: #C2410C; border: 0 }
.sk-cases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px }
.sk-case { background: #FFFFFF; border: 1px solid #F1E3D3; border-radius: 12px; padding: 14px 10px; display: grid; justify-items: center; text-align: center; gap: 6px; align-content: start }
.sk-case strong { font-size: 15px } .sk-case b { font-size: 26px; font-weight: 800 } .sk-case small { color: var(--muted); font-size: 13px }
.sk-case .link { color: #1D4ED8; font-weight: 600; display: inline-flex; align-items: center; gap: 4px }
.sk-pub { border-radius: 16px; background: linear-gradient(135deg, #DBEAFE 0%, #EFF6FF 55%, #BFDBFE 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 10px; padding: 18px; overflow: hidden }
.sk-pub-ill svg { width: 100%; height: auto; display: block }
.sk-pub-t h3 { color: #1D4ED8; font-size: 26px; font-weight: 800; line-height: 1.15; margin: 0 0 8px } .sk-pub-t p { margin: 0 0 14px; font-size: 15.5px }
@media (max-width: 1100px) { .sk-bas { grid-template-columns: 1fr } }
@media (max-width: 700px) { .sk-titre h2 { font-size: 26px } .sk-cube { width: 52px; height: 52px } .sk-actions { width: 100% } .sk-actions .btn { flex: 1 1 calc(50% - 10px); justify-content: center; padding: 11px 8px; font-size: 14px }
  .sk-kpis { grid-template-columns: 1fr 1fr; gap: 10px } .sk-kpi { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px } .sk-kic { width: 50px; height: 50px } .sk-kpi strong { font-size: 24px }
  .sk-cases { grid-template-columns: 1fr 1fr } .sk-etat { flex: 1 1 calc(50% - 8px); justify-content: center }
  .sk-table th:nth-child(1), .sk-table td:nth-child(1), .sk-table th:nth-child(3), .sk-table td:nth-child(3), .sk-table th:nth-child(5), .sk-table td:nth-child(5), .sk-table th:nth-child(6), .sk-table td:nth-child(6), .sk-table th:nth-child(7), .sk-table td:nth-child(7), .sk-table th:nth-child(9), .sk-table td:nth-child(9) { display: none }
  .sk-qte { min-width: 86px } .sk-pub { grid-template-columns: 1fr } .sk-table [data-reappro] { display: none } .sk-pill { padding: 5px 8px; font-size: 12.5px } .sk-nom { font-size: 14px } }

/* =====================================================================
   MES CLIENTS — présentation de la maquette du 25/10/2026
   ===================================================================== */
.cl .card { border-radius: 16px }
.cl-tete { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap }
.cl-tete h2 { font-size: 32px; font-weight: 800; margin: 0 } .cl-tete .hint { font-size: 16px }
.cl-boutons { display: flex; gap: 10px; flex-wrap: wrap } .cl-boutons .btn { padding: 12px 22px; border-radius: 12px; font-size: 16px }
.btn.cl-b-blanc { color: #1D4ED8 } .btn.cl-b-blanc .ic { color: #1D4ED8 }
.cl-page { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start }
.cl-haut { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.25fr); gap: 14px }
.cl-kpi { display: flex; gap: 16px; align-items: flex-start; padding: 20px }
.cl-kpi small { display: block; font-size: 15.5px } .cl-kpi strong { display: block; font-size: 32px; font-weight: 800; margin: 4px 0 } .cl-kpi em { display: block; font-style: normal; color: var(--muted) }
.cl-kic { width: 66px; height: 66px; border-radius: 16px; display: grid; place-items: center; flex: none }
.cl-kpi.bleu { background: #F2F6FF } .cl-kpi.bleu .cl-kic { background: #DBE7FF; color: #2563EB }
.cl-kpi.orange { background: #FFF6EC } .cl-kpi.orange .cl-kic { background: #FFE2C2; color: #EA580C }
.cl-doivent { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--muted); font-size: 14px } .cl-doivent .ic, .cl-doivent b { color: #EA580C }
.cl-suivi { display: grid; gap: 12px } .cl-suivi h3, .cl-rapides h3, .cl-top h3, .cl-rappel h3 { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; margin: 0 }
.cl-suivi h3 .ic, .cl-rapides h3 .ic, .cl-top h3 .ic { color: var(--primary) }
.cl-suivi-c { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px }
.cl-etatc { border: 0; border-radius: 12px; padding: 10px 8px; display: grid; justify-items: start; gap: 2px; cursor: pointer; font: inherit; text-align: left }
.cl-etatc b { font-size: 13px } .cl-etatc strong { font-size: 22px; font-weight: 800 } .cl-etatc small { color: var(--muted) } .cl-etatc em { font-style: normal; font-weight: 700; font-size: 14px }
.cl-eic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #FFFFFF }
.cl-etatc.vert { background: #ECFAF1 } .cl-etatc.vert .cl-eic { background: #16A34A } .cl-etatc.vert b, .cl-etatc.vert em { color: #15803D }
.cl-etatc.orange { background: #FFF4E8 } .cl-etatc.orange .cl-eic { background: #F97316 } .cl-etatc.orange b, .cl-etatc.orange em { color: #C2410C }
.cl-etatc.rouge { background: #FFF0F0 } .cl-etatc.rouge .cl-eic { background: #DC2626 } .cl-etatc.rouge b, .cl-etatc.rouge em { color: #B91C1C }
.cl-liste { display: grid; gap: 12px; padding: 0; overflow: hidden }
.cl-outils { display: flex; gap: 12px; flex-wrap: wrap; padding: 16px 16px 0; align-items: center }
.cl-recherche { flex: 1 1 320px; display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 14px } .cl-recherche input { border: 0; background: none; outline: none; padding: 12px 0; width: 100% }
.cl-tri { display: flex; align-items: center; gap: 10px } .cl-tri span { color: var(--muted); font-size: 14px } .cl-tri select { width: auto }
.cl-filtres { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px }
.cl-f { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 14px; font: 600 14px var(--font); cursor: pointer; color: var(--ink) }
.cl-f.on { background: var(--primary); border-color: var(--primary); color: #FFFFFF }
.cl-pt { width: 12px; height: 12px; border-radius: 50% } .cl-pt.bleu { background: #2563EB } .cl-pt.orange { background: #F97316 } .cl-pt.rouge { background: #DC2626 } .cl-pt.vert { background: #16A34A }
.cl-f.on .cl-pt { box-shadow: 0 0 0 2px #FFFFFF }
.cl-liste .table-box { border: 0; border-top: 1px solid var(--line); border-radius: 0 }
.cl-table td { vertical-align: middle } .cl-table td small { display: block } .cl-table th { white-space: nowrap }
.cl-qui { display: flex; align-items: center; gap: 12px } .cl-qui strong { display: block; white-space: nowrap }
.cl-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none }
.cl-orange { color: #EA580C }
.cl-etat { display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; padding: 6px 12px; font-weight: 700; font-size: 13.5px; white-space: nowrap }
.cl-etat.vert { background: #DCF5E5; color: #15803D } .cl-etat.orange { background: #FFEDD5; color: #C2410C } .cl-etat.rouge { background: #FDECEC; color: #B91C1C }
.cl-pied { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 16px 16px }
.cl-pages { display: flex; gap: 6px }
.cl-pg { min-width: 38px; height: 38px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; font: 600 14px var(--font); cursor: pointer }
.cl-pg.on { background: var(--primary); border-color: var(--primary); color: #FFFFFF } .cl-pg:disabled { opacity: .4; cursor: default }
.cl-pp { display: flex; align-items: center; gap: 8px } .cl-pp select { width: auto }
.cl-rapides { display: grid; gap: 10px }
.cl-rap { display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 13px 14px; font: 600 15px var(--font); cursor: pointer; border: 1.5px solid var(--line); background: var(--surface); text-align: left }
.cl-rap.bleu { color: #1D4ED8 } .cl-rap.bleu .ic { color: #2563EB } .cl-rap.vert { color: var(--ink) } .cl-rap.vert .ic { color: #16A34A }
.cl-rap.rouge { background: #FDECEC; border-color: #FDD5D5; color: #B91C1C } .cl-rap.rouge .ic { color: #DC2626 }
.cl-rap:first-of-type { background: #EEF4FF; border-color: #DCE7FF }
.cl-top { display: grid; gap: 8px } .cl-top-l { display: grid }
.cl-top-r { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 10px 0; font: inherit; text-align: left; cursor: pointer }
.cl-top-r:last-child { border-bottom: 0 } .cl-top-r .r { text-align: right } .cl-top-r small { display: block }
.btn.cl-voir { background: #EEF4FF; color: #1D4ED8; border: 0; justify-content: center }
.cl-rappel { display: grid; gap: 8px } .cl-rappel h3 span { font-size: 20px } .cl-rappel p { margin: 0 }
@media (max-width: 1300px) { .cl-page { grid-template-columns: 1fr } .cl-droite { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px } }
@media (max-width: 1000px) { .cl-haut { grid-template-columns: 1fr 1fr } .cl-suivi { grid-column: 1 / -1 } }
@media (max-width: 600px) { .cl-tete h2 { font-size: 26px } .cl-boutons { width: 100% } .cl-boutons .btn { flex: 1; justify-content: center; padding: 11px 8px; font-size: 15px }
  .cl-haut { grid-template-columns: 1fr } .cl-kpi { padding: 14px } .cl-kic { width: 52px; height: 52px } .cl-kpi strong { font-size: 26px }
  .cl-tri { width: 100% } .cl-tri select { flex: 1 } .cl-f { flex: 1 1 calc(50% - 8px); justify-content: center; padding: 9px 6px; font-size: 13px }
  .cl-table th:nth-child(2), .cl-table td:nth-child(2), .cl-table th:nth-child(3), .cl-table td:nth-child(3), .cl-table th:nth-child(4), .cl-table td:nth-child(4), .cl-table th:nth-child(6), .cl-table td:nth-child(6), .cl-table th:nth-child(8), .cl-table td:nth-child(8) { display: none }
  .cl-av { width: 36px; height: 36px; font-size: 13px } .cl-pied { justify-content: center } .cl-pp { display: none } }
.cl-table td, .cl-table td small { white-space: nowrap } .cl-table { font-size: 14.5px } .cl-table td, .cl-table th { padding-left: 8px; padding-right: 8px }
@media (max-width: 1600px) { .cl-table th:nth-child(8), .cl-table td:nth-child(8) { display: none } }
@media (max-width: 600px) { .cl-etat-t { display: none } .cl-etat { padding: 6px } }

/* ===== Mon argent (maquette du 25/10/2026) ===== */
.ma { gap: 14px }
.ma-tete { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between }
.ma-titre { display: flex; gap: 12px; align-items: center }
.ma-titre h2 { margin: 0; font-size: 24px }
.ma-logo { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: #DBEAFE; color: #2563EB; flex: none }
.ma-filtres { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.ma-per { display: flex; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap }
.ma-per button { border: 0; background: none; padding: 9px 14px; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; font-size: 14.5px }
.ma-per button.on { background: var(--primary); color: #fff }
.ma-date { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 4px 10px; background: var(--card, #fff); color: #2563EB }
.ma-date input { border: 0; background: none; font: inherit; padding: 5px 0; color: var(--text, #111); min-width: 0 }
.ma-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 14px; align-items: start }
.ma-bloc { display: grid; gap: 6px; min-width: 0 }
.ma-bh { display: flex; gap: 10px; align-items: flex-start }
.ma-bh h3 { margin: 0; font-size: 18px }
.ma-bh > div:not(.ma-leg) { flex: 1; min-width: 0 }
.ma-bi { color: #2563EB; flex: none; margin-top: 2px }
.ma-leg { display: flex; gap: 14px; font-size: 13.5px; color: var(--muted); align-items: center; flex-wrap: wrap }
.ma-leg i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px }
.ma-leg i.b { background: #2563EB } .ma-leg i.v { background: #16A34A }
.ma-liste { display: grid }
.ma-l { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 22px; gap: 12px; align-items: center; padding: 12px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; width: 100%; cursor: pointer }
div.ma-l { grid-template-columns: 52px minmax(0, 1fr) auto; cursor: default }
.ma-l:last-child { border-bottom: 0 }
button.ma-l:hover { background: rgba(37, 99, 235, .04) }
.ma-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center }
.ma-ic.bleu { background: #DBEAFE; color: #2563EB } .ma-ic.vert { background: #DCFCE7; color: #16A34A }
.ma-ic.orange { background: #FFEDD5; color: #EA580C } .ma-ic.rouge { background: #FEE2E2; color: #DC2626 }
.ma-ic.violet { background: #EDE9FE; color: #7C3AED } .ma-ic.ambre { background: #FEF3C7; color: #B45309 }
.ma-t { display: grid; gap: 1px; min-width: 0 }
.ma-t strong { font-size: 16px } .ma-t small { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere }
.ma-v { display: grid; justify-items: end; text-align: right; gap: 1px }
.ma-v strong { font-size: 19px; white-space: nowrap } .ma-v span { color: var(--muted); font-size: 13px; white-space: nowrap }
.ma-v .pos { color: #16A34A } .ma-v .neg { color: #DC2626 }
.ma-fl { color: #94A3B8; display: grid; place-items: center }
.ma-situation { gap: 8px }
.ma-situation .ma-l { border: 0; border-radius: 14px }
.ma-l.teinte.vert { background: #F0FDF4 } .ma-l.teinte.orange { background: #FFF7ED } .ma-l.teinte.rouge { background: #FEF2F2 }
.ma-l.teinte.bleu { background: #EFF6FF } .ma-l.teinte.violet { background: #F5F3FF }
.ma-l.teinte.violet .ma-t strong, .ma-l.teinte.violet .ma-v strong { color: #6D28D9 }
.ma-l.ma-fort .ma-v strong { font-size: 21px }
.ma-l.ar-alerte .ma-t small:last-child { color: #DC2626; font-weight: 600 }
.ma-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 6px }
.ma-act { display: flex; gap: 12px; align-items: center; border: 1.5px solid #BFDBFE; border-radius: 14px; background: none; padding: 12px 14px; text-align: left; font: inherit; cursor: pointer; color: #2563EB }
.ma-act:hover { background: #EFF6FF }
.ma-act span { display: grid; gap: 2px } .ma-act strong { color: var(--text, #111) } .ma-act small { color: var(--muted) }
.ma-graph { width: 100%; height: auto; display: block }
.ma-grid { stroke: var(--line, #E5E7EB); stroke-width: 1 }
.ma-ax, .ma-val, .ma-mois { font-size: 12px; fill: #64748B } .ma-val { fill: #334155; font-weight: 600 } .ma-val.neg { fill: #DC2626 } .ma-mois { font-size: 13px; fill: #334155 }
.ma-info { display: flex; gap: 8px; align-items: center; background: #EFF6FF; color: #1E3A8A; border-radius: 12px; padding: 10px 14px; margin: 6px 0 0; font-size: 14px }
.ma-info svg { color: #2563EB; flex: none }
@media (max-width: 600px) {
  .ma-l { grid-template-columns: 44px minmax(0, 1fr) auto 16px; gap: 9px; padding: 10px 4px }
  div.ma-l { grid-template-columns: 44px minmax(0, 1fr) auto }
  .ma-ic { width: 44px; height: 44px } .ma-ic svg { width: 22px; height: 22px }
  .ma-v strong { font-size: 16px } .ma-t strong { font-size: 15px }
  .ma-per { width: 100% } .ma-per button { flex: 1; padding: 9px 6px; font-size: 13.5px }
  .ma-bh { flex-wrap: wrap } .ma-leg { width: 100%; padding-left: 34px }
}

/* ===== Rapports (maquette du 25/10/2026) ===== */
.rx { display: grid; gap: 14px; min-width: 0 }
.rx-tete h2 { margin: 0; font-size: 28px } .rx-tete .hint { font-size: 15px }
.rx-barre { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between }
.rx-per { display: flex; flex-wrap: wrap; gap: 8px }
.rx-per button { border: 1px solid var(--line); background: var(--card, #fff); border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; color: var(--text, #111) }
.rx-per button.on { background: var(--primary); border-color: var(--primary); color: #fff }
.rx-choisir { display: inline-flex; gap: 8px; align-items: center } .rx-choisir svg { color: #2563EB } .rx-choisir.on svg { color: #fff }
.rx-v { font-size: 12px; opacity: .7 }
.rx-droite { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.rx-droite select { width: auto; min-width: 170px }
.rx-droite .btn { display: inline-flex; gap: 8px; align-items: center }
.rx-dates { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end }
.rx-corps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start }
@media (min-width: 1500px) { .rx-corps { grid-template-columns: minmax(0, 1fr) 300px } }
.rx-principal { display: grid; gap: 14px; min-width: 0 }
.rx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); gap: 12px }
.rx-kpi { display: grid; gap: 10px; padding: 14px; min-width: 0 }
.rx-kh { display: flex; gap: 12px; align-items: center }
.rx-kh > span:last-child { display: grid; min-width: 0 }
.rx-kh small { font-size: 15px; font-weight: 600; color: var(--text, #111) }
.rx-kh strong { font-size: 23px; white-space: nowrap } .rx-kh em { font-style: normal; color: var(--muted); font-size: 14.5px }
.rx-ki { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; flex: none }
.rx-ki.bleu { background: #DBEAFE; color: #2563EB } .rx-ki.vert { background: #DCFCE7; color: #16A34A } .rx-ki.rouge { background: #FEE2E2; color: #DC2626 }
.rx-kb { display: flex; gap: 6px 8px; align-items: center; flex-wrap: wrap; font-size: 13.5px }
.rx-cmp { border-radius: 8px; padding: 3px 9px; font-weight: 700; font-size: 14px }
.rx-cmp.rx-ok { background: #DCFCE7; color: #15803D } .rx-cmp.rx-ko { background: #FEE2E2; color: #DC2626 } .rx-cmp.rx-eq { background: #F1F5F9; color: #475569 }
.rx-graphes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px }
.rx-carte { display: grid; gap: 8px; min-width: 0 }
.rx-ch { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between }
.rx-ch h3 { margin: 0; font-size: 17px; display: flex; gap: 8px; align-items: center } .rx-ch h3 svg { color: var(--primary) }
.rx-pastille { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); display: grid; place-items: center } .rx-ch .rx-pastille svg { color: #fff }
.rx-leg { display: flex; gap: 16px; font-size: 14px }
.rx-leg i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px }
.rx-leg i.b { background: #2563EB } .rx-leg i.v { background: #16A34A }
.rx-info { display: flex; gap: 8px; align-items: center; background: #EFF6FF; color: #334155; border-radius: 10px; padding: 8px 12px; margin: 0; font-size: 13.5px } .rx-info svg { color: #2563EB; flex: none }
.rx-anneau { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: center }
.rx-donut { position: relative; width: 180px; height: 180px; flex: none }
.rx-donut svg { width: 100%; height: 100% }
.rx-donut > span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center }
.rx-donut strong { font-size: 20px } .rx-donut small { color: var(--muted); font-size: 12.5px }
.rx-cats { display: grid; gap: 10px; flex: 1; min-width: 210px }
.rx-cats div { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; font-size: 14.5px }
.rx-cats i { width: 12px; height: 12px; border-radius: 50% } .rx-cats .num { color: var(--muted); text-align: right; min-width: 42px } .rx-cats strong { text-align: right; min-width: 70px }
.rx-detail { display: grid; gap: 10px; min-width: 0 }
.rx-onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto }
.rx-onglets button { border: 0; background: none; padding: 10px 14px; font: inherit; font-weight: 500; cursor: pointer; color: var(--text, #111); border-bottom: 3px solid transparent; white-space: nowrap }
.rx-onglets button.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700 }
.rx-dh { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between }
.rx-dt { display: flex; gap: 12px; align-items: center } .rx-dt h3 { margin: 0; font-size: 18px } .rx-ti { color: #2563EB }
.rx-outils { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; justify-content: flex-end; min-width: min(100%, 300px) }
.rx-rech { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; flex: 1; max-width: 380px; min-width: 180px; color: var(--muted) }
.rx-rech input { border: 0; background: none; padding: 10px 0; font: inherit; flex: 1; min-width: 0; outline: none }
.rx-filtre { display: flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px }
.rx-filtre select { border: 0; background: none; padding: 9px 0; font: inherit; font-weight: 600; width: auto }
.rx-table th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .02em; color: #475569; white-space: nowrap }
.rx-table { font-size: 14.5px } .rx-table td, .rx-table th { padding-left: 8px; padding-right: 8px } .rx-table td { vertical-align: middle; white-space: nowrap } .rx-table td:has(.rx-prod) { white-space: normal }
/* Cadres étroits : on serre (la taille du cadre décide, pas celle de l'écran) */
.rx-kpi, .rx-detail { container-type: inline-size }
@container (max-width: 940px) { .rx-t-ventes th:nth-child(3), .rx-t-ventes td:nth-child(3), .rx-table th:first-child, .rx-table td:first-child { display: none } .rx-prod { max-width: 150px } }
@container (max-width: 235px) {
  /* Chiffres clés serrés : icône et titre sur une ligne, montant dessous */
  .rx-kh { display: grid; grid-template-columns: 44px 1fr; gap: 8px 10px } .rx-kh > span:last-child { display: contents }
  .rx-ki { width: 44px; height: 44px } .rx-ki svg { width: 24px; height: 24px }
  .rx-kh small { align-self: center; line-height: 1.2 } .rx-kh strong, .rx-kh em { grid-column: 1 / -1 } }
.rx-prod { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle }
.rx-mode { display: inline-flex; gap: 5px; align-items: center; border-radius: 7px; padding: 3px 8px; font-size: 13.5px; white-space: nowrap }
.rx-mode.vert, .rx-etat.vert { background: #DCFCE7; color: #15803D } .rx-mode.bleu, .rx-etat.bleu { background: #DBEAFE; color: #1D4ED8 }
.rx-mode.orange, .rx-etat.orange { background: #FFEDD5; color: #C2410C } .rx-mode.violet, .rx-etat.violet { background: #EDE9FE; color: #6D28D9 }
.rx-mode.gris { background: #F1F5F9; color: #475569 } .rx-etat.rouge { background: #FEE2E2; color: #B91C1C }
.rx-etat { display: inline-block; border-radius: 7px; padding: 3px 10px; font-size: 13.5px; font-weight: 600; white-space: nowrap }
.rx-pied { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between }
.rx-pages { display: flex; gap: 6px }
.rx-pages button { min-width: 38px; height: 38px; border: 1px solid var(--line); background: var(--card, #fff); border-radius: 8px; font: inherit; cursor: pointer }
.rx-pages button.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700 } .rx-pages button:disabled { opacity: .4; cursor: default }
.rx-pp { display: flex; gap: 8px; align-items: center } .rx-pp select { width: auto }
.rx-cote { display: grid; gap: 14px; min-width: 0 }
.rx-menu { display: grid; gap: 2px; padding: 12px }
.rx-menu h4 { margin: 8px 6px 4px; font-size: 14.5px } .rx-menu h4:first-child { margin-top: 0 }
.rx-menu button, .rx-rapides button { display: flex; gap: 10px; align-items: center; border: 0; background: none; padding: 8px 6px; border-radius: 8px; font: inherit; text-align: left; cursor: pointer; color: var(--text, #111); width: 100% }
.rx-menu button:hover, .rx-rapides button:hover { background: #F1F5F9 }
.rx-fl { margin-left: auto; color: #64748B; font-size: 20px; line-height: 1 }
.rx-mi { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; flex: none; color: #fff }
.rx-mi.vert, .rx-ri.vert { background: #16A34A } .rx-mi.rouge, .rx-ri.rouge { background: #EF4444 } .rx-mi.gris { background: #475569 } .rx-mi.bleu, .rx-ri.bleu { background: #2563EB }
.rx-mi.orange, .rx-ri.orange { background: #F97316 } .rx-mi.violet, .rx-ri.violet { background: #7C3AED } .rx-ri.indigo { background: #4F46E5 }
.rx-csv { display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px }
.rx-csv button { font-size: 13px; color: #475569; padding: 6px }
.rx-menu.ouvert { box-shadow: 0 0 0 3px #93C5FD }
.rx-rapides { display: grid; gap: 4px; padding: 14px }
.rx-rapides h3 { margin: 0 0 6px; display: flex; gap: 8px; align-items: center; font-size: 18px } .rx-rapides h3 svg { color: var(--primary) }
.rx-rapides button > span:nth-child(2) { display: grid } .rx-rapides small { color: var(--muted); font-size: 13px }
.rx-ri { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #fff }
#rpBox.rp-cache { display: none }
/* Moins de 1500 px : le menu « Exporter / Imprimer » s'ouvre par-dessus, sous le bouton */
@media (max-width: 1499px) {
  .rx-cote { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)) }
  .rx-menu { display: none }
  .rx-menu.ouvert { display: grid; position: fixed; top: 150px; right: 16px; z-index: 60; width: min(340px, calc(100vw - 32px)); max-height: 75vh; overflow: auto; box-shadow: 0 12px 40px rgba(15, 23, 42, .25) }
}
@media (max-width: 600px) {
  .rx-per button { padding: 9px 11px; font-size: 14px } .rx-choisir { flex: 1 1 100% ; justify-content: center }
  .rx-droite { width: 100% } .rx-droite select { flex: 1 1 100% } .rx-droite .btn { flex: 1 }
  .rx-kh strong { font-size: 21px } .rx-ki { width: 50px; height: 50px }
  .rx-table th:nth-child(5), .rx-table td:nth-child(5) { display: none }
  .rx-rech { max-width: none }
}
@media print {
  body.print-rapport #rxTableau { display: none !important }
  body.print-rapport #rpBox.rp-cache { display: grid !important }
}

/* ===== Mes dépenses (maquette du 25/10/2026) ===== */
.dp { display: grid; gap: 14px; min-width: 0 }
.dp-tete { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between }
.dp-titre { display: flex; gap: 14px; align-items: center } .dp-titre h2 { margin: 0; font-size: 28px }
.dp-logo { width: 56px; height: 56px; border-radius: 14px; background: #E11D48; color: #fff; display: grid; place-items: center; flex: none }
.dp-nouv { display: inline-flex; gap: 10px; align-items: center; padding: 12px 26px; font-size: 16px }
.dp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px }
.dp-k { display: flex; gap: 14px; padding: 16px; min-width: 0 }
.dp-k.rouge { background: #FFF5F5 } .dp-k.orange { background: #FFF8F1 } .dp-k.bleu { background: #F5F8FF }
.dp-ki { width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center; flex: none }
.dp-k.rouge .dp-ki { background: #FEE2E2; color: #EF4444 } .dp-k.orange .dp-ki { background: #FFEDD5; color: #F97316 } .dp-k.bleu .dp-ki { background: #DBEAFE; color: #2563EB }
.dp-k > div { display: grid; gap: 2px; flex: 1; min-width: 0 }
.dp-k small { font-size: 15px; font-weight: 600 } .dp-k strong { font-size: 27px } .dp-k em { font-style: normal; color: var(--muted); font-size: 15px }
.dp-kb { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap }
.dp-vs { text-align: right; font-size: 13px }
.dp-k3 { flex-wrap: wrap; gap: 14px }
.dp-k3g { display: flex; gap: 14px; flex: 1 1 170px } .dp-k3g > div { display: grid; gap: 2px }
.dp-k3d { display: grid; gap: 8px; flex: 1 1 190px; border-left: 1px solid var(--line); padding-left: 14px }
.dp-k3d div { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; font-size: 14.5px }
.dp-k3d strong { font-size: 15px; white-space: nowrap } .dp-k3d span:nth-child(2) { line-height: 1.2 }
.dp-mi { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #fff }
.dp-mi.vert { background: #16A34A } .dp-mi.bleu { background: #2563EB } .dp-mi.violet { background: #7C3AED } .dp-mi.gris { background: #64748B }
.dp-filtres { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px }
.dp-filtres select { width: auto; flex: 1 1 150px; min-width: 0 }
.dp-rech { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; flex: 2 1 240px; color: var(--muted) }
.dp-rech input { border: 0; background: none; padding: 10px 0; font: inherit; flex: 1; min-width: 0; outline: none }
.dp-dates { display: flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; color: #2563EB; flex: 1 1 280px }
.dp-dates input { border: 0; background: none; font: inherit; padding: 9px 0; min-width: 0; flex: 1; color: var(--text, #111) }
.dp-filtres .btn { display: inline-flex; gap: 8px; align-items: center }
.dp-corps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start }
@media (min-width: 1400px) { .dp-corps { grid-template-columns: minmax(0, 1fr) 320px } .dp-cote .rx-anneau { flex-direction: column } }
@media (min-width: 1100px) { .dp-kpis { grid-template-columns: 1fr 1fr 1.35fr } }
.dp-liste-carte { display: grid; gap: 10px; min-width: 0; container-type: inline-size }
.dp-lh { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; justify-content: space-between } .dp-lh h3 { margin: 0; font-size: 19px }
.dp-exp { position: relative } .dp-exp .btn { display: inline-flex; gap: 8px; align-items: center; color: #2563EB; font-weight: 600 }
.dp-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, .15); padding: 6px; display: grid; min-width: 220px }
.dp-menu[hidden] { display: none }
.dp-menu button { display: flex; gap: 8px; align-items: center; border: 0; background: none; padding: 9px 10px; border-radius: 8px; font: inherit; cursor: pointer; text-align: left }
.dp-menu button:hover { background: #F1F5F9 }
.dp-table { font-size: 14.5px } .dp-table td, .dp-table th { padding-left: 8px; padding-right: 8px; vertical-align: middle }
.dp-table th { font-size: 12.5px; text-transform: uppercase; color: #475569; white-space: nowrap }
.dp-table td { white-space: nowrap } .dp-table td.dp-motif { white-space: normal; min-width: 130px }
.dp-tri { border: 0; background: none; font: inherit; color: inherit; text-transform: inherit; cursor: pointer; padding: 0; font-weight: 700 }
.dp-total { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; align-items: center; background: #EFF6FF; border-radius: 10px; padding: 12px 14px; font-size: 15px }
.dp-total:empty { display: none } .dp-tv { display: flex; gap: 18px; align-items: baseline } .dp-tv strong { font-size: 17px }
.dp-annulee td { opacity: .6 } .dp-annulee .dp-motif { text-decoration: line-through } .dp-annulee .rx-etat { text-decoration: none; display: inline-block }
.dp-cat { display: inline-flex; gap: 5px; align-items: center; border-radius: 7px; padding: 3px 8px; font-size: 13.5px; max-width: 150px } .dp-cat > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap } .dp-cat svg { flex: none }
.dp-cat.rouge { background: #FEE2E2; color: #DC2626 } .dp-cat.vert { background: #DCFCE7; color: #15803D } .dp-cat.bleu { background: #DBEAFE; color: #1D4ED8 }
.dp-cat.jaune { background: #FEF9C3; color: #A16207 } .dp-cat.violet { background: #EDE9FE; color: #6D28D9 } .dp-cat.gris { background: #F1F5F9; color: #475569 }
.dp-cat.rose { background: #FCE7F3; color: #BE185D } .dp-cat.indigo { background: #E0E7FF; color: #4338CA } .dp-cat.orange { background: #FFEDD5; color: #C2410C } .dp-cat.ambre { background: #FEF3C7; color: #B45309 }
.dp-mc { display: none } .dp-benef { max-width: 160px; overflow: hidden; text-overflow: ellipsis }
@container (max-width: 1000px) { .dp-ml { display: none } .dp-mc { display: inline } .dp-table .rx-mode { padding: 5px 7px } .dp-table { font-size: 14px } .dp-table td, .dp-table th { padding-left: 6px; padding-right: 6px } .dp-cat { max-width: 135px } .dp-table th { white-space: normal } .dp-table thead th:last-child, .dp-table tbody td:last-child:not([colspan]) { display: none } .dp-benef { max-width: 110px } .dp-table td.dp-motif { min-width: 110px } }
@container (max-width: 1100px) { .dp-table th:nth-child(1), .dp-table td:nth-child(1), .dp-table th:nth-child(9), .dp-table td:nth-child(9) { display: none } }
.dp-cote { display: grid; gap: 14px; min-width: 0 }
@media (min-width: 900px) and (max-width: 1399px) { .dp-cote { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
.dp-carte { display: grid; gap: 10px; min-width: 0 } .dp-carte h3 { margin: 0; font-size: 17px }
.dp-donut { width: 150px; height: 150px } .dp-donut strong { font-size: 18px }
.dp-rc { font-size: 14px !important } .dp-cote .rx-cats { min-width: 170px }
.dp-barres { display: grid; gap: 12px }
.dp-barres > div { display: grid; grid-template-columns: 100px minmax(40px, 1fr) 40px auto; gap: 10px; align-items: center; font-size: 14.5px }
.dp-barres strong { text-align: right; white-space: nowrap } .dp-barres .hint { text-align: right; white-space: nowrap }
.dp-b { height: 12px; border-radius: 6px; background: #EEF2F7; overflow: hidden } .dp-b i { display: block; height: 100%; border-radius: 6px }
.dp-b i.vert { background: #16A34A } .dp-b i.bleu { background: #2563EB } .dp-b i.violet { background: #7C3AED } .dp-b i.gris { background: #94A3B8 }
@media (max-width: 600px) {
  .dp-titre h2 { font-size: 23px } .dp-logo { width: 46px; height: 46px } .dp-nouv { width: 100%; justify-content: center }
  .dp-k strong { font-size: 23px } .dp-ki { width: 48px; height: 48px }
  .dp-k3 { flex-direction: column } .dp-k3g, .dp-k3d { flex: none; width: 100%; min-width: 0 }
  .dp-k3d { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 10px }
  .dp-barres > div { grid-template-columns: 84px minmax(30px, 1fr) auto auto; gap: 6px; font-size: 13.5px }
}

/* ===== Fournisseurs (maquette du 25/10/2026) ===== */
.fr { display: grid; gap: 14px; min-width: 0 }
.fr-logo { background: #2563EB }
.fr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px }
.fr-k { display: flex; gap: 14px; align-items: center; padding: 16px; min-width: 0 }
.fr-k > div { display: grid; gap: 2px; min-width: 0 } .fr-k small { font-size: 14.5px; font-weight: 600 } .fr-k strong { font-size: 26px; white-space: nowrap }
.fr-ki { width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center; flex: none }
.fr-ki.bleu { background: #DBEAFE; color: #2563EB } .fr-ki.orange { background: #F97316; color: #fff } .fr-ki.vert { background: #DCFCE7; color: #16A34A }
.fr-ki.violet { background: #F3E8FF; color: #9333EA } .fr-ki.rouge { background: #FEE2E2; color: #DC2626 } .fr-ki.indigo { background: #E0E7FF; color: #4F46E5 }
.fr-seg { display: flex; gap: 8px; flex-wrap: wrap }
.fr-seg button { border: 1px solid var(--line); background: var(--card, #fff); border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; color: var(--text, #111) }
.fr-seg button.on { background: var(--primary); border-color: var(--primary); color: #fff }
.fr-corps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start }
@media (min-width: 1500px) { .fr-corps { grid-template-columns: minmax(0, 1fr) 400px } .fr-fiche { position: sticky; top: 80px } }
.fr-liste-carte { display: grid; gap: 10px; min-width: 0; container-type: inline-size } .fr-liste-carte h3 { margin: 0; font-size: 19px }
.fr-table { font-size: 14.5px } .fr-table td, .fr-table th { padding-left: 8px; padding-right: 8px; vertical-align: middle; white-space: nowrap }
.fr-table th { font-size: 12.5px; text-transform: uppercase; color: #475569 }
.fr-table td.r strong, .fr-table td.r small { display: block } .fr-table td.r small { font-size: 12px }
.fr-table tr.fr-sel td { background: #EFF6FF }
.fr-nom { display: inline-flex; gap: 10px; align-items: center; font-weight: 600 }
.fr-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13.5px; flex: none }
.fr-av.grand { width: 58px; height: 58px; font-size: 20px }
.fr-av.violet { background: #F3E8FF; color: #9333EA } .fr-av.vert { background: #DCFCE7; color: #15803D } .fr-av.rouge { background: #FEE2E2; color: #DC2626 } .fr-av.bleu { background: #DBEAFE; color: #1D4ED8 }
.fr-av.indigo { background: #E0E7FF; color: #4338CA } .fr-av.cyan { background: #CFFAFE; color: #0E7490 } .fr-av.rose { background: #FCE7F3; color: #BE185D } .fr-av.jaune { background: #FEF9C3; color: #A16207 }
.fr-cat { display: inline-block; border-radius: 7px; padding: 3px 9px; font-size: 13.5px; border: 1px solid transparent }
.fr-cat.bleu { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE } .fr-cat.violet { background: #F5F3FF; color: #6D28D9 } .fr-cat.orange { background: #FFF7ED; color: #C2410C }
.fr-cat.rouge { background: #FEF2F2; color: #B91C1C } .fr-cat.gris { background: #F1F5F9; color: #475569 } .fr-cat.jaune { background: #FEFCE8; color: #A16207 }
.fr-cat.vert { background: #F0FDF4; color: #15803D } .fr-cat.indigo { background: #EEF2FF; color: #4338CA } .fr-cat.cyan { background: #ECFEFF; color: #0E7490 } .fr-cat.rose { background: #FDF2F8; color: #BE185D }
.fr-etat { display: inline-block; border-radius: 8px; padding: 4px 10px; font-size: 13.5px; font-weight: 700; white-space: nowrap }
.fr-etat.apayer { background: #FFF7ED; color: #EA580C } .fr-etat.regle { background: #DCFCE7; color: #15803D }
@container (max-width: 1120px) { .fr-table:not(.ac-table) th:nth-child(1), .fr-table:not(.ac-table) td:nth-child(1), .fr-table:not(.ac-table) th:nth-child(3), .fr-table:not(.ac-table) td:nth-child(3), .fr-table:not(.ac-table) th:nth-child(9), .fr-table:not(.ac-table) td:nth-child(9):not([colspan]) { display: none } }
@container (max-width: 760px) { .fr-table:not(.ac-table) th:nth-child(4), .fr-table:not(.ac-table) td:nth-child(4), .fr-table:not(.ac-table) th:nth-child(5), .fr-table:not(.ac-table) td:nth-child(5), .fr-table:not(.ac-table) th:nth-child(6), .fr-table:not(.ac-table) td:nth-child(6) { display: none } }
.fr-fiche { display: grid; gap: 14px; min-width: 0 } .fr-fiche > * { min-width: 0 }
.fr-fiche.fr-vide .empty { display: grid; justify-items: center; gap: 6px; color: var(--muted) }
.fr-fh { display: flex; gap: 12px; align-items: center } .fr-fh > div { flex: 1; min-width: 0 } .fr-fh h3 { margin: 0; font-size: 22px; overflow-wrap: anywhere }
.fr-onglets { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto }
.fr-onglets button { border: 0; background: none; padding: 10px 11px; font: inherit; font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; color: var(--text, #111); white-space: nowrap }
.fr-onglets button.on { color: var(--primary); border-bottom-color: var(--primary) }
.fr-tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px }
.fr-t { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-width: 0 }
.fr-t .fr-ki { width: 42px; height: 42px } .fr-t .fr-ki svg { width: 22px; height: 22px } .fr-t > div { display: grid; min-width: 0 } .fr-t small { color: var(--muted); font-size: 13px } .fr-t strong { font-size: 18px; white-space: nowrap; letter-spacing: -.01em } .fr-t .hint { font-size: 12px }
.fr-boutons { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px }
.fr-boutons .btn { display: inline-flex; gap: 8px; align-items: center; justify-content: center; padding: 12px; font-weight: 700 }
.fr-b-payer { background: #16A34A; border-color: #16A34A; color: #fff } .fr-b-payer:hover { background: #15803D }
.fr-ih { display: flex; justify-content: space-between; align-items: center } .fr-ih h4 { margin: 0; font-size: 17px; color: #1E3A8A }
.fr-ih .btn { display: inline-flex; gap: 6px; align-items: center; color: #2563EB }
.fr-infos { display: grid } .fr-infos > * { display: flex; gap: 12px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line); color: var(--text, #111) } .fr-infos > *:last-child { border-bottom: 0 }
.fr-infos svg { color: #475569; flex: none } .fr-infos a { color: #2563EB; text-decoration: none }
@media (max-width: 600px) { .fr-k strong { font-size: 22px } .fr-ki { width: 48px; height: 48px } .fr-seg { width: 100% } .fr-seg button { flex: 1; padding: 9px 6px; font-size: 13.5px } .fr-t { padding: 10px; gap: 8px } .fr-t .fr-ki { width: 40px; height: 40px } .fr-t strong { font-size: 16px } }

/* ===== Mes achats (maquette du 25/10/2026) ===== */
.fr-ki.orange2 { background: #FFEDD5; color: #EA580C }
.fr-etat.bleu { background: #DBEAFE; color: #1D4ED8 } .fr-etat.gris { background: #F1F5F9; color: #64748B }
.ac-cmp { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; font-size: 13px }
.ac-infos { display: grid; grid-template-columns: auto 1fr; gap: 12px 18px; align-items: center; padding: 4px 2px }
.ac-infos > span:nth-child(odd) { color: #475569 }
.ac-b-annuler { color: #DC2626; border-color: #FCA5A5 } .ac-b-annuler:hover { background: #FEF2F2 }
.ac .fr-boutons .btn { padding: 11px }
.ac-table td.hint { white-space: nowrap }
@container (max-width: 1120px) { .ac-table th:nth-child(1), .ac-table td:nth-child(1), .ac-table th:nth-child(5), .ac-table td:nth-child(5), .ac-table th:nth-child(10), .ac-table td:nth-child(10):not([colspan]) { display: none } }
@container (max-width: 760px) { .ac-table th:nth-child(2), .ac-table td:nth-child(2), .ac-table th:nth-child(6), .ac-table td:nth-child(6), .ac-table th:nth-child(7), .ac-table td:nth-child(7) { display: none } }
.ac-table td:nth-child(4) { white-space: normal; min-width: 130px } .ac-table td:nth-child(4) .fr-nom { font-weight: 600 }
@container (max-width: 520px) { .ac-table th:nth-child(3), .ac-table td:nth-child(3) { display: none } .ac-table td:nth-child(4) { min-width: 0 } .ac-table .fr-av { display: none } }
.ac .fr-fh h3 { font-size: 19px }
@container (max-width: 520px) { .fr-table td, .fr-table th { padding-left: 5px; padding-right: 5px } .fr-table .fr-etat { padding: 3px 7px; font-size: 12.5px } .fr-table td.r strong { font-size: 14px } }
@container (max-width: 520px) { .ac-table td:nth-child(4) { min-width: 0; width: 34% } }
@container (max-width: 520px) { .fr-liste-carte table.fr-table th { white-space: normal; font-size: 11.5px } }
@container (max-width: 520px) { .fr-liste-carte table.fr-table td, .fr-liste-carte table.fr-table th { padding-left: 5px; padding-right: 5px } }
/* La ligne « Aucun … » (une seule case qui couvre toutes les colonnes) reste toujours visible */
.fr-liste-carte table.fr-table td[colspan], .rx-detail table.rx-table td[colspan] { display: table-cell !important }

/* ===== Tableau de bord (maquette du 25/10/2026) ===== */
.tb { display: grid; gap: 14px; min-width: 0 }
.tb-tete { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between }
.tb-tete h2 { margin: 0; font-size: 28px }
.tb-date { display: inline-flex; gap: 10px; align-items: center; border: 1px solid var(--line); background: var(--card, #fff); border-radius: 12px; padding: 10px 16px; font-weight: 600; color: var(--text, #111) }
.tb-date svg { color: var(--primary) }
.tb-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px }
.tb-k.kpi { display: flex; gap: 14px; align-items: flex-start; padding: 16px; min-width: 0 }
.tb-ki { width: 62px; height: 62px; border-radius: 16px; display: grid; place-items: center; flex: none }
.tb-ki.bleu { background: #DBEAFE; color: #1D6BF3 } .tb-ki.vert { background: #DCFCE7; color: #16A34A } .tb-ki.rouge { background: #FEE2E2; color: #E11D48 } .tb-ki.orange { background: #FFEDD5; color: #F97316 }
.tb-kv { display: grid; gap: 2px; flex: 1; min-width: 0 } .tb-kv small { font-size: 15px; font-weight: 600 } .tb-kv strong { font-size: 27px; white-space: nowrap } .tb-kv em { font-style: normal; color: var(--muted); font-size: 15px }
.tb-kb { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; flex-wrap: wrap }
.tb-cmp { display: grid; justify-items: center; gap: 2px; font-size: 12.5px }
.tb-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) }
.tb-tiles .tile { min-height: 96px; border-radius: 14px; font-size: 16px }
.tb-ligne { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 14px; align-items: stretch }
@media (min-width: 1300px) { .tb-ligne:has(.tb-large) { grid-template-columns: 1.25fr 1fr .85fr } }
.tb-carte { display: grid; gap: 10px; align-content: start; min-width: 0 } .tb-carte h3 { margin: 0; font-size: 17px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap }
.tb-carte h3 svg { color: var(--primary) }
.tb-voir { display: inline-flex; gap: 6px; align-items: center; color: var(--primary) }
.tb-argent, .tb-liste { display: grid }
.tb-argent > div, .tb-liste > div, .tb-tache { display: flex; gap: 12px; align-items: center; padding: 11px 2px; border-bottom: 1px solid var(--line) }
.tb-argent > div:last-child, .tb-liste > *:last-child { border-bottom: 0 }
.tb-argent > div > span:nth-child(2) { flex: 1; font-weight: 600 }
.tb-av { display: grid; justify-items: end; text-align: right } .tb-av strong { white-space: nowrap } .tb-av small { font-size: 12.5px }
.tb-mi { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none }
.tb-mi.vert { background: #DCFCE7; color: #16A34A } .tb-mi.bleu { background: #DBEAFE; color: #2563EB } .tb-mi.violet { background: #EDE9FE; color: #7C3AED }
.tb-mi.orange { background: #FFEDD5; color: #F97316 } .tb-mi.rouge { background: #FEE2E2; color: #E11D48 } .tb-mi.ambre { background: #FEF3C7; color: #B45309 }
.tb-lt { display: grid; flex: 1; min-width: 0 } .tb-lt strong { font-weight: 600; overflow-wrap: anywhere } .tb-lt small { font-size: 13px }
.tb-ph { width: 44px; height: 44px; border-radius: 10px; background: #F1F5F9; display: grid; place-items: center; overflow: hidden; flex: none; color: #64748B }
.tb-ph img { width: 100%; height: 100%; object-fit: cover }
.tb-q { background: #FFEDD5; color: #C2410C; border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 700; white-space: nowrap }
.tb-q.rupture { background: #FEE2E2; color: #DC2626 }
.tb-tache { border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left; font: inherit; cursor: pointer; color: inherit }
.tb-tache:hover { background: #F8FAFC }
@media (max-width: 600px) { .tb-tete h2 { font-size: 23px } .tb-date { width: 100%; justify-content: center } .tb-ki { width: 50px; height: 50px } .tb-kv strong { font-size: 23px } .tb-tiles { grid-template-columns: repeat(2, 1fr) } }

/* ===== Défilement des listes (25/10/2026) =====
   Une longue liste défile DANS son cadre (les titres des colonnes restent visibles en haut) :
   la page et le reste de l'écran ne bougent pas. Le rapport imprimé / PDF n'est pas concerné. */
#content .table-box { max-height: min(68vh, 640px); overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch }
#content .table-box > table.data > thead th { position: sticky; top: 0; z-index: 3; box-shadow: 0 1px 0 var(--line) }
#content #rpBox .table-box { max-height: none; overflow: visible }
#prGrid { max-height: min(70vh, 720px); overflow-y: auto; overscroll-behavior: contain; padding: 2px }
.fr-fiche .list, .rx-cats { max-height: 420px; overflow-y: auto; overscroll-behavior: contain }
@media print {
  #content .table-box, #prGrid, .fr-fiche .list { max-height: none !important; overflow: visible !important }
  #content .table-box > table.data > thead th { position: static }
}
/* Grand montant dans un petit cadre (ex. valeur du stock) : il rétrécit au lieu de passer à la ligne */
.sk-kpi { container-type: inline-size } .sk-kpi > * { min-width: 0 }
.sk-kpi strong { white-space: nowrap; font-size: clamp(18px, 11cqi, 32px) }

/* ===== Marges et largeurs selon l'écran (25/10/2026) =====
   Une seule marge pour toute l'application, qui grandit avec l'écran :
   téléphone 12 px · tablette ~18 px · ordinateur 24 à 32 px.
   Grand écran : la page s'élargit jusqu'à 1 680 px et reste centrée (plus de grand vide à droite). */
:root { --marge: clamp(12px, 2.2vw, 32px) }
.content { padding-left: max(var(--marge), env(safe-area-inset-left)); padding-right: max(var(--marge), env(safe-area-inset-right)); max-width: 1680px; margin-left: auto; margin-right: auto }
.topbar { padding-left: max(var(--marge), env(safe-area-inset-left)); padding-right: max(var(--marge), env(safe-area-inset-right)) }
.abo-banner { margin-left: var(--marge); margin-right: var(--marge); max-width: none }
@media (max-width: 1000px) { .abo-banner { margin-left: var(--marge); margin-right: var(--marge) } .content { gap: 16px } }
@media (max-width: 600px) {
  .content { gap: 12px }
  .card { padding: 14px; border-radius: 14px }
  .topbar { gap: 8px }
}
/* Rangées de 4 chiffres : 2 par ligne sur tablette et petit ordinateur (plus de cadre seul sur sa ligne), 4 sur grand écran */
@media (min-width: 600px) and (max-width: 1279px) {
  .vt-kpis, .sk-kpis, .fr-kpis, .tb-kpis, .rx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .dp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) } .dp-k3 { grid-column: 1 / -1 }
}
@media (min-width: 1280px) { .vt-kpis, .sk-kpis, .fr-kpis, .tb-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)) } }

/* ===== Téléphone : cartes plus petites (25/10/2026, retour de Justin) =====
   On garde l'affichage en cartes, mais 3 par ligne, avec une police et une photo plus petites :
   on voit 9 à 12 articles d'un coup. Même principe pour « Faire une vente » et le tableau de bord. */
@media (max-width: 600px) {
  /* Mes produits */
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px }
  #prGrid { max-height: calc(100dvh - 300px - env(safe-area-inset-bottom)); min-height: 260px }
  .prod-card { gap: 3px; padding: 6px; border-radius: 10px }
  .prod-card .prod-img { border-radius: 8px; aspect-ratio: 1 }
  .prod-card .prod-img svg { width: 24px; height: 24px }
  .prod-card .prod-nom { font-size: 12.5px; line-height: 1.25 }
  .prod-card .prod-prix { font-size: 12.5px } .prod-card .prod-prix small { font-size: 10.5px }
  .prod-card > .pill { font-size: 10.5px; padding: 2px 6px }
  [data-ecran="produits"] .section-title h2 { font-size: 22px }
  /* Faire une vente : grille des articles */
  .pos-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px }
  .pos-item { gap: 2px; padding: 6px; border-radius: 10px }
  .pos-item .pos-img { aspect-ratio: 1; border-radius: 8px }
  .pos-item .n { font-size: 12px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; min-height: 2.4em }
  .pos-item .p { font-size: 12.5px } .pos-item .s { font-size: 10.5px }
  /* Tableau de bord : 2 petits chiffres par ligne, 3 tuiles par ligne */
  .tb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px }
  .tb-k.kpi { flex-direction: column; gap: 6px; padding: 10px }
  .tb-ki { width: 34px; height: 34px; border-radius: 10px } .tb-ki svg { width: 20px; height: 20px }
  .tb-kv small { font-size: 12px; line-height: 1.2 } .tb-kv strong { font-size: 18px } .tb-kv em { font-size: 11.5px }
  .tb-kb { gap: 4px } .tb-kb .hint { font-size: 11px } .tb-cmp { display: flex; gap: 4px; align-items: center } .tb-cmp .hint { display: none }
  .tb-cmp .rx-cmp { font-size: 11px; padding: 2px 6px }
  .tb-tiles, .mode-gestionnaire .tb-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px }
  .tb-tiles .tile { min-height: 70px; padding: 8px 4px; gap: 4px; font-size: 12px; border-radius: 12px; line-height: 1.15 }
  .tb-tiles .tile svg { width: 24px; height: 24px }
  .tb-tete h2 { font-size: 20px } .tb-tete .hint { font-size: 13px } .tb-date { padding: 7px 12px; font-size: 13.5px }
  .tb-carte h3 { font-size: 15.5px }
}
@media (max-width: 360px) { .tb-kv strong { font-size: 16px } .tb-tiles .tile { font-size: 11px } }
/* Petite tablette : 3 à 4 cartes par ligne, un peu plus serrées */
@media (min-width: 601px) and (max-width: 1000px) { .cat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px } }
@media (max-width: 600px) {
  .tb-argent > div, .tb-liste > div, .tb-tache { padding: 8px 0; gap: 10px; font-size: 14px }
  .tb-mi { width: 32px; height: 32px; border-radius: 9px } .tb-mi svg { width: 17px; height: 17px }
  .tb-ph { width: 38px; height: 38px }
  .tb-av strong { font-size: 14.5px } .tb-av small { font-size: 11.5px }
  .tb-lt strong { font-size: 14px } .tb-lt small { font-size: 12px }
  .tb-q { font-size: 12px; padding: 3px 8px }
  #tbEvol .ma-graph { max-height: 190px }
}

/* ===== Faire une vente sur téléphone et petite tablette : barre du panier + panier qui monte (25/10/2026) ===== */
.vt-barre, .vt-voile, .vt-poignee, .vt-fermer { display: none }
.pos-item { position: relative }
.pos-item.choisi { border: 2px solid #16A34A; background: #F0FDF4 }
.vt-qte { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #16A34A; color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; z-index: 1 }
.pos-item.vt-ajoute { animation: vtAjout .35s ease }
@keyframes vtAjout { 0% { transform: scale(1) } 40% { transform: scale(.93) } 100% { transform: scale(1) } }
@media (max-width: 1000px) {
  /* la grille des articles prend la place ; le panier n'est plus en dessous */
  [data-ecran="vente"] .pos-grid { max-height: none; overflow: visible }
  [data-ecran="vente"].a-panier { padding-bottom: 76px }
  /* barre verte au-dessus du menu du bas */
  .vt-barre:not([hidden]) { display: flex; position: fixed; z-index: 26; left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); bottom: calc(66px + env(safe-area-inset-bottom));
    background: #16A34A; color: #fff; border-radius: 16px; padding: 8px 8px 8px 12px; gap: 10px; align-items: center; box-shadow: 0 8px 22px rgba(22, 163, 74, .35) }
  .vt-barre-info { flex: 1; display: flex; gap: 14px; align-items: center; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; min-width: 0 }
  .vt-barre-ic { position: relative; display: grid } .vt-barre-ic b { position: absolute; top: -8px; right: -12px; background: #fff; color: #16A34A; border-radius: 99px; font-size: 11.5px; padding: 1px 6px; font-weight: 800 }
  .vt-barre-t { display: grid; line-height: 1.15; min-width: 0 } .vt-barre-t small { font-size: 12px; opacity: .9 } .vt-barre-t strong { font-size: 18px; white-space: nowrap }
  .vt-barre-go { background: #fff; color: #15803D; border: 0; border-radius: 11px; padding: 11px 14px; font: 800 15px var(--font); cursor: pointer; white-space: nowrap }
  /* le panier devient une feuille qui monte depuis le bas */
  [data-ecran="vente"] .pos-cart { position: fixed; z-index: 46; left: 0; right: 0; bottom: 0; top: auto; max-height: 86dvh; overflow-y: auto; overscroll-behavior: contain;
    border-radius: 22px 22px 0 0; padding: 6px 16px calc(18px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .25s ease; box-shadow: 0 -10px 30px rgba(15, 23, 42, .18); visibility: hidden }
  [data-ecran="vente"].panier-ouvert .pos-cart { transform: none; visibility: visible }
  [data-ecran="vente"].panier-ouvert .vt-voile { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(15, 23, 42, .45); border: 0; padding: 0; cursor: pointer }
  [data-ecran="vente"].panier-ouvert .vt-barre { display: none }
  .vt-poignee { display: block; width: 100%; background: none; border: 0; padding: 4px 0 8px; cursor: pointer } .vt-poignee span { display: block; width: 46px; height: 5px; border-radius: 9px; background: #CBD5E1; margin: 0 auto }
  .vt-fermer { display: grid }
}
/* Téléphone : 4 articles par ligne (Faire une vente et Mes produits), texte plus petit */
@media (max-width: 600px) {
  .pos-grid, .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px }
  .pos-item, .prod-card { padding: 4px; border-radius: 9px; gap: 2px }
  .pos-item .pos-img, .prod-card .prod-img { border-radius: 7px }
  .pos-item .pos-img svg, .prod-card .prod-img svg { width: 20px; height: 20px }
  .pos-item .n, .prod-card .prod-nom { font-size: 11px; line-height: 1.2 }
  .pos-item .n { min-height: 2.4em }
  .pos-item .p, .prod-card .prod-prix { font-size: 11.5px } .prod-card .prod-prix small { display: none }
  .pos-item .s, .prod-card > .pill { font-size: 9.5px } .prod-card > .pill { padding: 1px 5px }
  .vt-qte { min-width: 20px; height: 20px; font-size: 11px; top: -5px; right: -5px }
}

/* ===== Présentation unique des écrans métiers (pharmacie, restaurant, garage, transport…) =====
   Même style que les écrans refaits d'après les maquettes : en-tête avec grande icône,
   chiffres en cadres colorés, filtres en boutons arrondis, tableaux qui défilent dans leur cadre. */
.page-tete { display: flex; gap: 14px; align-items: center }
.page-tete h2 { margin: 0; font-size: 28px }
.page-tete .hint { font-size: 14.5px }
.page-logo { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; box-shadow: 0 6px 16px rgba(15, 23, 42, .12) }
.ecran-metier .section-title h2.titre-double { display: none }
.ecran-metier .section-title .hint { font-size: 14.5px; font-weight: 600 }
.ecran-metier .kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px }
.ecran-metier .kpis > .kpi { padding: 16px; gap: 14px; border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04) }
.ecran-metier .kpis > .kpi .kico { width: 54px; height: 54px; border-radius: 14px }
.ecran-metier .kpis > .kpi .kico svg { width: 28px; height: 28px }
.ecran-metier .kpis > .kpi .kv small { font-size: 14.5px; color: var(--ink) }
.ecran-metier .kpis > .kpi .kv strong { font-size: 26px }
.ecran-metier .kpis > .kpi .kv em { font-size: 13px }
.ecran-metier .chip { border-radius: 10px; padding: 8px 14px; font-weight: 600 }
.ecran-metier .chip.on { background: var(--primary); border-color: var(--primary); color: #fff }
.ecran-metier .btn.primary { box-shadow: 0 4px 12px rgba(37, 99, 235, .25) }
@media (min-width: 600px) and (max-width: 1279px) { .ecran-metier .kpis:has(> .kpi:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (max-width: 600px) {
  .page-tete { gap: 10px } .page-tete h2 { font-size: 21px } .page-tete .hint { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
  .page-logo { width: 44px; height: 44px; border-radius: 12px } .page-logo svg { width: 24px; height: 24px }
  .ecran-metier .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px }
  .ecran-metier .kpis > .kpi { flex-direction: column; align-items: flex-start; padding: 10px; gap: 6px }
  .ecran-metier .kpis > .kpi .kico { width: 36px; height: 36px; border-radius: 10px } .ecran-metier .kpis > .kpi .kico svg { width: 20px; height: 20px }
  .ecran-metier .kpis > .kpi .kv small { font-size: 12px } .ecran-metier .kpis > .kpi .kv strong { font-size: 19px }
  .ecran-metier .chip { padding: 7px 11px; font-size: 13px }
}

/* ===== Téléphones : IMEI (25/10/2026) ===== */
.imei-choix span { display: grid; gap: 2px } .imei-choix small { font-weight: 400 }
.imei-ligne td { background: #F8FAFF; padding-top: 4px !important }
.imei-case { gap: 4px } .imei-case textarea, #fsImeiT { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; min-height: 52px }
.imei-case .hint.ok-imei, [data-imc].ok-imei { color: #15803D; font-weight: 700 }
.cl-imeis { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px }
.cl-imei { display: inline-flex; align-items: center; gap: 4px; background: #EFF6FF; color: #1D4ED8; border-radius: 7px; padding: 2px 4px 2px 7px; font: 600 11.5px ui-monospace, Menlo, monospace }
.cl-imei button { border: 0; background: none; color: #64748B; font-size: 15px; line-height: 1; cursor: pointer; padding: 0 3px }
small.cl-imei { display: inline-flex; margin: 3px 4px 0 0; padding: 2px 7px }
.imei-liste { display: grid; gap: 6px; max-height: 46vh; overflow-y: auto; overscroll-behavior: contain }
.imei-btn { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; font: inherit; text-align: left; cursor: pointer; color: inherit }
.imei-btn:hover { border-color: #2563EB; background: #EFF6FF } .imei-btn svg { color: #2563EB; flex: none }
.imei-btn span:nth-child(2) { display: grid; flex: 1 } .imei-btn strong { font-family: ui-monospace, Menlo, monospace; font-size: 15px; letter-spacing: .03em } .imei-btn small { color: var(--muted); font-family: ui-monospace, Menlo, monospace }
.imei-choix-f #imQ { font-family: ui-monospace, Menlo, monospace; font-size: 16px }
.imei-fiche .imei-liste { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); max-height: 260px }
.imei-tag { display: grid; background: #F1F5F9; border-radius: 8px; padding: 6px 10px; font: 600 13px ui-monospace, Menlo, monospace } .imei-tag small { font: 400 11.5px var(--font); color: var(--muted) }
.imei-retour .who { display: grid; gap: 6px } .imei-retour .chk { font: 600 13px ui-monospace, Menlo, monospace }
.tk-imei { font-size: .9em; font-family: ui-monospace, Menlo, monospace }

/* ===== Fiche article : options selon l'activité (25/10/2026) ===== */
.opt-art { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #FAFBFF }
.opt-art > summary { cursor: pointer; font-weight: 700; display: flex; gap: 8px; align-items: center; list-style: none }
.opt-art > summary::-webkit-details-marker { display: none }
.opt-art > summary::after { content: "▾"; margin-left: auto; color: var(--muted) } .opt-art[open] > summary::after { content: "▴" }
.opt-art[open] > summary { margin-bottom: 8px } .opt-art .row .inv-in { width: 90px }
.prod-sous, .pos-item .sous { font-size: 12px; color: var(--muted); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100% }
.pill-ord { background: #FEF3C7; color: #92400E; border-radius: 6px; padding: 1px 6px; font-size: 10.5px; font-weight: 800 }

/* ===== Détails des articles (25/10/2026) : reçu, panier, choix ===== */
.tk-detail { font-size: .88em }
.tk-garantie { font-size: .88em; font-weight: 700 }
.cl-var { display: inline-block; padding: 1px 7px; border-radius: 999px; background: #EFF6FF; color: var(--primary); font-size: .78em; font-weight: 700; vertical-align: middle }
.cl-gros { color: var(--good); font-weight: 700 }
.var-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px }
.var-grille.deux { grid-template-columns: 1fr 1fr }
.var-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; padding: 10px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: inherit; font: inherit; cursor: pointer }
.var-btn strong { font-size: 1.15em }
.var-btn small { color: var(--muted) }
.var-btn:hover:not(:disabled), .var-btn:focus-visible { border-color: var(--primary); background: #EFF6FF }
.var-btn:disabled { opacity: .45; cursor: not-allowed }
.pos-item .sous { display: block }

/* ===== Fiche article simplifiée (26/10/2026) ===== */
.toggle input { flex: none }
.toggle > span { display: grid; gap: 2px; min-width: 0 }
.toggle > span small.hint { font-weight: 500 }
.cond-ligne { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px }
.cond-ligne select { flex: 1.3; min-width: 0 } .cond-ligne input { flex: 1; min-width: 0; width: 70px }
.cond-ligne [data-unite-cond] { flex: none; color: var(--muted) }

/* ===== Messages aux clients (SMS) — 27/10/2026 ===== */
.ms-grille { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--marge, 16px); align-items: start }
@media (max-width: 900px) { .ms-grille { grid-template-columns: 1fr } }
.ms h3 { display: flex; align-items: center; gap: 10px }
.ms-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 15px; flex: none }
.ms-modeles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px }
@media (max-width: 520px) { .ms-modeles { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
.ms-modele { display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: 700 13px var(--font); cursor: pointer; text-align: center }
.ms-modele svg { color: var(--primary) } .ms-modele.on { border-color: var(--primary); background: #EFF6FF }
.ms textarea { font-size: 16px; line-height: 1.4; resize: vertical }
.ms-compte { display: grid; gap: 2px; font-size: 14px; color: var(--muted) } .ms-compte strong { color: var(--ink) } .ms-compte .ms-plus strong { color: var(--warn) }
.ms-apercu small { color: var(--muted) }
.ms-bulle { margin-top: 6px; max-width: 340px; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #E7F6EC; color: var(--ink); white-space: pre-wrap; font-size: 15px; line-height: 1.4; word-break: break-word }
.ms-liste { display: grid; gap: 4px; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; margin-top: 8px; padding: 4px; border: 1px solid var(--line); border-radius: 12px }
.ms-cl span { display: grid } .ms-cl small { color: var(--muted); font-weight: 500 }
.ms-qui-n { display: flex; align-items: center; gap: 10px; font-size: 18px } .ms-qui-n svg { color: var(--primary); flex: none } .ms-qui-n strong { font-size: 26px }
.ms-h .who small.neg { color: var(--bad) }
.list .row.ms-h { flex-wrap: wrap; row-gap: 6px } .list .row.ms-h .who { flex: 1 1 240px; min-width: 0 } .list .row.ms-h .actions { flex-wrap: wrap }
/* SMS ou WhatsApp */
.ms-canaux { display: grid; gap: 6px }
.ms-canaux-l { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px }
.ms-canal { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer }
.ms-canal span { display: grid } .ms-canal strong { font-size: 14px } .ms-canal small { color: var(--muted); font-size: 12px }
.ms-canal svg { flex: none; color: var(--primary) } .ms-canal[data-canal="whatsapp"] svg, .ms-canal[data-canal="manuel"] svg { color: #16A34A }
.ms-canal.on { border-color: var(--primary); background: #EFF6FF }
.ms-bulle.wa { background: #DCF8C6 }
.ms-wa { max-height: 360px }
.ms-wa-l { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line) }
.ms-wa-l:last-child { border-bottom: 0 }
.ms-wa-l > span { display: grid; min-width: 0 } .ms-wa-l small { color: var(--muted) }
.ms-wa-l.fait { opacity: .6 } .ms-wa-l.fait svg { color: var(--good); vertical-align: -3px; margin-right: 4px }

/* ===== Salon : coiffeurs (31/10/2026) ===== */
.cl-coiffeur { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600 }
.cl-coiffeur svg { color: #DB2777; flex: none }
.cl-coiffeur select { width: auto; min-width: 0; max-width: 160px; padding: 3px 26px 3px 8px; font-size: 13px; min-height: 0; height: 30px }
.cl-coiffeur.manque select { border-color: var(--warn); background-color: var(--warn-bg) }
.py-coiffeur { padding: 10px; border: 1.5px solid #F5C9DD; border-radius: 12px; background: #FDF2F8 }
.py-coiffeur svg { color: #DB2777; vertical-align: -3px }
.eq-l.inactif { opacity: .55 }

/* ===== Argent séparé : prestations / produits (31/10/2026) ===== */
.cx-poches { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 12px }
.cx-poche { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; background: var(--surface) }
.cx-poche.prestations { border-color: #F5C9DD; background: #FDF2F8 } .cx-poche.prestations .cx-titre svg { color: #DB2777 }
.cx-poche.produits { border-color: #BFDBFE; background: #EFF6FF } .cx-poche.produits .cx-titre svg { color: #2563EB }
.cx-poche h4 { margin: 0; font-size: 15px }
.cx-poche-l { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; font-size: 13.5px }
.cx-poche-l > span:last-child { display: grid; text-align: right } .cx-poche-l.tot { border-top: 1px dashed var(--line); padding-top: 6px; font-weight: 700 }
.pill-poche { display: inline-block; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700; vertical-align: middle }
.pill-poche.prestations { background: #FCE7F3; color: #9D174D } .pill-poche.produits { background: #DBEAFE; color: #1E40AF }

/* ===== Salon : Clients du jour (31/10/2026) ===== */
.rv-boutons { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px }
.rv-passage { background: #DB2777; border-color: #DB2777; color: #fff }
.rv-passage:hover { background: #BE185D }
.pill.violet { background: #F3E8FF; color: #6D28D9 }
.rdv.encours { border-left: 4px solid #7C3AED; padding-left: 8px }
.rdv.arrive { border-left: 4px solid #D97706; padding-left: 8px }
.ec-liste { display: grid; gap: 6px; max-height: 260px; overflow-y: auto; overscroll-behavior: contain; margin-top: 8px }
.ec-p { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer }
.ec-p > span { display: grid; flex: 1; min-width: 0 } .ec-p small { color: var(--muted) } .ec-p svg { color: var(--primary); flex: none }
.ec-p:disabled { opacity: .45; cursor: not-allowed }

/* ---------- Prestations : affichées en lignes (une prestation par ligne) ---------- */
#prGrid.pr-lignes { padding: 4px 0; min-height: 0; align-content: start }
.pr-lignes .pr-ligne { width: 100%; display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line, #E2E8F0); padding: 12px 14px; font: inherit; color: inherit; cursor: pointer }
.pr-lignes .pr-ligne:last-child { border-bottom: 0 }
.pr-lignes .pr-ligne:hover { background: rgba(37, 99, 235, .05) }
.pr-ligne .pr-ic { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #E0F2FE; color: #0E7490; overflow: hidden }
.pr-ligne .pr-ic img { width: 100%; height: 100%; object-fit: cover }
.pr-ligne .who { flex: 1; min-width: 0; display: flex; flex-direction: column }
.pr-ligne .who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.pr-ligne .who small { color: var(--muted, #64748B) }
.pr-ligne .pr-prix { color: var(--primary-fonce, #1D4ED8); white-space: nowrap }

/* ---------- Cartes produits : contenu collé en haut (image bien cadrée, pas étirée vers le bas) ---------- */
.cat-grid { align-content: start }
.prod-card { align-content: start; grid-template-rows: auto }
.prod-card .prod-img { flex: none; height: auto }
.prod-card .prod-img img { object-position: center }

/* ---------- Clients du jour : choix des prestations (liste longue : recherche, catégories, coches) ---------- */
.rv-choix { display: grid; gap: 8px }
.rv-choix #rvQ { width: 100% }
.rv-prest { display: grid; max-height: min(300px, 40vh); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 12px; background: var(--surface) }
.rv-p { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; font: inherit; color: inherit; cursor: pointer; min-height: 52px }
.rv-p:last-of-type { border-bottom: 0 }
.rv-p[hidden] { display: none }
.rv-p .rv-coche { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; font-weight: 900; font-size: 15px }
.rv-p .rv-pn { flex: 1; min-width: 0; display: flex; flex-direction: column }
.rv-p .rv-pn strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.rv-p .rv-pn small { color: var(--muted) }
.rv-p .rv-pp { font-weight: 800; color: var(--primary); white-space: nowrap }
.rv-p.on { background: rgba(37, 99, 235, .08) }
.rv-p.on .rv-coche { background: var(--primary); border-color: var(--primary); color: #fff }
.rv-resume { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: rgba(37, 99, 235, .08) }
.rv-resume .rv-sel { display: flex; flex-wrap: wrap; gap: 6px }
.rv-resume .chip { padding: 5px 10px; font-size: 12.5px }
/* Le bouton d'enregistrement reste visible en bas de la fenêtre, même quand on fait défiler */
.rv-envoi { position: sticky; bottom: -22px; margin: 0 -22px -22px; padding: 12px 22px 22px; background: var(--surface); border-top: 1px solid var(--line); z-index: 2 }
.rv-envoi .btn { width: 100% }

.rv-total { display: flex; align-items: center; gap: 6px; justify-content: center; margin-bottom: 8px; color: var(--primary); font-size: 14px }
.rv-total[hidden] { display: none }
/* Titre long d'une fenêtre (ex. « Client sans rendez-vous ») : la croix reste à droite, sur la même ligne */
.modal-card > form > .card-head, .modal-card > .stack > .card-head { flex-wrap: nowrap }
.modal-card .card-head h2 { min-width: 0 }
@media (max-width: 420px) { .modal-card .card-head h2 { font-size: 19px } }

/* ===== Longues listes : chacune défile DANS son cadre (31/10/2026, retour de Justin) =====
   Dès qu'une liste devient longue (15 lignes ou plus), elle reçoit un cadre qui défile seul :
   le titre, la recherche, les filtres et les boutons de l'écran restent en place.
   Une liste courte garde sa taille normale (pas de cadre vide). */
#content .list:has(> :nth-child(15)) { max-height: min(68vh, 640px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch }
#content #rpBox .list { max-height: none; overflow: visible }
/* Clients du jour et Mon équipe : même principe, cadre un peu plus grand */
#rvListe:has(> :nth-child(9)), #eqListe:has(> :nth-child(9)) { max-height: min(70vh, 720px); overflow-y: auto; overscroll-behavior: contain }
/* Dans les fenêtres (nouvel achat, recette, réparation…) : le tableau ou la liste défile, le total et le bouton restent visibles */
.modal-card .table-box:has(tbody > tr:nth-child(9)) { max-height: 45vh; overflow: auto; overscroll-behavior: contain }
.modal-card .table-box > table.data > thead th { position: sticky; top: 0; z-index: 2; background: var(--surface) }
.modal-card .list:has(> :nth-child(12)) { max-height: 45vh; overflow-y: auto; overscroll-behavior: contain }
/* Vendre / Faire une vente sur téléphone : les articles défilent dans leur cadre, la recherche reste en haut */
@media (max-width: 1000px) {
  [data-ecran="vente"] .pos-grid { max-height: max(300px, calc(100dvh - 270px - env(safe-area-inset-bottom))); overflow-y: auto; overscroll-behavior: contain }
  [data-ecran="vente"].a-panier .pos-grid { padding-bottom: 80px }
}
@media print {
  #content .list, #rvListe, #eqListe, .modal-card .table-box, [data-ecran="vente"] .pos-grid { max-height: none !important; overflow: visible !important }
}
/* Clients du jour sur téléphone : en-tête compact pour que la liste des clients se voie tout de suite */
@media (max-width: 600px) {
  [data-ecran="rendezvous"] .rv-boutons { grid-template-columns: 1fr 1fr; gap: 8px }
  [data-ecran="rendezvous"] .rv-boutons .btn { min-height: 56px; padding: 8px 10px; font-size: 14px; line-height: 1.2; white-space: normal; text-align: left; justify-content: flex-start; gap: 8px }
  [data-ecran="rendezvous"] #rvKpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px }
  [data-ecran="rendezvous"] #rvKpis .kpi { padding: 8px 6px; border-radius: 12px; justify-content: center; align-items: stretch; text-align: center }
  [data-ecran="rendezvous"] #rvKpis .kv { width: 100%; grid-template-rows: 1fr auto; justify-items: center }
  [data-ecran="rendezvous"] #rvEmp:empty { display: none }
  [data-ecran="rendezvous"] #rvKpis .kico { display: none }
  [data-ecran="rendezvous"] #rvKpis .kv small { font-size: 10.5px; line-height: 1.15 }
  [data-ecran="rendezvous"] #rvKpis .kv strong { font-size: 18px }
  [data-ecran="rendezvous"] .section-title { gap: 8px }
  [data-ecran="rendezvous"] .section-title .actions { flex-wrap: nowrap; width: 100%; gap: 6px }
  [data-ecran="rendezvous"] #rvJour { flex: 1 1 0; width: 0 !important; min-width: 0 }
  [data-ecran="rendezvous"] .section-title .actions .btn { flex: none; padding-left: 10px; padding-right: 10px }
  [data-ecran="rendezvous"] .section-title .actions [data-j="0"] svg { display: none }
  [data-ecran="rendezvous"], [data-ecran="rendezvous"] > * { min-width: 0; max-width: 100% }
  #rvListe:has(> :nth-child(9)) { max-height: calc(100dvh - 190px - env(safe-area-inset-bottom)) }
}

/* ===== Couleur de l'application par établissement (metier/theme.js) ===== */
.theme-choix { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px }
.theme-pastille { display: grid; justify-items: center; gap: 4px; cursor: pointer; font-size: 12px; color: var(--muted); width: 64px }
.theme-pastille input { position: absolute; opacity: 0; pointer-events: none }
.theme-pastille span { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--s) 0 50%, var(--c) 50% 100%); border: 3px solid transparent; box-shadow: 0 0 0 1px var(--line); transition: transform .12s }
.theme-pastille input:checked + span { border-color: #fff; box-shadow: 0 0 0 3px var(--c); transform: scale(1.06) }
.theme-pastille input:checked ~ small { color: var(--ink); font-weight: 700 }
.theme-pastille input:focus-visible + span { outline: 3px solid var(--c); outline-offset: 3px }
.theme-point { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; vertical-align: 0; box-shadow: 0 0 0 2px rgba(0,0,0,.06) }
/* Sur téléphone et tablette (pas de menu de gauche) : un liseré de la couleur en haut de l'écran */
@media (max-width: 1000px) { .topbar { border-top: 5px solid var(--primary) } }
/* Titres et libellés de la couleur de l'établissement (retour de Justin, 31/10/2026) :
   titre de l'écran, titres des cadres, libellés des chiffres. Les montants restent en noir (lisibles),
   les reçus et rapports imprimés ne changent pas. */
:root { --titre: color-mix(in srgb, var(--primary) 78%, #0F1B33) }
.top-title h1, #content h2, #content h3, .modal-card h2, .modal-card h3,
#content .tb-kv small, #content .kpi .kv small { color: var(--titre) }
#content #ticketBox h2, #content #ticketBox h3, #content #rpBox h2, #content #rpBox h3, #content .tile h3 { color: inherit }
@media print { .top-title h1, #content h2, #content h3, #content .tb-kv small, #content .kpi .kv small { color: #000 !important } }
.et-couleur-btn { display: inline-flex; align-items: center; gap: 0 } .et-couleur-btn .theme-point { margin-right: 6px }
/* Téléphones par IMEI : liste à cocher (transfert, casse/perte, inventaire) */
.banner.ok { background: var(--good-bg); color: #14532D }
.imei-coches { max-height: 260px; overflow-y: auto; overscroll-behavior: contain }
.imei-coches .imei-btn input { width: 20px; height: 20px; flex: none }
.imei-coches .imei-btn:has(input:checked) { border-color: var(--primary); background: var(--primary-doux) }
.imei-scan { width: 100% }
.tb-resultat { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--primary-doux); font-size: 14px; text-align: center }
.rx-total-usd { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--primary-doux); font-size: 15px }
.cl-prix { border: 1px dashed var(--line); background: none; border-radius: 6px; padding: 0 6px; font: 600 11.5px var(--font); color: var(--primary); cursor: pointer; margin-left: 4px }
.cl-nego { color: #B45309; font-weight: 700 }

/* ===== Écran de scan des IMEI (js/scanImei.js) ===== */
.sc { display: grid; gap: 10px }
.sc-compteur { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap }
.sc-compteur strong { font-size: 34px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums }
.sc.complet .sc-compteur strong { color: var(--good) }
.sc-barre { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden }
.sc-barre i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s }
.sc.complet .sc-barre i { background: var(--good) }
.sc-saisie { display: flex; gap: 8px; flex-wrap: wrap }
.sc-saisie input { flex: 1 1 240px; font-size: 20px; padding: 14px; font-family: ui-monospace, Menlo, monospace; letter-spacing: .04em }
.sc-cam { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; font-weight: 700 }
.sc-cam.on { background: var(--primary); color: #fff; border-color: var(--primary) }
.sc-video { position: relative; border-radius: 14px; overflow: hidden; background: #000; max-height: 280px; display: grid; place-items: center }
.sc-video video { width: 100%; max-height: 280px; object-fit: cover }
.sc-video .sc-viseur { position: absolute; left: 4%; right: 4%; top: 30%; height: 40%; border: 3px solid #22C55E; border-radius: 8px; box-shadow: 0 0 0 999px rgba(0,0,0,.25) }
.sc-video small { position: absolute; bottom: 8px; color: #fff; font-weight: 600 }
.sc-msg { min-height: 1.6em; font-size: 18px; font-weight: 800; border-radius: 10px; padding: 0 4px }
.sc-msg.err { color: #fff; background: var(--bad); padding: 10px 12px }
.sc-msg.ok { color: var(--good) }
.sc-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 300px; overflow-y: auto; overscroll-behavior: contain }
.sc-liste li { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; background: var(--surface) }
.sc-liste .sc-n { min-width: 28px; height: 28px; border-radius: 50%; background: var(--primary-doux); color: var(--primary); display: grid; place-items: center; font-weight: 800; font-size: 13px }
.sc-liste strong { font-size: 15.5px }
.sc-liste .sc-i2 { flex: 1; min-width: 0; padding: 6px 8px; font-size: 13px }
.sc-btn-scan { display: inline-flex; align-items: center; gap: 6px }
.vt-recherche { display: flex; gap: 8px } .vt-recherche input { flex: 1; min-width: 0 } .vt-recherche .sc-btn-scan { flex: none; min-width: 48px; justify-content: center }
/* Pharmacie : ordonnance de la vente en cours */
.vt-ord { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #FEF3C7; color: #78350F; font-size: 13.5px; margin-bottom: 6px }
.vt-ord span { flex: 1; min-width: 0 }
.var-grille.trois { grid-template-columns: repeat(3, 1fr) } @media (max-width: 420px) { .var-grille.trois { grid-template-columns: 1fr } }
.pos-item.a-equiv { cursor: pointer; opacity: 1 } .pos-item.a-equiv .s { color: var(--primary); font-weight: 700 }
