/* ============================================================
   GymXYZ — MOBILE app styles (the desktop "pendant")
   Built on the SAME TechXYZ design tokens (var(--*)) and the
   SAME white-label theme layer (themes.css). Nothing here
   hard-codes a brand colour — everything resolves through the
   themed ramp, so the 3 brands reskin the phone live too.

   Namespace: .gx-m-*  (mobile). Desktop classes (.gx-*) are
   untouched — the two apps share data + tokens, not layout.
   ============================================================ */

/* The global reset and the body rules live in app.css — both files loaded
   together, identical declarations, kept in one place.
   The prototype's phone frame (.gx-m-stage / .gx-m-scale) is a presentation
   artifice and is not ported: here the mobile canvas IS the page. */

/* ============================================================
   APP CANVAS
   ============================================================ */
.gx-m-app {
  height: 100%;
  display: flex; flex-direction: column;
  background: var(--surface-page);
  color: var(--text-body);
  position: relative;
  overflow: hidden;
}

/* ---------- Header (sticky) ---------- */
.gx-m-head {
  flex: none;
  /* The status bar is a device inset, not a constant: the prototype draws a
     phone frame and bakes in 54px, which is dead space in a browser. Same
     pattern as the bottom bars below. */
  padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 12px;
  background: var(--gx-tb-bg);
  -webkit-backdrop-filter: var(--blur-glass); backdrop-filter: var(--blur-glass);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 6;
}
.gx-m-head-top { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.gx-m-head .lead { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; }
.gx-m-back {
  width: 38px; height: 38px; flex: none; margin-left: -6px;
  display: grid; place-items: center; border-radius: var(--radius-md);
  color: var(--text-strong); cursor: pointer; background: none; border: 0;
}
.gx-m-back:active { background: var(--surface-sunken); }
.gx-m-back svg { width: 24px; height: 24px; }

.gx-m-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gx-m-brand .mark { width: 34px; height: 34px; flex: none; display: grid; place-items: center; color: var(--gx-sb-strong); }
.gx-m-brand .mark img { width: 100%; height: 100%; object-fit: contain; }
.gx-m-brand .mark.circle img { border-radius: 50%; }
.gx-m-brand .mark svg { width: 100%; height: 100%; }
.gx-m-wordmark {
  font-family: var(--font-accent);
  font-weight: var(--accent-weight);
  letter-spacing: var(--accent-letterspacing);
  text-transform: var(--accent-transform);
  font-size: var(--wordmark-size, 20px);
  line-height: var(--wordmark-lh, 1);
  color: var(--text-strong); white-space: nowrap;
}
.gx-m-wordmark .accent { color: var(--gx-sb-accent); }

.gx-m-htitle {
  flex: 1; min-width: 0;
  font-family: var(--font-display, var(--font-sans));
  font-size: calc(var(--text-xl) * var(--display-head-scale, 1));
  font-weight: var(--display-weight, var(--weight-bold));
  letter-spacing: var(--display-ls, var(--tracking-tight));
  text-transform: var(--display-tr, none);
  color: var(--text-strong); line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* round header action button (notif, search, avatar…) */
.gx-m-iconbtn {
  width: 40px; height: 40px; flex: none; position: relative;
  display: grid; place-items: center; border-radius: var(--radius-pill);
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  color: var(--text-body); cursor: pointer;
}
.gx-m-iconbtn:active { transform: scale(.96); }
.gx-m-iconbtn svg { width: 20px; height: 20px; }

/* greeting block (home) */
.gx-m-greet { padding: 4px 2px 2px; }
.gx-m-greet .hi {
  font-family: var(--font-display, var(--font-sans));
  font-size: calc(var(--text-2xl) * var(--display-title-scale, 1));
  font-weight: var(--display-weight, var(--weight-bold));
  letter-spacing: var(--display-ls, var(--tracking-tight));
  text-transform: var(--display-tr, none);
  color: var(--text-strong); line-height: 1.08;
}
.gx-m-greet .sub { font-size: var(--text-sm); color: var(--text-muted); margin-top: 4px; line-height: 1.4; }

/* inline search field */
.gx-m-search {
  display: flex; align-items: center; gap: 9px;
  height: 42px; padding: 0 14px; margin-top: 12px;
  background: var(--surface-sunken); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); color: var(--text-subtle); font-size: var(--text-sm);
}
.gx-m-search svg { width: 18px; height: 18px; flex: none; }

/* ---------- Scroll body ---------- */
.gx-m-body {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px 16px 108px;
}
.gx-m-body.flush { padding-left: 0; padding-right: 0; }
.gx-m-screen { animation: gx-m-rise .34s var(--ease-out) both; }
@keyframes gx-m-rise { from { transform: translateY(10px); opacity: .6; } to { transform: none; opacity: 1; } }
.gx-no-anim .gx-m-screen { animation: none !important; }

/* ---------- section label ---------- */
.gx-m-sec {
  display: flex; align-items: baseline; gap: 8px;
  margin: 22px 2px 10px;
}
.gx-m-sec:first-child { margin-top: 4px; }
.gx-m-sec .t {
  font-size: var(--text-2xs); font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wider); text-transform: uppercase;
  color: var(--text-subtle);
}
.gx-m-sec .more { margin-left: auto; font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--color-primary); display: inline-flex; align-items: center; gap: 3px; cursor: pointer; }
.gx-m-sec .more svg { width: 14px; height: 14px; }

