:root {
  --rouge: #930c09; --rouge-clair: #B8322A; --rouge-pale: #F6E3E1;
  --encre: #241A16; --encre-2: #5C4D45; --encre-3: #726259;
  --fond: #F7F3EC; --carte: #FFFFFF; --bord: #E6DED2; --bord-2: #D6CBBB; --creme: #F6E9D2;
  --ok: #276B43; --ok-pale: #E3F1E8; --attention: #935700; --attention-pale: #FBEFD9; --alerte: #B3261E; --alerte-pale: #F9E1DF;
  --gris-serie: #958675; --bord-champ: #958675; --serie: #6B4A3A; --serie-fonce: #4A3226;
  --nav: 64px; --radius: 12px;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font-family: var(--sans); font-size: 16px; line-height: 1.45; font-variant-numeric: tabular-nums; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 15px; color: var(--encre-2); font-weight: 600; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--rouge-clair); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }


/* ---- coque ---- */
.coque { display: grid; grid-template-columns: 1fr; min-height: 100svh; }
aside.menu { display: none; }
main { padding: 16px 16px calc(var(--nav) + 24px + env(safe-area-inset-bottom)); max-width: 1100px; width: 100%; min-width: 0; margin: 0 auto; }
.coque > * { min-width: 0; }
.ecran { display: none; }
.ecran.actif { display: block; }
.entete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.entete .sous { color: var(--encre-3); font-size: 14px; }

nav.bas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--nav) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--carte); border-top: 1px solid var(--bord); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
nav.bas a, nav.bas button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; font-size: 11px; font-weight: 600; color: var(--encre-3); background: none; border: 0; padding: 6px 2px; }
nav.bas a.actif, nav.bas button.actif { color: var(--rouge); }
nav.bas svg { width: 24px; height: 24px; }

.feuille { position: fixed; inset: 0; z-index: 30; background: rgb(36 26 22 / .4); display: none; align-items: flex-end; }
.feuille.ouverte { display: flex; }
.feuille .panneau { background: var(--carte); width: 100%; border-radius: 18px 18px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 80svh; overflow: auto; }
.feuille .panneau h2 { margin-bottom: 8px; }
.feuille a { display: flex; align-items: center; gap: 12px; padding: 12px 6px; text-decoration: none; border-bottom: 1px solid var(--bord); font-weight: 500; }
.feuille a:last-child { border-bottom: 0; }
.feuille a svg { width: 22px; height: 22px; color: var(--rouge); }
.feuille a small { display: block; color: var(--encre-3); font-weight: 400; font-size: 13px; }

@media (min-width: 960px) {
  .coque { grid-template-columns: 240px 1fr; }
  aside.menu { display: flex; flex-direction: column; position: sticky; top: 0; height: 100svh; background: var(--carte); border-right: 1px solid var(--bord); padding: 18px 12px; gap: 2px; }
  aside.menu .marque { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
  aside.menu .marque img { width: 40px; height: 40px; border-radius: 50%; }
  aside.menu .marque b { display: block; font-size: 15px; line-height: 1.15; } aside.menu .marque small { color: var(--encre-3); font-size: 12px; }
  aside.menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; text-decoration: none; font-weight: 500; font-size: 15px; color: var(--encre-2); }
  aside.menu a svg { width: 20px; height: 20px; }
  aside.menu a.actif { background: var(--rouge-pale); color: var(--rouge); font-weight: 600; }
  aside.menu a:hover:not(.actif) { background: var(--fond); }
  aside.menu .pied { margin-top: auto; font-size: 12px; color: var(--encre-3); padding: 8px; }
  nav.bas { display: none; }
  main { padding: 28px 36px 60px; }
  h1 { font-size: 28px; }
}

