/* Polices : DM Sans (SIL Open Font License, voir /fonts/OFL-DMSans.txt), variable 100 à 1000. */
@font-face { font-family: 'DM Sans'; src: url('/fonts/dmsans.woff') format('woff'); font-weight: 100 1000; font-display: swap; }

/* Thème « comptoir » : crème et expresso le jour, presque noir et ambre le soir.
   Clair / sombre : automatique (réglage du téléphone) ou forcé par data-theme="clair" | "sombre" sur <html>. */
:root {
  --bg: #f6f2ea; --panel: #fffdf9; --ink: #1f1a14; --muted: #74695b; --line: #e7dfd2; --brand: #2a211a; --brand-ink: #fbf3e2; --accent: #c4660f; --or: #e8962e; --good: #2e7d4f; --warn: #b7791f; --bad: #c0392b; --chrome: #241c15; --chrome-ink: #fbf3e2;
  --radius: 14px; --shadow: 0 1px 2px rgba(31,26,20,.06), 0 2px 8px rgba(31,26,20,.04);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg);
  font-feature-settings: "tnum" 0; -webkit-font-smoothing: antialiased; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=clair]) { --bg: #13110f; --panel: #1e1a16; --ink: #f3ede4; --muted: #a89c8c; --line: #332c25; --brand: #f0a541; --brand-ink: #1b140c; --accent: #f0a541; --or: #f0a541; --good: #5cc08a; --warn: #e7b04a; --bad: #f07a6a; --chrome: #0e0c0a; --chrome-ink: #fbf3e2; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark; }
}
:root[data-theme=sombre] { --bg: #13110f; --panel: #1e1a16; --ink: #f3ede4; --muted: #a89c8c; --line: #332c25; --brand: #f0a541; --brand-ink: #1b140c; --accent: #f0a541; --or: #f0a541; --good: #5cc08a; --warn: #e7b04a; --bad: #f07a6a; --chrome: #0e0c0a; --chrome-ink: #fbf3e2; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
#app { display: flex; min-height: 100vh; }
#main { flex: 1; min-width: 0; padding: 20px 24px 96px; max-width: 1080px; }
.pad { padding: 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
h1 { font-size: 26px; margin: 4px 0 4px; font-weight: 750; letter-spacing: -.02em; }
h2 { font-size: 16px; margin: 0 0 10px; font-weight: 700; letter-spacing: -.01em; }
.sub { color: var(--muted); margin: 0 0 18px; font-size: 14px; }

/* Navigation : barre latérale sur ordinateur, barre du bas sur téléphone */
#nav { width: 220px; background: var(--panel); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; }
#nav .logo { font-weight: 700; font-size: 18px; padding: 4px 10px 2px; }
#nav .barname { font-size: 12px; color: var(--muted); padding: 0 10px 14px; }
#nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; }
#nav a.on { background: color-mix(in srgb, var(--or) 16%, transparent); color: var(--ink); font-weight: 700; }
#nav a.on .ico { color: var(--accent); }
#nav a .badge { margin-left: auto; }
#nav .spacer { flex: 1; }
#nav .mob { display: none; }
#nav[hidden] { display: none !important; }
.menu-plus { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.menu-plus a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14px; }
#nav select { margin: 0 10px 8px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
@media (max-width: 760px) {
  #app { display: block; }
  #main { padding: 14px 14px 96px; }
  #nav { position: fixed; bottom: 0; left: 0; right: 0; top: auto; width: auto; height: auto; flex-direction: row; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); z-index: 10; }
  #nav .logo, #nav .barname, #nav .spacer, #nav select, #nav .desk { display: none; }
  #nav .mob { display: flex; }
  #nav a { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 4px; flex: 1; text-align: center; }
  #nav a .badge { position: absolute; margin: -2px 0 0 18px; }
}
.ico { width: 20px; height: 20px; flex: none; }

/* Blocs */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.grid .card + .card { margin-top: 0; }
.kpi { font-size: 30px; font-weight: 750; margin: 2px 0; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.badge { display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--accent); color: var(--panel); text-align: center; }
.badge.gray { background: var(--line); color: var(--ink); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; background: var(--line); }
.pill.good { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.pill.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.pill.bad { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.alert { border-left: 4px solid var(--accent); padding: 10px 12px; background: color-mix(in srgb, var(--accent) 7%, var(--panel)); border-radius: 8px; }
.alert.erreur, .alert.z-manquant, .alert.rupture, .alert.pertes { border-color: var(--bad); }
.alert pre { white-space: pre-wrap; margin: 6px 0 0; font: inherit; font-size: 13px; color: var(--muted); }

/* Boutons et champs */
.btn { border: 1px solid var(--line); background: var(--panel); padding: 9px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.good { background: var(--good); color: var(--panel); border-color: var(--good); }
.btn.danger { color: var(--bad); }
.btn.big { width: 100%; justify-content: center; padding: 15px; font-size: 17px; }
.btn:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=email], input[type=number], select, textarea { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 8px 10px; min-width: 0; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
label.f { display: block; font-size: 13px; color: var(--muted); }
label.f > input, label.f > select, label.f > textarea { display: block; width: 100%; margin-top: 4px; color: var(--ink); }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

/* Tableaux */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.neg td { color: var(--bad); }
td input[type=number] { width: 80px; text-align: right; }

/* Comptage mobile */
.count-cat { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 18px 2px 6px; }
.count { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 8px; }
.count.ok { outline: 2px solid var(--good); }
.count .name { font-weight: 600; }
.count .meta { font-size: 13px; color: var(--muted); margin: 2px 0 8px; }
.stepper { display: flex; gap: 8px; }
.stepper button { width: 52px; height: 52px; border-radius: 10px; border: 0; background: color-mix(in srgb, var(--brand) 12%, var(--panel)); font-size: 24px; cursor: pointer; }
.stepper input { flex: 1; height: 52px; font-size: 22px; text-align: center; }
.fracs { display: flex; gap: 6px; margin-top: 8px; }
.fracs button { flex: 1; height: 40px; border: 0; border-radius: 8px; background: color-mix(in srgb, var(--warn) 15%, var(--panel)); cursor: pointer; font-size: 15px; }
.sticky-foot { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; }
@media (max-width: 760px) { .sticky-foot { bottom: 64px; } }

/* Dialogue */
dialog { border: 1px solid var(--line); border-radius: 14px; padding: 20px; background: var(--panel); color: var(--ink); width: min(640px, 94vw); }
dialog::backdrop { background: rgba(0,0,0,.35); }
#toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 20; max-width: 90vw; }
#toast.on { opacity: 1; }
.login { max-width: 380px; margin: 12vh auto; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; }
.tabs a.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
details.recipe { border-bottom: 1px solid var(--line); padding: 8px 0; }
details.recipe summary { cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
code { font-size: 12px; background: var(--line); padding: 2px 5px; border-radius: 4px; word-break: break-all; }

/* Tableaux de commande : colonnes alignées d'un fournisseur à l'autre */
table.cmd { table-layout: fixed; }
table.cmd th:nth-child(1) { width: 30%; } table.cmd th:nth-child(2) { width: 14%; } table.cmd th:nth-child(3) { width: 20%; }
table.cmd th:nth-child(4) { width: 7%; } table.cmd th:nth-child(5) { width: 150px; } table.cmd th:nth-child(6) { width: 14%; }
table.cmd th:nth-child(5), table.cmd td:nth-child(5) { text-align: center; }
table.cmd td:nth-child(6) { padding-left: 14px; }
.pm { flex: none; white-space: nowrap; }
label.check { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 10px; }
label.check input { width: 22px; height: 22px; flex: none; }

table.doc select { max-width: 260px; }
table.doc td input[type=number] { width: 70px; }
label.btn input[type=file] { display: none; }

/* ---------- Fiches : sur téléphone, chaque ligne de tableau devient une carte (pas de défilement horizontal) ---------- */
@media (max-width: 760px) {
  table.fiches, table.fiches tbody, table.fiches tr, table.fiches td { display: block; width: 100%; }
  table.fiches { table-layout: auto; min-width: 0; }
  table.fiches thead { display: none; }
  table.fiches tr { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; background: var(--panel); }
  table.fiches tr[hidden] { display: none; }
  table.fiches td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; min-height: 30px; }
  table.fiches td:empty { display: none; }
  table.fiches td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 13px; text-align: left; flex: none; }
  table.fiches td.titre { display: block; text-align: left; font-weight: 600; font-size: 16px; padding-bottom: 6px; }
  table.fiches td.titre .small { font-weight: 400; }
  table.fiches select { flex: 1; min-width: 0; max-width: none; }
  table.fiches tr.neg { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
  .tablewrap:has(> table.fiches) { overflow: visible; }
}

/* Boutons + / − compacts (commande, réception) */
.pm { display: inline-flex; align-items: center; gap: 4px; }
.pm button { width: 38px; height: 38px; border-radius: 9px; border: 0; background: color-mix(in srgb, var(--brand) 12%, var(--panel)); font-size: 20px; cursor: pointer; line-height: 1; }
.pm input[type=number] { width: 56px; height: 38px; text-align: center; font-size: 16px; }
@media (max-width: 760px) { .pm button { width: 44px; height: 44px; } .pm input[type=number] { width: 60px; height: 44px; font-size: 18px; } }

/* Accueil : à faire en premier, chiffres clés en grille compacte */
.todo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.todo + .todo { margin-top: 0; }
.todo .pastille { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--panel); background: var(--accent); font-size: 15px; }
.todo .pastille.bad { background: var(--bad); } .todo .pastille.info { background: var(--brand); color: var(--brand-ink); }
.todo .txt { flex: 1; min-width: 0; } .todo .txt b { display: block; }
.liste-todo { display: grid; gap: 10px; margin-bottom: 14px; }
.kpis { margin-bottom: 14px; }
.kpis .card { padding: 14px; }
@media (max-width: 760px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpis .kpi { font-size: 22px; }
  .kpis .small { font-size: 12px; }
}

/* Comptage : progression et produits comptés repliés */
.progression { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 8px 0 10px; }
.progression .barre { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progression .barre i { display: block; height: 100%; background: var(--good); width: 0; transition: width .25s; }
.progression .txt { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.count.replie { padding: 10px 12px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.count.replie .meta, .count.replie .stepper, .count.replie .fracs { display: none; }
.count .valeur { display: none; font-weight: 700; color: var(--good); font-size: 17px; }
.count.replie .valeur { display: block; }

/* Stock : jauge par rapport à la cible */
.jauge { display: inline-flex; align-items: center; gap: 8px; min-width: 150px; justify-content: flex-end; }
.jauge .barre { width: 70px; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; flex: none; }
.jauge .barre i { display: block; height: 100%; border-radius: 99px; }
.jauge.bad i { background: var(--bad); } .jauge.warn i { background: var(--warn); } .jauge.good i { background: var(--good); }
.jauge b { font-variant-numeric: tabular-nums; }
.legende { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.legende span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; background: var(--c); }

/* Marges : graphique et palmarès */
.graph svg { width: 100%; height: auto; display: block; }
.graph .axe { stroke: var(--line); } .graph .ligne { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.graph .pt { fill: var(--accent); } .graph text { fill: var(--muted); font-size: 12px; }
.graph svg { max-height: 220px; }
.graph .cible { stroke: var(--good); stroke-dasharray: 4 4; }
.graph .barre.perte { fill: var(--bad); } .graph .barre.surplus { fill: var(--good); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } }
.duo .card + .card { margin-top: 0; }
.palmares { list-style: none; margin: 0; padding: 0; }
.palmares li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.palmares li:last-child { border-bottom: 0; }

/* Écarts groupés par produit */
details.ecart { border-bottom: 1px solid var(--line); }
details.ecart summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; list-style: none; }
details.ecart summary::-webkit-details-marker { display: none; }
details.ecart summary .v { font-weight: 700; font-variant-numeric: tabular-nums; }
details.ecart summary .v.neg { color: var(--bad); }
details.ecart .lignes { padding: 0 0 10px; font-size: 13px; color: var(--muted); }
details.ecart .lignes div { display: flex; justify-content: space-between; padding: 3px 0; }

/* Pastilles du menu */
#nav a { position: relative; }
#nav a .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: auto; }
@media (max-width: 760px) { #nav a .dot { position: absolute; top: 5px; right: calc(50% - 16px); margin: 0; } }
.menu-plus a .badge, .menu-plus a .dot { position: absolute; top: 8px; right: 8px; margin: 0; }
@media (max-width: 760px) { .desk-only { display: none !important; } }
/* Stock : une ligne par produit sur téléphone (nom à gauche, jauge à droite) */
#stocktbl.sous-cible tr[data-n="2"], #stocktbl.sous-cible tr[data-n="3"] { display: none; }
@media (max-width: 760px) {
  table.fiches.compact tr { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 6px; }
  table.fiches.compact tr[hidden] { display: none; }
  table.fiches.compact td { padding: 0; min-height: 0; width: auto; }
  table.fiches.compact td.titre { flex: 1; min-width: 0; font-size: 15px; padding: 0; }
  .jauge { min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 760px) { .kpis.trois { grid-template-columns: 1fr 1fr 1fr; } .kpis.trois .kpi { font-size: 18px; } .kpis.trois .card { padding: 10px; } }
details.ecart summary { flex-wrap: wrap; } details.ecart summary .v { white-space: nowrap; margin-left: auto; }

/* ---------- Marque, démarrage, connexion ---------- */
.marque { font-weight: 800; font-size: 32px; letter-spacing: -.03em; color: var(--chrome-ink); }
.marque span { color: var(--or); }
.demarrage { position: fixed; inset: 0; z-index: 50; background: var(--chrome); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.demarrage img { border-radius: 20px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.94); opacity: .85; } }
.ecran-login { position: fixed; inset: 0; z-index: 10; overflow-y: auto; display: flex; flex-direction: column; align-items: center; background: linear-gradient(var(--chrome) 0 300px, var(--bg) 300px); padding: 0 16px 40px; }
.login-haut { text-align: center; padding: 56px 0 28px; color: var(--chrome-ink); }
.login-haut img { border-radius: 18px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.login-haut .marque { margin-top: 10px; }
.login-haut p { margin: 6px 0 0; opacity: .8; font-size: 14px; }
.ecran-login .login { margin: 0; width: 100%; max-width: 400px; box-shadow: 0 8px 30px rgba(0,0,0,.12); }
#nav .logo { display: flex; align-items: center; gap: 8px; }
@media (max-width: 760px) { #nav .logo { display: none; } }
#nav .logo img { border-radius: 7px; }
#nav .logo span { color: var(--accent); }

/* ---------- Chargement : blocs gris animés, boutons occupés ---------- */
.squelette { animation: apparait .2s ease .15s both; }
@keyframes apparait { from { opacity: 0; } }
.sq { background: linear-gradient(90deg, var(--line) 25%, color-mix(in srgb, var(--line) 45%, var(--panel)) 50%, var(--line) 75%); background-size: 200% 100%; animation: brille 1.2s linear infinite; border-radius: 8px; }
@keyframes brille { to { background-position: -200% 0; } }
.sq.titre { height: 26px; width: 40%; margin: 6px 0 10px; }
.sq.ligne { height: 14px; width: 70%; margin-bottom: 20px; }
.sq.bloc { height: 88px; border-radius: var(--radius); margin-bottom: 12px; }
.sq.bloc.haut { height: 220px; }
.btn.occupe { position: relative; color: transparent !important; pointer-events: none; }
.btn.occupe::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2.5px solid currentColor; border-color: var(--ink) transparent var(--ink) transparent; animation: tourne .7s linear infinite; }
.btn.primary.occupe::after, .btn.good.occupe::after { border-color: #fff transparent #fff transparent; }
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sq, .demarrage img, .btn.occupe::after { animation-duration: 3s; } }
table.cmd th { white-space: normal; vertical-align: bottom; }
@media (min-width: 761px) { .mob-only { display: none; } }
/* Envois en attente (hors ligne) */
#attente { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 30; background: var(--warn); color: var(--panel); padding: 8px 14px; border-radius: 99px; font-size: 13px; box-shadow: var(--shadow); max-width: 92vw; }
#attente.erreur { background: var(--bad); }
#attente a { color: #fff; font-weight: 700; }
@media (max-width: 760px) { #attente { bottom: 78px; } }
.bandeau { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; background: color-mix(in srgb, var(--warn) 15%, var(--panel)); border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line)); }
/* Fiche ingrédient */
form.fiche fieldset { border: 0; padding: 0; margin: 0 0 14px; }
form.fiche legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; padding: 0; }
form.fiche .resume { background: color-mix(in srgb, var(--brand) 7%, var(--panel)); border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; }
form.fiche details summary { cursor: pointer; color: var(--muted); }
form.fiche label.f > input[hidden] { display: none; }
form.fiche label.f > select + input { margin-top: 6px; }

/* Tri des tableaux */
th.triable { cursor: pointer; user-select: none; }
th.triable:hover { color: var(--text, inherit); }
th.triable::after { content: ' ↕'; opacity: .35; font-size: 11px; }
th.tri-asc::after { content: ' ↑'; opacity: 1; }
th.tri-desc::after { content: ' ↓'; opacity: 1; }
select.tri-mob { width: 100%; margin-bottom: 10px; }

/* Fiches cocktails */
.fiches-cocktails { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.fiche h2 { margin: 0 0 8px; font-size: 17px; }
.fiche ul { list-style: none; margin: 0; padding: 0; }
.fiche li { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.fiche li:last-child { border-bottom: 0; }
.fiche li b { min-width: 64px; }
.fiche[hidden] { display: none; }
/* Actions rapides (accueil) */
.actions-rapides { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.actions-rapides .btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; height: auto; text-align: center; }
.actions-rapides .btn svg { width: 26px; height: 26px; }
/* Connexion équipe */
.login .onglets { display: flex; gap: 6px; margin-bottom: 14px; }
.login .onglets button { flex: 1; }
input.pin { font-size: 28px; letter-spacing: 12px; text-align: center; }
.login .onglets button.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

/* Accueil : hier en 10 secondes */
.brief { margin-bottom: 14px; }
.brief h2 { margin: 0; }
.brief-chiffres { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 10px; }
.brief-chiffres .kpi { font-size: 24px; }
.brief .ok { color: var(--good); } .brief .ko { color: var(--bad); }
@media (max-width: 760px) { .brief-chiffres { grid-template-columns: 1fr 1fr; } .brief-chiffres .kpi { font-size: 20px; } }

/* Chiffres clés de l'accueil : accent, tendance */
.brief { border-top: 3px solid var(--or); }
.brief-chiffres > div { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 3%, transparent); }
.spark { display: block; width: 100%; height: 26px; margin-top: 4px; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--accent); }
/* Bouton clair / sombre */
.btn-theme { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 99px; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; flex: none; }
#nav .theme { margin: 6px 10px 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 6px 0; }
@media (max-width: 760px) { #nav .theme { display: none; } }
/* États vides : ce qu'il faut faire pour voir apparaître l'information */
.vide { text-align: center; padding: 22px 12px; color: var(--muted); }
.vide .ico { display: block; width: 34px; height: 34px; color: var(--or); margin: 0 auto 6px; }
.vide b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.vide p { margin: 0 auto 12px; max-width: 420px; font-size: 14px; }

/* Assistant de démarrage */
.etape h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
.etape h2 .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: color-mix(in srgb, var(--or) 22%, transparent); color: var(--ink); flex: none; }
.etape.faite h2 .num { background: var(--good); color: var(--panel); }
.etape > p, .etape > .row, .etape > .tablewrap { margin-top: 10px; }
.etape.faite { opacity: .8; }
table.dem { table-layout: fixed; } table.dem td { white-space: normal; } table.dem td:last-child { white-space: nowrap; overflow: visible; } table.dem td:last-child .row { flex-wrap: nowrap; }
@media (max-width: 760px) { table.dem { table-layout: auto; } }
.alerte-reglage{gap:12px;padding:6px 0;border-bottom:1px solid var(--line)}.alerte-reglage select{min-width:150px}
.alert.prix { border-color: var(--warn); }
