/* ==================================================================
   Resto Pilote — feuille de style unique
   Mobile d'abord : tout est en 1 colonne, le multi-colonnes vit
   dans les media queries >= 768px.
   ================================================================== */

:root {
  --brand: #E8A020;
  --brand-dark: #C4831A;
  --brand-soft: #FDF3E0;
  --ink: #17181C;
  --ink-soft: #2C2D33;
  --text: #23242A;
  --muted: #75736E;
  --bg: #F6F5F2;
  --card: #FFFFFF;
  --line: #EBE7E0;
  --line-strong: #DCD6CC;
  --green: #2E9E63;
  --green-soft: #E7F6EE;
  --blue: #2F7FD1;
  --blue-soft: #E8F1FB;
  --red: #D0463B;
  --red-soft: #FBEAE8;
  --violet: #6C5CE7;
  --violet-soft: #EFEDFD;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --shadow: 0 4px 16px rgba(23, 24, 28, .06);
  --shadow-lg: 0 14px 40px rgba(23, 24, 28, .12);
  --tap: .12s ease;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body { min-height: 100dvh; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.ic { flex: 0 0 auto; }

/* ---------------------------------------------------------------- */
/* Écran d'ouverture                                                */
/* ---------------------------------------------------------------- */

#app-splash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #17181C;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .02em;
}
#app-splash img { width: 96px; height: 96px; border-radius: 22px; }
#app-splash.show { display: flex; animation: splashOut .4s ease 1.2s forwards; }
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }

/* ---------------------------------------------------------------- */
/* Barre supérieure                                                 */
/* ---------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--brand), var(--brand-dark));
  color: #fff;
  flex: 0 0 auto;
}
.brand-mark-lg { width: 56px; height: 56px; border-radius: 18px; }
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand-txt strong { font-size: 1.02rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-txt small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: transform var(--tap), background var(--tap);
}
.icon-btn:active { transform: scale(.94); }
.icon-btn.has-dot { position: relative; }
.icon-btn.has-dot::after {
  content: "";
  position: absolute;
  top: 8px; right: 9px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
}

/* ---------------------------------------------------------------- */
/* Structure de page                                                */
/* ---------------------------------------------------------------- */

.page {
  padding: 16px 16px calc(var(--nav-h) + var(--safe-bottom) + 28px);
  max-width: 1180px;
  margin: 0 auto;
}
.page-narrow { max-width: 720px; }

.section { margin-bottom: 22px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.section-head h2, .section-head h3 { margin: 0; }
.section-head .link { color: var(--brand-dark); font-weight: 600; font-size: .9rem; }

.foot {
  padding: 22px 16px calc(var(--nav-h) + var(--safe-bottom) + 22px);
  text-align: center;
  color: var(--muted);
  font-size: .8rem;
}
.foot p { margin: 0; }

/* ---------------------------------------------------------------- */
/* Cartes                                                           */
/* ---------------------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}
.card-tight { padding: 14px; }
.card-flat { box-shadow: none; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.card-head h3, .card-head h2 { margin: 0; }
.card-title { font-size: 1.02rem; font-weight: 700; }

.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }

/* ---------------------------------------------------------------- */
/* Boutons                                                          */
/* ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--tap), filter var(--tap);
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { background: linear-gradient(140deg, var(--brand), var(--brand-dark)); color: #fff; }
.btn-dark { background: var(--ink); }
.btn-soft { background: var(--brand-soft); color: var(--brand-dark); border-color: #F2E2C4; }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line-strong); }
.btn-danger { background: var(--red-soft); color: var(--red); border-color: #F3D3CF; }
.btn-green { background: var(--green); color: #fff; }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 40px; padding: 8px 13px; font-size: .88rem; border-radius: 12px; }
.btn-xs { min-height: 34px; padding: 6px 10px; font-size: .82rem; border-radius: 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row .btn { flex: 1 1 auto; }

/* ---------------------------------------------------------------- */
/* Formulaires                                                      */
/* ---------------------------------------------------------------- */

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: .86rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #fff;
  font: inherit;
  color: var(--text);
  transition: border-color var(--tap), box-shadow var(--tap);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(232, 160, 32, .18);
}
.field-row { display: grid; gap: 14px; grid-template-columns: 1fr; }
.check { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.check input { width: 20px; height: 20px; min-height: 20px; accent-color: var(--brand); }

.filter-bar {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin-bottom: 14px;
}
.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #fff;
  color: var(--muted);
}
.search-input input {
  border: 0;
  min-height: 46px;
  padding: 8px 0;
  flex: 1;
  font: inherit;
  color: var(--text);
}
.search-input input:focus { outline: none; }

