/* Monsieur Moutarde — système visuel commun.
   Inspiré des règles Apple : police système, hiérarchie par graisse et taille, surfaces claires,
   retour immédiat à l'appui, cibles tactiles ≥ 44 px, rien ne déborde jamais.
   Téléphone d'abord ; tablette ≥ 768 px ; ordinateur ≥ 1024 px. */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&display=swap');

:root {
  /* Couleurs de la maison (noms historiques conservés : les pages s'en servent) */
  --papier: #f6f1e6;          /* fond de l'application */
  --papier2: #ece4d1;         /* fond secondaire, barres */
  --carte: #ffffff;           /* surfaces */
  --encre: #1d1b17;           /* texte principal */
  --encre2: #6e675a;          /* texte secondaire */
  --ligne: #e4dac4;           /* filets */
  --remplissage: rgba(60, 50, 30, .07);   /* fond des boutons secondaires */
  --remplissage2: rgba(60, 50, 30, .12);
  --moutarde: #c99a2e; --moutarde2: #8a6510; --bordeaux: #7b2131;
  --vert: #2e7d4f; --orange: #b45f12; --rouge: #c0392b; --bleu: #2b5c8a;

  --rayon: 16px; --rayon-s: 12px;
  --ombre: 0 1px 2px rgba(40, 30, 10, .05), 0 8px 24px rgba(40, 30, 10, .06);
  --ombre-haute: 0 10px 40px rgba(20, 15, 5, .22);

  --titre: 'Playfair Display', Georgia, serif;
  --texte: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --h-entete: 56px; --gouttiere: 16px;
  --sg: env(safe-area-inset-left, 0px); --sd: env(safe-area-inset-right, 0px);
  --sb: env(safe-area-inset-bottom, 0px); --sh: env(safe-area-inset-top, 0px);
  --ressort: cubic-bezier(.2, .9, .3, 1);
}
@media (min-width: 768px) { :root { --gouttiere: 24px; } }

/* ——— Base ——— */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overscroll-behavior-x: none; }
html, body { margin: 0; background: var(--papier); color: var(--encre); font-family: var(--texte); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; overflow-x: hidden; overflow-x: clip; overscroll-behavior: none; touch-action: pan-y pinch-zoom; position: relative; max-width: 100vw; }
.onglets, .puces-cat, .defile { touch-action: pan-x pan-y pinch-zoom; overscroll-behavior-x: contain; }
img, svg { max-width: 100%; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; overflow-wrap: break-word; }
h1, h2 { font-family: var(--titre); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 .6em; }
a { color: var(--bordeaux); }
.petit { font-size: .875rem; color: var(--encre2); }
.muet { color: var(--encre2); }
.gras { font-weight: 650; }
.droite { text-align: right; } .centre { text-align: center; }
.cache { display: none !important; }
.ic { width: 1.25em; height: 1.25em; flex: none; }
.n, .num, .chiffre, .compte, td.n { font-variant-numeric: tabular-nums; }

/* ——— Mise en page ——— */
.ligne { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.ligne > * { min-width: 0; }
.ligne.entre { justify-content: space-between; }
.ligne.serre { flex-wrap: nowrap; }
.pile > * + * { margin-top: 10px; }
.grille { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(var(--min, 240px), 100%), 1fr)); }
.grille > * { min-width: 0; }
.rangee-boutons { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); margin-top: 12px; }
.rangee-boutons > * { width: 100%; }

/* ——— Boutons : une seule famille, quatre poids ———
   par défaut : secondaire teinté · .btn-p : principal encre · .btn-m : accent moutarde
   .btn-v / .btn-r : valider / danger · .btn-l : contour discret */
