/* Maison Valet — PWA voiturier. Charte : or #c9a668, terre d'ombre #594119,
   ivoire #f5f3ee, brun ébène #160f00 ; Maderon (titres) + Montserrat (texte). */

@font-face {
  font-family: "Maderon";
  src: url("../assets/fonts/maderon-regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/Montserrat-VariableFont_wght.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --gold: #c9a668;
  --gold-soft: rgba(201, 166, 104, 0.18);
  --brown: #594119;
  --ivory: #f5f3ee;
  --dark: #160f00;
  --muted: rgba(22, 15, 0, 0.58);
  --line: rgba(22, 15, 0, 0.1);
  --danger: #a3322a;
  --ok: #2d5c2a;
  --radius: 12px;
  --font-title: "Maderon", "Fraunces", serif;
  --font-body: "Montserrat", "Helvetica Neue", system-ui, sans-serif;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ivory);
  color: var(--dark);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); }

a { color: var(--brown); }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }

/* ---------- Header ---------- */
.app { max-width: 560px; margin: 0 auto; padding: calc(var(--safe-t) + 20px) 16px 0; }
.app-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 20px;
}
.app-header-mark { flex: none; }
.app-eyebrow {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brown);
  font-weight: 700;
}
.app-title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1.1;
  margin: 2px 0 0;
}

/* ---------- Cards / alerts ---------- */
.card {
  background: #fff;
  border: 1px solid rgba(201, 166, 104, 0.35);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(22, 15, 0, 0.04);
}
.card-title {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brown);
  font-weight: 700;
  margin: 0 0 14px;
}
.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.alert--error { background: #fdecea; color: #7a2a22; border: 1px solid #f0b8b0; }
.alert--notice { background: #eef6ec; color: var(--ok); border: 1px solid #bfe0ba; }
.empty { text-align: center; padding: 40px 12px; }
.empty p { margin: 0 0 6px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brown);
  font-weight: 700;
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(22, 15, 0, 0.2);
  border-radius: 10px;
  font: inherit;
  font-size: 16px; /* < 16px = zoom auto sur iOS */
  background: #fff;
  color: var(--dark);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 166, 104, 0.25);
}
.pin-input { letter-spacing: 0.5em; font-size: 22px !important; text-align: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 22px;
  border: 1px solid var(--dark);
  border-radius: 10px;
  background: var(--dark);
  color: var(--ivory);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
}
.btn:active { transform: scale(0.98); }
.btn--block { width: 100%; }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--dark); }
.btn--ghost { background: transparent; color: var(--dark); border-color: rgba(22, 15, 0, 0.25); }
.btn--small { min-height: 40px; padding: 8px 14px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.55; }

/* ---------- Login ---------- */
.is-bare { background: var(--dark); color: var(--ivory); }
.login {
  max-width: 420px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 9vh) 20px 40px;
}
.login-brand { text-align: center; margin-bottom: 28px; }
.login-brand img { display: block; margin: 0 auto 14px; }
.login-wordmark {
  display: block;
  font-family: var(--font-title);
  font-size: 2.1rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}
.login-brand .app-eyebrow { color: rgba(245, 243, 238, 0.6); }
.login-card { color: var(--dark); }
.login-help { text-align: center; font-size: 0.82rem; color: rgba(245, 243, 238, 0.55); margin-top: 18px; }