/* ============================================================
   CARD
   ============================================================ */
.gx-m-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.gx-m-card + .gx-m-card { margin-top: 12px; }
.gx-m-card-h {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--border-subtle);
}
.gx-m-card-h .t {
  font-family: var(--font-display, var(--font-sans));
  font-size: calc(var(--text-md) * var(--display-head-scale, 1));
  font-weight: var(--display-weight, var(--weight-bold));
  letter-spacing: var(--display-ls, 0); color: var(--text-strong);
}
.gx-m-card-h .r { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: var(--text-xs); color: var(--text-muted); font-weight: var(--weight-semibold); }
.gx-m-card-pad { padding: 16px; }

/* ============================================================
   KPI tiles (2-up / 3-up grid)
   ============================================================ */
.gx-m-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gx-m-kpis.three { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gx-m-kpi {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
  padding: 13px 14px; position: relative; overflow: hidden;
}
.gx-m-kpi.spark { border-color: var(--azure-200); }
.gx-m-kpi.spark::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--gradient-spark); }
.gx-m-kpi .lab { font-size: var(--text-2xs); font-weight: var(--weight-bold); letter-spacing: .02em; text-transform: uppercase; color: var(--text-muted); }
.gx-m-kpi .val { font-size: var(--text-2xl); font-weight: var(--weight-bold); color: var(--text-strong); line-height: 1.04; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: var(--tracking-tight); }
.gx-m-kpi.three .val { font-size: var(--text-xl); }
.gx-m-kpi .delta { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; font-size: var(--text-2xs); font-weight: var(--weight-bold); color: var(--color-success); }
.gx-m-kpi .delta svg { width: 13px; height: 13px; }
.gx-m-kpi .sub { font-size: var(--text-2xs); color: var(--text-muted); margin-top: 5px; }

/* ============================================================
   BARS / RINGS / chips / tags
   ============================================================ */
.gx-m-bar { height: 7px; border-radius: var(--radius-pill); background: var(--surface-sunken); overflow: hidden; }
.gx-m-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--color-primary); }
.gx-m-bar.warn > i { background: var(--color-warning); }
.gx-m-bar.bad  > i { background: var(--color-danger); }
.gx-m-bar.ok   > i { background: var(--color-success); }

.gx-m-ring { position: relative; display: inline-grid; place-items: center; }
.gx-m-ring .ctr { position: absolute; inset: 0; display: grid; place-items: center; font-weight: var(--weight-bold); color: var(--text-strong); font-size: var(--text-sm); line-height: 1; }

.gx-m-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.gx-m-tag {
  font-size: var(--text-2xs); font-weight: var(--weight-semibold);
  color: var(--text-body); background: var(--surface-sunken);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-pill);
  padding: 3px 9px; white-space: nowrap;
}
.gx-m-tag.brand { background: var(--azure-50); border-color: var(--azure-100); color: var(--azure-700); }

/* discipline / studio icon tile */
.gx-m-ic {
  flex: none; border-radius: var(--radius-md); display: grid; place-items: center;
  width: 42px; height: 42px;
}
.gx-m-ic.lg { width: 54px; height: 54px; border-radius: var(--radius-lg); }
.gx-m-ic svg { width: 21px; height: 21px; }
.gx-m-ic.lg svg { width: 26px; height: 26px; }
.gx-m-ic.t-danger  { background: var(--danger-50);  color: var(--color-danger); }
.gx-m-ic.t-warning { background: var(--warning-50); color: var(--warning-600); }
.gx-m-ic.t-success { background: var(--success-50); color: var(--success-700); }
.gx-m-ic.t-brand   { background: var(--azure-50);   color: var(--color-primary); }
.gx-m-ic.t-neutral { background: var(--surface-sunken); color: var(--text-muted); }

