@font-face {
  font-family: "Anton";
  src: url("/fonts/anton.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --bg: #131417;
  --surface: #1D1F24;
  --raised: #262930;
  --line: #30343C;
  --text: #F2F1EC;
  --muted: #A7AAAF;
  --accent: #C6F24E;
  --on-accent: #131417;
  --danger: #FF8A7A;
  --radius-s: 10px;
  --radius-m: 14px;
  --radius-l: 22px;
  --display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Mise en page ---------- */
#app {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 20px calc(env(safe-area-inset-bottom, 0px) + 104px);
}
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section { margin-top: 32px; }

/* ---------- Typographie ---------- */
h1, h2, .brand {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.02;
  margin: 0;
}
h1 { font-size: 40px; }
h2 { font-size: 26px; }
h3 { font-size: 17px; font-weight: 700; margin: 0; }
.brand { font-size: 56px; color: var(--accent); }
.brand-s { font-size: 28px; }
.lead { font-size: 18px; color: var(--text); margin: 0; max-width: 32ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
p { margin: 0; }

/* ---------- Boutons ---------- */
.btn {
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn:hover { background: var(--raised); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.btn.link { background: none; border: 0; color: var(--muted); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.btn.link:hover { color: var(--text); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: wait; }
.btn.block { width: 100%; }

/* Pastilles de choix */
.chip {
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip-grid { display: grid; gap: 8px; }
.chip-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chip-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chip-grid .chip { padding: 0 6px; }

/* Jours : défilement horizontal */
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 56px;
  height: 66px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.day small { font-size: 12px; color: var(--muted); font-weight: 600; }
.day strong { font-size: 19px; }
.day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.day[aria-pressed="true"] small { color: var(--on-accent); }

/* ---------- Formulaires ---------- */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.field-label { font-size: 14px; font-weight: 600; color: var(--muted); }
input, select, textarea {
  min-height: 50px;
  width: 100%;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 14px;
  font-size: 16px;
}
textarea { resize: vertical; min-height: 90px; }
input::placeholder, textarea::placeholder { color: #7D8086; }
.hint { font-size: 14px; color: var(--muted); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }

/* ---------- Blocs ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 18px;
}
.hero {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-l);
  padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.hero h2 { font-size: 32px; }
.hero .btn { align-self: flex-start; background: var(--on-accent); color: var(--text); border-color: var(--on-accent); }

.slot {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}
.slot-date {
  background: var(--bg);
  border-radius: var(--radius-m);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 64px;
}
.slot-date small { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: capitalize; }
.slot-date strong { font-family: var(--display); font-size: 24px; font-weight: 400; line-height: 1; }
.slot-status { font-size: 14px; color: var(--muted); }
.slot-status.ok { color: var(--accent); }
.slot-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.person { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 48px; height: 48px; flex: 0 0 48px;
  border-radius: 50%;
  background: var(--raised);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.person-info { flex: 1; min-width: 0; }
.section-s { margin-top: 12px; }
summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.gym-result { text-align: left; justify-content: flex-start; width: 100%; font-weight: 500; }

.empty { text-align: left; padding: 28px 20px; }

.privacy { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #C9CACC; }
.privacy svg { flex: 0 0 18px; margin-top: 2px; stroke: var(--accent); fill: none; stroke-width: 2; }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; gap: 12px; }
.messages { display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.bubble-wrap { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.bubble-wrap.mine { align-items: flex-end; }
.bubble-author { font-size: 12px; color: var(--muted); }
.bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px 16px 16px 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.mine .bubble { background: var(--accent); border-color: var(--accent); color: var(--on-accent); border-radius: 16px 16px 4px 16px; }
.composer { display: flex; gap: 8px; position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); background: var(--bg); padding-top: 8px; }
.composer input { flex: 1; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; gap: 8px;
  padding: 8px 12px calc(env(safe-area-inset-bottom, 0px) + 8px);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  z-index: 10;
}
.nav[hidden] { display: none; }
.nav a {
  position: relative;
  flex: 1 1 0;
  max-width: 110px;
  min-height: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none;
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  border-radius: var(--radius-m);
}
.nav a[aria-current="page"] { color: var(--accent); }
.nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Toast et dialogue ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
  transform: translate(-50%, 16px);
  max-width: min(440px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: var(--radius-m);
  background: var(--text); color: var(--bg);
  font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 30;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #1a0d0b; }

.dialog {
  width: min(440px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  color: var(--text);
  padding: 22px;
}
.dialog::backdrop { background: rgb(0 0 0 / .6); }
.dialog hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }

.loading { color: var(--muted); padding: 40px 0; }

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}

.btn.back { align-self: flex-start; padding-left: 0; min-height: 40px; }

/* ---------- Membres, messages, photos ---------- */
img.avatar { object-fit: cover; display: block; }
.avatar.lg { width: 56px; height: 56px; flex-basis: 56px; }
.avatar.xl { width: 88px; height: 88px; flex-basis: 88px; font-size: 24px; }
.avatar.group { border-radius: var(--radius-m); background: var(--accent); color: var(--on-accent); font-family: var(--display); font-size: 22px; font-weight: 400; }

.h-s { font-size: 20px; }
.h-m { font-size: 30px; }

.member, .thread {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  text-decoration: none;
}
.panel .member { padding: 10px 0; background: none; border: 0; border-radius: 0; }
.thread:hover { background: var(--raised); }
.person-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.person-info h3 { overflow-wrap: anywhere; }
.bio { color: #C9CACC; margin-top: 4px; }
.tag {
  display: inline-block; vertical-align: 2px;
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 6px;
  background: var(--raised); color: var(--accent);
}
.unread { color: var(--text); font-weight: 700; }
.count, .badge {
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px;
  background: var(--accent); color: var(--on-accent);
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center;
}
.badge { position: absolute; top: 4px; left: calc(50% + 6px); }
.btn.ghost { background: none; }

.toggle {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: var(--radius-m);
  background: var(--surface); border: 1px solid var(--line);
  cursor: pointer;
}
.toggle input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; accent-color: var(--accent); flex: 0 0 22px; }
.toggle > span { display: flex; flex-direction: column; gap: 4px; }
label.btn { cursor: pointer; }
.member { flex-wrap: wrap; align-items: flex-start; }
.member .person-actions { flex-basis: 100%; justify-content: flex-start; padding-left: 62px; }

/* Champ date sur iPhone : ne déborde plus de sa colonne */
.two > * { min-width: 0; }
input[type="date"] { -webkit-appearance: none; appearance: none; min-width: 0; display: block; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }

/* Fenêtre de demande des notifications */
.ask { text-align: center; align-items: center; }
.ask p { max-width: 34ch; }
.ask-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
}
.ask-icon svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.steps { text-align: left; margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; color: #C9CACC; }

/* ---------- Découvrir (swipe) ---------- */
.sw-cta { text-decoration: none; }
.sw-cta .h-s { font-family: var(--display); font-weight: 400; text-transform: uppercase; }
.sw-deck { position: relative; height: min(62dvh, 520px); touch-action: none; }
.sw-card {
  position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
  user-select: none; -webkit-user-select: none; will-change: transform;
}
.sw-card.is-top { cursor: grab; }
.sw-card.is-dragging { cursor: grabbing; }
.sw-photo { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; background: var(--raised); }
.sw-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.sw-ini { font-family: var(--display); font-size: 110px; line-height: 1; color: var(--accent); opacity: .5; }
.sw-photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, rgb(19 20 23 / .92)); }
.sw-who { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.sw-who h2 { margin: 0; font-size: 34px; line-height: 1; }
.sw-who h2 span { font-family: var(--body); font-size: 22px; font-weight: 500; color: var(--muted); }
.sw-info { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.sw-info p { margin: 0; }
.sw-bio { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sw-stamp {
  position: absolute; top: 22px; z-index: 2; opacity: 0; pointer-events: none;
  font-family: var(--display); font-size: 28px; text-transform: uppercase; letter-spacing: 1px;
  padding: 4px 12px; border-radius: var(--radius-s); border: 3px solid;
}
.sw-stamp--yes { left: 18px; color: var(--accent); transform: rotate(-10deg); }
.sw-stamp--no { right: 18px; color: var(--muted); transform: rotate(10deg); }
.sw-empty { position: absolute; inset: 0; justify-content: center; text-align: center; align-items: center; }
.sw-hint { text-align: center; margin: 0; }
.sw-actions { display: flex; justify-content: center; align-items: center; gap: 22px; }
.sw-act {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: transform .12s ease-out;
}
.sw-act svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sw-act--yes { width: 72px; height: 72px; background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sw-act--undo { width: 44px; height: 44px; color: var(--muted); }
.sw-act:active { transform: scale(.94); }
.sw-act[disabled] { opacity: .35; cursor: default; }
@media (hover: hover) and (pointer: fine) { .sw-act:not([disabled]):hover { transform: translateY(-2px); } }
.sw-match { text-align: center; align-items: center; }
.sw-match h2 { color: var(--accent); font-size: 40px; margin: 0; }
.sw-pair { display: flex; }
.sw-pair .avatar + .avatar { margin-left: -16px; border: 3px solid var(--surface); }
@media (prefers-reduced-motion: reduce) { .sw-act { transition: none; } }

/* ---------- Connexion / inscription ---------- */
.auth { display: flex; flex-direction: column; gap: 20px; padding-top: 8px; }
.auth-brand { font-size: 32px; text-decoration: none; align-self: flex-start; }
.auth-hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px;
  padding: 22px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line);
}
.auth-hero::before {
  content: ""; position: absolute; inset: -40% -30% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%); pointer-events: none;
}
.auth-hero h1 { margin: 0; font-size: 44px; line-height: 1; text-transform: uppercase; position: relative; }
.auth-hero p { margin: 0; position: relative; }
.auth-badge {
  align-self: flex-start; position: relative; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--on-accent); background: var(--accent); border-radius: 8px; padding: 4px 10px;
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.auth-tabs button { min-height: 44px; border: 0; border-radius: var(--radius-s); background: none; color: var(--muted); font-weight: 700; cursor: pointer; transition: background .2s, color .2s; }
.auth-tabs button.is-on { background: var(--raised); color: var(--text); }
.auth-passkey { gap: 10px; min-height: 56px; font-size: 16px; }
.auth-passkey svg, .auth-offer-icon svg, #passkey-add svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#passkey-add { gap: 8px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field > label { font-size: 14px; font-weight: 600; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }
.pw { position: relative; }
.pw input { width: 100%; padding-right: 52px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px;
  display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: var(--radius-s);
}
.pw-toggle:hover { color: var(--text); }
.pw-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pw-meter { height: 4px; border-radius: 2px; background: var(--raised); overflow: hidden; margin-top: -8px; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--danger); transition: width .25s ease-out, background .25s; }
.pw-meter i[data-level="2"] { background: #FFC24D; }
.pw-meter i[data-level="3"], .pw-meter i[data-level="4"] { background: var(--accent); }
.field-error { color: var(--danger); font-size: 14px; margin-top: -10px; }
input[aria-invalid="true"] { border-color: var(--danger) !important; }
.auth-trust { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; background: var(--surface); border-radius: var(--radius-m); }
.auth-trust svg { flex: none; margin-top: 2px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-offer { text-align: center; align-items: center; }
.auth-offer h2 { margin: 0; }
.auth-offer-icon { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.auth-offer-icon svg { width: 34px; height: 34px; }
@media (prefers-reduced-motion: reduce) { .auth-tabs button, .pw-meter i { transition: none; } }
.auth-social { display: flex; flex-direction: column; gap: 10px; }
.auth-social:empty { display: none; }
.auth-social-btn { gap: 10px; min-height: 52px; background: #fff; color: #1f1f1f; border-color: #fff; text-decoration: none; }
.auth-social-btn:hover { background: #ececec; }
.auth-social-btn svg { flex: none; }

/* ============================================================
   Refonte 2026 : accueil, réserver, membres, messages, profil
   ============================================================ */
.ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -2px; }
.eyebrow {
  margin: 0; font-family: var(--body); font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 6px;
}
.eyebrow.on-accent { color: color-mix(in srgb, var(--on-accent) 70%, transparent); }
.section-m { margin-top: 24px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.h-s { font-size: 22px; }

/* en-tête de page */
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.top h1 { font-size: 42px; text-transform: uppercase; letter-spacing: .3px; }
.top-tight { margin-bottom: 14px; }
.top-avatar { border-radius: 50%; text-decoration: none; }
.top-avatar .avatar { border: 2px solid var(--line); }

/* pastilles d'état */
.pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
}
.pill-dark { background: var(--on-accent); color: var(--accent); }
.pill-line { border: 1px solid var(--line); color: var(--muted); }
.next .pill-line { border-color: color-mix(in srgb, var(--on-accent) 30%, transparent); color: var(--on-accent); }
.pill-accent { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }

/* boutons ajoutés */
.btn { transition: transform .12s ease-out, background .15s; }
.btn:active, .chip:active, .icon-btn:active { transform: scale(.97); }
.btn.dark { background: var(--on-accent); border-color: var(--on-accent); color: var(--text); }
.btn.dark:hover { background: #000; }
.btn.ghost-dark { background: none; border-color: color-mix(in srgb, var(--on-accent) 30%, transparent); color: var(--on-accent); }
.btn.ghost-dark:hover { background: color-mix(in srgb, var(--on-accent) 8%, transparent); }
.icon-btn {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: none; border: 1px solid var(--line); color: var(--text); cursor: pointer; text-decoration: none;
  transition: transform .12s ease-out, background .15s;
}
.icon-btn:hover { background: var(--raised); }
.icon-btn[disabled] { opacity: .5; }
.btn.link.danger-link { color: var(--danger); align-self: center; }
.btn.primary[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Accueil ---------- */
.next {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px;
  padding: 20px; border-radius: 26px; background: var(--accent); color: var(--on-accent);
}
.next::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  border: 28px solid color-mix(in srgb, var(--on-accent) 7%, transparent); pointer-events: none;
}
.next-when { display: flex; flex-direction: column; gap: 2px; text-transform: uppercase; }
.next-when span { font-size: 26px; }
.next-when strong { font-weight: 400; font-size: 76px; line-height: .9; letter-spacing: -.5px; }
.next-meta { font-weight: 600; font-size: 15px; }
.next-count { position: absolute; right: 20px; top: 66px; font-weight: 700; font-size: 14px; }
.next-note { font-size: 14px; color: color-mix(in srgb, var(--on-accent) 78%, transparent); }
.next-actions { display: flex; gap: 8px; position: relative; z-index: 1; }
.next-title { font-size: 34px; text-transform: uppercase; }
.steps3 { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps3 li {
  position: relative; padding-top: 12px; font-size: 12px; font-weight: 700;
  color: color-mix(in srgb, var(--on-accent) 55%, transparent);
}
.steps3 li::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 3px;
  background: color-mix(in srgb, var(--on-accent) 16%, transparent);
}
.steps3 li.done, .steps3 li.now { color: var(--on-accent); }
.steps3 li.done::before { background: var(--on-accent); }
.steps3 li.now::before { background: linear-gradient(90deg, var(--on-accent) 50%, color-mix(in srgb, var(--on-accent) 16%, transparent) 50%); }
.how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-weight: 600; font-size: 15px; }
.how li { display: flex; align-items: center; gap: 12px; }
.how strong {
  width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--on-accent); color: var(--accent); font-family: var(--display); font-weight: 400;
}
.stats { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.stats > * {
  display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--radius-l);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none;
}
.stats strong { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; }
.stats strong small { font-size: 16px; color: var(--muted); }
.stats span { font-size: 13px; color: var(--muted); font-weight: 600; }
.stats-go { align-items: center; justify-content: center; min-width: 86px; }
.stats-go strong { color: var(--accent); }
.stats-go:hover { background: var(--raised); }
.nudge {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-l);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  text-decoration: none;
}
.nudge strong { display: block; font-size: 15px; }
.nudge > .ic { color: var(--accent); }
.stack-av { display: flex; }
.stack-av .avatar { width: 36px; height: 36px; flex-basis: 36px; font-size: 13px; border: 2px solid var(--surface); }
.stack-av .avatar + .avatar { margin-left: -12px; }
.srow {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
}
.srow .slot-date { width: 52px; height: 56px; flex: none; }
.srow-status { color: var(--muted); }
.srow-status.ok { color: var(--accent); }
.srow-actions { display: flex; gap: 6px; }
.srow.is-off { opacity: .6; }
.slot-date.is-on { background: var(--accent); color: var(--on-accent); }
.slot-date.is-on small { color: var(--on-accent); }
.thread .slot-date { width: 48px; height: 52px; flex: none; }

/* ---------- Réserver ---------- */
.ticket {
  position: relative; display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px;
  padding: 18px 20px 14px; border-radius: 22px; background: var(--accent); color: var(--on-accent);
}
.ticket-time { font-family: var(--display); font-size: 64px; line-height: .95; }
.ticket-meta { font-weight: 600; }
.ticket-cut {
  display: block; margin: 10px -20px 6px; border-top: 2px dashed color-mix(in srgb, var(--on-accent) 25%, transparent);
}
.ticket::before, .ticket::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); bottom: 40px;
}
.ticket::before { left: -10px; }
.ticket::after { right: -10px; }
.ticket-foot { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.book { gap: 22px; padding-bottom: 8px; }
.day[disabled] { opacity: .35; cursor: default; }
.days { scroll-snap-type: x proximity; margin: 0 -20px; padding: 0 20px 4px; }
.day { scroll-snap-align: start; transition: transform .12s ease-out; }
.times { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.times .chip { padding: 0; font-variant-numeric: tabular-nums; }
.seg {
  display: flex; padding: 4px; gap: 4px; border-radius: var(--radius-m);
  background: var(--surface); border: 1px solid var(--line);
}
.seg > button, .seg > label {
  flex: 1 1 0; min-width: 0; min-height: 40px; display: grid; place-items: center; padding: 0 6px;
  border: 0; border-radius: var(--radius-s); background: none; color: var(--muted);
  font-weight: 700; font-size: 14px; cursor: pointer; transition: background .15s, color .15s;
}
.seg > button[aria-pressed="true"], .seg > label:has(input:checked) { background: var(--accent); color: var(--on-accent); }
.seg > button[disabled] { opacity: .35; cursor: default; }
.seg > label input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; pointer-events: none; }
.seg > label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg-4 > button { font-size: 13px; }
.seg-sm { flex: none; }
.seg-sm > button { min-height: 34px; font-size: 13px; padding: 0 10px; }
.book-bar {
  position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); z-index: 5;
  padding: 12px 0 4px; margin-top: 16px;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.book-bar .btn { min-height: 56px; font-size: 17px; }

/* ---------- Membres (swipe) ---------- */
.sw { display: flex; flex-direction: column; gap: 14px; }
.sw .top { margin-bottom: 0; }
.sw-deck { height: min(calc(100dvh - 330px), 560px); min-height: 360px; }
.sw-card { border: 0; background: var(--raised); box-shadow: 0 20px 40px -20px rgb(0 0 0 / .7); border-radius: 26px; }
.sw-photo { position: absolute; inset: 0; }
.sw-photo.is-art {
  background:
    radial-gradient(circle at 80% 15%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%),
    repeating-linear-gradient(135deg, transparent 0 22px, rgb(255 255 255 / .025) 22px 44px),
    var(--raised);
}
.sw-photo::after { height: 62%; background: linear-gradient(transparent, rgb(13 14 16 / .96) 75%); }
.sw-ini { font-size: 150px; opacity: .9; margin-bottom: 30%; }
.sw-who { left: 20px; right: 20px; bottom: 20px; gap: 10px; }
.sw-who h2 { font-size: 44px; text-transform: uppercase; display: flex; align-items: baseline; gap: 10px; }
.sw-who h2 span { font-family: var(--display); font-size: 30px; color: var(--accent); font-weight: 400; }
.sw-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: rgb(255 255 255 / .1); color: var(--text); }
.tag-accent { background: var(--accent); color: var(--on-accent); }
.sw-bio {
  margin: 0; font-size: 15px; color: #D7D8DA;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sw-wants {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 1; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700;
}
.sw-stamp { top: 60px; font-size: 34px; background: rgb(13 14 16 / .35); }
.sw-stamp--no { color: #fff; }
.sw-empty {
  display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 26px;
  background: var(--surface); border: 1px dashed var(--line);
}
.sw-empty[hidden] { display: none; }
.sw-empty-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.sw-actions { gap: 18px; }
.sw-act { transition: transform .15s ease-out, background .15s; }
.sw-act--no { width: 64px; height: 64px; }
.sw-act--yes { width: 76px; height: 76px; box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.sw-act-gap { width: 44px; }
.sw-pair { align-items: center; }
.sw-pair-mid {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; z-index: 1;
  margin: 0 -14px; background: var(--accent); color: var(--on-accent); border: 3px solid var(--surface);
}
.sw-pair .avatar + .sw-pair-mid + .avatar { margin-left: 0; }

/* ---------- Messages ---------- */
.rail { display: flex; gap: 14px; overflow-x: auto; margin: 0 -20px; padding: 4px 20px 6px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-item { flex: none; width: 64px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; font-size: 12px; font-weight: 600; }
.rail-item > span:last-child { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-ring { padding: 3px; border-radius: 50%; background: conic-gradient(var(--accent), #8BD43A, var(--accent)); }
.rail-ring .avatar { border: 3px solid var(--bg); }
.rail-add { background: var(--surface); border: 1px dashed var(--line); color: var(--accent); }
.thread { gap: 12px; padding: 12px; }
.thread h3 { font-size: 16px; }
.thread-prev { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.thread.is-unread h3, .thread.is-unread .thread-prev { color: var(--text); font-weight: 700; }
.thread .spread { gap: 8px; }
.empty-mini { padding: 14px; border-radius: var(--radius-l); border: 1px dashed var(--line); }

/* discussion */
.chatbar {
  position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 10px;
  margin: calc(-24px - env(safe-area-inset-top, 0px)) -20px 0;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.chatbar .icon-btn { border: 0; }
.chatbar-title { font-family: var(--body); font-size: 17px; font-weight: 700; line-height: 1.2; }
.chatbar .avatar { width: 40px; height: 40px; flex-basis: 40px; font-size: 14px; }
.chat { padding-top: 12px; }
.messages { gap: 3px; }
.day-sep { display: flex; justify-content: center; margin: 14px 0 8px; }
.day-sep span { font-size: 12px; font-weight: 700; color: var(--muted); padding: 3px 10px; border-radius: 999px; background: var(--surface); }
.bubble-wrap.first { margin-top: 8px; }
.bubble-author { margin-left: 4px; }
.bubble { max-width: 78%; border-radius: 18px; padding: 9px 12px 7px; }
.bubble time { display: block; text-align: right; font-size: 11px; opacity: .6; margin-top: 2px; }
.bubble-wrap:not(.mine).first .bubble { border-bottom-left-radius: 6px; }
.bubble-wrap.mine.first .bubble { border-bottom-right-radius: 6px; }
.mine .bubble { border-radius: 18px; }
.chat-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 32px 12px; color: var(--muted); }
.chat-empty strong { color: var(--text); }
.composer {
  align-items: center; padding: 10px 0 6px;
  background: linear-gradient(to top, var(--bg) 75%, transparent);
}
.composer input { border-radius: 999px; padding: 0 18px; min-height: 48px; background: var(--surface); }
.send-btn {
  width: 48px; height: 48px; flex: none; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent);
  transition: transform .12s ease-out, opacity .15s;
}
.send-btn:active { transform: scale(.92); }
.send-btn[disabled] { opacity: .35; cursor: default; }
.mates { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mate { display: flex; align-items: center; gap: 12px; }
.mate .icon-btn { border: 0; }
.veil { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 32px 4px; }
.veil h2 { font-size: 30px; text-transform: uppercase; }
.veil p { max-width: 34ch; }
.veil strong { color: var(--accent); }
.veil-faces { display: flex; margin-bottom: 8px; }
.veil-faces .avatar { border: 3px solid var(--bg); }
.veil-faces .avatar + .avatar { margin-left: -18px; }
.veil-q {
  font-family: var(--display); font-size: 40px; font-weight: 400; color: var(--accent);
  background: repeating-linear-gradient(135deg, var(--surface) 0 8px, var(--raised) 8px 16px);
}

/* ---------- Profil ---------- */
.avatar.xxl { width: 112px; height: 112px; flex-basis: 112px; font-size: 34px; font-family: var(--display); font-weight: 400; color: var(--accent); }
.me-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 24px 18px 18px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line);
  background-image: radial-gradient(circle at 50% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%);
}
.me-photo { position: relative; }
.me-photo .avatar { border: 3px solid var(--bg); outline: 2px solid var(--accent); }
.me-cam {
  position: absolute; right: -2px; bottom: -2px; width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent); border: 3px solid var(--surface);
}
.me-cam:hover { filter: brightness(1.06); }
.me-name { font-size: 40px; text-transform: uppercase; display: flex; align-items: baseline; gap: 10px; }
.me-name span { color: var(--accent); font-size: 28px; }
.me-card .sw-tags { justify-content: center; }
.me-card .tag:not(.tag-accent) { background: var(--raised); }
.me-actions { justify-content: center; align-items: center; }
.me-actions .btn.link { min-height: 32px; padding: 0 8px; font-size: 14px; }
.group {
  display: flex; flex-direction: column; gap: 16px; padding: 18px;
  border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line);
}
.group input, .group select, .group textarea, .group .chip, .group .seg { background: var(--bg); }
.group .chip[aria-pressed="true"] { background: var(--accent); }
.switch-row { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.switch-row > span { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.switch {
  appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 32px; min-height: 0; padding: 0; margin: 0;
  border-radius: 999px; border: 0; background: var(--raised); position: relative; cursor: pointer; transition: background .2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; transition: transform .2s cubic-bezier(.3, .7, .4, 1);
}
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); background: var(--on-accent); }

@media (hover: hover) and (pointer: fine) {
  .srow:hover, .thread:hover { background: var(--raised); }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .icon-btn, .sw-act, .switch, .switch::after, .seg > button, .send-btn { transition: none; }
}

.next-actions .btn.dark { flex: 1; }
.next-actions .btn.ghost-dark { padding: 0 16px; }
.book-bar { bottom: calc(env(safe-area-inset-bottom, 0px) + 72px); padding-bottom: 12px; background: linear-gradient(to top, var(--bg) 82%, transparent); }
.composer { bottom: calc(env(safe-area-inset-bottom, 0px) + 72px); padding-bottom: 10px; }
.group .chip-grid .chip { font-size: 14px; padding: 0 4px; }
.sw .seg-sm { margin-top: -4px; }
.sw-deck { height: min(calc(100dvh - 360px), 540px); }
.days { scroll-padding-inline: 20px; }

.chat { padding-bottom: 76px; }
.composer {
  position: fixed; left: 50%; transform: translateX(-50%); width: min(480px, 100%); z-index: 6;
  padding: 10px 20px; bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
}
html { scroll-padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 160px); }

/* ---------- Salles ---------- */
.tiny { font-size: 12px; margin: 0; }
.gp { max-height: min(78dvh, 640px); }
.gp-search { display: flex; gap: 8px; }
.gp-search input { flex: 1; min-width: 0; }
.gp-search .btn { flex: none; min-height: 50px; }
.gp-search .btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.gp-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 46dvh; min-height: 120px; margin: 0 -6px; padding: 0 6px; }
.gp-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  padding: 12px; border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--bg); color: var(--text);
}
.gp-item:hover { background: var(--raised); }
.gp-item[aria-current="true"] { border-color: var(--accent); }
.gp-item .person-info, .gym-row .person-info { display: flex; flex-direction: column; gap: 2px; }
.gp-item .tag, .gym-row .tag { flex: none; background: var(--raised); }
.gp-item .tag-accent, .gym-row .tag-accent { background: var(--accent); }
.gym-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gym-row .person-info { min-width: 140px; }
.next.wait .next-title { font-size: 38px; overflow-wrap: anywhere; }
.meter { height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--on-accent) 16%, transparent); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--on-accent); border-radius: 5px; transition: width .6s cubic-bezier(.3, .7, .4, 1); }
.salle-row { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) { .meter i { transition: none; } }

/* ---------- Encart « Ma salle » ---------- */
.gym-photo { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--raised); }
.gym-photo.is-art {
  display: grid; place-items: center; font-family: var(--display); font-size: 56px; color: var(--accent);
  background:
    radial-gradient(circle at 85% 10%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 55%),
    repeating-linear-gradient(135deg, transparent 0 18px, rgb(255 255 255 / .03) 18px 36px),
    var(--raised);
}
.gym-card { overflow: hidden; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.gym-card-photo { aspect-ratio: 16 / 7; }
.gym-card-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 14px 16px 16px; }
.gym-card-body .person-info { display: flex; flex-direction: column; gap: 4px; }
.gym-card-name { font-size: 26px; text-transform: uppercase; line-height: 1; overflow-wrap: anywhere; }
.gym-card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.gym-card .tag:not(.tag-accent) { background: var(--raised); }
.gp-thumb { width: 52px; height: 52px; aspect-ratio: 1; border-radius: 12px; flex: none; font-size: 18px; }
.salle-photo { overflow: hidden; border-radius: var(--radius-m); border: 1px solid var(--line); }
