@font-face { font-family: Barlow; src: url(/fonts/barlow-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Barlow; src: url(/fonts/barlow-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Barlow; src: url(/fonts/barlow-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(/fonts/barlow-condensed-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(/fonts/barlow-condensed-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --fond: #E9F0EE; --carte: #FFFFFF; --bord: #C3CFCB; --bord-champ: #5F706C;
  --encre: #10302F; --doux: #44605C; --action: #0B6E63; --focus-sombre: #FFB347; --mangue: #FF9F1C;
  --ok: #166534; --ok-f: #DCFCE7; --attention: #92400E; --attention-f: #FEF3C7;
  --danger: #991B1B; --danger-f: #FEE2E2; --info: #115E59; --info-f: #CCFBF1;
  --neutre: #2F4845; --neutre-f: #DCE5E2;
  --titre: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-bottom: 88px; scroll-padding-top: 16px; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 16px/1.45 Barlow, system-ui, -apple-system, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; padding-bottom: 80px; }
body.sans-onglets { padding-bottom: 16px; }
h1, h2, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--action); }
small { font-size: 14px; color: var(--doux); }
:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }
.balance :focus-visible { outline-color: var(--focus-sombre); }
.invisible { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.entete { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--carte); border-bottom: 1px solid var(--bord); padding: 8px 16px; min-height: 60px; }
.entete h1 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; }
.compte { display: flex; align-items: center; gap: 12px; font-size: 14px; flex: none; }
.compte a { display: inline-flex; min-height: 44px; align-items: center; color: var(--doux); }
main { max-width: 720px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
h2 { font-size: 18px; line-height: 1.3; }

.carte { display: block; background: var(--carte); border: 1px solid var(--bord); border-radius: 12px; padding: 16px; color: inherit; text-decoration: none; }
.carte > * + * { margin-top: 8px; }
a.carte:hover { border-color: var(--action); }
.balance { background: var(--encre); color: #fff; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.balance h2 { color: #CFE0DC; font-size: 14px; font-weight: 600; }
.balance p { color: #CFE0DC; font-size: 14px; }
.balance strong { color: #fff; white-space: nowrap; }
.balance .grand { color: #fff; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.moyen { font-size: 22px; font-weight: 800; line-height: 1.2; }
.fin { font-size: 14px; color: var(--doux); }
.fin.alerte { color: var(--attention); font-weight: 700; display: block; }
.grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.chiffre h2 { font-size: 14px; color: var(--doux); font-weight: 600; }
.chiffre > * + * { margin-top: 4px; }

.liste { display: flex; flex-direction: column; gap: 12px; }
.titre-liste { margin-bottom: 8px; }
.ligne { display: flex; flex-direction: column; gap: 8px; }
.ligne > * + * { margin-top: 0; }
.haut, .bas { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bas { font-size: 14px; color: var(--doux); }
.rangs li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--bord); }
.rangs li:first-child { border-top: 0; }
.rangs a { flex: 1; display: flex; align-items: center; min-height: 44px; color: inherit; }
.rangs li:has(a) { padding: 2px 0; }
.fin a, .bas a { display: inline-flex; align-items: center; min-height: 44px; }
.liens a { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; padding: 8px 0; border-top: 1px solid var(--bord); color: inherit; text-decoration: none; }
.liens a::after { content: "›"; font-size: 20px; color: var(--doux); }
.liens li:first-child a { border-top: 0; }
.vide { color: var(--doux); font-size: 14px; }
.titre-tache { display: flex; align-items: center; min-height: 44px; color: inherit; font-weight: 700; }

.badge { flex: none; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.ok { color: var(--ok); background: var(--ok-f); } .attention { color: var(--attention); background: var(--attention-f); }
.danger { color: var(--danger); background: var(--danger-f); } .info { color: var(--info); background: var(--info-f); }
.neutre { color: var(--neutre); background: var(--neutre-f); }

button, .bouton { font: inherit; font-weight: 700; min-height: 48px; border-radius: 8px; border: 1px solid transparent; padding: 8px 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; width: 100%; }
.principal { background: var(--action); color: #fff; }
.secondaire { background: var(--carte); color: var(--encre); border-color: var(--bord-champ); }
.lien { background: none; color: var(--doux); width: auto; min-height: 44px; padding: 0 4px; font-size: 14px; text-decoration: underline; font-weight: 500; }

.filtres { display: flex; flex-wrap: wrap; gap: 8px; }
.filtres a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--bord-champ); border-radius: 999px; background: var(--carte); color: var(--encre); font-size: 14px; font-weight: 600; text-decoration: none; }
.filtres a[aria-current] { background: var(--encre); border-color: var(--encre); color: #fff; }
.recherche { display: flex; gap: 8px; }
.recherche button { width: auto; flex: none; }

.formulaire { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.case { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 500; }
.case input { width: 24px; min-height: 24px; height: 24px; flex: none; }
.bouton.appel, button.petit { width: auto; flex: none; }
label { font-size: 14px; font-weight: 600; }
input, select { font: inherit; width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--bord-champ); border-radius: 8px; background: #fff; color: var(--encre); }
input[type="file"] { padding: 10px; }
fieldset.ligne-produit { border: 1px solid var(--bord); border-radius: 8px; padding: 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
legend { font-size: 14px; color: var(--doux); padding: 0 4px; }
summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: 8px; }
summary::before { content: "+"; font-size: 20px; color: var(--action); width: 16px; }
details[open] > summary::before { content: "–"; }

.popup-payeur { position: fixed; inset: 0; z-index: 100; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 16px; border: 0; background: rgba(69, 10, 10, .75); }
.popup-payeur[open] { display: flex; align-items: center; justify-content: center; }
.popup-payeur::backdrop { background: transparent; }
.popup-payeur .boite { width: 100%; max-width: 480px; max-height: 100%; overflow: auto; padding: 24px; border-radius: 12px; background: #B91C1C; color: #fff; font-size: 17px; box-shadow: 0 12px 40px rgba(0, 0, 0, .4); }
.popup-payeur h2 { margin: 0 0 12px; color: #fff; font-size: 24px; line-height: 1.2; }
.popup-payeur p { margin: 0 0 12px; color: #fff; }
.popup-payeur .signal { width: 48px; height: 48px; border-radius: 50%; background: #fff; color: #B91C1C; font-size: 32px; font-weight: 800; line-height: 48px; text-align: center; }
.popup-payeur button { width: 100%; min-height: 48px; border: 0; border-radius: 8px; background: #fff; color: #991B1B; font-weight: 700; font-size: 16px; cursor: pointer; }
.bandeau-payeur { padding: 16px; border-radius: 12px; background: #B91C1C; color: #fff; }
.bandeau-payeur h2 { margin: 0 0 8px; color: #fff; font-size: 18px; }
.bandeau-payeur p { margin: 0; color: #fff; }
.encart-rupture { padding: 12px; border-radius: 10px; border: 2px solid #B91C1C; display: flex; flex-direction: column; gap: 8px; }
.encart-rupture p { margin: 0; }
.note { border-radius: 8px; padding: 12px; font-size: 14px; font-weight: 600; }
.note.ok { background: var(--ok-f); color: var(--ok); } .note.ko { background: var(--danger-f); color: var(--danger); }
.iban { font-weight: 700; word-break: break-word; }

.etapes li { padding: 6px 0 6px 24px; position: relative; color: var(--doux); }
.etapes li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--bord-champ); }
.etapes .fait { color: var(--encre); } .etapes .fait::before { background: var(--ok); border-color: var(--ok); }
.etapes .actuel { color: var(--encre); font-weight: 700; } .etapes .actuel::before { background: var(--action); border-color: var(--action); }

.rang-bloc { padding: 8px 0; border-top: 1px solid var(--bord); }
.rang-bloc:first-child { border-top: 0; }
.photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.photos img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--bord); }

.onglets { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--carte); border-top: 1px solid var(--bord); }
.onglets a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; font-size: 12px; font-weight: 700; color: var(--doux); text-decoration: none; }
.onglets a[aria-current] { color: var(--action); box-shadow: inset 0 3px 0 var(--action); }
.marque { display: none; }
.onglets svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 960px) {
  body { padding: 0 0 0 220px; }
  body.sans-onglets { padding: 0; }
  main { max-width: 1040px; padding: 24px; gap: 16px; }
  .entete { padding: 8px 24px; }
  .onglets { top: 0; right: auto; width: 220px; grid-template-columns: 1fr; align-content: start; gap: 4px; padding: 16px 8px; border-top: 0; border-right: 1px solid var(--bord); }
  .onglets a { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 8px; font-size: 16px; }
  .onglets a[aria-current] { background: #DBEAFE; box-shadow: none; }
  .marque { display: block; padding: 0 12px 12px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--encre); }
  .grille { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .liste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .liste > .vide { grid-column: 1 / -1; }
  .formulaire { max-width: 560px; }
  body.sans-onglets main { max-width: 720px; }
  body.sans-onglets .liste { display: flex; }
  body.sans-onglets .entete { padding-inline: max(24px, calc(50vw - 336px)); }
}

/* Identité Camio : la route et le quai de chargement. */
h1, h2, .moyen, .balance .grand, .marque, .logo { font-family: var(--titre); }
h2 { font-weight: 700; font-size: 20px; letter-spacing: 0.01em; }
.chiffre h2, .balance h2 { font-family: Barlow, system-ui, sans-serif; }
.moyen { font-size: 28px; font-weight: 700; letter-spacing: 0; }
.chiffre .moyen { font-size: clamp(22px, 6.5vw, 28px); white-space: nowrap; }
.balance .grand { font-size: 44px; font-weight: 700; letter-spacing: 0; line-height: 1.05; }
.entete { background: var(--encre); border-bottom: 0; }
.entete h1 { color: #fff; font-size: 26px; font-weight: 700; letter-spacing: 0.01em; text-transform: uppercase; }
.entete :focus-visible { outline-color: var(--focus-sombre); }
.compte a, .entete .lien { color: #CFE0DC; }
.balance { position: relative; padding-bottom: 24px; overflow: hidden; }
.balance::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 3px;
  background: repeating-linear-gradient(90deg, var(--mangue) 0 22px, transparent 22px 36px); }
.quais { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.quai { height: 34px; border: 2px dashed var(--bord-champ); border-radius: 6px; }
.quai.plein { border: 2px solid var(--encre); background: var(--mangue) url(/camion.svg) center / min(22px, 80%) auto no-repeat; }
.etapes { position: relative; }
.etapes::before { content: ""; position: absolute; left: 8px; top: 12px; bottom: 16px; width: 4px;
  background: repeating-linear-gradient(180deg, var(--bord-champ) 0 10px, transparent 10px 16px); }
.etapes li { padding-left: 32px; }
.etapes li::before { left: 2px; }
.etapes .actuel::before { left: -5px; top: 3px; width: 26px; height: 26px; border: 2px solid var(--encre); background: var(--mangue) url(/camion.svg) center / 18px no-repeat; }
.logo { display: flex; align-items: center; gap: 12px; font-size: 52px; font-weight: 700; line-height: 1; letter-spacing: 0.01em; color: var(--encre); }
.logo img { width: 52px; height: 52px; }
.onglets a[aria-current] { box-shadow: inset 0 4px 0 var(--mangue); color: var(--encre); }
.filtres a[aria-current] { background: var(--encre); border-color: var(--encre); }
.principal { background: var(--action); }
.principal:hover { background: #095C53; }
@media (min-width: 960px) {
  .onglets { background: var(--encre); border-right: 0; }
  .onglets a { color: #CFE0DC; }
  .onglets a[aria-current] { background: rgba(255, 255, 255, 0.1); box-shadow: inset 4px 0 0 var(--mangue); color: #fff; }
  .marque { color: #fff; font-size: 30px; letter-spacing: 0.02em; }
  .onglets :focus-visible { outline-color: var(--focus-sombre); }
}
@media (min-width: 960px) {
  .liste > li > .carte { height: 100%; }
  .grille { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  body.sans-onglets .formulaire { max-width: none; }
  main > .bouton { max-width: 560px; }
  .carte > .bouton, .carte form > .principal, .carte form > .secondaire:not(.petit) { width: auto; min-width: 280px; }
}
@media (prefers-reduced-motion: no-preference) {
  .etapes .actuel::before { transition: transform 0.2s ease; }
}
.total { font-weight: 700; color: var(--encre); min-height: 20px; }
.titre-texte { font-size: 28px; color: var(--encre); }
.carte h2 + p { margin-top: 4px; }

/* Tableau de bord du DG : il profite de la largeur d'un écran d'ordinateur. */
.deux-colonnes { display: grid; gap: 12px; }
.marche { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; list-style: decimal; }
.deux-colonnes .rang-bloc { display: block; }
.deux-colonnes .rang-bloc p { margin: 6px 0 0; }
.defile { overflow-x: auto; }
.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau th { text-align: left; padding: 8px; border-bottom: 2px solid var(--bord); white-space: nowrap; }
.tableau td { padding: 8px; border-bottom: 1px solid var(--bord); vertical-align: top; }
.tableau .nombre { text-align: right; white-space: nowrap; }
.tableau td.alerte { color: var(--danger); font-weight: 700; }
.graphe { width: 100%; height: auto; }
.graphe text { font-size: 13px; fill: var(--encre); }
.graphe .axe { stroke: var(--bord); }
.barre-ventes, .pastille.ventes { fill: var(--info); background: var(--info); }
.barre-encaisse, .pastille.encaisse { fill: var(--ok); background: #86C49A; }
.barre-encaisse { fill: #86C49A; }
.pastille { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin: 0 6px 0 12px; }
.legende { margin: 8px 0 0; font-size: 14px; }
@media (min-width: 960px) {
  body.large main { max-width: 1400px; }
  .deux-colonnes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Finition : des surfaces calmes, pour que seuls les chiffres et les alertes ressortent. */
:root { --fond: #EEF3F1; --bord: #D5DFDB; --ombre: 0 1px 2px rgba(16, 48, 47, .06), 0 6px 18px rgba(16, 48, 47, .05); }
.carte { border-color: transparent; border-radius: 14px; box-shadow: var(--ombre); }
a.carte { transition: box-shadow .15s ease, transform .15s ease; }
a.carte:hover { border-color: transparent; box-shadow: 0 2px 4px rgba(16, 48, 47, .08), 0 12px 28px rgba(16, 48, 47, .1); transform: translateY(-1px); }
.balance { border-radius: 14px; box-shadow: var(--ombre); }
.chiffre { position: relative; overflow: hidden; }
.chiffre::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--mangue); }
.chiffre h2 { text-transform: uppercase; font-size: 12px; letter-spacing: .06em; }
main > section > .titre-liste, .titre-liste { font-size: 22px; }
button, .bouton { transition: background-color .15s ease, border-color .15s ease; }
.secondaire:hover { border-color: var(--action); color: var(--action); }
input:hover, select:hover { border-color: var(--action); }
.badge { letter-spacing: .01em; }
.tableau th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--doux); }
.tableau tbody tr:hover { background: var(--fond); }
.barre-ventes { fill: var(--encre); } .pastille.ventes { background: var(--encre); }
.barre-encaisse { fill: var(--mangue); } .pastille.encaisse { background: var(--mangue); }
@media (min-width: 960px) {
  .marque { display: flex; align-items: center; gap: 10px; padding-bottom: 20px; }
  .marque::before { content: ""; width: 28px; height: 28px; background: url(/favicon.svg) center / contain no-repeat; }
  .entete { background: var(--fond); }
  .entete h1 { color: var(--encre); font-size: 32px; }
  .compte a, .entete .lien { color: var(--doux); }
  .entete :focus-visible { outline-color: var(--action); }
}

/* Page d'accueil : le plan de chargement d'un camion est l'image de la marque. */
body.plein { background: var(--encre); padding: 0; }
body.plein main { max-width: none; padding: 0; gap: 0; }
.vitrine { color: #fff; padding: 24px 16px 32px; display: flex; flex-direction: column; gap: 24px; }
.vitrine .logo { color: #fff; font-size: 34px; }
.vitrine .logo img { width: 36px; height: 36px; }
.surtitre { color: var(--mangue); font-weight: 600; font-size: 14px; }
.slogan { font-family: var(--titre); font-size: clamp(44px, 11vw, 92px); line-height: .98; font-weight: 700; letter-spacing: 0; text-transform: uppercase; margin-top: 8px; }
.promesse { color: #CFE0DC; font-size: 18px; max-width: 34em; margin-top: 12px; }
.camion { display: flex; align-items: stretch; gap: 4px; max-width: 760px; }
.remorque { flex: 1; display: grid; grid-template-columns: repeat(14, 1fr); grid-template-rows: repeat(2, 1fr); grid-auto-flow: column; gap: 3px; padding: 6px; border: 2px solid #5B8079; border-radius: 6px; }
.remorque i { aspect-ratio: 1; border-radius: 2px; background: var(--mangue); }
.remorque i:nth-child(3n) { background: #F25C54; }
.remorque i:nth-child(5n) { background: #F7D08A; }
.remorque i:nth-child(7n + 1) { background: #8ACB88; }
.cabine { width: 9%; border-radius: 4px 14px 14px 4px; background: #5B8079; }
.preuves { display: grid; gap: 12px; }
.preuves li { display: flex; flex-direction: column; color: #CFE0DC; border-top: 1px solid #3B5C57; padding-top: 10px; }
.preuves strong { color: #fff; font-family: var(--titre); font-size: 20px; }
.acces { background: var(--fond); padding: 24px 16px 32px; display: flex; flex-direction: column; gap: 12px; }
.acces .formulaire { background: var(--carte); border-radius: 14px; padding: 20px; box-shadow: var(--ombre); margin: 0; width: 100%; max-width: 440px; }
.acces h2 { font-size: 28px; }
.acces .fin { max-width: 440px; width: 100%; }
.vitrine :focus-visible { outline-color: var(--focus-sombre); }
@media (min-width: 960px) {
  body.plein main { display: grid; grid-template-columns: minmax(0, 1fr) 460px; min-height: 100vh; }
  .vitrine { padding: 40px 56px; justify-content: space-between; }
  .acces { justify-content: center; align-items: center; padding: 32px; }
  .preuves { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .preuves li { font-size: 15px; }
}
@media (prefers-reduced-motion: no-preference) {
  .remorque i { animation: chargement .35s ease both; }
  @keyframes chargement { from { opacity: 0; transform: translateX(-10px); } }
.remorque i:nth-child(1), .remorque i:nth-child(2) { animation-delay: 0ms; }
.remorque i:nth-child(3), .remorque i:nth-child(4) { animation-delay: 55ms; }
.remorque i:nth-child(5), .remorque i:nth-child(6) { animation-delay: 110ms; }
.remorque i:nth-child(7), .remorque i:nth-child(8) { animation-delay: 165ms; }
.remorque i:nth-child(9), .remorque i:nth-child(10) { animation-delay: 220ms; }
.remorque i:nth-child(11), .remorque i:nth-child(12) { animation-delay: 275ms; }
.remorque i:nth-child(13), .remorque i:nth-child(14) { animation-delay: 330ms; }
.remorque i:nth-child(15), .remorque i:nth-child(16) { animation-delay: 385ms; }
.remorque i:nth-child(17), .remorque i:nth-child(18) { animation-delay: 440ms; }
.remorque i:nth-child(19), .remorque i:nth-child(20) { animation-delay: 495ms; }
.remorque i:nth-child(21), .remorque i:nth-child(22) { animation-delay: 550ms; }
.remorque i:nth-child(23), .remorque i:nth-child(24) { animation-delay: 605ms; }
.remorque i:nth-child(25), .remorque i:nth-child(26) { animation-delay: 660ms; }
.remorque i:nth-child(27), .remorque i:nth-child(28) { animation-delay: 715ms; }
}

.barre-vitrine { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.vers-acces { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 8px; background: var(--mangue); color: var(--encre); font-weight: 700; text-decoration: none; }
.slogan span { display: block; }
.slogan span + span { color: var(--mangue); }
@media (min-width: 960px) {
  .vers-acces { display: none; }
  .slogan { font-size: clamp(56px, 5.4vw, 92px); }
}

/* Recherche dans l'en-tête, scan des lots. */
.entete { flex-wrap: wrap; }
.recherche-globale { order: 3; flex-basis: 100%; padding-bottom: 4px; }
.recherche-globale input { min-height: 40px; }
.fenetre-scan { border: 0; border-radius: 12px; padding: 16px; width: min(92vw, 480px); }
.fenetre-scan::backdrop { background: rgba(16, 48, 47, .7); }
.fenetre-scan video { width: 100%; border-radius: 8px; background: var(--encre); margin-block: 12px; }
@media (min-width: 960px) {
  .entete { flex-wrap: nowrap; }
  .recherche-globale { order: 0; flex: 1; flex-basis: auto; max-width: 360px; padding-bottom: 0; }
}

/* Catalogue client : un produit par ligne, − et + autour du nombre de palettes. */
.catalogue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.catalogue .article { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--bord); padding: 8px 0; }
.plusmoins { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.plusmoins input { width: 64px; text-align: center; }
.plusmoins button { min-width: 44px; min-height: 44px; font-size: 20px; }
form.enligne { display: inline; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tuiles .carte p { margin: 0; }
.stat-periodes { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-barres { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; align-items: stretch; height: 170px; padding-top: 8px; }
.stat-barre { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.stat-barre .tige { width: 100%; max-width: 44px; min-height: 2px; background: var(--action); border-radius: 4px 4px 0 0; }
.stat-barre:last-child .tige { background: var(--mangue); }
.stat-barre .tige.negatif { background: var(--danger); }
.stat-barre .valeur { font-size: 12px; font-weight: 600; white-space: nowrap; }
.stat-barre .mois { font-size: 12px; color: var(--doux); }
.tableau tr.zero td { color: var(--doux); }
.stat-periodes .bouton { width: auto; flex: none; margin: 0; padding-inline: 14px; }
.stat-barre .tige.h0 { height: 0.0%; }
.stat-barre .tige.h1 { height: 3.6%; }
.stat-barre .tige.h2 { height: 7.2%; }
.stat-barre .tige.h3 { height: 10.8%; }
.stat-barre .tige.h4 { height: 14.4%; }
.stat-barre .tige.h5 { height: 18.0%; }
.stat-barre .tige.h6 { height: 21.6%; }
.stat-barre .tige.h7 { height: 25.2%; }
.stat-barre .tige.h8 { height: 28.8%; }
.stat-barre .tige.h9 { height: 32.4%; }
.stat-barre .tige.h10 { height: 36.0%; }
.stat-barre .tige.h11 { height: 39.6%; }
.stat-barre .tige.h12 { height: 43.2%; }
.stat-barre .tige.h13 { height: 46.8%; }
.stat-barre .tige.h14 { height: 50.4%; }
.stat-barre .tige.h15 { height: 54.0%; }
.stat-barre .tige.h16 { height: 57.6%; }
.stat-barre .tige.h17 { height: 61.2%; }
.stat-barre .tige.h18 { height: 64.8%; }
.stat-barre .tige.h19 { height: 68.4%; }
.stat-barre .tige.h20 { height: 72.0%; }

/* Appli installable : les boutons d'installation et de notifications ne s'affichent que si l'appareil les permet. */
[hidden] { display: none !important; }
.appli h3 { margin: 16px 0 4px; }
.appli .actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.hors-ligne { max-width: 420px; margin: 18vh auto 0; padding: 0 16px; text-align: center; }
.rangs strong.alerte { color: var(--danger); }

/* Conseils des statistiques : une bande de couleur à gauche selon l'urgence. */
.liste-conseils { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.conseil { border-left: 5px solid var(--neutre); background: var(--fond); border-radius: 8px; padding: 10px 14px; }
.conseil.danger { border-color: var(--danger); background: var(--danger-f); }
.conseil.attention { border-color: var(--mangue); background: var(--attention-f); }
.conseil p { margin: 4px 0; }
.conseil-titre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.conseil-details { margin: 4px 0 6px; padding-left: 20px; font-size: 15px; }
.conseil-details li { margin: 2px 0; }
.conseil > a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

/* Discussion de l'équipe : mes messages à droite, ceux des autres à gauche. */
.fil { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.bulle { max-width: 85%; align-self: flex-start; background: var(--fond); border-radius: 12px 12px 12px 4px; padding: 8px 12px; }
.bulle.moi { align-self: flex-end; background: var(--info-f); border-radius: 12px 12px 4px 12px; }
.bulle p { margin: 0; }
.bulle-auteur { font-size: 12px; color: var(--doux); font-weight: 700; }
.bulle-texte { overflow-wrap: anywhere; }
.compte .badge { margin-left: 4px; }