/* avatar stack */
.gx-m-avstack { display: flex; align-items: center; }
.gx-m-avstack > * { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface-card); border-radius: 50%; }
.gx-m-avstack > *:first-child { margin-left: 0; }

/* ============================================================
   LIST ROW (members, coachs, encaissements…)
   ============================================================ */
.gx-m-rows { display: flex; flex-direction: column; }
.gx-m-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--border-subtle);
  cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; font-family: inherit;
}
.gx-m-row:last-child { border-bottom: 0; }
.gx-m-row:active { background: var(--surface-sunken); }
.gx-m-row .main { flex: 1; min-width: 0; }
.gx-m-row .nm { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--text-strong); display: flex; align-items: center; gap: 7px; }
.gx-m-row .nm .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-m-row .meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-m-row .trail { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.gx-m-row .chev { flex: none; color: var(--text-subtle); display: grid; place-items: center; }
.gx-m-row .chev svg { width: 18px; height: 18px; }
.gx-m-row .amt { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--text-strong); font-variant-numeric: tabular-nums; }

/* key/value rows */
.gx-m-kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); }
.gx-m-kv:last-child { border-bottom: 0; }
.gx-m-kv .k { font-size: var(--text-2xs); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-muted); font-weight: var(--weight-bold); flex: none; }
.gx-m-kv .v { font-size: var(--text-sm); color: var(--text-strong); font-weight: var(--weight-bold); text-align: right; }

/* ============================================================
   ACCUEIL — week strip, class rows
   ============================================================ */
.gx-m-weekstrip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.gx-m-weekstrip::-webkit-scrollbar { display: none; }
.gx-m-day {
  flex: none; width: 60px; text-align: center; cursor: pointer; position: relative;
  border: 1px solid var(--border-subtle); background: var(--surface-card);
  border-radius: var(--radius-md); padding: 10px 4px;
}
.gx-m-day:active { border-color: var(--color-primary); }
.gx-m-day .dn { font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: var(--weight-bold); }
.gx-m-day .nm { font-size: var(--text-xl); font-weight: var(--weight-bold); color: var(--text-strong); margin: 2px 0; }
.gx-m-day .ct { font-size: 10px; color: var(--color-primary); font-weight: var(--weight-bold); }
.gx-m-day.on { border-color: var(--color-primary); background: var(--azure-50); }
.gx-m-day .mk { position: absolute; top: 4px; right: 4px; width: 15px; height: 15px; border-radius: var(--radius-pill); display: grid; place-items: center; }
.gx-m-day .mk svg { width: 10px; height: 10px; }
/* Same rule as desktop: both calendar annotations take the warning ramp, and
   the icon (star vs sun) is what tells a public holiday from a school break. */
.gx-m-day .mk.ferie,
.gx-m-day .mk.vac { background: var(--warning-100); color: var(--warning-700); }

.gx-m-class { display: flex; align-items: center; gap: 13px; padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); cursor: pointer; }
.gx-m-class:last-child { border-bottom: 0; }
.gx-m-class:active { background: var(--surface-sunken); }
.gx-m-class .time { width: 46px; flex: none; font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--color-brand); font-variant-numeric: tabular-nums; }
.gx-m-class .main { flex: 1; min-width: 0; }
.gx-m-class .main .nm { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-m-class .main .meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-m-class .occ { width: 56px; flex: none; text-align: right; }
.gx-m-class .occ .n { font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--text-strong); font-variant-numeric: tabular-nums; }
.gx-m-class .occ .gx-m-bar { margin-top: 5px; }

/* alert rows */
.gx-m-alert { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border-subtle); cursor: pointer; }
.gx-m-alert:last-child { border-bottom: 0; }
.gx-m-alert:active { background: var(--surface-sunken); }
.gx-m-alert .ic { width: 36px; height: 36px; border-radius: var(--radius-md); flex: none; display: grid; place-items: center; }
.gx-m-alert .ic svg { width: 18px; height: 18px; }
.gx-m-alert .main { flex: 1; min-width: 0; }
.gx-m-alert .main .t { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--text-strong); }
.gx-m-alert .main .d { font-size: var(--text-xs); color: var(--text-muted); margin-top: 1px; }
.gx-m-alert .chev { color: var(--text-subtle); flex: none; }
.gx-m-alert .chev svg { width: 18px; height: 18px; }

