/* Écrans du personnel, pensés pour un téléphone tenu d'une main. */
:root {
  --ink: #13273a;
  --ink-deep: #0b1724;
  --cream: #f4efe6;
  --gold: #efc477;
  --burgundy: #93414a;
  --green: #2f7d57;
  --muted: #8a949b;
  --line: rgba(244, 239, 230, .16);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Avenir Next', Avenir, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
body.staff {
  margin: 0;
  background: var(--ink-deep);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}
button { font: inherit; cursor: pointer; }
a { color: var(--gold); }

.staff-top {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  padding: 12px 16px; background: var(--ink); border-bottom: 2px solid var(--gold);
  position: sticky; top: 0; z-index: 5;
}
.staff-top h1 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 0; margin-right: auto; }
.identity-staff-mark { display: inline-flex; align-items: center; gap: 8px; margin-right: 10px; }
.identity-staff-logo { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; border: 1px solid rgba(239, 196, 119, .55); }
.identity-staff-name { color: var(--gold); font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.identity-login-logo img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.staff-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-nav a {
  color: var(--cream); text-decoration: none; font-size: 14px; font-weight: 700;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 3px; min-height: 44px;
  display: inline-flex; align-items: center;
}
.staff-nav a:hover { background: var(--gold); color: var(--ink); }
.staff-who { flex: 1 1 100%; margin: 0; color: var(--muted); font-size: 13px; }
main { padding: 16px 16px 60px; }

.staff-flash { margin: 0 0 14px; padding: 12px 14px; background: rgba(244, 239, 230, .12); font-weight: 700; }
.staff-flash.ok { background: var(--green); }
.staff-flash.error { background: var(--burgundy); }
.staff-diag {
  margin: 10px 0 0;
  padding: 8px 10px;
  background: #0b1724;
  border: 1px dashed rgba(239, 196, 119, .45);
  color: #efc477;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.staff-diag-flash { margin: 0 0 14px; }

.staff-alert {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin: 0 0 14px; padding: 14px 16px; background: var(--gold); color: var(--ink);
  font-size: 19px; font-weight: 800; animation: pulse 1.1s ease-in-out infinite;
}
/* display sur la classe l'emporterait sinon sur l'attribut hidden. */
.staff-alert[hidden] { display: none; }
.staff-alert button { margin-left: auto; border: 0; background: var(--ink); color: var(--cream); min-height: 44px; padding: 10px 18px; font-weight: 800; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 196, 119, .85); } 50% { box-shadow: 0 0 0 10px rgba(239, 196, 119, 0); } }
@media (prefers-reduced-motion: reduce) { .staff-alert { animation: none; } }

