/* Interface du gérant : pensée pour un téléphone tenu d'une main, pendant le service. */
:root {
  --fond: #f7f3ec; --carte: #fffdf9; --encre: #1f1a17; --doux: #6b6259; --trait: #e4dccf;
  --accent: #b8431f; --accent-fonce: #96330f; --vert: #1f7a45; --vert-fond: #e3f3e8;
  --rouge: #b3261e; --rouge-fond: #fbe9e7; --rayon: 14px;
  --police: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --titre: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 17px/1.45 var(--police); }
a { color: var(--accent-fonce); }
h1 { font: 700 1.7rem/1.15 var(--titre); margin: .2rem 0 .6rem; text-wrap: balance; }
h2 { font: 700 1.2rem/1.2 var(--titre); margin: 0 0 .6rem; }
.page { max-width: 640px; margin: 0 auto; padding: 1rem 1rem 6.5rem; }
.bandeau { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 1rem; background: var(--encre); color: #f7f3ec; }
.bandeau-nom { font: 700 1.05rem var(--titre); }
.choix-restaurant select { background: transparent; color: inherit; border: 1px solid #5c534b; border-radius: 8px; padding: .35rem .5rem; font: inherit; min-height: 0; width: auto; }
.lien-discret { background: none; border: 0; color: #cfc6ba; font: inherit; font-size: .85rem; text-decoration: underline; padding: .5rem 0; cursor: pointer; }

.onglets { position: fixed; inset: auto 0 0 0; display: flex; background: var(--carte); border-top: 1px solid var(--trait); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.onglets a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .55rem 0 .5rem; color: var(--doux); text-decoration: none; font-size: .8rem; font-weight: 600; }
.onglets svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.onglets a[aria-current] { color: var(--accent); }

.entete { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.raccourcis { margin: 0 0 1.2rem; font-size: .92rem; color: var(--doux); }
.retour { display: inline-block; padding: .4rem 0; text-decoration: none; font-weight: 600; }

.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.1rem; border-radius: 12px; border: 1.5px solid var(--trait); background: var(--carte); color: var(--encre); font: 600 1rem var(--police); text-decoration: none; cursor: pointer; white-space: nowrap; }
.bouton:active { transform: scale(.97); }
.bouton:disabled { opacity: .35; }
.bouton.principal { background: var(--accent); border-color: var(--accent); color: #fff; }
.bouton.large { width: 100%; min-height: 54px; font-size: 1.05rem; }
.bouton.icone { padding: 0; width: 48px; }
.bouton.danger, .bouton.rupture { color: var(--rouge); border-color: #e9b9b4; }
.bouton.remettre { background: var(--vert); border-color: var(--vert); color: #fff; }
.bouton.rupture, .bouton.remettre { min-width: 6.4rem; }
:focus-visible { outline: 3px solid #2f6fed; outline-offset: 2px; }

.categorie { margin-bottom: 1.6rem; }
.categorie h2 { border-bottom: 2px solid var(--encre); padding-bottom: .3rem; }
.plats, .liste-cartes { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.plat { display: flex; align-items: center; gap: .6rem; background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: .5rem .6rem; }
.plat-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; min-height: 52px; }
.plat-info img, .sans-photo { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; background: #ece4d6; }
.plat-texte { display: grid; min-width: 0; }
.plat-texte strong { overflow-wrap: anywhere; line-height: 1.25; }
.plat-prix { color: var(--doux); font-variant-numeric: tabular-nums; }
.plat-prix-public { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.plat-rupture { background: var(--rouge-fond); border-color: #efc4bf; }
.plat-rupture strong { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.plat-masque { opacity: .7; border-style: dashed; }
.pastille { display: inline-block; font-style: normal; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 99px; vertical-align: middle; }
.pastille.rouge { background: var(--rouge); color: #fff; }
.pastille.grise { background: #e7e0d4; color: #4b443d; }
.pastille.verte { background: var(--vert-fond); color: var(--vert); }
.ajout { display: inline-block; margin-top: .5rem; padding: .6rem 0; background: none; border: 0; color: var(--accent-fonce); font: 600 .95rem var(--police); text-decoration: none; cursor: pointer; }
.vide, .depart { color: var(--doux); background: var(--carte); border: 1px dashed var(--trait); border-radius: var(--rayon); padding: 1rem; }
.depart .bouton { margin-top: .6rem; }

.liste-cartes li { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: .7rem .8rem; }
.liste-cartes li:has(> .carte-lien) { padding: 0; }
.carte-lien { display: grid; gap: .15rem; padding: .8rem .9rem; color: inherit; text-decoration: none; min-height: 56px; }
.carte-lien.appareil { grid-template-columns: auto 1fr; align-items: center; gap: .8rem; }
.carte-lien.appareil > span:last-child { display: grid; }
.voyant { width: 14px; height: 14px; border-radius: 50%; background: #c9c0b3; }
.voyant.allume { background: #22a35a; box-shadow: 0 0 0 4px #22a35a33; }
.ligne-categorie { display: flex; gap: .4rem; align-items: center; }
.ligne-categorie input { flex: 1; min-width: 0; }

.carte-formulaire { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 1rem; margin: 1rem 0; display: grid; gap: .9rem; }
.champ { display: grid; gap: .3rem; }
.etiquette, legend { font-weight: 700; font-size: .95rem; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea { width: 100%; min-height: 48px; padding: .6rem .7rem; border: 1.5px solid #cfc5b6; border-radius: 10px; background: #fff; color: var(--encre); font: inherit; }
input[type=file] { font: inherit; max-width: 100%; }
input.code { font: 700 2rem/1 ui-monospace, Menlo, monospace; letter-spacing: .3em; text-align: center; }
input[type=checkbox], input[type=radio] { width: 24px; height: 24px; accent-color: var(--accent); flex: none; margin: 0; }
.champ > div, .grille-coches > div { display: grid; gap: .1rem; }
.grille-coches > div { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.champ > div label, .grille-coches label, .coche { display: flex; align-items: center; gap: .6rem; min-height: 44px; }
.aide { margin: 0; font-size: .87rem; color: var(--doux); }
.erreur { margin: 0; color: var(--rouge); font-weight: 600; font-size: .9rem; }
.champ-erreur input, .champ-erreur select { border-color: var(--rouge); }
.deux { display: grid; grid-template-columns: 1.4fr 1fr; gap: .7rem; }
.bloc { border: 0; border-top: 1px solid var(--trait); margin: 0; padding: .9rem 0 0; display: grid; gap: .5rem; min-width: 0; }
.lignes { display: grid; gap: .5rem; }
.ligne { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ligne input[type=text] { flex: 2 1 8rem; width: auto; min-width: 0; }
.ligne input[inputmode=decimal] { flex: 1 1 5rem; }
.ligne .erreur { flex-basis: 100%; }
.retirer { color: var(--rouge); font-size: .9rem; }
.photo-actuelle { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; }
.actions-bas { position: sticky; bottom: 4.6rem; padding-top: .3rem; }
.zone-danger { margin: 1.5rem 0; text-align: center; }
.lien-danger { background: none; border: 0; color: var(--rouge); font: 600 .95rem var(--police); text-decoration: underline; padding: .8rem; cursor: pointer; }
.message { margin: 0 0 .9rem; padding: .7rem .9rem; border-radius: 12px; background: var(--vert-fond); color: #14532d; font-weight: 600; }
.message-error { background: var(--rouge-fond); color: #7f1d1d; }
.message-info { background: #eef2fb; color: #1e3a8a; }
.etapes { padding-left: 1.2rem; display: grid; gap: .3rem; }

.apercu-cadre { aspect-ratio: 16 / 9; border-radius: var(--rayon); overflow: hidden; background: #14110f; border: 3px solid var(--encre); container-type: inline-size; }
.apercu-cadre iframe { width: 1280px; height: 720px; border: 0; transform-origin: 0 0; transform: scale(calc(100cqw / 1280px)); pointer-events: none; }
.apercu .aide { margin-top: .4rem; }

.connexion { padding-top: 12vh; }
.marque { font-size: 2.4rem; letter-spacing: -.01em; margin-bottom: .1rem; }
.sous-titre { margin: 0 0 1.2rem; color: var(--doux); }
.public .page { padding-bottom: 2rem; }

@media (min-width: 720px) {
  .page { padding-top: 1.5rem; }
  .onglets { position: static; max-width: 640px; margin: 0 auto 2rem; border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; }
  .actions-bas { position: static; }
  body { display: flex; flex-direction: column; min-height: 100vh; }
  .page { order: 2; width: 100%; padding-bottom: 3rem; } .onglets { order: 1; width: calc(100% - 2rem); margin-top: 1rem; margin-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .bouton:active { transform: none; } }

/* Rien ne dépasse de la largeur du téléphone. */
.carte-formulaire, .champ, .deux, .bloc, .lignes { grid-template-columns: minmax(0, 1fr); }
.deux { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.carte-formulaire > *, .deux > *, .champ > * { min-width: 0; }
.pastille { white-space: nowrap; }
.sans-photo { display: none; }

/* Lot 1b : promotions, tables, équipe */
.onglets a { font-size: .74rem; }
.raccourcis-cartes { margin-bottom: 1rem; }
.promo { display: flex; align-items: center; gap: .6rem; }
.liste-cartes li.promo { padding: .5rem .6rem; }
.promo .carte-lien { flex: 1; min-width: 0; padding: .3rem .3rem; }
.promo-arretee .carte-lien { opacity: .6; }
.bouton.lancer { background: var(--vert); border-color: var(--vert); color: #fff; min-width: 6.4rem; }
.bouton.arreter { color: var(--rouge); border-color: #e9b9b4; min-width: 6.4rem; }
.genres { display: grid; gap: .5rem; margin: 1rem 0; }
.ligne-table { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ligne-table strong { flex: 1; min-width: 6rem; }
.ligne-table form { display: contents; }
.bouton.petit { min-height: 44px; padding: 0 .8rem; font-size: .9rem; }
.en-ligne { display: flex; gap: .5rem; align-items: center; }
.en-ligne input { flex: 1; min-width: 0; }
input[type=time], input[type=tel] { width: 100%; min-height: 48px; padding: .6rem .7rem; border: 1.5px solid #cfc5b6; border-radius: 10px; background: #fff; color: var(--encre); font: inherit; }
.planche { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.planche-table { background: #fff; border: 1.5px dashed #9a9186; border-radius: 12px; padding: 1rem; text-align: center; break-inside: avoid; }
.planche-table svg { width: 100%; max-width: 210px; height: auto; }
.planche-table h2 { font-size: 1.5rem; margin: .3rem 0 0; }
.planche-table p { margin: 0; color: var(--doux); font-size: .85rem; }
@media print {
  .onglets, .bandeau, .hors-impression, .message { display: none !important; }
  body { background: #fff; } .page { max-width: none; padding: 0; }
  .planche { grid-template-columns: repeat(3, 1fr); gap: .6cm; }
}

/* Lot 1c : accueil, import de carte, mise en route, rangement */
.centre { text-align: center; }
.pastille.orange { background: #fff1d6; color: #8a5200; }
.pastille.rouge-clair { background: var(--rouge-fond); color: var(--rouge); }
.message-attention { background: #fff4dc; color: #6b4200; font-weight: 500; }
.message-attention strong { font-weight: 700; }
.alerte { display: grid; gap: .15rem; margin: 0 0 1rem; padding: .8rem .9rem; border-radius: var(--rayon); background: #fff4dc; border: 1px solid #f0d49a; color: #5b3900; text-decoration: none; }
.alerte span { font-size: .9rem; }
.depart { display: grid; gap: .4rem; }
.photo-actuelle.large { width: 100%; height: 160px; }
.lien-discret.sombre { color: var(--doux); }
.ligne-ordre { display: flex; align-items: center; gap: .5rem; }
.ligne-ordre strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ligne-ordre form, .ligne-table form { display: flex; gap: .35rem; }
.bouton.petit.icone { width: 44px; padding: 0; }
.liste-cartes li.ligne-ordre { padding: .4rem .5rem .4rem .8rem; }
.htmx-request .bouton, .bouton.htmx-request { opacity: .5; pointer-events: none; }

.puces { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.puce { position: relative; display: inline-flex; }
.puce input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.puce span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 .8rem; border-radius: 99px; border: 1.5px solid var(--trait); background: #fff; font-size: .9rem; font-weight: 600; color: var(--doux); }
.puce input:checked + span { background: var(--encre); border-color: var(--encre); color: #fff; }
.puce input:focus-visible + span { outline: 3px solid #2f6fed; outline-offset: 2px; }
.verif { display: grid; gap: .35rem; }
.verif .bouton { justify-self: start; }

.vignettes { display: flex; flex-wrap: wrap; gap: .5rem; }
.vignettes img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; border: 1px solid var(--trait); }
.attente { text-align: center; padding: 14vh 0 2rem; }
.sablier { width: 54px; height: 54px; margin: 0 auto 1.2rem; border-radius: 50%; border: 5px solid var(--trait); border-top-color: var(--accent); animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sablier { animation-duration: 4s; } }

.relecture-categorie { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: .9rem; display: grid; gap: .7rem; }
.relecture-titre { font: 700 1.15rem var(--titre) !important; }
.relecture-plat { display: grid; gap: .6rem; padding: .8rem 0 0; border-top: 1px solid var(--trait); grid-template-columns: minmax(0, 1fr); }
.relecture-plat.ecarte > :not(.garder) { opacity: .45; }
.relecture-plat.en-erreur { border-top: 3px solid var(--rouge); }
.relecture-plat textarea { min-height: 0; }
.relecture-plat .etiquette { font-size: .8rem; color: var(--doux); font-weight: 600; }
.garder { font-weight: 700; flex-wrap: wrap; }
.taille { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.relecture-allergenes summary { cursor: pointer; padding: .5rem 0; font-size: .93rem; }
.actions-relecture { display: grid; gap: .5rem; padding-bottom: .4rem; background: linear-gradient(transparent, var(--fond) 22%); }
.confirmer { font-weight: 700; }

.guide { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .7rem; }
.guide-etape { display: flex; gap: .8rem; background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: .9rem; opacity: .6; }
.guide-etape.courante, .guide-etape.faite { opacity: 1; }
.guide-etape.courante { border: 2px solid var(--accent); }
.guide-numero { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #e7e0d4; color: var(--encre); }
.courante .guide-numero { background: var(--accent); color: #fff; }
.faite .guide-numero { background: var(--vert); color: #fff; }
.guide-corps { flex: 1; min-width: 0; display: grid; gap: .5rem; }
.guide-corps h2, .guide-corps p { margin: 0; }
.guide-corps .ajout { margin: 0; padding: .3rem 0; }
.guide-qr { max-width: 220px; background: #fff; border-radius: 12px; padding: .4rem; border: 1px solid var(--trait); }
.guide-qr svg { display: block; width: 100%; height: auto; }
.guide-corps .bouton { margin: 0 .3rem .3rem 0; white-space: normal; text-align: center; }

.jours { display: flex; gap: .35rem; }
.date-jour { margin: -.3rem 0 .9rem; }
.raccourcis-service { display: grid; gap: .4rem; margin-bottom: 1rem; }
.chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.chiffre { background: var(--encre); color: #f7f3ec; border-radius: var(--rayon); padding: .7rem .6rem; display: grid; gap: .15rem; min-width: 0; }
.chiffre-nom { font-size: .75rem; color: #cfc6ba; font-weight: 600; }
.chiffre strong { font: 700 clamp(1.05rem, 5vw, 1.6rem)/1.1 var(--titre); font-variant-numeric: tabular-nums; white-space: nowrap; }
.comparaisons, .repartition, .classement { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.comparaisons li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.comparaisons li > span { min-width: 0; }
.barres { display: flex; align-items: flex-end; gap: 3px; height: 110px; margin-top: .4rem; }
.barre { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; text-decoration: none; color: var(--doux); }
.barre span { width: 100%; background: #d9cfbf; border-radius: 4px 4px 0 0; min-height: 0; }
.barre.courante span { background: var(--accent); }
.barre small { font-size: .65rem; font-weight: 700; }
.repartition-tete { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.jauge { display: block; height: 8px; border-radius: 99px; background: #ece4d6; overflow: hidden; margin-top: .25rem; }
.jauge span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.classement { counter-reset: rang; }
.classement li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; column-gap: .5rem; align-items: baseline; counter-increment: rang; }
.classement li::before { content: counter(rang); color: var(--doux); font-weight: 700; }
.classement li .aide { grid-column: 2 / 4; }
.classement.sans-rang li { grid-template-columns: minmax(0, 1fr) auto; }
.classement.sans-rang li::before { content: none; }
.classement strong { font-variant-numeric: tabular-nums; }
.resume-texte { margin: 0; font-size: 1.05rem; line-height: 1.55; }
.guide-fin form, .resume form { display: grid; }
.actions-relecture .bouton { white-space: normal; width: 100%; text-align: center; }
.comparaisons .aide { display: block; }

/* Lot 2a : réservations, services, programmation des écrans, alertes */
input[type=date], input[type=datetime-local] { width: 100%; min-height: 48px; padding: .6rem .7rem; border: 1.5px solid #cfc5b6; border-radius: 10px; background: #fff; color: var(--encre); font: inherit; }
code { font: .85em ui-monospace, Menlo, Consolas, monospace; background: #efe8dc; padding: .05rem .3rem; border-radius: 5px; overflow-wrap: anywhere; }
.alerte-rouge { background: var(--rouge-fond); border-color: #efc4bf; color: #7f1d1d; }
.carte-lien.encadre { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); }
.reservation { display: grid; gap: .45rem; }
.reservation-tete { display: flex; align-items: center; gap: .7rem; }
.reservation-heure { font: 700 1.5rem/1 var(--titre); font-variant-numeric: tabular-nums; flex: none; }
.reservation-qui { flex: 1; min-width: 0; display: grid; }
.reservation-qui strong { overflow-wrap: anywhere; }
.reservation-remarque { margin: 0; font-weight: 600; color: var(--accent-fonce); }
.reservation-gestes { display: flex; flex-wrap: wrap; gap: .4rem; }
.reservation-table label { flex: none; }
.reservation-table select { min-height: 44px; }
.reservation.etat-annulee, .reservation.etat-absente { opacity: .62; }
.reservation.etat-annulee .reservation-qui strong { text-decoration: line-through; }
.reservation p { margin: 0; }
.plan-salle { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }
.plan-salle li { display: grid; gap: .1rem; padding: .55rem .65rem; border: 1.5px dashed var(--trait); border-radius: 12px; font-size: .88rem; min-height: 64px; align-content: start; }
.plan-salle li.prise { border: 1.5px solid var(--accent); background: #fbeee8; }
.plan-salle strong { font-size: 1rem; }
.classement.sans-rang li a { min-width: 0; }
.ligne-ordre .carte-lien { flex: 1; min-width: 0; padding: .4rem 0; }
[hidden] { display: none !important; }

/* Lot 2b : stocks, inventaire, fournisseurs, marges, hygiène */
h3 { font: 700 1.1rem/1.2 var(--titre); margin: 0; }
.stock-ligne { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .6rem; }
.stock-nom { display: grid; gap: .1rem; min-width: 0; }
.stock-nom strong { overflow-wrap: anywhere; line-height: 1.25; }
.stock-quantite { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; display: grid; justify-items: end; gap: .15rem; }
.stock-quantite.bas { color: #8a5200; } .stock-quantite.epuise { color: var(--rouge); }
.stock-tete, .marge-carte { background: var(--encre); color: #f7f3ec; border-radius: var(--rayon); padding: .9rem 1rem; display: grid; gap: .2rem; margin: .4rem 0 .6rem; }
.stock-tete strong, .marge-carte strong { font: 700 2rem/1.1 var(--titre); font-variant-numeric: tabular-nums; }
.stock-tete span, .marge-carte span { font-size: .88rem; color: #dcd3c7; }
.marge-carte span strong { font: inherit; font-weight: 700; color: #fff; }
.stock-tete.bas, .marge-carte.basse { background: #7a4a00; } .stock-tete.epuise, .marge-carte.a-perte { background: var(--rouge); }
.geste { padding: 0; gap: 0; }
.geste summary { padding: .9rem 1rem; font-weight: 700; cursor: pointer; min-height: 52px; display: flex; align-items: center; color: var(--accent-fonce); }
.geste-corps { display: grid; gap: .8rem; padding: 0 1rem 1rem; grid-template-columns: minmax(0, 1fr); }
.gros-nombre { font: 700 1.9rem/1 var(--police) !important; text-align: center; min-height: 64px !important; font-variant-numeric: tabular-nums; }
.deux.egal { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mouvements, .fiche-lignes, .tarifs, .fiche-contact { list-style: none; margin: 0; padding: 0; display: grid; }
.mouvements li, .fiche-lignes li, .tarifs li { display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding: .6rem 0; border-top: 1px solid var(--trait); }
.mouvements li:first-child, .fiche-lignes li:first-child, .tarifs li:first-child { border-top: 0; }
.mouvements li.vide, .fiche-lignes li.vide, .tarifs li.vide { display: block; border: 1px dashed var(--trait); padding: .8rem; }
.mouvement-quoi { display: grid; gap: .1rem; min-width: 0; }
.mouvement-combien { display: grid; justify-items: end; text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.plus { color: var(--vert); } .moins { color: var(--rouge); }
.fiche-total { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.fiche-ajout { display: grid; gap: .6rem; padding-top: .8rem; border-top: 1px dashed var(--trait); grid-template-columns: minmax(0, 1fr); }
.fiche-contact li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .5rem; padding: .3rem 0; overflow-wrap: anywhere; }
.remarques { margin: 0; padding: .6rem .8rem; background: #f3ecdf; border-radius: 10px; font-size: .93rem; }
.tarif-saisie, .quantite-saisie { display: flex; align-items: center; gap: .4rem; flex: none; }
.tarif-saisie input, .quantite-saisie input { width: 5.6rem; text-align: right; }
.quantite-saisie { flex-direction: column; align-items: flex-end; gap: .1rem; }
.ligne-bon { align-items: flex-start !important; }
textarea[readonly] { background: #f7f3ec; font: .9rem/1.45 ui-monospace, Menlo, Consolas, monospace; }
textarea { min-height: 0; }

.zones-inventaire, .actions-inventaire { display: grid; gap: .6rem; margin: .8rem 0 1.2rem; }
.zone-bouton { min-height: 76px; display: grid; justify-items: start; align-content: center; gap: .1rem; padding: .7rem 1rem; text-align: left; white-space: normal; font-size: 1.15rem; }
.zone-bouton span { font-size: .87rem; font-weight: 500; color: var(--doux); }
.zone-bouton.tout { border-style: dashed; }
.compteur { display: flex; justify-content: space-between; align-items: baseline; margin: .2rem 0 .3rem; color: var(--doux); font-weight: 600; }
.compteur strong { font: 700 1.3rem var(--titre); color: var(--encre); font-variant-numeric: tabular-nums; }
.comptage { display: grid; gap: .8rem; margin-top: 1rem; grid-template-columns: minmax(0, 1fr); }
.comptage h1 { font-size: 2rem; margin: .4rem 0 0; }
.pas { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; gap: .5rem; align-items: stretch; }
.pas .bouton { min-height: 64px; font-size: 1.8rem; padding: 0; }
.bouton.geant { min-height: 68px; font-size: 1.2rem; }
.compte-champ .etiquette { font-size: 1.05rem; }

.ligne-reception.ecarte > :not(.champ:first-of-type) { opacity: .45; }
.lu { margin: 0; display: grid; gap: .1rem; padding: .5rem .7rem; background: #f3ecdf; border-radius: 10px; overflow-wrap: anywhere; }
.tracabilite summary { cursor: pointer; padding: .4rem 0; font-size: .93rem; color: var(--accent-fonce); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.ligne-date, .tache { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.ligne-date.depassee { background: var(--rouge-fond); border-color: #efc4bf; } .ligne-date.proche { background: #fff4dc; border-color: #f0d49a; }
.tache.faite { background: var(--vert-fond); border-color: #bfe0cb; }
.coche-faite { width: 44px; height: 44px; border-radius: 50%; background: var(--vert); color: #fff; display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; flex: none; }
.releve { gap: .6rem; } .hors-plage.carte-formulaire { border: 2px solid var(--rouge); background: var(--rouge-fond); }
tr.hors-plage td { background: var(--rouge-fond); }
.tableau { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tableau th, .tableau td { text-align: left; padding: .4rem .35rem; border-top: 1px solid var(--trait); vertical-align: top; }
.tableau th { border-top: 0; font-size: .78rem; color: var(--doux); }
.tableau td .aide { display: block; font-size: .78rem; }
.tris { display: flex; gap: .4rem; overflow-x: auto; padding: .2rem 0 .7rem; -webkit-overflow-scrolling: touch; }
.tris a { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 .8rem; border-radius: 99px; border: 1.5px solid var(--trait); background: #fff; font-size: .88rem; font-weight: 600; color: var(--doux); text-decoration: none; }
.tris a[aria-current] { background: var(--encre); border-color: var(--encre); color: #fff; }
.marges { padding-left: 0; }
.marges li.a-perte { border-color: var(--rouge); border-width: 2px; } .marges li.basse { border-color: #e0b25c; border-width: 2px; }
.marge-tete { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.marge-pct { font: 700 1.25rem var(--titre); font-variant-numeric: tabular-nums; flex: none; }
.puce input[type=checkbox] { width: 100%; height: 100%; }
@media print { .retour, .zone-danger, .actions-inventaire, .tris, form.hors-impression { display: none !important; } .carte-formulaire { border: 0; padding: 0; } }
.page > .aide + .categorie { margin-top: 1rem; }
/* Lot 3 : livraison, réseau, accords, relevés */
.mention-accord { margin: 1rem 0; padding: .8rem .9rem; border-left: 4px solid #c9bfae; background: #f6f1e7; color: #4b443d; font-size: .88rem; border-radius: 6px; }
.sans-argent { margin: 0 0 1rem; padding: .7rem .9rem; border-radius: var(--rayon); background: #eef3fb; border: 1px solid #c9d8ee; color: #17355e; font-size: .92rem; }
.ligne-membre { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .8rem .9rem; background: #fff; border: 1px solid var(--trait, #e4dccf); border-radius: var(--rayon); }
.ligne-membre > span { display: grid; gap: .2rem; min-width: 0; }
.ligne-membre input[readonly], .invitation-neuve input[readonly] { width: 100%; font-size: .8rem; padding: .4rem .5rem; border: 1px solid #d8cfbf; border-radius: 8px; background: #faf7f1; }
.invitation-neuve { margin: 0 0 1rem; padding: .9rem; border-radius: var(--rayon); background: var(--vert-fond); border: 1px solid #b7dcbf; display: grid; gap: .5rem; }
.invitation-neuve p { margin: 0; }
.code-invitation { font: 700 1.8rem/1.1 ui-monospace, monospace; letter-spacing: .18em; text-align: center; }
.accord-carte, .course-carte { display: grid; gap: .25rem; padding: .8rem .9rem; background: #fff; border: 1px solid var(--trait, #e4dccf); border-radius: var(--rayon); margin-bottom: .6rem; list-style: none; }
.accord-carte.attente { border-color: #f0d49a; background: #fffaf0; }
.course-carte .gestes { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.course-carte .gestes form { margin: 0; }
.proposer-a { display: flex; gap: .4rem; flex: 1 1 100%; }
.proposer-a select, .proposer-a input { flex: 1; min-width: 0; min-height: 44px; font: inherit; border-radius: 10px; border: 1px solid #cfc6b8; padding: 0 .6rem; background: #fff; }
.releve-courses { width: 100%; border-collapse: collapse; font-size: .92rem; margin-bottom: 1rem; }
.releve-courses th, .releve-courses td { text-align: left; padding: .45rem .4rem; border-bottom: 1px solid #e7e0d4; }
.releve-courses th:nth-child(n+3), .releve-courses td:nth-child(n+3) { text-align: right; white-space: nowrap; }
.releve-courses.detail { font-size: .82rem; }
.releve-courses small { color: #7a7167; }
@media print { .hors-impression, .bandeau, .onglets, .mention-accord { display: none !important; } .releve-courses { font-size: 10pt; } }

/* --- Lot 4 : état du service, incidents --- */
.incidents { margin: 0 0 .9rem; }
.incident { margin: 0 0 .4rem; padding: .7rem .9rem; border-radius: 12px; background: #fff4dc; color: #5c3900; border-left: 6px solid #b45309; }
.incident-grave { background: var(--rouge-fond); color: #7f1d1d; border-left-color: #b91c1c; }
.incident a { color: inherit; font-weight: 700; }
.liste-etat { list-style: none; margin: 0 0 1rem; padding: 0; }
.liste-etat li { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .9rem; margin-bottom: .4rem; border-radius: 12px; background: #fff; border-left: 6px solid #15803d; }
.liste-etat li.etat-ko { border-left-color: #b91c1c; background: var(--rouge-fond); }
.liste-etat li.etat-passe { border-left-color: #9ca3af; }
.bandeau-essai { margin: 0 0 .9rem; padding: .7rem .9rem; border-radius: 12px; background: #fff4dc; color: #5c3900; border-left: 6px solid #b45309; }
.filtres { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .8rem; }
.filtres [aria-current="true"] { background: var(--encre); border-color: var(--encre); color: #fff; }
.classement.sans-rang li { display: flex; justify-content: space-between; gap: 1rem; }