/* diffuse banner (home week card foot) */
.gx-m-diffuse { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border-subtle); font-size: var(--text-xs); color: var(--text-muted); }
.gx-m-diffuse svg { width: 16px; height: 16px; flex: none; color: var(--color-primary); }
.gx-m-diffuse b { color: var(--text-body); }

/* ---------- big primary action button (full width) ---------- */
.gx-m-cta {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; height: 50px; border: 0; cursor: pointer; font-family: inherit;
  border-radius: var(--radius-md); font-size: var(--text-md); font-weight: var(--weight-bold);
  background: var(--color-primary); color: #fff; box-shadow: var(--glow-spark);
}
.gx-m-cta:active { transform: scale(.985); background: var(--azure-700); }
.gx-m-cta svg { width: 20px; height: 20px; }
.gx-m-cta.ghost { background: var(--surface-card); color: var(--text-strong); border: 1px solid var(--border-default); box-shadow: none; }
.gx-m-cta.ghost:active { background: var(--surface-sunken); }

/* ============================================================
   PLANNING — agenda
   ============================================================ */
.gx-m-datebar { display: flex; gap: 7px; overflow-x: auto; padding: 2px 16px 4px; scrollbar-width: none; }
.gx-m-datebar::-webkit-scrollbar { display: none; }
.gx-m-datechip {
  flex: none; width: 50px; padding: 8px 0; text-align: center; cursor: pointer;
  border-radius: var(--radius-md); border: 1px solid var(--border-subtle); background: var(--surface-card);
}
.gx-m-datechip .dn { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; font-weight: var(--weight-bold); color: var(--text-muted); }
.gx-m-datechip .nn { font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--text-strong); margin-top: 1px; }
.gx-m-datechip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--color-primary); margin: 3px auto 0; }
.gx-m-datechip.on { background: var(--color-primary); border-color: var(--color-primary); }
.gx-m-datechip.on .dn, .gx-m-datechip.on .nn { color: #fff; }
.gx-m-datechip.on .dot { background: rgba(255,255,255,.85); }
/* compact 7-day fit (planning) : share the full width, no horizontal scroll */
.gx-m-week7 { overflow-x: visible; gap: 6px; }
.gx-m-week7 .gx-m-datechip { width: auto; flex: 1; min-width: 0; padding: 8px 2px; }

/* agenda timeline */
.gx-m-agenda { padding: 4px 16px; }
.gx-m-slot { display: flex; gap: 12px; }
.gx-m-slot .when { width: 44px; flex: none; text-align: right; font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--text-muted); padding-top: 13px; font-variant-numeric: tabular-nums; }
.gx-m-slot .track { flex: 1; min-width: 0; border-left: 2px solid var(--border-subtle); padding: 0 0 12px 15px; position: relative; }
.gx-m-slot .track::before { content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--color-primary); border: 2px solid var(--surface-page); }
.gx-m-slot.full .track::before { background: var(--color-danger); }
.gx-m-slot.priv .track::before { background: var(--neutral-400); }
.gx-m-evcard { border: 1px solid var(--border-subtle); border-left: 3px solid var(--color-primary); border-radius: var(--radius-md); padding: 11px 13px; background: var(--surface-card); cursor: pointer; }
.gx-m-evcard:active { background: var(--surface-sunken); }
.gx-m-evcard.full { border-left-color: var(--color-danger); }
.gx-m-evcard.priv { border-left-color: var(--neutral-400); }
.gx-m-evcard .top { display: flex; align-items: center; gap: 8px; }
.gx-m-evcard .top .nm { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--text-strong); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-m-evcard .meta { font-size: var(--text-xs); color: var(--text-muted); margin: 3px 0 8px; }
.gx-m-evcard .foot { display: flex; align-items: center; gap: 8px; }
.gx-m-evcard .foot .gx-m-bar { flex: 1; }
.gx-m-evcard .foot .cap { font-size: var(--text-2xs); font-weight: var(--weight-bold); color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* school-calendar inline banner */
.gx-m-calbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 9px 13px; margin: 0 16px 8px; background: var(--surface-sunken); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); font-size: var(--text-xs); }
.gx-m-calbar .zone { display: inline-flex; align-items: center; gap: 5px; font-weight: var(--weight-bold); color: var(--text-strong); }
.gx-m-calbar .zone svg { width: 13px; height: 13px; color: var(--color-primary); }
.gx-m-calpill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-pill); font-weight: var(--weight-bold); font-size: 10px; }
.gx-m-calpill svg { width: 11px; height: 11px; }
.gx-m-calpill.ferie,
.gx-m-calpill.vac { background: var(--warning-50); color: var(--warning-700); }

