/* Caféino Patron — appli mobile du propriétaire.
   Cockpit « acier sombre » : surfaces graphite, accent bois chaud, une seule teinte pour les données. */

html, body { height: 100%; }
body.owner {
  overflow: hidden; overscroll-behavior: none; touch-action: manipulation;
  background: #0E0C0B; -webkit-user-select: none; user-select: none;
}
.owner input, .owner textarea { -webkit-user-select: text; user-select: text; }
.owner [hidden] { display: none !important; }
#app { height: 100%; }
.small { font-size: 12.5px; }
.grow { flex: 1; }
.up { color: var(--ok); font-weight: 700; }
.down { color: var(--danger); font-weight: 700; }
.warn-text { color: var(--warn); font-weight: 600; }
.av {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--wood-grad); color: var(--on-wood); font-family: var(--font-display); font-weight: 700; font-size: 17px;
}
.av-sm { width: 34px; height: 34px; font-size: 14px; background: var(--surface-3); color: var(--ink); }

/* ---------- Coque : barre du haut, vues, barre d'onglets ---------- */
.shell {
  position: fixed; inset: 0; margin: 0 auto; max-width: 560px;
  display: flex; flex-direction: column; background: var(--bg);
}
.shell > .topbar, .shell > .banner, .shell > .tabbar { flex: none; }
@media (min-width: 600px) {
  .shell, .skel-screen { box-shadow: 0 0 0 1px var(--line), 0 30px 90px rgba(0, 0, 0, .6); }
}