/* ---- briques ---- */
.grille { display: grid; gap: 12px; }
.grille > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 719px) { .g3 .tuile .valeur { font-size: 19px; } .g3.grille { gap: 8px; } .g3 .carte { padding: 12px 10px; } .g3 .tuile .delta, .g3 .tuile .libelle { font-size: 12px; } }
@media (min-width: 720px) { .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .md-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .md-g32 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--radius); padding: 14px 16px; }
.carte + .carte, .grille + .carte, .carte + .grille, .grille + .grille, .carte + h2, .grille + h2 { margin-top: 12px; }
h2 + .carte, h2 + .grille { margin-top: 8px; }
.grille > .carte + .carte, .grille > .carte + .grille, .grille > .grille + .carte { margin-top: 0; }
.tuile .libelle { font-size: 13px; color: var(--encre-3); font-weight: 500; }
.tuile .valeur { font-size: 26px; font-weight: 700; letter-spacing: -.01em; margin-top: 2px; }
.tuile .delta { font-size: 13px; margin-top: 2px; color: var(--encre-2); }
.tuile .delta.plus { color: var(--ok); } .tuile .delta.moins { color: var(--alerte); }
.hero-chiffre { font-size: 40px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.etiquette { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--fond); color: var(--encre-2); border: 1px solid var(--bord-2); vertical-align: middle; white-space: nowrap; }
.etiquette.reel { background: var(--ok-pale); color: var(--ok); border-color: transparent; }
.etiquette.exemple { background: var(--attention-pale); color: var(--attention); border-color: transparent; }
.etiquette.rouge { background: var(--rouge-pale); color: var(--rouge); border-color: transparent; }
.etiquette.alerte { background: var(--alerte-pale); color: var(--alerte); border-color: transparent; }
.statut { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; }
.statut::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.statut.ok { color: var(--ok); } .statut.attention { color: var(--attention); } .statut.alerte { color: var(--alerte); } .statut.neutre { color: var(--encre-3); }
.note { font-size: 13.5px; color: var(--encre-2); }
.encadre { border-left: 3px solid var(--rouge); background: var(--rouge-pale); border-radius: 0 10px 10px 0; padding: 10px 14px; font-size: 14px; }
.encadre.neutre { border-color: var(--bord-2); background: var(--fond); }
.encadre ul { margin: 6px 0 0; padding-left: 18px; } .encadre li { margin: 3px 0; }
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--bord); }
.liste li:last-child { border-bottom: 0; }
.liste .nom { font-weight: 500; min-width: 0; } .liste .nom small { display: block; color: var(--encre-3); font-size: 12.5px; font-weight: 400; }
.liste .val { font-weight: 600; white-space: nowrap; text-align: right; } .liste .val small { display: block; color: var(--encre-3); font-size: 12px; font-weight: 400; }
.liste li.clic { cursor: pointer; } .liste li.clic:hover { background: var(--fond); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--bord); vertical-align: top; }
th { font-size: 12px; color: var(--encre-3); font-weight: 600; letter-spacing: .01em; }
td.n, th.n { text-align: right; padding-right: 0; padding-left: 8px; white-space: nowrap; }
td.n + td:not(.n), th.n + th:not(.n) { padding-left: 14px; }
tr.total td { font-weight: 700; border-top: 2px solid var(--bord-2); border-bottom: 0; }
@media (max-width: 719px) { .masq { display: none; } }
.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--bord-2); background: var(--carte); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn.plein { background: var(--rouge); color: #fff; border-color: var(--rouge); }
.btn.petit { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.onglets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.onglets button { border: 1px solid var(--bord-2); background: var(--carte); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; color: var(--encre-2); cursor: pointer; }
.onglets button.actif { background: var(--encre); color: #fff; border-color: var(--encre); }
.champ { display: grid; gap: 4px; font-size: 13px; color: var(--encre-2); font-weight: 500; }
.champ input, .champ select { font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid var(--bord-champ); border-radius: 8px; background: var(--carte); color: var(--encre); width: 100%; }
.champ input:focus { border-color: var(--rouge-clair); }
.vide { border: 1.5px dashed var(--bord-2); border-radius: var(--radius); padding: 22px 16px; text-align: center; color: var(--encre-2); }
.vide b { display: block; color: var(--encre); margin-bottom: 4px; }
.coche { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--bord); font-size: 15px; }
.coche:last-child { border-bottom: 0; }
.coche input { width: 20px; height: 20px; accent-color: var(--rouge); }
.coche small { color: var(--encre-3); margin-left: auto; font-size: 12.5px; white-space: nowrap; }
.depot { border: 2px dashed var(--bord-2); border-radius: var(--radius); padding: 26px 16px; text-align: center; background: var(--carte); }
.depot b { display: block; margin-bottom: 4px; }
.fil { display: flex; gap: 6px; flex-wrap: wrap; }
.fil span { font-size: 12.5px; padding: 3px 9px; border-radius: 999px; background: var(--fond); border: 1px solid var(--bord); }
.fil span.on { background: var(--rouge-pale); border-color: transparent; color: var(--rouge); font-weight: 600; }

/* ---- graphiques ---- */
.graph { width: 100%; height: auto; max-height: 300px; display: block; margin: 0 auto; }
.graph text { font-family: var(--sans); font-size: var(--fs, 11px); fill: var(--encre-3); }
.graph .val { fill: var(--encre-2); font-weight: 600; }
.graph .axe { stroke: var(--bord-2); stroke-width: 1; }
.graph rect.b { fill: var(--serie); }
.graph rect.b.pale { fill: var(--gris-serie); }
.graph rect.b.mute { fill: #CBBBA8; }
.graph rect.b:hover { fill: var(--serie-fonce); }
.legende { display: flex; gap: 14px; font-size: 12.5px; color: var(--encre-2); margin: 6px 0 2px; flex-wrap: wrap; }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.barres { display: grid; gap: 8px; }
.barre { display: grid; grid-template-columns: clamp(96px, 30%, 140px) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.barre .nom { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barre .piste { height: 10px; background: var(--fond); border-radius: 5px; overflow: hidden; }
.barre .piste i { display: block; height: 100%; background: var(--serie); border-radius: 5px; }
.barre .piste i.pale { background: var(--gris-serie); }
.barre .piste i.ok { background: var(--ok); } .barre .piste i.attention { background: var(--attention); } .barre .piste i.alerte { background: var(--alerte); }
.barre .v { font-weight: 600; white-space: nowrap; }
.barre small { color: var(--encre-3); font-weight: 400; }
.infobulle { position: fixed; z-index: 50; pointer-events: none; background: var(--encre); color: #fff; font-size: 12.5px; padding: 6px 9px; border-radius: 7px; display: none; white-space: nowrap; }

/* ---- fiche recette imprimable ---- */
.fiche { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--radius); padding: 18px; }
.fiche header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 2px solid var(--encre); padding-bottom: 10px; margin-bottom: 12px; }
.fiche h2 { font-size: 22px; }
.fiche .meta { font-size: 13px; color: var(--encre-2); }
.allergenes { display: flex; flex-wrap: wrap; gap: 6px; }
.allergenes span { font-size: 12.5px; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--bord-2); color: var(--encre-3); }
.allergenes span.oui { background: var(--rouge); color: #fff; border-color: var(--rouge); font-weight: 600; }
ol.etapes { margin: 0; padding-left: 20px; } ol.etapes li { margin: 5px 0; }
@media print {
  body { background: #fff; } nav.bas, aside.menu, .entete > :not(:first-child), .no-print, .onglets, .barre-export { display: none !important; }
  .defile { overflow: visible !important; } table { font-size: 11pt; } tr { break-inside: avoid; } .carte { box-shadow: none; }
  main { padding: 0; max-width: none; } .ecran { display: none !important; } .ecran.actif { display: block !important; }
  .fiche { border: 0; padding: 0; } .carte { break-inside: avoid; }
}
@media (prefers-reduced-motion: no-preference) { .barre .piste i { transition: width .5s cubic-bezier(.16,1,.3,1); } }

/* ---- application ---- */
.sousnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.sousnav::-webkit-scrollbar { display: none; }
.sousnav a { flex: none; text-decoration: none; border: 1px solid var(--bord-2); background: var(--carte); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; color: var(--encre-2); }
.sousnav a.actif { background: var(--encre); color: #fff; border-color: var(--encre); }
.constat { font-size: 17px; line-height: 1.4; font-weight: 500; margin: 0 0 14px; max-width: 70ch; }
.constat b { font-weight: 700; }
.barre-periode { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.barre-periode select, .barre-periode input { font: inherit; font-size: 16px; padding: 7px 9px; border: 1px solid var(--bord-champ); border-radius: 8px; background: var(--carte); color: var(--encre); max-width: 100%; }
.alertes { list-style: none; margin: 0; padding: 0; }
.alertes li { border-bottom: 1px solid var(--bord); }
.alertes li:last-child { border-bottom: 0; }
.alertes a { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; padding: 12px 2px; text-decoration: none; }
.alertes a::after { content: "›"; color: var(--encre-3); font-size: 20px; }
.alertes .pt { width: 10px; height: 10px; border-radius: 50%; background: var(--encre-3); }
.alertes .grave .pt { background: var(--alerte); } .alertes .moyen .pt { background: var(--attention); }
.alertes b { display: block; font-weight: 600; } .alertes small { color: var(--encre-2); font-size: 13.5px; }
.rangs { list-style: none; margin: 0; padding: 0; }
.rangs > li { border-bottom: 1px solid var(--bord); }
.rangs > li:last-child { border-bottom: 0; }
.rangs :is(summary, .rang-seul) { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 11px 0; cursor: pointer; list-style: none; }
.rangs summary::-webkit-details-marker { display: none; }
.rangs :is(summary, .rang-seul) .nom { font-weight: 500; min-width: 0; } .rangs :is(summary, .rang-seul) .nom small { display: block; color: var(--encre-3); font-size: 12.5px; font-weight: 400; }
.rangs :is(summary, .rang-seul) .val { font-weight: 600; white-space: nowrap; text-align: right; } .rangs :is(summary, .rang-seul) .val small { display: block; color: var(--encre-3); font-size: 12px; font-weight: 400; }
.rangs dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0 0 12px; font-size: 14px; color: var(--encre-2); }
.rangs summary .val::after { content: '▾'; display: inline-block; margin-left: 6px; color: var(--encre-3); font-weight: 400; } .rangs details[open] summary .val::after { content: '▴'; }
.rangs summary .val small { display: block; } .rangs .rang-action { margin: 0 0 12px; text-align: right; }
.rangs dd { margin: 0; text-align: right; font-weight: 600; color: var(--encre); }
tr.clic { cursor: pointer; } tr.clic:hover td { background: var(--fond); }
td input.cellule, td select.cellule { font: inherit; font-size: 16px; padding: 5px 7px; border: 1px solid var(--bord-champ); border-radius: 6px; background: var(--carte); width: 100%; min-width: 64px; }
td input.cellule.n { text-align: right; width: 84px; }
dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100svh - 24px); background: var(--carte); color: var(--encre); }
dialog::backdrop { background: rgb(36 26 22 / .45); }
dialog form { padding: 18px; display: grid; gap: 12px; }
dialog h2 { margin-bottom: 2px; }
dialog .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
dialog .actions .gauche { margin-right: auto; }
.champ textarea { font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid var(--bord-champ); border-radius: 8px; background: var(--carte); color: var(--encre); width: 100%; min-height: 72px; resize: vertical; }
.champ.ligne { display: flex; align-items: center; gap: 10px; } .champ.ligne input { width: 22px; height: 22px; accent-color: var(--rouge); }
.btn.danger { color: var(--alerte); border-color: #C8645D; }
.btn:disabled { opacity: .5; cursor: default; }
.gros { min-height: 56px; font-size: 17px; text-align: center; }
.saisie-temp { display: grid; grid-template-columns: 1fr 92px 92px; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--bord); }
.saisie-temp:last-child { border-bottom: 0; }
.saisie-temp input { font: inherit; font-size: 18px; text-align: center; padding: 10px 4px; border: 1.5px solid var(--bord-champ); border-radius: 10px; width: 100%; background: var(--carte); }
.saisie-temp input.alerte { border-color: var(--alerte); background: var(--alerte-pale); color: var(--alerte); font-weight: 700; }
.saisie-temp input.ok { border-color: var(--ok); }
.saisie-temp .nom small { display: block; color: var(--encre-3); font-size: 12.5px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav) + 18px + env(safe-area-inset-bottom)); z-index: 60; background: var(--encre); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: calc(100vw - 32px); }
.toast.erreur { background: var(--alerte); }
.attente { padding: 60px 16px; text-align: center; color: var(--encre-3); }
.confiance { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--fond); border: 1px solid var(--bord-2); color: var(--encre-2); }
.confiance.haut { background: var(--ok-pale); color: var(--ok); border-color: transparent; } .confiance.bas { background: var(--attention-pale); color: var(--attention); border-color: transparent; }
.connexion { min-height: 100svh; display: grid; place-items: center; padding: 20px; }
.connexion form { width: min(380px, 100%); background: var(--carte); border: 1px solid var(--bord); border-radius: 16px; padding: 26px 22px; display: grid; gap: 14px; text-align: center; }
.connexion img { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto; }
.connexion .err { color: var(--alerte); font-size: 14px; min-height: 20px; }
@media (min-width: 960px) { .sousnav { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; } .toast { bottom: 24px; } }
@media print { .sousnav, .barre-periode, .toast, dialog { display: none !important; } }
h2 + .constat, h2 + .note, h2 + p { margin-top: 8px; }
.barre-periode + h2 { margin-top: 4px; }

/* Facture d'origine, à côté des lignes sur grand écran, au-dessus sinon */
.origine summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.origine iframe { width: 100%; height: 70vh; border: 1px solid var(--bord); border-radius: 8px; margin-top: 10px; background: #fff; }
.origine .photo { max-height: 70vh; overflow: auto; margin-top: 10px; border: 1px solid var(--bord); border-radius: 8px; }
.origine .photo img { display: block; width: 100%; }
@media (min-width: 1400px) {
  .verif { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
  .verif > .carte { margin-top: 12px; }
  .verif .origine { position: sticky; top: 12px; }
  .verif .origine iframe, .verif .origine .photo { height: calc(100vh - 110px); max-height: none; }
}
@media print { .origine { display: none; } }

/* Lecture de factures en lot */
.lot { margin-bottom: 12px; }
.lot progress { width: 100%; height: 6px; margin: 10px 0 6px; accent-color: var(--rouge); }
.lot-liste { max-height: 320px; overflow: auto; margin-top: 8px; }
.lot-liste .nom { overflow-wrap: anywhere; }

/* Lecture par l'IA en cours. Sans animation, tout reste lisible : texte « en cours » et compteur de secondes. */
.scan { position: relative; overflow: hidden; border-radius: 8px; margin-top: 10px; }
.scan iframe, .scan .photo { margin-top: 0; display: block; }
.scan .photo { pointer-events: none; overflow: hidden; }
.scan-ligne { display: none; }
.squelettes > div { display: flex; gap: 14px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--bord); }
.squelettes > div > :first-child { margin-right: auto; }
.squelette { display: block; height: 14px; border-radius: 4px; background: var(--bord); }
@media (prefers-reduced-motion: no-preference) {
  .scan-ligne { display: block; position: absolute; left: 0; right: 0; top: 0; height: 110px; pointer-events: none;
    background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--rouge) 16%, transparent) 88%, var(--rouge) 97%, transparent);
    animation: scanner 2.8s cubic-bezier(.4, 0, .6, 1) infinite; }
  .squelette { background: linear-gradient(100deg, var(--bord) 0 40%, var(--fond) 50%, var(--bord) 60% 100%) 0 0 / 300% 100%; animation: balayer 1.6s linear infinite; }
  .lot-liste li[data-etat="cours"] { background: linear-gradient(100deg, transparent 0 30%, var(--rouge-pale) 50%, transparent 70% 100%) 100% 0 / 200% 100%; animation: passer 1.8s linear infinite; }
  .lot-liste li[data-etat="cours"] .statut::before { animation: battre .9s ease-in-out infinite alternate; }
}
@keyframes scanner { from { top: -110px; } to { top: 100%; } }
@keyframes balayer { to { background-position: -150% 0; } }
@keyframes passer { to { background-position: -100% 0; } }
@keyframes battre { from { opacity: .3; } to { opacity: 1; } }