/* ============================================================
   PRÉSENCES — session cards + roster check-in
   ============================================================ */
.gx-m-pres-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gx-m-pres-stat .it { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); padding: 12px; text-align: center; }
.gx-m-pres-stat .v { font-size: var(--text-xl); font-weight: var(--weight-bold); color: var(--text-strong); line-height: 1; font-variant-numeric: tabular-nums; }
.gx-m-pres-stat .l { font-size: 10px; text-transform: uppercase; letter-spacing: .03em; font-weight: var(--weight-bold); color: var(--text-muted); margin-top: 5px; }

.gx-m-sess { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border-subtle); cursor: pointer; }
.gx-m-sess:last-child { border-bottom: 0; }
.gx-m-sess:active { background: var(--surface-sunken); }
.gx-m-sess .main { flex: 1; min-width: 0; }
.gx-m-sess .nm { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--text-strong); }
.gx-m-sess .meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.gx-m-sess .time { font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--color-brand); font-variant-numeric: tabular-nums; }

/* roster row + segmented status */
.gx-m-roster { display: flex; align-items: center; gap: 11px; padding: 11px 16px; border-bottom: 1px solid var(--border-subtle); }
.gx-m-roster:last-child { border-bottom: 0; }
.gx-m-roster .main { flex: 1; min-width: 0; }
.gx-m-roster .main .nm { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-m-roster .main .pl { font-size: var(--text-xs); color: var(--text-muted); margin-top: 1px; }
.gx-m-roster.absent .main .nm { color: var(--text-muted); }

.gx-m-seg { display: inline-flex; background: var(--surface-sunken); border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); padding: 3px; gap: 2px; flex: none; }
/* 44x44, not the 34x32 this file shipped with. 01-LOTS.md asks for >= 44px
   targets on the attendance sheet, which is the most used screen of the product
   and is worked one-handed in the gym; on that screen the doc is right and the
   stylesheet was wrong. Same register as the focus ring already marked
   mandatory (RGAA). */
.gx-m-seg button { appearance: none; border: 0; background: transparent; font-family: inherit; cursor: pointer; width: 44px; height: 44px; border-radius: var(--radius-pill); color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; }
.gx-m-seg button:disabled { opacity: .45; cursor: default; }
.gx-m-seg button svg { width: 17px; height: 17px; }
.gx-m-seg button.on.present { background: var(--success-600); color: #fff; }
.gx-m-seg button.on.late    { background: var(--warning-600); color: #fff; }
.gx-m-seg button.on.absent  { background: var(--danger-600);  color: #fff; }

/* taux par cours bars */
.gx-m-statbar { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--border-subtle); }
.gx-m-statbar:last-child { border-bottom: 0; }
.gx-m-statbar .nm { width: 110px; flex: none; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--text-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-m-statbar .gx-m-bar { flex: 1; }
.gx-m-statbar .pct { width: 34px; flex: none; text-align: right; font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--text-strong); font-variant-numeric: tabular-nums; }

/* sticky check-in footer (inside roster view) */
.gx-m-stickyfoot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 8;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--gx-tb-bg);
  -webkit-backdrop-filter: var(--blur-glass); backdrop-filter: var(--blur-glass);
  border-top: 1px solid var(--border-subtle);
  display: flex; align-items: center; gap: 12px;
}
.gx-m-stickyfoot .info { flex: 1; min-width: 0; font-size: var(--text-xs); color: var(--text-muted); }
.gx-m-stickyfoot .info b { color: var(--text-strong); font-size: var(--text-sm); }

/* ============================================================
   FICHE (member / coach / cours / salle) header
   ============================================================ */