button, .btn {
  font: inherit; font-size: .97rem; font-weight: 600; letter-spacing: -.005em;
  border: 1px solid transparent; background: var(--remplissage); color: var(--encre);
  border-radius: var(--rayon-s); padding: 0 16px; min-height: 44px; max-width: 100%; min-width: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; text-align: center; line-height: 1.2;
  white-space: normal; overflow-wrap: break-word; word-break: normal; hyphens: manual;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: transform .12s var(--ressort), background-color .15s ease, opacity .15s ease, box-shadow .15s ease;
}
button:active:not(:disabled), .btn:active { transform: scale(.97); opacity: .88; transition-duration: 60ms; }
button:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(201, 154, 46, .65); outline-offset: 2px; }
button:disabled { opacity: .4; cursor: not-allowed; }
@media (hover: hover) { button:hover:not(:disabled), .btn:hover { background-color: var(--remplissage2); } }
.btn-p { background: var(--encre); color: #fff; }
.btn-m { background: var(--moutarde); color: #1b1404; }
.btn-v { background: var(--vert); color: #fff; }
.btn-r { background: var(--bordeaux); color: #fff; }
@media (hover: hover) {
  .btn-p:hover:not(:disabled) { background: #000; } .btn-m:hover:not(:disabled) { background: #b88a22; }
  .btn-v:hover:not(:disabled) { background: #256a42; } .btn-r:hover:not(:disabled) { background: #67192a; }
}
.btn-l { background: var(--carte); border-color: var(--ligne); }
.btn-s { min-height: 36px; padding: 0 12px; font-size: .9rem; border-radius: 10px; }
@media (pointer: coarse) { .btn-s { min-height: 44px; } }
.btn-xl { min-height: 54px; font-size: 1.05rem; padding: 0 22px; border-radius: 14px; }
.btn-icone { min-width: 44px; padding: 0; }
.btn-icone .ic, .btn-icone svg { width: 22px; height: 22px; }
.plein { width: 100%; }
button svg, .btn svg { flex: none; }

/* ——— Champs ——— */
input, select, textarea { font: inherit; font-size: 16px; border: 1px solid var(--ligne); background: var(--carte); color: var(--encre); border-radius: var(--rayon-s); padding: 10px 14px; min-height: 48px; width: 100%; max-width: 100%; min-width: 0; transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--moutarde); box-shadow: 0 0 0 3px rgba(201, 154, 46, .2); outline: none; }
input[type="checkbox"] { width: 22px; min-height: 22px; height: 22px; padding: 0; accent-color: var(--encre); vertical-align: middle; margin: 0 8px 0 0; flex: none; }
input[type="time"], input[type="date"] { min-width: 0; -webkit-appearance: none; appearance: none; }
textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
label { display: block; font-size: .82rem; color: var(--encre2); margin: 12px 0 6px; font-weight: 600; }
label:has(input[type="checkbox"]) { display: flex; align-items: center; font-weight: 500; color: var(--encre); font-size: .97rem; min-height: 44px; margin: 4px 0; }

/* ——— Cartes, puces ——— */
.carte { background: var(--carte); border: 1px solid rgba(60, 50, 30, .06); border-radius: var(--rayon); padding: 16px; box-shadow: var(--ombre); min-width: 0; }
.carte > h3:first-child, .carte > h2:first-child { margin-top: 0; }
.puce { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: .76rem; font-weight: 650; background: var(--remplissage); color: var(--encre); white-space: nowrap; line-height: 1.35; max-width: 100%; vertical-align: middle; }
.puce.long, .carte .puce:not(td *, .compteur) { white-space: normal; }
.puce.vert { background: #dcefe3; color: #1d5a35; } .puce.orange { background: #fbe7cd; color: #7d3f05; } .puce.rouge { background: #f8dcd8; color: #8f1d16; }
.puce.bordeaux { background: #f3dde1; color: var(--bordeaux); } .puce.bleu { background: #dde8f3; color: #1f4466; } .puce.gris { background: var(--remplissage); color: var(--encre2); }
.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ——— Tableaux : tableau sur grand écran, cartes empilées sur téléphone ———
   api.js recopie l'en-tête de chaque colonne dans data-label. */
table.tab { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.tab th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 650; color: var(--encre2); border-bottom: 1px solid var(--ligne); padding: 10px 8px; white-space: nowrap; }
table.tab td { border-bottom: 1px solid #efe8d8; padding: 11px 8px; vertical-align: middle; overflow-wrap: break-word; }
table.tab tr:last-child td { border-bottom: none; }
table.tab td.n, table.tab th.n { text-align: right; white-space: nowrap; }
table.tab td:has(> button), table.tab td:has(> .btn) { white-space: nowrap; text-align: right; }
table.tab td > button + button, table.tab td > .btn + .btn, table.tab td > button + .btn, table.tab td > .btn + button { margin-left: 6px; }
@media (max-width: 899px) {
  table.tab, table.tab tbody, table.tab thead, table.tab tr, table.tab td { display: block; width: 100%; }
  table.tab tr:has(> th) { display: none; }
  table.tab tr { background: var(--carte); border-radius: var(--rayon-s); padding: 6px 14px; margin-bottom: 8px; box-shadow: 0 0 0 1px rgba(60, 50, 30, .07); }
  .carte table.tab tr { box-shadow: none; padding: 8px 0; border-radius: 0; margin: 0; border-bottom: 1px solid #efe8d8; }
  .carte table.tab tr:last-child { border-bottom: none; }
  table.tab td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; border: none; text-align: right; min-width: 0; }
  table.tab td::before { content: attr(data-label); flex: none; max-width: 48%; text-align: left; color: var(--encre2); font-size: .82rem; font-weight: 500; }
  table.tab td:not([data-label])::before, table.tab td[data-label=""]::before { content: none; }
  table.tab td:first-child { justify-content: flex-start; text-align: left; font-weight: 650; font-size: 1rem; flex-wrap: wrap; align-items: center; }
  table.tab td:first-child::before { content: none; }
  table.tab td:empty { display: none; }
  table.tab td.n, table.tab td:has(> button), table.tab td:has(> .btn) { white-space: normal; }
  table.tab td:has(> button), table.tab td:has(> .btn) { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(88px, 100%), 1fr)); gap: 8px; padding-top: 10px; }
  table.tab td:has(> button)::before, table.tab td:has(> .btn)::before { content: none; }
  table.tab td > button, table.tab td > .btn { width: 100%; margin: 0 !important; }
}

/* ——— En-tête ——— */
.entete { position: sticky; top: 0; z-index: 30; background: rgba(29, 27, 23, .96); color: #f4ead2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  padding: calc(6px + var(--sh)) calc(var(--gouttiere) + var(--sd)) 6px calc(var(--gouttiere) + var(--sg)); min-height: 56px; }
@supports (backdrop-filter: blur(1px)) { .entete { background: rgba(29, 27, 23, .88); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); } }
.entete .marque { font-family: var(--titre); font-weight: 700; letter-spacing: .06em; font-size: .98rem; line-height: 1.1; white-space: nowrap; }
.entete .marque small { display: block; font-size: .6rem; letter-spacing: .22em; color: var(--moutarde); font-family: var(--texte); font-weight: 700; margin-top: 2px; }
.entete .espace { flex: 1; }
.entete button, .entete .btn { background: rgba(255, 255, 255, .1); color: #fff; border: none; min-height: 40px; padding: 0 12px; font-size: .88rem; }
.entete .btn-icone { width: 40px; min-width: 40px; padding: 0; border-radius: 50%; }
@media (pointer: coarse) { .entete .btn-icone { width: 44px; min-width: 44px; min-height: 44px; } }
@media (hover: hover) { .entete button:hover, .entete .btn:hover { background: rgba(255, 255, 255, .18); } }
.entete #qui { color: rgba(255, 255, 255, .8); font-weight: 500; font-size: .88rem; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entete .barre-pointage { flex-basis: 100%; display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: .84rem; font-weight: 600; color: #fff;
  background: rgba(255, 255, 255, .08); border-radius: 12px; padding: 4px 4px 4px 12px; margin: 2px 0 4px; }
.entete .barre-pointage span { min-width: 0; line-height: 1.25; display: flex; align-items: center; gap: 8px; }
.entete .barre-pointage .pastille { width: 8px; height: 8px; border-radius: 50%; background: #e2a33a; flex: none; box-shadow: 0 0 0 3px rgba(226, 163, 58, .25); }
.entete .barre-pointage.en-service .pastille { background: #4cc77f; box-shadow: 0 0 0 3px rgba(76, 199, 127, .25); }
.entete .barre-pointage button { flex: none; min-height: 36px; border-radius: 9px; background: var(--moutarde); color: #1b1404; font-weight: 650; padding: 0 12px; }
.entete .barre-pointage.en-service button, .entete .barre-pointage button.btn-l { background: rgba(255, 255, 255, .14); color: #fff; }

/* Onglets : contrôle segmenté qui défile */
.onglets { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 8px calc(var(--gouttiere) + var(--sd)) 8px calc(var(--gouttiere) + var(--sg));
  background: rgba(246, 241, 230, .92); border-bottom: 1px solid rgba(60, 50, 30, .08); position: sticky; top: var(--h-entete); z-index: 25; scroll-padding-inline: 16px; }
@supports (backdrop-filter: blur(1px)) { .onglets { background: rgba(246, 241, 230, .78); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); } }
.onglets::-webkit-scrollbar { display: none; }
.onglets button { border: none; background: transparent; min-height: 38px; white-space: nowrap; border-radius: 10px; font-weight: 600; font-size: .92rem; color: var(--encre2); flex: none; padding: 0 14px; }
@media (pointer: coarse) { .onglets button { min-height: 44px; } }
.onglets button.on { background: var(--carte); color: var(--encre); box-shadow: 0 1px 3px rgba(40, 30, 10, .12), 0 0 0 .5px rgba(40, 30, 10, .06); }
@media (min-width: 1024px) { .onglets { flex-wrap: wrap; overflow: visible; } }
.compteur { display: inline-flex; align-items: center; justify-content: center; background: var(--bordeaux); color: #fff; border-radius: 99px; min-width: 20px; height: 20px; padding: 0 6px; font-size: .72rem; font-weight: 700; margin-left: 4px; font-variant-numeric: tabular-nums; }
main { padding: 16px calc(var(--gouttiere) + var(--sd)) calc(100px + var(--sb)) calc(var(--gouttiere) + var(--sg)); max-width: 1320px; margin: 0 auto; }

/* Barre du bas (téléphone) : matériau translucide */
.nav-bas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(255, 253, 248, .94); border-top: .5px solid rgba(60, 50, 30, .15);
  padding: 4px calc(8px + var(--sd)) calc(4px + var(--sb)) calc(8px + var(--sg)); }
@supports (backdrop-filter: blur(1px)) { .nav-bas { background: rgba(255, 253, 248, .78); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); } }
.nav-bas button { border: none; background: transparent; flex-direction: column; gap: 3px; min-height: 52px; font-size: .7rem; font-weight: 600; color: var(--encre2); padding: 4px; position: relative; border-radius: 12px; }
.nav-bas button .ic { width: 25px; height: 25px; }
.nav-bas button.on { color: var(--encre); }
.nav-bas button.on .ic { color: var(--moutarde2); }
.nav-bas .compteur { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; }
body.avec-nav-bas main { padding-bottom: calc(150px + var(--sb)); }
body.avec-nav-bas #chanou-bulle { bottom: calc(76px + var(--sb)); }

/* ——— Plan de salle ——— */
.zone-titre { margin: 22px 0 10px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; color: var(--encre2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tables { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(var(--t, 104px), 1fr)); }
@media (max-width: 400px) { .tables { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }
.table { position: relative; border: 1.5px solid transparent; background: var(--carte); border-radius: 16px; min-height: 92px; padding: 10px 11px; text-align: left; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; font-weight: 500; overflow: hidden; box-shadow: var(--ombre); color: var(--encre); }
.table.rond { border-radius: 28px; }
.table .num { font-family: var(--titre); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.table .info { font-size: .74rem; color: var(--encre2); line-height: 1.3; width: 100%; overflow-wrap: break-word; }
.table.occupee { border-color: var(--encre); }
.table.cuisine { border-color: var(--orange); background: #fff6ea; }
.table.a_servir { border-color: var(--vert); background: #eaf6ee; animation: pulse 1.6s infinite; }
.table.addition { border-color: var(--bordeaux); background: #fbeef0; }
.table.reservee { border-style: dashed; border-color: var(--bleu); }
.table.mienne::after { content: ''; position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--moutarde); }
.legende { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .78rem; color: var(--encre2); margin-top: 18px; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 14px; height: 14px; border-radius: 4px; border: 2px solid; display: inline-block; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(46, 125, 79, .22); } }

/* ——— Feuilles (téléphone) et boîtes (tablette, ordinateur) ——— */
.voile { position: fixed; inset: 0; background: rgba(15, 12, 5, .42); z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fondu .2s ease-out; }
@supports (backdrop-filter: blur(1px)) { .voile { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); } }
.fenetre { background: var(--papier); width: 100%; max-width: 640px; max-height: calc(100dvh - 12px - var(--sh)); overflow-y: auto; overscroll-behavior: contain; border-radius: 22px 22px 0 0;
  padding: 0 calc(18px + var(--sd)) calc(20px + var(--sb)) calc(18px + var(--sg)); animation: monte .34s var(--ressort); box-shadow: var(--ombre-haute); }
.fenetre::before { content: ''; display: block; width: 36px; height: 5px; border-radius: 3px; background: rgba(60, 50, 30, .2); margin: 8px auto 6px; }
.fenetre > .fermer { position: sticky; top: 0; float: right; z-index: 2; border: none; background: transparent; width: 44px; height: 44px; min-height: 44px; min-width: 44px; padding: 0; margin: 0 -10px 0 6px; border-radius: 50%; color: var(--encre2); }
.fenetre > .fermer::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: #e6dfcf; z-index: -1; }
@media (hover: hover) { .fenetre > .fermer:hover { background: transparent; } }
.fenetre > .fermer svg { width: 18px; height: 18px; }
.fenetre h2, .fenetre h3 { margin-top: 8px; }
@media (min-width: 768px) {
  .voile { align-items: center; padding: 24px; }
  .fenetre { border-radius: 22px; padding-bottom: 22px; max-height: calc(100dvh - 48px); animation: apparait .26s var(--ressort); }
  .fenetre::before { display: none; }
  .fenetre > .fermer { margin-top: 14px; }
}
.pied-fixe { position: sticky; bottom: calc(-20px - var(--sb)); background: rgba(246, 241, 230, .96); margin: 14px calc(-18px - var(--sd)) calc(-20px - var(--sb)) calc(-18px - var(--sg)); padding: 12px calc(18px + var(--sd)) calc(12px + var(--sb)) calc(18px + var(--sg)); border-top: .5px solid rgba(60, 50, 30, .15); z-index: 1; }
@supports (backdrop-filter: blur(1px)) { .pied-fixe { background: rgba(246, 241, 230, .82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); } }
@media (min-width: 768px) { .pied-fixe { bottom: -22px; margin-bottom: -22px; padding-bottom: 16px; } }
@keyframes monte { from { transform: translateY(100%); } to { transform: none; } }
@keyframes apparait { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }

/* ——— Messages ——— */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + var(--sb)); z-index: 300; background: rgba(29, 27, 23, .94); color: #fff; padding: 12px 18px; border-radius: 14px; box-shadow: var(--ombre-haute); width: max-content; max-width: calc(100vw - 32px); font-weight: 600; font-size: .95rem; text-align: center; animation: apparait .22s var(--ressort); }
body.avec-nav-bas .toast { bottom: calc(86px + var(--sb)); }
.toast.erreur { background: var(--rouge); }
.alerte-haut { position: fixed; top: calc(8px + var(--sh)); left: calc(8px + var(--sg)); right: calc(8px + var(--sd)); z-index: 250; background: var(--vert); color: #fff; padding: 12px 12px 12px 16px; border-radius: 16px; font-weight: 600; box-shadow: var(--ombre-haute); display: flex; gap: 10px; align-items: center; animation: apparait .26s var(--ressort); }
.alerte-haut span { flex: 1; min-width: 0; }
.alerte-haut button { background: rgba(255, 255, 255, .95); color: #000; border: none; min-height: 40px; flex: none; }
.alerte-haut.bordeaux { background: var(--bordeaux); } .alerte-haut.bleu { background: var(--bleu); }
@media (min-width: 768px) { .alerte-haut { left: auto; width: 440px; } }
.vide { text-align: center; color: var(--encre2); padding: 36px 16px; }
.chiffre { font-size: 1.55rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: break-word; }
.kpi { padding: 14px; }
.kpi .petit { text-transform: uppercase; letter-spacing: .05em; font-size: .68rem; font-weight: 650; margin-bottom: 4px; }
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(160px, 45%), 1fr)); margin-bottom: 16px; }
.alerte { background: #fff4e3; border: 1px solid #f1d3a6; color: #6b3a08; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: .93rem; }
@media print { .entete, .onglets, .nav-bas, .no-print, #chanou-bulle, #chanou-panneau { display: none !important; } body { background: #fff; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (prefers-reduced-transparency: reduce) { .entete, .onglets, .nav-bas, .pied-fixe, .voile { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; } }

/* ——— Listes de plats et vue d'une table ——— */
.ligne-plat { justify-content: space-between; text-align: left; font-weight: 500; gap: 12px; background: var(--carte); border: 1px solid rgba(60, 50, 30, .08); min-height: 52px; padding: 10px 14px; }
.ligne-plat > span:first-child { flex: 1; min-width: 0; }
.ligne-plat b, .ligne-plat .prix { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 650; }
.ligne-plat .puce { margin-left: 2px; }
.tete-table { position: sticky; top: calc(-10px - var(--sh)); z-index: 5; background: rgba(246, 241, 230, .9); margin: calc(-10px - var(--sh)) calc(-1 * (var(--gouttiere) + var(--sd))) 10px calc(-1 * (var(--gouttiere) + var(--sg))); padding: calc(10px + var(--sh)) calc(var(--gouttiere) + var(--sd)) 10px calc(var(--gouttiere) + var(--sg)); border-bottom: .5px solid rgba(60, 50, 30, .15); display: flex; align-items: center; gap: 10px; }
@supports (backdrop-filter: blur(1px)) { .tete-table { background: rgba(246, 241, 230, .78); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); } }
.tete-table .titre { flex: 1; min-width: 0; }
.tete-table h2 { margin: 0; font-size: 1.3rem; }
.tete-table .btn-icone { border-radius: 50%; width: 44px; background: var(--remplissage); border: none; }
#panneau .tete-table { top: -14px; margin: -14px -14px 10px; padding: 12px 14px; border-radius: 18px 18px 0 0; }
.barre-actions { position: sticky; bottom: 0; z-index: 5; display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; padding: 12px 0 calc(12px + var(--sb)); background: linear-gradient(to top, var(--papier) 72%, rgba(246, 241, 230, 0)); margin-top: 8px; }
#panneau .barre-actions { background: linear-gradient(to top, var(--papier2) 72%, rgba(236, 228, 209, 0)); padding-bottom: 2px; }
.etape { padding: 12px 14px; margin-bottom: 10px; }
.etape-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; min-height: 36px; }
.etape-tete h3 { margin: 0; }
.etape-tete .ligne { gap: 6px; }
.ligne-cmd { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid #efe8d8; cursor: pointer; align-items: start; }
.ligne-cmd .nom { font-weight: 600; overflow-wrap: break-word; }
.ligne-cmd .note { color: var(--bordeaux); font-size: .87rem; font-weight: 500; margin-top: 2px; }
.ligne-cmd .prix { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; text-align: right; }
.ligne-cmd .etat { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.ligne-cmd.annule { opacity: .45; } .ligne-cmd.annule .nom { text-decoration: line-through; }
.prevision { display: flex; gap: 10px; align-items: flex-start; background: var(--carte); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; font-weight: 500; font-size: .93rem; box-shadow: var(--ombre); }
.prevision svg { color: var(--moutarde2); flex: none; margin-top: 1px; }
.total-table { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 14px 16px; font-size: 1.02rem; }
.total-table b { font-size: 1.3rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.choix-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 360px) { .choix-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choix-4 button { padding: 0 4px; font-size: .88rem; min-height: 44px; }
.stepper { display: inline-flex; align-items: center; gap: 2px; flex: none; background: var(--remplissage); border-radius: 12px; padding: 2px; }
.stepper button { min-width: 40px; min-height: 40px; padding: 0; background: var(--carte); border: none; border-radius: 10px; box-shadow: 0 1px 2px rgba(40, 30, 10, .1); font-size: 1.15rem; }
.stepper b { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }
.puces-cat { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 10px; scroll-padding-inline: 4px; }
.puces-cat::-webkit-scrollbar { display: none; }
.puces-cat button { flex: none; min-height: 40px; border-radius: 99px; background: var(--carte); border: 1px solid var(--ligne); padding: 0 16px; font-weight: 600; }
@media (pointer: coarse) { .puces-cat button { min-height: 44px; } }
.puces-cat button.on { background: var(--encre); color: #fff; border-color: var(--encre); }
.article-panier { padding: 12px; }
.article-panier + .article-panier { margin-top: 8px; }

/* Menu des sections (gestion sur téléphone) */
.choix-section { display: none; }
@media (max-width: 767px) {
  .avec-sections .onglets#menu { display: none; }
  .choix-section { display: flex; position: sticky; top: var(--h-entete); z-index: 25; padding: 8px calc(var(--gouttiere) + var(--sd)) 8px calc(var(--gouttiere) + var(--sg));
    background: rgba(246, 241, 230, .9); border-bottom: 1px solid rgba(60, 50, 30, .08); }
  @supports (backdrop-filter: blur(1px)) { .choix-section { background: rgba(246, 241, 230, .78); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); } }
  .choix-section button { width: 100%; justify-content: space-between; background: var(--carte); box-shadow: var(--ombre); font-size: 1rem; min-height: 48px; }
}
.grille-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.grille-sections button { min-height: 56px; justify-content: flex-start; text-align: left; background: var(--carte); box-shadow: 0 0 0 1px rgba(60, 50, 30, .08); font-size: .95rem; padding: 0 14px; }
.grille-sections button.on { background: var(--encre); color: #fff; box-shadow: none; }

/* Installation sur l'écran d'accueil */
.bandeau-install { display: flex; align-items: center; gap: 12px; background: var(--carte); border-radius: 18px; padding: 10px 8px 10px 10px; box-shadow: var(--ombre); margin: 0 0 16px; }
.bandeau-install img { border-radius: 11px; flex: none; }
.bandeau-install > span { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.bandeau-install small { color: var(--encre2); font-size: .82rem; }
.bandeau-install .btn-s { flex: none; }
.bandeau-install .fermer-bandeau { flex: none; width: 36px; min-width: 36px; min-height: 44px; padding: 0; background: transparent; color: var(--encre2); font-size: 1.4rem; font-weight: 400; }
.etapes-install { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.etapes-install li { display: flex; align-items: center; gap: 14px; background: var(--carte); border-radius: 14px; padding: 12px 14px; }
.etapes-install .ic-etape { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: #eaf1fb; color: #1a6fd6; }
.etapes-install .ic-etape .num { font-size: 1.1rem; }
.etapes-install li > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.etapes-install small { color: var(--encre2); font-size: .84rem; }
.zone-install { max-width: 1320px; margin: 0 auto; padding: 12px calc(var(--gouttiere) + var(--sd)) 0 calc(var(--gouttiere) + var(--sg)); }
.zone-install:empty { display: none; }
.zone-install .bandeau-install { margin: 0; }

/* Commande des clients par QR (vue d'une table) */
.cmd-client { border: 1.5px solid #1a6fd6; margin-bottom: 10px; padding: 14px; }
.cmd-client-tete { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.cmd-client-tete > svg { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: #eaf1fb; color: #1a6fd6; flex: none; }
.cmd-client-tete div { display: flex; flex-direction: column; }
.cmd-client-tete small { color: var(--encre2); }
.cmd-client-l { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid #efe8d8; }
.cmd-client-l small { display: block; color: var(--bordeaux); font-size: .85rem; }
.cmd-client-l b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.prevision { flex-wrap: wrap; }
.prevision > span:not(.prevision-actions) { flex: 1; min-width: 160px; }
.prevision-actions { display: flex; gap: 6px; flex: none; }
.qr-client { background: #fff; border-radius: 18px; padding: 14px; display: inline-block; margin: 14px 0 10px; box-shadow: var(--ombre); }
.qr-client svg { width: min(260px, 70vw); height: auto; display: block; }
.table.a_valider { border-color: #1a6fd6; background: #eef5fe; animation: pulse-bleu 1.6s infinite; }
@keyframes pulse-bleu { 50% { box-shadow: 0 0 0 5px rgba(26, 111, 214, .2); } }

/* Prise de commande du serveur */
.pp-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 44px 10px 0; }
.pp-tete h2 { margin: 0; }
.pp-annonces { min-height: 36px; padding: 0 12px; border-radius: 99px; font-size: .85rem; background: var(--remplissage); }
.pp-annonces.on { background: #eaf1fb; color: #1a6fd6; }
.pp-annonces svg { width: 16px; height: 16px; }
.pp-recherche { display: flex; align-items: center; gap: 8px; background: var(--carte); border: 1px solid var(--ligne); border-radius: 12px; padding: 0 12px; }
.pp-recherche svg { width: 18px; height: 18px; color: var(--encre2); flex: none; }
.pp-recherche input { border: none; padding: 0; min-height: 46px; box-shadow: none !important; background: transparent; }
.segments-pp { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; background: rgba(60, 50, 30, .08); border-radius: 12px; padding: 2px; margin: 10px 0 0; }
.segments-pp button { min-height: 40px; background: transparent; border-radius: 10px; font-size: .92rem; }
.segments-pp button.on { background: var(--carte); box-shadow: 0 1px 3px rgba(40, 30, 10, .12); }
.pp-cat { font-family: var(--texte); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; color: var(--encre2); margin: 16px 2px 8px; scroll-margin-top: 10px; }
.pp-liste { background: var(--carte); border-radius: 14px; box-shadow: 0 0 0 1px rgba(60, 50, 30, .07); overflow: hidden; }
.pp-l { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 0; border-top: 1px solid #f0e9da; }
.pp-l:first-child { border-top: none; }
.pp-l.dans { background: #fdf7e8; }
.pp-l.epuise { opacity: .5; }
.pp-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: transparent; border: none; padding: 10px 6px 10px 14px; min-height: 56px; font-weight: 500; border-radius: 0; }
.pp-corps:active { transform: none; background: var(--remplissage); }
.pp-nom { font-weight: 600; line-height: 1.25; }
.pp-annonce { font-size: .84rem; color: #1a5fb4; font-style: italic; line-height: 1.35; font-weight: 400; }
.pp-allerg { font-size: .78rem; color: var(--orange); font-weight: 500; }
.pp-prix { font-size: .86rem; color: var(--encre2); font-variant-numeric: tabular-nums; font-weight: 600; }
.pp-info { width: 40px; min-width: 40px; min-height: 44px; padding: 0; background: transparent; color: #1a6fd6; flex: none; }
.pp-info svg { width: 20px; height: 20px; }
.pp-ajout { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: var(--encre); color: #fff; flex: none; }
.pp-ajout svg { width: 20px; height: 20px; }
.pp-l .stepper { flex: none; }
.pp-fiche-cat { margin: 4px 0 0; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; color: var(--encre2); }
.pp-fiche-annonce { background: #eef4fc; border-radius: 14px; padding: 14px 16px; margin: 8px 0 12px; }
.pp-fiche-annonce p { margin: 4px 0 0; font-size: 1.12rem; line-height: 1.45; color: #12355e; }

.conseil { display: flex; gap: 10px; align-items: flex-start; background: #fff8e6; border: 1px solid #f1dfae; color: #5c4710; border-radius: 14px; padding: 11px 14px; margin-bottom: 10px; font-size: .9rem; line-height: 1.4; }
.conseil svg { width: 18px; height: 18px; color: var(--moutarde2); flex: none; margin-top: 1px; }

/* Barre du haut : une seule ligne sur tous les téléphones (le nom de la marque se resserre, jamais les boutons) */
.entete .marque { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.entete .marque + .espace { display: none; }
.entete > button, .entete > .btn, .entete > a, .entete > #chanou-bulle { flex: none; }
@media (max-width: 430px) { .entete #qui { display: none; } .entete .marque { font-size: .9rem; letter-spacing: .03em; } .entete { column-gap: 8px; } }