.segmented {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: #EFEDE8;
  border-radius: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button {
  flex: 1 0 auto;
  min-height: 38px;
  padding: 6px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: .88rem;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--tap), background var(--tap);
}
.segmented button:active { transform: scale(.97); }
.segmented button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- */
/* Statistiques                                                     */
/* ---------------------------------------------------------------- */

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.stat-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 1.6rem; font-weight: 800; margin: 6px 0 2px; letter-spacing: -.02em; }
.stat-sub { font-size: .84rem; color: var(--muted); }
.stat-brand { background: linear-gradient(150deg, var(--brand), var(--brand-dark)); border: 0; color: #fff; }
.stat-brand .stat-label, .stat-brand .stat-sub { color: rgba(255, 255, 255, .88); }

.trend-up { color: var(--green); font-weight: 700; }
.trend-down { color: var(--red); font-weight: 700; }

.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 130px; padding-top: 8px; }
.bar-chart .bar { flex: 1; background: linear-gradient(180deg, var(--brand), #F3C878); border-radius: 6px 6px 3px 3px; min-height: 4px; position: relative; }
.bar-chart .bar span { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: .62rem; color: var(--muted); white-space: nowrap; }
.bar-chart-wrap { padding-bottom: 22px; }

.progress { height: 8px; border-radius: 6px; background: #EFEDE8; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); }

/* ---------------------------------------------------------------- */
/* Listes et tableaux                                               */
/* ---------------------------------------------------------------- */

.list { display: grid; gap: 12px; }

.row-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}
.row-card:active { transform: scale(.995); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-meta { font-size: .84rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; }
.row-side { text-align: right; font-weight: 700; white-space: nowrap; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { width: 54px; height: 54px; border-radius: 13px; object-fit: cover; flex: 0 0 auto; background: var(--brand-soft); }
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-dark);
  font-weight: 700; flex: 0 0 auto;
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
table.data th, table.data td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); }
table.data th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- */
/* Badges                                                           */
/* ---------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .01em;
  background: #EFEDE8;
  color: var(--ink-soft);
  white-space: nowrap;
}
.badge-brand { background: var(--brand-soft); color: var(--brand-dark); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-dark { background: var(--ink); color: #fff; }
.badge-lg { font-size: .84rem; padding: 6px 14px; }

.alert { padding: 12px 14px; border-radius: 13px; font-size: .9rem; font-weight: 600; margin-bottom: 12px; }
.alert-error { background: var(--red-soft); color: var(--red); }
.alert-success { background: var(--green-soft); color: var(--green); }
.alert-info { background: var(--blue-soft); color: var(--blue); }
.alert-warn { background: var(--brand-soft); color: var(--brand-dark); }

.empty {
  text-align: center;
  padding: 34px 18px;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }

.skeleton { background: linear-gradient(90deg, #EFEDE8, #F7F6F3, #EFEDE8); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; height: 16px; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------------------------------------------------------------- */
/* Barre de navigation du bas                                       */
/* ---------------------------------------------------------------- */

.bottomnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 2px;
  padding: 6px 6px calc(6px + var(--safe-bottom));
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 4px;
  border-radius: 13px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform var(--tap), background var(--tap), color var(--tap);
}
.nav-item:active { transform: scale(.96); }
.nav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
button.nav-item { border: 0; background: transparent; cursor: pointer; font-family: inherit; }
.nav-item.active { background: var(--brand-soft); color: var(--brand-dark); }

