/* Démonstration sans marque. */
@font-face { font-family: "Anybody"; src: url(assets/fonts/Anybody-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lato"; src: url(assets/fonts/Lato-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lato"; src: url(assets/fonts/Lato-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --gris: #23292E; --rouge: #1F6F78; --vin: #5F6B73; --fond: #F7F8F8; --blanc: #FFFFFF; --ligne: #E4E7E9; --ligne-forte: #CBD1D6;
  --texte: #23292E; --doux: #65707A; --clair: #A3ABB2;
  --ok: #4C7A2A; --verif: #A67C00; --nc: #C2571A; --np: #C2401F; --ok-fond: #EEF4E6; --verif-fond: #FFF6DB; --nc-fond: #FCEEE4; --np-fond: #FCEBEC;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 "Lato", system-ui, sans-serif; color: var(--texte); background: var(--fond); }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }

/* En-tête */
.tete { position: sticky; top: 0; z-index: 5; background: var(--blanc); border-bottom: 1px solid var(--ligne); display: flex; align-items: center; gap: 22px; padding: 0 24px; min-height: 62px; }
.logo { display: block; width: auto; color: var(--gris); }
.logo img { width: 100%; height: auto; display: block; }
.logo svg { width: 100%; height: auto; display: block; }
.menu { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu a { position: relative; padding: 20px 11px 19px; text-decoration: none; color: var(--doux); font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.menu a:hover { color: var(--texte); }
.menu a.actif { color: var(--texte); box-shadow: inset 0 -3px 0 var(--rouge); }
.menu a em { font-style: normal; background: var(--rouge); color: #fff; border-radius: 9px; font-size: 11.5px; padding: 0 6px; margin-left: 5px; }
.menu a em:empty { display: none; }
.tete-droite { display: flex; align-items: center; gap: 12px; flex: none; }
.sem-choix { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--doux); white-space: nowrap; }
.sem-choix select { border: 1px solid var(--ligne); border-radius: 6px; padding: 6px 8px; background: var(--blanc); font-size: 13.5px; color: var(--texte); }

/* Menu Gestion */
.gestion { position: relative; }
.gestion-bouton { border: 0; background: none; padding: 8px 10px; font-weight: 700; font-size: 14.5px; color: var(--doux); cursor: pointer; white-space: nowrap; }
.gestion-bouton:hover, .gestion-bouton.actif { color: var(--texte); }
.gestion-bouton.actif { box-shadow: inset 0 -3px 0 var(--rouge); }
.gestion-panneau { position: absolute; right: 0; top: calc(100% + 6px); width: 270px; background: var(--blanc); border: 1px solid var(--ligne-forte); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.14); padding: 6px; z-index: 20; }
.gestion-panneau[hidden] { display: none; }
.gestion-panneau a { display: block; padding: 8px 10px; border-radius: 6px; text-decoration: none; }
.gestion-panneau a:hover, .gestion-panneau a.actif { background: var(--fond); }
.gestion-panneau b { display: block; font-size: 14.5px; color: var(--gris); }
.gestion-panneau small { display: block; font-size: 12.5px; color: var(--doux); }

/* Calendrier des semaines */
.cal { position: relative; }
.cal-groupe { display: flex; }
.cal-pas { border: 1px solid var(--ligne-forte); background: var(--blanc); padding: 7px 11px; cursor: pointer; font-size: 15px; line-height: 1.3; color: var(--doux); }
.cal-pas:first-child { border-radius: 6px 0 0 6px; border-right: 0; }
.cal-pas:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.cal-pas:hover { background: var(--fond); color: var(--texte); }
.cal-bouton { border: 1px solid var(--ligne-forte); background: var(--blanc); padding: 7px 11px; font-size: 13.5px; cursor: pointer; white-space: nowrap; color: var(--doux); }
.cal-bouton b { color: var(--texte); }
.cal-bouton:hover { border-color: var(--gris); }
.cal-panneau { position: absolute; right: 0; top: calc(100% + 6px); width: 300px; background: var(--blanc); border: 1px solid var(--ligne-forte); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.14); padding: 10px; z-index: 20; }
.cal-tete { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 8px; text-transform: capitalize; }
.cal-tete button { border: 0; background: none; font-size: 20px; line-height: 1; padding: 2px 10px; cursor: pointer; border-radius: 6px; color: var(--doux); }
.cal-tete button:hover { background: var(--fond); color: var(--texte); }
.cal-jours, .cal-sem { display: grid; grid-template-columns: repeat(7, 1fr) 12px; align-items: center; text-align: center; width: 100%; font-size: 13.5px; }
.cal-jours { color: var(--doux); font-size: 12px; font-weight: 700; padding: 0 4px 4px; }
.cal-sem { border: 0; background: none; padding: 6px 4px; border-radius: 6px; cursor: pointer; margin-bottom: 1px; }
.cal-sem:hover { background: var(--fond); }
.cal-sem.choisie { background: var(--gris); color: #fff; }
.cal-sem .hors { color: var(--clair); }
.cal-sem.choisie .hors { color: #9aa0a6; }
.cal-sem .auj { font-weight: 700; color: var(--rouge); }
.cal-sem.choisie .auj { color: #fff; text-decoration: underline; }
.cal i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; justify-self: end; }
.cal i.plein { background: var(--rouge); }
.cal-pied { display: flex; align-items: center; justify-content: space-between; padding-top: 6px; border-top: 1px solid var(--ligne); margin-top: 6px; font-size: 12.5px; }
.cmd-ligne { display: grid; grid-template-columns: minmax(0, 1fr) 82px; gap: 8px; margin-bottom: 6px; }
.bouton[disabled] { opacity: .5; cursor: default; }

/* Contenu */
main { max-width: 1240px; margin: 0 auto; padding: 28px 24px 70px; outline: none; }
.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.entete h1 { font-family: "Anybody", "Lato", sans-serif; font-weight: 700; font-size: 27px; color: var(--gris); letter-spacing: -.01em; }
.entete p { color: var(--doux); font-size: 14px; margin-top: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bouton { border: 1px solid var(--ligne-forte); background: var(--blanc); border-radius: 6px; padding: 8px 14px; font-weight: 700; cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; }
.bouton:hover { border-color: var(--gris); }
.bouton.principal { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.bouton.principal:hover { background: var(--vin); border-color: var(--vin); }
.bouton.discret { background: transparent; border-color: transparent; color: var(--doux); font-weight: 400; padding: 4px 8px; }
.bouton.discret:hover { color: var(--texte); text-decoration: underline; }

/* Parcours de l'accueil */
.etapes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.etape { display: block; background: var(--blanc); border: 1px solid var(--ligne); border-radius: 10px; padding: 16px 18px; text-decoration: none; }
.etape:hover { border-color: var(--gris); }
.etape small { display: block; color: var(--doux); font-size: 13px; font-weight: 700; }
.etape b { display: block; font-size: 26px; line-height: 1.25; color: var(--gris); margin-top: 4px; }
.etape span { display: block; font-size: 13.5px; color: var(--doux); }
.etape span.alerte { color: var(--np); font-weight: 700; }
.etape span.bien { color: var(--ok); }

.chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.chiffre { background: var(--blanc); border: 1px solid var(--ligne); border-radius: 10px; padding: 14px 18px; }
.chiffre b { display: block; font-size: 26px; line-height: 1.25; color: var(--gris); }
.chiffre span { font-size: 13.5px; color: var(--doux); }

.bloc { background: var(--blanc); border: 1px solid var(--ligne); border-radius: 10px; margin-bottom: 18px; overflow: hidden; }
.bloc > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px; flex-wrap: wrap; border-bottom: 1px solid var(--ligne); }
.bloc h2 { font-size: 16px; font-weight: 700; color: var(--gris); }
.bloc > header p { color: var(--doux); font-size: 13px; }
.vide { padding: 20px 18px; color: var(--doux); }
.note-bas { font-size: 13px; color: var(--doux); padding: 12px 18px; border-top: 1px solid var(--ligne); }
details.bloc > summary { padding: 14px 18px; font-weight: 700; color: var(--gris); cursor: pointer; }
details.bloc[open] > summary { border-bottom: 1px solid var(--ligne); }

/* Listes À traiter */
.liste-tache { list-style: none; margin: 0; padding: 0; }
.liste-tache li { display: grid; grid-template-columns: 130px minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 11px 18px; border-bottom: 1px solid var(--ligne); cursor: pointer; }
.liste-tache li:last-child { border-bottom: 0; }
.liste-tache li:hover { background: var(--fond); }
.liste-tache small { display: block; color: var(--doux); font-size: 13px; }
.liste-tache .pourquoi { font-size: 13.5px; color: var(--doux); }

.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; padding: 14px 18px 18px; }
.client { border: 1px solid var(--ligne); border-radius: 8px; padding: 11px 13px; cursor: pointer; }
.client:hover { border-color: var(--gris); }
.client h3 { font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.client p { color: var(--doux); font-size: 13px; margin-top: 3px; }

/* Statuts : point + texte */
.statut { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.statut::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.s-place { color: var(--ok); } .s-verif { color: var(--verif); } .s-nc { color: var(--nc); } .s-np { color: var(--np); } .s-ign { color: var(--clair); }

/* Tableaux */
.defile { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12.5px; color: var(--doux); font-weight: 700; padding: 9px 12px; border-bottom: 1px solid var(--ligne-forte); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--ligne); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tr.cliquable { cursor: pointer; }
tr.cliquable:hover td { background: var(--fond); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.code { color: var(--doux); font-size: 13px; white-space: nowrap; }
td.remarque { color: var(--doux); font-size: 13px; min-width: 200px; }
tr.nc td.remarque { color: var(--nc); } tr.np td.remarque { color: var(--np); } tr.verif td.remarque { color: var(--verif); }
.neg { color: var(--np); font-weight: 700; } .pos { color: var(--ok); } .fort { font-weight: 700; } .pale { color: var(--clair); }
.hausse { color: var(--np); font-size: 12.5px; } .baisse { color: var(--ok); font-size: 12.5px; }
.filtres { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--ligne); }
.puce { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 5px 10px; font-size: 13.5px; font-weight: 700; cursor: pointer; color: var(--doux); }
.puce:hover { color: var(--texte); }
.puce.actif { background: var(--gris); color: #fff; }
.recherche { margin-left: auto; border: 1px solid var(--ligne); border-radius: 6px; padding: 6px 10px; min-width: 220px; background: var(--blanc); }

.decompte td.lib { font-weight: 700; white-space: nowrap; }
.decompte td.tot { font-weight: 700; }
.decompte tr.sous td { background: var(--fond); font-weight: 700; }
.decompte tr.section td { font-weight: 700; color: var(--doux); font-size: 12.5px; padding-top: 16px; }
.decompte td.zero { color: var(--clair); }
.decompte td.note { color: var(--doux); font-size: 13px; white-space: nowrap; }

/* Colonnes de largeur fixe : mêmes colonnes d'un tableau à l'autre */
table.fixe { table-layout: fixed; min-width: 720px; }
table.fixe td { overflow-wrap: anywhere; }
table.fixe td.lib, table.fixe td.note { white-space: normal; }
.sous-ligne { display: block; font-size: 12.5px; color: var(--doux); }
.avec-unite { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.avec-unite i { font-style: normal; font-size: 12.5px; color: var(--doux); width: 22px; text-align: left; }
th.col-unite { padding-right: 40px; }
select.a-preciser { border-color: var(--verif); color: var(--verif); }
.note-haut { font-size: 13px; color: var(--doux); padding: 10px 18px 0; }
.suite { display: inline-block; margin: 2px 0 0 auto; font-weight: 700; color: var(--rouge); text-decoration: none; float: right; }
.suite:hover { text-decoration: underline; }

/* Éditeur de recette */
.form-recette { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; padding: 14px 18px 18px; }
table.lignes-recette td { padding: 5px 8px; overflow-wrap: normal; }
table.lignes-recette input.mini { width: 100%; }
table.lignes-recette input[type=checkbox] { width: 16px; height: 16px; margin-left: 4px; }
input.champ:disabled { background: var(--fond); color: var(--doux); }
.etiq.nouvelle { background: var(--ok-fond); color: var(--ok); }

/* Champs */
input.champ, select.champ { border: 1px solid var(--ligne-forte); border-radius: 6px; padding: 6px 9px; background: var(--blanc); width: 100%; }
input.champ:focus, select.champ:focus, .recherche:focus { outline: 2px solid var(--rouge); outline-offset: -1px; border-color: transparent; }
input.mini { width: 84px; text-align: right; }
input.mini::placeholder { color: var(--clair); font-size: 12.5px; }
select.moyen { width: 150px; }
td.modifie input { background: var(--verif-fond); }

/* Importer */
.depot { display: block; border: 2px dashed var(--ligne-forte); border-radius: 10px; padding: 26px 20px; text-align: center; background: var(--blanc); margin-bottom: 18px; cursor: pointer; }
.depot:hover, .depot.survol { border-color: var(--rouge); }
.depot b { display: block; font-size: 17px; color: var(--gris); }
.depot span { color: var(--doux); font-size: 14px; }
.depot input { display: none; }
.depot.petit { padding: 12px 16px; margin-bottom: 14px; text-align: left; border-width: 1px; }
.depot.petit b { display: inline; font-size: 14.5px; margin-right: 6px; }
.depot.petit span { font-size: 13.5px; }
.message { border-radius: 8px; padding: 11px 14px; margin-bottom: 16px; font-weight: 700; }
.message.erreur { background: var(--np-fond); color: var(--np); }
.message.reussi { background: var(--ok-fond); color: var(--ok); }
.message a { margin-left: 8px; }
.lignes-facture td { padding: 5px 6px; border: 0; }
.form-tete { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; padding: 14px 18px 4px; }
.form-tete.form-quatre { grid-template-columns: 1.2fr 1fr 1fr 1fr 1.2fr; }
label.f { display: block; font-size: 13px; font-weight: 700; color: var(--doux); margin-bottom: 4px; }
.form-pied { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 18px 14px; flex-wrap: wrap; }
.etiq { display: inline-block; font-size: 12px; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.etiq.deduit { background: var(--verif-fond); color: var(--verif); }
.etiq.alerte { background: var(--np-fond); color: var(--np); font-weight: 700; }

/* Bons d'achat */
.semaines-prod { display: flex; gap: 10px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; }
.sem-prod { flex: none; min-width: 150px; text-align: left; background: var(--blanc); border: 1px solid var(--ligne); border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.sem-prod:hover { border-color: var(--gris); }
.sem-prod.actif { border-color: var(--gris); box-shadow: inset 0 -3px 0 var(--rouge); }
.sem-prod small, .sem-prod span { display: block; font-size: 12.5px; color: var(--doux); }
.sem-prod b { display: block; font-size: 17px; color: var(--gris); }
.bon { border-top: 1px solid var(--ligne); }
.bon:first-of-type { border-top: 0; }
.bon > summary { display: grid; grid-template-columns: 16px minmax(0, 1.2fr) minmax(0, 1fr) 110px 150px; gap: 12px; align-items: center; padding: 10px 18px; cursor: pointer; list-style: none; }
.bon > summary .bon-total { text-align: right; font-weight: 700; }
.bon > summary > .bouton, .bon > summary > .pale { justify-self: end; }
.sans-achat > summary { padding: 12px 18px; color: var(--doux); cursor: pointer; border-top: 1px solid var(--ligne); }
.bon > summary::-webkit-details-marker { display: none; }
.bon > summary:hover { background: var(--fond); }
.bon > summary b { color: var(--gris); font-size: 15px; }
.bon > summary .fleche::before { content: "▸"; color: var(--doux); }
.bon[open] > summary .fleche::before { content: "▾"; }
.bon[open] > summary { border-bottom: 1px solid var(--ligne); }
.pale-doux { color: var(--doux); font-size: 13.5px; }
.bon-total { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.bon-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 4px; flex-wrap: wrap; }
.bon-tete h3 { font-size: 16px; color: var(--gris); }
.bon-tete small { color: var(--doux); font-weight: 400; font-size: 13.5px; margin-left: 8px; }

/* Tiroir */
.voile { position: fixed; inset: 0; background: rgba(28,32,36,.3); z-index: 9; }
.tiroir { position: fixed; top: 0; right: 0; height: 100vh; width: min(460px, 100vw); background: var(--blanc); z-index: 10; transform: translateX(105%); visibility: hidden; transition: transform .18s ease; box-shadow: -6px 0 24px rgba(0,0,0,.12); display: flex; flex-direction: column; }
.tiroir.ouvert { transform: none; visibility: visible; }
.tiroir > header { padding: 18px 22px 14px; border-bottom: 1px solid var(--ligne); }
.tiroir > header h2 { font-size: 18px; color: var(--gris); }
.tiroir > header p { color: var(--doux); font-size: 13.5px; margin-top: 2px; }
.tiroir .corps { padding: 16px 22px; overflow-y: auto; flex: 1; }
.tiroir .lu { background: var(--fond); border-radius: 8px; padding: 10px 14px; font-size: 13.5px; margin: 0 0 14px; }
.tiroir .lu dt { font-size: 12.5px; color: var(--doux); margin-top: 6px; }
.tiroir .lu dt:first-child { margin-top: 0; }
.tiroir .lu dd { margin: 0; }
.tiroir label.f { margin-top: 12px; }
.tiroir .deux { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tiroir .alerte-b { border-radius: 8px; padding: 9px 12px; font-size: 13.5px; margin-bottom: 12px; background: var(--fond); }
.tiroir footer { padding: 12px 22px; border-top: 1px solid var(--ligne); display: flex; gap: 8px; flex-wrap: wrap; }
.tiroir footer .principal { margin-left: auto; }

@media (max-width: 1280px) { /* 7 onglets : le menu passe sous le logo avant d'être coupé */
  .tete { flex-wrap: wrap; gap: 0 12px; padding: 8px 16px 0; }
  .menu { order: 3; flex-basis: 100%; }
  .menu a { padding: 10px 9px 11px; }
  .tete-droite { margin-left: auto; }
}
@media (max-width: 760px) {
  main { padding: 18px 16px 50px; }
  .entete h1 { font-size: 23px; }
  .etapes, .chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .etape b, .chiffre b { font-size: 21px; }
  .liste-tache li { grid-template-columns: 1fr; gap: 3px; }
  .recherche { margin-left: 0; min-width: 0; width: 100%; }
  .form-tete, .form-tete.form-quatre { grid-template-columns: 1fr; }
  .sem-choix span { display: none; }
  .form-recette { grid-template-columns: 1fr; }
  .bon > summary { grid-template-columns: 16px minmax(0, 1fr) auto; }
  .bon > summary .pale-doux, .bon > summary .bouton { display: none; }
}

/* Rapport de mouvement de prix */
.rapport-titre { font-size: 19px; color: var(--gris); }
.rapport-phrase { background: var(--blanc); border: 1px solid var(--ligne); border-radius: 10px; padding: 12px 18px; margin-bottom: 18px; }
@media print {
  .tete, .pas-imprimer, .depot, .filtres, details, .entete:not(.rapport-tete), .message, .bloc:not(.rapport .bloc):not(.rapport) { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .bloc, .chiffre, .rapport-phrase { break-inside: avoid; }
}

/* Marges : semaine par semaine */
tr.choisie td { background: var(--fond); box-shadow: inset 0 -2px 0 var(--rouge); }
tr.total td { border-top: 2px solid var(--gris); }
.lien-semaine { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.lien-semaine:hover { text-decoration: underline; }
tr.groupe td { background: var(--fond); }
tr.sous td:first-child { padding-left: 34px; }
.fleche { display: inline-block; width: 14px; color: var(--doux); }
.sep-puces { display: inline-block; width: 1px; height: 18px; background: var(--ligne-forte); margin: 0 8px; vertical-align: middle; }
.message button.lien { background: none; border: 0; padding: 0; margin-left: .5em; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
/* Prise d'inventaire : onglets des locaux et recherche toujours visibles sous l'en-tête */
.barre-locaux { position: sticky; top: 62px; z-index: 4; background: var(--fond); padding: 8px 0 10px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 8px; }
.onglets-locaux { display: flex; gap: 6px; flex-wrap: wrap; }
.onglets-locaux .puce { background: var(--blanc); border-color: var(--ligne); }
.onglets-locaux .puce.actif { background: var(--gris); border-color: var(--gris); }
.onglets-locaux .puce small { font-weight: 400; opacity: .75; margin-left: 4px; }
.onglets-locaux .puce.fini:not(.actif) { border-color: var(--ok); color: var(--ok); }
.recherche.large { margin-left: 0; width: 100%; min-width: 0; font-size: 15px; padding: 9px 12px; }
input.champ.compte { width: 100%; text-align: right; font-size: 16px; padding: 7px 8px; }
.table-compte td { vertical-align: middle; }
.titre-bloc { font-size: 15px; font-weight: 700; padding: 18px 18px 0; }
.fin-prise { padding: 14px 18px; border-top: 1px solid var(--ligne); }
.fin-prise p + p { margin-top: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.compte-depart { padding: 18px; } .compte-depart p + p { margin-top: 12px; }
@media (max-width: 760px) { .barre-locaux { top: 0; } .onglets-locaux { flex-wrap: nowrap; overflow-x: auto; } .onglets-locaux .puce { flex: none; } }
.ligne-depart { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
td.signal { color: var(--np); font-weight: 700; font-size: 13px; }
.filtres label { display: flex; gap: 6px; align-items: center; font-size: 13.5px; color: var(--doux); }
.bouton.suivant { border-color: var(--gris); color: var(--gris); font-weight: 700; }

/* Achats : une carte par fournisseur */
.carte-bon { border-top: 1px solid var(--ligne); }
.carte-bon:first-of-type { border-top: 0; }
.carte-tete { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 110px 150px; gap: 12px; align-items: center; padding: 12px 18px; background: var(--fond); }
.carte-tete b { color: var(--gris); font-size: 15px; }
.carte-tete .bon-total { text-align: right; font-weight: 700; }
.carte-tete .bouton { justify-self: end; }
.bon-detail > summary { padding: 8px 18px 12px; color: var(--doux); font-size: 13px; cursor: pointer; }
.bon-detail > summary:hover { color: var(--gris); }
.bon-detail[open] > summary { border-bottom: 1px solid var(--ligne); }
@media (max-width: 700px) { .carte-tete { grid-template-columns: minmax(0, 1fr) auto; } .carte-tete .pale-doux, .carte-tete .bouton { display: none; } }

/* Achats en « espace » (comme l'Espace inventaire marque) */
.espace { background: var(--blanc); border: 1px solid var(--ligne); border-radius: 12px; padding: 18px 22px 6px; margin-bottom: 18px; }
.esp-titre { font: 700 19px/1.3 "Anybody", "Lato", sans-serif; color: var(--gris); margin-bottom: 6px; }
.esp-titre em, .esp-ligne h3 em { font-style: italic; color: var(--rouge); font-weight: 700; }
.esp-ligne { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid var(--ligne); }
.esp-ligne.ouverte { background: var(--fond); margin: 0 -22px; padding: 14px 22px 14px 19px; border-left: 3px solid var(--rouge); }
.esp-ligne h3 { font-size: 17px; color: var(--gris); font-weight: 400; }
.esp-statut { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--doux); font-weight: 700; margin: 3px 0 4px; }
.esp-statut.chaud { color: var(--rouge); }
.esp-chiffres { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 13.5px; color: var(--doux); }
.esp-chiffres b { color: var(--texte); }
.bouton.plein-gris { background: var(--gris); color: #fff; border-color: var(--gris); cursor: default; }
.ouverte-sem > header p b { color: var(--texte); }
.esp-alerte { margin: 14px 18px 4px; padding: 10px 14px; border-left: 3px solid var(--np); background: var(--np-fond); font-size: 13.5px; }
.famille { padding: 6px 0 4px; }
.famille-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px 6px; }
.famille-tete h3 { font: 700 16px/1.3 "Anybody", "Lato", sans-serif; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; }
.famille-tete span { color: var(--doux); font-size: 13.5px; }
.famille-tete span b { color: var(--texte); }
.esp-fourn { margin: 6px 18px 12px; border: 1px solid var(--ligne); border-radius: 10px; overflow: hidden; }
.esp-fourn-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px 9px 14px; background: var(--fond); border-bottom: 1px solid var(--ligne); }
.esp-fourn-tete b { color: var(--gris); font-size: 15px; margin-right: 10px; }
.esp-fourn-tete span { color: var(--doux); font-size: 13.5px; }
details.replie > summary { color: var(--doux); }
details.replie .bloc { border: 0; margin: 0; box-shadow: none; }
@media (max-width: 700px) { .esp-ligne { flex-wrap: wrap; } .esp-fourn-tete .bouton { display: none; } }
.esp-note { margin: 14px 18px 4px; padding: 10px 14px; border-left: 3px solid var(--gris); background: var(--fond); font-size: 13.5px; }
/* Commandes : P.O. par semaine */
.po-sem { border-top: 1px solid var(--ligne); }
.po-sem > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 12px 18px; cursor: pointer; background: var(--fond); }
.po-sem > summary b { color: var(--gris); font-size: 15px; }
.po-sem > summary .esp-statut { margin: 0; }
.po-sem > summary > :last-child { margin-left: auto; }
.po-passees > summary { padding: 12px 18px; color: var(--doux); cursor: pointer; border-top: 1px solid var(--ligne); font-weight: 700; }
.po-liv td { background: var(--fond); color: var(--gris); font-weight: 700; font-size: 13px; padding-top: 8px; padding-bottom: 8px; }

/* Connexion et synchronisation (nuage.js) */
body.sans-session .menu, body.sans-session .tete-droite { visibility: hidden; }
.connexion-page { max-width: 420px; margin: 48px auto; }
.nuage-form { display: grid; gap: 8px; padding: 18px; }
.nuage-form .bouton { margin-top: 8px; justify-self: start; }
.nuage-etat { font-size: 12px; color: var(--doux); white-space: nowrap; }
.nuage-etat.envoi { color: var(--doux); }
.nuage-etat.erreur { color: var(--rouge); font-weight: 700; }
.nuage-sortir { border-top: 1px solid var(--ligne); }
@media (max-width: 700px) { .nuage-etat { display: none; } .nuage-etat.erreur { display: inline; } }

/* ---------- Cellulaire (18 nov. 2026) : les tableaux deviennent des fiches, chaque valeur sous son titre de colonne ---------- */
@media (max-width: 640px) {
  .menu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; overflow: visible; }
  .menu a { padding: 9px 1px 10px; font-size: 12.8px; text-align: center; }
  .menu a em { margin-left: 3px; padding: 0 5px; }
  .tete-droite { gap: 6px; }
  #vue table:not(.lignes-recette), #vue table:not(.lignes-recette) > tbody { display: block; width: 100%; min-width: 0; }
  #vue table:not(.lignes-recette) > colgroup, #vue table:not(.lignes-recette) > thead { display: none; }
  #vue table:not(.lignes-recette) > tbody > tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; padding: 12px 14px; border-bottom: 1px solid var(--ligne); }
  #vue table:not(.lignes-recette) > tbody > tr > td { display: block; padding: 0; border: 0; text-align: left; white-space: normal; min-width: 0; overflow-wrap: anywhere; }
  #vue table:not(.lignes-recette) > tbody > tr > td:first-child, #vue table:not(.lignes-recette) > tbody > tr > td[colspan] { grid-column: 1 / -1; font-weight: 700; }
  #vue table:not(.lignes-recette) > tbody > tr > td:first-child .sous-ligne { font-weight: 400; }
  #vue table:not(.lignes-recette) > tbody > tr > td:empty { display: none; }
  #vue table:not(.lignes-recette) > tbody > tr > td[data-th]:not(:first-child)::before { content: attr(data-th); display: block; font-size: 11.5px; font-weight: 400; color: var(--doux); line-height: 1.3; }
  #vue table:not(.lignes-recette) > tbody > tr.groupe { background: var(--fond); padding: 8px 14px; }
  #vue table:not(.lignes-recette) > tbody > tr.total { background: var(--fond); }
  #vue table:not(.lignes-recette) td input.champ, #vue table:not(.lignes-recette) td select.champ { width: 100%; max-width: none; font-size: 16px; min-height: 40px; }
  #vue table:not(.lignes-recette) td input.champ.compte { font-size: 18px; font-weight: 700; }
  .defile { overflow-x: visible; }
  table.fixe { min-width: 0; }
  input.champ, select.champ, .recherche { font-size: 16px; } /* iPhone : pas de zoom automatique en touchant un champ */
  .chiffres, .etapes { gap: 10px; }
}
td.en-attente input { background: #FFF1C2; border-color: var(--verif); }

/* Bandeau de démonstration */
.demo-bandeau { background: #5F6B73; color: #fff; font-size: 13px; padding: 6px 24px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.demo-bandeau b { text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; background: #fff; color: #4A545B; border-radius: 4px; padding: 1px 7px; }
.demo-bandeau button { margin-left: auto; border: 1px solid rgba(255,255,255,.7); background: none; color: #fff; border-radius: 6px; padding: 2px 10px; font-size: 12.5px; cursor: pointer; }
.demo-bandeau button:hover { background: rgba(255,255,255,.15); }
.logo .mot { font: 700 19px/1 "Anybody", "Lato", sans-serif; color: var(--gris); letter-spacing: -.01em; }
