/* Pastafino — direction « Frais & gourmand » : clair, jaune pâtes fraîches, rouge tomate, vert sauge, formes arrondies. */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #1d1b19;
  --muted: #6e6a63;
  --line: #ebe7de;
  --yellow: #ffd25a;
  --yellow-50: #fff8e1;
  --yellow-100: #fff3cc;
  --yellow-300: #ffe08d;
  --tomato: #f0533a;
  --tomato-50: #fff0ec;
  --tomato-100: #ffe1da;
  --tomato-600: #d8432b;
  --tomato-700: #b63a24;
  --sage: #2e7d4f;
  --sage-50: #eaf5ee;
  --sage-100: #dceee2;
  --sage-700: #22603c;
  --cold: #2b5c8a;
  --cold-50: #e6f0fa;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 12px; --r-md: 18px; --r-lg: 24px; --r-xl: 32px; --pill: 999px;
  --shadow: 0 10px 30px rgba(29, 27, 25, .08);
  --shadow-lg: 0 20px 50px rgba(29, 27, 25, .14);
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--tomato-700); text-decoration: none; font-weight: 700; }
a:hover { color: var(--tomato); }
::selection { background: var(--yellow-300); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
img { max-width: 100%; }
code { font-size: 13px; background: var(--yellow-50); padding: 2px 6px; border-radius: 6px; }

h1, h2, h3 { font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 var(--space-3); text-wrap: balance; }
h1 { font-size: clamp(32px, 6vw, 52px); }
h2 { font-size: 22px; letter-spacing: -0.02em; }
p { text-wrap: pretty; }
.kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 var(--space-3); padding: 6px 12px; border-radius: var(--pill); background: var(--surface); font-size: 13px; font-weight: 700; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mb { margin-bottom: var(--space-5); }
.mt0 { margin-top: 0; }
.stack-sm { display: flex; flex-direction: column; gap: var(--space-3); }

/* Barre de navigation */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap;
  padding: 14px var(--space-5); background: rgba(246, 244, 239, .88); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-brand img { height: 44px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 5px; border-radius: var(--pill); background: var(--surface); box-shadow: var(--shadow); font-size: 14px; font-weight: 700; }
.nav-links a { padding: 8px 14px; border-radius: var(--pill); color: var(--ink); }
.nav-links a:hover { background: var(--bg); color: var(--ink); }
.nav-links a.is-active { background: var(--ink); color: #fff; }
.nav-user { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: var(--pill); background: var(--yellow); font-weight: 800; }
.nav-user::before { content: attr(data-initial); display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--yellow); font-size: 13px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: var(--space-5) var(--space-5) var(--space-7); }
.wrap-wide { max-width: none; }

/* Boutons pilules */
.btn { display: inline-flex; align-items: center; justify-content: flex-start; gap: var(--space-2); min-height: 46px; padding: 10px 20px;
  border: 2px solid transparent; border-radius: var(--pill); background: transparent; color: var(--ink);
  font: 800 15px/1.2 var(--font); text-align: left; cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, box-shadow .15s, color .15s; }
.btn:active { transform: scale(.98); }
.btn .arrow { margin-left: auto; padding-left: var(--space-3); }
.btn-primary { background: var(--tomato); color: #fff; box-shadow: 0 10px 24px rgba(240, 83, 58, .32); }
.btn-primary:hover { background: var(--tomato-600); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #3a3632; color: #fff; }
.btn-sage { background: var(--sage); color: #fff; }
.btn-sage:hover { background: var(--sage-700); color: #fff; }
.btn-secondary { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { background: var(--yellow-50); color: var(--ink); }
.btn-ghost:hover { background: rgba(29, 27, 25, .06); color: var(--ink); }
.btn-ghost.is-danger { color: var(--tomato-700); }
.btn-block { width: 100%; }
.btn-lg { min-height: 58px; padding: 14px 24px; font-size: 17px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; transform: none; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 700; background: var(--bg); color: var(--ink); white-space: nowrap; }
.tag-accent { background: var(--sage-50); color: var(--sage-700); }
.tag-hot { background: var(--tomato-100); color: var(--tomato-700); }
.tag-cold { background: var(--cold-50); color: var(--cold); }
.tag-live { background: var(--sage-50); color: var(--sage-700); }
.tag-live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--sage); animation: pulse 1.4s infinite; }
.status-attente { background: var(--yellow-100); color: #6b4e00; }
.status-preparation { background: var(--tomato-100); color: var(--tomato-700); }
.status-prete { background: var(--sage-100); color: var(--sage-700); }
.status-retiree { background: var(--bg); color: var(--muted); }
.status-annulee { background: transparent; color: var(--muted); text-decoration: line-through; }

.card { background: var(--surface); border-radius: var(--r-lg); padding: var(--space-5); box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-4); }
.field label { font-size: 13px; font-weight: 700; }
.field-error { margin: 0; color: var(--tomato-700); font-weight: 700; font-size: 14px; }
.input { width: 100%; min-height: 48px; padding: 10px 16px; border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: 600 16px/1.2 var(--font); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 4px var(--yellow-100); }
.input-lg { min-height: 62px; font-size: 22px; font-weight: 700; border-radius: var(--r-md); }
.input-xs { width: 84px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

.flash { padding: 14px 18px; border-radius: var(--r-md); background: var(--sage-50); color: var(--sage-700); font-weight: 700; margin-bottom: var(--space-5); }
.flash-error { background: var(--tomato-50); color: var(--tomato-700); }

.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 6px 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 12px 8px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .input { min-height: 40px; padding: 6px 10px; font-size: 14px; }
.table tr.is-off td { color: var(--muted); opacity: .75; }
.actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.actions form { margin: 0; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-5); }
.page-head h1 { margin: 0; }
.page-head > p { margin: 0; max-width: 420px; }

.tabs { display: inline-flex; gap: 4px; padding: 5px; margin-bottom: var(--space-5); border-radius: var(--pill); background: var(--surface); box-shadow: var(--shadow); }
.tabs a { padding: 8px 18px; border-radius: var(--pill); font-weight: 700; color: var(--ink); }
.tabs a:hover { background: var(--bg); }
.tabs a.is-active { background: var(--ink); color: #fff; }

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-3); align-items: end; }
.form-row .field { margin-bottom: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--space-3); }
.stat { padding: var(--space-4) var(--space-5); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.stat:nth-child(4) { background: var(--sage); color: #fff; }
.stat:nth-child(4) .muted { color: rgba(255, 255, 255, .85); }
.stat strong { display: block; font-size: 34px; font-weight: 800; line-height: 1.05; margin: var(--space-2) 0 2px; letter-spacing: -0.03em; }
.stat > span { display: block; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar { position: relative; display: flex; align-items: center; height: 26px; border-radius: var(--pill); background: var(--bg); overflow: hidden; }
.bar span { position: absolute; inset: 0 auto 0 0; border-radius: var(--pill); background: var(--yellow); }
.bar em { position: relative; padding-left: 10px; font-style: normal; font-weight: 800; }
.dish-summary strong { display: block; font-size: 17px; font-weight: 800; line-height: 1.2; }

/* Connexion par prénom */
.login { max-width: 640px; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-5); }
.who { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); padding: var(--space-5) var(--space-4); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); color: var(--ink); transition: transform .15s, box-shadow .15s; }
.who:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--ink); }
.who-initial { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 18px; background: var(--yellow); font-size: 26px; font-weight: 800; }
.who:nth-child(3n+2) .who-initial { background: var(--tomato); color: #fff; }
.who:nth-child(3n+3) .who-initial { background: var(--sage); color: #fff; }
.who-name { font-size: 20px; font-weight: 800; }

/* Accueil client */
.hero { max-width: 560px; }
.lead { font-size: 18px; color: var(--muted); margin: 0 0 var(--space-6); }

/* Composeur */
.menu-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--space-6); align-items: start; }
.step { margin-bottom: var(--space-5); }
.step-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.step-head h2 { margin: 0; }
.step-n { display: flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--pill); background: var(--ink); color: var(--yellow); font-size: 13px; font-weight: 800; }
.step-hint { margin-left: auto; padding: 4px 10px; border-radius: var(--pill); background: var(--surface); font-size: 12px; font-weight: 700; color: var(--muted); }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.choice { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); min-height: 72px;
  padding: 14px 16px; background: var(--surface); border: 2px solid transparent; border-radius: var(--r-md); cursor: pointer; user-select: none; transition: transform .12s, background .15s, border-color .15s; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice::after { content: ''; flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--line); }
