/* Assia restaurant app — the approved October "version 1" look (docs/design/ecrans.html).
   Square corners everywhere; Gloock only for big titles and the restaurant name; Jost for the rest;
   red only for "à confirmer". */
:root { --bg:#0b0b0c; --panel:#161618; --card:#1f1f22; --line:#2a2a2e; --text:#dcdce0; --muted:#a7a7ad;
  --accent:#4b42b0; --accent-text:#a59dff; --red:#e5484d; --ok:#5fd394; }
* { box-sizing: border-box; border-radius: 0 !important; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 Jost, system-ui, sans-serif;
  min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.screen { max-width: 440px; margin: 0 auto; padding: 18px 16px 40px; min-height: 100vh; }
.t1 { font: 30px/1.1 Gloock, serif; color: var(--text); margin: 30px 0 4px; font-weight: 400; }
.t2 { font: 500 18px Jost, sans-serif; margin: 16px 2px 8px; color: var(--text); }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.mark { display: inline-flex; width: 64px; height: 64px; background: var(--accent); align-items: center;
  justify-content: center; font: 34px Gloock, serif; color: var(--text); }
.btn { display: block; width: 100%; border: 0; padding: 15px; font: 600 16px Jost, sans-serif;
  background: var(--accent); color: var(--text); text-align: center; margin-top: 10px; cursor: pointer;
  text-decoration: none; }
.btn2 { display: block; width: 100%; border: 1px solid #45454c; padding: 13px; font: 500 15px Jost, sans-serif;
  background: none; color: var(--text); text-align: center; margin-top: 10px; cursor: pointer; text-decoration: none; }
.btn:disabled, .btn2:disabled { opacity: .45; cursor: default; }
.choice { position: relative; display: block; background: var(--panel); border: 1px solid var(--line); padding: 18px; margin-top: 12px;
  text-decoration: none; color: var(--text); cursor: pointer; width: 100%; text-align: left; font: inherit; }
.choice b { font: 500 19px Jost, sans-serif; display: block; }
.choice.on, .choice:has(input:checked) { border-color: var(--accent); }
.choice.off { opacity: .45; cursor: default; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.prov { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line);
  padding: 14px; margin-top: 10px; font: 500 15px Jost, sans-serif; color: var(--text); text-decoration: none; width: 100%; }
.prov i { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; background: #2a2a2e;
  font-style: normal; font-weight: 700; }
.label { display: block; font-size: 13px; color: var(--muted); margin-top: 12px; }
.field { display: block; width: 100%; background: var(--card); border: 1px solid var(--line); padding: 13px;
  color: var(--text); margin-top: 6px; font: 400 16px Jost, sans-serif; }
.field:focus, .btn:focus-visible, .btn2:focus-visible, .choice:focus-visible, .prov:focus-visible, .keys button:focus-visible {
  outline: 2px solid var(--accent-text); outline-offset: 2px; }
.code { font: 300 44px Jost, sans-serif; letter-spacing: 6px; text-align: center; background: var(--panel);
  border: 1px solid var(--line); padding: 22px 0; margin: 14px 0; color: #fff; }
.pins { display: flex; justify-content: center; gap: 14px; margin: 22px 0; }
.pins span { width: 16px; height: 16px; border: 2px solid var(--muted); }
.pins span.f { background: var(--text); border-color: var(--text); }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keys button { background: var(--panel); padding: 14px 0; text-align: center; font: 300 24px Jost, sans-serif;
  color: var(--text); border: 0; cursor: pointer; }
.keys button.word { font-size: 14px; }
.keys .blank { visibility: hidden; }
.error { color: var(--text); background: var(--card); border-left: 3px solid var(--accent-text); padding: 10px 12px; margin-top: 12px; }
.note { color: var(--muted); font-size: 13px; margin-top: 14px; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); padding: 20px; width: min(360px, 88vw); }
dialog::backdrop { background: rgba(0,0,0,.6); }
.row2 { display: flex; gap: 8px; } .row2 > * { flex: 1; }
.qr { background: #fff; padding: 14px; display: flex; justify-content: center; margin: 14px 0; }
.qr svg { width: 200px; height: 200px; }
[hidden] { display: none !important; }
/* With the keypad working, the typed field is hidden (the dots show progress). */
.js-keypad [data-pin-input], .js-keypad label[for="pin"] { position: absolute; left: -9999px; }
.team-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
.team-row b { grid-column: 1; } .team-row .muted { grid-column: 1; }
.team-side { grid-column: 2; grid-row: 1 / span 2; color: var(--accent-text); }

/* A button that looks like a link (Annuler in Équipe). */
.linkbtn { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* Restaurant menu. Phone: bottom bar. Computer (900px and wider): sidebar on the left, wider content. */
.mark-sm { width: 36px; height: 36px; font-size: 20px; flex: none; }
.side { display: none; }
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: space-around;
  padding: 8px 4px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #0e0e10; }
.bnav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 72px; padding: 4px;
  color: var(--muted); font-size: 11px; text-decoration: none; }
.bnav-item.on { color: var(--text); }
.bnav svg, .side svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6;
  stroke-linecap: square; stroke-linejoin: miter; flex: none; }
.shell .screen { padding-bottom: 110px; }
.bnav-item:focus-visible, .nav-item:focus-visible, .side-head:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.tiles .choice:first-child { margin-top: 0; }

@media (min-width: 900px) {
  .bnav { display: none; }
  .shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 28px 16px 24px;
    background: var(--panel); border-right: 1px solid var(--line); }
  .side-head { display: flex; align-items: center; gap: 12px; padding: 0 8px; text-decoration: none; color: var(--text); }
  .side-name { font: 21px/1.15 Gloock, serif; }
  .side-city { margin: 6px 8px 0 56px; }
  .side-links { display: flex; flex-direction: column; gap: 2px; margin-top: 32px; }
  .nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 10px; color: var(--muted);
    text-decoration: none; font-weight: 500; }
  .nav-item:hover { color: var(--text); }
  .nav-item.on { background: var(--card); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
  .side-out { margin-top: auto; padding: 0 10px; }
  .shell .screen { max-width: 820px; margin: 0; padding: 32px 56px 64px; }
  .shell .t1 { font-size: 40px; }
  .tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
  .tiles .choice { margin-top: 0; }
  .screen:not(.shell .screen) { padding-top: 64px; }
}

/* Aujourd'hui and Réservations (Assia's calls). */
.badge { background: var(--red); color: #fff; font-size: 11px; line-height: 1.5; padding: 0 6px; margin-left: auto; }
.bnav-item { position: relative; }
.bnav-item .badge { position: absolute; top: -2px; right: 12px; font-size: 10px; padding: 0 4px; margin: 0; }
.nav-item .nav-label { flex: 1; }
.red { color: var(--red); }
.desk-only, .stat.desk-only { display: none; }
.today-head p { margin: 30px 0 0; }
.today-head .t1 { margin-top: 4px; }
.signal { display: flex; align-items: center; gap: 8px; margin: 6px 0 0 !important; }
.signal rect { fill: var(--ok); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.stat { background: var(--panel); padding: 12px; display: flex; flex-direction: column; gap: 2px; font-size: 12px;
  text-decoration: none; color: var(--text); }
.stat-n { font: 300 32px/1 Jost, sans-serif; }
.stat-red { color: var(--red); box-shadow: inset 0 -2px 0 var(--red); }
.callout { display: flex; flex-direction: column; background: var(--panel); padding: 14px; margin-top: 12px; }
.callout b { font-weight: 500; }
.today-cols section { display: flex; flex-direction: column; gap: 6px; }
.recent { margin-top: 10px; }
.call-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.call-row:last-child { border-bottom: 0; }
.empty { background: var(--panel); padding: 14px; margin: 0; font-size: 14px; }
.bk { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--panel);
  padding: 12px 14px; text-decoration: none; color: var(--text); }
.bk-time { font-weight: 500; }
.bk-sub { display: block; font-size: 13px; }
.bk-status { font-size: 12px; color: var(--muted); }
.bk-red { box-shadow: inset 3px 0 0 var(--red); } .bk-red .bk-status { color: var(--red); }
.bk-ok { box-shadow: inset 3px 0 0 var(--ok); } .bk-ok .bk-status { color: var(--ok); }
.bk-off { color: #6f6f76; } .bk-off .bk-time, .bk-off .bk-name { text-decoration: line-through; } .bk-off .bk-sub { color: inherit; }
.bk-on { background: var(--card); outline: 1px solid var(--accent); }
.bk:focus-visible, .stat:focus-visible, .daynav a:focus-visible, .back:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.resa-head .t1 { margin-bottom: 14px; }
.daynav { display: flex; align-items: center; justify-content: space-between; background: var(--panel); padding: 4px; }
.daynav a { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 20px; text-decoration: none; }
.daynav span { font-weight: 500; }
.meal { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.meal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 2px 2px; }
.meal-head h2 { margin: 0; font: 500 18px Jost, sans-serif; }
.resa-list > .empty { margin-top: 16px; }
.resa-detail { display: flex; flex-direction: column; gap: 16px; }
/* A bigger back link, easy to tap (Fabrizio, 2026-12-03). */
.back { text-decoration: none; margin-top: 4px; display: inline-flex; align-items: center; min-height: 44px; font-size: 18px; font-weight: 500; color: var(--text); }
.detail-head { display: flex; flex-direction: column; gap: 6px; }
.detail-head .t1 { margin: 0; }
.tag { align-self: flex-start; font-size: 12px; padding: 2px 8px; border: 1px solid var(--muted); color: var(--muted); }
.tag-a_confirmer { border-color: var(--red); color: var(--red); }
/* Confirmed: green (Fabrizio, 2026-12-03). */
.tag-confirmee { border-color: var(--ok); color: var(--ok); }
.facts { margin: 0; display: grid; grid-template-columns: 110px minmax(0, 1fr); row-gap: 10px; background: var(--panel); padding: 16px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; } .facts b { font-weight: 500; }
.actions .btn { margin-top: 0; }
.actions .row2 .btn2 { margin-top: 8px; }
.callbox .t2 { margin: 4px 2px 8px; }
.transcript { background: var(--panel); padding: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.transcript p { margin: 0; }
.who { color: var(--muted); } .who-assia { color: var(--accent-text); }
.more-btn { align-self: flex-start; color: var(--accent-text); text-decoration: none; font-size: 14px; }
/* Phone: the open booking takes the whole screen. */
.has-detail .resa-list { display: none; }

@media (min-width: 900px) {
  .phone-only { display: none; }
  .desk-only { display: initial; }
  .stat.desk-only { display: flex; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 980px; margin-top: 28px; }
  .stat { padding: 18px; font-size: 14px; gap: 4px; }
  .stat-n { font-size: 44px; }
  .shell .screen:has(.today-cols) { max-width: 1100px; }
  .today-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px; max-width: 980px; margin-top: 12px; }
  .recent { margin-top: 0; }
  .bk { grid-template-columns: 60px minmax(0, 1fr) 110px; padding: 12px 16px; }
  .bk-sub { font-size: 14px; }
  .shell .screen.resa-screen { max-width: none; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) 400px; }
  .resa-list { padding: 32px 40px 64px; }
  .resa-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
  .resa-head .t1 { margin: 0; }
  .daynav { padding: 0; }
  .daynav span { padding: 0 14px; }
  .has-detail .resa-list { display: block; }
  .resa-detail { background: var(--panel); border-left: 1px solid var(--line); padding: 32px 28px; min-height: 100vh;
    position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; }
  .resa-detail .back { display: none; }
  .resa-detail .facts, .resa-detail .transcript { background: var(--bg); }
  .resa-screen:not(.has-detail) { grid-template-columns: minmax(0, 1fr); max-width: 980px !important; }
}

/* "Modification enregistrée" / "Modification non enregistrée" (static/saved.js). */
.saved-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 50;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  width: max-content; max-width: min(420px, calc(100vw - 32px)); background: var(--card); color: var(--text);
  border-left: 3px solid var(--accent-text); padding: 12px 16px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.saved-toast.on { opacity: 1; transform: translate(-50%, 0); }
.saved-toast b { display: block; font-weight: 500; }
.saved-toast span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.saved-toast span:empty { display: none; }
.saved-toast.saved-fail { border-left-color: var(--red); }
.shell ~ .saved-toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  .saved-toast, .shell ~ .saved-toast { left: auto; right: 24px; bottom: 24px; transform: translateY(12px); }
  .saved-toast.on { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .saved-toast { transition: none; } }

.demo-banner { position: sticky; top: 0; z-index: 50; background: #f5a524; color: #1a1200; text-align: center;
  font: 600 13px/1.3 Jost, sans-serif; padding: 7px 12px; letter-spacing: .02em; }
.trial-banner { position: sticky; top: 0; z-index: 50; background: var(--accent); color: #fff; text-align: center;
  font: 600 13px/1.3 Jost, sans-serif; padding: 7px 12px; letter-spacing: .02em; }
