/* =========================================================
   GF App – thème Dark Gym Premium (mobile d'abord)
   ========================================================= */
:root {
  --ink: #0f1115;
  --coal: #181a20;
  --steel: #22252d;
  --line: rgba(255, 255, 255, .08);
  --line-2: #2a2d36;
  --text: #f4f4f5;
  --text-2: #d4d4d8;
  --muted: #a1a1aa;
  --faint: #71717a;
  --gold: #e5a910;
  --gold-2: #f5c542;
  --red: #dc2626;
  --red-2: #f87171;
  --green: #4ade80;
  --amber: #fbbf24;
  --wa: #1faa53;
  --radius: 1.1rem;
  --tabbar-h: 4.25rem;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; min-height: 100dvh; background: var(--ink); color: var(--text-2);
  font: 15px/1.5 Inter, system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }

.i { width: 1.25rem; height: 1.25rem; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* ---------- Typographie ---------- */
.display { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 2.6rem; line-height: 1; letter-spacing: .02em; color: #fff; margin-bottom: .9rem; }
.display .muted { font-size: 1.6rem; }
.h1 { font-size: 1.35rem; font-weight: 800; color: #fff; line-height: 1.2; }
.h2 { font-size: 1.15rem; font-weight: 800; color: #fff; line-height: 1.25; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
.block { display: block; }
.mt-xs { margin-top: .4rem; }
.mt-s { margin-top: .9rem; }
.pre { white-space: pre-line; }
.text-lead { color: var(--text-2); margin-bottom: 1.1rem; line-height: 1.6; }
.txt-danger { color: var(--red-2) !important; }
.w-full { width: 100%; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem;
  padding: .75rem 1.2rem; border-radius: .9rem; font-weight: 700; line-height: 1.15; text-align: center;
  transition: transform .12s, background .2s, border-color .2s, opacity .2s; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.sm { min-height: 2.5rem; padding: .5rem .9rem; font-size: .88rem; border-radius: .75rem; }
.btn-gold { color: var(--ink); background: linear-gradient(135deg, var(--gold-2), var(--gold) 60%); box-shadow: 0 10px 24px -12px rgba(229, 169, 16, .8); }
.btn-wa { color: #fff; background: var(--wa); }
.btn-ghost { color: var(--text); background: rgba(255, 255, 255, .04); border: 1.5px solid var(--line-2); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .25); }
.btn-danger { color: #fff; background: var(--red); }
.btn.danger, .btn-ghost.danger { color: var(--red-2); }

.icon-btn { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: .8rem; color: var(--text-2); flex-shrink: 0; transition: background .2s; }
.icon-btn:hover, .icon-btn:active { background: rgba(255, 255, 255, .07); }
.icon-btn.sm { width: 2.2rem; height: 2.2rem; }
.icon-btn.sm .i { width: 1.05rem; height: 1.05rem; }
.icon-btn.wa { color: #fff; background: var(--wa); }
.icon-btn:disabled { opacity: .35; }

.spinner { width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 4rem 0; color: var(--gold); }

/* ---------- Formulaires ---------- */
.stack { display: grid; gap: .9rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.field { display: grid; gap: .35rem; }
.field > span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.field > span small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.input {
  width: 100%; min-height: 2.9rem; padding: .7rem .9rem; border-radius: .8rem; font: inherit; font-size: 16px; color: #fff;
  background: var(--ink); border: 1.5px solid var(--line-2); transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: #52525b; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(229, 169, 16, .15); }
.input.sm { min-height: 2.4rem; font-size: 14px; padding: .45rem .75rem; }
.input.strong { font-weight: 700; }
.input.time { max-width: 6rem; }
textarea.input { resize: vertical; line-height: 1.5; }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 2.4rem;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E5A910' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8rem center / 1rem;
}
input[type="date"].input { color-scheme: dark; }
.pin-input { letter-spacing: .5em; font-size: 1.3rem; text-align: center; }
.prefix { display: flex; }
.prefix em { display: grid; place-items: center; padding: 0 .8rem; font-style: normal; font-weight: 700; color: var(--gold); background: var(--steel); border: 1.5px solid var(--line-2); border-right: 0; border-radius: .8rem 0 0 .8rem; }
.prefix .input { border-radius: 0 .8rem .8rem 0; }
.check-field { display: flex; align-items: center; gap: .6rem; padding-top: 1.3rem; font-weight: 600; color: var(--text); }
.check-field input { width: 1.3rem; height: 1.3rem; accent-color: var(--gold); }
.form-error { min-height: 1.2rem; color: var(--red-2); font-size: .88rem; font-weight: 600; text-align: center; }
.row-btns { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.row-btns .btn { flex: 1; }

/* ---------- Connexion ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem 1rem calc(1.5rem + var(--safe-b));
  background: radial-gradient(ellipse at 80% 0%, rgba(229, 169, 16, .14), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(220, 38, 38, .12), transparent 50%), var(--ink); }
.login-card { width: 100%; max-width: 24rem; display: grid; gap: 1.2rem; }
.brand { display: flex; align-items: center; gap: .75rem; justify-content: center; }
.brand strong { display: block; font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 1.5rem; letter-spacing: .06em; color: #fff; line-height: 1; }
.brand small { display: block; font-size: .62rem; font-weight: 800; letter-spacing: .3em; color: var(--gold); }
.logo {
  display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: .8rem; transform: skewX(-6deg);
  font-family: "Bebas Neue", Impact, sans-serif; font-size: 1.5rem; color: var(--ink);
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, #b8860b); box-shadow: 0 8px 20px -8px rgba(229, 169, 16, .7);
}
.brand.sm { justify-content: flex-start; gap: .6rem; font-weight: 700; color: #fff; }
.brand.sm .logo { width: 2.2rem; height: 2.2rem; font-size: 1.15rem; border-radius: .6rem; }

.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: .3rem; border-radius: 999px; background: var(--coal); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; padding: .7rem; border-radius: 999px; font-weight: 700; color: var(--muted); transition: color .2s; }
.seg button[aria-selected="true"] { color: var(--ink); }
.seg-ind { position: absolute; top: .3rem; bottom: .3rem; left: .3rem; width: calc(50% - .3rem); border-radius: 999px; background: linear-gradient(135deg, var(--gold-2), var(--gold)); transition: transform .3s cubic-bezier(.65, 0, .35, 1); }
.seg[data-active="coach"] .seg-ind { transform: translateX(100%); }
.ios-hint { padding: .8rem 1rem; border-radius: .9rem; background: var(--coal); border: 1px dashed var(--line-2); font-size: .85rem; text-align: center; color: var(--text-2); }

/* ---------- Structure de l'app ---------- */
.appbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: calc(.55rem + env(safe-area-inset-top, 0px)) 1rem .55rem; background: rgba(15, 17, 21, .9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.appbar-actions { display: flex; gap: .25rem; }
.view { max-width: 44rem; margin: 0 auto; padding: 1.2rem 1rem calc(var(--tabbar-h) + var(--safe-b) + 5.5rem); display: grid; gap: 1rem; align-content: start; }
.tabbar {
  position: fixed; inset: auto 0 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(24, 26, 32, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line);
}
.tab-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; font-size: .68rem; font-weight: 600; color: var(--faint); transition: color .2s; }
.tab-link.on { color: var(--gold); }
.tab-icon { position: relative; display: grid; place-items: center; width: 3.2rem; height: 1.9rem; border-radius: 999px; transition: background .2s; }
.tab-link.on .tab-icon { background: rgba(229, 169, 16, .14); }
.tab-icon .dot { position: absolute; top: -.2rem; right: .35rem; min-width: 1.1rem; height: 1.1rem; padding: 0 .25rem; border-radius: 999px; background: var(--red); color: #fff; font-size: .62rem; font-weight: 800; display: grid; place-items: center; }
@media (min-width: 900px) { .tabbar { max-width: 44rem; margin: 0 auto; border: 1px solid var(--line); border-bottom: 0; border-radius: 1.2rem 1.2rem 0 0; } }

/* ---------- Cartes, listes ---------- */
.card { padding: 1.1rem; border-radius: var(--radius); background: var(--coal); border: 1px solid var(--line); }
.card-title { display: flex; align-items: center; gap: .5rem; font-size: .95rem; font-weight: 800; color: #fff; margin-bottom: .2rem; }
.card-title .i { color: var(--gold); }
.card-link { display: flex; align-items: center; gap: .85rem; transition: border-color .2s; }
.card-link:hover { border-color: rgba(229, 169, 16, .4); }
.card-icon { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: .9rem; flex-shrink: 0; color: var(--gold); background: rgba(229, 169, 16, .12); }
.card-icon.sm { width: 2.3rem; height: 2.3rem; border-radius: .7rem; }
.card-icon.sm .i { width: 1.05rem; height: 1.05rem; }

.list { display: grid; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--coal); }
.list-item { position: relative; display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; min-height: 4rem; text-align: left; width: 100%; }
.list-item + .list-item { border-top: 1px solid var(--line); }
a.list-item:active, button.list-item:active { background: rgba(255, 255, 255, .03); }
.list-cover { position: absolute; inset: 0; }
.list-item .above { position: relative; z-index: 1; }
.list-main { flex: 1; min-width: 0; display: grid; }
.list-main strong { color: #fff; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-main small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; flex-shrink: 0; font-weight: 800; font-size: .8rem; color: var(--ink); background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.avatar.lg { width: 4rem; height: 4rem; font-size: 1.2rem; }

.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 800; white-space: nowrap; background: var(--steel); color: var(--text-2); }
.badge .i { width: .85rem; height: .85rem; stroke-width: 3; }
.badge-active { background: rgba(74, 222, 128, .14); color: var(--green); }
.badge-soon { background: rgba(251, 191, 36, .15); color: var(--amber); }
.badge-expired { background: rgba(220, 38, 38, .18); color: var(--red-2); }
.badge-none, .badge-archived { background: var(--steel); color: var(--muted); }

/* ---------- Tableau de bord ---------- */
.hello .muted { text-transform: capitalize; font-size: .85rem; }
.hello .display { margin: .1rem 0 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.stat { padding: .9rem; border-radius: var(--radius); background: var(--coal); border: 1px solid var(--line); }
.stat span { display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); line-height: 1.3; }
.stat strong { display: block; margin-top: .35rem; font-size: 1.7rem; font-weight: 800; color: #fff; line-height: 1; }
.stat em { font-style: normal; font-size: .72rem; color: var(--faint); }
.stats.three .stat strong { font-size: 1.4rem; }
.stat-warn strong { color: var(--amber); }
.stat-danger strong { color: var(--red-2); }
.stat-gold { border-color: rgba(229, 169, 16, .35); background: linear-gradient(160deg, #241e0f, var(--coal) 60%); }
.stat-gold strong { color: var(--gold-2); }

.alert { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border-radius: var(--radius); font-size: .9rem; }
.alert > span { flex: 1; display: grid; }
.alert small { color: var(--muted); }
.alert-gold { background: rgba(229, 169, 16, .1); border: 1px solid rgba(229, 169, 16, .4); color: var(--gold-2); }
.alert-gold strong { color: #fff; }
.alert-muted { background: var(--coal); border: 1px dashed var(--line-2); color: var(--text-2); }
.alert-muted .i { color: var(--gold); }

.section { display: grid; gap: .7rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.section-head h2 { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }

.fab {
  position: fixed; right: max(1rem, calc(50% - 21rem)); bottom: calc(var(--tabbar-h) + var(--safe-b) + 1rem); z-index: 15;
  display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 1.2rem; color: var(--ink);
  background: linear-gradient(135deg, var(--gold-2), var(--gold)); box-shadow: 0 14px 30px -10px rgba(229, 169, 16, .8);
}
.fab .i { width: 1.6rem; height: 1.6rem; stroke-width: 2.5; }

.empty { display: grid; justify-items: center; gap: .5rem; padding: 2.5rem 1rem; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 1.1rem; color: var(--gold); background: rgba(229, 169, 16, .1); margin-bottom: .3rem; }
.empty-icon .i { width: 1.7rem; height: 1.7rem; }
.empty h3 { color: #fff; font-size: 1.05rem; }
.empty p { color: var(--muted); max-width: 20rem; font-size: .9rem; }
.empty .btn { margin-top: .6rem; }

/* ---------- Recherche, filtres, onglets ---------- */
.search { display: flex; align-items: center; gap: .6rem; padding: 0 .9rem; border-radius: .9rem; background: var(--coal); border: 1.5px solid var(--line-2); color: var(--faint); }
.search:focus-within { border-color: var(--gold); }
.search input { flex: 1; min-height: 2.9rem; border: 0; outline: 0; background: none; color: #fff; font: inherit; font-size: 16px; }
.chips { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; margin: 0 -1rem; padding: 0 1rem; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: .5rem .9rem; border-radius: 999px; font-size: .84rem; font-weight: 600; color: var(--text-2); background: var(--coal); border: 1px solid var(--line-2); }
.chip.on { color: var(--ink); background: var(--gold); border-color: var(--gold); }
.template-picker { display: grid; gap: .45rem; }
.template-picker .chips { margin: 0; padding: 0; flex-wrap: wrap; }

.tabs { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin: 0 -1rem; padding: 0 1rem; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 1 0 auto; padding: .75rem .45rem; font-weight: 700; font-size: .84rem; text-align: center; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--gold); border-bottom-color: var(--gold); }

/* ---------- Fiche membre ---------- */
.back { display: inline-flex; align-items: center; gap: .2rem; color: var(--muted); font-weight: 600; font-size: .9rem; margin-left: -.3rem; }
.profile-head { display: flex; align-items: center; gap: 1rem; }
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.qa { display: grid; justify-items: center; gap: .35rem; padding: .75rem .3rem; border-radius: .9rem; background: var(--coal); border: 1px solid var(--line); font-size: .72rem; font-weight: 600; color: var(--text-2); }
.qa .i { color: var(--gold); }
.qa:disabled { opacity: .4; }
.danger-zone { display: flex; gap: .6rem; }
.danger-zone .btn { flex: 1; }

.sub-card { display: grid; gap: .4rem; border-left: 4px solid var(--faint); }
.sub-active { border-left-color: var(--green); }
.sub-soon { border-left-color: var(--amber); }
.sub-expired { border-left-color: var(--red); }
.sub-top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.days-left { display: flex; align-items: center; gap: .4rem; text-align: right; }
.days-left strong { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 3rem; line-height: .9; color: var(--gold-2); }
.days-left span { font-size: .7rem; color: var(--muted); line-height: 1.2; text-align: left; }
.bar { height: .5rem; border-radius: 999px; background: var(--steel); overflow: hidden; margin-top: .5rem; }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }

/* Éditeur de programme */
.pday { display: grid; gap: .6rem; }
.pday-head { display: flex; gap: .5rem; align-items: center; }
.pex-list { display: grid; gap: .6rem; }
.pex { display: grid; gap: .45rem; padding: .75rem; border-radius: .9rem; background: var(--ink); border: 1px solid var(--line); }
.pex-meta { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: .45rem; align-items: end; }
.pex-meta label { display: grid; gap: .2rem; }
.pex-meta small { font-size: .65rem; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.pex-meta .input { min-height: 2.4rem; padding: .4rem .55rem; font-size: 14px; }
.sticky-save { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + .6rem); z-index: 5; padding-top: .3rem; }
.sticky-save .btn { box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .9); }

.pin-box { display: grid; justify-items: center; gap: .4rem; padding: 1.2rem; margin-bottom: 1rem; border-radius: 1rem; background: var(--ink); border: 1.5px dashed var(--gold); text-align: center; }
.pin { font-family: "Bebas Neue", Impact, sans-serif; font-size: 3.2rem; letter-spacing: .15em; color: var(--gold-2); line-height: 1; }

/* Appel */
.att-bar { display: flex; gap: .6rem; align-items: center; }
.att-bar .input { flex: 1; }
.att .tick { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid var(--line-2); color: transparent; transition: all .15s; }
.att.on { background: rgba(74, 222, 128, .06); }
.att.on .tick { background: var(--green); border-color: var(--green); color: var(--ink); }
.att .tick .i { stroke-width: 3; width: 1.05rem; height: 1.05rem; }

/* Demandes */
.lead { display: grid; gap: .8rem; }
.lead-head { display: flex; align-items: center; gap: .75rem; }
.kv { display: grid; gap: .45rem; font-size: .88rem; }
.kv div { display: flex; justify-content: space-between; gap: 1rem; }
.kv dt { color: var(--muted); flex-shrink: 0; }
.kv dd { color: #fff; font-weight: 600; text-align: right; }
.link-box { display: block; padding: .7rem .9rem; border-radius: .7rem; background: var(--ink); color: var(--gold-2); font-size: .85rem; word-break: break-all; }

/* ---------- Membre : programme, nutrition ---------- */
.day { padding: 0; overflow: hidden; }
.day summary { display: flex; align-items: center; gap: .8rem; padding: 1rem; cursor: pointer; list-style: none; }
.day summary::-webkit-details-marker { display: none; }
.day .rot { color: var(--faint); transition: transform .2s; }
.day[open] .rot { transform: rotate(90deg); }
.day-num { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: .7rem; flex-shrink: 0; font-family: "Bebas Neue", Impact, sans-serif; font-size: 1.3rem; color: var(--ink); background: var(--gold); }
.day > .btn { margin: 0 1rem 1rem; width: calc(100% - 2rem); }
.ex-list { counter-reset: ex; padding: 0 1rem .8rem; display: grid; gap: .1rem; }
.ex-list li { counter-increment: ex; position: relative; display: grid; gap: .1rem; padding: .7rem 0 .7rem 2.2rem; border-top: 1px solid var(--line); }
.ex-list li::before { content: counter(ex); position: absolute; left: 0; top: .75rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; color: var(--gold); background: rgba(229, 169, 16, .12); }
.ex-list strong { color: #fff; }
.ex-meta { font-size: .85rem; color: var(--text-2); }
.ex-meta b { color: var(--gold-2); }
.today { border-color: rgba(229, 169, 16, .35); }

.kcal { display: flex; align-items: center; gap: .9rem; }
.kcal strong { display: block; font-size: 1.5rem; color: #fff; font-weight: 800; }
.timeline { display: grid; gap: .8rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: 2.6rem; top: .5rem; bottom: .5rem; width: 2px; background: var(--line-2); }
.timeline li { display: grid; grid-template-columns: 3.4rem 1fr; gap: .8rem; align-items: start; position: relative; }
.tl-time { padding-top: 1rem; font-size: .75rem; font-weight: 800; color: var(--gold); text-align: right; padding-right: .8rem; }
.timeline .card h3 { color: #fff; font-size: 1rem; margin-bottom: .3rem; }
.timeline .card p { font-size: .9rem; color: var(--text-2); }
.tips p { font-size: .9rem; margin-top: .4rem; }
.announce h3 { color: #fff; font-size: 1.05rem; margin: .3rem 0; }
.announce .muted .i { width: 1rem; height: 1rem; color: var(--gold); }
.announce p.pre { font-size: .9rem; }

/* ---------- Graphique & tableau ---------- */
.chart { min-height: 210px; margin-top: .5rem; }
.chart-wrap { position: relative; }
.chart svg { display: block; overflow: visible; touch-action: pan-y; }
.chart-empty { display: flex; align-items: center; gap: .5rem; justify-content: center; min-height: 160px; color: var(--muted); font-size: .9rem; text-align: center; }
.c-grid { stroke: rgba(255, 255, 255, .07); stroke-width: 1; }
.c-axis { fill: var(--faint); font-size: 11px; font-family: Inter, sans-serif; }
.c-line { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.c-dot { fill: var(--gold); stroke: var(--coal); stroke-width: 2; }
.c-label { fill: var(--text); font-size: 12px; font-weight: 700; font-family: Inter, sans-serif; }
.c-cross { stroke: rgba(255, 255, 255, .25); stroke-width: 1; stroke-dasharray: 3 3; }
.c-focus { fill: var(--gold-2); stroke: var(--coal); stroke-width: 2; }
.c-tip { position: absolute; transform: translate(-50%, -100%); pointer-events: none; display: grid; gap: .05rem; padding: .45rem .7rem; border-radius: .6rem; background: #fff; color: var(--ink); font-size: .78rem; white-space: nowrap; box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .7); }
.c-tip strong { font-size: .95rem; }
.c-tip span { color: #52525b; }
.c-tip em { font-style: normal; font-weight: 700; color: #52525b; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--coal); }
.table { width: 100%; border-collapse: collapse; font-size: .85rem; white-space: nowrap; }
.table th { text-align: left; padding: .65rem .8rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--line); }
.table td { padding: .55rem .8rem; border-top: 1px solid var(--line); color: var(--text-2); }
.table td strong { color: #fff; }
.table .note-row td { border-top: 0; padding-top: 0; font-size: .78rem; color: var(--muted); white-space: normal; }

/* ---------- Fenêtre du bas ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; justify-items: center; }
@media (min-width: 640px) { .sheet { align-items: center; } }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .7); animation: fade .2s; }
.sheet-card {
  position: relative; width: 100%; max-width: 32rem; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: .6rem 1.2rem calc(1.4rem + var(--safe-b)); border-radius: 1.4rem 1.4rem 0 0;
  background: var(--coal); border: 1px solid var(--line); animation: up .28s cubic-bezier(.2, .9, .3, 1);
}
@media (min-width: 640px) { .sheet-card { border-radius: 1.4rem; padding-bottom: 1.4rem; } }
.sheet-grip { width: 2.6rem; height: .3rem; border-radius: 999px; background: var(--line-2); margin: 0 auto .6rem; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.sheet-head h2 { font-size: 1.15rem; color: #fff; font-weight: 800; }
.sheet.closing .sheet-card { animation: down .18s ease-in forwards; }
.sheet.closing .sheet-backdrop { animation: fade .18s reverse forwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes down { to { transform: translateY(40px); opacity: 0; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 1rem); z-index: 60; max-width: calc(100% - 2rem);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: all .25s;
  padding: .75rem 1.1rem; border-radius: .9rem; font-weight: 600; font-size: .9rem; background: #fff; color: var(--ink);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, .8);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[data-type="error"] { background: var(--red); color: #fff; }
.toast[data-type="warn"] { background: var(--amber); }
.toast[data-type="ok"] { background: var(--green); }

@media (max-width: 360px) {
  .stats.three { grid-template-columns: 1fr 1fr; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Coach : encaissements ---------- */
.rev-card { display: grid; gap: .6rem; }
.rev-chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; height: 8.5rem; align-items: end; }
.rev-bar { display: grid; grid-template-rows: 1fr auto; gap: .35rem; height: 100%; align-items: end; justify-items: center; padding: 0; }
.rev-fill { width: 100%; max-width: 2.6rem; border-radius: 4px 4px 0 0; background: rgba(229, 169, 16, .35); transition: background .2s; align-self: end; }
.rev-bar.on .rev-fill, .rev-bar:hover .rev-fill { background: var(--gold); }
.rev-bar small { font-size: .7rem; color: var(--faint); text-transform: capitalize; }
.rev-bar.on small { color: var(--text); font-weight: 700; }
.rev-caption strong { color: #fff; }

/* ---------- Coach : éditeur du site ---------- */
.card-feature { border-color: rgba(229, 169, 16, .45); background: linear-gradient(160deg, #241e0f, var(--coal) 60%); }
.editor-sec { padding: 0; overflow: hidden; }
.editor-sec summary { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; cursor: pointer; list-style: none; color: #fff; }
.editor-sec summary::-webkit-details-marker { display: none; }
.editor-sec summary strong { flex: 1; }
.editor-sec .rot { color: var(--faint); transition: transform .2s; }
.editor-sec[open] .rot { transform: rotate(90deg); }
.editor-body { padding: 0 1rem 1.1rem; }
.sub-title { margin-top: .4rem; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); }
.sub-card-edit { display: grid; gap: .7rem; padding: .9rem; border-radius: .9rem; background: var(--ink); border: 1px solid var(--line); }
.check-field.slim { padding-top: 1.5rem; font-size: .88rem; }

.photo-slot { display: flex; gap: .9rem; align-items: center; padding: .7rem; border-radius: .9rem; background: var(--ink); border: 1px solid var(--line); }
.photo-thumb { width: 5.5rem; height: 5.5rem; flex-shrink: 0; border-radius: .7rem; overflow: hidden; display: grid; place-items: center; background: var(--steel); color: var(--faint); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-info { display: grid; gap: .3rem; min-width: 0; }
.photo-info strong { color: #fff; }
.photo-info .row-btns .btn { flex: 0 0 auto; }

.gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .6rem; }
.gallery-cell { display: grid; gap: .35rem; padding: .4rem; border-radius: .8rem; background: var(--ink); border: 1px solid var(--line); }
.gallery-cell img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .55rem; }
.cell-actions { display: flex; justify-content: space-between; }

.avatar-edit { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; flex-shrink: 0; overflow: hidden; cursor: pointer; color: var(--gold); background: rgba(229, 169, 16, .12); border: 1.5px dashed rgba(229, 169, 16, .5); }
.avatar-edit img { width: 100%; height: 100%; object-fit: cover; }

.day-picks { display: flex; flex-wrap: wrap; gap: .4rem; }
.day-pick input { position: absolute; opacity: 0; pointer-events: none; }
.day-pick span { display: block; padding: .5rem .7rem; border-radius: .7rem; font-weight: 700; font-size: .85rem; color: var(--muted); background: var(--ink); border: 1.5px solid var(--line-2); cursor: pointer; }
.day-pick input:checked + span { color: var(--ink); background: var(--gold); border-color: var(--gold); }
.day-pick input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.sticky-save .unsaved { display: flex; align-items: center; gap: .4rem; justify-content: center; margin-bottom: .4rem; font-size: .8rem; font-weight: 700; color: var(--amber); }
.sticky-save.idle .btn { box-shadow: none; }
.alert.small { font-size: .82rem; }

/* Vidéo de la salle */
.video-slot .photo-thumb { position: relative; }
.play-badge { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .3); }
.play-badge .i { width: 1.6rem; height: 1.6rem; stroke: none; }
.upload-progress { position: relative; height: 1.4rem; border-radius: 999px; background: var(--steel); overflow: hidden; }
.upload-progress span { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .3s; }
.upload-progress em { position: relative; display: block; text-align: center; font-style: normal; font-size: .72rem; font-weight: 800; line-height: 1.4rem; color: #fff; mix-blend-mode: difference; }
.tip { display: flex; gap: .45rem; align-items: flex-start; line-height: 1.45; }
.tip .i { width: 1rem; height: 1rem; color: var(--gold); margin-top: .1rem; }
.preview-video { width: 100%; max-height: 70dvh; border-radius: .8rem; background: #000; }

/* Création de compte */
.or { display: flex; align-items: center; gap: .8rem; color: var(--faint); font-size: .8rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.welcome-card { display: grid; gap: .7rem; border-color: rgba(229, 169, 16, .45); background: linear-gradient(160deg, #241e0f, var(--coal) 60%); }
.welcome-card h2 { color: #fff; font-size: 1.1rem; }
.welcome-card ol { display: grid; gap: .45rem; counter-reset: st; }
.welcome-card li { counter-increment: st; display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; }
.welcome-card li::before { content: counter(st); display: grid; place-items: center; width: 1.4rem; height: 1.4rem; flex-shrink: 0; border-radius: 50%; font-size: .72rem; font-weight: 800; color: var(--ink); background: var(--gold); }
.welcome-card li.done::before { content: "✓"; background: var(--green); }
.grid-2 .pin-input { letter-spacing: .3em; }