/* ---------------------------------------------------------------- */
/* Tiroir latéral et fenêtres                                       */
/* ---------------------------------------------------------------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(23, 24, 28, .45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.sheet {
  position: fixed;
  z-index: 90;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}
.side-sheet {
  top: 0; right: 0; bottom: 0;
  width: min(84vw, 340px);
  padding: calc(14px + var(--safe-top)) 14px calc(14px + var(--safe-bottom));
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  animation: slideIn .22s ease;
}
@keyframes slideIn { from { transform: translateX(18px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head strong { font-size: 1.05rem; }
.sheet-links { display: grid; gap: 4px; overflow-y: auto; flex: 1; }
.sheet-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  border-radius: 13px;
  font-weight: 600;
  transition: transform var(--tap), background var(--tap);
}
.sheet-links a:active { transform: scale(.98); }
.sheet-links a.active { background: var(--brand-soft); color: var(--brand-dark); }
.sheet-foot { padding-top: 12px; border-top: 1px solid var(--line); margin-top: 12px; display: grid; gap: 10px; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(23, 24, 28, .5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  padding: 14px;
}
.modal {
  width: 100%;
  max-width: 520px;
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  animation: popIn .2s ease;
}
@keyframes popIn { from { transform: translateY(14px); opacity: .7; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.modal-body { font-size: .95rem; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.modal-actions .btn { flex: 1 1 140px; }

.install-step { background: var(--bg); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.install-os { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 6px; }
.install-step ol { margin: 0; padding-left: 20px; font-size: .9rem; color: var(--muted); }

.toast-zone {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  transform: translateX(-50%);
  z-index: 120;
  display: grid;
  gap: 8px;
  width: min(92vw, 460px);
  pointer-events: none;
}
.toast {
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: popIn .18s ease;
}
.toast.ok { background: var(--green); }
.toast.ko { background: var(--red); }

/* ---------------------------------------------------------------- */
/* Cuisine (écran temps réel)                                       */
/* ---------------------------------------------------------------- */