.gx-m-fiche-hero {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
  padding: 8px 16px 18px;
}
.gx-m-fiche-hero .nm { font-family: var(--font-display, var(--font-sans)); font-size: calc(var(--text-2xl) * var(--display-title-scale, 1)); font-weight: var(--display-weight, var(--weight-bold)); letter-spacing: var(--display-ls, var(--tracking-tight)); text-transform: var(--display-tr, none); color: var(--text-strong); line-height: 1.1; }
.gx-m-fiche-hero .rl { font-size: var(--text-sm); color: var(--text-muted); }
.gx-m-fiche-actions { display: flex; gap: 8px; }
.gx-m-circbtn { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.gx-m-circbtn .b { width: 46px; height: 46px; border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--azure-50); color: var(--color-primary); border: 1px solid var(--azure-100); }
.gx-m-circbtn .b svg { width: 20px; height: 20px; }
.gx-m-circbtn:active .b { transform: scale(.95); }
.gx-m-circbtn .cl { font-size: 10px; font-weight: var(--weight-bold); color: var(--text-muted); }

/* fiche stat trio */
.gx-m-fstats { display: grid; grid-template-columns: repeat(3, 1fr); }
.gx-m-fstats .it { padding: 14px 8px; text-align: center; border-right: 1px solid var(--border-subtle); }
.gx-m-fstats .it:last-child { border-right: 0; }
.gx-m-fstats .v { font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--text-strong); line-height: 1; font-variant-numeric: tabular-nums; }
.gx-m-fstats .l { font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); font-weight: var(--weight-bold); margin-top: 5px; }

/* weekly availability strip */
.gx-m-avail { display: flex; gap: 5px; padding: 14px 16px; }
.gx-m-avail .d { flex: 1; text-align: center; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle); padding: 7px 0; font-size: 10px; font-weight: var(--weight-bold); color: var(--text-subtle); text-transform: uppercase; }
.gx-m-avail .d.on { background: var(--success-50); border-color: var(--success-100); color: var(--success-700); }

/* heat strip (salle) */
.gx-m-heat { display: flex; gap: 6px; padding: 16px; }
.gx-m-heat .d { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gx-m-heat .bar { width: 100%; height: 56px; border-radius: var(--radius-sm); background: var(--surface-sunken); display: flex; align-items: flex-end; overflow: hidden; }
.gx-m-heat .bar > i { display: block; width: 100%; }
.gx-m-heat .lab { font-size: 10px; text-transform: uppercase; color: var(--text-subtle); font-weight: var(--weight-bold); }

/* bio text */
.gx-m-prose { padding: 14px 16px; font-size: var(--text-sm); color: var(--text-body); line-height: 1.6; }

/* ============================================================
   COURS / COACHS / SALLES list cards
   ============================================================ */
.gx-m-tile {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 16px; border-bottom: 1px solid var(--border-subtle);
  cursor: pointer; width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; font-family: inherit;
}
.gx-m-tile:last-child { border-bottom: 0; }
.gx-m-tile:active { background: var(--surface-sunken); }
.gx-m-tile .main { flex: 1; min-width: 0; }
.gx-m-tile .nm { font-size: var(--text-md); font-weight: var(--weight-bold); color: var(--text-strong); line-height: 1.2; }
.gx-m-tile .meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gx-m-tile .meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-subtle); flex: none; }
.gx-m-tile .chev { flex: none; color: var(--text-subtle); }
.gx-m-tile .chev svg { width: 18px; height: 18px; }

/* formule card (abos) */
.gx-m-formule { padding: 16px; border-bottom: 1px solid var(--border-subtle); position: relative; }
.gx-m-formule:last-child { border-bottom: 0; }
.gx-m-formule.featured { background: color-mix(in srgb, var(--azure-50) 45%, transparent); }
.gx-m-formule .top { display: flex; align-items: baseline; gap: 8px; }
.gx-m-formule .nm { font-size: var(--text-md); font-weight: var(--weight-bold); color: var(--text-strong); flex: 1; }
.gx-m-formule .price { font-size: var(--text-xl); font-weight: var(--weight-bold); color: var(--text-strong); font-variant-numeric: tabular-nums; letter-spacing: var(--tracking-tight); }
.gx-m-formule .price span { font-size: var(--text-xs); color: var(--text-muted); font-weight: var(--weight-semibold); }
.gx-m-formule .desc { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; margin-top: 6px; }
.gx-m-formule .foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: var(--text-xs); color: var(--text-body); font-weight: var(--weight-semibold); }
.gx-m-formule .foot svg { width: 14px; height: 14px; color: var(--text-muted); }
.gx-m-formule .foot .members { margin-left: auto; color: var(--text-muted); }