/* bandeau Imprimer / Télécharger au-dessus d'un tableau */
.barre-export { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; margin: 2px 0 8px; }

/* cibles tactiles : 44 px au doigt, focus visible sur les boutons d'import (label autour d'un input masqué) */
@media (pointer: coarse) { .btn, .btn.petit { min-height: 44px; } .onglets button, .sousnav a { min-height: 40px; } }
label:has(input.sr:focus-visible) { outline: 3px solid var(--rouge-clair); outline-offset: 2px; }
tr.clic:focus-visible td { background: var(--fond); }
.rang-seul[role=button] { cursor: pointer; }
.pied-session { margin: 28px 0 0; text-align: center; font-size: 14px; color: var(--encre-3); }
.pied-session .lien { background: none; border: 0; padding: 8px 4px; color: var(--encre-2); text-decoration: underline; cursor: pointer; font-weight: 600; }
@media (min-width: 960px) { .pied-session { display: none; } }

/* calendrier des commandes */
.cal-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cal-tete b { font-size: 16px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-js { font-size: 12px; color: var(--encre-3); text-align: center; font-weight: 600; padding-bottom: 2px; }
.cal-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-j { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; min-height: 64px; padding: 6px 2px; border: 1px solid var(--bord); border-radius: 8px; background: var(--carte); cursor: pointer; font: inherit; color: var(--encre); }
.cal.semaine .cal-j { min-height: 60px; }
.cal-j.hors { color: var(--encre-3); background: var(--fond); }
.cal-j.auj .num { background: var(--encre); color: #fff; border-radius: 999px; padding: 0 7px; }
.cal-j.choisi { border: 2px solid var(--rouge); padding: 5px 1px; }
.cal-j .num { font-weight: 600; font-size: 15px; line-height: 1.5; }
.cal-j .nb { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: var(--fond); color: var(--encre-2); }
.cal-j .nb.attention { background: var(--attention-pale); color: var(--attention); }
.cal-j .nb.alerte { background: var(--alerte-pale); color: var(--alerte); }
.cal-j .nb.ok { background: var(--ok-pale); color: var(--ok); }
.liste li.remise { opacity: .65; }

/* pesée d'assaisonnement : gros chiffres lisibles à bout de bras, ligne cochée grisée */
.assai-poids { font-size: 22px !important; font-weight: 600; }
.assai-table td, .assai-table th { padding: 10px 6px; vertical-align: top; }
.assai-table th:first-child, .assai-table td:first-child { padding-left: 0; }
.assai-table th:last-child, .assai-table td:last-child { padding-right: 0; width: 34px; }
.assai-table td small { color: var(--encre-3); font-size: 12.5px; }
.assai-table .assai-qte { font-size: 19px; font-weight: 700; white-space: nowrap; }
.assai-table .assai-libre { white-space: normal; text-align: right; min-width: 80px; }
.assai-table td.n:not(.assai-libre) { white-space: nowrap; }
.assai-coche { width: 26px; height: 26px; accent-color: var(--rouge); }
.assai-table tr:has(.assai-coche:checked) td { opacity: .4; text-decoration: line-through; }
.assai-viandes { display: grid; gap: 6px; }
.assai-viandes label { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.assai-viandes small { color: var(--encre-3); }