/* ---------- Planning ---------- */
.shift-list { list-style: none; margin: 0; padding: 0; }
.shift { position: relative; }
.shift--live { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft), 0 4px 14px rgba(22, 15, 0, 0.06); }
.shift-top { display: flex; justify-content: space-between; align-items: center; }
.shift-day {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brown);
  font-weight: 700;
}
.shift-resto { font-family: var(--font-title); font-weight: 400; font-size: 1.45rem; margin: 6px 0 2px; line-height: 1.15; }
.shift-hours { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.shift-team, .shift-notes { margin: 8px 0 0; font-size: 0.88rem; color: var(--muted); }
.shift-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge--live { background: var(--gold); color: var(--dark); }

/* ---------- Profil ---------- */
.infos { margin: 0 0 10px; }
.infos > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.infos > div:last-child { border-bottom: 0; }
.infos dt { color: var(--muted); font-size: 0.88rem; }
.infos dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }
.logout { margin: 8px 0 24px; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: space-around;
  background: var(--dark);
  border-top: 1px solid rgba(201, 166, 104, 0.4);
  padding-bottom: var(--safe-b);
}
.tabbar-item {
  flex: 1;
  height: var(--tabbar-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: rgba(245, 243, 238, 0.55);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.tabbar-item.is-active { color: var(--gold); }

/* ======================= Phase 2 ======================= */

/* Tab bar : bouton central « Prise en charge » mis en avant */
.tabbar-item--primary { color: var(--dark); }
.tabbar-item--primary svg {
  width: 40px; height: 40px; padding: 8px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--dark);
  margin-top: -14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.tabbar-item--primary span { color: rgba(245, 243, 238, 0.7); }
.tabbar-item--primary.is-active span { color: var(--gold); }

.hint { font-size: 0.8rem; color: var(--muted); margin: 6px 0 0; }
.center { text-align: center; }
.back { display: inline-block; margin: 0 0 6px; font-weight: 600; text-decoration: none; font-size: 0.9rem; }
.shift-context { margin: -8px 0 16px; font-size: 0.9rem; color: var(--muted); }
.shift-context strong { color: var(--dark); }

.step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; margin-right: 6px;
  border-radius: 50%; background: var(--dark); color: var(--gold);
  font-size: 0.7rem; letter-spacing: 0;
}
.input-big { font-size: 22px !important; font-weight: 700; letter-spacing: 0.06em; }
.input-plate { text-transform: uppercase; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.btn--big { min-height: 58px; font-size: 1.05rem; }

/* État : 4 grosses cases */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 8px;
  border: 1px solid rgba(22, 15, 0, 0.2); border-radius: 10px;
  font-weight: 600; background: #fff; cursor: pointer;
}
.choice input:checked + span { background: var(--dark); color: var(--gold); border-color: var(--dark); }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(201, 166, 104, 0.4); }

/* Photos 2×2 */
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-slot {
  position: relative; display: block;
  aspect-ratio: 4 / 3; overflow: hidden;
  border: 1.5px dashed rgba(89, 65, 25, 0.45); border-radius: 10px;
  background: rgba(201, 166, 104, 0.08);
  cursor: pointer; color: var(--brown);
}
.photo-slot input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.photo-slot-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 0.8rem; font-weight: 600; pointer-events: none;
}
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.photo-slot-label {
  position: absolute; left: 6px; bottom: 6px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(22, 15, 0, 0.75); color: #fff;
  font-size: 0.68rem; font-weight: 600; pointer-events: none;
  display: none;
}
.photo-slot.is-filled { border: 0; }
.photo-slot.is-filled .photo-slot-empty { display: none; }
.photo-slot.is-filled .photo-slot-label { display: block; }
.photo-slot.is-loading::after {
  content: "…"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.7); font-size: 1.6rem;
}
#photo-count { font-weight: 600; text-transform: none; }
#photo-count.is-done { color: var(--ok); }

