:root {
  --bg: #f4f5f3; --card: #fff; --ink: #1b2420; --muted: #66726c; --line: #dde2df;
  --accent: #0f766e; --accent-ink: #fff; --accent-soft: #d9f0ec;
  --warn: #b45309; --warn-soft: #fdecd0; --danger: #b91c1c; --danger-soft: #fbe0e0;
  --ok: #15803d; --ok-soft: #dcf3e2; --info: #1d5fa8; --info-soft: #dce9f8;
  --radius: 12px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131816; --card: #1c2320; --ink: #e8eeea; --muted: #93a19a; --line: #2d3733;
    --accent: #2dd4bf; --accent-ink: #06201c; --accent-soft: #143d37;
    --warn: #f0a94a; --warn-soft: #3d2c12; --danger: #f28b8b; --danger-soft: #3e1c1c;
    --ok: #6fd58b; --ok-soft: #173a22; --info: #7db4ee; --info-soft: #162e4a;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .right { text-align: right; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Barre de navigation */
#nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem; background: var(--card); border-bottom: 1px solid var(--line); }
#nav:empty { display: none; }
.brand { font-weight: 700; white-space: nowrap; margin-right: .5rem; }
.nav-liens { display: flex; gap: .25rem; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.nav-liens a { padding: .5rem .8rem; border-radius: 999px; text-decoration: none; color: var(--muted); white-space: nowrap; font-weight: 600; }
.nav-liens a.actif { background: var(--accent-soft); color: var(--accent); }
.moi { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }

main { padding: .75rem; max-width: 1400px; margin: 0 auto; }
.page > h1 { margin-bottom: .75rem; }
.barre { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.barre .espace { flex: 1; }

/* Boutons */
.btn { min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; font-weight: 600; }
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary, a.btn.primary { color: var(--accent-ink); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.danger.plein { background: var(--danger); color: #fff; }
.btn.petit { min-height: 36px; padding: .25rem .7rem; font-size: .9rem; }
.btn.icone { min-width: 36px; padding: .25rem; }
.chip { min-height: 40px; padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600; white-space: nowrap; }
.chip.actif { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; }

/* Cartes, formulaires */
.carte { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; box-shadow: var(--shadow); }
.carte + .carte { margin-top: .75rem; }
.form { display: grid; gap: .7rem; }
.champ { display: grid; gap: .25rem; }
.champ > span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.champ.inline { display: flex; align-items: center; gap: .5rem; }
.champ.inline > span { font-size: 1rem; color: var(--ink); }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-height: 44px; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent); }
.cases { display: grid; gap: .3rem; }
.cases label { display: flex; gap: .5rem; align-items: center; min-height: 36px; }

/* Connexion */
.auth { max-width: 420px; margin: 8vh auto 0; }
.auth h1 { text-align: center; margin-bottom: 1rem; }
.auth .chips { justify-content: center; margin-bottom: 1rem; }

/* Plan de salle */
.grille-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.table { display: grid; gap: .1rem; align-content: center; justify-items: center; min-height: 96px; padding: .5rem; border-radius: var(--radius); border: 2px solid var(--line); background: var(--card); cursor: pointer; }
.table strong { font-size: 1.3rem; }
.table small { color: var(--muted); }
.table.ouverte { border-color: var(--warn); background: var(--warn-soft); }
.table.envoyee { border-color: var(--info); background: var(--info-soft); }
.table.servie { border-color: var(--ok); background: var(--ok-soft); }

/* Écran de commande */
.commande { display: grid; grid-template-columns: 1fr 380px; gap: .75rem; align-items: start; }
.produits { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; margin-top: .6rem; }
.produit { display: grid; align-content: space-between; gap: .3rem; min-height: 84px; padding: .6rem; text-align: left; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.produit:hover { border-color: var(--accent); }
.produit:disabled { opacity: .4; cursor: not-allowed; }
.produit .p { color: var(--accent); font-weight: 700; }
.panier { position: sticky; top: 64px; }
.panier ul { list-style: none; margin: 0; padding: 0; }
.ligne { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.ligne-haut { display: flex; gap: .5rem; align-items: baseline; }
.ligne .nom { flex: 1; font-weight: 600; } .ligne .qte { font-weight: 700; color: var(--accent); }
.ligne.annulee .nom, .ligne.annulee .prix { text-decoration: line-through; color: var(--muted); }
.ligne-actions { display: flex; gap: .35rem; align-items: center; margin-top: .3rem; flex-wrap: wrap; }
.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--line); color: var(--muted); }
.badge.en_attente { background: var(--warn-soft); color: var(--warn); }
.badge.en_preparation { background: var(--info-soft); color: var(--info); }
.badge.pret { background: var(--ok-soft); color: var(--ok); }
.badge.servi { background: var(--line); color: var(--muted); }
.badge.annule, .badge.danger { background: var(--danger-soft); color: var(--danger); }
.totaux { display: grid; gap: .2rem; margin: .75rem 0; }
.totaux div { display: flex; justify-content: space-between; }
.totaux .grand { font-size: 1.3rem; font-weight: 800; border-top: 2px solid var(--ink); padding-top: .35rem; margin-top: .2rem; }
.actions-panier { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.actions-panier .large { grid-column: 1 / -1; }
.bandeau { padding: .6rem .8rem; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-weight: 700; margin-bottom: .6rem; }
.bandeau.danger { background: var(--danger-soft); color: var(--danger); }

/* Cuisine */
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .75rem; }
.ticket-cuisine { border-left: 6px solid var(--info); }
.ticket-cuisine.retard { border-left-color: var(--warn); }
.ticket-cuisine.tres-retard { border-left-color: var(--danger); }
.ticket-cuisine header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .4rem; }
.ticket-cuisine .item { display: flex; gap: .5rem; align-items: center; padding: .45rem 0; border-top: 1px solid var(--line); }
.ticket-cuisine .item .info { flex: 1; } .ticket-cuisine .item .q { font-weight: 800; font-size: 1.15rem; }
.vide { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }

/* Tableaux de gestion */
.liste { display: grid; gap: .35rem; }
.rang { display: flex; align-items: center; gap: .6rem; padding: .5rem .2rem; border-bottom: 1px solid var(--line); }
.rang .nom { flex: 1; font-weight: 600; }
.deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .75rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; }
.stat { padding: .6rem; border-radius: 10px; background: var(--bg); } .stat b { display: block; font-size: 1.15rem; }
.ecart-ok { color: var(--ok); } .ecart-ko { color: var(--danger); }

/* Fenêtres */
.modal-fond { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1rem; background: rgba(10,16,14,.55); }
.modal { width: min(460px, 100%); max-height: 92vh; overflow: auto; background: var(--card); border-radius: 16px; padding: 1.1rem; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.modal.large { width: min(640px, 100%); }
.modal-corps { margin: .5rem 0 1rem; }
.modal-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.modal-actions .btn { flex: 1; min-width: 110px; }
.groupe-options { margin-bottom: .9rem; } .groupe-options h3 { display: flex; justify-content: space-between; }
.recu { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; white-space: pre-wrap; background: var(--bg); padding: .7rem; border-radius: 8px; }
.a-rendre { font-size: 1.2rem; font-weight: 800; color: var(--ok); }

#toasts { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 60; display: grid; gap: .4rem; width: min(92vw, 420px); }
.toast { padding: .7rem 1rem; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.toast.err { background: var(--danger); color: #fff; }

.ticket-print { display: none; }
@media print {
  body:not(.page-print) > *:not(#ticket) { display: none !important; }
  body:not(.page-print) #ticket { display: block; width: 72mm; margin: 0; font: 12px/1.35 ui-monospace, Menlo, Consolas, monospace; color: #000; white-space: pre-wrap; }
  body.page-print #nav, body.page-print #bandeaux, body.page-print #toasts, body.page-print #ticket, body.page-print .no-print { display: none !important; }
  body.page-print { background: #fff; color: #000; }
  body.page-print .carte { box-shadow: none; break-inside: avoid; }
}

@media (max-width: 900px) {
  .commande { grid-template-columns: 1fr; }
  .panier { position: static; }
  .profil-texte small { display: none; }
}

/* Bandeaux d'état (réseau, abonnement) */
.bandeau-haut { padding: .5rem .9rem; font-weight: 600; font-size: .92rem; text-align: center; }
.bandeau-haut a { color: inherit; text-decoration: underline; }
.bandeau-haut.hors { background: var(--danger); color: #fff; }
.bandeau-haut.sync { background: var(--info-soft); color: var(--info); }
.bandeau-haut.abo { background: var(--warn-soft); color: var(--warn); }
.bandeau.info { display: flex; gap: .75rem; align-items: center; justify-content: space-between; background: var(--info-soft); color: var(--info); }
.bandeau.attention, .carte.attention { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.carte.attention h3, .carte.attention .rang { color: inherit; }
.table.en-file { border-style: dashed; border-color: var(--warn); }
.table .resa { color: var(--info); font-weight: 700; text-align: center; }

/* Tableau de bord et rapports */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.kpi { display: grid; gap: .1rem; align-content: start; padding: .7rem .8rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.kpi small { color: var(--muted); font-weight: 600; }
.kpi b { font-size: 1.45rem; line-height: 1.2; }
.kpi.principal { background: var(--accent-soft); border-color: var(--accent); grid-column: span 2; }
.kpi.principal b { font-size: 1.9rem; color: var(--accent); }
.gros { font-size: 1.25rem; font-weight: 800; }
.barres { display: flex; align-items: flex-end; gap: 3px; padding-top: .5rem; }
.barre-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%; }
.barre-fut { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.barre-rempli { width: 100%; min-height: 2px; background: var(--accent); border-radius: 3px 3px 0 0; }
.barre-col small { font-size: .68rem; color: var(--muted); white-space: nowrap; overflow: hidden; }
.defile { overflow-x: auto; }
.tableau-rapport { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tableau-rapport th, .tableau-rapport td { padding: .4rem .5rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.tableau-rapport th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.tableau-rapport th.right, .tableau-rapport td.right { text-align: right; }
.tableau-rapport td.vide { text-align: center; padding: 1rem; }
.tableau-rapport tfoot th { border-top: 2px solid var(--ink); }
.grille-resto { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; }
.resto-carte { display: grid; gap: .15rem; text-align: left; padding: .7rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.resto-carte.actif { border-color: var(--accent); background: var(--accent-soft); cursor: default; }
.grille-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem; }
.plan { display: grid; gap: .2rem; text-align: left; padding: .8rem; border-radius: var(--radius); border: 2px solid var(--line); background: var(--card); cursor: pointer; }
.plan.actif { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 600px) { .kpi.principal { grid-column: 1 / -1; } }
.deux > .carte, .deux > .carte + .carte { margin-top: 0; }

/* Photos des produits, logo, image de marque */
.produit.avec-photo { padding: 0; overflow: hidden; align-content: start; gap: 0; }
.produit .photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--line); }
.produit-texte { display: grid; gap: .2rem; padding: .5rem .6rem .6rem; text-align: left; }
.produit:not(.avec-photo) .produit-texte { padding: 0; align-content: space-between; height: 100%; }
.miniature { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; background: var(--line); }
.brand { display: inline-flex; align-items: center; gap: .5rem; }
.brand .logo { height: 30px; width: auto; max-width: 90px; object-fit: contain; border-radius: 6px; }
.palette { display: flex; flex-wrap: wrap; gap: .5rem; }
.pastille { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.pastille.actif { box-shadow: 0 0 0 3px var(--ink); }
.son-reglage { display: inline-flex; align-items: center; gap: .3rem; }
.son-reglage select { min-height: 36px; width: auto; padding: .2rem .5rem; }
.bandeau-son { display: block; width: 100%; text-align: center; border: 0; cursor: pointer; font-size: 1rem; margin-bottom: .75rem; }

.profil { display: inline-flex; align-items: center; gap: .5rem; padding: .2rem .6rem .2rem .25rem; border: 1px solid var(--line); border-radius: 999px; background: var(--accent-soft); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }
.profil-texte { display: flex; flex-direction: column; line-height: 1.1; }
.profil-texte b { font-size: .88rem; }
.profil-texte small { font-size: .72rem; color: var(--muted); }
.moi { flex-shrink: 0; }

.ico { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; background: var(--accent-soft); color: var(--accent); }
.ico.vert { background: #dcfce7; color: #15803d; } .ico.bleu { background: #dbeafe; color: #1d4ed8; } .ico.violet { background: #ede9fe; color: #6d28d9; }
.ico.orange { background: #ffedd5; color: #c2410c; } .ico.rose { background: #fce7f3; color: #be185d; } .ico.rouge { background: #fee2e2; color: #b91c1c; } .ico.jaune { background: #fef9c3; color: #a16207; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ico[class*=" "]:not(.x) { filter: brightness(.85) saturate(.9); } }
.titre-ico { display: flex; align-items: center; gap: .6rem; }
.kpi-tete { display: flex; align-items: center; gap: .5rem; margin-bottom: .25rem; }
.kpi-tete .ico { width: 30px; height: 30px; border-radius: 9px; }
@media (min-width: 901px) { .nav-liens { flex-wrap: wrap; overflow: visible; } }
@media (max-width: 900px) {
  #nav { flex-wrap: wrap; }
  .brand { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .nav-liens { order: 3; flex: 1 0 100%; overflow-x: auto; }
  .profil-texte { display: none; }
  .profil { padding: .2rem; }
}

/* Poste partagé : écran des noms */
.poste { max-width: 980px; margin: 0 auto; padding: 0 1rem 2rem; }
.poste-tete { display: flex; align-items: center; gap: 1rem; margin: 0 -1rem 1.25rem; padding: 1rem 1.25rem; background: var(--accent); color: var(--accent-ink); border-radius: 0 0 20px 20px; text-align: left; flex-wrap: wrap; }
.poste-logo { width: 56px; height: 56px; border-radius: 14px; object-fit: contain; background: #fff; flex-shrink: 0; }
.poste-logo.initiale { display: grid; place-items: center; font-size: 1.8rem; font-weight: 800; background: rgba(255,255,255,.22); color: var(--accent-ink); }
.poste-titre { flex: 1; min-width: 160px; }
.poste-titre h1 { margin: 0; font-size: 1.5rem; }
.poste-titre small { opacity: .85; }
.poste-droite { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.horloge { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.horloge b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.horloge small { opacity: .85; text-transform: capitalize; }
.etat-poste { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.puce-etat { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: rgba(255,255,255,.9); color: #1b2420; }
.puce-etat::before { content: ''; width: .55rem; height: .55rem; border-radius: 50%; background: var(--ok); }
.puce-etat.hors::before { background: var(--danger); }
.puce-etat.hors { background: var(--danger-soft); color: var(--danger); }
.puce-etat.attente { background: var(--warn-soft); color: var(--warn); }
.puce-etat.attente::before { background: var(--warn); }
.groupe-tuiles { text-align: left; margin-top: 1rem; }
.groupe-tuiles h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; gap: .5rem; }
.compte { background: var(--accent-soft); color: var(--ink); border-radius: 999px; padding: 0 .5rem; font-size: .75rem; }
.recherche-nom { width: 100%; max-width: 420px; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); margin-bottom: .5rem; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .85rem; margin: .5rem 0; }
.tuile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; padding: 1.1rem .5rem; border: 1px solid var(--line); border-radius: 18px; background: var(--card); cursor: pointer; font: inherit; color: inherit; min-height: 150px; box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.tuile[hidden], .groupe-tuiles[hidden] { display: none; }
.tuile:active { transform: scale(.96); }
.tuile:hover, .tuile:focus-visible { border-color: var(--accent); outline: none; }
.tuile strong { font-size: 1.05rem; }
.tuile small { color: var(--muted); }
.tuile.grise { opacity: .45; }
.tuile .cadenas { position: absolute; top: .45rem; right: .55rem; font-size: .8rem; }
.avatar.grand { width: 64px; height: 64px; font-size: 1.7rem; }
.avatar.colore { box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.code-boite { display: grid; gap: .6rem; justify-items: center; }
.code-nom { font-size: 1.15rem; }
.points-code { display: flex; gap: .7rem; margin: .4rem 0; }
.point-code { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent); transition: background .1s, transform .1s; }
.point-code.plein { background: var(--accent); transform: scale(1.15); }
@keyframes secoue { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.points-code.secoue { animation: secoue .35s; }
.clavier { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; width: 100%; max-width: 280px; }
.touche { padding: 1rem 0; font: inherit; font-size: 1.4rem; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: inherit; cursor: pointer; }
.touche.petite { font-size: .9rem; }
.touche:active { background: var(--accent-soft); transform: scale(.95); }
/* Avertissement avant le retour automatique à l'écran des noms */
.verrou-alerte { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: 0 6px 24px rgba(0,0,0,.35); font-weight: 600; }

/* Clignotant de stock faible + bandeau + cloche du son */
@keyframes clignote { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.clignote { animation: clignote 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .clignote { animation: none; outline: 2px solid currentColor; } }
.point-alerte { display: inline-grid; place-items: center; min-width: 1.2rem; height: 1.2rem; margin-left: .35rem; padding: 0 .3rem; border-radius: 999px; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 800; vertical-align: middle; }
.bandeau-haut.stock { background: var(--danger-soft); color: var(--danger); border-bottom: 1px solid var(--danger); }
.bandeau-haut.stock a { color: inherit; font-weight: 700; text-decoration: underline; }
.stock-faible { position: absolute; top: .3rem; right: .3rem; padding: .1rem .45rem; border-radius: 999px; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 800; z-index: 2; }
.produit { position: relative; }
.cloche { font-size: 1rem; padding: .2rem .5rem; }
.toast.warn { background: var(--warn); color: #fff; }

/* ---- Écran Salle : accueil et tables (3 présentations au choix : cartes, plan, simple) ---- */
.accueil-salle { margin-bottom: .75rem; padding: .2rem .1rem; }
.accueil-texte h1 { margin: 0 0 .1rem; font-size: 1.45rem; }
.accueil-texte p { margin: 0; color: var(--muted); }
.choix-style { display: inline-flex; gap: .25rem; margin-right: .4rem; }
.choix-style .btn.actif { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.table { color: var(--accent); transition: transform .12s, box-shadow .12s; }
.table:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.14); }
.table:active { transform: scale(.97); }
.table strong { color: var(--ink); } .table small { color: var(--muted); }
.table.ouverte { color: var(--warn); } .table.envoyee { color: var(--info); } .table.servie { color: var(--ok); }
/* Cartes : numéro en grand, état en pastille de couleur, bande colorée à gauche */
.style-cartes { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.style-cartes .table { position: relative; min-height: 118px; padding: .7rem .6rem .6rem 1rem; justify-items: start; align-content: start; gap: .2rem; text-align: left; overflow: hidden; border-width: 1px; }
.style-cartes .table::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: currentColor; }
.style-cartes .table strong { font-size: 1.9rem; line-height: 1; }
.style-cartes .table.libre { background: var(--card); } .style-cartes .table.libre::before { opacity: .45; }
.etat-pastille { padding: .12rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 800; letter-spacing: .02em; background: var(--accent-soft); color: var(--accent); }
.table.ouverte .etat-pastille { background: var(--warn-soft); color: var(--warn); } .table.envoyee .etat-pastille { background: var(--info-soft); color: var(--info); } .table.servie .etat-pastille { background: var(--ok-soft); color: var(--ok); }
/* Plan : tables rondes, comme un plan de salle */
.style-ronds { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .9rem .6rem; }
.style-ronds .table { background: none; border: none; min-height: 0; padding: .3rem; gap: .25rem; box-shadow: none; }
.style-ronds .table:hover { box-shadow: none; }
.style-ronds .rond { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; border: 4px solid currentColor; background: color-mix(in srgb, currentColor 14%, var(--card)); transition: transform .12s; }
.style-ronds .table:hover .rond { transform: scale(1.06); }
.style-ronds .table.libre .rond { border-style: dashed; background: var(--card); }
.style-ronds .rond strong { font-size: 1.45rem; }
.style-ronds .table.en-file { border: none; } .style-ronds .table.en-file .rond { border-style: dashed; }
/* Simple : cases sobres, sans décor */
.style-simple .table { min-height: 96px; }
/* ---- Code-barres ---- */
.champ-scan { display: flex; gap: .4rem; align-items: stretch; } .champ-scan input { flex: 1; min-width: 0; } .champ-scan .btn { white-space: nowrap; }
.scan-video { width: 100%; max-height: 55vh; border-radius: 12px; background: #000; display: block; }

/* ---- Menu de commande : cartes produit (photo, nom, description, prix) ---- */
.menu-haut { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.menu-haut .chips { flex: 1 1 260px; min-width: 0; }
.recherche-produit { flex: 0 1 230px; min-height: 40px; padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); }
.recherche-produit:focus { outline: 2px solid var(--accent); border-color: transparent; }
.sous-chips { margin-top: .4rem; } .petit-chip { min-height: 34px; font-size: .9rem; padding: .2rem .75rem; background: var(--bg); }
.sous-titre { margin: .9rem 0 .1rem; color: var(--muted); font-size: .95rem; letter-spacing: .03em; text-transform: uppercase; }
.produits.cartes { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: .6rem; }
.carte-produit { display: flex; align-items: stretch; gap: .75rem; min-height: 104px; padding: .55rem; border-radius: 14px; border: 1px solid var(--line); background: var(--card); text-align: left; transition: border-color .12s, transform .12s, box-shadow .12s; }
.carte-produit:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.12); transform: translateY(-1px); }
.carte-produit:active:not(:disabled) { transform: scale(.98); }
.carte-produit .cp-photo { flex: 0 0 86px; width: 86px; height: 86px; border-radius: 12px; object-fit: cover; background: var(--line); align-self: center; }
.carte-produit .cp-initiale { display: grid; place-items: center; font-size: 2rem; font-weight: 800; color: var(--accent); background: var(--accent-soft); }
.cp-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.cp-nom { display: block; font-weight: 700; line-height: 1.2; }
.cp-desc { color: var(--muted); font-size: .85rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cp-bas { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .2rem; }
.cp-bas .p { font-size: 1.05rem; }
.cp-plus { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; line-height: 1; font-weight: 700; background: var(--accent); color: var(--accent-ink); }
.carte-produit.rupture .cp-photo { filter: grayscale(1); } .carte-produit.rupture .cp-plus { display: none; }
@media (max-width: 560px) { .produits.cartes { grid-template-columns: 1fr; } .recherche-produit { flex: 1 1 100%; } }
.commande { grid-template-columns: minmax(0, 1fr) 380px; } .commande > * { min-width: 0; } .menu-ui { min-width: 0; }
@media (max-width: 900px) { .commande { grid-template-columns: minmax(0, 1fr); } }

/* ---- Écran de connexion ---- */
.connexion-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.marque-panel { display: flex; flex-direction: column; justify-content: center; gap: .9rem; padding: 3rem clamp(1.5rem, 5vw, 4.5rem); color: #fff;
  background: radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--accent) 70%, #fff) 0, transparent 45%), linear-gradient(145deg, color-mix(in srgb, var(--accent) 88%, #000), color-mix(in srgb, var(--accent) 45%, #0b1512)); }
.marque-logo { width: 64px; height: 64px; display: grid; place-items: center; font-size: 2rem; border-radius: 18px; background: rgba(255,255,255,.16); backdrop-filter: blur(4px); }
.marque-panel h1 { margin: 0; font-size: clamp(1.8rem, 3.2vw, 2.6rem); letter-spacing: -.01em; text-align: left; }
.marque-slogan { margin: 0; max-width: 30ch; font-size: 1.1rem; opacity: .92; }
.marque-points { margin: .6rem 0 0; padding: 0; list-style: none; display: grid; gap: .55rem; }
.marque-points li { display: flex; gap: .6rem; align-items: center; opacity: .95; }
.marque-points li::before { content: '✓'; flex: 0 0 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.22); font-size: .8rem; font-weight: 800; }
.connexion-page .auth { margin: 0; align-self: center; justify-self: center; width: 100%; max-width: 440px; padding: 2rem 1.25rem; }
.auth-titre { margin: 0 0 .15rem; font-size: 1.6rem; } .auth-sous { margin: 0 0 1rem; }
.connexion-page .auth .chips { justify-content: flex-start; }
.connexion-page .auth .form.carte { padding: 1.1rem; box-shadow: var(--shadow); }
.connexion-page .auth input { min-height: 46px; font-size: 1rem; }
.connexion-page .auth .btn.primary { min-height: 48px; font-size: 1.05rem; }
.auth-pied { margin-top: 1.2rem; text-align: center; }
@media (max-width: 800px) { .connexion-page { grid-template-columns: 1fr; min-height: 0; } .marque-panel { padding: 1.6rem 1.25rem; gap: .5rem; } .marque-points, .marque-slogan { display: none; } .marque-logo { width: 48px; height: 48px; font-size: 1.5rem; } }

/* ---- Soldes de stock ---- */
.solde { align-items: center; gap: .6rem; }
.solde-jauge { flex: 0 0 120px; height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.solde-jauge div { height: 100%; border-radius: 999px; background: var(--ok); transition: width .3s; }
.solde.bas .solde-jauge div { background: var(--warn); } .solde.rupture .solde-jauge div { background: var(--danger); }
.solde-qte { min-width: 2.2rem; text-align: right; font-size: 1.15rem; } .solde.rupture .solde-qte { color: var(--danger); } .solde.bas .solde-qte { color: var(--warn); }
@media (max-width: 560px) { .solde-jauge { flex-basis: 70px; } }

/* --- Modules de Gestion (cartes) --- */
.hub-titre { margin: .25rem 0 .75rem; font-size: 1.35rem; } .hub-titre.petit { font-size: 1rem; margin-top: 1.5rem; color: var(--muted, #667); text-transform: uppercase; letter-spacing: .05em; }
.hub-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .85rem; }
.module { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; background: var(--card, #fff); border: 1px solid var(--border, #e3e3e0); border-radius: 16px; box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,.06)); text-align: left; color: inherit; text-decoration: none; cursor: pointer; font: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; min-height: 92px; }
.module:hover, .module:focus-visible { transform: translateY(-2px); border-color: var(--accent, #0a7d4f); box-shadow: 0 8px 22px rgba(0,0,0,.1); }
.module-ico { flex: none; width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.6rem; border-radius: 14px; background: color-mix(in srgb, var(--accent, #0a7d4f) 12%, #fff); }
.module-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; } .module-txt strong { font-size: 1.05rem; } .module-txt small { color: var(--muted, #667); font-size: .85rem; line-height: 1.3; }
.module-fleche { color: var(--accent, #0a7d4f); font-size: 1.3rem; }
/* --- Défilement des profils (connexion) --- */
.profils { margin: .25rem 0 .9rem; } .profils-q { margin: 0 0 .4rem; font-weight: 600; }
.profils-cadre { position: relative; }
.profils-piste { display: flex; gap: .6rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: .2rem .1rem .4rem; scroll-behavior: smooth; }
.profils-piste::-webkit-scrollbar { display: none; }
.profil { flex: none; scroll-snap-align: start; width: 118px; display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .8rem .5rem; background: var(--card, #fff); border: 2px solid var(--border, #e3e3e0); border-radius: 16px; cursor: pointer; font: inherit; color: inherit; text-align: center; transition: border-color .15s, transform .15s; }
.profil small { color: var(--muted, #667); font-size: .72rem; line-height: 1.2; }
.profil-ico { font-size: 1.9rem; } .profil:hover { transform: translateY(-2px); }
.profil.actif { border-color: var(--accent, #0a7d4f); background: color-mix(in srgb, var(--accent, #0a7d4f) 10%, #fff); }
.profils-fleche { position: absolute; top: 40%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border, #ddd); background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); cursor: pointer; font-size: 1.2rem; line-height: 1; z-index: 1; }
.profils-fleche.gauche { left: -10px; } .profils-fleche.droite { right: -10px; }

/* --- Poste partagé : rangées qui défilent --- */
.poste-bienvenue { display: block; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.glisse-cadre { position: relative; }
.tuiles.glisse { display: flex; gap: .85rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: .35rem .15rem .6rem; scroll-behavior: smooth; }
.tuiles.glisse::-webkit-scrollbar { display: none; }
.tuiles.glisse .tuile { flex: none; width: 170px; scroll-snap-align: start; }
.glisse-fleche { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: inherit; box-shadow: 0 3px 12px rgba(0,0,0,.35); cursor: pointer; font-size: 1.5rem; line-height: 1; z-index: 2; }
.glisse-fleche[hidden] { display: none; }
.glisse-fleche.gauche { left: -14px; } .glisse-fleche.droite { right: -14px; }

.glisse { display: flex; align-items: flex-start; gap: 1.6rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: .35rem .15rem .6rem; scroll-behavior: smooth; }
.glisse::-webkit-scrollbar { display: none; }
.glisse > .groupe-tuiles { flex: none; scroll-snap-align: start; margin-top: .25rem; }
.glisse .tuiles { display: flex; gap: .85rem; margin: .5rem 0; }
.glisse .tuile { flex: none; width: 170px; }
.poste a { color: var(--accent); }

/* --- Habillage « modules » sur tous les écrans --- */
.module-ico { background: var(--accent-soft); }
.profil.actif { background: var(--accent-soft); }
.banniere { display: flex; align-items: center; gap: .9rem; max-width: 1400px; margin: .75rem auto 0; padding: .8rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.banniere .module-ico { flex: none; width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.6rem; border-radius: 14px; }
.banniere-txt { display: flex; flex-direction: column; min-width: 0; } .banniere-txt strong { font-size: 1.25rem; } .banniere-txt small { color: var(--muted); }
@media (min-width: 1430px) { .banniere { margin-left: auto; margin-right: auto; } }
.banniere + main { padding-top: .75rem; }
/* le titre d'origine reste pour les lecteurs d'écran, mais n'est plus dessiné deux fois */
body[data-ban="caisse"] .page > h1, body[data-ban="prets"] .page > h1, body[data-ban="abonnement"] .page > h1, body[data-ban="rapports"] .barre h1 {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* barre de navigation : une icône devant chaque écran (décor, sans changer le texte) */
.nav-liens a::before { margin-right: .4rem; }
.nav-liens a[href="#/tableau"]::before { content: "🏠" / ""; } .nav-liens a[href="#/salle"]::before { content: "🛒" / ""; }
.nav-liens a[href="#/cuisine"]::before { content: "👨‍🍳" / ""; } .nav-liens a[href="#/prets"]::before { content: "🛎" / ""; }
.nav-liens a[href="#/caisse"]::before { content: "💳" / ""; } .nav-liens a[href="#/rapports"]::before { content: "📊" / ""; }
.nav-liens a[href="#/gestion"]::before { content: "⚙️" / ""; } .nav-liens a[href="#/abonnement"]::before { content: "⭐" / ""; }
.nav-liens a[href="#/plateforme"]::before { content: "🌐" / ""; }
/* cartes de chiffres et blocs : même style arrondi que les modules */
.stat { padding: .85rem 1rem; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .85rem; color: var(--muted); }
.stat b { font-size: 1.4rem; color: var(--ink); margin-top: .15rem; }
.carte { border-radius: 16px; }
.chip { transition: transform .12s, border-color .12s; } .chip:hover { border-color: var(--accent); }
.accueil-salle { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: .9rem 1.1rem; margin-bottom: .75rem; }
.accueil-salle h1 { margin: 0; font-size: 1.35rem; } .accueil-salle p { margin: .15rem 0 0; color: var(--muted); }
.chip[data-ico]::before { content: attr(data-ico) / ""; margin-right: .4rem; }
.banniere { width: calc(100% - 1.5rem); box-sizing: border-box; }

/* --- Poste partagé : fond animé + bouton de connexion --- */
.poste { position: relative; }
.poste-fond { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.poste-fond .aurore { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(70px); opacity: .32; background: var(--accent); animation: derive 26s ease-in-out infinite alternate; }
.poste-fond .a1 { top: -22vmax; left: -14vmax; }
.poste-fond .a2 { bottom: -26vmax; right: -16vmax; background: #7c5cff; animation-duration: 32s; animation-delay: -9s; opacity: .26; }
.poste-fond .a3 { top: 30%; left: 38%; width: 34vmax; height: 34vmax; background: #ffb454; animation-duration: 38s; animation-delay: -17s; opacity: .16; }
@keyframes derive { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(9vmax, 5vmax) scale(1.15); } 100% { transform: translate(-5vmax, 10vmax) scale(.95); } }
.poste-fond .flotte { position: absolute; bottom: -4rem; opacity: 0; animation: monte linear infinite; filter: saturate(.9); }
@keyframes monte { 0% { transform: translateY(0) rotate(-8deg); opacity: 0; } 12% { opacity: .22; } 85% { opacity: .22; } 100% { transform: translateY(-115vh) rotate(14deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .poste-fond .aurore, .poste-fond .flotte { animation: none; } .poste-fond .flotte { display: none; } }
.poste-pied { display: flex; justify-content: center; margin-top: 1.25rem; }
.poste a.btn.poste-lien { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .15rem .6rem; width: min(100%, 460px); padding: .8rem 1.2rem; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.poste a.btn.poste-lien:hover, .poste a.btn.poste-lien:focus-visible { transform: translateY(-2px); border-color: var(--accent); }
.poste-lien small { flex-basis: 100%; text-align: center; color: var(--muted); font-weight: 400; }

.poste-tete { padding: .6rem 1rem; gap: .75rem; } .poste-tete .poste-logo { width: 42px; height: 42px; font-size: 1.3rem; border-radius: 12px; }
.poste-titre h1 { font-size: 1.2rem; } .poste-droite { flex-direction: row; align-items: center; gap: .9rem; } .poste-droite .horloge { text-align: right; }
.poste .btn.poste-connexion { background: #fff; color: #10312c; border: 0; border-radius: 12px; padding: .55rem 1.3rem; font-weight: 700; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.poste .btn.poste-connexion:hover { transform: translateY(-1px); }
/* Poste partagé : le bloc (barre + noms) est centré verticalement, avec de l'air en haut */
.poste { display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - 1.5rem); padding-top: clamp(2rem, 8vh, 5rem); padding-bottom: clamp(2rem, 10vh, 6rem); box-sizing: border-box; }
.poste-tete { margin-bottom: 1.75rem; border-radius: 20px; }

.carte-produit .cp-bas { align-items: flex-end; } .carte-produit .p2 { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); }
.totaux .btn.petit { margin-top: .4rem; justify-self: start; }

.duo { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.2; text-align: right; } .duo small { font-size: .72em; font-weight: 500; color: var(--muted); }
.totaux .grand .duo small { font-size: .62em; }

/* « À servir » clignote quand des plats ou boissons sont prêts */
@keyframes pretPulse { 0%, 100% { background: #1f8a4c; color: #fff; box-shadow: 0 0 0 0 rgba(46,204,113,.7); } 50% { background: #2ecc71; color: #06260f; box-shadow: 0 0 0 10px rgba(46,204,113,0); } }
.nav-liens a.clign-prets { animation: pretPulse 1s ease-in-out infinite; }
.nav-liens a.clign-prets::after { content: attr(data-n) / ""; display: inline-grid; place-items: center; min-width: 1.2rem; height: 1.2rem; margin-left: .35rem; padding: 0 .3rem; border-radius: 999px; background: #fff; color: #1f8a4c; font-size: .72rem; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .nav-liens a.clign-prets { animation: none; background: #1f8a4c; color: #fff; } }

/* Cuisine = orange, Bar = violet : le lien de la barre et les nouveaux tickets clignotent dans leur couleur */
.nav-liens a[href="#/bar"]::before { content: "🍹" / ""; }
@keyframes cuisinePulse { 0%, 100% { background: #d97706; color: #fff; box-shadow: 0 0 0 0 rgba(251,146,60,.8); } 50% { background: #fb923c; color: #2a1200; box-shadow: 0 0 0 10px rgba(251,146,60,0); } }
@keyframes barPulse { 0%, 100% { background: #7c3aed; color: #fff; box-shadow: 0 0 0 0 rgba(167,139,250,.8); } 50% { background: #a78bfa; color: #1a0b3d; box-shadow: 0 0 0 10px rgba(167,139,250,0); } }
.nav-liens a.clign-cuisine { animation: cuisinePulse 1s ease-in-out infinite; }
.nav-liens a.clign-bar { animation: barPulse 1s ease-in-out infinite; }
.nav-liens a.clign-cuisine::after, .nav-liens a.clign-bar::after { content: attr(data-n) / ""; display: inline-grid; place-items: center; min-width: 1.2rem; height: 1.2rem; margin-left: .35rem; padding: 0 .3rem; border-radius: 999px; background: #fff; font-size: .72rem; font-weight: 800; }
.nav-liens a.clign-cuisine::after { color: #b45309; } .nav-liens a.clign-bar::after { color: #6d28d9; }
.ticket-cuisine.ticket-cuisine { border-left-color: #f59e0b; } .ticket-cuisine.ticket-bar { border-left-color: #8b5cf6; }
@keyframes ticketCuisine { 0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,.0), inset 0 0 0 0 rgba(245,158,11,0); } 50% { box-shadow: 0 0 22px 4px rgba(245,158,11,.75), inset 0 0 0 2px #f59e0b; } }
@keyframes ticketBar { 0%, 100% { box-shadow: 0 0 0 0 rgba(139,92,246,.0), inset 0 0 0 0 rgba(139,92,246,0); } 50% { box-shadow: 0 0 22px 4px rgba(139,92,246,.75), inset 0 0 0 2px #8b5cf6; } }
.ticket-cuisine.ticket-cuisine.nouveau { animation: ticketCuisine 1s ease-in-out infinite; }
.ticket-cuisine.ticket-bar.nouveau { animation: ticketBar 1s ease-in-out infinite; }
.poste-titre { font-weight: 800; font-size: 1.15rem; }
.poste-cuisine .poste-titre { color: #f59e0b; } .poste-bar .poste-titre { color: #a78bfa; }
@media (prefers-reduced-motion: reduce) { .nav-liens a.clign-cuisine { animation: none; background: #d97706; color: #fff; } .nav-liens a.clign-bar { animation: none; background: #7c3aed; color: #fff; } .ticket-cuisine.nouveau { animation: none; } }

.connexion-resp .tuiles { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } .connexion-resp .tuile { min-height: 130px; }
.poste .btn.poste-connexion { cursor: pointer; font: inherit; font-weight: 700; }

/* Écran des noms : tout est centré (titres, rangées de tuiles) */
.glisse { justify-content: safe center; }
.glisse-cadre { display: flex; justify-content: center; }
.glisse-cadre > .glisse { max-width: 100%; }
.glisse > .groupe-tuiles { text-align: center; }
.glisse > .groupe-tuiles h2 { justify-content: center; display: flex; align-items: center; gap: .45rem; }
.glisse .tuiles { justify-content: center; }
.service-ferme { margin: 1rem auto; max-width: 440px; text-align: center; padding: 1.6rem 1.4rem; border-radius: 22px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); display: grid; gap: .6rem; justify-items: center; }
.service-ferme .verrou-ico { font-size: 2.6rem; } .service-ferme h2 { margin: 0; } .service-ferme p { margin: 0; color: var(--muted); }

.puce-etat.puce-service { border: 0; font: inherit; font-weight: 700; }
button.puce-etat.puce-service.ouvert { cursor: pointer; background: #fde68a; color: #6b4a00; }
button.puce-etat.puce-service.ouvert:hover { filter: brightness(.96); }
.puce-etat.puce-service.ferme { background: #fecaca; color: #7a1414; }
.puce-service::before { display: none; }

.marque-contact { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid rgba(255,255,255,.28); display: grid; gap: .45rem; }
.marque-contact a { display: inline-flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; font-weight: 700; opacity: .95; }
.marque-contact a:hover, .marque-contact a:focus-visible { text-decoration: underline; opacity: 1; }

/* Message d'erreur d'un formulaire : toujours visible en haut de la fenêtre, même si on a défilé jusqu'aux boutons */
.modal .form > p.ecart-ko[role="alert"] { position: sticky; top: 0; z-index: 3; margin: 0 0 .6rem; padding: .6rem .8rem; border-radius: 10px; background: var(--danger-soft, #fde8e8); border: 1px solid var(--danger, #c0392b); color: var(--danger, #b42318); }

.champ-pin { -webkit-text-security: disc; text-security: disc; letter-spacing: .25em; }

/* Photos de profil */
img.avatar.photo { object-fit: cover; display: block; background: #ddd; }
.avatar-bouton { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; line-height: 0; }
.avatar-bouton:hover .avatar, .avatar-bouton:focus-visible .avatar { outline: 2px solid var(--accent); outline-offset: 2px; }
.rang > .avatar { flex: 0 0 auto; }

/* ---- Plateforme : restaurants, menu « Plus », réglages en cartes ---- */
.actions-resto { display: flex; gap: .35rem; align-items: center; justify-content: flex-end; white-space: nowrap; }
.menu-plus { position: relative; }
.menu-plus > summary { list-style: none; cursor: pointer; }
.menu-plus > summary::-webkit-details-marker { display: none; }
.menu-plus-liste { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 200px; display: grid; padding: .3rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.menu-plus-item { text-align: left; border: 0; background: none; padding: .55rem .7rem; border-radius: 8px; cursor: pointer; font: inherit; color: var(--ink); }
.menu-plus-item:hover { background: var(--accent-soft); }
.menu-plus-item.danger { color: var(--danger); }
.defile { overflow-x: auto; }
.defile:has(.menu-plus[open]) { min-height: 280px; }
.grille-reglages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; align-items: start; }
.colonne-reg { display: grid; gap: .8rem; align-content: start; }
.colonne-reg.large { grid-column: 1 / -1; }
.carte-reglage { display: grid; gap: .55rem; }
.carte-reglage h2 { margin: 0; font-size: 1.05rem; }
.champ-reg { display: grid; gap: .2rem; font-weight: 600; font-size: .9rem; }
.champ-reg input, .champ-reg select, .champ-reg textarea { width: 100%; }
.case-reg { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.profil-plateforme { display: flex; align-items: center; gap: .9rem; }
.profil-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.annonce-info { background: var(--accent-soft); color: var(--ink); }
.annonce-alerte { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 800px) { .grille-reglages { grid-template-columns: 1fr; } }
.menu-plus.haut .menu-plus-liste { top: auto; bottom: calc(100% + 4px); left: 0; right: auto; }
.menu-plus-item:disabled { opacity: .45; cursor: not-allowed; }
.actions-panier .menu-plus { grid-column: 1 / -1; }
.actions-panier .menu-plus > summary { display: block; text-align: center; }
.actions-panier > .danger { grid-column: 1 / -1; }

/* ---- Menu de commande : glissement fluide entre catégories ---- */
.menu-haut .chips, .menu-ui .chips { scroll-behavior: smooth; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.menu-ui .chips .chip { scroll-snap-align: center; transition: background .25s ease, color .25s ease, transform .2s ease, border-color .2s; }
.menu-ui .chips .chip.actif { transform: translateY(-1px) scale(1.04); box-shadow: 0 4px 14px rgba(0,0,0,.22); }
@keyframes glisse-depuis-droite { from { opacity: 0; transform: translateX(46px); } to { opacity: 1; transform: none; } }
@keyframes glisse-depuis-gauche { from { opacity: 0; transform: translateX(-46px); } to { opacity: 1; transform: none; } }
.glisse-d { animation: glisse-depuis-droite .38s cubic-bezier(.22, .8, .3, 1) both; }
.glisse-g { animation: glisse-depuis-gauche .38s cubic-bezier(.22, .8, .3, 1) both; }
.produits.cartes > .carte-produit { animation: apparait .35s ease both; }
.produits.cartes > .carte-produit:nth-child(2) { animation-delay: .03s; } .produits.cartes > .carte-produit:nth-child(3) { animation-delay: .06s; }
.produits.cartes > .carte-produit:nth-child(4) { animation-delay: .09s; } .produits.cartes > .carte-produit:nth-child(n+5) { animation-delay: .12s; }
@keyframes apparait { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .glisse-d, .glisse-g, .produits.cartes > .carte-produit { animation: none; } .menu-ui .chips { scroll-behavior: auto; } }