/* ============================================================
   RÉGLAGES — settings list (grouped iOS-style)
   ============================================================ */
.gx-m-setrow {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 16px; border-bottom: 1px solid var(--border-subtle);
  cursor: pointer; width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; font-family: inherit;
}
.gx-m-setrow:last-child { border-bottom: 0; }
.gx-m-setrow:active { background: var(--surface-sunken); }
.gx-m-setrow .si { width: 32px; height: 32px; border-radius: var(--radius-sm); flex: none; display: grid; place-items: center; background: var(--azure-50); color: var(--color-primary); }
.gx-m-setrow .si svg { width: 18px; height: 18px; }
.gx-m-setrow .main { flex: 1; min-width: 0; }
.gx-m-setrow .t { display: block; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-strong); }
.gx-m-setrow .d { display: block; font-size: var(--text-xs); color: var(--text-muted); margin-top: 1px; }
.gx-m-setrow .chev { color: var(--text-subtle); flex: none; }
.gx-m-setrow .chev svg { width: 18px; height: 18px; }
.gx-m-setrow .val { font-size: var(--text-sm); color: var(--text-muted); font-weight: var(--weight-semibold); }

/* opening hours / pay / team rows reuse gx-m-kv & gx-m-row */
.gx-m-notif { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); }
.gx-m-notif:last-child { border-bottom: 0; }
.gx-m-notif .main { flex: 1; min-width: 0; }
.gx-m-notif .main .t { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--text-strong); }
.gx-m-notif .main .d { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; line-height: 1.45; }
.gx-m-chan { display: flex; gap: 5px; margin-top: 7px; }
.gx-m-chan .c { font-size: 10px; font-weight: var(--weight-bold); color: var(--text-muted); background: var(--surface-sunken); border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); padding: 2px 8px; }

/* ============================================================
   BOTTOM TAB BAR
   ============================================================ */
.gx-m-tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 9;
  display: flex; align-items: stretch;
  padding: 8px 8px calc(20px + env(safe-area-inset-bottom));
  background: var(--gx-tb-bg);
  -webkit-backdrop-filter: var(--blur-glass); backdrop-filter: var(--blur-glass);
  border-top: 1px solid var(--border-subtle);
}
.gx-m-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0 2px; cursor: pointer; background: none; border: 0; font-family: inherit;
  color: var(--text-muted); position: relative;
}
.gx-m-tab .ti { position: relative; display: grid; place-items: center; }
.gx-m-tab svg { width: 24px; height: 24px; }
.gx-m-tab .lbl { font-size: 10px; font-weight: var(--weight-bold); letter-spacing: .01em; }
.gx-m-tab .badge { position: absolute; top: -4px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--radius-pill); background: var(--color-danger); color: #fff; font-size: 9px; font-weight: var(--weight-bold); display: grid; place-items: center; border: 1.5px solid var(--surface-card); }
.gx-m-tab.on { color: var(--color-primary); }
.gx-m-tab.on svg { stroke-width: 2.2; }

/* ============================================================
   SHEET (Plus menu, theme switcher)
   ============================================================ */
.gx-m-sheet-scrim { position: absolute; inset: 0; z-index: 30; background: rgba(12,34,54,.42); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: gx-m-fade .2s var(--ease-out) both; }
@keyframes gx-m-fade { from { opacity: 0; } to { opacity: 1; } }
.gx-m-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 31;
  background: var(--surface-card); border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px rgba(12,34,54,.22);
  padding: 8px 0 calc(14px + env(safe-area-inset-bottom));
  max-height: 86%;
  display: flex; flex-direction: column;
}
@media (prefers-reduced-motion: no-preference) {
  .gx-m-sheet { animation: gx-m-slideup .3s var(--ease-out) both; }
}
@keyframes gx-m-slideup { from { transform: translateY(40px); opacity: .2; } to { transform: none; opacity: 1; } }
.gx-m-sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--border-default); margin: 8px auto 6px; flex: none; }
.gx-m-sheet-h { display: flex; align-items: center; gap: 10px; padding: 8px 18px 12px; flex: none; }
.gx-m-sheet-h .t { font-family: var(--font-display, var(--font-sans)); font-size: var(--text-lg); font-weight: var(--display-weight, var(--weight-bold)); color: var(--text-strong); flex: 1; }
.gx-m-sheet-h .x { width: 34px; height: 34px; border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--surface-sunken); color: var(--text-muted); cursor: pointer; border: 0; }
.gx-m-sheet-h .x svg { width: 18px; height: 18px; }
.gx-m-sheet-body { overflow-y: auto; padding: 0 0 4px; }