/* Cartes Leaflet */
.map { height: 260px; border-radius: 10px; border: 1px solid var(--line); z-index: 0; }
.map--tall { height: 300px; margin-bottom: 6px; }
.pin span {
  display: inline-block; transform: translate(-50%, -100%);
  padding: 3px 7px; border-radius: 6px;
  background: var(--dark); color: var(--gold);
  font: 700 12px/1.2 var(--font-body); white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Liste des véhicules */
.search { position: sticky; top: 0; z-index: 5; padding: 12px 0 8px; background: var(--ivory); }
.search input {
  width: 100%; padding: 14px; font: inherit; font-size: 16px;
  border: 1px solid rgba(22, 15, 0, 0.2); border-radius: 10px; background: #fff;
}
.ticket-list { list-style: none; margin: 0; padding: 0; }
.ticket { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.ticket-num {
  flex: none; min-width: 64px; padding: 8px 6px;
  border-radius: 8px; background: var(--dark); color: var(--gold);
  font-weight: 700; font-size: 0.9rem; text-align: center;
}
.ticket-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ticket-car { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-meta { font-size: 0.78rem; color: var(--muted); }
.ticket-chevron { font-size: 1.6rem; color: var(--muted); }
.plate {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 700; letter-spacing: 0.05em;
}
.plate--big {
  display: inline-block; margin-bottom: 8px;
  padding: 6px 14px; border: 2px solid var(--dark); border-radius: 6px;
  font-size: 1.4rem; background: #fff;
}
.badge--warn { background: #fdecea; color: #7a2a22; margin-left: 4px; }
.restitution { margin: 4px 0 16px; }
.empty-filtered { text-align: center; }

/* ======================= Phase 4 : salaire ======================= */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.month-nav strong { font-size: 1.05rem; }
.month-nav .btn { min-width: 44px; font-size: 1.3rem; }
.total-card { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; background: var(--dark); color: var(--ivory); border-color: var(--dark); }
.total-card .app-eyebrow { color: var(--gold); }
.total-card .muted { color: rgba(245, 243, 238, 0.65); }
.total-amount { font-family: var(--font-title); font-size: 2.6rem; line-height: 1.1; color: var(--gold); font-variant-numeric: tabular-nums; }
.total-next { margin-top: 4px; }
.pay-list { list-style: none; margin: 0; padding: 0; }
.pay-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 8px; }
.pay-row.is-upcoming { opacity: 0.6; border-style: dashed; }
.pay-amount { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabbar-item { font-size: 0.62rem; }

/* ======================= v2 : page client « Demander ma voiture » ======================= */
.client .login-card { text-align: left; }
.client-meta { margin: 0; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brown); font-weight: 700; }
.client-title { font-family: var(--font-title); font-weight: 400; font-size: 1.8rem; margin: 4px 0 6px; line-height: 1.1; }
.client-ready { display: flex; flex-direction: column; gap: 4px; margin: 16px 0 4px; padding: 14px; border-radius: 10px; background: var(--dark); color: var(--ivory); }
.client-ready strong { font-size: 1.25rem; color: var(--gold); }
.client-ready .muted { color: rgba(245, 243, 238, 0.7); }
.client-ready .app-eyebrow { color: rgba(245, 243, 238, 0.7); }
.client-actions { display: grid; gap: 8px; }

/* ======================= v2 : alertes « demande client » dans l'app ======================= */
.demand-banner {
  position: sticky; top: 0; z-index: 60;
  display: block; margin: 0 -16px 12px; padding: calc(var(--safe-t) + 10px) 16px 10px;
  background: var(--gold); color: var(--dark); text-decoration: none; font-weight: 700;
  box-shadow: 0 4px 14px rgba(22, 15, 0, 0.25);
  animation: demand-pulse 1.6s ease-in-out infinite;
}
.demand-banner small { display: block; font-weight: 600; opacity: 0.8; }
@keyframes demand-pulse { 50% { background: #e0c38a; } }
.ticket.is-demanded { border: 2px solid var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.badge--demand { background: var(--gold); color: var(--dark); margin-left: 4px; }
.offline-banner { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fff4e0; border: 1px solid #f0d3a0; color: #6b4a10; font-size: 0.86rem; }
.offline-banner button { margin-top: 8px; }
.offline-banner ul { margin: 6px 0 0; padding-left: 18px; }

/* ======================= Barre du bas (iOS, app installée) =======================
   La barre d'état iOS est en style « default » (opaque, au-dessus de l'app) et non
   plus « black-translucent » : ce dernier déclenche un bug WebKit qui raccourcit
   l'écran de la hauteur de la barre d'état et remonte la barre d'onglets jusqu'au
   premier défilement. Le prolongement sombre sous la barre reste, par sécurité
   (invisible quand tout est normal). */
body.is-bare { background: var(--dark); }
.tabbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 120px;
  background: var(--dark);
}

/* ======================= Déclaration des tickets (paiement au ticket) ======================= */
.pay-row { flex-wrap: wrap; }
.pay-row.is-todo { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }
.declare { flex-basis: 100%; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.declare label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--brown); margin-bottom: 6px; }
.declare-row { display: flex; gap: 8px; }
.declare-row input { flex: 1; min-width: 0; padding: 10px; border: 1px solid rgba(22, 15, 0, 0.2); border-radius: 10px; font: inherit; font-size: 18px; font-weight: 700; text-align: center; }

/* ======================= Page client : état + photos ======================= */
.client-state { margin-top: 14px; color: var(--dark); }
/* Pas de display:flex sur <summary> : Safari iOS ne l'ouvre alors plus au toucher. */
.client-state summary { display: block; position: relative; padding: 4px 28px 4px 0; cursor: pointer; font-weight: 700; color: var(--brown); -webkit-tap-highlight-color: transparent; }
.client-state summary::marker { content: ""; }
.client-state summary::-webkit-details-marker { display: none; }
.client-state summary::after { content: "▾"; position: absolute; right: 4px; top: 50%; margin-top: -0.6em; color: var(--gold); transition: transform .2s; }
.client-state[open] summary::after { transform: rotate(180deg); }
.client-state-body { margin-top: 14px; }
.client-comment { margin: 12px 0 0; padding: 12px; border-radius: 10px; background: var(--gold-soft); font-size: 0.92rem; }
.client-comment .app-eyebrow { display: block; margin-bottom: 4px; }

/* =====================================================================
   Direction « maison » (v4) : moins de gabarit, plus de métier.
   - Pas de petites capitales espacées : texte en casse normale.
   - Cartes plates, filet terre d'ombre léger, pas d'ombre portée.
   - Un seul objet fort : le talon de ticket (bord perforé, encoches),
     le même que celui du carnet papier remis au client.
   ===================================================================== */
:root { --paper: #fffdf8; --stub: #f1e6cf; --line-warm: rgba(89, 65, 25, 0.16); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app-eyebrow, .card-title, .field label, .shift-day, .badge, .client-meta {
  text-transform: none;
  letter-spacing: 0;
}
.app-eyebrow { font-size: 0.95rem; font-weight: 500; color: var(--brown); }
.app-title { font-size: 1.9rem; }
.card-title { font-size: 1.02rem; font-weight: 700; color: var(--dark); margin-bottom: 12px; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--dark); }
.optional { font-weight: 400; color: var(--muted); margin-left: 4px; }
.shift-day { font-size: 0.92rem; font-weight: 600; color: var(--brown); }
.badge { font-size: 0.76rem; font-weight: 600; padding: 3px 9px; }
.client-meta { font-size: 0.95rem; font-weight: 600; color: var(--brown); }
.login-sub { display: block; font-size: 0.95rem; color: rgba(245, 243, 238, 0.6); }

.card {
  background: var(--paper);
  border-color: var(--line-warm);
  box-shadow: none;
}
.shift--live { box-shadow: none; border: 1px solid var(--gold); background: #fbf6ea; }
.step { background: none; color: var(--gold); width: auto; height: auto; margin-right: 8px; font-family: var(--font-title); font-size: 1.1rem; }

/* ---------- Le talon de ticket ---------- */
.stub {
  --notch: var(--paper);
  position: relative;
  flex: none;
  display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center;
  min-width: 78px;
  padding: 8px 16px 8px 12px;
  background: var(--stub);
  color: var(--dark);
  border-radius: 4px;
  border-right: 2px dashed rgba(89, 65, 25, 0.45);
}
.stub::before, .stub::after {
  content: "";
  position: absolute;
  right: -8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--notch);
}
.stub::before { top: -7px; }
.stub::after { bottom: -7px; }
.stub-label { font-size: 0.66rem; font-weight: 600; color: var(--brown); line-height: 1; }
.stub-n { font-family: var(--font-title); font-size: 1.45rem; line-height: 1.05; letter-spacing: 0.02em; }
.stub--lg { min-width: 120px; padding: 10px 22px 10px 16px; }
.stub--lg .stub-n { font-size: 2.3rem; }
.ticket-num { display: none; }

.ticket-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }

/* Plaque : bande bleue européenne, sans en faire trop. */
.plate--big {
  margin: 0;
  padding: 6px 12px 6px 10px;
  position: relative;
  padding-left: 30px;
  border: 2px solid var(--dark);
  border-radius: 5px;
  background: #fff;
  font-size: 1.25rem;
}
/* La bande bleue européenne, dessinée comme sur une vraie plaque. */
.plate--big::before {
  content: "F";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 18px;
  padding-bottom: 3px;
  display: flex; align-items: flex-end; justify-content: center;
  background: #1f4fa8;
  color: #fff;
  font: 700 0.62rem/1 var(--font-body);
  border-radius: 2px 0 0 2px;
}

/* ---------- Bandeau « le client demande sa voiture » ---------- */
.demand-banner { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.demand-n {
  flex: none;
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--dark); color: var(--gold);
  font-family: var(--font-title); font-size: 1.2rem; font-weight: 400;
}
.demand-text small { font-weight: 500; }

/* ---------- Page client ---------- */
.client .login-card { --notch: #fff; }
.client .login-card .stub { --notch: var(--paper); }
.client-title--stub { margin: 10px 0 8px; }
.client-ready-label { font-size: 0.85rem; font-weight: 600; color: rgba(245, 243, 238, 0.75); }
.client-comment-label { display: block; margin-bottom: 4px; font-size: 0.8rem; font-weight: 700; color: var(--brown); }
.total-card .app-eyebrow { color: var(--gold); }
/* Le bloc « total du mois » garde son fond ébène malgré le fond papier des cartes. */
.card.total-card { background: var(--dark); border-color: var(--dark); }
.card.total-card .muted { color: rgba(245, 243, 238, 0.7); }
/* « N° » du talon toujours en Montserrat (Maderon n'a pas le signe °). */
.stub-label { font-family: var(--font-body); }

/* Charte « seuil » : libellés en casse normale. */
.app-eyebrow, .client-meta { text-transform: none; letter-spacing: 0.01em; }

/* Première connexion : choix du code personnel. */
.premier-code-intro { margin: 0 0 16px; font-size: 0.95rem; line-height: 1.5; color: var(--brown); }
.login-logout { display: block; width: 100%; background: none; border: 0; cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Page client : la partie client du ticket papier ---------- */
/* Même langage que la démo du site : papier crème, numéro imprimé en rouge,
   lignes pointillées, perforation au pied du ticket. */
.client { --papier: #fbf7ee; --encre-rouge: #a3271c; }
.client-demo { margin: -12px 0 16px; text-align: center; font-size: 0.82rem; line-height: 1.5; color: rgba(245, 243, 238, 0.68); }
.client-demo a { color: var(--ivory); text-underline-offset: 3px; }
.client .card.billet-client,
.client .card.billet-etat {
  background: var(--papier);
  border: 0;
  border-radius: 3px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
}
.billet-client { position: relative; padding: 20px; }
.billet-tete {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--dark);
}
.billet-marque { font-family: var(--font-title); font-size: 1.35rem; line-height: 1; }
.billet-n {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.35rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--encre-rouge);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.billet-resto { margin: 12px 0 2px; font-weight: 700; }
.billet-auto { margin: 0 0 4px; color: var(--brown); font-size: 0.92rem; }
.billet-client > p:not([class]) { padding-top: 12px; border-top: 1px dotted rgba(22, 15, 0, 0.4); }
.client .client-actions .btn--gold { background: var(--dark); border-color: var(--dark); color: var(--ivory); }
.client .client-actions .btn--ghost { border-color: rgba(22, 15, 0, 0.4); }
.client .client-ready { border-radius: 3px; }
/* Perforation et encoches : on « détache » le bas du ticket. */
.billet-pied {
  position: relative;
  margin: 18px -20px -20px;
  padding: 18px 20px 18px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--brown);
  background-image: radial-gradient(circle, var(--dark) 2px, transparent 2.5px);
  background-size: 11px 6px;
  background-repeat: repeat-x;
  background-position: 6px 0;
}
.billet-pied::before, .billet-pied::after {
  content: ""; position: absolute; top: -8px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--dark);
}
.billet-pied::before { left: -8px; }
.billet-pied::after { right: -8px; }
.billet-pied p { margin: 0; }
.billet-pied a { display: inline-block; margin-top: 6px; font-weight: 600; color: var(--dark); text-underline-offset: 3px; }
.billet-etat .infos > div { border-bottom: 1px dotted rgba(22, 15, 0, 0.4); }
.billet-etat .client-comment { background: transparent; border: 1px dotted rgba(22, 15, 0, 0.45); border-radius: 2px; }
.billet-etat .photo-slot { border-radius: 2px; }
.billet-etat .photo-slot-label { border-radius: 2px; background: var(--dark); }
.billet-etat summary::after { color: var(--brown); }