.topbar {
  position: relative; z-index: 6; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  background: rgba(15, 16, 17, .86); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.tb-side { display: flex; align-items: center; min-width: 0; }
.tb-right { justify-content: flex-end; gap: 10px; }
.tb-logo { font-size: 15px; color: #fff; padding-top: .5em; }
.tb-title {
  font-family: var(--font-display); font-weight: 600; font-size: 15px; white-space: nowrap;
  opacity: 0; transform: translateY(5px); transition: opacity .2s ease, transform .25s cubic-bezier(.2, .8, .2, 1);
}
.topbar.scrolled .tb-title { opacity: 1; transform: none; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--wood-grad); color: var(--on-wood); font-family: var(--font-display); font-weight: 700; font-size: 15px;
  box-shadow: 0 0 0 2px rgba(200, 129, 74, .25); transition: transform .12s;
}
.avatar:active { transform: scale(.92); }

.conn {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
}
.conn i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.conn-ok i { background: var(--ok); animation: ping 2.2s ease-out infinite; }
.conn-warn { color: var(--warn); }
.conn-danger { color: var(--danger); background: var(--danger-soft); box-shadow: none; }

.banner {
  display: flex; align-items: center; gap: 10px; padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  font-size: 13px; line-height: 1.35; animation: bannerIn .3s cubic-bezier(.2, .8, .2, 1);
}
.banner-off { background: #3a1d18; color: #ffc2b6; border-bottom: 1px solid rgba(232, 102, 79, .35); }
.banner-on { background: #15301f; color: #9fe0bb; border-bottom: 1px solid rgba(86, 183, 131, .3); }
.spinner { margin-left: auto; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }

.views { position: relative; flex: 1 1 auto; overflow: hidden; min-height: 0; }
.view {
  position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 2px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
}
.view.enter { animation: viewIn .34s cubic-bezier(.2, .8, .2, 1); }

.tabbar {
  position: relative; z-index: 6; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px max(4px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left));
  background: rgba(16, 17, 18, .9); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border-top: 1px solid var(--line);
}
.tab {
  display: grid; justify-items: center; gap: 3px; padding: 3px 0 2px; min-height: 52px;
  color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .01em; transition: color .2s; -webkit-touch-callout: none;
}
.tab-ico {
  position: relative; display: grid; place-items: center; width: 58px; height: 30px; border-radius: 999px;
  transition: background-color .25s ease, color .2s, transform .14s ease;
}
.tab.active { color: var(--ink); }
.tab.active .tab-ico { background: var(--wood-soft); color: var(--wood-ink); }
.tab:active .tab-ico { transform: scale(.88); }
.tab-badge {
  position: absolute; top: -3px; right: 9px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center; background: #e8664f; color: #fff; font-size: 10.5px; font-weight: 700; font-style: normal;
  box-shadow: 0 0 0 2px #0E0C0B; animation: pop .35s cubic-bezier(.2, 1.4, .4, 1);
}

/* ---------- Typographie des pages ---------- */
.page-head { padding: 14px 2px 14px; }
.eyebrow { font-size: 13px; color: var(--muted); font-weight: 500; }
.large-title { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.section-head { display: flex; align-items: center; gap: 9px; margin: 24px 2px 10px; }
.section-head h2 { font-size: 18px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: ping 1.8s ease-out infinite; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.hint { font-size: 12px; color: var(--muted); }
.group-title { font-size: 18px; margin: 24px 2px 10px; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 26px 2px 4px; }
.group-head .group-title { margin: 0; }
.group-sub { font-size: 13px; color: var(--muted); margin: 2px 2px 12px; }
.footnote { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--muted); margin: 8px 4px 12px; line-height: 1.4; }
.footnote .ico { margin-top: 1px; }
.footnote.center { justify-content: center; text-align: center; }

/* ---------- Cartes ---------- */
.card {
  display: block; width: 100%; text-align: left; margin-bottom: 14px; padding: 16px; border-radius: 20px;
  background: linear-gradient(180deg, #1C1917, #171412); box-shadow: inset 0 0 0 1px var(--line), 0 10px 30px rgba(0, 0, 0, .22);
}

.empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 22px 12px; color: var(--muted); }
.empty .ico { color: var(--wood); opacity: .8; margin-bottom: 2px; }
.empty strong { color: var(--ink); font-size: 15px; }
.empty p { font-size: 13px; max-width: 280px; }

/* ---------- Accueil : héros du CA ---------- */
.hero {
  position: relative; overflow: hidden; padding: 18px 18px 14px;
  background: radial-gradient(130% 90% at 100% 0%, rgba(200, 129, 74, .24), transparent 55%), linear-gradient(180deg, #1e1c1a, #141110);
  box-shadow: inset 0 0 0 1px rgba(200, 129, 74, .22), 0 18px 44px rgba(0, 0, 0, .38);
}
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 26px; }
.hero-label { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.hero-tr { position: relative; display: grid; justify-items: end; }
.hero-tr > * { grid-area: 1 / 1; }
.live-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--ok); background: var(--ok-soft); transition: opacity .2s;
}
.live-chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: ping 1.8s ease-out infinite; }
.live-chip.off { color: var(--danger); background: var(--danger-soft); }
.live-chip.off i { animation: none; }
.hero-plus {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; white-space: nowrap;
  font-size: 13px; font-weight: 700; color: #0f2a1b; background: #6ccf98; opacity: 0; pointer-events: none;
}
.hero-plus.show { animation: plusIn 2.6s cubic-bezier(.2, .8, .2, 1) forwards; }
.hero.flash .live-chip { animation: chipHide 2.6s ease forwards; }
.hero-value {
  margin-top: 8px; font-family: var(--font-display); font-size: clamp(34px, 10.6vw, 46px); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.05; white-space: nowrap;
}
.hero.flash .hero-value { animation: glow 1.4s ease; }
.hero-delta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.delta.up { color: var(--ok); background: var(--ok-soft); }
.delta.down { color: var(--danger); background: var(--danger-soft); }
.delta.flat { color: var(--ink-2); background: rgba(255, 255, 255, .07); font-weight: 600; }

.spark { margin-top: 16px; }
.spark-box { position: relative; height: 72px; }
.spark-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.sp-base { stroke: rgba(255, 255, 255, .1); stroke-width: 1; }
.sp-y { fill: none; stroke: rgba(246, 241, 234, .3); stroke-width: 1.5; stroke-dasharray: 3 4; stroke-linejoin: round; }
.sp-t { fill: none; stroke: var(--wood); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.sp-area { fill: url(#spg); }
.spark-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--wood); box-shadow: 0 0 0 2px #1A1715; }
.spark-dot::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--wood); opacity: 0; animation: ripple 2s ease-out infinite; }
.spark-axis { display: flex; justify-content: space-between; margin-top: 5px; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.spark-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.spark-legend i { display: inline-block; width: 16px; height: 0; margin-right: 6px; vertical-align: middle; }
.lg-t { border-top: 2px solid var(--wood); }
.lg-y { border-top: 2px dashed rgba(246, 241, 234, .38); }
.hero-meta {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.hero-meta div { display: grid; gap: 1px; min-width: 0; }
.hero-meta b { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-meta span { font-size: 11.5px; color: var(--muted); }

/* ---------- Accueil : service en cours ---------- */
.live { cursor: pointer; transition: transform .14s ease, box-shadow .2s; }
.live:active { transform: scale(.985); }
.live-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.live-more { display: inline-flex; align-items: center; gap: 1px; color: var(--muted); font-size: 13px; font-weight: 500; }
.live-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.live-cell {
  position: relative; display: grid; align-content: start; gap: 5px; padding: 10px 9px 9px; border-radius: 14px; min-width: 0;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .3s, box-shadow .3s;
}
.live-cell b { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1; }
.live-cell span { font-size: 11px; color: var(--muted); line-height: 1.2; }
#lc-pending.hot { background: var(--warn-soft); box-shadow: inset 0 0 0 1px rgba(226, 166, 74, .4); }
#lc-pending.hot b { color: var(--warn); }
#lc-pending.hot::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(226, 166, 74, .5);
  animation: ringPulse 1.8s ease-out infinite;
}
#lc-preparing.hot b { color: var(--wood-ink); }
#lc-ready.hot b { color: var(--ok); }
.live-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.live-foot b { color: var(--ink); font-size: 15px; white-space: nowrap; }

/* ---------- Accueil : fil d'activité ---------- */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fi {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px;
  border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
}
.fi.is-new { animation: fiIn .5s cubic-bezier(.2, .8, .2, 1), fiGlow 3s ease; }
.fi-empty { list-style: none; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.fi-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; }
.fi-wood { background: var(--wood-soft); color: var(--wood-ink); }
.fi-ok { background: var(--ok-soft); color: var(--ok); }
.fi-warn { background: var(--warn-soft); color: var(--warn); }
.fi-star { background: rgba(217, 163, 114, .12); color: var(--wood-strong); }
.fi-main { min-width: 0; }
.fi-title { font-weight: 600; font-size: 14px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fi-title .stars { vertical-align: -1px; margin-right: 6px; }
.fi-sub { margin-top: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fi-sub q { font-style: italic; color: var(--ink-2); }
.fi-side { display: grid; justify-items: end; gap: 3px; text-align: right; }
.fi-amt { font-size: 14px; font-weight: 700; white-space: nowrap; }
.fi-plus { color: var(--ok); }
.fi-side time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.feed-more { margin-top: 12px; }

.st {
  display: inline-flex; align-items: center; height: 18px; padding: 0 7px; margin-left: 4px; border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap; vertical-align: 1px;
}
.st-warn { background: var(--warn-soft); color: var(--warn); }
.st-wood { background: var(--wood-soft); color: var(--wood-ink); }
.st-ok { background: var(--ok-soft); color: var(--ok); }
.st-muted { background: var(--surface-3); color: var(--ink-2); }
.st-danger { background: var(--danger-soft); color: var(--danger); }

/* Étoiles (remplissage partiel) */
.stars { position: relative; display: inline-flex; flex: none; line-height: 0; }
.stars-bg, .stars-fg { display: inline-flex; gap: 2px; }
.stars-bg svg { fill: rgba(255, 255, 255, .14); }
.stars-fg { position: absolute; left: 0; top: 0; width: var(--fill); overflow: hidden; }
.stars-fg svg { fill: var(--wood-strong); flex: none; }

/* ---------- Feuilles ---------- */
.owner-sheet .layer-panel { background: #1A1715; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), var(--shadow-lg); touch-action: pan-y; }
.owner-sheet .sheet-grip { width: 44px; margin-top: 9px; }
.owner-sheet .layer-head { cursor: grab; }
.owner-sheet .sheet-grip, .owner-sheet .layer-head { touch-action: none; } /* glisser vers le bas pour fermer */
.owner-sheet .sheet-grip { position: relative; }
.owner-sheet .sheet-grip::after { content: ''; position: absolute; inset: -12px -60px; } /* zone de prise plus large */
.owner-sheet .layer-head h2 { font-size: 19px; }
.owner-sheet .layer-foot { background: linear-gradient(to bottom, rgba(28, 25, 23, 0), #1A1715 24%); }

.svc-group { margin-bottom: 18px; }
.svc-group h3 { display: flex; justify-content: space-between; align-items: center; font-family: var(--font); font-size: 14px; margin-bottom: 8px; }
.svc-group h3 .st { margin-left: 0; height: 22px; font-size: 12px; }
.svc-list { list-style: none; margin: 0; padding: 0; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.svc-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; }
.svc-row + .svc-row { border-top: 1px solid var(--line); }
.svc-main { min-width: 0; display: grid; gap: 2px; }
.svc-main strong { font-size: 14px; }
.svc-items { font-size: 12.5px; color: var(--muted); }
.svc-side { display: grid; justify-items: end; align-content: start; gap: 2px; white-space: nowrap; }
.svc-side b { font-size: 14px; }
.svc-side time { font-size: 11.5px; color: var(--muted); }
.svc-none { font-size: 13px; color: var(--muted); padding: 2px 2px 4px; }
.svc-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.svc-table { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; }

/* ---------- Ventes ---------- */
.seg {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 14px; padding: 3px; border-radius: 13px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
}
.seg button { position: relative; z-index: 1; height: 36px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); transition: color .2s; }
.seg button.active { color: var(--ink); }
.seg-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 10px;
  background: var(--surface-3); box-shadow: 0 1px 3px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--line-strong);
  transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.kpi-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.kpi-label .ico { color: var(--wood); }
.kpi-value { font-family: var(--font-display); font-size: 21px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.kpi-sub { font-size: 11.5px; color: var(--muted); line-height: 1.35; }

.readout { display: grid; gap: 1px; min-height: 64px; margin-bottom: 12px; }
.ro-k { font-size: 12px; font-weight: 600; color: var(--muted); }
.ro-v { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.ro-s { font-size: 12px; color: var(--ink-2); }
.plot-wrap { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 6px; height: 168px; }
.yaxis { display: flex; flex-direction: column; justify-content: space-between; margin: -7px 0; font-size: 10px; line-height: 14px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.plot { position: relative; }
.gridlines { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.gridlines i { display: block; height: 1px; background: rgba(255, 255, 255, .06); }
.gridlines i:last-child { background: rgba(255, 255, 255, .18); }
.bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; touch-action: pan-y; }
.bar-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.bar {
  display: block; width: 100%; max-width: 30px; border-radius: 4px 4px 0 0; background: var(--wood);
  transition: height .5s cubic-bezier(.2, .8, .2, 1), opacity .2s, background-color .2s; transform-origin: bottom;
}
.chart.grow .bar { animation: barGrow .7s cubic-bezier(.2, .8, .2, 1) both; }
.chart.grow .bar-col:nth-child(3n+2) .bar { animation-delay: .04s; }
.chart.grow .bar-col:nth-child(3n) .bar { animation-delay: .08s; }
.bars.has-sel .bar-col:not(.sel) .bar { opacity: .38; }
.bar-col.sel .bar { background: var(--wood-strong); }
.bar-col:focus-visible { box-shadow: none; }
.bar-col:focus-visible .bar { outline: 2px solid var(--wood-ink); outline-offset: 2px; }
.xlabels { display: flex; gap: 2px; margin: 7px 0 0 36px; }
.xlabels span { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; font-size: 10px; color: var(--muted); white-space: nowrap; }
.yunit { margin-top: 8px; font-size: 10.5px; color: var(--muted); text-align: right; }

.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rank-row { display: grid; grid-template-columns: 14px 40px minmax(0, 1fr); gap: 10px; align-items: center; }
.rank-no { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.rank-row .item-icon { width: 40px; height: 40px; font-size: 21px; border-radius: 12px; }
.rank-main { display: grid; gap: 5px; min-width: 0; }
.rank-top { display: flex; justify-content: space-between; gap: 8px; }
.rank-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-top b { font-size: 14px; white-space: nowrap; }
.rank-sub { font-size: 11.5px; color: var(--muted); }
.meter { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 999px; background: var(--wood); transition: width .6s cubic-bezier(.2, .8, .2, 1); }

.mix { display: grid; gap: 14px; }
.mix-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: center; }
.mix-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.mix-main { display: grid; gap: 6px; min-width: 0; }
.mix-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
.mix-top > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mix-top em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 6px; }
.mix-top b { white-space: nowrap; }

/* ---------- Menu ---------- */
.menu-tools {
  position: sticky; top: 0; z-index: 3; margin: 0 -16px; padding: 6px 16px 10px; background: var(--bg);
}
.menu-tools::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 16px; pointer-events: none;
  background: linear-gradient(var(--bg), rgba(15, 16, 17, 0));
}
.search {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 12px; color: var(--muted);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s;
}
.search:focus-within { box-shadow: inset 0 0 0 1px var(--wood), var(--focus); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font-size: 16px; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 10px -16px 0; padding: 0 16px 2px; scroll-padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 999px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  white-space: nowrap; transition: background-color .2s, color .2s, transform .12s;
}
.chip:active { transform: scale(.95); }
.chip.active { background: var(--ink); color: var(--bg); box-shadow: none; }
.chip-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; background: var(--danger-soft); color: var(--danger); }
.chip.active .chip-n { background: rgba(0, 0, 0, .14); color: inherit; }
.chips-wrap { flex-wrap: wrap; overflow: visible; margin: 0 0 12px; padding: 0; }
.chips-wrap .chip-n { background: rgba(255, 255, 255, .08); color: inherit; }
.live-note {
  display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 16px; padding: 10px 12px; border-radius: 12px;
  font-size: 12.5px; line-height: 1.4; color: var(--ink-2); background: var(--wood-soft);
}
.live-note .ico { color: var(--wood-ink); margin-top: 1px; }
.m-group { margin-bottom: 18px; }
.m-group h3 { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.m-group h3 span { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); }
.m-items { list-style: none; margin: 0; padding: 0; border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.m-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; }
.m-row + .m-row { border-top: 1px solid var(--line); }
.m-row .item-icon { width: 44px; height: 44px; font-size: 22px; border-radius: 12px; transition: filter .25s, opacity .25s; }
.m-row.off .item-icon { filter: grayscale(1); opacity: .45; }
.m-main { display: grid; gap: 4px; min-width: 0; }
.m-name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.m-name .badge { height: 18px; padding: 0 6px; font-size: 10.5px; vertical-align: 1px; }
.m-row.off .m-name { color: var(--muted); }
.m-line { display: flex; align-items: center; gap: 8px; }
.m-price {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: 8px;
  background: var(--surface-3); font-size: 13px; font-weight: 600; color: var(--ink); transition: transform .12s, background-color .15s;
}
.m-price .ico { color: var(--muted); }
.m-price:active { transform: scale(.94); background: var(--line-strong); }
.m-state { font-size: 12px; color: var(--ok); }
.m-row.off .m-state { color: var(--danger); font-weight: 600; }

.ps-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ps-head .item-icon { width: 48px; height: 48px; font-size: 24px; }
.price-field { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; gap: 10px; align-items: center; margin-top: 6px; }
.pf-step { height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-3); transition: transform .12s, background-color .15s; }
.pf-step:active { transform: scale(.92); background: var(--line-strong); }
.pf-input {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 64px; padding: 0 14px; border-radius: 16px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); transition: box-shadow .15s;
}
.pf-input:focus-within { box-shadow: inset 0 0 0 1.5px var(--wood), var(--focus); }
.pf-input.invalid { box-shadow: inset 0 0 0 1.5px var(--danger); }
.pf-input input {
  width: 100%; min-width: 0; border: 0; outline: none; background: none; text-align: right; color: var(--ink);
  font-family: var(--font-display); font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.pf-input span { font-weight: 600; color: var(--muted); }
.pf-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 4px; }
.pf-hint { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.pf-hint .ico { color: var(--wood-ink); margin-top: 1px; }
.pf-hint.bad, .pf-hint.bad .ico { color: var(--danger); }

/* ---------- Avis ---------- */
.rv-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 18px; align-items: center; }
.rv-score { display: grid; justify-items: center; gap: 6px; padding-right: 18px; border-right: 1px solid var(--line); }
.rv-avg { font-family: var(--font-display); font-size: 46px; font-weight: 700; line-height: 1; }
.rv-dist { display: grid; gap: 7px; }
.rv-bar { display: grid; grid-template-columns: 10px minmax(0, 1fr) 22px; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.rv-bar em { font-style: normal; text-align: right; }
.rv-week { grid-column: 1 / -1; display: flex; gap: 6px; align-items: flex-start; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.rv-week .ico { color: var(--wood-strong); margin-top: 1px; }
.rv-list { display: grid; gap: 10px; }
.rv-card { padding: 14px 14px 12px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.rv-card.low { box-shadow: inset 3px 0 0 var(--warn), inset 0 0 0 1px var(--line); }
.rv-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rv-top time { font-size: 12px; color: var(--muted); }
.rv-text { margin: 9px 0; font-size: 15px; line-height: 1.5; -webkit-user-select: text; user-select: text; }
.rv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

/* ---------- Plus ---------- */
.profile { padding: 0; overflow: hidden; }
.profile-top {
  display: flex; align-items: center; gap: 16px; padding: 18px; border-bottom: 1px solid var(--line);
  background: radial-gradient(120% 120% at 0% 0%, rgba(200, 129, 74, .2), transparent 60%), #0E0C0B;
}
.profile-logo { font-size: 24px; color: #fff; }
.profile-id { display: grid; gap: 2px; margin-left: auto; text-align: right; min-width: 0; }
.profile-id strong { font-family: var(--font-display); font-size: 16px; }
.profile-id span { font-size: 12.5px; color: var(--muted); }
.rows { list-style: none; margin: 0; padding: 2px 16px; }
.rows li { display: grid; grid-template-columns: 20px auto minmax(0, 1fr); gap: 10px; align-items: center; padding: 12px 0; font-size: 14px; }
.rows li + li { border-top: 1px solid var(--line); }
.rows li .ico, .rows li > span { color: var(--muted); }
.rows b { font-weight: 600; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mode-ok { color: var(--ok); }
.mode-warn { color: var(--warn); }
.mode-danger { color: var(--danger); }

.settings { padding: 2px 0; }
.set-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 13px 16px; text-align: left; cursor: pointer; }
.set-row + .set-row { border-top: 1px solid var(--line); }
button.set-row:active { background: rgba(255, 255, 255, .03); }
.set-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--wood-soft); color: var(--wood-ink); }
.set-main { display: grid; gap: 2px; min-width: 0; }
.set-main strong { font-size: 14.5px; }
.set-main span { font-size: 12.5px; line-height: 1.35; color: var(--muted); }

.feat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.feat {
  position: relative; display: grid; align-content: start; gap: 5px; min-height: 140px; padding: 14px; border-radius: 18px; text-align: left; overflow: hidden;
  background: linear-gradient(160deg, #1e1c1a, #151210); box-shadow: inset 0 0 0 1px var(--line); transition: transform .14s ease, box-shadow .2s;
}
.feat::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 9px);
}
.feat:active { transform: scale(.97); }
.feat-ico { position: relative; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 6px; background: var(--wood-soft); color: var(--wood-ink); }
.feat-ico.lg { width: 50px; height: 50px; border-radius: 15px; flex: none; }
.feat-lock {
  position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px;
  border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--muted); background: rgba(255, 255, 255, .06);
}
.feat strong { position: relative; font-size: 13.5px; line-height: 1.3; }
.feat-sub { position: relative; font-size: 12px; line-height: 1.35; color: var(--muted); }
.logout { margin-top: 26px; }
.fs-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.fs-head h2 { margin-top: 6px; font-size: 19px; }
.fs-text { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.fs-points { list-style: none; margin: 16px 0 6px; padding: 0; display: grid; gap: 10px; }
.fs-points li { display: flex; gap: 10px; font-size: 14px; line-height: 1.4; }
.fs-points .ico { color: var(--ok); margin-top: 1px; }
.install-steps { margin: 14px 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.install-steps li { display: grid; gap: 3px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.install-steps span { font-size: 13.5px; color: var(--ink-2); }
.install-steps .ico { display: inline-block; vertical-align: -3px; color: var(--wood-ink); }

/* ---------- Connexion ---------- */
.login {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 20px;
  padding: calc(env(safe-area-inset-top, 0px) + 34px) 24px calc(env(safe-area-inset-bottom, 0px) + 20px); overflow-y: auto;
  background: radial-gradient(130% 60% at 50% -12%, #30261d 0%, #12100E 55%, #0E0C0B 100%);
}
.login-top { display: grid; justify-items: center; gap: 12px; }
.login-logo { font-size: 40px; color: #fff; }
.login-badge {
  padding: 5px 14px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase;
  color: var(--wood-ink); background: var(--wood-soft); box-shadow: inset 0 0 0 1px rgba(200, 129, 74, .3);
}
.login-mid { display: grid; gap: 6px; max-width: 340px; text-align: center; }
.login-title { font-size: 22px; }
.login-sub { font-size: 14px; color: var(--muted); }
.pin-dots { display: flex; justify-content: center; gap: 18px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-strong); transition: background-color .15s, box-shadow .15s, transform .18s cubic-bezier(.2, 1.4, .4, 1); }
.pin-dots span.on { background: var(--wood); box-shadow: none; transform: scale(1.12); }
.pin-dots.busy span { animation: dotPulse .7s ease-in-out infinite alternate; }
.pin-dots.busy span:nth-child(2) { animation-delay: .12s; }
.pin-dots.busy span:nth-child(3) { animation-delay: .24s; }
.pin-dots.busy span:nth-child(4) { animation-delay: .36s; }
.shake { animation: shake .42s ease; }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px 26px; }
.key {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
  font-family: var(--font-display); font-size: 28px; font-weight: 600; transition: background-color .15s, transform .12s;
}
.key:active { background: rgba(200, 129, 74, .38); transform: scale(.93); transition-duration: 0s; }
.key-ghost { background: none; box-shadow: none; color: var(--ink-2); }
.login-hint { font-size: 12.5px; color: var(--muted); }
.login-hint b { color: var(--ink-2); }
.refusal {
  display: flex; gap: 12px; padding: 14px; border-radius: 16px; text-align: left;
  background: var(--surface); box-shadow: inset 0 0 0 1px rgba(200, 129, 74, .3); animation: fiIn .35s cubic-bezier(.2, .8, .2, 1);
}
.refusal p { margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.refusal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.refusal-actions .btn { text-decoration: none; }
@media (max-height: 660px) {
  .login { padding-top: calc(env(safe-area-inset-top, 0px) + 18px); gap: 12px; }
  .login-logo { font-size: 32px; }
  .keypad { grid-template-columns: repeat(3, 64px); gap: 10px 24px; }
  .key { width: 64px; height: 64px; font-size: 24px; }
}

/* ---------- Squelette de premier chargement ---------- */
.skel-screen { position: fixed; inset: 0; margin: 0 auto; max-width: 560px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--bg); }
.skel {
  display: block; border-radius: 10px;
  background: linear-gradient(90deg, #1C1917 0%, #2D2825 45%, #1C1917 90%); background-size: 220% 100%; animation: shimmer 1.3s linear infinite;
}
.skel-top { display: flex; justify-content: space-between; align-items: center; padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 10px; }
.skel-logo { width: 96px; height: 22px; }
.skel-pill { width: 84px; height: 26px; border-radius: 999px; }
.skel-body { display: grid; align-content: start; gap: 12px; padding: 12px 16px; overflow: hidden; }
.skel-line { height: 12px; }
.w30 { width: 30%; } .w40 { width: 40%; } .w50 { width: 50%; } .w60 { width: 60%; } .w70 { width: 70%; }
.skel-title { width: 62%; height: 30px; margin-bottom: 6px; }
.skel-card { display: grid; gap: 12px; padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.skel-big { width: 70%; height: 40px; }
.skel-spark { height: 64px; }
.skel-strip { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.skel-strip .skel { height: 58px; border-radius: 14px; }
.skel-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.skel-row .skel-line { flex: none; }
.skel-dot { width: 38px; height: 38px; border-radius: 12px; flex: none; }
.skel-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; padding: 12px 22px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.skel-tabs .skel { height: 34px; border-radius: 12px; }

/* ---------- Toasts (en haut, pleine largeur, sous l'encoche) ---------- */
.owner #toasts { top: calc(env(safe-area-inset-top, 0px) + 10px); left: 12px; right: 12px; justify-items: center; }
.owner .toast {
  width: 100%; max-width: 440px; border-radius: 16px; line-height: 1.35;
  background: rgba(28, 25, 23, .97); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 16px 40px rgba(0, 0, 0, .55);
}
.owner .toast > span { flex: 1; min-width: 0; }
.owner .toast-ok { background: #1c5a39; }
.owner .toast-danger { background: #8e2b1c; }
.owner .toast-wood { background: var(--wood-grad); color: var(--on-wood); }
.owner .toast-wood .toast-action { background: rgba(0, 0, 0, .15); }

/* ---------- Connexion : messages (session expirée, blocage) ---------- */
.login-notice {
  display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; padding: 11px 13px; border-radius: 14px;
  font-size: 13.5px; line-height: 1.4; text-align: left; animation: fiIn .35s cubic-bezier(.2, .8, .2, 1);
}
.login-notice .ico { margin-top: 1px; }
.login-notice.warn { background: var(--warn-soft); color: #f3cc8f; box-shadow: inset 0 0 0 1px rgba(226, 166, 74, .35); }
.login-notice.danger { background: var(--danger-soft); color: #ffb9ab; box-shadow: inset 0 0 0 1px rgba(232, 102, 79, .4); }
.login-notice b { color: #fff; }
.keypad.locked { opacity: .32; pointer-events: none; filter: grayscale(.6); transition: opacity .25s; }

/* ---------- Accueil : en-tête avec bouton « Rapport » ---------- */
.ph-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ph-main { min-width: 0; }
.head-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px 0 12px; margin-bottom: 0;
  border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 13.5px; font-weight: 600; color: var(--ink); transition: transform .12s, background-color .15s;
}
.head-btn .ico { color: var(--wood-ink); }
.head-btn:active { transform: scale(.95); background: var(--surface-3); }

/* ---------- Accueil : alertes ---------- */
.alerts { margin-bottom: 14px; }
.alerts:empty { display: none; }
.al-head { display: flex; align-items: center; gap: 8px; margin: 2px 2px 9px; }
.al-head h2 { font-size: 18px; }
.al-count {
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center;
  background: #e8664f; color: #fff; font-size: 12px; font-weight: 700;
}
.al-restore { margin-left: auto; min-height: 32px; padding: 0 2px; font-size: 12.5px; font-weight: 500; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.al-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.al {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 8px; align-items: center;
  padding: 10px 6px 10px 10px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
}
.al-danger { background: linear-gradient(90deg, rgba(232, 102, 79, .11), transparent 75%), var(--surface); box-shadow: inset 3px 0 0 var(--danger), inset 0 0 0 1px rgba(232, 102, 79, .28); }
.al-warn { background: linear-gradient(90deg, rgba(226, 166, 74, .1), transparent 75%), var(--surface); box-shadow: inset 3px 0 0 var(--warn), inset 0 0 0 1px rgba(226, 166, 74, .26); }
.al-info { box-shadow: inset 3px 0 0 var(--line-strong), inset 0 0 0 1px var(--line); }
.al.is-new { animation: fiIn .45s cubic-bezier(.2, .8, .2, 1); }
.al-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); }
.al-danger .al-ico { background: var(--danger-soft); color: var(--danger); }
.al-warn .al-ico { background: var(--warn-soft); color: var(--warn); }
.al-main { display: grid; gap: 2px; min-width: 0; }
.al-main strong { font-size: 13.5px; line-height: 1.3; }
.al-main span { font-size: 12px; line-height: 1.35; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.al-act { height: 34px; padding: 0 11px; border-radius: 10px; background: var(--surface-3); color: var(--ink); font-size: 12.5px; font-weight: 700; transition: transform .12s; }
.al-act:active { transform: scale(.94); }
.al-x { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.al-x:active { background: var(--surface-3); }
.al-more { width: 100%; height: 38px; margin-top: 8px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.al-ok {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 9px 12px; border-radius: 14px;
  background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 600;
}
.al-ok .al-restore { color: var(--ok); opacity: .85; min-height: 24px; }

/* ---------- Accueil : salle en direct ---------- */
.floor { padding: 0; overflow: hidden; }
.floor-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 14px 14px 16px; text-align: left; }
.fh-ico { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--wood-soft); color: var(--wood-ink); }
.floor-sum { margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.fh-chev { color: var(--muted); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.floor-head[aria-expanded="true"] .fh-chev { transform: rotate(90deg); }
.floor-body { padding: 0 12px 12px; }
.floor-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 0 4px 12px; font-size: 11.5px; color: var(--muted); }
.floor-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.floor-legend i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.floor-legend b { color: var(--ink-2); font-weight: 700; }
.lg-free i { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.lg-new i { background: var(--warn); }
.lg-preparing i { background: var(--wood); }
.lg-ready i { background: var(--ok); }
.lg-bill i { background: #7fa8d6; }
.zone + .zone { margin-top: 12px; }
.zone-head { display: flex; justify-content: space-between; gap: 8px; padding: 0 4px 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.zone-head em { font-style: normal; font-weight: 500; color: var(--muted); }
.zone-plan {
  position: relative; border-radius: 14px;
  background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .05) 1px, transparent 1.5px) 0 0 / 14px 14px, #141110;
  box-shadow: inset 0 0 0 1px var(--line);
}
.tb {
  position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; align-content: center;
  width: 46px; height: 46px; border-radius: 50%; color: var(--muted); background: var(--surface-2);
  box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: background-color .3s, box-shadow .3s, color .3s, transform .12s;
}
.tb-rect { width: 54px; height: 42px; border-radius: 12px; }
.tb:active { transform: translate(-50%, -50%) scale(.92); }
.tb b { font-family: var(--font-display); font-size: 15px; line-height: 1.05; color: inherit; }
.tb-amt { font-size: 9.5px; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.tb-time {
  position: absolute; top: -8px; right: -9px; height: 17px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center;
  font-size: 9.5px; font-style: normal; font-weight: 700; color: var(--ink); background: #0E0C0B; box-shadow: 0 0 0 1px var(--line-strong);
}
.s-free { box-shadow: none; outline: 1.5px dashed var(--line-strong); outline-offset: -1.5px; }
.s-new { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1.5px rgba(226, 166, 74, .75); animation: tablePulse 1.8s ease-out infinite; }
.s-preparing { background: var(--wood-soft); color: var(--wood-ink); box-shadow: inset 0 0 0 1.5px rgba(200, 129, 74, .65); }
.s-ready { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1.5px rgba(86, 183, 131, .7); }
.s-bill { background: rgba(127, 168, 214, .14); color: #a5c6ea; box-shadow: inset 0 0 0 1.5px rgba(127, 168, 214, .6); }
.floor-foot { display: flex; align-items: flex-start; gap: 6px; margin: 10px 4px 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.floor-foot .ico { margin-top: 1px; flex: none; }
.st-bill { background: rgba(127, 168, 214, .14); color: #a5c6ea; }

/* Feuille d'une table */
.ts-badge {
  position: relative; width: 48px; height: 48px; border-radius: 14px; flex: none; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--muted); background: var(--surface-2);
}
.ts-badge.s-free { box-shadow: none; outline: 1.5px dashed var(--line-strong); outline-offset: -1.5px; }
.ts-badge.s-new { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1.5px rgba(226, 166, 74, .75); animation: none; }
.ts-badge.s-preparing { background: var(--wood-soft); color: var(--wood-ink); box-shadow: inset 0 0 0 1.5px rgba(200, 129, 74, .65); }
.ts-badge.s-ready { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1.5px rgba(86, 183, 131, .7); }
.ts-badge.s-bill { background: rgba(127, 168, 214, .14); color: #a5c6ea; box-shadow: inset 0 0 0 1.5px rgba(127, 168, 214, .6); }
.ts-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.ts-sum div { display: grid; gap: 2px; padding: 10px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.ts-sum span { font-size: 11px; color: var(--muted); }
.ts-sum b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-row .svc-main strong { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.ts-row .svc-items em { font-style: normal; opacity: .8; }
.ts-note { display: inline-flex; align-items: flex-start; gap: 5px; margin-top: 3px; font-size: 12px; color: var(--warn); }
.ts-note .ico { margin-top: 1px; flex: none; }
.ts-row + .ts-row { border-top: 1px solid var(--line); }
.ts-last { text-align: center; font-size: 13px; color: var(--muted); margin-top: -6px; }

/* ---------- Rapport du jour ---------- */
.rp { display: grid; gap: 12px; }
.rp-hero {
  display: grid; gap: 4px; padding: 14px; border-radius: 16px;
  background: radial-gradient(120% 100% at 100% 0%, rgba(200, 129, 74, .2), transparent 60%), var(--surface-2); box-shadow: inset 0 0 0 1px rgba(200, 129, 74, .22);
}
.rp-hero > span { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.rp-hero > b { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1.1; }
.rp-hero p { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--muted); }
.rp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rp-tile { display: grid; gap: 2px; padding: 11px 12px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.rp-tile span { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.rp-tile b { font-family: var(--font-display); font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-tile b small { font-size: 12px; color: var(--muted); }
.rp-tile em { font-style: normal; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-h { font-family: var(--font); font-size: 14px; font-weight: 700; margin: 6px 2px -2px; }
.rp-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rp-top li { display: grid; grid-template-columns: 14px 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rp-top .item-icon { width: 38px; height: 38px; font-size: 20px; border-radius: 11px; }
.rp-top-name { display: grid; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-top-name em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); }
.rp-top b { font-size: 14px; white-space: nowrap; }
.rp-paybar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; background: rgba(255, 255, 255, .06); }
.rp-paybar i { display: block; height: 100%; min-width: 3px; }
.rp-paylegend { display: grid; gap: 6px; }
.rp-paylegend span { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.rp-paylegend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.rp-paylegend em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--muted); }
.rp-paybar .pb-cash, .rp-paylegend .pb-cash i { background: var(--wood); }
.rp-paybar .pb-card, .rp-paylegend .pb-card i { background: #7fa8d6; }
.rp-paybar .pb-mobile, .rp-paylegend .pb-mobile i { background: var(--ok); }
.rp-preview { border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.rp-preview summary { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2); list-style: none; }
.rp-preview summary::-webkit-details-marker { display: none; }
.rp-preview summary .ico { color: #45c26f; }
.rp-preview pre {
  margin: 0; padding: 0 14px 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font); font-size: 12.5px; line-height: 1.5; color: var(--ink-2);
  -webkit-user-select: text; user-select: text;
}
.rp-foot { flex-direction: column; gap: 8px; }
.rp-more { display: flex; gap: 8px; }
.rp-more .btn { flex: 1; min-width: 0; }
.btn-wa { background: #1f9e55; color: #fff; text-decoration: none; box-shadow: 0 6px 18px rgba(31, 158, 85, .28); }
.btn-wa:active { filter: brightness(.95); }
.set-val { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }

/* ---------- Cibles tactiles (44 px minimum) ---------- */
.owner-sheet .icon-btn { width: 44px; height: 44px; flex: none; }
.seg button { height: 40px; }
.chips { margin: 5px -16px -5px; padding: 5px 16px; }
.chip { position: relative; }
.chip::after { content: ''; position: absolute; inset: -5px -2px; }
.chips-wrap { row-gap: 10px; padding: 5px 0; margin: -5px 0 7px; }
.al-act { height: 44px; }
.al-x { width: 44px; height: 44px; }
.al-restore { min-height: 44px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin: -12px -6px -12px 0; padding: 0 6px;
  font-size: 13px; font-weight: 600; color: var(--wood-ink); white-space: nowrap;
}
.av-xs { width: 22px; height: 22px; font-size: 11px; background: var(--surface-3); color: var(--ink); }

/* ---------- Accueil : ligne « Service en cours » (depuis la dernière clôture) ---------- */
.shift {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; margin-top: 14px; padding: 8px 8px 8px 9px; border-radius: 15px; text-align: left;
  background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); transition: transform .12s ease, background-color .2s;
}
.shift:active { transform: scale(.985); background: rgba(255, 255, 255, .06); }
.shift-ico { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--wood-soft); color: var(--wood-ink); }
.shift-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.shift-line { font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.shift-line b { color: var(--ink); font-weight: 700; white-space: nowrap; }
.shift-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.shift-chev { color: var(--muted); }
/* Caisse fermée (aucun service ouvert) : ton ambre */
.shift.closed { background: linear-gradient(90deg, rgba(226, 166, 74, .12), transparent 80%), rgba(255, 255, 255, .02); box-shadow: inset 0 0 0 1px rgba(226, 166, 74, .32); }
.shift.closed .shift-ico { background: var(--warn-soft); color: var(--warn); }
.shift.closed .shift-line b:first-child { color: var(--warn); }

/* ---------- Clôtures de caisse ---------- */
.zb {
  display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 999px; flex: none;
  font-size: 11.5px; font-weight: 700; white-space: nowrap; vertical-align: 1px;
}
.zb .ico { flex: none; }
.zb-ok { background: var(--ok-soft); color: var(--ok); }
.zb-warn { background: var(--warn-soft); color: var(--warn); }
.zb-danger { background: var(--danger-soft); color: var(--danger); }
.shift-sub .zb { height: 18px; padding: 0 6px; font-size: 10.5px; }
.fi-sub .zb { height: 18px; padding: 0 6px; margin-left: 4px; font-size: 11px; }

.fi { position: relative; }
.fi-hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.fi-hit:active { background: rgba(255, 255, 255, .03); }
.fi-hit:focus-visible { box-shadow: inset 0 0 0 2px var(--wood); }
.fi-danger { background: var(--danger-soft); color: var(--danger); }

.z-badge { width: 48px; height: 48px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--wood-soft); color: var(--wood-ink); }
.z-badge.sm { width: 40px; height: 40px; border-radius: 12px; }
.z-no {
  width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; align-content: center; gap: 0;
  background: var(--surface-3); color: var(--ink); line-height: 1;
}
.z-no small { font-size: 9.5px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
.z-no b { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.z-no.lg { width: 48px; height: 48px; border-radius: 14px; background: var(--wood-soft); }
.z-no.lg small { color: var(--wood-ink); }
.z-h { display: flex; justify-content: space-between; margin-top: 18px; margin-bottom: 8px; }

.z-shift {
  display: grid; gap: 10px; margin-bottom: 12px; padding: 12px; border-radius: 16px;
  background: radial-gradient(120% 100% at 100% 0%, rgba(200, 129, 74, .14), transparent 60%), var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
}
.z-shift-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.z-shift-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.z-shift-grid div { display: grid; gap: 1px; min-width: 0; padding: 8px 10px; border-radius: 11px; background: rgba(0, 0, 0, .18); }
.z-shift-grid span { font-size: 11px; color: var(--muted); }
.z-shift-grid b { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.z-shift-foot { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; line-height: 1.4; color: var(--muted); }
.z-shift-foot .ico { margin-top: 1px; color: var(--wood-ink); }
.z-shift-foot b { color: var(--ink-2); }

.z-list { list-style: none; margin: 0; padding: 0; border-radius: 16px; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.z-list li + li { border-top: 1px solid var(--line); }
.z-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 11px; align-items: center; width: 100%; min-height: 64px; padding: 10px 12px; text-align: left; }
.z-row:active { background: rgba(255, 255, 255, .03); }
.z-row:focus-visible { box-shadow: inset 0 0 0 2px var(--wood); }
.z-main { display: grid; gap: 2px; min-width: 0; }
.z-main strong { font-size: 14px; line-height: 1.3; }
.z-main span { font-size: 12px; line-height: 1.35; color: var(--muted); }
.z-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
.z-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; }
.z-ok { background: var(--ok-soft); color: var(--ok); }
.z-warn { background: var(--warn-soft); color: var(--warn); }
.z-danger { background: var(--danger-soft); color: var(--danger); }
.z-shift.closed { background: linear-gradient(90deg, rgba(226, 166, 74, .1), transparent 80%), var(--surface-2); box-shadow: inset 0 0 0 1px rgba(226, 166, 74, .3); }
.z-shift.closed .live-chip { gap: 5px; color: var(--warn); background: var(--warn-soft); }
.z-shift.closed .z-shift-foot b { color: var(--warn); }
.zd-rows dt b { color: var(--ink); font-weight: 600; }
.z-side { display: grid; justify-items: end; gap: 4px; }
.z-side b { font-size: 14px; white-space: nowrap; }

.zd { display: grid; gap: 10px; }
.zd-hero { display: grid; gap: 3px; padding: 14px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.zd-hero > span { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.zd-hero > b { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1.1; }
.zd-hero p { font-size: 12.5px; color: var(--muted); }
.zd-hero p b { color: var(--ink-2); white-space: nowrap; }
.zd-ok { background: linear-gradient(90deg, rgba(86, 183, 131, .14), transparent 80%), var(--surface-2); box-shadow: inset 0 0 0 1px rgba(86, 183, 131, .3); }
.zd-ok > span, .zd-ok > b { color: var(--ok); }
.zd-warn { background: linear-gradient(90deg, rgba(226, 166, 74, .14), transparent 80%), var(--surface-2); box-shadow: inset 0 0 0 1px rgba(226, 166, 74, .3); }
.zd-warn > span, .zd-warn > b { color: var(--warn); }
.zd-danger { background: linear-gradient(90deg, rgba(232, 102, 79, .15), transparent 80%), var(--surface-2); box-shadow: inset 0 0 0 1px rgba(232, 102, 79, .32); }
.zd-danger > span, .zd-danger > b { color: var(--danger); }
.zd-rows { margin: 0; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.zd-rows div { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 42px; padding: 8px 12px; font-size: 13.5px; }
.zd-rows div + div { border-top: 1px solid var(--line); }
.zd-rows dt { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink-2); }
.zd-rows dt .ico { color: var(--muted); }
.zd-rows dd { margin: 0; font-weight: 600; white-space: nowrap; text-align: right; }
.zd-rows .strong dt { color: var(--ink); font-weight: 600; }
.zd-rows .strong dd { font-weight: 700; }
.zc { width: 100%; border-collapse: collapse; border-radius: 14px; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; }
.zc td, .zc th { padding: 8px 12px; }
.zc td:nth-child(2) { color: var(--muted); text-align: center; white-space: nowrap; }
.zc td:last-child { text-align: right; font-weight: 600; white-space: nowrap; }
.zc tbody tr + tr td { border-top: 1px solid var(--line); }
.zc-k th { padding-top: 10px; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.zc tfoot td { border-top: 1px solid var(--line-strong); font-weight: 700; color: var(--ink); }
.zd-note, .zd-open { display: flex; gap: 8px; align-items: flex-start; padding: 11px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
.zd-note { background: var(--warn-soft); color: #f3cc8f; }
.zd-open { background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.zd-note .ico, .zd-open .ico { margin-top: 2px; flex: none; }

.rp-z { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.rp-z-main { display: grid; gap: 1px; min-width: 0; flex: 1; }
.rp-z-main span { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.rp-z-main strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-z-main em { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Menu : actions, lignes, mode « Organiser », bouton flottant ---------- */
.m-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: -4px 0 4px; }
.m-act {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 12px; border-radius: 12px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 14px; font-weight: 600; transition: transform .12s, background-color .15s;
}
.m-act .ico { color: var(--wood-ink); }
.m-act:active { transform: scale(.97); }
.m-act.on { background: var(--ink); color: var(--bg); box-shadow: none; }
.m-act.on .ico { color: inherit; }
.live-note:empty { display: none; }

.m-row { position: relative; }
.m-hit { position: absolute; inset: 0; z-index: 0; }
.m-hit:active { background: rgba(255, 255, 255, .035); }
.m-hit:focus-visible { box-shadow: inset 0 0 0 2px var(--wood); }
.m-row > .item-icon, .m-row > .m-main { position: relative; pointer-events: none; }
.m-row .m-price { position: relative; z-index: 1; pointer-events: auto; }
.m-price::after { content: ''; position: absolute; inset: -8px -4px; }
.m-row .switch { z-index: 1; }
.m-row .switch::before { content: ''; position: absolute; inset: -8px -6px; }
.m-row.flash { animation: rowFlash 1.6s ease; }
.m-row.org { grid-template-columns: 44px minmax(0, 1fr) auto; }
.m-pos { font-size: 12px; color: var(--muted); }
.m-moves { display: flex; gap: 6px; }
.sq {
  width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--surface-3); color: var(--ink); transition: transform .12s, background-color .15s, opacity .15s;
}
.sq:active:not(:disabled) { transform: scale(.92); background: var(--line-strong); }
.sq:disabled { opacity: .28; }
.sq-danger { color: var(--danger); background: var(--danger-soft); }
.m-empty {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 16px;
  font-size: 13px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); outline: 1px dashed var(--line-strong); outline-offset: -1px;
}
.m-empty .btn { min-height: 44px; }

.fab-wrap { position: sticky; bottom: 14px; z-index: 4; display: flex; justify-content: flex-end; margin-top: 8px; pointer-events: none; }
.fab {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; height: 54px; padding: 0 20px 0 16px; border-radius: 999px;
  background: var(--wood-grad); color: var(--on-wood); font-size: 15px; font-weight: 700; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 12px 30px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .2); transition: transform .12s;
}
.fab:active { transform: scale(.95); }

/* ---------- Fiche article (création / modification) ---------- */
.ed { display: grid; gap: 18px; padding-bottom: 8px; }
.ed-sec { display: grid; gap: 10px; min-width: 0; }
.ed-h { font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 2px; }
.ed-field { display: grid; gap: 6px; min-width: 0; }
.ed-field > span { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ed-field > span em { font-style: normal; font-weight: 500; color: var(--muted); }
.ed-input {
  width: 100%; min-width: 0; min-height: 48px; padding: 11px 13px; border-radius: 12px; border: 0; outline: none; color: var(--ink);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 16px; transition: box-shadow .15s;
}
.ed-input:focus { box-shadow: inset 0 0 0 1.5px var(--wood), var(--focus); }
.ed-input::placeholder { color: var(--muted); }
textarea.ed-input { resize: none; line-height: 1.4; min-height: 70px; }
.ed-select { position: relative; display: block; }
.ed-select select { -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer; }
.ed-select .ico { position: absolute; right: 14px; top: 50%; transform: translateY(-50%) rotate(90deg); color: var(--muted); pointer-events: none; }
.ed-select option { background: #231F1C; color: var(--ink); }
.ed-err { display: flex; align-items: center; gap: 6px; margin-top: -4px; font-size: 12.5px; font-weight: 600; color: var(--danger); }
.ed-hint { font-size: 12px; color: var(--muted); margin: -2px 2px 0; }
.ed-inline { grid-template-columns: minmax(0, 1fr) 96px; align-items: center; }
.ed-emoji { text-align: center; font-size: 22px; padding: 6px; }
.ed-tag-in { margin-top: -2px; }
.ed .price-field { margin-top: 0; }
.ed .pf-input { height: 56px; }
.ed .pf-input input { font-size: 24px; }

.emoji-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; max-height: 204px; overflow-y: auto;
  padding: 6px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overscroll-behavior: contain;
}
.emo { height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 23px; line-height: 1; transition: transform .1s, background-color .15s; }
.emo:active { transform: scale(.88); }
.emo.on { background: var(--wood-soft); box-shadow: inset 0 0 0 1.5px var(--wood); }

.tchips { display: flex; flex-wrap: wrap; gap: 8px; }
.tchip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 15px; border-radius: 999px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: background-color .15s, color .15s, transform .1s;
}
.tchip:active { transform: scale(.95); }
.tchip.on { background: var(--wood-soft); color: var(--wood-ink); box-shadow: inset 0 0 0 1.5px var(--wood); }
#ed-alg .tchip.on { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1.5px rgba(226, 166, 74, .7); }

.ed-list { border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.ed-sec > .ed-row { border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.ed-row, .ed-check { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 12px 10px 14px; cursor: pointer; }
.ed-list > * + * { border-top: 1px solid var(--line); }
.ed-row-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.ed-row-main strong { font-size: 14.5px; }
.ed-row-main strong em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--muted); margin-left: 4px; }
.ed-row-main span { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.ed-row.locked { cursor: default; }
.ed-row.locked .switch { opacity: .55; }
.ed-computed { cursor: default; }
.ed-check { position: relative; }
.ed-check input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ed-box {
  order: -1; width: 24px; height: 24px; border-radius: 7px; flex: none; display: grid; place-items: center; color: transparent;
  box-shadow: inset 0 0 0 2px var(--line-strong); transition: background-color .15s, box-shadow .15s, color .15s;
}
.ed-check input:checked + .ed-box { background: var(--wood); color: var(--on-wood); box-shadow: none; }
.ed-check input:focus-visible + .ed-box { box-shadow: inset 0 0 0 2px var(--wood), var(--focus); }
.ed-step { display: inline-flex; align-items: center; gap: 2px; flex: none; padding: 2px; border-radius: 13px; background: var(--surface-3); }
.ed-step button { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; }
.ed-step button:active { background: var(--line-strong); }
.ed-step output { min-width: 56px; text-align: center; font-weight: 700; font-size: 14px; }
.ed-conflict { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.4; background: var(--warn-soft); color: #f3cc8f; }
.ed-conflict .ico { margin-top: 1px; flex: none; }
.ed-danger { padding-top: 4px; }
.ed-confirm { display: grid; gap: 6px; padding: 14px; border-radius: 16px; background: var(--danger-soft); box-shadow: inset 0 0 0 1px rgba(232, 102, 79, .35); animation: fiIn .3s cubic-bezier(.2, .8, .2, 1); }
.ed-confirm strong { font-size: 15px; }
.ed-confirm p { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.ed-confirm-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ed-confirm-acts .btn { flex: 1; min-width: 120px; }
.btn-danger { background: #c94a35; color: #fff; }
.btn-danger:active:not(:disabled) { filter: brightness(.92); }

/* Aperçu de la carte client (fond clair, comme sur le menu QR) */
.pv-card {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: 18px;
  background: #fff; color: #141110; box-shadow: 0 1px 2px rgba(20, 16, 12, .1), 0 10px 26px rgba(0, 0, 0, .3);
}
.pv-ico { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; font-size: 32px; line-height: 1; background: #f1e8de; overflow: hidden; }
.pv-main { display: grid; gap: 4px; min-width: 0; align-content: start; }
.pv-main h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-family: var(--font-display); font-size: 15px; font-weight: 700; line-height: 1.25; }
.pv-main h4 > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.pv-main i { font-style: normal; color: #a29d96; font-weight: 500; }
.pv-main p { font-size: 12.5px; line-height: 1.4; color: #6c6862; overflow-wrap: anywhere; }
.pv-tag { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 999px; font-family: var(--font); font-size: 11px; font-weight: 700; background: #f4ebe1; color: #7b4d26; white-space: nowrap; }
.pv-pop { background: #fbefd9; color: #9a6512; }
.pv-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.pv-foot b { font-size: 14.5px; font-weight: 700; }
.pv-marks { font-size: 11px; font-weight: 600; color: #2c7d50; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-add { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #141110; color: #fff; }
.pv-out { margin-left: auto; height: 22px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; background: #fbe5df; color: #bb3a26; }
.pv-card.is-out .pv-ico { filter: grayscale(1); opacity: .5; }
.pv-meta { display: flex; gap: 6px; align-items: flex-start; margin: 2px 4px 0; font-size: 12px; line-height: 1.4; color: var(--muted); }
.pv-meta .ico { margin-top: 2px; flex: none; }

/* ---------- Catégories ---------- */
.cat-editor { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.ce-title { font-family: var(--font); font-size: 14px; font-weight: 700; }
.ce-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; }
.ce-ico { height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 26px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-strong); }
.ce-ico[aria-expanded="true"] { box-shadow: inset 0 0 0 1.5px var(--wood); }
.ce-row .ed-input { min-height: 52px; background: var(--surface); }
.ce-picker { display: grid; gap: 8px; }
.ce-picker .emoji-grid { max-height: 156px; background: var(--surface); }
.ce-picker .ed-input { background: var(--surface); }
.ce-acts { display: flex; gap: 8px; }
.ce-acts .btn { min-height: 48px; }
.cat-list { list-style: none; margin: 0; padding: 0; border-radius: 16px; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.cat-list > li + li { border-top: 1px solid var(--line); }
.cat-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 8px 8px 12px; }
.cat-row.on { background: var(--wood-soft); }
.cat-ico { font-size: 24px; text-align: center; line-height: 1; }
.cat-main { display: grid; gap: 1px; min-width: 0; min-height: 44px; align-content: center; text-align: left; }
.cat-main strong { font-size: 14.5px; line-height: 1.25; overflow-wrap: anywhere; }
.cat-main span { font-size: 12px; color: var(--muted); }
.cat-acts { display: flex; gap: 4px; }
.cat-ask { display: flex; gap: 10px; padding: 12px; background: var(--danger-soft); }
.cat-ask.warn { background: var(--warn-soft); }
.cat-ask > .ico { margin-top: 2px; flex: none; color: var(--danger); }
.cat-ask.warn > .ico { color: var(--warn); }
.cat-ask div { display: grid; gap: 4px; min-width: 0; flex: 1; }
.cat-ask strong { font-size: 14px; }
.cat-ask p { font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.cat-none { list-style: none; }

@media (max-width: 374px) {
  .cat-row { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 6px; padding-left: 8px; }
  .cat-acts { gap: 2px; }
  .z-row { gap: 9px; padding: 10px; }
}

@keyframes rowFlash { 0%, 35% { background-color: rgba(200, 129, 74, .22); } 100% { background-color: transparent; } }

/* ---------- Animations ---------- */
@keyframes tablePulse { 0% { box-shadow: inset 0 0 0 1.5px rgba(226, 166, 74, .75), 0 0 0 0 rgba(226, 166, 74, .45); } 80%, 100% { box-shadow: inset 0 0 0 1.5px rgba(226, 166, 74, .75), 0 0 0 9px rgba(226, 166, 74, 0); } }
@keyframes viewIn { from { opacity: 0; transform: translateX(var(--dx, 0)); } to { opacity: 1; transform: none; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 currentColor; } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }
.conn-ok i, .pulse-dot { color: rgba(86, 183, 131, .55); }
@keyframes ripple { 0% { opacity: .7; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.8); } }
@keyframes ringPulse { 0% { box-shadow: 0 0 0 0 rgba(226, 166, 74, .45); } 80%, 100% { box-shadow: 0 0 0 8px rgba(226, 166, 74, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
@keyframes fiIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
@keyframes fiGlow {
  0%, 45% { box-shadow: inset 0 0 0 1px rgba(200, 129, 74, .7), 0 0 0 3px rgba(200, 129, 74, .14); }
  100% { box-shadow: inset 0 0 0 1px var(--line), 0 0 0 3px rgba(200, 129, 74, 0); }
}
@keyframes glow {
  0% { color: var(--ink); text-shadow: none; }
  18% { color: #f3cfa7; text-shadow: 0 0 26px rgba(200, 129, 74, .6); }
  100% { color: var(--ink); text-shadow: none; }
}
@keyframes plusIn {
  0% { opacity: 0; transform: translateY(8px) scale(.9); }
  10% { opacity: 1; transform: none; }
  80% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-8px); }
}
@keyframes chipHide { 0% { opacity: 1; } 8%, 82% { opacity: 0; } 100% { opacity: 1; } }
@keyframes barGrow { from { transform: scaleY(0); } }
@keyframes dotPulse { from { opacity: .35; transform: scale(.85); } to { opacity: 1; transform: scale(1.12); } }
@keyframes bannerIn { from { opacity: 0; transform: translateY(-100%); } }

@media (prefers-reduced-motion: reduce) {
  .view.enter, .fi.is-new, .chart.grow .bar, .skel, .s-new, .al.is-new, .al-count,
  .login-notice, .m-row.flash { animation: none !important; }
}

/* =====================================================================
   v2 « Torréfaction » — couche premium (Apple : matières, typo ; Spotify : aplats, stories, mouvement).
   Placée en fin de fichier : elle affine les blocs ci-dessus sans changer le HTML attendu par owner.js.
   ===================================================================== */

/* Alias « bois » recalculés sur le thème sombre (dans base.css ils sont figés sur les valeurs claires de :root). */
body.owner {
  --wood: var(--accent); --wood-soft: var(--accent-soft); --wood-ink: var(--accent-ink);
  --wood-grad: var(--accent-grad); --on-wood: var(--on-accent);
  --card-bg: linear-gradient(180deg, #201C19 0%, #1A1715 100%);
  --card-edge: inset 0 0 0 1px rgba(255, 255, 255, .055), inset 0 1px 0 rgba(255, 255, 255, .05);
  --copper-sheen: linear-gradient(135deg, #EDB27A 0%, #D08A51 34%, #B06A36 68%, #7E461F 100%);
  --tabbar-h: 66px;
  background: var(--espresso);
}

/* ---------- Coque ---------- */
.shell {
  background:
    radial-gradient(90% 38% at 85% -6%, rgba(200, 129, 74, .16), transparent 70%),
    radial-gradient(70% 30% at 0% 0%, rgba(233, 201, 163, .05), transparent 70%),
    var(--espresso);
}
.topbar {
  background: rgba(14, 12, 11, .62); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-bottom: 0; box-shadow: inset 0 -1px 0 transparent; transition: box-shadow var(--dur) ease, background-color var(--dur) ease;
}
.topbar.scrolled { box-shadow: inset 0 -1px 0 var(--glass-line); background: rgba(20, 17, 15, .72); }
.tb-title { font-size: 16px; font-weight: 650; letter-spacing: -.015em; }
.conn { height: 28px; padding: 0 11px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--glass-line); font-weight: 650; }
.conn-danger { background: var(--danger-soft); }
.avatar {
  width: 36px; height: 36px; font-size: 15px; background: var(--copper-sheen); color: #1A0F07;
  box-shadow: 0 0 0 2px var(--espresso), 0 0 0 3.5px rgba(200, 129, 74, .55), 0 6px 16px rgba(200, 129, 74, .25);
}

/* Barre d'onglets : capsule de verre flottante, le contenu défile dessous */
.tabbar {
  position: absolute; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right));
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); height: var(--tabbar-h); padding: 6px;
  border-radius: 26px; border-top: 0; background: rgba(32, 28, 25, .72);
  -webkit-backdrop-filter: saturate(180%) blur(26px); backdrop-filter: saturate(180%) blur(26px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 40px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .3);
}
.tab { position: relative; min-height: 0; padding: 0; gap: 2px; align-content: center; border-radius: 20px; font-size: 10.5px; font-weight: 600; letter-spacing: 0; }
.tab::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; background: rgba(255, 255, 255, .07);
  opacity: 0; transform: scale(.82); transition: opacity var(--dur) ease, transform var(--dur-slow) var(--ease-spring);
}
.tab.active::before { opacity: 1; transform: none; }
.tab-ico { width: auto; height: 28px; background: none !important; border-radius: 0; }
.tab.active { color: var(--ink); }
.tab.active .tab-ico { color: var(--crema); }
.tab.active .tab-ico .ico { filter: drop-shadow(0 0 10px rgba(200, 129, 74, .55)); }
.tab:active .tab-ico { transform: scale(.86); }
.tab-label { position: relative; }
.tab-badge { top: -2px; right: -10px; background: var(--danger); box-shadow: 0 0 0 2px #241F1C; }
.view { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 40px); }
.fab-wrap { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 22px); }
.skel-tabs { margin: 0 12px calc(env(safe-area-inset-bottom, 0px) + 10px); padding: 14px 18px; border-top: 0; border-radius: 26px; background: rgba(32, 28, 25, .72); }

/* ---------- Typographie des pages ---------- */
.page-head { padding: 18px 2px 18px; }
.owner .eyebrow { font-size: 11.5px; font-weight: 650; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); }
.large-title { font: 750 34px/1.05 var(--font-display); letter-spacing: -.035em; margin-top: 6px; }
.section-head { margin: 30px 4px 12px; }
.section-head h2, .group-title, .al-head h2 { font-size: 21px; font-weight: 700; letter-spacing: -.022em; }
.group-title { margin: 30px 4px 12px; }
.group-head { margin: 32px 4px 6px; }
.card-title { font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.head-btn {
  height: 42px; padding: 0 16px 0 13px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--glass-line), inset 0 1px 0 var(--glass-edge);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); font-weight: 650;
}
.head-btn .ico { color: var(--accent); }

/* ---------- Cartes ---------- */
.card { border-radius: var(--radius-lg); padding: 18px; margin-bottom: 14px; background: var(--card-bg); box-shadow: var(--card-edge), 0 14px 34px rgba(0, 0, 0, .28); }
.empty .ico { color: var(--accent); }

/* ---------- Story « Caféino Wrapped » (entrée du cockpit) ---------- */
.story {
  position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  width: 100%; margin: 0 0 16px; padding: 26px 16px 16px; border-radius: var(--radius-lg); text-align: left; color: #1A0F07;
  background: var(--copper-sheen);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(255, 255, 255, .12), 0 18px 40px rgba(200, 129, 74, .22), 0 4px 14px rgba(0, 0, 0, .35);
  transition: transform var(--dur-fast) var(--ease-out);
}
.story::before {   /* reflet qui dérive lentement */
  content: ''; position: absolute; inset: -60% -30%; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 50% at 30% 40%, rgba(255, 236, 214, .55), transparent 70%), radial-gradient(35% 45% at 80% 70%, rgba(60, 28, 10, .35), transparent 70%);
  animation: storyDrift 9s var(--ease-in-out) infinite alternate;
}
.story::after {    /* grain de torréfaction très léger */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .18; mix-blend-mode: overlay;
  background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .9) .6px, transparent 1px) 0 0 / 5px 5px;
}
.story:active { transform: scale(.975); }
.story-bars { position: absolute; top: 11px; left: 16px; right: 16px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.story-bars i { height: 3px; border-radius: 3px; background: rgba(26, 15, 7, .2); overflow: hidden; }
.story-bars i:first-child { background: linear-gradient(90deg, rgba(26, 15, 7, .75) 0 62%, rgba(26, 15, 7, .2) 62%); }
.story-ring {
  position: relative; width: 56px; height: 56px; border-radius: 50%; padding: 3px; flex: none;
  background: conic-gradient(from 210deg, #FFF3E3, #1A0F07 30%, #FFF3E3 55%, #F6D3A9 80%, #FFF3E3);
}
.story-ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(255, 243, 227, .6); animation: storyPing 2.6s var(--ease-out) infinite; }
.story-face {
  width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font-size: 25px; line-height: 1;
  background: radial-gradient(circle at 35% 30%, #3A2A1E, var(--espresso) 70%); box-shadow: 0 0 0 2.5px #D08A51; color: var(--crema);
}
.story-main { display: grid; gap: 1px; min-width: 0; }
.story-k { font-size: 10.5px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; opacity: .72; }
.story-main strong { font: 750 19px/1.15 var(--font-display); letter-spacing: -.025em; }
.story-sub { font-size: 12.5px; font-weight: 550; opacity: .74; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-play {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; padding-left: 3px;
  background: var(--espresso); color: var(--crema); box-shadow: 0 8px 18px rgba(26, 15, 7, .38), inset 0 1px 0 rgba(255, 255, 255, .1);
  transition: transform var(--dur) var(--ease-spring);
}
.story:hover .story-play { transform: scale(1.06); }
@keyframes storyDrift { from { transform: translate3d(-6%, -4%, 0) rotate(-4deg); } to { transform: translate3d(8%, 6%, 0) rotate(5deg); } }
@keyframes storyPing { 0% { box-shadow: 0 0 0 0 rgba(255, 243, 227, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(255, 243, 227, 0); } }

/* Bouton « Revoir en story » (détail d'une clôture) */
.story-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 14px 10px 10px; border-radius: 20px; text-align: left; color: #1A0F07;
  background: var(--copper-sheen); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 10px 26px rgba(200, 129, 74, .2); transition: transform var(--dur-fast) var(--ease-out);
}
.story-btn:active { transform: scale(.975); }
.story-btn > span:nth-child(2) { display: grid; gap: 1px; flex: 1; min-width: 0; }
.story-btn strong { font: 700 16px/1.2 var(--font-display); letter-spacing: -.015em; }
.story-btn > span:nth-child(2) > span { font-size: 12.5px; font-weight: 550; opacity: .72; }
.story-ring.sm { width: 44px; height: 44px; padding: 2.5px; }
.story-ring.sm .story-face { padding-left: 2px; box-shadow: 0 0 0 2px #D08A51; }

/* ---------- Accueil : héros du CA ---------- */
.hero {
  padding: 20px 20px 16px; border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(200, 129, 74, .26), transparent 58%),
    radial-gradient(80% 60% at 0% 100%, rgba(233, 201, 163, .05), transparent 70%),
    linear-gradient(180deg, #231E1B, #171412);
  box-shadow: inset 0 0 0 1px rgba(200, 129, 74, .2), inset 0 1px 0 rgba(255, 236, 214, .08), 0 24px 50px rgba(0, 0, 0, .45);
}
.hero-label { font-size: 11.5px; font-weight: 650; letter-spacing: var(--track-caps); color: var(--muted); }
.live-chip { height: 26px; padding: 0 10px; font-weight: 650; }
.hero-value {
  display: flex; align-items: baseline; margin-top: 10px; font-family: var(--font-display); font-size: clamp(50px, 16.5vw, 66px);
  font-weight: 800; letter-spacing: -.05em; line-height: .95; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--milk);
}
.hero-value .amt-int { background: linear-gradient(180deg, #FFFFFF 10%, #F6F1EA 55%, #E9C9A3 130%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .02em; }
.hero-value .amt-dec { font-size: .4em; font-weight: 700; letter-spacing: -.02em; color: rgba(246, 241, 234, .48); }
.hero-value .amt-cur { margin-left: .22em; font-size: .34em; font-weight: 700; letter-spacing: .02em; color: var(--crema); }
.hero.flash .hero-value { animation: heroPop .9s var(--ease-spring); }
@keyframes heroPop { 0% { transform: none; } 30% { transform: scale(1.035); } 100% { transform: none; } }
.hero-delta { margin-top: 14px; }
.delta { height: 26px; padding: 0 10px; font-weight: 750; }
.shift { margin-top: 16px; border-radius: 18px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), inset 0 1px 0 rgba(255, 255, 255, .04); }
.shift-ico { border-radius: 30%; }
.spark { margin-top: 18px; }
.spark-box { height: 80px; }
.sp-t { stroke: var(--copper); stroke-width: 2.6; }
.sp-y { stroke: rgba(246, 241, 234, .22); }
.spark-dot { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--crema); box-shadow: 0 0 0 3px var(--copper), 0 0 16px rgba(200, 129, 74, .8); }
.spark-dot::after { border-color: var(--copper); }
.lg-t { border-top-color: var(--copper); }
.hero-meta { margin-top: 16px; padding-top: 14px; border-top-color: rgba(255, 255, 255, .06); }
.hero-meta b { font: 750 17px/1.2 var(--font-display); letter-spacing: -.02em; }

/* ---------- Accueil : service en cours ---------- */
.live { padding: 18px; }
.live-cell { padding: 12px 10px 10px; border-radius: 18px; background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .055); gap: 6px; }
.live-cell b { font-size: 28px; font-weight: 750; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.live-cell span { font-size: 11px; font-weight: 550; }
#lc-preparing.hot b { color: var(--crema); }
.live-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .06); }
.live-foot b { font: 750 16px/1 var(--font-display); letter-spacing: -.02em; }

/* ---------- Alertes ---------- */
.al-ok { min-height: 44px; padding: 10px 16px; border-radius: var(--radius-pill); background: var(--ok-soft); box-shadow: inset 0 0 0 1px rgba(95, 189, 136, .18); }
.al { border-radius: 20px; padding: 12px 6px 12px 12px; }
.al-ico, .fh-ico, .set-ico, .feat-ico, .mix-ico, .z-ico, .fi-ico, .shift-ico { border-radius: 30%; }
.al-count { background: var(--danger); }

/* ---------- Salle ---------- */
.zone-plan { border-radius: 18px; }
.s-preparing { color: var(--crema); }

/* ---------- Fil d'activité ---------- */
.feed { gap: 6px; }
.fi { padding: 12px 14px 12px 12px; border-radius: 20px; background: var(--card-bg); box-shadow: var(--card-edge); }
.fi-ico { width: 40px; height: 40px; }
.fi-amt { font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fi-star { background: var(--accent-soft); color: var(--crema); }
.fi-empty { border-radius: 20px; background: var(--card-bg); box-shadow: var(--card-edge); }

/* ---------- Ventes ---------- */
.seg { border-radius: var(--radius-pill); padding: 4px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--glass-line); }
.seg button { border-radius: var(--radius-pill); }
.seg-thumb { top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: var(--radius-pill); background: #3A3430; box-shadow: 0 2px 8px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .08); transition: transform var(--dur-slow) var(--ease-spring); }
.kpi { padding: 16px; border-radius: 22px; background: var(--card-bg); box-shadow: var(--card-edge); gap: 6px; }
.kpi:first-child { grid-column: 1 / -1; background: radial-gradient(120% 90% at 100% 0%, rgba(200, 129, 74, .22), transparent 60%), var(--card-bg); box-shadow: inset 0 0 0 1px rgba(200, 129, 74, .2), inset 0 1px 0 rgba(255, 236, 214, .06); }
.kpi:first-child .kpi-value { font-size: 42px; letter-spacing: -.045em; }
.kpi-label { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.kpi-label .ico { color: var(--accent); }
.kpi-value { font-size: 25px; font-weight: 750; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.ro-v { font-size: 30px; font-weight: 750; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.bar { border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #E0A06A 0%, #C8814A 45%, #8E5226 100%); box-shadow: inset 0 1px 0 rgba(255, 236, 214, .35); }
.bar-col.sel .bar { background: linear-gradient(180deg, #FFF3E3, var(--crema)); box-shadow: 0 0 18px rgba(233, 201, 163, .35); }
.chart.grow .bar { animation: barGrow .8s var(--ease-spring) both; }
.chart.grow .bar-col:nth-child(4n+1) .bar { animation-delay: .02s; }
.chart.grow .bar-col:nth-child(4n+2) .bar { animation-delay: .06s; }
.chart.grow .bar-col:nth-child(4n+3) .bar { animation-delay: .1s; }
.chart.grow .bar-col:nth-child(4n) .bar { animation-delay: .14s; }
.meter { height: 7px; background: rgba(255, 255, 255, .06); }
.meter i { background: linear-gradient(90deg, #8E5226, var(--copper) 60%, #E0A06A); }
.rank-row .item-icon { border-radius: 30%; }
.rank-no { font: 750 13px/1 var(--font-display); color: var(--crema); }

/* ---------- Clôtures et rapport ---------- */
.z-shift { border-radius: 20px; }
.z-list, .zd-rows, .zc, .rp-preview, .svc-list { border-radius: 18px; }
.zd-hero { padding: 18px; border-radius: var(--radius-lg); gap: 4px; }
.zd-hero > span { font-size: 11.5px; font-weight: 650; letter-spacing: var(--track-caps); }
.zd-hero > b { font-size: 46px; font-weight: 800; letter-spacing: -.045em; line-height: 1; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.zd-ok { background: radial-gradient(120% 100% at 100% 0%, rgba(95, 189, 136, .2), transparent 60%), var(--surface-2); }
.zd-warn { background: radial-gradient(120% 100% at 100% 0%, rgba(231, 172, 85, .2), transparent 60%), var(--surface-2); }
.zd-danger { background: radial-gradient(120% 100% at 100% 0%, rgba(239, 115, 91, .22), transparent 60%), var(--surface-2); }
.z-no.lg { background: var(--copper-sheen); color: #1A0F07; }
.z-no.lg small { color: rgba(26, 15, 7, .7); }
.rp-hero { padding: 18px; border-radius: var(--radius-lg); background: radial-gradient(120% 100% at 100% 0%, rgba(200, 129, 74, .26), transparent 60%), var(--surface-2); }
.rp-hero > span { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.rp-hero > b { font-size: 42px; font-weight: 800; letter-spacing: -.045em; line-height: 1.02; font-variant-numeric: tabular-nums; }
.rp-tile { border-radius: 16px; }
.rp-tile b { font-weight: 750; letter-spacing: -.025em; }
.btn-wa { background: linear-gradient(180deg, #2DBE6C, #1E9452); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 24px rgba(31, 158, 85, .3); }

/* ---------- Feuilles ---------- */
.owner-sheet .layer-panel { background: linear-gradient(180deg, #221D1A 0, #1A1715 140px); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 0 1px rgba(255, 255, 255, .05), var(--shadow-lg); }
.owner-sheet .layer-head h2 { font-size: 21px; font-weight: 700; letter-spacing: -.022em; }
.owner-sheet .sheet-grip { background: rgba(255, 255, 255, .22); }

/* ---------- Menu ---------- */
.menu-tools { background: var(--espresso); }
.menu-tools::after { background: linear-gradient(rgba(14, 12, 11, .9), rgba(14, 12, 11, 0)); }
.search { height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--glass-line); }
.chip { height: 36px; padding: 0 15px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--glass-line); }
.chip.active { background: var(--milk); color: var(--espresso); }
.m-act { border-radius: var(--radius-pill); background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--glass-line); }
.m-act .ico { color: var(--accent); }
.m-act.on { background: var(--milk); color: var(--espresso); }
.m-items { border-radius: 22px; background: var(--card-bg); box-shadow: var(--card-edge); }
.m-group h3 { font-size: 12px; font-weight: 650; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); }
.m-row { grid-template-columns: 50px minmax(0, 1fr) auto; padding: 10px 14px 10px 12px; }
.m-row .item-icon { width: 50px; height: 50px; font-size: 27px; border-radius: 30%; }
.m-price { height: 28px; padding: 0 11px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .07); font-weight: 700; font-variant-numeric: tabular-nums; }
.live-note { border-radius: 16px; background: var(--accent-soft); color: var(--ink-2); }
.live-note .ico { color: var(--accent); }
.fab { height: 56px; padding: 0 22px 0 18px; background: var(--copper-sheen); color: #1A0F07; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 14px 32px rgba(0, 0, 0, .55), 0 6px 18px rgba(200, 129, 74, .3); }
.emo.on, .tchip.on { background: var(--accent-soft); color: var(--crema); box-shadow: inset 0 0 0 1.5px var(--accent); }
.ed-input { border-radius: 14px; }
.pf-input { border-radius: 18px; }

/* ---------- Avis ---------- */
.rv-avg { font-size: 60px; font-weight: 800; letter-spacing: -.05em; background: linear-gradient(180deg, #FFF, var(--crema)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rv-card { border-radius: 22px; padding: 16px 16px 14px; background: var(--card-bg); box-shadow: var(--card-edge); }
.rv-card.low { box-shadow: inset 3px 0 0 var(--warn), var(--card-edge); }
.rv-text { font-size: 15.5px; letter-spacing: -.01em; }
.stars-fg svg { fill: var(--copper); }

/* ---------- Plus ---------- */
.profile-top { padding: 22px 20px; background: radial-gradient(120% 140% at 0% 0%, rgba(200, 129, 74, .3), transparent 60%), radial-gradient(80% 80% at 100% 100%, rgba(233, 201, 163, .06), transparent 70%), #120F0D; }
.set-ico { background: var(--accent-soft); color: var(--crema); }
.settings, .profile { padding: 0; }
.set-row { padding: 14px 16px; }
.feat {
  min-height: 150px; padding: 16px; border-radius: 22px;
  background: radial-gradient(110% 90% at 100% 0%, rgba(200, 129, 74, .14), transparent 60%), var(--card-bg); box-shadow: var(--card-edge);
}
.feat::before { opacity: .35; }
.feat-ico { width: 42px; height: 42px; background: var(--accent-soft); color: var(--crema); box-shadow: inset 0 0 0 1px rgba(200, 129, 74, .2); }
.feat-lock { top: 14px; right: 14px; height: 24px; padding: 0 9px; background: rgba(255, 255, 255, .07); color: var(--ink-2); }
.feat strong { font: 650 14.5px/1.25 var(--font-display); letter-spacing: -.015em; }

/* ---------- Connexion ---------- */
.login {
  background:
    radial-gradient(80% 42% at 50% -4%, rgba(200, 129, 74, .30), transparent 72%),
    radial-gradient(60% 30% at 50% 108%, rgba(200, 129, 74, .10), transparent 70%),
    var(--espresso);
}
.login::before {   /* halo qui respire derrière le logo */
  content: ''; position: absolute; left: 50%; top: -18%; width: 130vw; max-width: 720px; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(233, 201, 163, .10), transparent); transform: translateX(-50%); animation: loginBreath 7s var(--ease-in-out) infinite alternate;
}
.login > * { position: relative; }
.login-logo { font-size: 42px; color: var(--milk); }
.login-badge {
  padding: 6px 16px; letter-spacing: .32em; font-weight: 750; color: #1A0F07; background: var(--copper-sheen);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 22px rgba(200, 129, 74, .3);
}
.login-title { font: 750 28px/1.1 var(--font-display); letter-spacing: -.03em; }
.login-sub { font-size: 15px; color: var(--muted); margin-top: 4px; }
.pin-dots { gap: 20px; }
.pin-dots span { width: 14px; height: 14px; box-shadow: inset 0 0 0 1.5px rgba(246, 241, 234, .35); transition: background-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-slow) var(--ease-spring); }
.pin-dots span.on { background: var(--crema); box-shadow: 0 0 14px rgba(233, 201, 163, .6); transform: scale(1.18); }
.keypad { gap: 16px 24px; }
.key {
  width: 78px; height: 78px; font-size: 32px; font-weight: 450; letter-spacing: -.02em; color: var(--milk);
  background: rgba(255, 255, 255, .07); -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), inset 0 1px 0 rgba(255, 255, 255, .09);
  transition: background-color var(--dur) ease, transform var(--dur-fast) var(--ease-out);
}
.key:active { background: rgba(233, 201, 163, .32); transform: scale(.92); transition-duration: 0s; }
.key-ghost { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.keypad > * { animation: keyIn .55s var(--ease-spring) both; }
.keypad > :nth-child(n+4) { animation-delay: 60ms; }
.keypad > :nth-child(n+7) { animation-delay: 120ms; }
.keypad > :nth-child(n+10) { animation-delay: 180ms; }
.login-top { animation: ds-rise .7s var(--ease-out) both; }
.login-mid { animation: ds-rise .7s var(--ease-out) .08s both; }
@keyframes keyIn { from { opacity: 0; transform: translateY(14px) scale(.9); } }
@keyframes loginBreath { from { transform: translateX(-50%) scale(.92); opacity: .7; } to { transform: translateX(-50%) scale(1.06); opacity: 1; } }

/* ---------- Toasts : pilule de verre ---------- */
.owner .toast { border-radius: 22px; background: rgba(32, 28, 25, .9); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 44px rgba(0, 0, 0, .55); }
.owner .toast-wood { background: var(--copper-sheen); color: #1A0F07; }

/* ---------- Mouvement expressif : entrées en cascade ---------- */
@keyframes ownRise { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }
.shell.boot #view-home > *, .view.enter > * { animation: ownRise .62s var(--ease-spring) both; }
.shell.boot #view-home > :nth-child(2), .view.enter > :nth-child(2) { animation-delay: 45ms; }
.shell.boot #view-home > :nth-child(3), .view.enter > :nth-child(3) { animation-delay: 90ms; }
.shell.boot #view-home > :nth-child(4), .view.enter > :nth-child(4) { animation-delay: 135ms; }
.shell.boot #view-home > :nth-child(5), .view.enter > :nth-child(5) { animation-delay: 180ms; }
.shell.boot #view-home > :nth-child(6), .view.enter > :nth-child(6) { animation-delay: 225ms; }
.shell.boot #view-home > :nth-child(7), .view.enter > :nth-child(7) { animation-delay: 270ms; }
.shell.boot #view-home > :nth-child(n+8), .view.enter > :nth-child(n+8) { animation-delay: 310ms; }
.shell.boot .tabbar { animation: tabbarIn .7s var(--ease-spring) .15s both; }
@keyframes tabbarIn { from { opacity: 0; transform: translateY(30px) scale(.96); } }

@media (prefers-reduced-motion: reduce) {
  .story::before, .story-ring::after, .login::before, .keypad > *, .login-top, .login-mid,
  .shell.boot #view-home > *, .view.enter > *, .shell.boot .tabbar, .hero.flash .hero-value { animation: none !important; }
}
.card.floor, .card.profile, .card.settings { padding: 0; }
.tabbar { background: rgba(31, 27, 24, .9); }
.kpi:last-child:nth-child(even) { grid-column: 1 / -1; }
.fab-wrap { bottom: -18px; }   /* la vue soustrait déjà son padding bas (barre d'onglets flottante) */
