:root {
  --bg: #0a0810;
  --surface: #14111c;
  --surface-2: #1c1727;
  --surface-3: #261f34;
  --line: #2e2642;
  --ink: #f4f1fa;
  --muted: #a8a0bb;
  --faint: #6f6784;
  --accent: #a64dff;
  --accent-hi: #c98bff;
  --accent-deep: #6d1fd1;
  --accent-soft: rgba(166, 77, 255, .15);
  --accent-ink: #ffffff;
  --red: #ff3358;
  --ok: #3ddc97;
  --ok-soft: rgba(61, 220, 151, .13);
  --warn: #ffb547;
  --warn-soft: rgba(255, 181, 71, .13);
  --danger: #ff5c7a;
  --danger-soft: rgba(255, 92, 122, .13);
  --chrome: linear-gradient(180deg, #ffffff 0%, #e4e0ec 38%, #8f88a0 52%, #d9d4e3 70%, #ffffff 100%);
  --glow: 0 0 0 1px rgba(166, 77, 255, .5), 0 0 22px rgba(166, 77, 255, .35);
  --shadow: 0 2px 6px rgba(0, 0, 0, .35), 0 10px 30px rgba(0, 0, 0, .35);
  --f-brand: "Permanent Marker", "Marker Felt", cursive;
  --f-display: "Oswald", "Impact", "Arial Narrow", sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5;
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(166, 77, 255, .16), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(109, 31, 209, .14), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
img { max-width: 100%; display: block; }
a { color: var(--accent-hi); }
[hidden] { display: none !important; }
.wrap { width: 100%; margin: 0 auto; padding-left: max(clamp(16px, 3vw, 56px), env(safe-area-inset-left, 0px)); padding-right: max(clamp(16px, 3vw, 56px), env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; margin: 0; letter-spacing: .02em; text-transform: uppercase; text-wrap: balance; }
h2 { font-size: 22px; }
h3 { font-size: 16px; letter-spacing: .04em; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 800; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.note { color: var(--muted); font-size: 14px; margin: 0; }
.pad { padding-block: 24px; }
.err { color: var(--danger); }
.chrome { background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- En-tête ---------- */
.top { position: sticky; top: 0; z-index: 5; background: rgba(10, 8, 16, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--red) 50%, var(--accent) 70%, transparent); opacity: .7; }
.top-in { display: flex; align-items: center; gap: 12px 20px; padding-block: 10px; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 0; border: 0; background: none; padding: 0; text-align: left; flex: 1; min-width: 0; }
.wordmark { font-family: var(--f-brand); font-size: 26px; line-height: 1.05; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 10px rgba(166, 77, 255, .55)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.brand .eyebrow { color: var(--accent-hi); font-size: 10px; }
.tabs { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); padding: 4px; border-radius: 999px; }
.tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.tabs button[aria-current="page"] { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 16px rgba(166, 77, 255, .45); }
.account { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px 4px 4px; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; flex: none; max-width: 46vw; }
.account span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account.login { padding: 8px 14px; border-color: var(--accent); color: var(--accent-hi); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-hi); display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none; border: 1px solid rgba(166, 77, 255, .4); }

/* ---------- Navigation du bas ---------- */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: rgba(14, 11, 20, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding-bottom: env(safe-area-inset-bottom, 0px); }
.bottomnav button { border: 0; background: none; padding: 8px 0 7px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--faint); min-width: 0; position: relative; }
.bottomnav button svg { width: 23px; height: 23px; }
.bottomnav button[aria-current="page"] { color: var(--accent-hi); }
.bottomnav button[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) {
  .bottomnav { display: none !important; }
  main { padding-bottom: 48px; }
}
@media (max-width: 899px) { .tabs { display: none !important; } }

/* ---------- Blocs ---------- */
.page { display: grid; gap: 16px; padding-top: 18px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h2 { font-size: 26px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card.glow { border-color: rgba(166, 77, 255, .55); box-shadow: var(--glow), var(--shadow); }
.card h3 { margin-bottom: 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h3 { margin: 0; }
.grid2 { display: grid; gap: 16px; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 10px; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-family: var(--f-display); text-transform: uppercase; letter-spacing: .04em; font-size: 17px; margin-bottom: 4px; font-weight: 600; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 12px; padding: 11px 16px; font-weight: 800; font-size: 15px; text-decoration: none; min-height: 44px; transition: transform .08s ease, box-shadow .15s ease, background .15s ease; }
.btn:active { transform: scale(.98); }
.btn.primary { background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%); border-color: rgba(201, 139, 255, .6); color: var(--accent-ink); box-shadow: 0 0 20px rgba(166, 77, 255, .35); }
.btn.primary:hover { box-shadow: 0 0 28px rgba(166, 77, 255, .55); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(255, 92, 122, .4); background: var(--danger-soft); }
.btn.ok { color: var(--ok); border-color: rgba(61, 220, 151, .4); background: var(--ok-soft); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 13.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.linkbtn { border: 0; background: none; color: var(--accent-hi); font-weight: 700; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; flex: none; }
.iconbtn svg { width: 20px; height: 20px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.badge.confirme { background: var(--accent-soft); color: var(--accent-hi); }
.badge.termine { background: var(--ok-soft); color: var(--ok); }
.badge.absent { background: var(--warn-soft); color: var(--warn); }
.badge.annule { background: var(--danger-soft); color: var(--danger); }
.badge.gerant { background: rgba(255, 51, 88, .14); color: #ff7c95; }
.badge.barber { background: var(--accent-soft); color: var(--accent-hi); }

/* ---------- Accueil client ---------- */
.hero { position: relative; overflow: hidden; border-radius: 20px; border: 1px solid rgba(166, 77, 255, .45); background: radial-gradient(120% 120% at 100% 0%, rgba(166, 77, 255, .35), transparent 55%), linear-gradient(160deg, #1a1326, #0d0a14); box-shadow: var(--glow), var(--shadow); display: grid; grid-template-columns: 1fr; }
.hero-txt { padding: 22px 20px 20px; position: relative; z-index: 1; display: grid; gap: 10px; align-content: center; }
.hero h2 { font-family: var(--f-brand); text-transform: none; font-size: clamp(38px, 11vw, 64px); line-height: 1; letter-spacing: 0; font-weight: 400; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 14px rgba(166, 77, 255, .6)); }
.hero .redline { height: 3px; width: 110px; border-radius: 3px; background: var(--red); box-shadow: 0 0 12px var(--red); }
.hero p { margin: 0; color: #d9d2e8; }
.hero .btn { justify-self: start; }
.hero-img { position: relative; min-height: 200px; }
.hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 10, 20, 0) 40%, rgba(13, 10, 20, .9)); }
@media (min-width: 700px) {
  .hero { grid-template-columns: 1.15fr 1fr; min-height: 300px; }
  .hero-txt { padding: 32px; }
  .hero-img::after { background: linear-gradient(90deg, #120d1b 0%, rgba(18, 13, 27, 0) 45%); }
}
.next-rdv { display: flex; gap: 14px; align-items: center; }
.datebox { width: 62px; flex: none; text-align: center; border-radius: 12px; background: var(--accent-soft); border: 1px solid rgba(166, 77, 255, .45); padding: 6px 0; }
.datebox b { display: block; font-family: var(--f-display); font-size: 26px; line-height: 1.05; color: var(--ink); }
.datebox span { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-hi); font-weight: 800; }
.dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; margin: 6px 0 10px; }
.dot { aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--faint); display: grid; place-items: center; font-size: 11px; color: var(--faint); font-weight: 800; }
.dot.on { border: 0; background: radial-gradient(circle at 35% 30%, var(--accent-hi), var(--accent-deep)); box-shadow: 0 0 10px rgba(166, 77, 255, .6); color: #fff; }
.dot.gift { border-color: var(--red); color: var(--red); border-style: solid; }
.reward { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 51, 88, .09); border: 1px solid rgba(255, 51, 88, .35); }
.reward b { color: #ff8aa0; }
.code { font-family: var(--f-display); font-size: 26px; letter-spacing: .2em; padding: 6px 14px; border-radius: 12px; border: 1px dashed var(--accent); background: var(--accent-soft); display: inline-block; }

/* Tarifs */
.tarifs { display: grid; gap: 18px; }
.tarif-cat h3 { font-family: var(--f-display); color: var(--accent-hi); margin-bottom: 6px; }
.tarif { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; }
.tarif .nm { font-weight: 700; }
.tarif .ds { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.tarif .lead { flex: 1; border-bottom: 1px dotted var(--faint); transform: translateY(-4px); min-width: 16px; }
.tarif .px { font-family: var(--f-display); font-size: 17px; font-weight: 500; }
.infos { display: grid; gap: 8px; }
.infos div { display: flex; gap: 10px; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.infos div:last-child { border-bottom: 0; }

/* ---------- Planning ---------- */
.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 58px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 7px 0 8px; text-align: center; scroll-snap-align: start; }
.day span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.day b { display: block; font-family: var(--f-display); font-size: 22px; line-height: 1.15; font-weight: 600; }
.day small { display: block; font-size: 10px; color: var(--faint); font-weight: 700; }
.day[aria-pressed="true"] { background: linear-gradient(180deg, var(--accent), var(--accent-deep)); border-color: var(--accent-hi); box-shadow: 0 0 18px rgba(166, 77, 255, .5); }
.day[aria-pressed="true"] span, .day[aria-pressed="true"] small { color: #efe3ff; }
.day.closed { opacity: .45; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 13px 6px 6px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.chip.noimg { padding-left: 13px; }
.chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); box-shadow: 0 0 12px rgba(166, 77, 255, .3); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: 5px; }
.legend .l-free { border: 1.5px solid var(--accent); background: var(--accent-soft); }
.legend .l-busy { background: var(--surface-3); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot { border: 1.5px solid rgba(166, 77, 255, .55); background: var(--accent-soft); border-radius: 12px; padding: 9px 6px; text-align: center; font-weight: 800; min-height: 58px; }
.slot b { display: block; font-family: var(--f-display); font-size: 19px; font-weight: 500; letter-spacing: .02em; }
.slot small { display: block; font-size: 11px; color: var(--accent-hi); font-weight: 700; }
.slot:hover:not([disabled]) { box-shadow: 0 0 16px rgba(166, 77, 255, .45); border-color: var(--accent-hi); }
.slot.busy, .slot.past { border-color: transparent; background: var(--surface-2); color: var(--faint); cursor: not-allowed; }
.slot.busy b { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.slot.busy small, .slot.past small { color: var(--faint); }
.closed-msg { padding: 20px; border-radius: var(--r); border: 1px dashed var(--line); text-align: center; color: var(--muted); }
.closed-msg b { display: block; color: var(--ink); font-family: var(--f-display); font-size: 18px; text-transform: uppercase; font-weight: 600; }

/* Planning staff : colonnes par barber */
.agenda { display: grid; gap: 6px; }
.agenda-head, .agenda-row { display: grid; grid-template-columns: 54px repeat(var(--cols), minmax(0, 1fr)); gap: 6px; }
.agenda-head { position: sticky; top: calc(58px + env(safe-area-inset-top, 0px)); z-index: 2; background: var(--bg); padding: 6px 0; }
.agenda-head div { font-weight: 800; font-size: 13px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-row .t { font-family: var(--f-display); font-size: 15px; color: var(--muted); padding-top: 6px; }
.cell { min-height: 44px; border-radius: 10px; border: 1px dashed var(--line); background: transparent; color: var(--faint); font-size: 12px; font-weight: 700; text-align: left; padding: 6px 8px; overflow: hidden; }
.cell:hover { border-color: var(--accent); color: var(--accent-hi); }
.cell.rdv { border: 0; background: linear-gradient(180deg, rgba(166, 77, 255, .32), rgba(109, 31, 209, .25)); color: var(--ink); border-left: 3px solid var(--accent-hi); }
.cell.rdv.termine { background: var(--ok-soft); border-left-color: var(--ok); }
.cell.rdv.absent { background: var(--warn-soft); border-left-color: var(--warn); }
.cell.cont { border: 0; background: rgba(166, 77, 255, .12); border-left: 3px solid rgba(201, 139, 255, .4); border-radius: 0 0 10px 10px; }
.cell.cont.termine { background: rgba(61, 220, 151, .07); border-left-color: rgba(61, 220, 151, .4); }
.cell.off { border: 0; background: repeating-linear-gradient(-45deg, var(--surface-2), var(--surface-2) 6px, var(--surface) 6px, var(--surface) 12px); color: var(--faint); cursor: default; }
.cell .cn { display: block; color: var(--ink); font-weight: 800; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell .cp { display: block; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Journée (staff) ---------- */
.daynav { display: flex; align-items: center; gap: 8px; }
.daynav .lbl { font-family: var(--f-display); font-size: 18px; text-transform: capitalize; min-width: 0; flex: 1; text-align: center; font-weight: 500; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.kpi span { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.kpi b { display: block; font-family: var(--f-display); font-size: 26px; font-weight: 500; line-height: 1.2; margin-top: 2px; }
.kpi small { color: var(--muted); font-size: 12.5px; }
.kpi.hl { border-color: rgba(166, 77, 255, .5); box-shadow: var(--glow); }
.tl { display: grid; gap: 10px; }
.tl-item { display: grid; grid-template-columns: 62px 1fr; gap: 12px; align-items: start; }
.tl-time { font-family: var(--f-display); font-size: 19px; text-align: right; padding-top: 12px; }
.tl-time small { display: block; font-size: 12px; color: var(--muted); font-family: var(--f-body); }
.tl-card { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; text-align: left; width: 100%; }
.tl-card.termine { border-left-color: var(--ok); }
.tl-card.absent { border-left-color: var(--warn); }
.tl-card.annule { border-left-color: var(--danger); opacity: .6; }
.tl-card.off { border-left-color: var(--faint); background: repeating-linear-gradient(-45deg, var(--surface), var(--surface) 8px, var(--surface-2) 8px, var(--surface-2) 16px); }
.tl-card .who { font-weight: 800; font-size: 16px; }
.tl-card .what { color: var(--muted); font-size: 13.5px; }
.tl-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* ---------- Listes ---------- */
.list { display: grid; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; }
.li:last-child { border-bottom: 0; }
.li .main { flex: 1; min-width: 0; }
.li .t1 { font-weight: 800; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .t2 { font-size: 13px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .end { text-align: right; flex: none; }
.thumb { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: var(--surface-3); flex: none; display: grid; place-items: center; color: var(--faint); font-weight: 800; }
.search { width: 100%; }

/* ---------- Catalogue ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.style-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: grid; text-align: left; padding: 0; }
.style-card .ph { aspect-ratio: 4 / 5; background: var(--surface-3); position: relative; }
.style-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.style-card .ph .noph { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-brand); font-size: 30px; color: var(--faint); }
.style-card .bd { padding: 10px 12px 12px; display: grid; gap: 2px; }
.style-card .bd b { font-family: var(--f-display); text-transform: uppercase; font-weight: 500; letter-spacing: .03em; font-size: 16px; }
.style-card .bd span { font-size: 12.5px; color: var(--muted); }
.style-card:hover { border-color: var(--accent); }

/* ---------- Statistiques ---------- */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; align-items: center; gap: 10px; font-size: 13.5px; }
.bar .lb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bar .tr { display: block; height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar .fl { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-deep), var(--accent-hi)); }
.bar .vl { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; min-width: 2ch; text-align: right; }
.cols { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; align-items: end; height: 140px; padding-top: 10px; }
.cols .c { display: grid; grid-template-rows: 1fr auto; gap: 4px; height: 100%; text-align: center; font-size: 10.5px; color: var(--muted); font-weight: 700; }
.cols .c .bx { align-self: end; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--accent-hi), var(--accent-deep)); min-height: 2px; }

/* ---------- Gestion ---------- */
.menu { display: grid; gap: 10px; }
@media (min-width: 760px) { .menu { grid-template-columns: 1fr 1fr; } }
.menu-item { display: flex; align-items: center; gap: 14px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; width: 100%; }
.menu-item:hover { border-color: var(--accent); }
.menu-item .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); flex: none; }
.menu-item .ic svg { width: 22px; height: 22px; }
.menu-item b { display: block; }
.menu-item span { font-size: 13px; color: var(--muted); }
.hours { display: grid; gap: 8px; }
.hour { display: grid; grid-template-columns: 96px 1fr 1fr; gap: 8px; align-items: center; }
.hour label.ck { font-weight: 700; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 800; color: var(--muted); }
.field small { color: var(--faint); font-size: 12.5px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="date"], input[type="time"], input[type="search"], select, textarea {
  width: 100%; min-height: 46px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: 16px; color: var(--ink); appearance: none; -webkit-appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 80px; resize: vertical; }
input[type="date"], input[type="time"] { min-width: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ck { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.ck input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; }
.pick { display: grid; gap: 8px; }
.pick-opt { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.pick-opt input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; }
.pick-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 12px rgba(166, 77, 255, .25); }
.pick-opt .main { flex: 1; min-width: 0; }
.pick-opt .main b { display: block; font-weight: 700; }
.pick-opt .main small { display: block; color: var(--muted); font-size: 12.5px; }
.pick-opt img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.pick-opt.disabled { opacity: .45; cursor: not-allowed; }
.pick-cat { font-family: var(--f-display); text-transform: uppercase; color: var(--accent-hi); font-size: 14px; letter-spacing: .06em; margin-top: 6px; }
.strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.strip label { flex: none; width: 92px; display: grid; gap: 4px; cursor: pointer; font-size: 12px; font-weight: 700; text-align: center; }
.strip label input { position: absolute; opacity: 0; pointer-events: none; }
.strip .sq { width: 92px; height: 92px; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: var(--surface-3); display: grid; place-items: center; color: var(--faint); }
.strip .sq img { width: 100%; height: 100%; object-fit: cover; }
.strip label:has(input:checked) .sq { border-color: var(--accent); box-shadow: 0 0 14px rgba(166, 77, 255, .5); }
.recap { border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); padding: 12px 14px; display: grid; gap: 4px; }
.recap div { display: flex; justify-content: space-between; gap: 10px; }
.recap .tot { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; font-family: var(--f-display); font-size: 20px; }
.recap .tot b { color: var(--accent-hi); font-weight: 600; }
.warnbox { border-radius: 12px; padding: 10px 12px; background: var(--warn-soft); color: var(--warn); font-weight: 700; font-size: 14px; }
.infobox { border-radius: 12px; padding: 10px 12px; background: var(--accent-soft); color: #e6d3ff; font-size: 14px; }
.photo-edit { display: flex; align-items: center; gap: 12px; }
.photo-edit .thumb { width: 72px; height: 72px; }
.suggest { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.suggest button { border: 0; border-bottom: 1px solid var(--line); background: var(--surface-2); text-align: left; padding: 10px 12px; }
.suggest button:last-child { border-bottom: 0; }
.suggest button:hover { background: var(--surface-3); }
.selected-client { display: flex; align-items: center; gap: 10px; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; }
.selected-client .main { flex: 1; }

/* ---------- Connexion ---------- */
.auth { max-width: 440px; margin: 0 auto; padding-top: 22px; display: grid; gap: 16px; }
.auth-brand { text-align: center; display: grid; gap: 6px; justify-items: center; }
.auth-brand .wordmark { font-size: 50px; }
.auth-brand .redline { height: 3px; width: 90px; border-radius: 3px; background: var(--red); box-shadow: 0 0 12px var(--red); }
.switch { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.switch button { border: 0; background: none; border-radius: 999px; padding: 9px; font-weight: 800; color: var(--muted); }
.switch button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* ---------- Feuille (modale) ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 20; background: rgba(4, 2, 8, .7); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); border: 1px solid var(--line); border-bottom: 0; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 22px 22px 0 0; padding: 0 18px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); animation: up .2s ease; overscroll-behavior: contain; }
.sheet-head { position: sticky; top: 0; background: var(--surface); z-index: 1; display: flex; align-items: center; gap: 10px; padding: 16px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.sheet-head h2 { flex: 1; font-size: 20px; }
.sheet-foot { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom, 0px)); background: var(--surface); padding: 12px 0 calc(18px + env(safe-area-inset-bottom, 0px)); margin-bottom: calc(-18px - env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.sheet-foot .btn { flex: 1; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) {
  .sheet-back { align-items: center; }
  .sheet { border-radius: 22px; border-bottom: 1px solid var(--line); max-height: 88vh; }
}

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 30; background: #f4f1fa; color: #14111c; padding: 11px 18px; border-radius: 12px; font-weight: 800; box-shadow: var(--shadow); max-width: calc(100vw - 32px); text-align: center; }
@media (min-width: 900px) { .toast { bottom: 28px; } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Correctifs de mise en page */
.list { grid-template-columns: minmax(0, 1fr); }
.day.closed[aria-pressed="true"] { opacity: 1; }

/* Grand écran : on occupe toute la largeur */
@media (min-width: 1200px) {
  .page { gap: 20px; padding-top: 24px; }
  .hero { grid-template-columns: 1fr 1fr; min-height: 420px; }
  .hero-txt { padding: 48px 56px; gap: 14px; }
  .hero h2 { font-size: clamp(64px, 6vw, 110px); }
  .hero p { font-size: 18px; max-width: 520px; }
  .hero-img img { object-fit: contain; object-position: center; padding: 18px; -webkit-mask-image: radial-gradient(circle closest-side, #000 90%, transparent 100%); mask-image: radial-gradient(circle closest-side, #000 90%, transparent 100%); }
  .hero-img::after { background: linear-gradient(90deg, #120d1b 0%, rgba(18, 13, 27, 0) 30%); }
  .grid2 { grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); align-items: start; }
  .menu { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
  .tl { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); align-items: start; }
  .slots { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
  .slot { min-height: 70px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .kpi b { font-size: 32px; }
  .cols { height: 200px; }
  .days { gap: 10px; }
  .day { width: 66px; }
}