.kds-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.kds-card { border-left: 5px solid var(--brand); }
.kds-card.phase-nouvelle { border-left-color: var(--red); }
.kds-card.phase-en_cuisine { border-left-color: var(--brand); }
.kds-card.phase-prete { border-left-color: var(--green); }
.kds-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.kds-time { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.kds-lignes { display: grid; gap: 6px; margin: 10px 0; }
.kds-ligne { display: flex; align-items: center; gap: 10px; font-size: .95rem; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.kds-ligne:last-child { border-bottom: 0; }
.kds-qte { font-weight: 800; min-width: 30px; color: var(--brand-dark); }
.kds-note { font-size: .84rem; color: var(--red); font-style: italic; }

/* ---------------------------------------------------------------- */
/* Parcours QR client                                               */
/* ---------------------------------------------------------------- */

.qr-hero { background: var(--ink); color: #fff; padding: calc(18px + var(--safe-top)) 16px 20px; }
.qr-hero h1 { color: #fff; margin-bottom: 2px; }
.qr-hero p { color: rgba(255, 255, 255, .75); margin: 0; font-size: .9rem; }
.qr-table {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  font-size: .82rem;
  font-weight: 700;
}
.cat-nav { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav button {
  flex: 0 0 auto;
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-weight: 600;
  font-size: .86rem;
  cursor: pointer;
  transition: transform var(--tap);
}
.cat-nav button:active { transform: scale(.96); }
.cat-nav button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.plat { display: flex; gap: 12px; align-items: stretch; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.plat img { width: 82px; height: 82px; border-radius: 14px; object-fit: cover; flex: 0 0 auto; }
.plat-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.plat-nom { font-weight: 700; }
.plat-desc { font-size: .84rem; color: var(--muted); margin: 2px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plat-pied { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plat-prix { font-weight: 800; font-variant-numeric: tabular-nums; }
.qte-ctrl { display: flex; align-items: center; gap: 4px; }
.qte-ctrl button {
  width: 34px; height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--tap);
}
.qte-ctrl button:active { transform: scale(.92); }
.qte-ctrl span { min-width: 26px; text-align: center; font-weight: 800; }

.panier-bar {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(12px + var(--safe-bottom));
  z-index: 75;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  transition: transform var(--tap);
}
.panier-bar:active { transform: scale(.985); }
.panier-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .78rem; }

.cart-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-of-type { border-bottom: 0; }
.totaux { display: grid; gap: 6px; margin-top: 10px; }
.totaux div { display: flex; justify-content: space-between; gap: 10px; }
.totaux .total { font-size: 1.15rem; font-weight: 800; border-top: 2px solid var(--line); padding-top: 8px; margin-top: 4px; }

/* ---------------------------------------------------------------- */
/* Site public (vitrine de vente)                                   */
/* ---------------------------------------------------------------- */

.public-shell {
  padding: 0 16px calc(var(--nav-h) + var(--safe-bottom) + 30px);
  max-width: 1180px;
  margin: 0 auto;
}
.public-hero {
  margin: 0 -16px 22px;
  padding: calc(30px + var(--safe-top)) 20px 34px;
  background: linear-gradient(160deg, #1B1C21 0%, #2F2A22 55%, #4A3A22 100%);
  color: #fff;
  border-radius: 0 0 30px 30px;
}
.public-hero h1 { color: #fff; font-size: 2rem; letter-spacing: -.02em; }
.public-hero .lead { color: rgba(255, 255, 255, .82); font-size: 1.02rem; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(232, 160, 32, .18);
  color: #F6C877;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero-actions .btn { flex: 1 1 180px; }

.feature { display: flex; gap: 12px; align-items: flex-start; }
.feature-icon {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-dark);
  flex: 0 0 auto;
}
.price-card { text-align: center; }
.price-card .price { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; margin: 6px 0 2px; }
.price-card .price small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 9px; text-align: left; font-size: .92rem; }
.price-card li { display: flex; gap: 9px; align-items: flex-start; }
.price-card li .ic { color: var(--green); margin-top: 3px; }
.price-card.featured { border: 2px solid var(--brand); box-shadow: 0 12px 34px rgba(232, 160, 32, .18); }

.steps { display: grid; gap: 14px; grid-template-columns: 1fr; counter-reset: etape; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-num {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: #fff; font-weight: 800; flex: 0 0 auto;
}
.quote { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stars { color: var(--brand); letter-spacing: 2px; font-size: .95rem; }

.auth-shell { max-width: 480px; margin: 0 auto; padding-top: calc(24px + var(--safe-top)); }
.auth-brand { text-align: center; margin-bottom: 20px; }
.auth-brand h1 { margin: 12px 0 4px; }
.auth-brand p { color: var(--muted); }
.auth-card { text-align: left; }
.auth-help { text-align: center; font-size: .88rem; color: var(--muted); }
.auth-help a { color: var(--brand-dark); font-weight: 700; }
.install-card { background: var(--brand-soft); border-color: #F2E2C4; }
.install-card h3 { display: flex; align-items: center; gap: 8px; }

.admin-theme .brand-mark { background: linear-gradient(140deg, #3B3125, #17181C); }

.timeline { display: grid; gap: 10px; }
.timeline-item { display: flex; gap: 10px; font-size: .88rem; }
.timeline-item time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.qr-print { display: grid; gap: 18px; grid-template-columns: 1fr; }
.qr-card { text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 16px; }
.qr-card img { width: 100%; max-width: 220px; margin: 0 auto 10px; }
.qr-card .qr-nom { font-weight: 800; font-size: 1.05rem; }

/* ---------------------------------------------------------------- */
/* Impression (tickets et factures)                                 */
/* ---------------------------------------------------------------- */

.ticket { background: #fff; border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); }
.ticket-head { text-align: center; border-bottom: 1px dashed var(--line-strong); padding-bottom: 12px; margin-bottom: 12px; }
.ticket-total { display: flex; justify-content: space-between; font-size: 1.15rem; font-weight: 800; border-top: 2px solid var(--ink); padding-top: 10px; margin-top: 10px; }

@media print {
  .topbar, .bottomnav, .foot, .no-print, .sheet, .sheet-backdrop, .toast-zone { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; }
  .card, .ticket { border: 0; box-shadow: none; }
}

/* ---------------------------------------------------------------- */
/* Écrans larges                                                    */
/* ---------------------------------------------------------------- */

@media (min-width: 768px) {
  h1 { font-size: 2.1rem; }
  .page { padding: 22px 22px calc(var(--nav-h) + var(--safe-bottom) + 34px); }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qr-print { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-hero { padding: 46px 34px 50px; border-radius: 0 0 34px 34px; }
  .public-hero h1 { font-size: 2.7rem; max-width: 18ch; }
  .modal-backdrop { align-items: center; }
}

@media (min-width: 1024px) {
  .kds-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qr-print { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------------------------------------------------------------- */
/* Compléments : vitrine publique, QR client, FAQ                    */
/* ---------------------------------------------------------------- */

.hero-photo { position: relative; overflow: hidden; }
.hero-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(23, 24, 28, .93) 0%, rgba(47, 42, 34, .86) 55%, rgba(74, 58, 34, .78) 100%);
}
.hero-photo .hero-inner { position: relative; z-index: 2; }

.capture { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.capture img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.feature-media { margin-top: 14px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.feature-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand-dark); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 10px 0 0; color: var(--muted); font-size: .93rem; }

.os-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.os-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 13px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: .88rem;
}

.panier-bar.with-nav { bottom: calc(var(--nav-h) + var(--safe-bottom) + 10px); }

.roles-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .roles-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.apercu { background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: 20px; }
.apercu h3, .apercu h2 { color: #fff; }
.apercu .muted { color: rgba(255, 255, 255, .7); }
.apercu-lignes { display: grid; gap: 8px; margin-top: 14px; }
.apercu-ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .08);
  font-size: .92rem;
}
