/* Miss Perfect — « Prends soin de toi, tu le mérites ! »
   Direction : crème poudrée + encre noire, rose signature, filets dorés. Pensé tablette, debout, au doigt. */

:root {
  --bg: #fbf5f2;
  --bg-deep: #f5e9e4;
  --surface: #ffffff;
  --surface-2: #fdf8f6;
  --ink: #1b1417;
  --ink-2: #54464c;
  --muted: #8d7c83;
  --line: #ecdcd6;
  --line-strong: #dcc5bd;

  --black: #141013;
  --rose: #d63a73;
  --rose-600: #b92a5e;
  --rose-50: #fdf0f4;
  --rose-100: #f9dbe6;
  --gold: #c19a53;
  --gold-600: #9c7535;
  --gold-50: #faf3e4;
  --gold-grad: linear-gradient(135deg, #ecd497 0%, #c19a53 48%, #9c7535 100%);

  --ok: #23805a;   --ok-50: #e6f4ed;
  --warn: #a8660f; --warn-50: #fdf1dc;
  --bad: #c0343b;  --bad-50: #fbe9e9;

  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(60, 20, 35, .06), 0 2px 8px rgba(60, 20, 35, .04);
  --shadow: 0 2px 6px rgba(60, 20, 35, .06), 0 12px 32px rgba(60, 20, 35, .08);
  --shadow-lg: 0 24px 60px rgba(30, 10, 20, .25);

  --font: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --tap: 60px;
  --topbar: 72px;
  --bar: 88px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 17px/1.45 var(--font);
  color: var(--ink);
  background: var(--bg);
  background-image: radial-gradient(1200px 500px at 110% -10%, #f8e1e9 0%, transparent 60%),
                    radial-gradient(900px 500px at -10% 110%, #f6ecdc 0%, transparent 55%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--rose) 55%, transparent); outline-offset: 2px; }

/* ------------------------------------------------------------ Icônes */
.ico { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; }
.ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------ Barre du haut */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar);
  display: flex; align-items: center; gap: 20px;
  padding: 0 20px;
  padding-top: env(safe-area-inset-top);
  background: var(--black);
  color: #f6ece8;
  box-shadow: 0 1px 0 rgba(193, 154, 83, .45), 0 8px 24px rgba(20, 10, 15, .18);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex: none; }
.brand img { border-radius: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font: italic 600 24px/1 var(--display);
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-salon { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: #cdb9b3; margin-top: 4px; }
.nav { display: flex; gap: 6px; margin: 0 auto; background: rgba(255,255,255,.06); padding: 6px; border-radius: 999px; }
.nav a {
  display: flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 999px;
  color: #d9c9c4; text-decoration: none; font-weight: 500; font-size: 16px;
  transition: background .15s, color .15s;
}
.nav a:active { transform: scale(.97); }
.nav a.active { background: var(--rose); color: #fff; box-shadow: 0 4px 14px rgba(214, 58, 115, .45); }
.topbar-right { display: flex; align-items: center; gap: 14px; flex: none; }
.clock { font-variant-numeric: tabular-nums; color: #cdb9b3; font-size: 15px; }
.day-state { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: rgba(193,154,83,.18); color: #ecd497; display: inline-flex; gap: 6px; align-items: center; }

/* ------------------------------------------------------------ Boutons */
.btn {
  --b: var(--surface); --c: var(--ink); --bd: var(--line-strong);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap); padding: 0 24px;
  border-radius: 999px; border: 1.5px solid var(--bd);
  background: var(--b); color: var(--c);
  font-weight: 600; font-size: 17px; letter-spacing: .01em;
  transition: transform .08s, box-shadow .15s, background .15s, opacity .15s;
  user-select: none; white-space: nowrap;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { --b: var(--rose); --c: #fff; --bd: var(--rose); box-shadow: 0 6px 18px rgba(214, 58, 115, .32); }
.btn-primary:not(:disabled):hover { --b: var(--rose-600); }
.btn-dark { --b: var(--black); --c: #fff; --bd: var(--black); }
.btn-gold { --b: var(--gold); --c: #fff; --bd: var(--gold); background: var(--gold-grad); box-shadow: 0 6px 18px rgba(156, 117, 53, .3); }
.btn-ghost { --b: transparent; --bd: transparent; --c: var(--ink-2); }
.btn-danger { --b: var(--surface); --c: var(--bad); --bd: #efc4c6; }
.btn-danger-solid { --b: var(--bad); --c: #fff; --bd: var(--bad); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn-xl { min-height: 72px; padding: 0 36px; font-size: 20px; }
.btn-block { width: 100%; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid currentColor; border-color: rgba(255,255,255,.9) rgba(255,255,255,.9) transparent transparent;
  animation: spin .7s linear infinite;
}
.btn:not(.btn-primary):not(.btn-dark):not(.btn-gold):not(.btn-danger-solid).loading::after { border-color: var(--rose) var(--rose) transparent transparent; }
.icon-btn {
  width: 48px; height: 48px; flex: none; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--ink-2);
}
.icon-btn:active { background: var(--bg-deep); }
.link-btn { border: 0; background: none; color: var(--rose-600); font-weight: 500; padding: 12px 4px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rose-100); }

@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ Structure des vues */
.view { padding: 24px 24px calc(var(--bar) + 32px); max-width: 1440px; margin: 0 auto; overflow-x: clip; }
.boot { min-height: 70vh; display: grid; place-items: center; gap: 24px; align-content: center; }
.spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--rose-100); border-top-color: var(--rose); animation: spin .8s linear infinite; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.eyebrow { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-600); font-weight: 600; margin-bottom: 6px; }
.title { font: 600 32px/1.1 var(--display); letter-spacing: -.01em; }
.title em { font-style: italic; color: var(--rose); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 22px; }
.section-title { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.empty .ico { width: 40px; height: 40px; color: var(--line-strong); margin-bottom: 10px; }

.daynav { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px; box-shadow: var(--shadow-sm); }
.daynav .label { min-width: 210px; text-align: center; font-weight: 600; text-transform: capitalize; }
.daynav .icon-btn:disabled { opacity: .25; }

/* ------------------------------------------------------------ Badges & chips */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.badge .ico { width: 16px; height: 16px; }
.b-ok { background: var(--ok-50); color: var(--ok); }
.b-warn { background: var(--warn-50); color: var(--warn); }
.b-bad { background: var(--bad-50); color: var(--bad); }
.b-rose { background: var(--rose-50); color: var(--rose-600); }
.b-gold { background: var(--gold-50); color: var(--gold-600); }
.b-dark { background: var(--black); color: #f3e3c0; }
.pts { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--gold-600); font-variant-numeric: tabular-nums; }
.pts .ico { width: 16px; height: 16px; fill: currentColor; }
.pts .ico svg { fill: currentColor; stroke: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-strong);
  background: var(--surface); font-weight: 500; font-size: 15px; display: inline-flex; align-items: center; gap: 8px;
}
.chip.on { background: var(--black); border-color: var(--black); color: #fff; }

/* ------------------------------------------------------------ Champs */
.field-label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--ink-2); margin-bottom: 8px; }
.input, .textarea {
  width: 100%; min-height: var(--tap); padding: 0 18px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line-strong); background: var(--surface); font-size: 18px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { padding: 14px 18px; min-height: 96px; resize: vertical; line-height: 1.4; }
.input:focus, .textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 4px var(--rose-50); }
.input.invalid, .textarea.invalid { border-color: var(--bad); box-shadow: 0 0 0 4px var(--bad-50); }
.big-input-wrap { position: relative; }
.big-input {
  width: 100%; height: 84px; padding: 0 64px 0 72px; border-radius: var(--r);
  border: 2px solid var(--line-strong); background: var(--surface);
  font: 500 34px/1 var(--font); letter-spacing: .06em; font-variant-numeric: tabular-nums; outline: none;
  box-shadow: var(--shadow-sm);
}
.big-input.text { font-size: 28px; letter-spacing: 0; }
.big-input:focus { border-color: var(--rose); box-shadow: 0 0 0 6px var(--rose-50); }
.big-input::placeholder { color: #cdbdb8; }
.big-input-wrap > .ico { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; color: var(--rose); }
.big-input-wrap > .icon-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.hint { color: var(--muted); font-size: 15px; margin-top: 8px; }
.money-input { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; font-size: 22px; }

/* ------------------------------------------------------------ Passage : mise en page */
.passage { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.passage-main { min-width: 0; }

.stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.step-pill {
  display: flex; align-items: center; gap: 12px; text-align: left; min-width: 0;
  min-height: 68px; padding: 10px 14px; border-radius: var(--r);
  border: 1.5px solid var(--line); background: rgba(255,255,255,.55); color: var(--muted);
  transition: all .18s;
}
.step-pill .num {
  width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 15px; background: var(--bg-deep); color: var(--muted);
}
.step-pill .num .ico { width: 18px; height: 18px; }
.step-pill .txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.step-pill .lbl { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-pill .val { font-size: 16px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-pill.current { border-color: var(--rose); background: var(--surface); color: var(--rose-600); box-shadow: 0 6px 20px rgba(214, 58, 115, .14); }
.step-pill.current .num { background: var(--rose); color: #fff; }
.step-pill.done { background: var(--surface); color: var(--ink-2); }
.step-pill.done .num { background: var(--black); color: #ecd497; }
.step-pill:disabled { cursor: default; }

.step-head { margin-bottom: 20px; }
.step-anim { animation: stepIn .25s ease-out; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Étape 1 : collaboratrices */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.staff-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  min-height: 176px; padding: 18px; border-radius: var(--r-lg);
  border: 2px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
  font-size: 20px; font-weight: 600; transition: transform .1s, border-color .15s, box-shadow .15s;
}
.staff-btn:active { transform: scale(.96); }
.staff-btn.on { border-color: var(--rose); box-shadow: 0 0 0 5px var(--rose-50), var(--shadow); }
.avatar {
  --av: var(--rose);
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  font: italic 600 32px/1 var(--display); color: #fff;
  background: var(--av); box-shadow: inset 0 0 0 3px rgba(255,255,255,.35), 0 0 0 2px var(--gold);
}
.avatar.sm { width: 48px; height: 48px; font-size: 19px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.3); }
.avatar.xs { width: 36px; height: 36px; font-size: 15px; box-shadow: none; }

/* Étape 2 : cliente */
.finder { max-width: 760px; }
.results { display: grid; gap: 10px; margin-top: 16px; }
.client-card {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  min-height: 84px; padding: 14px 18px; border-radius: var(--r);
  border: 1.5px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .08s, border-color .15s;
}
.client-card:active { transform: scale(.985); border-color: var(--rose); }
.client-card .who { flex: 1; min-width: 0; }
.client-card .nm { font-size: 20px; font-weight: 600; }
.client-card .meta { color: var(--muted); font-size: 15px; display: flex; gap: 12px; flex-wrap: wrap; }
.client-card .go { color: var(--rose); }
.client-card.selected { border: 2px solid var(--rose); box-shadow: 0 0 0 5px var(--rose-50); cursor: default; }
.code { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--gold-600); letter-spacing: .03em; }
.new-client {
  padding: 20px; border-radius: var(--r); border: 2px dashed var(--rose-100); background: var(--rose-50);
  display: grid; gap: 14px;
}
.new-client .nc-title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; color: var(--rose-600); }
.row { display: flex; gap: 12px; align-items: center; }
.row > .input { flex: 1; }
.finder-foot { margin-top: 18px; }
.search-state { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 10px 4px; }
.search-state .spinner { width: 20px; height: 20px; border-width: 2px; }

/* Étape 3 : prestations */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 2px 12px; margin-bottom: 8px; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  --c: var(--rose);
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  min-height: 56px; padding: 0 22px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 17px;
}
.cat-tab .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.cat-tab.on { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 35%, transparent); }
.cat-tab.on .dot { background: #fff; }
.cat-tab .count { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--black); color: #fff; font-size: 13px; display: grid; place-items: center; }
.cat-tab.on .count { background: #fff; color: var(--c); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.tile {
  --c: var(--rose);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 4px;
  min-height: 140px; padding: 18px 18px 16px; border-radius: var(--r);
  border: 1.5px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .08s, border-color .15s, box-shadow .15s;
}
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); opacity: .85; }
.tile:active { transform: scale(.965); }
.tile .t-name { font-size: 19px; font-weight: 600; line-height: 1.2; padding-right: 30px; }
.tile .t-detail { font-size: 14px; color: var(--muted); line-height: 1.3; }
.tile .t-price { margin-top: auto; padding-top: 10px; font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
.tile .t-price small { font-weight: 500; font-size: 14px; color: var(--muted); }
.tile .t-count {
  position: absolute; top: 12px; right: 12px; min-width: 32px; height: 32px; padding: 0 9px; border-radius: 16px;
  background: var(--c); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 15px;
  transform: scale(0); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1);
}
.tile.has .t-count { transform: scale(1); }
.tile.has { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.tile.pop { animation: pop .35s ease-out; }
@keyframes pop { 40% { transform: scale(.95); box-shadow: 0 0 0 8px color-mix(in srgb, var(--c) 18%, transparent); } }

/* Étape 4 : règlement */
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pay-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 132px; border-radius: var(--r-lg); border: 2px solid var(--line); background: var(--surface);
  font-size: 19px; font-weight: 600; box-shadow: var(--shadow-sm); transition: all .15s;
}
.pay-btn .ico { width: 38px; height: 38px; color: var(--rose); }
.pay-btn:active { transform: scale(.97); }
.pay-btn.on { border-color: var(--black); background: var(--black); color: #fff; box-shadow: 0 10px 26px rgba(20, 16, 19, .28); }
.pay-btn.on .ico { color: #ecd497; }
.defer-btn { margin-top: 14px; width: 100%; min-height: 60px; border-radius: var(--r); border: 1.5px dashed var(--line-strong); background: transparent; color: var(--ink-2); font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 10px; }
.defer-btn.on { border: 2px solid var(--warn); background: var(--warn-50); color: var(--warn); font-weight: 600; }

.loyalty { padding: 22px; border-radius: var(--r-lg); background: linear-gradient(135deg, #1b1417 0%, #2b1d23 100%); color: #f3e7e2; margin-bottom: 22px; position: relative; overflow: hidden; }
.loyalty::after { content: ""; position: absolute; right: -110px; top: -120px; width: 220px; height: 220px; border-radius: 50%; border: 1px solid rgba(193,154,83,.35); }
.loyalty-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; position: relative; z-index: 1; }
.loyalty .big-pts { font: 600 44px/1 var(--display); background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.loyalty .big-pts small { font: 500 16px var(--font); color: #cdb9b3; -webkit-text-fill-color: #cdb9b3; margin-left: 6px; }
.loyalty .sub { color: #cdb9b3; font-size: 15px; }
.loyalty .sub b { color: #ecd497; }
.tier { position: relative; z-index: 1; }
.tier + .tier { margin-top: 14px; }
.tier-title { font-size: 13px; text-transform: uppercase; letter-spacing: .16em; color: #ecd497; margin-bottom: 8px; font-weight: 600; }
.rewards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.reward {
  position: relative; text-align: left; min-height: 78px; padding: 12px 14px; border-radius: var(--r-sm);
  border: 1.5px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #fff;
  display: flex; flex-direction: column; gap: 2px; transition: all .15s;
}
.reward .r-label { font-weight: 600; font-size: 16px; line-height: 1.2; }
.reward .r-sub { font-size: 13px; color: #cdb9b3; }
.reward:disabled { opacity: .35; }
.reward.on[aria-disabled="true"] { cursor: default; }
.reward.on { border-color: #ecd497; background: rgba(193,154,83,.22); }
.reward .r-count { position: absolute; top: -8px; right: -8px; min-width: 28px; height: 28px; border-radius: 14px; background: var(--gold-grad); color: var(--black); font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.reward .r-minus { position: absolute; bottom: 6px; right: 6px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; }
.progress { height: 10px; border-radius: 5px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 10px; }
.progress > span { display: block; height: 100%; background: var(--gold-grad); border-radius: 5px; }

/* ------------------------------------------------------------ Ticket */
.ticket {
  position: sticky; top: calc(var(--topbar) + 20px);
  max-height: calc(100vh - var(--topbar) - var(--bar) - 40px);
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ticket::before { content: ""; height: 4px; background: var(--gold-grad); flex: none; }
.ticket-head { padding: 16px 20px 12px; border-bottom: 1px dashed var(--line-strong); }
.ticket-head h3 { font: italic 600 22px var(--display); display: flex; justify-content: space-between; align-items: baseline; }
.ticket-who { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.ticket-who span { display: flex; align-items: center; gap: 8px; }
.ticket-who .ico { width: 16px; height: 16px; color: var(--gold-600); }
.ticket-lines { flex: 1; overflow-y: auto; padding: 6px 12px; -webkit-overflow-scrolling: touch; }
.ticket-empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 15px; }
.line { padding: 12px 8px; border-bottom: 1px solid var(--line); animation: stepIn .2s ease-out; }
.line:last-child { border-bottom: 0; }
.line-top { display: flex; gap: 10px; align-items: flex-start; }
.line-name { flex: 1; min-width: 0; font-weight: 600; font-size: 16px; line-height: 1.25; }
.line-name small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.line-price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.line-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.line-actions .grow { flex: 1; }
.line .icon-btn { width: 40px; height: 40px; color: var(--muted); }
.sup-btn { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px dashed var(--gold); background: var(--gold-50); color: var(--gold-600); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.sup-chip { display: flex; align-items: flex-start; gap: 8px; width: 100%; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--gold-50); font-size: 14px; }
.sup-chip .txt { flex: 1; }
.sup-chip b { color: var(--gold-600); }
.sup-chip i { color: var(--ink-2); display: block; }
.sup-chip .icon-btn { width: 32px; height: 32px; margin: -4px -4px 0 0; }
.stepper-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.stepper-qty button { width: 46px; height: 42px; border: 0; background: var(--rose-50); color: var(--rose-600); display: grid; place-items: center; }
.stepper-qty button:active { background: var(--rose-100); }
.stepper-qty span { min-width: 64px; text-align: center; font-weight: 700; font-size: 15px; }
.reward-line { display: flex; gap: 10px; align-items: center; padding: 10px 8px; color: var(--gold-600); font-weight: 500; font-size: 15px; border-bottom: 1px solid var(--line); }
.reward-line .ico { width: 18px; height: 18px; }
.reward-line .grow { flex: 1; }
.ticket-totals { padding: 14px 20px 18px; border-top: 1px dashed var(--line-strong); background: var(--surface-2); }
.tot-row { display: flex; justify-content: space-between; font-size: 15px; color: var(--ink-2); padding: 2px 0; font-variant-numeric: tabular-nums; }
.tot-row.grand { font-size: 28px; font-weight: 700; color: var(--ink); padding-top: 8px; align-items: baseline; }
.tot-row.grand span:first-child { font: italic 600 22px var(--display); }
.tot-pts { margin-top: 8px; font-size: 14px; color: var(--gold-600); display: flex; align-items: center; gap: 6px; }

/* ------------------------------------------------------------ Barre d'actions fixe */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  min-height: var(--bar); padding: 12px 24px calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 14px;
  background: rgba(255, 252, 250, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px rgba(60, 20, 35, .06);
}
.actionbar .spacer { flex: 1; }
.actionbar .summary {
  display: none; align-items: center; gap: 10px; min-height: 56px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 600; font-variant-numeric: tabular-nums;
}
.actionbar .summary.bump { animation: bump .35s ease-out; }
@keyframes bump { 40% { transform: scale(1.06); border-color: var(--rose); } }
.actionbar .btn-primary { min-width: 220px; }

/* ------------------------------------------------------------ Succès */
.success { max-width: 640px; margin: 20px auto; text-align: center; padding: 40px 32px; }
.success .seal {
  width: 124px; height: 124px; margin: 0 auto 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold-grad);
  box-shadow: 0 0 0 10px var(--gold-50), 0 18px 40px rgba(156,117,53,.35);
  animation: seal .5s cubic-bezier(.3, 1.5, .5, 1);
}
.success .seal .ico { width: 64px; height: 64px; color: var(--black); }
.success .seal .ico svg { stroke-width: 2.6; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s .25s ease-out forwards; }
@keyframes seal { from { transform: scale(.4); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success .amount { font: 600 56px/1 var(--display); margin: 18px 0 10px; }
.success .facts { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.success .give { text-align: left; background: var(--gold-50); border: 1px solid #efdfbb; border-radius: var(--r); padding: 16px 18px; margin: 18px 0; }
.success .give li { margin: 4px 0; font-weight: 600; }
.slogan { font: italic 500 19px var(--display); color: var(--rose-600); margin-top: 26px; }

/* ------------------------------------------------------------ Journal */
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { padding: 18px 20px; }
.stat .k { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.stat .v { font: 600 30px/1.1 var(--display); margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .v small { font: 500 15px var(--font); color: var(--muted); }
.stat.accent { background: var(--black); color: #fff; border-color: var(--black); }
.stat.accent .k { color: #cdb9b3; }
.stat.accent .v { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.visit-list { display: grid; gap: 12px; }
.visit { display: grid; grid-template-columns: 76px 1fr auto; gap: 18px; padding: 18px 20px; align-items: start; }
.visit.cancelled { opacity: .62; background: repeating-linear-gradient(135deg, var(--surface) 0 14px, var(--surface-2) 14px 28px); }
.visit.cancelled .v-total { text-decoration: line-through; }
.v-time { font: 600 22px var(--display); font-variant-numeric: tabular-nums; }
.v-time small { display: block; font: 500 13px var(--font); color: var(--muted); }
.v-who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.v-who .nm { font-size: 19px; font-weight: 600; }
.v-items { display: flex; flex-direction: column; gap: 3px; color: var(--ink-2); font-size: 15px; }
.v-items .sup { color: var(--gold-600); }
.v-items .rw { color: var(--rose-600); }
.v-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.v-total { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.v-actions { display: flex; gap: 8px; }
.v-note { margin-top: 8px; font-size: 14px; padding: 8px 12px; border-radius: 10px; background: var(--bad-50); color: var(--bad); }

/* ------------------------------------------------------------ Caisse */
.cash-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.expected-hero { padding: 24px; background: var(--black); color: #fff; border-radius: var(--r-lg); position: relative; overflow: hidden; }
.expected-hero::after { content: ""; position: absolute; inset: -110px -90px auto auto; width: 220px; height: 220px; border-radius: 50%; border: 1px solid rgba(193,154,83,.35); }
.expected-hero .k { color: #cdb9b3; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.expected-hero .v { font: 600 52px/1.1 var(--display); background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 6px 0 16px; font-variant-numeric: tabular-nums; }
.method-rows { display: grid; gap: 8px; position: relative; z-index: 1; }
.method-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.07); }
.method-row .ico { color: #ecd497; }
.method-row .grow { flex: 1; }
.method-row .n { color: #cdb9b3; font-size: 14px; }
.method-row .amt { font-weight: 700; font-size: 19px; font-variant-numeric: tabular-nums; }

.count-card { padding: 22px; }
.count-block { padding: 16px 0; border-bottom: 1px solid var(--line); }
.count-block:last-of-type { border-bottom: 0; }
.count-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.count-head .grow { flex: 1; }
.count-head .lbl { font-weight: 600; font-size: 18px; display: flex; gap: 8px; align-items: center; }
.count-head .lbl .ico { color: var(--rose); }
.count-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.gap-tag { min-width: 140px; text-align: center; padding: 10px 12px; border-radius: 12px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
.gap-0 { background: var(--ok-50); color: var(--ok); }
.gap-neg { background: var(--bad-50); color: var(--bad); }
.gap-pos { background: var(--warn-50); color: var(--warn); }
.gap-none { background: var(--bg-deep); color: var(--muted); }

.billetage { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; padding: 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.bill { display: flex; align-items: center; gap: 8px; }
.bill .face { flex: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.bill .face small { display: block; color: var(--muted); font-weight: 500; font-size: 13px; }
.bill .stepper-qty span { min-width: 44px; }
.billetage .coins { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.billetage .coins .input { min-height: 48px; font-size: 17px; }

.verdict { margin-top: 18px; padding: 18px 20px; border-radius: var(--r); display: flex; gap: 14px; align-items: center; }
.verdict .ico { width: 32px; height: 32px; }
.verdict .big { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.verdict.ok { background: var(--ok-50); color: var(--ok); }
.verdict.neg { background: var(--bad-50); color: var(--bad); }
.verdict.pos { background: var(--warn-50); color: var(--warn); }

.info-list { display: grid; gap: 8px; }
.info-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 15px; }
.info-item .grow { flex: 1; min-width: 0; }
.info-item .amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.info-item i { color: var(--muted); }
.alert { display: flex; gap: 12px; padding: 14px 18px; border-radius: var(--r); font-size: 15px; align-items: flex-start; }
.alert .ico { width: 22px; height: 22px; margin-top: 1px; }
.alert-warn { background: var(--warn-50); color: #7d4b08; }
.alert-bad { background: var(--bad-50); color: #8f2227; }
.alert-ok { background: var(--ok-50); color: #175c40; }
.alert-dark { background: var(--black); color: #f3e7e2; }
.stack { display: grid; gap: 18px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; }

.sealed { padding: 26px; text-align: center; }
.sealed .seal-ico { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%; background: var(--gold-grad); display: grid; place-items: center; color: var(--black); }
.sealed .seal-ico .ico { width: 34px; height: 34px; }

/* ------------------------------------------------------------ Clientes */
.client-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 22px; align-items: start; }
.profile { padding: 24px; }
.profile-top { display: flex; gap: 18px; align-items: center; }
.profile-top .nm { font: 600 30px/1.1 var(--display); }
.profile .facts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; color: var(--ink-2); }
.profile .facts span { display: inline-flex; gap: 6px; align-items: center; }
.profile .facts .ico { width: 16px; height: 16px; color: var(--gold-600); }
.ledger-row { display: grid; grid-template-columns: 1fr auto 64px; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
.ledger-row:last-child { border-bottom: 0; }
.ledger-row .d { color: var(--muted); font-size: 13px; }
.ledger-row .delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.ledger-row .delta.plus { color: var(--ok); }
.ledger-row .delta.minus { color: var(--bad); }
.ledger-row .bal { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }

/* ------------------------------------------------------------ Modales */
#modals .overlay {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px;
  background: rgba(20, 12, 16, .5); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .18s;
}
#modals .overlay.in { opacity: 1; }
.modal {
  width: min(620px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden;
  transform: translateY(16px) scale(.98); transition: transform .2s ease-out;
}
.overlay.in .modal { transform: none; }
.modal.sm { width: min(420px, 100%); }
.modal.lg { width: min(820px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 8px; }
.modal-head > div { flex: 1; }
.modal-head h2 { font: 600 26px/1.15 var(--display); }
.modal-head p { margin-top: 4px; }
.modal-body { padding: 12px 24px 20px; overflow-y: auto; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; padding: 16px 24px 22px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.modal-actions .btn { flex: 1; }
.opt-grid { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  min-height: 72px; padding: 14px 18px; border-radius: var(--r); border: 2px solid var(--line); background: var(--surface);
  transition: all .15s;
}
.opt .grow { flex: 1; }
.opt .t { font-weight: 600; font-size: 17px; }
.opt .s { color: var(--muted); font-size: 14px; }
.opt .amt { font-weight: 700; font-size: 19px; color: var(--gold-600); white-space: nowrap; }
.opt .radio { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; display: grid; place-items: center; }
.opt.on { border-color: var(--rose); background: var(--rose-50); }
.opt.on .radio { border-color: var(--rose); background: var(--rose); box-shadow: inset 0 0 0 4px #fff; }
.form-gap { display: grid; gap: 18px; }

/* PIN pad */
.pin { display: grid; gap: 18px; justify-items: center; }
.pin-dots { display: flex; gap: 14px; min-height: 22px; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); transition: all .12s; }
.pin-dots span.on { background: var(--rose); border-color: var(--rose); transform: scale(1.1); }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pin-err { color: var(--bad); font-weight: 600; min-height: 22px; font-size: 15px; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 84px); gap: 14px; }
.pin-keys button {
  height: 84px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface);
  font: 500 30px var(--font); display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.pin-keys button:active { background: var(--rose-50); border-color: var(--rose); transform: scale(.95); }
.pin-keys button.ok { background: var(--rose); color: #fff; border-color: var(--rose); }
.pin-keys button.ghost { border: 0; background: none; box-shadow: none; color: var(--muted); }

.lock { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; background: var(--black); background-image: radial-gradient(700px 400px at 80% 0%, rgba(214,58,115,.25), transparent 60%), radial-gradient(600px 400px at 0% 100%, rgba(193,154,83,.18), transparent 60%); }
.lock-card { width: min(440px, 100%); padding: 34px 28px; text-align: center; background: var(--surface); border-radius: 30px; box-shadow: var(--shadow-lg); }
.lock-card .brand-name { font-size: 36px; display: block; margin: 14px 0 4px; }
.lock-card .slogan { margin: 4px 0 24px; font-size: 17px; }

/* ------------------------------------------------------------ Toasts */
.toasts { position: fixed; top: calc(var(--topbar) + 14px); left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: 10px; width: min(560px, calc(100% - 32px)); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: var(--r);
  background: var(--black); color: #fff; box-shadow: var(--shadow-lg); font-weight: 500;
  opacity: 0; transform: translateY(-12px); transition: all .25s;
}
.toast.in { opacity: 1; transform: none; }
.toast .ico { width: 24px; height: 24px; flex: none; }
.toast-success .ico { color: #7fe0b2; }
.toast-error { background: var(--bad); }
.toast-warning { background: #7d4b08; }

.banner { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: var(--r); background: var(--black); color: #f3e7e2; margin-bottom: 18px; }
.banner .ico { color: #ecd497; width: 24px; height: 24px; }
.skeleton { background: linear-gradient(90deg, var(--bg-deep) 0%, #fbf1ed 50%, var(--bg-deep) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0; } }

/* ------------------------------------------------------------ Tablette portrait & petits écrans */
@media (max-width: 1100px) {
  .nav a { padding: 0 14px; }
  .clock { display: none; }
  .cash-grid, .client-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .passage { grid-template-columns: 1fr; }
  .ticket {
    position: fixed; left: 12px; right: 12px; bottom: calc(var(--bar) + 8px); top: auto; z-index: 24;
    max-height: 68vh; transform: translateY(calc(100% + var(--bar) + 20px)); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  }
  .ticket.open { transform: none; }
  .actionbar .summary { display: inline-flex; }
  .stepper .step-pill .val { display: none; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --topbar: 64px; }
  .view { padding: 16px 16px calc(var(--bar) + 24px); }
  .topbar { gap: 10px; padding: 0 12px; }
  .brand-text { display: none; }
  .nav { margin: 0; flex: 1; justify-content: space-between; }
  .nav a { padding: 0 12px; height: 44px; }
  .nav a span:last-child { display: none; }
  .stepper { gap: 6px; }
  .step-pill { min-height: 52px; padding: 8px; justify-content: center; }
  .step-pill .txt { display: none; }
  .title { font-size: 26px; }
  .pay-grid, .rewards { grid-template-columns: 1fr; }
  .pay-btn { min-height: 76px; flex-direction: row; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile { min-height: 124px; }
  .visit { grid-template-columns: 1fr; gap: 10px; }
  .v-right { flex-direction: row; justify-content: space-between; align-items: center; }
  .actionbar { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .actionbar .btn-primary { min-width: 0; flex: 1; }
  .actionbar .btn-xl { min-height: 60px; padding: 0 16px; font-size: 18px; }
  .actionbar .summary { flex: none; padding: 0 14px; font-size: 15px; white-space: nowrap; }
  .actionbar .summary .ico, .actionbar .summary .cnt { display: none; }
  .actionbar .btn-ghost { padding: 0 12px; }
  .actionbar > .muted { display: none; }
  .stat .v { font-size: 24px; }
  .expected-hero .v { font-size: 40px; }
  .method-row .amt { font-size: 17px; }
  .v-total { font-size: 21px; }
  .actionbar .btn-ghost span:last-child { display: none; }
  .big-input { font-size: 26px; height: 72px; padding-left: 60px; }
  .billetage { grid-template-columns: 1fr; }
  .daynav .label { min-width: 150px; font-size: 15px; }
  .modal-actions { flex-direction: column-reverse; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