/* Plus grid */
.gx-m-plusgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 16px 12px; }
.gx-m-plusitem {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  border-radius: var(--radius-lg); border: 1px solid var(--border-subtle);
  background: var(--surface-card); cursor: pointer; font-family: inherit; text-align: left;
}
.gx-m-plusitem:active { background: var(--surface-sunken); }
.gx-m-plusitem .si { width: 38px; height: 38px; border-radius: var(--radius-md); flex: none; display: grid; place-items: center; background: var(--azure-50); color: var(--color-primary); }
.gx-m-plusitem .si svg { width: 20px; height: 20px; }
.gx-m-plusitem .tt { min-width: 0; }
.gx-m-plusitem .tt .t { display: block; font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--text-strong); }
.gx-m-plusitem .tt .c { display: block; font-size: var(--text-2xs); color: var(--text-muted); margin-top: 1px; }

/* theme switch rows (in Plus sheet) */
.gx-m-themerow { display: flex; align-items: center; gap: 12px; padding: 12px 18px; cursor: pointer; border-bottom: 1px solid var(--border-subtle); }
.gx-m-themerow:last-child { border-bottom: 0; }
.gx-m-themerow .sw { display: flex; border-radius: var(--radius-sm); overflow: hidden; box-shadow: 0 0 0 1px rgba(12,34,54,.1); flex: none; }
.gx-m-themerow .sw i { width: 16px; height: 32px; }
.gx-m-themerow .main { flex: 1; min-width: 0; }
.gx-m-themerow .main .t { display: block; font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--text-strong); }
.gx-m-themerow .main .s { display: block; font-size: var(--text-xs); color: var(--text-muted); }
.gx-m-themerow .ck { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--color-primary); color: #fff; }
.gx-m-themerow .ck svg { width: 15px; height: 15px; }

/* profile block in Plus sheet */
.gx-m-profile { display: flex; align-items: center; gap: 13px; padding: 6px 18px 14px; }
.gx-m-profile .main { flex: 1; min-width: 0; }
.gx-m-profile .nm { font-size: var(--text-md); font-weight: var(--weight-bold); color: var(--text-strong); }
.gx-m-profile .rl { font-size: var(--text-xs); color: var(--text-muted); margin-top: 1px; }

/* generic muted note */
.gx-m-note { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.5; padding: 12px 16px; }

/* empty state */
.gx-m-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 60px 28px; }
.gx-m-empty .ic { width: 60px; height: 60px; border-radius: var(--radius-xl); display: grid; place-items: center; background: var(--azure-50); color: var(--color-primary); }
.gx-m-empty .ic svg { width: 28px; height: 28px; }
.gx-m-empty h3 { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--text-strong); }
.gx-m-empty p { margin: 0; font-size: var(--text-sm); color: var(--text-muted); }

/* misc helper */
.gx-m-spacer { height: 8px; }
.gx-m-flex { display: flex; align-items: center; gap: 10px; }
.gx-m-grow { flex: 1; min-width: 0; }

/* segmented tabs of a mobile screen — Abonnements' Suivi / Formules /
   Encaissements, and the sections of the Réglages next.
   The prototype draws these with per-button style objects on a re-purposed
   .gx-m-datebar; named here because a second screen wants them and because a
   pattern styled inline in two places drifts in one of them. Not .gx-m-seg:
   that one grew to 44x44 at lot 6 for thumbs on a pointing screen, and these
   are labels, not targets somebody hits mid-session. */
.gx-m-tabs { display: flex; gap: 8px; padding: 14px 0 2px; overflow-x: auto; scrollbar-width: none; }
.gx-m-tabs::-webkit-scrollbar { display: none; }
.gx-m-tabs button {
  flex: none; padding: 8px 14px; border-radius: var(--radius-pill); cursor: pointer;
  font-family: inherit; font-size: var(--text-xs); font-weight: var(--weight-bold);
  border: 1px solid var(--border-subtle); background: var(--surface-card); color: var(--text-body);
}
.gx-m-tabs button.on { border-color: var(--azure-200); background: var(--azure-50); color: var(--azure-800); }