.board-counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.count { padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 800; }
.count.pending { background: var(--gold); color: var(--ink); }
.count.ready { background: var(--green); }
.count.pickup { background: #5b8aa8; color: var(--cream); }
.count.calls { background: #d4a24a; color: var(--ink); }
.count.bills { background: #cfe0ef; color: var(--ink); }
.count.impossible { background: var(--burgundy); color: var(--cream); }
.staff-impossible-block h2 { color: #f3c4c8; }
.card.impossible { border-left-color: var(--burgundy); background: #3a1820; }
a.card.impossible {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a.card.impossible:hover,
a.card.impossible:focus-visible {
  outline: 2px solid #f3c4c8;
  outline-offset: 2px;
}
.staff-impossible-line { margin: 10px 0 0; font-weight: 800; font-size: 17px; color: #f3c4c8; }
.card.bill { border-left-color: #cfe0ef; }
.card.bill-active { border-left-color: var(--gold); background: #243044; }
.card-actions .request-bill { background: var(--gold); color: var(--ink); }
.card select {
  width: 100%; margin-top: 4px; min-height: 44px; padding: 8px 10px;
  background: var(--ink-deep); color: var(--cream); border: 1px solid var(--line); border-radius: 3px;
}
.unpaid-form { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.card-unpaid-title { margin: 0 0 4px; font-weight: 800; }
.card-actions .pay-cash { background: var(--green); }
.card-actions .pay-card { background: var(--gold); color: var(--ink); }
.card-actions .pay-other { background: var(--burgundy); }
.card.call { border-left-color: #d4a24a; background: #2a2416; }
.card.call.claimed { border-left-color: #cfe0ef; background: #18293b; }
.board-empty { color: var(--muted); max-width: 42rem; }

.staff-section { margin: 0 0 26px; }
.staff-section h2 {
  font-family: var(--serif); font-weight: 400; font-size: 22px;
  margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; align-items: start; }
.card { background: #18293b; border: 1px solid var(--line); border-left: 6px solid var(--gold); padding: 13px 15px; }
.card.ready { border-left-color: var(--green); background: #162c28; }
.card.ready.pickup { border-left-color: #5b8aa8; background: #182c38; }
.card.pickup-due { border-left-color: #efc477; background: #243044; }
.card-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.card-ref { font-family: var(--serif); font-size: 25px; }
.card-where { font-weight: 800; font-size: 15px; }
.card-time { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.card-items { list-style: none; margin: 10px 0 0; padding: 0; }
.card-items li { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.card-items .qty { font-family: var(--serif); font-size: 21px; }
.card-items .name { font-size: 17px; align-self: center; }
.card-items .where { align-self: center; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.card-items .note { grid-column: 2 / -1; color: var(--gold); font-size: 14px; }
.card-items .item-options, .card-items .item-allergens { grid-column: 2 / -1; color: var(--muted); font-size: 13px; display: block; }
.card-total { margin: 10px 0 0; font-weight: 800; }
.card form { margin: 10px 0 0; }
.card .reason { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
.card input[type="text"], .card input:not([type]) {
  width: 100%; margin-top: 4px; min-height: 44px; padding: 8px 10px;
  background: var(--ink-deep); color: var(--cream); border: 1px solid var(--line); border-radius: 3px;
}
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.card-actions button { flex: 1 1 130px; border: 0; min-height: 52px; padding: 12px 14px; font-weight: 800; color: var(--cream); }
.card-actions .go { background: var(--green); }
.card-actions .stop { background: var(--burgundy); }
.staff-foot { margin: 20px 0 0; color: var(--muted); font-size: 13px; }

/* Saisie du PIN, accueil et fin de service. */
body.staff-gate main { max-width: 26rem; margin: 0 auto; padding: 40px 18px 60px; }
.eyebrow { letter-spacing: .16em; text-transform: uppercase; font-size: 12px; font-weight: 800; color: var(--gold); margin: 0 0 6px; }
body.staff-gate h1 { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 0 0 8px; }
.lede { color: var(--muted); margin: 0 0 20px; }
.gate-form { display: grid; gap: 6px; }
.gate-form label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--muted); margin-top: 10px; }
.gate-form input {
  min-height: 52px; padding: 10px 12px; font-size: 20px;
  background: var(--ink); color: var(--cream); border: 1px solid var(--line); border-radius: 3px;
}
.gate-form button { margin-top: 18px; border: 0; min-height: 54px; background: var(--gold); color: var(--ink); font-weight: 800; font-size: 18px; }
.screen-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.screen-list a {
  display: grid; gap: 3px; padding: 16px; text-decoration: none; color: var(--cream);
  background: #18293b; border: 1px solid var(--line); border-left: 6px solid var(--gold); min-height: 64px;
}
.screen-list strong { font-size: 19px; }
.screen-list span { color: var(--muted); font-size: 14px; }
.muted { color: var(--muted); font-size: 14px; margin-top: 22px; }
.staff-langs {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin: 0 8px 0 0; font-size: 11px; font-weight: 800; letter-spacing: .08em;
}
.staff-langs a { color: rgba(244, 239, 230, .55); text-decoration: none; padding: 6px 2px; }
.staff-langs a[aria-current="true"], .staff-langs a:hover { color: var(--gold); }
body.staff-gate .staff-langs { margin: 0 0 16px; }

@media (max-width: 700px) {
  .cards { grid-template-columns: 1fr; }
  .staff-top h1 { font-size: 24px; }
}