.choice:hover { border-color: var(--yellow-300); }
.choice:active { transform: scale(.98); }
.choice:has(input:checked) { background: var(--yellow); border-color: var(--yellow); }
.choice:has(input:checked)::after { border-color: var(--ink); background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd25a' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/14px no-repeat; }
.choice:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.choice-name { display: block; font-weight: 800; }
.choice-desc { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.choice:has(input:checked) .choice-desc { color: #5a4300; }
.qty-row { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.qty-row .input { flex: 1; min-width: 220px; }
.qty { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--pill); background: var(--surface); }
.qty button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--bg); font: 800 20px var(--font); cursor: pointer; color: var(--ink); }
.qty button:hover { background: var(--yellow); }
.qty output { min-width: 36px; text-align: center; font-weight: 800; font-size: 18px; }
.composer-foot { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  padding: 12px 12px 12px 22px; border-radius: var(--pill); background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); }
.composer-foot .muted { color: rgba(255, 255, 255, .7); }
.composer-foot .btn-primary { box-shadow: none; }

.cart { position: sticky; top: 90px; border-radius: var(--r-xl); }
.cart-line { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.cart-line-title { font-weight: 800; }
.cart-line-sub { font-size: 13px; color: var(--muted); }
.cart-remove { flex: none; padding: 4px 10px; border: 0; border-radius: var(--pill); background: var(--tomato-50); color: var(--tomato-700); font: 700 12px var(--font); cursor: pointer; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin: var(--space-3) 0 var(--space-4); font-weight: 800; font-size: 18px; }
.cart-bar { display: none; }

@media (max-width: 880px) {
  .menu-layout { grid-template-columns: 1fr; }
  .cart { position: static; }
  .choices { grid-template-columns: 1fr 1fr; }
  .cart-bar:not([hidden]) { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30; display: flex; align-items: center; gap: var(--space-3);
    padding: 16px 22px; border-radius: var(--pill); background: var(--tomato); color: #fff; font-weight: 800; box-shadow: 0 10px 24px rgba(240, 83, 58, .35); }
  .cart-bar .arrow { margin-left: auto; }
  body.has-cart-bar { padding-bottom: 84px; }
  body.has-cart-bar .composer-foot { bottom: 84px; }
}

/* Suivi client */
.track { max-width: 560px; }
.track-number { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: var(--space-5); margin-bottom: var(--space-4); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow); font-weight: 700; }
.track-number::before { content: ''; position: absolute; right: -40px; top: -40px; width: 170px; height: 170px; border-radius: 50%; background: var(--yellow-50); }
.track-number > * { position: relative; }
.track-number strong { font-size: clamp(96px, 26vw, 140px); font-weight: 800; line-height: .9; letter-spacing: -0.06em; }
.track.is-ready .track-number { background: var(--yellow); animation: pop .5s ease-out; }
.track.is-ready .track-number::before { background: var(--yellow-300); }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 var(--space-4); padding: 0; }
.stepper li { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: var(--r-md); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.2; }
.stepper .n { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 800; }
.stepper li.is-done { background: var(--sage-50); color: var(--sage-700); }
.stepper li.is-done .n { background: var(--sage); color: #fff; font-size: 0; }
.stepper li.is-done .n::after { content: '✓'; font-size: 13px; }
.stepper li.is-current { background: var(--ink); color: #fff; }
.stepper li.is-current .n { background: var(--yellow); color: var(--ink); }
.track.is-ready .stepper li.is-current { background: var(--sage); }
.banner { margin: 0 0 var(--space-4); padding: var(--space-4) var(--space-5); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); font-size: 18px; font-weight: 800; }
.track.is-ready .banner { background: var(--ink); color: #fff; }
.banner:empty { display: none; }

/* Ouverture / fermeture des commandes */
.closed-banner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 14px 20px; margin-bottom: var(--space-4); border-radius: var(--r-md); background: var(--tomato-100); color: var(--tomato-700); }
.closed-banner[hidden] { display: none; }
.closed-card h2 { margin: 0 0 var(--space-2); }

/* Cuisine */
.kitchen-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-4); }
.kitchen-head h1 { margin: 0; font-size: clamp(30px, 4vw, 42px); }
.kitchen-head .kicker { margin-bottom: 6px; }
.kstats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--space-4); }
.kstat { display: inline-flex; align-items: baseline; gap: 8px; padding: 10px 18px; border-radius: var(--pill); background: var(--surface); box-shadow: var(--shadow); }
.kstat span { font-size: 13px; font-weight: 700; color: var(--muted); }
.kstat strong { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kstat:last-child { background: var(--sage); }
.kstat:last-child span, .kstat:last-child strong { color: #fff; }
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
.col { display: flex; flex-direction: column; min-width: 0; padding: 14px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.col-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: 2px 6px 12px; }
.col-head h2 { margin: 0; font-size: 17px; }
.col[data-col="attente"] .col-head h2::before { content: '⏳ '; }
.col[data-col="preparation"] .col-head h2::before { content: '🍳 '; }
.col[data-col="prete"] .col-head h2::before { content: '✅ '; }
.col-tools { display: inline-flex; align-items: center; gap: 6px; }
.count { min-width: 34px; padding: 2px 12px; border-radius: var(--pill); text-align: center; font-size: 15px; font-weight: 800; background: var(--yellow-100); }
.col[data-col="preparation"] .count { background: var(--tomato-100); }
.col[data-col="prete"] .count { background: var(--sage-100); }
.col-body { display: flex; flex-direction: column; gap: 10px; }
.col-empty { margin: 0; padding: 20px 12px; border-radius: 20px; background: var(--bg); color: var(--muted); font-size: 14px; text-align: center; }
.ticket { border-radius: 22px; background: var(--yellow-50); border: 2px solid transparent; transition: border-color .2s; }
.col[data-col="preparation"] .ticket { background: var(--tomato-50); }
.col[data-col="prete"] .ticket { background: var(--sage-50); }
.ticket.is-mine { border-color: var(--tomato); }
.ticket.is-late { border-color: var(--tomato); box-shadow: 0 0 0 4px var(--tomato-100); }
.ticket.is-new { animation: pop .5s ease-out, glow 1.2s 2; }
.ticket header { display: flex; align-items: center; gap: var(--space-3); padding: 14px 14px 0; }
.ticket-num { display: flex; align-items: center; justify-content: center; flex: none; width: 46px; height: 46px; border-radius: 16px; background: var(--yellow); font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.col[data-col="preparation"] .ticket-num { background: var(--tomato); color: #fff; }
.col[data-col="prete"] .ticket-num { background: var(--sage); color: #fff; }
.ticket-name { font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-time { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; text-align: right; }
.ticket-time strong { display: block; font-size: 16px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.ticket.is-late .ticket-time strong { color: var(--tomato-700); }
.ticket-items { list-style: none; margin: 0; padding: 10px 14px 4px; }
.ticket-items li { display: flex; gap: var(--space-2); padding: 4px 0; }
.ticket-qty { min-width: 26px; font-weight: 800; }
.ticket-dish { font-weight: 700; }
.ticket-tops { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ticket-note { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 8px; background: var(--surface); font-size: 13px; font-weight: 700; color: var(--tomato-700); }
.ticket footer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: 10px 14px 14px; }
.ticket footer .btn:first-of-type { flex: 1; }
.ticket-cook { width: 100%; font-size: 12px; font-weight: 700; color: var(--muted); }

@media (max-width: 960px) {
  .kanban { grid-template-columns: 1fr; }
}

/* Écran d'affichage (TV) */
.area-screen { overflow: hidden; }
.screen { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 16px; height: 100vh; height: 100dvh; padding: 16px; }
.screen-head { display: flex; align-items: center; gap: 16px; }
.screen-brand { display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-radius: var(--pill); background: var(--surface); box-shadow: var(--shadow); }
.screen-brand img { height: 92px; width: auto; }
.screen-stats { flex: 1; display: flex; gap: 10px; }
.sstat { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 10px 22px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.sstat span { font-size: clamp(11px, 1vw, 14px); font-weight: 700; color: var(--muted); }
.sstat strong { font-size: clamp(22px, 2.6vw, 40px); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.sstat.is-key { background: var(--sage); }
.sstat.is-key span, .sstat.is-key strong { color: #fff; }
.screen-clock { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding: 0 8px; }
.screen-clock strong { font-size: clamp(28px, 3.2vw, 48px); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.screen-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; min-height: 0; }
.scol { display: flex; flex-direction: column; min-height: 0; padding: 16px; border-radius: 32px; background: var(--surface); box-shadow: var(--shadow); }
.scol > header { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 14px; }
.scol > header h2 { margin: 0; font-size: clamp(20px, 1.9vw, 30px); }
.scol[data-col="attente"] > header h2::before { content: '⏳ '; }
.scol[data-col="preparation"] > header h2::before { content: '🍳 '; }
.scol[data-col="prete"] > header h2::before { content: '✅ '; }
.scol > header span { min-width: 1.8em; padding: 2px 14px; border-radius: var(--pill); text-align: center; font-size: clamp(20px, 2vw, 32px); font-weight: 800; background: var(--yellow-100); }
.scol[data-col="preparation"] > header span { background: var(--tomato-100); }
.scol[data-col="prete"] > header span { background: var(--sage-100); }
.scol-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.scol-empty { margin: 0; padding: 24px; border-radius: 24px; background: var(--bg); font-size: 18px; color: var(--muted); text-align: center; }
.scard { border-radius: 24px; background: var(--yellow-50); border: 3px solid transparent; }
.scol[data-col="preparation"] .scard { background: var(--tomato-50); }
.scol[data-col="prete"] .scard { background: var(--sage-50); }
.scard.is-late { border-color: var(--tomato); }
.scard-top { display: flex; align-items: center; gap: 16px; padding: 14px 18px; }
.scard-num { display: flex; align-items: center; justify-content: center; flex: none; width: clamp(56px, 4.6vw, 80px); height: clamp(56px, 4.6vw, 80px); border-radius: 22px; background: var(--yellow);
  font-size: clamp(28px, 2.6vw, 44px); font-weight: 800; letter-spacing: -0.04em; }
.scol[data-col="preparation"] .scard-num { background: var(--tomato); color: #fff; }
.scol[data-col="prete"] .scard-num { background: var(--sage); color: #fff; }
.scard-who { display: flex; flex-direction: column; min-width: 0; }
.scard-who strong { font-size: clamp(18px, 1.7vw, 28px); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard-who span { font-size: 14px; font-weight: 600; color: var(--muted); }
.scard-time { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.scard-time span { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.scard-time strong { font-size: clamp(22px, 2vw, 34px); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.05; }
.scard.is-late .scard-time strong { color: var(--tomato-700); }
.scard-items { list-style: none; margin: 0; padding: 0 18px 14px; font-size: 15px; font-weight: 600; }
.scard-items li { padding: 2px 0; }
.scard-items small { display: block; color: var(--muted); font-size: 13px; }
.scol-body.is-compact .scard-items { display: none; }
.scol-body.is-dense { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 8px; }
.scol-body.is-dense .scard-top { padding: 8px 10px; gap: 8px; }
.scol-body.is-dense .scard-num { width: 44px; height: 44px; font-size: 22px; border-radius: 14px; }
.scol-body.is-dense .scard-who span, .scol-body.is-dense .scard-time span { display: none; }
.scol-body.is-dense .scard-time strong { font-size: 18px; }

/* QR à imprimer */
.qr-sheet { max-width: 520px; padding: var(--space-6); border-radius: var(--r-xl); background: var(--yellow); }
.qr-logo { height: 120px; width: auto; margin-bottom: var(--space-4); }
.qr-title { font-size: 46px; }
.qr-box { display: inline-block; padding: var(--space-5); border-radius: var(--r-lg); background: #fff; margin: var(--space-3) 0; }
.qr-box img, .qr-box canvas { display: block; }
.qr-sheet .muted { color: #5a4300; }

.toast { position: fixed; left: 50%; bottom: 100px; z-index: 100; transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 14px 20px; border-radius: var(--pill); background: var(--ink); color: #fff; font-weight: 700; box-shadow: var(--shadow-lg); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes pop { 0% { transform: scale(.96); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes glow { 50% { box-shadow: 0 0 0 6px var(--yellow); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media print {
  .nav, .no-print, .toast { display: none !important; }
  body { background: #fff; }
  .wrap { padding: 0; }
}

/* v10 — attente estimée, régimes, recommander, outils cuisine, avis, graphiques */
.wait-pill { display: inline-flex; align-items: center; gap: 6px; margin: var(--space-3) 0 0; padding: 8px 14px; border-radius: var(--pill); background: var(--sage-50); color: var(--sage-700); font-size: 14px; }
.hero .wait-pill { margin: 0 0 var(--space-3); }
.diet-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.diet { padding: 2px 8px; border-radius: var(--pill); background: var(--sage-50); color: var(--sage-700); font-size: 11px; font-weight: 700; }
.diet-fruits_coque, .diet-piquant { background: var(--tomato-100); color: var(--tomato-700); }
.diet-checks { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.diet-checks label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-weight: 600; }
.mt-xs { margin: 6px 0 0; }
button.tag { border: 0; font: inherit; cursor: pointer; }
.again-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.again-item { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: 14px 16px; border: 2px solid transparent; border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.again-item:hover { border-color: var(--yellow-300); }
.again-item > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.again-add { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); font-weight: 800; }
.ktools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: var(--space-4); }
.ktools .btn.is-on { background: var(--ink); color: #fff; }
.kmax { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; font-size: 14px; font-weight: 600; }
.kmax .input-xs { width: 72px; min-height: 36px; padding: 4px 10px; }
.kpanel { margin-bottom: var(--space-4); padding: var(--space-4) var(--space-5); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.kpanel[hidden] { display: none; }
.kpanel h2 { margin-bottom: var(--space-3); }
.kpanel h3 { margin: 0 0 var(--space-2); font-size: 13px; letter-spacing: 0; text-transform: uppercase; color: var(--muted); }
.produce { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-4); }
.produce ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.produce li { display: flex; gap: 8px; align-items: baseline; font-size: 17px; }
.produce li strong { min-width: 36px; font-size: 22px; font-weight: 800; }
.stock-group + .stock-group { margin-top: var(--space-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 40px; padding: 8px 14px; border: 2px solid var(--line); border-radius: var(--pill); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.chip:hover { border-color: var(--yellow-300); }
.chip.is-out { border-color: var(--tomato); background: var(--tomato-100); color: var(--tomato-700); text-decoration: line-through; }
.stars { display: flex; gap: 4px; margin-bottom: var(--space-3); }
.stars button { width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--bg); color: var(--line); font-size: 26px; cursor: pointer; }
.stars button.is-on { background: var(--yellow-100); color: #e0a400; }
.rate-card textarea { margin-bottom: var(--space-3); resize: vertical; }
.qchart { display: flex; align-items: flex-end; gap: 3px; height: 200px; padding: var(--space-4) var(--space-4) 0; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); overflow-x: auto; }
.qcol { flex: 1 0 18px; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.qbar { position: relative; display: block; min-height: 0; border-radius: 6px 6px 0 0; background: var(--yellow); }
.qbar em { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 11px; font-style: normal; font-weight: 800; }
.qlabel { height: 22px; padding-top: 4px; font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.top-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-3); }
.top-grid h3 { font-size: 16px; }
.top-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: center; gap: 10px; margin-bottom: 6px; font-size: 14px; }
.top-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comments blockquote { margin: 0 0 var(--space-3); padding: 10px 14px; border-radius: var(--r-sm); background: var(--bg); }
.comments blockquote p { margin: 0 0 4px; }

/* v11 — prix, mode 2 postes, caisse, réglages */
.choice-price { display: block; margin-top: 4px; font-size: 13px; font-weight: 800; color: var(--tomato-700); }
.cart-line-price { margin-top: 2px; font-weight: 800; }
.poste-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--space-4); }
.poste-switch .is-on, .chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.phase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
#phases[data-view="p1"] .phase-grid, #phases[data-view="p2"] .phase-grid { grid-template-columns: minmax(0, 1fr); }
#phases[data-view="p1"] [data-zone="p2"], #phases[data-view="p2"] [data-zone="p1"] { display: none; }
@media (max-width: 1100px) { .phase-grid { grid-template-columns: minmax(0, 1fr); } }
.phase-zone { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; padding: 12px; }
.slot { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px; border: 2px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.slot.is-free { border-style: dashed; background: transparent; }
.slot-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 8px; }
.slot-empty { margin: 0; color: var(--muted); font-weight: 700; }
.slot-what { font-weight: 700; }
.slot-timer { font-size: 44px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.slot.is-due { border-color: var(--tomato); background: var(--tomato-100); animation: pf-due 1s steps(2) infinite; }
.slot.is-due .slot-timer { color: var(--tomato-700); }
@keyframes pf-due { 50% { border-color: var(--surface); } }
.slot-actions, .slot-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; margin-top: auto; }
.slot-tops { display: flex; flex-direction: column; gap: 8px; }
.slot-portion { display: flex; flex-direction: column; gap: 4px; }
.slot-portion + .slot-portion { padding-top: 8px; border-top: 1px dashed var(--line); }
.slot .ticket-tops label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.slot .ticket-tops label.is-done { opacity: .45; text-decoration: line-through; }
.ph-rows { display: flex; flex-direction: column; gap: 8px; }
.ph-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg); }
.ph-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ph-do { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.input-sm { width: auto; min-height: 38px; padding: 6px 10px; font-size: 14px; }
.ph-solo { display: inline-flex; align-items: center; gap: 6px; }
.kanban-single { grid-template-columns: minmax(0, 1fr); }
.kanban-single .col-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-content: start; }
.pos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; gap: var(--space-4); margin-bottom: var(--space-4); }
@media (max-width: 900px) { .pos { grid-template-columns: minmax(0, 1fr); } }
.pos-lists { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.pos-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 2px solid transparent; border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.pos-line:hover { border-color: var(--yellow-300); }
.pos-line.is-on { border-color: var(--ink); }
.pos-name { display: flex; flex-direction: column; min-width: 0; }
.pos-amount { font-size: 18px; white-space: nowrap; }
.pos-detail { position: sticky; top: 16px; display: flex; flex-direction: column; gap: var(--space-3); }
.pos-head { display: flex; align-items: center; gap: 12px; }
.pos-head h2 { margin: 0; }
.pos-items { display: flex; flex-direction: column; gap: 8px; }
.pos-item { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.pos-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 18px; }
.pos-grand strong { font-size: 32px; }
.pos-change { font-size: 26px; }
.pos-change.is-short { color: var(--tomato-700); }
.pos-methods { display: flex; flex-wrap: wrap; gap: 6px; }
.pos-cash { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--r-md); background: var(--bg); }
.pos-cash[hidden] { display: none; }
.input-lg { min-height: 52px; font-size: 22px; font-weight: 700; }
.cook-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: var(--space-3); }
.cook-grid .field { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.cook-grid .is-off { opacity: .5; }
.mt { margin-top: var(--space-4); }

/* v19 — allergènes & newsletter carte */
.allergens { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.allergen { display: block; width: 32px; height: 27px; border-radius: 4px; object-fit: cover; }
.allergen-lg { width: 44px; height: 37px; }
.allergen-checks { display: flex; flex-wrap: wrap; gap: 4px; max-width: 420px; }
.allergen-checks label { position: relative; cursor: pointer; line-height: 0; }
.allergen-checks input { position: absolute; opacity: 0; }
.allergen-checks img { opacity: .28; filter: grayscale(1); transition: opacity .12s, filter .12s; }
.allergen-checks input:checked + img { opacity: 1; filter: none; outline: 3px solid var(--ink); outline-offset: 1px; }
.allergen-checks input:focus-visible + img { outline: 3px solid var(--yellow); }
.allergen-checks label:hover img { opacity: .7; }
.field-wide { grid-column: 1 / -1; }
.allergen-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; }
.allergen-legend > span { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.nl-form-full { display: flex; flex-direction: column; gap: 10px; }
.nl-opts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.nl-opts label { display: flex; align-items: center; gap: 8px; }

/* v21 */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: var(--space-4); }
@media (max-width: 420px) { .cat-grid { grid-template-columns: minmax(0, 1fr); } }
.cat-item { display: flex; flex-direction: column; gap: 10px; }
.cat-head { display: flex; align-items: center; gap: 10px; }
.cat-name { flex: 1; min-width: 0; font-size: 18px; font-weight: 800; }
.cat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.cat-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.cat-item .allergen-checks { max-width: none; }
.pub-choice { display: flex; flex-direction: column; gap: 6px; margin: 0 0 var(--space-3); padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); }
.pub-choice legend { padding: 0 6px; font-weight: 800; }
.pub-choice label { display: flex; align-items: center; gap: 8px; }
.pub-extra { display: none; flex-wrap: wrap; gap: 8px; align-items: center; padding-left: 26px; }
.pub-choice:has(input[value="1"]:checked) .pub-extra { display: flex; }
.fab-list { display: flex; flex-direction: column; gap: 10px; }
.fab-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); }
@media (max-width: 700px) { .fab-row { grid-template-columns: auto minmax(0, 1fr); } .fab-row > .actions { grid-column: 1 / -1; } }
.fab-row h3 { margin: 0; }
.fab-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.fab-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-4); }
.fab-menu label { display: flex; align-items: center; gap: 8px; padding: 6px 0; }

/* v22 — menu admin responsive */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; width: 44px; height: 44px; margin-left: auto; border-radius: var(--r-sm); cursor: pointer; place-items: center; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after { display: block; width: 22px; height: 2px; background: var(--ink); position: relative; content: ''; }
.nav-burger span::before { position: absolute; top: -7px; } .nav-burger span::after { position: absolute; top: 7px; }
.nav-group { position: relative; }
.nav-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--pill); color: var(--ink); font-weight: 700; white-space: nowrap; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: '▾'; font-size: 11px; opacity: .6; transition: transform .15s; }
.nav-group[open] > summary::after { transform: rotate(180deg); }
.nav-group > summary:hover { background: var(--bg); }
.nav-group.is-active > summary { background: var(--ink); color: #fff; }
.nav-group[open] > summary { background: var(--yellow-100); color: var(--ink); }
.nav-sub { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; display: flex; flex-direction: column; gap: 2px; min-width: 280px; padding: 8px; border-radius: var(--r-md); background: var(--surface); box-shadow: 0 12px 32px rgba(0,0,0,.16); }
.nav-group:last-of-type .nav-sub { left: auto; right: 0; }
.nav-links .nav-sub a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--ink); white-space: nowrap; }
.nav-links .nav-sub a:hover { background: var(--bg); color: var(--ink); }
.nav-links .nav-sub a.is-active { background: var(--yellow-100); color: var(--ink); font-weight: 800; box-shadow: inset 3px 0 0 var(--ink); }
@media (max-width: 1100px) {
  .nav { flex-wrap: wrap; }
  .nav-admin ~ .nav-burger, .nav-burger { display: grid; }
  .nav-links.nav-admin { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding: 8px; border-radius: var(--r-md); }
  .nav-toggle:checked ~ .nav-links.nav-admin { display: flex; }
  .nav-admin .nav-group > summary { justify-content: space-between; padding: 12px 14px; border-radius: var(--r-sm); }
  .nav-admin .nav-sub { position: static; min-width: 0; padding: 4px 0 8px 12px; box-shadow: none; background: transparent; }
  .nav-admin .nav-sub a { white-space: normal; min-height: 44px; }
  .nav-admin > a, .nav-admin .nav-user { padding: 12px 14px; border-radius: var(--r-sm); }
}

/* v23 — logos allergènes plus grands */
.allergens { gap: 6px; }
.allergen { width: 48px; height: 40px; border-radius: 6px; }
.allergen-lg { width: 64px; height: 54px; }
.allergen-checks { gap: 8px; max-width: 640px; }
.allergen-checks .allergen { width: 60px; height: 50px; }
.allergen-legend { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 20px; }
.allergen-legend .allergen { width: 56px; height: 47px; }
@media (max-width: 480px) { .allergen { width: 42px; height: 35px; } .allergen-checks .allergen { width: 52px; height: 44px; } }

/* ---------- Téléphone : pas de zoom nécessaire ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, iframe, canvas, svg { max-width: 100%; }
@media (max-width: 700px) {
  /* iPhone zoome automatiquement sur un champ dont le texte fait moins de 16 px : on l'évite */
  input:not([type=checkbox]):not([type=radio]), select, textarea, .input, .input-sm, .table .input { font-size: 16px !important; }
  .card, .flash, .lead, p, li, h1, h2, h3 { overflow-wrap: break-word; }
  td, code, a { overflow-wrap: anywhere; }
  .rec-head { flex-wrap: wrap; }
  .lab-portions { flex-wrap: nowrap; white-space: nowrap; }
  /* Onglets : défilent horizontalement au lieu d'élargir la page */
  .tabs { display: flex; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; border-radius: var(--r-md); }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: none; white-space: nowrap; padding: 8px 14px; }
  /* Tableaux : une fiche par ligne, chaque valeur précédée du titre de sa colonne */
  .table-wrap { overflow-x: visible; padding: 4px 14px; }
  .table:not(.no-stack), .table:not(.no-stack) tbody, .table:not(.no-stack) tr, .table:not(.no-stack) td { display: block; width: 100%; }
  .table:not(.no-stack) thead { display: none; }
  .table:not(.no-stack) tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table:not(.no-stack) tr:last-child { border-bottom: 0; }
  .table:not(.no-stack) td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
  .table:not(.no-stack) td[data-label]::before { content: attr(data-label); flex: none; max-width: 45%; text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); }
  .table:not(.no-stack) td:not([data-label]), .table:not(.no-stack) td[data-label=""] { justify-content: flex-start; text-align: left; }
  .table:not(.no-stack) td > .input, .table:not(.no-stack) td > select, .table:not(.no-stack) td > .input-xs, .table:not(.no-stack) td > .input-sm { width: 60%; min-width: 0; }
  .table:not(.no-stack) td .actions { justify-content: flex-end; flex-wrap: wrap; }
  /* Cellule riche (formulaire, plusieurs blocs) : titre au-dessus, contenu sur toute la largeur */
  .table:not(.no-stack) td:has(form, div, textarea, .actions) { display: block; text-align: left; }
  .table:not(.no-stack) td:has(form, div, textarea, .actions)::before { display: block; max-width: none; margin-bottom: 4px; }
  .table:not(.no-stack) td:has(form, div, textarea, .actions) .actions { justify-content: flex-start; }
  .table:not(.no-stack) td .input, .table:not(.no-stack) td form, .table:not(.no-stack) td select { max-width: 100%; min-width: 0; }
  .table:not(.no-stack) td.num { font-variant-numeric: tabular-nums; }
}

/* ---------- Téléphone : textes assez grands pour être lus sans zoomer ---------- */
@media (max-width: 700px) {
  body { font-size: 17px; line-height: 1.5; }
  p, li, dd, dt, td, th, .lead { font-size: 16px; }
  .small, small, p.small, span.small, div.small, td.small, label.small, a.small, .muted.small,
  label, .field label, .check-line, .choice-desc, .step-hint, .hint, .field .hint, .meta, code,
  .kicker, .chip, .btn, .btn-sm, .tag, .lab-pill, .lab-st, .lab-link, .cal-slot, .ag-date, .col-empty, .kmax, .copy,
  .table, .table td, .table th, .table td.num { font-size: 15px !important; }
  .table:not(.no-stack) td[data-label]::before { font-size: 14px !important; }
  .btn, .btn-sm { min-height: 44px; }
  .chip { min-height: 40px; }
  h1 { font-size: clamp(28px, 8vw, 36px); }
  h2 { font-size: clamp(21px, 6vw, 26px); }
}
.cat-bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 12px; }
.cat-bulkbar .check-line { margin: 0; }
.cat-pick { width: 22px; height: 22px; flex: none; accent-color: var(--ink, #1d1d1b); }

/* QR code de commande sur l'écran des commandes (en haut à droite) */
.screen-qr { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); flex: none; }
.screen-qr #screen-qr { width: clamp(84px, 8vw, 132px); aspect-ratio: 1; }
.screen-qr #screen-qr canvas, .screen-qr #screen-qr img { width: 100% !important; height: auto !important; display: block; }
.screen-qr span { font-size: clamp(11px, 0.9vw, 14px); font-weight: 800; letter-spacing: .02em; color: var(--ink, #201e1d); }

.cat-fromlab { border: 2px solid var(--ink-100, #e7e4dc); }
.cat-fromlab-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; margin: 8px 0 12px; }

/* Cuisine 2 postes : composition des commandes bien visible */
#phases .ph-what { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
#phases .kc-title { font-size: 19px; font-weight: 800; line-height: 1.2; }
#phases .kc-meta { font-size: 14px; color: var(--muted, #6b6862); font-weight: 600; }
.kc { display: flex; flex-direction: column; gap: 6px; }
.kc-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: var(--bg, #f6f4ef); }
.kc-qty { flex: none; min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--ink, #201e1d); color: #fff; font-size: 18px; font-weight: 800; }
.kc-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.kc-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.kc-pasta { font-size: 18px; font-weight: 800; }
.kc-sauce { font-size: 18px; font-weight: 800; color: #9b2f16; }
.kc-pasta + .kc-sauce::before { content: '+ '; color: var(--muted, #6b6862); font-weight: 600; }
.kc-tops { display: flex; flex-wrap: wrap; gap: 5px; }
.kc-top { font-size: 15px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.kc-top.is-hot { background: #fde3d9; color: #8a2a12; }
.kc-top.is-cold { background: #dcecf6; color: #19496b; }
.kc-none { font-size: 14px; color: var(--muted, #6b6862); font-style: italic; }
.kc-note { font-size: 16px; font-weight: 800; background: #ffe58a; color: #3d3000; padding: 4px 10px; border-radius: 8px; }
#phases .slot .kc { margin-top: 6px; }
#phases .slot .kc-row { padding: 6px 8px; background: rgba(255,255,255,.6); }
#phases .slot-what.kc-main { margin: 4px 0; }
#phases .slot-tops .tag { font-size: 15px; font-weight: 700; padding: 5px 10px; }

.screen-sound { border: 0; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 13px; font-weight: 700; background: var(--surface, #fff); color: var(--muted, #6b6862); cursor: pointer; box-shadow: var(--shadow); }
.screen-sound.is-on { background: #e3f1e7; color: #1f6b3a; }
.screen-sound.is-wait { background: #ffe58a; color: #3d3000; animation: pf-pulse 1.6s ease-in-out infinite; }
@keyframes pf-pulse { 50% { opacity: .55; } }

/* Angolo client : onglets Passer une commande / Commande en cours / Commandes passées */
.otabs { display: flex; gap: 6px; padding: 5px; margin: 0 0 var(--space-4); border-radius: var(--pill); background: var(--surface); box-shadow: var(--shadow); overflow-x: auto; position: sticky; top: 8px; z-index: 20; scrollbar-width: none; }
.otabs::-webkit-scrollbar { display: none; }
.otab { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 16px; border: 0; border-radius: var(--pill); background: transparent; font: 800 15px var(--font); color: var(--ink); cursor: pointer; white-space: nowrap; }
.otab.is-on { background: var(--ink); color: #fff; }
.otab-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: inline-grid; place-items: center; font-size: 13px; background: var(--yellow); color: var(--ink); }
.otab-n.is-soft { background: var(--bg); }
.otab-n.is-ready { background: #2f7d4b; color: #fff; animation: pf-pulse 1.4s ease-in-out infinite; }
.oc-card .oc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.oc-card .track-number { margin: 0; padding: var(--space-3) var(--space-5); }
.oc-card .track-number strong { font-size: 44px; line-height: 1; }
.oc-state { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.oc-card.is-ready { outline: 3px solid #2f7d4b; }
.oc-card.is-past { opacity: .95; }
.oc-num { font-size: 20px; }
.oc-tag-attente { background: var(--yellow-50, #fff4c2); }
.oc-tag-preparation { background: #fde3d9; color: #8a2a12; }
.oc-tag-prete { background: #2f7d4b; color: #fff; }
.oc-tag-annulee { background: #eee; color: #777; }
.oc-line { flex-wrap: wrap; }
.oc-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qty-sm button { width: 34px; height: 34px; font-size: 18px; }
.qty-sm output { min-width: 26px; font-size: 16px; }
.oc-actions { margin-top: var(--space-3); }
.oc-rate { display: flex; flex-direction: column; gap: 8px; margin-top: var(--space-3); }
.oc-rate .stars button.is-on { color: #e8a300; }
.edit-banner { padding: 12px 16px; margin-bottom: var(--space-3); border-radius: var(--r-lg, 14px); background: #ffe58a; font-weight: 700; }
.tag-mod { margin-left: 6px; background: #ffe58a; color: #3d3000; font-size: 12px; }
.otab-s { display: none; }
.oc-card .track-number::before { display: none; }
@media (max-width: 700px) {
  .otabs { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; border-radius: 18px; }
  .otab { flex-direction: column; gap: 2px; min-height: 58px; padding: 6px 4px; border-radius: 14px; font-size: 13px; position: relative; }
  .otab-i { font-size: 20px; line-height: 1; }
  .otab-l { display: none; } .otab-s { display: inline; }
  .otab-n { position: absolute; top: 4px; right: 6px; }
  .oc-tools { width: 100%; }
}
.otab-n[hidden] { display: none; }
.again-card .step-head h2 { font-size: 20px; } .again-card .step-hint { white-space: nowrap; }

/* Lien direct « Atelier » dans le menu d'administration */
.nav-links .nav-solo { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--pill); color: var(--ink); font-weight: 700; white-space: nowrap; }
.nav-links .nav-solo:hover { background: var(--bg); color: var(--ink); }
.nav-links .nav-solo.is-active { background: var(--ink); color: #fff; }
.badge-soft { background: var(--bg); color: var(--ink); }
.nav-links .nav-solo .badge-soft { color: var(--ink); } .nav-links .nav-solo.is-active .badge-soft { background: #fff; color: var(--ink); }
@media (max-width: 1100px) { .nav-admin .nav-solo { padding: 12px 14px; border-radius: var(--r-sm); } }
.lab-send { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin: 0 0 var(--space-4); }
.lab-send .lab-dest { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.lab-send .lab-dest p { margin: 0; }
.lab-send .lab-dest form, .lab-send .lab-dest .btn { width: 100%; }
.lab-send .lab-dest.is-done { background: #e3f1e7; }

/* Photos des pâtes : carte Angolo (choix) et vignettes Cucina tu ! */
.choice.has-img { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.choice.has-img .choice-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #fbf1dc; }
.choice.has-img .choice-body { padding: 12px 14px 14px; }
.pasta-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin: 0 0 12px; }
.pasta-tile { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 14px; background: var(--surface, #fff); box-shadow: var(--shadow); cursor: pointer; font: inherit; text-align: center; }
.pasta-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #fbf1dc; }
.pasta-tile span { padding: 6px 4px 8px; font-size: 14px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.pasta-tile.is-on { border-color: var(--ink); box-shadow: 0 0 0 3px var(--yellow, #ffd23f); }
.pasta-photo-admin { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.pasta-photo-admin img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; background: #fbf1dc; }
.pasta-photo-admin form { margin: 0; }
.choice.has-img::after { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.92); }
.choices > .choice { min-width: 0; } .choice.has-img .choice-img { max-width: 100%; height: auto; }
.menu-layout > *, .composer, .composer .step { min-width: 0; }
.choices { grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); }
@media (max-width: 600px) { .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.composer-foot .dish-summary { min-width: 0; flex: 1 1 auto; }
.composer-foot .btn { flex: 0 1 auto; min-width: 0; white-space: normal; }
@media (max-width: 480px) { .composer-foot { gap: 10px; padding-left: 16px; padding-right: 10px; } .composer-foot .btn-lg { padding: 12px 16px; font-size: 15px; } }
@media (max-width: 480px) { .composer-foot .btn .arrow { display: none; } }
/* Campagne : questionnaire complet d'un candidat */
.q-details { margin-top: 6px; }
.q-details summary { cursor: pointer; font-weight: 700; color: var(--ink, inherit); }
.q-details dl { margin: 8px 0 0; display: grid; gap: 2px; min-width: 260px; }
.q-details dt { font-weight: 600; margin-top: 6px; }
.q-details dd { margin: 0; color: var(--muted, #555); }
/* Comptes bloqués après 3 mots de passe incorrects */
.unlock-box { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.unlock-box .check-line { font-weight: 700; cursor: pointer; }
.unlock-card { border-left: 4px solid var(--tomato-700, #b3261e); }
.tag-danger { background: #fde2df; color: var(--tomato-700, #b3261e); }
.user-pick { max-width: 520px; }
.user-form { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line, #e6e0d2); }
.table tr.is-selected td { background: var(--yellow-100, #fdf3d8); }
.user-form .check-line { display: flex; align-items: center; gap: 8px; margin: 4px 0 18px; }
/* Accès à l'administration (adresse secrète) */
.gate-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; }
.gate-url { display: flex; gap: 8px; margin: 6px 0 12px; }
.gate-url .input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: 14px; }
.gate-forms { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.gate-forms .input { max-width: 300px; }
.gate-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gate-qr #gate-qr { background: #fff; padding: 8px; border-radius: 10px; min-width: 150px; min-height: 150px; }
@media (max-width: 700px) { .gate-box { grid-template-columns: 1fr; } }
/* Achats & marges */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters .input { width: auto; min-width: 180px; }
.nowrap { white-space: nowrap; }
.buy-table .input { min-width: 0; }
.buy-table td:first-child .input { min-width: 170px; }
.buy-table td:nth-child(2) .input { min-width: 150px; }
.inv-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.mg strong { font-size: 16px; }
.mg-ok, .mg-ok strong { color: #1f7a3a; }
.mg-warn, .mg-warn strong { color: #a86400; }
.mg-bad, .mg-bad strong { color: var(--tomato-700, #b3261e); }
.ev-up { color: var(--tomato-700, #b3261e); font-weight: 700; }
.ev-down { color: #1f7a3a; font-weight: 700; }
.price-alerts .pa-row { padding: 10px 0; border-top: 1px solid var(--line, #e6e0d2); display: grid; gap: 4px; }
.price-alerts .pa-row:first-of-type { border-top: 0; }
.price-chart-wrap { color: var(--green-700, #1f5c3a); }
.price-chart { width: 100%; height: auto; max-height: 220px; }
.price-chart .pc-axis { font-size: 12px; fill: var(--muted, #6b6b6b); }
.cost-card .cost-head { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; }
.cost-card .cost-head > div { display: flex; flex-direction: column; gap: 2px; }
.cost-card .cost-head > div > strong { font-size: 24px; }
.cost-card details { margin-top: 10px; }
.cost-lines td { padding: 6px 8px; }
/* Tournée de livraison */
.tour-sum-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; }
.tour-sum-head .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tour-drivers { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.tour-driver { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 12px; border-left: 5px solid var(--c); background: rgba(0,0,0,.03); text-decoration: none; color: inherit; }
.tour-driver span { font-size: 13px; color: var(--muted, #666); }
.tour-map { height: 380px; border-radius: 14px; overflow: hidden; z-index: 0; }
.tour-route { border-top: 5px solid var(--c); }
.tour-route-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 10px; }
.tour-route-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.tour-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); display: inline-block; }
.tour-stops { list-style: none; margin: 0; padding: 0; }
.tour-stop { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line, #e6e0d2); }
.tour-stop.is-done { opacity: .55; }
.tour-num { flex: 0 0 32px; height: 32px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tour-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.tour-eta { font-size: 18px; margin-right: 6px; }
.tour-note { background: #fff4cc; padding: 1px 6px; border-radius: 6px; }
.tour-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.tour-done { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tour-done .input-xs { width: 64px; display: inline-block; }
.tour-pin span { display: flex; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-weight: 800; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.choice-inline { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-top: 8px; }
.fix-row { display: flex; gap: 6px; margin-top: 6px; }
@media print {
  .no-print, header, nav, footer, .theme-switch, .flash { display: none !important; }
  .tour-route { break-inside: avoid-page; box-shadow: none; }
  .tour-stop { break-inside: avoid; }
  body { background: #fff !important; }
}
@media (max-width: 700px) { .tour-map { height: 260px; } }
/* Résultats du questionnaire de dégustation : réponses à trois niveaux */
.tri { display: inline-flex; gap: 6px; align-items: baseline; white-space: nowrap; font-size: 13px; color: var(--muted, #666); }
.tri b { color: #1f7a3a; font-size: 14px; }
.eval-table td, .eval-table th { white-space: nowrap; }
