/* Archivo (SIL Open Font License, voir assets/fonts/OFL-Archivo.txt), hébergée avec l'application :
   aucune requête vers un service tiers, fonctionne hors connexion. Axes variables : graisse et largeur. */
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin.woff2") format("woff2-variations"), url("../fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2-variations"), url("../fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Plateforme Box — maquette
   Tokens : thème sombre (proposition Calade) et thème clair.
   Les couleurs de marque (--brand, --brand-2, --on-brand, --brand-ink)
   sont injectées par box depuis le JavaScript. */

:root {
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 12px;
  --r-md: 16px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --brand: #D63B32;
  --brand-2: #F47A32;
  --on-brand: #FFFFFF;
  --brand-ink: #F0675E;
  --brand-soft: rgba(214, 59, 50, .14);
  --tabbar-h: 64px;
  --demo-h: 40px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

:root, [data-theme="dark"] {
  --bg: #0B0D10;
  --surface: #14171C;
  --raised: #1C2027;
  --border: #2A3038;
  --border-strong: #3A424D;
  --text: #F5F5F4;
  --text-2: #A5ADB8;
  --text-3: #8A93A0;
  --success: #46C281; --success-bg: rgba(70, 194, 129, .12);
  --error: #FF7A70;   --error-bg: rgba(255, 122, 112, .12);
  --warning: #F2B54A; --warning-bg: rgba(242, 181, 74, .12);
  --info: #8AB4F8;    --info-bg: rgba(138, 180, 248, .12);
  --focus: #F5F5F4;
  --shadow: 0 16px 40px rgba(0, 0, 0, .5);
  --scrim: rgba(5, 6, 8, .72);
  --seg-on: #2E343D;
  --seg-shadow: none;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --raised: #ECEEF2;
  --border: #D9DDE3;
  --border-strong: #BFC6CF;
  --text: #14171C;
  --text-2: #4F5865;
  --text-3: #646D7A;
  --success: #1F7A4A; --success-bg: #E3F3EA;
  --error: #B42A22;   --error-bg: #FBE8E6;
  --warning: #8A5A00; --warning-bg: #FCF0D7;
  --info: #2457B3;    --info-bg: #E4ECFA;
  --focus: #14171C;
  --shadow: 0 16px 40px rgba(20, 23, 28, .16);
  --scrim: rgba(20, 23, 28, .45);
  --seg-on: #FFFFFF;
  --seg-shadow: 0 1px 3px rgba(20, 23, 28, .16);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 500; letter-spacing: 0; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }
p { margin: 0; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.small { font-size: .875rem; }
.xsmall { font-size: .8125rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.stack > * + * { margin-top: var(--s4); }
.stack-sm > * + * { margin-top: var(--s2); }
.stack-lg > * + * { margin-top: var(--s5); }
.row { display: flex; align-items: center; gap: var(--s3); }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.spread { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.grow { flex: 1 1 auto; min-width: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Barre de maquette ---------- */
.demo-bar {
  position: sticky; top: 0; z-index: 60;
  height: var(--demo-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: 0 var(--s4);
  background: repeating-linear-gradient(135deg, #2B2F36 0 10px, #262A31 10px 20px);
  color: #E8EAED;
  font-size: .8125rem;
  border-bottom: 1px solid #3A3F47;
}
.demo-bar strong { font-weight: 500; }
.demo-bar .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-bar button {
  flex: none; border: 1px solid #5A616B; background: #1B1E23; color: #F2F3F5;
  border-radius: 999px; padding: 4px 12px; font-size: .8125rem; cursor: pointer; min-height: 32px;
}
.demo-bar .flag { color: #F2B54A; font-weight: 500; }

/* ---------- Coquille de l'application ---------- */
.shell { min-height: calc(100vh - var(--demo-h)); }
.main { padding: var(--s5) var(--s4) calc(var(--tabbar-h) + var(--s6) + env(safe-area-inset-bottom)); max-width: 1120px; margin: 0 auto; }
#main:focus { outline: none; }
.skip { position: fixed; left: 8px; top: 8px; z-index: 200; padding: 12px 16px; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 500; text-decoration: none; transform: translateY(-160%); transition: transform .16s var(--ease); }
.skip:focus { transform: none; }
.main.narrow { max-width: 720px; }

.topbar {
  position: sticky; top: var(--demo-h); z-index: 40;
  display: flex; align-items: center; gap: var(--s3);
  min-height: 60px; padding: var(--s2) var(--s3) var(--s2) var(--s4);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .box-id { flex: 1 1 auto; min-width: 0; }

.box-id { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.box-id .name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.box-id .sub { font-size: .8125rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.box-switch {
  display: flex; align-items: center; gap: var(--s3); min-width: 0; flex: 1 1 auto;
  background: none; border: 0; padding: 4px; margin: -4px; border-radius: var(--r-sm); text-align: left; cursor: pointer;
}
.box-switch:hover { background: var(--raised); }
.box-switch svg.chev { flex: none; color: var(--text-2); }

.logo {
  flex: none; width: 40px; height: 40px; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center;
  background: var(--brand); color: var(--on-brand);
  font-weight: 600; font-size: .9375rem; letter-spacing: .02em;
  font-variation-settings: "wdth" 80;
}
.logo.lg { width: 64px; height: 64px; border-radius: 14px; font-size: 1.375rem; }
.logo.xl { width: 96px; height: 96px; border-radius: 18px; font-size: 2rem; }
.logo img { width: 100%; height: 100%; object-fit: contain; background: #0B0D10; }
.logo.placeholder { background: var(--raised); color: var(--text-2); border: 1px dashed var(--border-strong); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--text-2); text-decoration: none; font-size: .75rem; font-weight: 500; min-height: 44px;
  position: relative;
}
.tabbar a[aria-current="page"] { color: var(--brand-ink); font-weight: 500; }
.tabbar.cols-4 { grid-template-columns: repeat(4, 1fr); }

.sidebar { display: none; }

@media (min-width: 1024px) {
  .shell.with-sidebar { display: grid; grid-template-columns: 272px 1fr; }
  .shell.with-sidebar .topbar, .shell.with-sidebar .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: var(--s5);
    position: sticky; top: var(--demo-h); height: calc(100vh - var(--demo-h)); overflow-y: auto;
    padding: var(--s5) var(--s4);
    background: var(--surface); border-right: 1px solid var(--border);
  }
  .main { padding: var(--s6) var(--s6) var(--s7); margin: 0 auto; width: 100%; }
  .main.narrow { max-width: 800px; }
  .sidebar .box-switch, .sidebar .box-id { flex: none; margin: 0; }
}

.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-group h2 { font-size: .8125rem; font-weight: 500; color: var(--text-2); padding: 0 var(--s3) var(--s1); }
.nav-link {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 44px; padding: 0 var(--s3); border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none; font-weight: 500;
}
.nav-link:hover { background: var(--raised); color: var(--text); }
.nav-link[aria-current="page"] { background: var(--raised); color: var(--text); font-weight: 500; box-shadow: inset 3px 0 0 var(--brand); }
.nav-link svg { flex: none; }
.sidebar .nav-link { min-height: 40px; }
.sidebar-foot { margin-top: auto; font-size: .8125rem; color: var(--text-2); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s4);
  border-radius: var(--r-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  font-weight: 500; font-size: .9375rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease);
}
.btn svg { flex: none; }
.btn:hover { background: var(--raised); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, var(--text)); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: var(--raised); }
.btn-danger { color: var(--error); border-color: color-mix(in srgb, var(--error) 50%, transparent); background: transparent; }
.btn-danger:hover { background: var(--error-bg); }
.btn-danger-solid { background: var(--error); border-color: var(--error); color: #fff; }
[data-theme="dark"] .btn-danger-solid { color: #1A0B0A; }
.btn-sm { min-height: 36px; padding: 0 var(--s3); font-size: .875rem; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--raised); color: var(--text); }
.icon-btn[disabled] { opacity: .4; cursor: not-allowed; }
.icon-btn.bordered { border-color: var(--border); }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label, .field > .label { font-weight: 500; font-size: .9375rem; }
.hint { font-size: .8125rem; color: var(--text-2); }
.field .err, [data-err] > .err { font-size: .875rem; color: var(--error); display: flex; gap: 8px; align-items: flex-start; }
.field .err svg, [data-err] > .err svg { flex: none; margin-top: 2px; }
.entry2 > [data-err] > .err { justify-content: center; text-align: center; }
.input, .select, .textarea {
  width: 100%; min-width: 0; min-height: 48px; padding: 12px 16px;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: var(--bg); color: var(--text); font-size: 1rem;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--brand-ink); outline-offset: 0; border-color: transparent; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--error); }
.input.big {
  min-height: 64px; font-size: 1.75rem; font-weight: 500; text-align: center;
  font-variant-numeric: tabular-nums; font-variation-settings: "wdth" 85;
}
.input-unit { position: relative; display: flex; align-items: center; }
.input-unit .input { padding-right: 52px; }
.input-unit .unit { position: absolute; right: 16px; color: var(--text-2); font-weight: 500; pointer-events: none; }
.form-grid { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
.form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .form-grid.md-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid.md-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.check { display: flex; gap: var(--s3); align-items: flex-start; min-height: 44px; padding: 12px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.counter { font-size: .8125rem; color: var(--text-2); text-align: right; }

/* Contrôle segmenté (choix exclusifs) */
.seg { display: flex; flex-wrap: wrap; padding: 4px; gap: 4px; background: var(--raised); border-radius: var(--r-sm); border: 1px solid var(--border); }
.seg label, .seg button {
  position: relative; flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 var(--s3); border-radius: 9px; border: 0; background: transparent;
  font-weight: 500; font-size: .9375rem; color: var(--text-2); cursor: pointer; text-align: center; white-space: nowrap;
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked), .seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--text); font-weight: 500; box-shadow: var(--seg-shadow); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }

/* Onglets */
.tabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button {
  flex: none; padding: 0 var(--s3); min-height: 44px; display: inline-flex; align-items: center;
  border: 0; background: none; color: var(--text-2); font-weight: 500; text-decoration: none; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs [aria-selected="true"], .tabs [aria-current="page"] { color: var(--text); border-bottom-color: var(--brand); }

/* ---------- Surfaces ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s5); }
.panel.tight { padding: var(--s4); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.page-head .lede { color: var(--text-2); margin-top: var(--s1); }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); text-decoration: none; font-weight: 500; min-height: 44px; margin: -8px 0 var(--s2); }
.back:hover { color: var(--text); }

.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.list > li + li { border-top: 1px solid var(--border); }
.list-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); min-height: 60px; color: inherit; text-decoration: none; }
a.list-row:hover { background: var(--raised); }
.list-row .title { font-weight: 500; }
.list-row .meta { font-size: .875rem; color: var(--text-2); }
.list-row .end { margin-left: auto; text-align: right; flex: none; }

.grid-2 { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { display: grid; gap: var(--s4); grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid-3 { display: grid; gap: var(--s4); }

/* Pastilles d'état : toujours icône + texte */
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px 4px 8px; border-radius: 999px;
  font-size: .8125rem; font-weight: 500; white-space: nowrap; border: 1px solid var(--border-strong); color: var(--text-2); background: transparent;
}
.chip svg { flex: none; }
.chip.ok { color: var(--success); background: var(--success-bg); border-color: transparent; }
.chip.warn { color: var(--warning); background: var(--warning-bg); border-color: transparent; }
.chip.err { color: var(--error); background: var(--error-bg); border-color: transparent; }
.chip.info { color: var(--info); background: var(--info-bg); border-color: transparent; }
.chip.brand { color: var(--brand-ink); background: var(--brand-soft); border-color: transparent; }
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; background: var(--raised); color: var(--text-2); font-size: .8125rem; font-weight: 500; }

.banner { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r-sm); font-size: .9375rem; border: 1px solid transparent; }
.banner svg { flex: none; margin-top: 2px; }
.banner.warn { background: var(--warning-bg); color: var(--text); border-color: color-mix(in srgb, var(--warning) 35%, transparent); }
.banner.warn svg { color: var(--warning); }
.banner.err { background: var(--error-bg); color: var(--text); border-color: color-mix(in srgb, var(--error) 35%, transparent); }
.banner.err svg { color: var(--error); }
.banner.info { background: var(--info-bg); color: var(--text); border-color: color-mix(in srgb, var(--info) 35%, transparent); }
.banner.info svg { color: var(--info); }
.banner.ok { background: var(--success-bg); color: var(--text); }
.banner.ok svg { color: var(--success); }
.banner-strip { margin: 0 0 var(--s5); }

.empty { text-align: center; padding: var(--s7) var(--s4); border: 1px dashed var(--border-strong); border-radius: var(--r-md); color: var(--text-2); }
.empty .icon-wrap { width: 48px; height: 48px; margin: 0 auto var(--s3); display: grid; place-items: center; border-radius: 12px; background: var(--raised); color: var(--text-2); }
.empty h2, .empty h3 { color: var(--text); margin-bottom: var(--s2); font-size: 1.0625rem; }
.empty p { max-width: 44ch; margin: 0 auto; }
.empty .btn { margin-top: var(--s4); }

/* Tableaux */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th { text-align: left; font-weight: 500; color: var(--text-2); font-size: .8125rem; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }

/* ---------- Écran « Aujourd'hui » ---------- */
.today-head { display: flex; align-items: flex-end; gap: var(--s4); margin-bottom: var(--s5); }
.today-head .daynum {
  font-size: 5.5rem; line-height: .78; font-weight: 600; letter-spacing: -.03em;
  font-variation-settings: "wdth" 68; font-stretch: 68%;
  color: var(--text);
}
.today-head .daytxt { padding-bottom: 4px; }
.today-head .weekday { font-size: 1.375rem; font-weight: 500; text-transform: capitalize; }
.today-head .month { color: var(--text-2); }
.hello { color: var(--text-2); margin-bottom: var(--s3); font-size: 1.0625rem; }
.today-head .month { white-space: nowrap; }
.welcome { color: var(--text-2); border-left: 3px solid var(--brand-2); padding-left: var(--s3); margin-bottom: var(--s5); }

.session {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden;
}
.session + .session { margin-top: var(--s4); }
.session-head { padding: var(--s5) var(--s5) var(--s4); display: flex; justify-content: space-between; gap: var(--s4); align-items: flex-start; }
.session-head h2 { font-size: 1.5rem; font-variation-settings: "wdth" 90; }
.session-head .objective { color: var(--text-2); margin-top: var(--s2); max-width: 60ch; }
.session-foot { padding: var(--s4) var(--s5); border-top: 1px solid var(--border); display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; justify-content: space-between; }

/* Blocs A, B, C — convention de programmation des box */
.blocks { list-style: none; margin: 0; padding: 0; }
.block { display: grid; grid-template-columns: 48px 1fr; gap: var(--s3); padding: var(--s4) var(--s5); border-top: 1px solid var(--border); }
.block .letter {
  font-size: 2.25rem; line-height: 1; font-weight: 600; color: var(--brand-ink);
  font-variation-settings: "wdth" 70; font-stretch: 70%;
}
.block .btype { font-size: .8125rem; font-weight: 500; color: var(--text-2); }
.block .btitle { font-weight: 500; font-size: 1.0625rem; }
.block .presc { color: var(--text); margin-top: var(--s2); white-space: normal; }
.block .presc ul { margin: var(--s1) 0 0; padding-left: 1.2em; }
.block .score-line { margin-top: var(--s3); display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; justify-content: space-between; }
.block .variants { margin-top: var(--s2); font-size: .875rem; color: var(--text-2); }
.compact .block { padding: var(--s3) var(--s4); grid-template-columns: 32px 1fr; }
.compact .block .letter { font-size: 1.5rem; }

.score-big {
  font-size: 1.75rem; line-height: 1.1; font-weight: 600; font-variant-numeric: tabular-nums;
  font-variation-settings: "wdth" 78; font-stretch: 78%; letter-spacing: 0;
}
.score-xl { font-size: 3.25rem; }
.score-mid { font-size: 1.25rem; font-weight: 500; font-variant-numeric: tabular-nums; font-variation-settings: "wdth" 85; }
.mine { display: flex; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }

/* ---------- Programme ---------- */
.week-nav { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s4); }
.week-nav .label { font-weight: 500; font-size: 1.0625rem; min-width: 0; margin-right: auto; }
@media (max-width: 719px) { .week-nav .label { flex-basis: 100%; } .filters .input[type="search"] { flex-basis: 100%; } }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: var(--s5); }
.week-strip a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--s2) 0; min-height: 64px;
  border-radius: var(--r-sm); text-decoration: none; color: var(--text-2); border: 1px solid transparent;
}
.week-strip a:hover { background: var(--raised); }
.week-strip .d { font-size: .75rem; font-weight: 500; }
.week-strip .n { font-size: 1.5rem; font-weight: 600; line-height: 1.1; color: var(--text); font-variation-settings: "wdth" 72; font-stretch: 72%; }
.week-strip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.week-strip .dot.none { background: transparent; border: 1px solid var(--border-strong); }
.week-strip a.is-today { border-color: var(--brand); }
.week-strip a.is-today .n { color: var(--brand-ink); }

.days { display: flex; flex-direction: column; gap: var(--s5); }
.day h2 { font-size: 1rem; font-weight: 500; display: flex; align-items: baseline; gap: var(--s2); margin-bottom: var(--s2); text-transform: none; }
.day h2 .today-flag { color: var(--brand-ink); font-size: .875rem; }
.day .none { color: var(--text-2); font-size: .9375rem; padding: var(--s3) var(--s4); border: 1px dashed var(--border); border-radius: var(--r-sm); }
.wo-row { display: grid; grid-template-columns: 1fr auto; gap: var(--s3); align-items: center; padding: var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); color: inherit; text-decoration: none; }
.wo-row + .wo-row { margin-top: var(--s2); }
a.wo-row:hover { border-color: var(--border-strong); background: var(--raised); }
.wo-row .t { font-weight: 500; }
.wo-row .b { font-size: .875rem; color: var(--text-2); margin-top: 2px; }

@media (min-width: 1024px) {
  .week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s2); }
  .week-grid .day h2 { font-size: .9375rem; flex-direction: column; gap: 0; }
  .week-grid .wo-row { grid-template-columns: 1fr; padding: var(--s3); }
  .week-grid .wo-row .blist { display: none; }
  .week-grid .day h2 { min-height: 3.2em; }
  .week-grid .day .none { padding: var(--s3); font-size: .875rem; }
  .days.week-grid { gap: var(--s2); }
}
.filters { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s4); }
.filters .input, .filters .select { min-height: 44px; width: auto; flex: 1 1 180px; }

.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month .h { font-size: .75rem; font-weight: 500; color: var(--text-2); text-align: center; padding: 4px 0; }
.month a, .month span.c { min-height: 56px; border-radius: 10px; padding: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .875rem; display: flex; flex-direction: column; gap: 4px; }
.month .out { opacity: .4; }
.month .is-today { border-color: var(--brand); }
.month .pips { display: flex; gap: 4px; }
.month .pips i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }

/* ---------- Saisie de résultat ---------- */
.entry { max-width: 560px; }
.entry-block { padding: var(--s4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.mmss { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--s2); align-items: end; }
.mmss .colon { font-size: 2rem; font-weight: 600; padding-bottom: 12px; color: var(--text-2); }
.sets-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.sets-table th { font-size: .8125rem; color: var(--text-2); font-weight: 500; text-align: left; padding: 0 4px; }
.sets-table td { padding: 0 4px; }
.sets-table .input { min-height: 44px; padding: 8px 12px; }
.sets-table .pos { font-weight: 500; color: var(--text-2); width: 28px; }
.total-hint { padding: var(--s3) var(--s4); background: var(--raised); border-radius: var(--r-sm); font-size: .9375rem; }
.savebar { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); display: flex; gap: var(--s2); padding: var(--s3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow); z-index: 5; }
@media (min-width: 1024px) { .savebar { bottom: var(--s4); } }

/* ---------- Performances ---------- */
.stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (min-width: 720px) { .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: var(--s4); border-radius: var(--r-sm); background: var(--raised); }
.stat .k { font-size: .8125rem; color: var(--text-2); font-weight: 500; }
.stat .v { margin-top: 2px; }
.pr-list .list-row { align-items: center; }
.pr-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .8125rem; font-weight: 500; color: var(--brand-ink); }

.chart-box { position: relative; }
.chart-box svg { display: block; width: 100%; overflow: visible; }
.chart-box .axis text { fill: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart-box .grid line { stroke: var(--border); stroke-width: 1; }
.chart-box .line { fill: none; stroke: var(--brand-ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-box .pt { fill: var(--brand-ink); stroke: var(--surface); stroke-width: 2; }
.chart-box .pt.best { fill: var(--surface); stroke: var(--brand-ink); stroke-width: 3; }
.chart-box a:focus-visible .hit { stroke: var(--focus); stroke-width: 2; fill: transparent; }
.chart-box .hit { fill: transparent; }
.chart-box .xhair { stroke: var(--border-strong); stroke-dasharray: 3 3; }
.chart-tip {
  position: fixed; z-index: 90; pointer-events: none; max-width: 240px;
  background: var(--raised); color: var(--text); border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 8px 12px; font-size: .8125rem; box-shadow: var(--shadow);
}
.chart-tip strong { font-size: .9375rem; font-variant-numeric: tabular-nums; }

/* ---------- Coach ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s3); margin-bottom: var(--s5); }
.kpi { padding: var(--s4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: inherit; display: block; }
a.kpi:hover { border-color: var(--border-strong); }
.kpi .v { font-size: 2.25rem; font-weight: 600; line-height: 1; font-variation-settings: "wdth" 72; font-stretch: 72%; font-variant-numeric: tabular-nums; }
.kpi .k { color: var(--text-2); font-size: .875rem; margin-top: var(--s2); }

.plan-day { display: grid; grid-template-columns: 112px 1fr; gap: var(--s4); padding: var(--s4); border-bottom: 1px solid var(--border); }
.plan-day:last-child { border-bottom: 0; }
.plan-day .when .wd { font-weight: 500; text-transform: capitalize; }
.plan-day .when .dt { color: var(--text-2); font-size: .875rem; }
.plan-day.is-today .when .wd { color: var(--brand-ink); }
.plan-items { display: flex; flex-direction: column; gap: var(--s2); }
.plan-item { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s3); border-radius: var(--r-sm); background: var(--raised); }
.plan-item .t { font-weight: 500; }
.plan-item .acts { margin-left: auto; display: flex; gap: 4px; }
@media (max-width: 640px) { .plan-day { grid-template-columns: 1fr; gap: var(--s2); } }

.editor { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1200px) { .editor { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .editor aside { position: sticky; top: calc(var(--demo-h) + var(--s5)); } }
.eblock { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.eblock + .eblock { margin-top: var(--s3); }
.eblock-head { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s3) var(--s3) var(--s4); border-bottom: 1px solid var(--border); }
.eblock-head .letter { font-size: 1.75rem; font-weight: 600; color: var(--text-2); font-variation-settings: "wdth" 70; font-stretch: 70%; width: 28px; }
.eblock-body { padding: var(--s4); display: grid; gap: var(--s4); }
.save-state { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--text-2); min-height: 24px; }
.save-state.ok { color: var(--success); }
.save-state.err { color: var(--error); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--text); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Apparence ---------- */
.preview-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.preview-pair > div { min-width: 0; }
.shell.with-sidebar .pv .topbar { display: flex; position: static; }
.shell.with-sidebar .pv .tabbar { display: grid; position: static; }
.pv { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--bg); color: var(--text); }
.cover-thumb { width: 96px; height: 56px; border-radius: 10px; overflow: hidden; flex: none; background: var(--raised); display: block; }
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-label { font-size: .8125rem; color: var(--text-2); font-weight: 500; margin-bottom: var(--s2); }
.pv-mobile { width: 100%; max-width: 360px; }
.pv-desktop-wrap { overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-md); height: 280px; position: relative; max-width: 486px; }
.pv-desktop { width: 1100px; transform: scale(.44); transform-origin: 0 0; position: absolute; top: 0; left: 0; height: 660px; display: grid; grid-template-columns: 240px 1fr; background: var(--bg); color: var(--text); }
.swatch-row { display: flex; gap: var(--s3); align-items: center; }
.swatch-row input[type="color"] { width: 52px; height: 48px; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: none; cursor: pointer; flex: none; }
.swatch-row .input { font-variant-numeric: tabular-nums; text-transform: uppercase; }

/* ---------- Pages globales ---------- */
.auth-wrap { min-height: calc(100vh - var(--demo-h)); display: grid; place-items: center; padding: var(--s5) var(--s4); }
.auth-card { width: 100%; max-width: 440px; }
.product-mark { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s6); }
.product-mark .pm-logo { width: 40px; height: 40px; border-radius: 10px; background: var(--text); color: var(--bg); display: grid; place-items: center; font-weight: 600; font-variation-settings: "wdth" 75; }
.product-mark .pm-name { font-weight: 500; font-size: 1.125rem; }
.persona-group h3 { font-size: .875rem; color: var(--text-2); font-weight: 500; margin: var(--s4) 0 var(--s2); }
.persona { display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: left; padding: var(--s3); border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); cursor: pointer; min-height: 60px; }
.persona + .persona { margin-top: var(--s2); }
.persona:hover { border-color: var(--border-strong); background: var(--raised); }
.persona[aria-current="true"] { border-color: var(--brand); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--text); font-weight: 500; font-size: .8125rem; flex: none; border: 1px solid var(--border-strong); }
.persona .who { font-weight: 500; }
.persona .what { font-size: .8125rem; color: var(--text-2); }
.box-card { display: flex; align-items: center; gap: var(--s4); padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); text-decoration: none; color: inherit; }
.box-card + .box-card { margin-top: var(--s3); }
a.box-card:hover { border-color: var(--border-strong); background: var(--raised); }

/* ---------- Dialogues ---------- */
.dialog-backdrop { position: fixed; inset: 0; z-index: 80; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
@media (min-width: 640px) { .dialog-backdrop { align-items: center; padding: var(--s4); } }
.dialog {
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md) var(--r-md) 0 0; box-shadow: var(--shadow);
  padding: var(--s5); animation: rise .2s var(--ease);
}
.dialog.wide { max-width: 760px; }
@media (min-width: 640px) { .dialog { border-radius: var(--r-md); } }
.dialog h2 { margin-bottom: var(--s3); }
.dialog .actions { display: flex; gap: var(--s2); justify-content: flex-end; flex-wrap: wrap; margin-top: var(--s5); }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.toasts { position: fixed; z-index: 95; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 16px); display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 1024px) { .toasts { bottom: 24px; } }
/* En mode salle, les messages passent en haut pour ne pas couvrir les boutons de navigation. */
body:has(.salle) .toasts { bottom: auto; top: max(76px, calc(env(safe-area-inset-top) + 64px)); }
body:has(.shell.focus-mode) .toasts { bottom: 104px; }
.toast { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r-sm); background: var(--raised); color: var(--text); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: .9375rem; animation: rise .2s var(--ease); pointer-events: auto; }
.toast.ok svg { color: var(--success); }
.toast.err svg { color: var(--error); }
.toast svg { flex: none; margin-top: 2px; }

/* Menu mobile (feuille) */
.sheet-nav .nav-group + .nav-group { margin-top: var(--s4); }

/* Utilitaires d'espacement */
.mt-0 { margin-top: 0 !important; } .mt-2 { margin-top: var(--s2); } .mt-3 { margin-top: var(--s3); } .mt-4 { margin-top: var(--s4); } .mt-5 { margin-top: var(--s5); } .mt-6 { margin-top: var(--s6); }
.mb-2 { margin-bottom: var(--s2); } .mb-3 { margin-bottom: var(--s3); } .mb-4 { margin-bottom: var(--s4); } .mb-5 { margin-bottom: var(--s5); }
.section-title { font-size: 1.0625rem; margin: var(--s6) 0 var(--s3); }
.section-title:first-child { margin-top: 0; }
.quota { height: 8px; border-radius: 999px; background: var(--raised); overflow: hidden; display: flex; }
.quota i { display: block; height: 100%; background: var(--brand); }
.quota i.res { background: var(--brand-2); opacity: .7; }
.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: var(--s2) var(--s4); font-size: .9375rem; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; }
.desk-only { display: none; }
@media (min-width: 1024px) { .desk-only { display: initial; } .mob-only { display: none !important; } }


/* ===================================================================
   Design v3 : sobre, une seule couleur pour ce qui compte.
   La couleur de la box est réservée à l'action principale,
   au jour en cours et aux records. Le reste est monochrome.
   =================================================================== */

/* ---------- Mouvement : peu d'effets, chacun avec un rôle ---------- */
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spark { 0% { transform: rotate(var(--a)) translateY(0) scale(1); opacity: 0; } 15% { opacity: 1; } 100% { transform: rotate(var(--a)) translateY(-96px) scale(.3); opacity: 0; } }
@keyframes tick { from { transform: translateY(-5%); opacity: .55; } to { transform: none; opacity: 1; } }

/* Entrée de page : un fondu court ; l'accueil enchaîne ses blocs. */
.enter > *:not(.home) { animation: rise-in .34s var(--ease) both; }
.enter > .home .th { animation: fade-in .5s var(--ease) both; }
.enter > .home .ts { animation: rise-in .5s var(--ease) .05s both; }
.enter > .home .also, .enter > .home .home-side > * { animation: rise-in .5s var(--ease) .1s both; }
.enter > .home .home-side > * + * { animation-delay: .15s; }

/* Retour tactile sur ce qu'on touche. */
.btn, .prow, .rec, .wk, .tile, .keypad button, .duo button, .bigchoice label, .segtabs a { transition: transform .12s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease); }
.btn:active, .prow:active, .rec:active, .wk:active, .duo button:active, .bigchoice label:active { transform: scale(.975); }
.tabbar a { transition: color .18s var(--ease); }
.tabbar a svg { transition: transform .25s var(--ease); }
.tabbar a[aria-current="page"] svg { transform: translateY(-1px) scale(1.06); }
@media (hover: hover) {
  .wodc:hover, a.prow:hover, .rec:hover, .s-blocks .wblock:hover { border-color: var(--border-strong); }
}

/* ---------- Avatars (photo de profil ou initiales) ---------- */
.ava { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--border-strong); color: var(--text); font-weight: 500; font-size: .8125rem; }
.ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ava.sm { width: 28px; height: 28px; font-size: .6875rem; }
.ava.lg { width: 56px; height: 56px; font-size: 1.125rem; }
.ava.xl { width: 96px; height: 96px; font-size: 1.875rem; border-width: 2px; }
.ava-link { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex: none; text-decoration: none; color: inherit; }
.sidebar-me { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-weight: 500; }
.sidebar-me:hover { background: var(--raised); }

/* ---------- Contrôles segmentés et onglets en pilule : neutres ---------- */
.segtabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: var(--s4); }
.segtabs a { flex: 1 1 0; display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 var(--s3); border-radius: 10px; color: var(--text-2); font-weight: 500; text-decoration: none; white-space: nowrap; font-size: .9375rem; }
.segtabs a[aria-selected="true"], .segtabs a[aria-current="page"] { background: var(--seg-on); color: var(--text); font-weight: 500; box-shadow: var(--seg-shadow); }

/* ---------- Accueil ---------- */
.home { display: flex; flex-direction: column; gap: var(--s5); }
.home-main, .home-side { display: flex; flex-direction: column; min-width: 0; }
.home-side { gap: var(--s5); }

/* En-tête : la photo de la salle porte la date et le WOD du jour */
.th { position: relative; isolation: isolate; color: var(--text); }
.th-in { display: flex; flex-direction: column; gap: 8px; }
.th-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.th-date { font-size: .9375rem; line-height: 1.4; font-weight: 500; color: var(--text-2); }
.th-cat { flex: none; font-size: .8125rem; font-weight: 500; color: var(--text-2); padding: 4px 8px; border-radius: 6px; background: var(--raised); }
.th-title { font-size: clamp(2.75rem, 12vw, 4.5rem); line-height: .95; font-weight: 600; letter-spacing: -.01em; font-stretch: 72%; font-variation-settings: "wdth" 72; overflow-wrap: anywhere; text-wrap: balance; }
.th-title a { color: inherit; text-decoration: none; border-radius: 4px; }
.th-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.th-none { font-size: clamp(2.25rem, 9vw, 3.5rem); }
.th-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 4px; }
.th-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.th-meta .f { font-weight: 600; font-size: 1.0625rem; font-stretch: 76%; font-variation-settings: "wdth" 76; }
.th-meta .s { font-size: 1rem; color: var(--text-2); }
.th-fig { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.th-fig .k { font-size: .8125rem; color: var(--text-2); }
.th-fig .v { font-size: 2.5rem; line-height: 1; }
.th-next { color: var(--text-2); }
.th-next a { color: var(--text); }

/* Avec photo : pleine largeur sur téléphone, voile sombre sous le texte */
.th.photo { color: #fff; min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; margin: calc(-1 * var(--s5)) calc(-1 * var(--s4)) 0; padding: 32px 16px 56px; }
.th.photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.th.photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8,9,11,.1) 0%, rgba(8,9,11,.3) 100%); }
/* Voile local qui suit le bloc de texte : le contraste tient quelle que soit la photo et la longueur du titre. */
.th.photo .th-in { position: relative; }
.th.photo .th-in::before { content: ""; position: absolute; z-index: -1; left: -16px; right: -16px; top: -72px; bottom: -56px; pointer-events: none; background: linear-gradient(180deg, rgba(8,9,11,0) 0, rgba(8,9,11,.84) 72px, rgba(8,9,11,.94) 100%); }
.th.photo .th-date, .th.photo .th-meta .s, .th.photo .th-fig .k, .th.photo .th-next { color: rgba(255,255,255,.82); }
.th.photo .th-cat { color: #fff; background: rgba(255,255,255,.16); }
.th.photo .th-next a { color: #fff; }

/* La séance : une feuille qui remonte du bas de la photo */
.ts { display: flex; flex-direction: column; gap: 16px; margin-top: var(--s4); padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.th.photo + .ts { position: relative; margin-top: -32px; }
.ts-presc { font-size: 1.125rem; line-height: 1.5; }
.ts-presc ul { margin: 4px 0 0; padding-left: 1.2em; }
.ts-actions { display: flex; gap: 8px; }
.ts-blocks { list-style: none; margin: 0; padding: 4px 0 0; border-top: 1px solid var(--border); }
.ts-blocks li { display: flex; align-items: flex-start; gap: 12px; padding-top: 12px; }
.ts-blocks .l { width: 20px; flex: none; font-size: 1.125rem; line-height: 1.25; font-weight: 600; color: var(--text-3); font-stretch: 72%; font-variation-settings: "wdth" 72; }
.ts-blocks .n { flex: 1; min-width: 0; font-size: .9375rem; line-height: 1.45; }
.ts-blocks .p { display: block; font-size: .8125rem; color: var(--text-2); }
.ts-blocks .e { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: .8125rem; line-height: 1.8; color: var(--text-2); }
.ts-blocks .e.ok { font-size: .9375rem; line-height: 1.45; color: var(--text); }
.ts-blocks .e.ok svg { color: var(--success); }
.also h2 { font-size: 1.125rem; margin-bottom: var(--s3); }
.ts-empty { margin-top: var(--s4); display: flex; }
.ts-empty .btn { flex: 1; }
@media (min-width: 720px) { .ts-empty .btn { flex: none; } }

/* Ma semaine : une rangée de jours sur téléphone, une liste sur ordinateur */
.weekbox h2 { font-size: 1.125rem; }
.wk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.wk-count { font-size: .875rem; color: var(--text-2); }
.wk-count .num { font-size: 1.125rem; color: var(--text); margin-right: 4px; }
.week { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wk { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0; border-radius: 12px; color: inherit; text-decoration: none; }
.wk .d { font-size: .75rem; color: var(--text-2); }
.wk .c { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1px solid var(--border); color: var(--text-2); font-size: .9375rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.wk .t { display: none; }
.wk.done .c { background: var(--raised); border-color: transparent; color: var(--text); }
.wk.today .d { color: var(--brand-ink); font-weight: 500; }
.wk.today .c { border: 2px solid var(--brand); color: var(--text); font-weight: 600; }
.wk.rest .c { border-style: dashed; color: var(--text-3); }

.rec { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.rec .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand-ink); }
.rec .k { display: block; font-size: .8125rem; color: var(--text-2); }
.rec .n { display: block; font-size: 1rem; font-weight: 500; }
.rec .v { flex: none; font-size: 1.5rem; line-height: 1; }
.rec > svg { flex: none; color: var(--text-2); }

@media (min-width: 1024px) {
  .home { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s6); align-items: start; }
  .home-side { position: sticky; top: calc(var(--demo-h) + var(--s6)); }
  .th.photo { margin: 0; min-height: 360px; padding: 40px 32px 72px; border-radius: 20px; overflow: hidden; }
  .th.photo + .ts { margin: -40px 16px 0; }
  .th.photo .th-in::before { left: -32px; right: -32px; bottom: -72px; }
  .ts { padding: 24px; }
  .week { grid-template-columns: 1fr; gap: 2px; }
  .wk { flex-direction: row; gap: 12px; padding: 4px 8px; }
  .wk:hover { background: var(--raised); }
  .wk .d { display: none; }
  .wk .c { width: 32px; height: 32px; font-size: .8125rem; }
  .wk .t { display: flex; flex-direction: column; min-width: 0; font-size: .9375rem; line-height: 1.3; }
  .wk .t .wd { font-size: .75rem; color: var(--text-2); }
  .wk.today .t .wd { color: var(--brand-ink); }
  .wk.rest .t { color: var(--text-3); }
}

/* Composants partagés avec la page WOD (plusieurs séances le même jour) */
.wodc { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.wodc + .wodc { margin-top: var(--s4); }
.wodc-top { display: flex; align-items: center; gap: var(--s2); padding: 16px 20px 8px; }
.wodc-top .lbl { font-size: .875rem; font-weight: 500; color: var(--text-2); }
.wodc-body { display: flex; flex-direction: column; gap: 12px; padding: 0 20px 20px; color: inherit; text-decoration: none; }
.wodc-title { font-size: 3.5rem; line-height: .95; font-weight: 600; letter-spacing: -.01em; font-stretch: 72%; font-variation-settings: "wdth" 72; overflow-wrap: anywhere; }
.wodc-meta { font-weight: 500; font-size: 1.0625rem; color: var(--text-2); }
.wodc-presc { font-size: 1.125rem; line-height: 1.5; }
.wodc-presc ul { margin: 2px 0 0; padding-left: 1.2em; }
.wodc-empty { font-weight: 500; font-size: 1.125rem; }
.wodc-ctx { padding: 0 20px 20px; }
.last { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--raised); }
.last svg { color: var(--text-2); flex: none; }
.last .k { font-size: .8125rem; color: var(--text-2); }
.last .v { font-weight: 600; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
.last .v .m { font-weight: 500; font-size: .875rem; color: var(--text-2); }
.bsum { list-style: none; margin: 0; padding: 4px 20px; border-top: 1px solid var(--border); }
.bsum li { display: flex; align-items: center; gap: 12px; min-height: 40px; font-size: .9375rem; }
.bsum .l { width: 20px; flex: none; font-weight: 600; font-size: 1.125rem; color: var(--text-3); font-stretch: 72%; font-variation-settings: "wdth" 72; }
.bsum .n { min-width: 0; }
.bsum .n.strong { font-weight: 500; }
.bsum .s { margin-left: auto; color: var(--text-2); font-size: .8125rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.bsum .s.ok { color: var(--text); font-weight: 500; }
.wodc-actions { display: flex; gap: 8px; padding: 16px 20px 20px; border-top: 1px solid var(--border); }
.btn-xl { min-height: 56px; border-radius: 14px; font-size: 1rem; }
.btn-big { min-height: 56px; border-radius: 14px; font-size: 1.0625rem; width: 100%; }

/* ---------- Planning ---------- */
.plan-range { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s3); }
.plan-range .r { font-weight: 500; font-size: 1.0625rem; text-align: center; font-variant-numeric: tabular-nums; }
.plist { display: flex; flex-direction: column; gap: var(--s2); }
.prow { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 76px; padding: 12px 16px 12px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: inherit; text-decoration: none; }
.prow .dp { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 56px; border-radius: 12px; background: var(--raised); line-height: 1.1; }
.prow .dp .w { font-size: .75rem; color: var(--text-2); font-weight: 500; }
.prow .dp .n { font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; font-stretch: 80%; font-variation-settings: "wdth" 80; }
.prow .pt { font-weight: 500; font-size: 1.0625rem; }
.prow .ps { font-size: .875rem; color: var(--text-2); margin-top: 2px; }
.prow .end { display: flex; align-items: center; gap: var(--s2); color: var(--text-2); }
.prow .noted { display: inline-flex; align-items: center; gap: 4px; font-size: .8125rem; font-weight: 500; color: var(--text-2); }
.prow.rest { background: transparent; border-style: dashed; min-height: 64px; }
.prow.rest .pt { font-weight: 500; color: var(--text-2); font-size: .9375rem; }
.prow.is-today { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.prow.is-today .dp { background: rgba(0,0,0,.2); }
.prow.is-today .dp .w, .prow.is-today .ps, .prow.is-today .end, .prow.is-today .noted { color: inherit; opacity: .9; }
.prow.is-today .today-pill { font-size: .8125rem; font-weight: 500; padding: 4px 8px; border-radius: 8px; background: rgba(0,0,0,.2); }
.search-box { margin-top: var(--s5); }
.search-box > summary { list-style: none; display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer; min-height: 44px; color: var(--text-2); font-weight: 500; }
.search-box > summary::-webkit-details-marker { display: none; }
.search-box[open] > summary { margin-bottom: var(--s3); }

/* ---------- Séance ---------- */
.s-top { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; margin: -8px 0 var(--s3); }
.s-top .t { text-align: center; font-weight: 500; }
.pills { display: flex; flex-wrap: wrap; gap: var(--s2); }
.pill { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; font-size: .875rem; font-weight: 500; white-space: nowrap; }
.pill.accent { background: var(--brand); color: var(--on-brand); }
.pill.neutral { background: var(--raised); color: var(--text-2); font-weight: 500; }
.s-band { position: relative; height: 136px; border-radius: 18px; overflow: hidden; isolation: isolate; margin-bottom: var(--s4); }
.s-band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.s-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8,9,11,0) 35%, rgba(8,9,11,.72) 100%); }
.s-band .pills { position: absolute; left: 16px; bottom: 12px; }
.s-band .pill.neutral { background: rgba(11,13,16,.75); color: #F5F5F4; }
.s-band.noimg { height: auto; overflow: visible; }
.s-band.noimg::after { display: none; }
.s-band.noimg .pills { position: static; }
.s-band.noimg .pill.neutral { background: var(--raised); color: var(--text-2); }
.s-title { font-size: 4.5rem; line-height: .92; font-weight: 600; letter-spacing: -.01em; font-stretch: 70%; font-variation-settings: "wdth" 70; margin: var(--s3) 0 var(--s2); overflow-wrap: anywhere; }
.info-card { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: var(--s3); padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.info-card svg { color: var(--text-2); margin-top: 2px; }
.info-card h2, .info-card h3 { font-size: .9375rem; margin-bottom: 2px; }
.info-card p { color: var(--text-2); line-height: 1.45; }
.s-blocks { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s4); }
.wblock { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--s3); padding: 20px 20px 20px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.wblock.is-main { border-color: var(--border-strong); }
.wblock .letter { font-size: 2rem; line-height: 1; font-weight: 600; color: var(--text-2); font-stretch: 70%; font-variation-settings: "wdth" 70; }
.wblock .btype { font-size: .8125rem; font-weight: 500; color: var(--text-2); }
.wblock .bformat { font-size: 2.125rem; line-height: 1; font-weight: 600; font-stretch: 74%; font-variation-settings: "wdth" 74; margin-top: 4px; }
.wblock .bname { font-size: 1.1875rem; font-weight: 500; margin-top: 2px; }
.wblock .btitle { font-weight: 500; font-size: 1.0625rem; margin-top: 4px; }
.wblock .presc { margin-top: var(--s2); font-size: 1.0625rem; line-height: 1.55; }
.wblock .presc ul { margin: 2px 0 0; padding-left: 1.2em; }
.wblock .bmeta { margin-top: var(--s2); font-size: .9375rem; color: var(--text-2); }
.wblock .last { margin-top: var(--s3); }
.wblock .wfoot { margin-top: var(--s3); }
.mine-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: 12px 16px; border-radius: 14px; background: var(--raised); color: inherit; text-decoration: none; }
.mine-row .k { display: block; font-size: .8125rem; color: var(--text-2); }

/* ---------- Mode salle ---------- */
.salle { position: fixed; inset: 0; z-index: 70; background: #000; color: #fff; display: flex; flex-direction: column; overflow: hidden;
  padding: max(12px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); animation: fade-in .4s var(--ease) both; }
.salle header { flex: none; display: flex; align-items: center; gap: var(--s2); min-height: 52px; }
.salle .x { width: 48px; height: 48px; border-radius: 14px; background: #15181D; color: #fff; display: grid; place-items: center; text-decoration: none; flex: none; }
.salle .count { flex: 1; text-align: center; color: #8A93A0; font-weight: 500; }
.salle-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; width: 100%; max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; justify-content: safe center; gap: 12px; padding: var(--s4) 0; animation: rise-in .35s var(--ease) both; }
.salle .t { font-size: calc(1.125rem * var(--fit, 1)); font-weight: 500; color: #B8BEC7; }
.salle .h { font-size: calc(clamp(2.75rem, min(15vw, 13vh), 7rem) * var(--fit, 1)); line-height: .9; font-weight: 600; font-stretch: 70%; font-variation-settings: "wdth" 70; }
.salle .sub { font-size: calc(clamp(1.25rem, min(6vw, 4.4vh), 2.5rem) * var(--fit, 1)); font-weight: 500; color: #B8BEC7; }
.salle .p { font-size: calc(clamp(1.375rem, min(7.6vw, 5.2vh), 3.25rem) * var(--fit, 1)); line-height: 1.15; font-weight: 600; }
.salle .p ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.salle .meta { margin-top: 8px; padding-top: 16px; border-top: 1px solid #2A3038; font-size: calc(clamp(1rem, min(4.8vw, 3.2vh), 1.75rem) * var(--fit, 1)); font-weight: 500; color: #B8BEC7; }
.salle footer { flex: none; padding-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 980px; margin: 0 auto; }
.salle footer a { min-height: 64px; border-radius: 16px; border: 1px solid #2A3038; background: #15181D; color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 1.125rem; font-weight: 500; text-decoration: none; }
.salle .wake { flex: none; margin: 12px auto 0; max-width: 34em; text-align: center; text-wrap: balance; font-size: .875rem; color: #8A93A0; }
.salle .wake svg { display: inline-block; vertical-align: -4px; margin-right: 8px; }

/* ---------- Saisie du score ---------- */
@keyframes shake { 15%, 85% { transform: translateX(-2px); } 30%, 70% { transform: translateX(5px); } 50% { transform: translateX(-6px); } }
.shake { animation: shake .42s var(--ease) both; }
.entry2 { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.entry2 > div:empty { display: none; }
.e-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; margin-top: -8px; }
.e-head .t { text-align: center; }
.e-head .t1 { font-weight: 500; }
.e-head .t2 { font-size: .8125rem; color: var(--text-2); }
.display { text-align: center; padding: 8px 0 0; }
.display .v { font-size: 6.5rem; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; font-stretch: 76%; font-variation-settings: "wdth" 76; }
.display .v.muted { color: var(--text-3); }
.display .v.bump { animation: tick .16s var(--ease); }
.display .u { font-size: .875rem; color: var(--text-2); min-height: 1.4em; }
.display .u.err { color: var(--error); font-weight: 500; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.duo button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 16px; border: 2px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.duo button[aria-pressed="true"] { border-color: var(--brand); }
.duo .v { font-size: 3.5rem; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; font-stretch: 76%; font-variation-settings: "wdth" 76; }
.duo .v.muted { color: var(--text-3); }
.duo .k { font-size: .8125rem; color: var(--text-2); font-weight: 500; }
.lastchip { align-self: center; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: .875rem; }
.lastchip svg { color: var(--text-2); flex: none; }
.lastchip .m { color: var(--text-2); }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.keypad button { height: 56px; border-radius: 14px; border: 0; background: var(--raised); color: var(--text); font: inherit; font-size: 1.625rem; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer; display: grid; place-items: center; }
.keypad button:active, .keypad button.kp-hit { transform: scale(.95); background: var(--border-strong); }
.keypad.off { opacity: .35; pointer-events: none; }
.bigchoice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bigchoice label { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 112px; border-radius: 18px; border: 2px solid var(--border); background: var(--surface); font-weight: 500; font-size: 1.0625rem; cursor: pointer; }
.bigchoice input { position: absolute; opacity: 0; pointer-events: none; }
.bigchoice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.bigchoice label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.more > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; color: var(--text-2); font-weight: 500; }
.more > summary::-webkit-details-marker { display: none; }
.more[open] > summary { margin-bottom: var(--s2); }
.more.disclose > summary svg { transition: transform .2s var(--ease); }
.more.disclose[open] > summary svg { transform: rotate(90deg); }
.e-save { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); display: flex; gap: var(--s2); z-index: 5; padding-top: 20px; background: linear-gradient(to bottom, transparent, var(--bg) 20px); }
.e-save .btn-primary { flex: 1; }

/* Écrans « concentrés » (saisie, record) : sans barres sur mobile. */
@media (max-width: 1023px) {
  .shell.focus-mode .tabbar, .shell.focus-mode .topbar { display: none; }
  .shell.focus-mode .main { padding-bottom: var(--s5); padding-top: var(--s4); }
  .shell.focus-mode .e-save { bottom: 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media (min-width: 1024px) { .e-save { bottom: 0; padding-bottom: var(--s4); } }
/* Téléphones peu hauts : le pavé et le bouton tiennent dans l'écran. */
@media (max-height: 880px) {
  .entry2 { gap: 12px; }
  .display { padding-top: 0; }
  .display .v { font-size: 5.25rem; }
  .duo .v { font-size: 3rem; }
  .keypad button { height: 52px; }
}

/* ---------- Nouveau record ---------- */
.rec-screen { max-width: 460px; margin: 0 auto; min-height: calc(100vh - var(--demo-h) - 64px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: var(--s5) 0; }
.trophy { position: relative; width: 112px; height: 112px; display: grid; place-items: center; margin-bottom: var(--s4); }
.trophy .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.trophy .ring circle { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 333; stroke-dashoffset: 333; animation: draw .9s var(--ease) .15s forwards; }
.trophy .core { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); animation: pop .55s var(--ease) .45s both; }
.trophy .sparks i { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--brand); animation: spark 1s var(--ease) .95s both; }
.trophy .sparks i:nth-child(even) { background: var(--brand-2); width: 5px; height: 5px; margin: -2.5px; }
.rec-k { font-weight: 600; color: var(--brand-ink); animation: rise-in .4s var(--ease) .5s both; }
.rec-n { font-size: 1.375rem; font-weight: 500; animation: rise-in .4s var(--ease) .58s both; }
.rec-v { display: flex; align-items: baseline; justify-content: center; gap: .1em; white-space: nowrap; font-size: clamp(4.75rem, 27vw, 8.5rem); line-height: .95; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.03em; font-stretch: 74%; font-variation-settings: "wdth" 74; animation: rise-in .45s var(--ease) .62s both; }
.rec-v .u { font-size: .3em; font-weight: 500; letter-spacing: 0; color: var(--text-2); font-stretch: 100%; font-variation-settings: "wdth" 100; }
.rec-d { font-size: 1.125rem; font-weight: 500; color: var(--text-2); animation: rise-in .4s var(--ease) 1.4s both; }
.cmp { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); align-items: center; gap: var(--s2); margin-top: var(--s5); padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); text-align: left; animation: rise-in .45s var(--ease) 1.5s both; }
.cmp .k { font-size: .8125rem; color: var(--text-2); }
.cmp .v { font-size: 1.625rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cmp .v.muted { color: var(--text-2); }
.cmp svg { color: var(--text-2); }
.gain { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--s2); font-weight: 500; color: var(--success); animation: rise-in .4s var(--ease) 1.6s both; }
.rec-actions { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-top: var(--s6); animation: fade-in .4s var(--ease) 1.7s both; }

/* ---------- Performances ---------- */
.rec-tile { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--raised); color: var(--text-2); flex: none; }
.best-card { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); margin-bottom: var(--s3); }
.best-card .k { color: var(--text-2); font-size: .875rem; font-weight: 500; }
.best-card .v { font-size: 3.25rem; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; font-stretch: 78%; font-variation-settings: "wdth" 78; margin-top: 4px; }
.trend { text-align: right; }
.trend .t { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.trend .t.up { color: var(--success); }
.trend .t.down { color: var(--error); }
.trend .s { font-size: .8125rem; color: var(--text-2); }
.chart-box .area { stroke: none; }
.chart-box.animate .area { animation: fade-in .8s var(--ease) .55s both; }
.chart-box.animate .pt { transform-box: fill-box; transform-origin: center; animation: pop .4s var(--ease) both; }
.recent { list-style: none; margin: 0; padding: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.recent li + li { border-top: 1px solid var(--border); }
.recent a { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: 0 16px; min-height: 56px; color: inherit; text-decoration: none; }
.recent a:hover { background: var(--raised); }
.recent .val { font-weight: 600; font-size: 1.0625rem; font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }
.recent .tie { font-size: .8125rem; font-weight: 500; color: var(--text-2); }

/* ---------- Profil ---------- */
.prof-head { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }
.prof-head .name { font-size: 1.375rem; font-weight: 600; }

/* ---------- Infos box ---------- */
.team { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.team li { display: flex; align-items: center; gap: var(--s3); }

/* Rayons un peu plus doux pour les grandes surfaces. */
.panel, .list, .table-wrap { border-radius: 18px; }

/* ---------- Signature : les chiffres façon chrono de box ----------
   Chaque temps, charge et score : Archivo condensé, chiffres alignés, même graisse partout. */
.score-mid, .score-big, .kpi .v, .last .v, .rec .v, .cmp .v, .best-card .v, .recent .val, .dk .v, .cls-time, .slot .t, .coach-cls .t, .mybk .t, .dt-classes .t, .todo-time,
.display .v, .duo .v, .rec-v, .table td.num, .num {
  font-variant-numeric: tabular-nums; font-weight: 600;
  font-stretch: 76%; font-variation-settings: "wdth" 76;
}
.last .v .m, .rec-v .u { font-weight: 500; font-stretch: 100%; font-variation-settings: "wdth" 100; }
.caps { text-transform: uppercase; }

/* =========================================================================
   Réservations, abonnements et pilotage
   ========================================================================= */
.h-sm { font-size: 1.125rem; font-weight: 500; }
.h-xs { font-size: .9375rem; font-weight: 500; color: var(--text-2); }
.row-between { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.num.big { font-size: 1.75rem; line-height: 1; }
.cap { display: block; height: 4px; border-radius: 2px; background: var(--raised); overflow: hidden; }
.cap i { display: block; height: 100%; border-radius: 2px; background: var(--text-3); }
.member-link { color: inherit; text-decoration: none; }
.member-link:hover span { text-decoration: underline; }

/* Réserver */
.bk-layout { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); }
.bk-side { display: flex; flex-direction: column; gap: var(--s4); }
@media (min-width: 1024px) { .bk-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .bk-side { position: sticky; top: calc(var(--demo-h) + var(--s6)); } }
.bdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bday { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 8px; border-radius: 12px; color: var(--text-2); text-decoration: none; border: 1px solid transparent; }
.bday .w { font-size: .75rem; text-transform: none; }
.bday .n { font-size: 1.25rem; color: var(--text); }
.bday .dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.bday .dot.on { background: var(--brand); }
.bday:hover { background: var(--raised); }
.bday.is-sel { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.bk-dayhead { display: flex; align-items: baseline; gap: var(--s3); margin: var(--s5) 0 var(--s3); }
.bk-dayhead h2 { font-size: 1.375rem; }
.bk-wod { margin-bottom: var(--s3); }
.bk-wod .list-row { min-height: 52px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); }
.bk-wod .list-row + .list-row { margin-top: 4px; }
.bk-nowod { margin-bottom: var(--s3); }
.classes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cls { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.cls.is-mine { border-color: var(--border-strong); box-shadow: inset 3px 0 0 var(--brand); }
.cls.is-past { background: transparent; }
.cls.is-past .cls-time, .cls.is-past .cls-title { color: var(--text-2); }
.cls-time { font-size: 1.5rem; line-height: 1; }
.cls-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cls-title { font-weight: 500; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cls-dur { font-size: .8125rem; color: var(--text-2); font-weight: 400; }
.cls-meta { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--text-2); }
.cls-meta .ava.sm { width: 24px; height: 24px; font-size: .625rem; }
.cls-fill { display: grid; grid-template-columns: minmax(40px, 120px) auto minmax(0, 1fr); align-items: center; gap: 8px; font-size: .8125rem; color: var(--text-2); }
.cls-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cls-state { display: inline-flex; align-items: center; gap: 4px; font-size: .875rem; color: var(--text-2); }
.cls-state.ok { color: var(--text); }
.cls-state.ok svg { color: var(--success); }
.btn-reserve { color: var(--text); border-color: var(--border-strong); }
@media (max-width: 479px) { .cls { grid-template-columns: 52px minmax(0, 1fr); } .cls-act { grid-column: 2; } .cls-time { font-size: 1.25rem; } }
.mybk { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.mybk a { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: inherit; text-decoration: none; border-top: 1px solid var(--border); }
.mybk li:first-child a { border-top: 0; }
.mybk .t { font-size: 1.25rem; width: 52px; }
.mybk .d { display: block; font-weight: 500; }
.mybk .small { display: block; }
.bk-rules ul { margin: var(--s2) 0 0; padding-left: 1.1em; color: var(--text-2); font-size: .875rem; line-height: 1.5; }
.bk-rules li + li { margin-top: 4px; }

/* Accueil : le cours du jour */
.tb { display: flex; align-items: center; gap: 12px; padding: 12px; margin: -4px -4px 0; border-radius: 14px; background: var(--raised); color: inherit; text-decoration: none; }
.tb .grow { display: flex; flex-direction: column; min-width: 0; }
.tb strong { font-weight: 500; }
.tb-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface); color: var(--text-2); }
.tb.is-booked .tb-ic { color: var(--success); }
.tb-warn .tb-ic { color: var(--warning); }
.tb-pick { display: block; background: transparent; padding: 0; margin: 0; }
.tb-k { font-size: .875rem; color: var(--text-2); margin-bottom: 8px; }
.tb-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.slot-chip { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 88px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; text-align: left; transition: background-color .18s var(--ease), border-color .18s var(--ease); }
.slot-chip .num { font-size: 1.125rem; }
.slot-chip .s { font-size: .75rem; color: var(--text-2); }
.slot-chip:hover { background: var(--raised); }
.slot-chip:active { transform: scale(.97); }

/* Mon abonnement et fiche membre */
.sub-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.sub-head h2 { font-size: 1.5rem; margin: 4px 0; }
.usage { margin-top: var(--s4); padding: 16px; border-radius: var(--r-sm); background: var(--raised); }
.usage-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--text-2); font-size: .9375rem; }
.usage-top .big { color: var(--text); margin-right: 4px; }
.segs { display: flex; gap: 4px; margin-top: 12px; }
.segs i { flex: 1; height: 8px; border-radius: 4px; background: var(--surface); border: 1px solid var(--border); }
.segs i.on { background: var(--brand); border-color: transparent; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px var(--s4); margin: var(--s4) 0 0; }
.facts dt { font-size: .8125rem; color: var(--text-2); }
.facts dd { margin: 2px 0 0; }
.dues { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.dues li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.dues li:first-child { border-top: 0; }
.dues .grow { display: flex; flex-direction: column; gap: 2px; flex: 1 1 180px; min-width: 0; }
.dues .row-wrap { flex: none; flex-wrap: nowrap; margin-left: auto; }
.wbars { margin: var(--s4) 0 0; }
.wbars-plot { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; align-items: end; height: 132px; }
.wb { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.wb i { display: block; width: 100%; max-width: 28px; min-height: 2px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--text-3) 60%, transparent); }
.wb.cur i { background: var(--brand); }
.wb .v { font-size: .8125rem; color: var(--text-2); }
.wb .x { font-size: .75rem; color: var(--text-2); }
.member-head { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s3); }
.member-head h1 { font-size: 1.75rem; }
.note { padding: 12px 0; border-top: 1px solid var(--border); }
.note:first-of-type { border-top: 0; }
.fchoice { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fopt { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-sm); border: 1px solid var(--border); cursor: pointer; }
.fopt input { accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.fopt:has(input:checked) { border-color: var(--border-strong); background: var(--raised); }
.fopt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }
.fopt .grow { display: flex; flex-direction: column; }
.fopt .n { font-weight: 500; }
.fopt .p { font-size: .9375rem; white-space: nowrap; }

/* Coach : cours et appel */
.day-nav { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s4); flex-wrap: wrap; }
.day-nav .label { font-weight: 500; font-size: 1.0625rem; min-width: 140px; text-align: center; }
.coach-classes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.coach-cls { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); color: inherit; text-decoration: none; flex-wrap: wrap; }
.coach-cls:hover { border-color: var(--border-strong); }
.coach-cls.is-mine { box-shadow: inset 3px 0 0 var(--brand); }
.coach-cls .t { font-size: 1.5rem; width: 64px; }
.coach-cls .grow { display: flex; flex-direction: column; min-width: 140px; }
.coach-cls .title { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.coach-cls > svg { color: var(--text-2); }
.cc-fill { display: flex; flex-direction: column; gap: 4px; width: 140px; }
.roll-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--s3); margin-bottom: var(--s5); }
.roll-sum > * { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); color: inherit; text-decoration: none; }
.roll-wod .title { font-weight: 500; }
.roll { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.roll-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.roll-row:first-child { border-top: 0; }
.roll-row .grow { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.roll-row .name { font-weight: 500; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }
.badges:empty { display: none; }
.roll-seg { flex: none; }
.roll-seg button { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; }
.roll-seg button[aria-pressed="true"]:first-child { color: var(--success); }
.roll-seg button[aria-pressed="true"]:last-child { color: var(--error); }

/* Pilotage */
.dash-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s5); }
@media (min-width: 900px) { .dash-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dk { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); color: inherit; text-decoration: none; min-width: 0; }
a.dk:hover { border-color: var(--border-strong); }
.dk .k { font-size: .875rem; color: var(--text-2); }
.dk .v { font-size: 2.25rem; line-height: 1.05; }
.small-kpis .dk .v { font-size: 1.5rem; }
.dk .d { font-size: .8125rem; color: var(--text-2); }
.dk .d.up, .dk .d .up { color: var(--success); }
.dk .d.down, .dk .d .down { color: var(--error); }
.dk.alert .v { color: var(--error); }
.progress { display: block; height: 4px; border-radius: 2px; background: var(--raised); margin-top: 8px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--brand); border-radius: 2px; }
.dash { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); }
.dash-main, .dash-side { display: flex; flex-direction: column; gap: var(--s5); min-width: 0; }
.dash-side { gap: var(--s4); }
@media (min-width: 1100px) { .dash { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.todo h2 { font-size: 1.25rem; }
.todo-g { margin-top: var(--s5); }
.todo-g h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 500; }
.todo-g h3 svg { color: var(--text-2); }
.todo-g h3 .count { margin-left: 4px; font-size: .875rem; padding: 0 8px; border-radius: 10px; background: var(--raised); color: var(--text-2); }
.todo-g > p { margin-top: 4px; }
.todo-g ul { list-style: none; margin: var(--s2) 0 0; padding: 0; }
.todo-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.todo-who { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 220px; color: inherit; text-decoration: none; }
.todo-who .grow { display: flex; flex-direction: column; min-width: 0; }
.todo-who .name { font-weight: 500; }
.todo-who:hover .name { text-decoration: underline; }
.todo-time { font-size: 1.25rem; width: 52px; }
.todo-act { display: flex; gap: 8px; flex-wrap: wrap; }
.mbars { margin: var(--s4) 0 0; }
.mbars-plot { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s3); height: 220px; align-items: end; }
.mb { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 8px; }
.mb .col { width: 100%; max-width: 56px; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.mb i { display: block; width: 100%; border-radius: 4px 4px 0 0; }
.mb .paid { background: color-mix(in srgb, var(--text-3) 55%, transparent); min-height: 2px; }
.mb.cur .paid { background: var(--brand); }
.mb .rest { border: 1px dashed var(--border-strong); border-bottom: 0; background: transparent; }
.mb .rest + .paid { border-radius: 0; }
.mb .v { font-size: .8125rem; color: var(--text-2); white-space: nowrap; }
.mb.cur .v { color: var(--text); }
.mb .x { font-size: .8125rem; color: var(--text-2); }
.mbars-legend { display: flex; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s3); font-size: .8125rem; color: var(--text-2); }
.mbars-legend span { display: inline-flex; align-items: center; gap: 8px; }
.mbars-legend .k { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.mbars-legend .paid-k { background: var(--brand); }
.mbars-legend .rest-k { border: 1px dashed var(--border-strong); }
.dt-classes { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.dt-classes a { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: inherit; text-decoration: none; border-top: 1px solid var(--border); }
.dt-classes li:first-child a { border-top: 0; }
.dt-classes .t { font-size: 1.125rem; width: 48px; }
.dt-classes .grow { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dt-classes a.is-past { color: var(--text-2); }
.heat { margin-top: var(--s3); }
.heat-row { display: grid; grid-template-columns: 48px repeat(7, minmax(0, 1fr)); gap: 2px; margin-bottom: 2px; }
.heat .hd { font-size: .75rem; color: var(--text-2); text-align: center; }
.heat .hd abbr { text-decoration: none; }
.heat .ht { font-size: .8125rem; color: var(--text-2); align-self: center; }
.hc { display: grid; place-items: center; height: 28px; border-radius: 4px; font-size: .75rem; color: var(--text); font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--brand) var(--f), var(--surface)); }
.hc.none { background: transparent; border: 1px dashed var(--border); }
.heat-k { margin-top: var(--s2); }
.mix { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.mix li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 8px 0; font-size: .9375rem; }
.mix .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--raised); overflow: hidden; }
.mix .bar i { display: block; height: 100%; border-radius: 2px; background: color-mix(in srgb, var(--text-3) 70%, transparent); }
.mix li:first-child .bar i { background: var(--text-2); }

/* Encaissements */
.dues-table .num-col { text-align: right; white-space: nowrap; }
.dues-table td.actions { white-space: nowrap; }
.dues-table .row { color: inherit; text-decoration: none; }

/* Formules */
.fcards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.fcard { padding: 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.fcard.is-archived { opacity: .7; background: transparent; }
.fc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.fcard h2 { font-size: 1.125rem; }
.fc-price { margin-top: 4px; }
.fc-price .num { font-size: 1.75rem; }
.fc-n { margin-top: 8px; color: var(--text-2); }
.fc-n .num { color: var(--text); }

/* Planning des cours */
.wk-grid { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
@media (min-width: 1280px) { .wk-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.wk-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wk-col h2 { font-size: .9375rem; font-weight: 500; color: var(--text-2); }
.slot { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; padding: 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border); color: inherit; font: inherit; cursor: pointer; transition: border-color .18s var(--ease); }
.slot:hover:not(:disabled) { border-color: var(--border-strong); }
.slot:disabled { cursor: default; }
.slot .t { font-size: 1.25rem; line-height: 1.1; }
.slot .k { font-weight: 500; }
.slot-fill { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; margin-top: 4px; color: var(--text-2); }

.enter > .bk-layout, .enter > .dash { animation: rise-in .45s var(--ease) both; }

/* Cours terminés repliés */
.cls-done { margin-bottom: 8px; }
.cls-done > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; cursor: pointer; color: var(--text-2); font-size: .875rem; list-style: none; }
.cls-done > summary::-webkit-details-marker { display: none; }
.cls-done > summary::before { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .2s var(--ease); }
.cls-done[open] > summary::before { transform: rotate(45deg); }
.cls-done > summary:hover { color: var(--text); }
.cls-done .classes { margin-top: 4px; }

@media (min-width: 1100px) { .dues-table td:nth-child(3) { white-space: nowrap; } }
.segtabs .n { margin-left: 6px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.segtabs a[aria-current="page"] .n { color: var(--text-2); }
.slot-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; }
.slot-top .cap-n { white-space: nowrap; font-variant-numeric: tabular-nums; }
.todo > .empty { margin-top: var(--s4); }
@media (max-width: 480px) {
  .segtabs:has(.n) a { flex-direction: column; gap: 0; min-height: 48px; padding: 4px; line-height: 1.15; font-size: .875rem; }
  .segtabs:has(.n) .n { margin-left: 0; font-size: .8125rem; }
}
/* Types de cours */
.ctypes { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: var(--s5); }
.ctypes li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.ctypes .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ctypes .n { font-weight: 500; }

/* Places et liste d'attente : lisibles d'un coup d'œil */
.cls-fill { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; grid-template-columns: none; }
.seats { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.seats .sg { display: grid; grid-template-columns: repeat(var(--cols), 8px); gap: 3px; }
.seats i { display: block; width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--success); }
.seats i.on { background: var(--text-3); box-shadow: none; }
.seats i.me { background: var(--brand); box-shadow: none; }
.seats .wl { display: inline-flex; align-items: center; gap: 3px; padding-left: 8px; border-left: 1px solid var(--border-strong); }
.seats .wl i { box-shadow: inset 0 0 0 1.5px var(--warning); }
.seats .wl i.me { background: var(--warning); }
.seats .wl b { font-size: .75rem; font-weight: 600; color: var(--warning); line-height: 1; }
.cls-st { display: inline-flex; align-items: center; gap: 4px; font-size: .875rem; color: var(--text-2); }
.cls-st svg { flex: none; }
.cls-st strong { font-weight: 600; }
.st-free { color: var(--success); }
.st-free strong { font-size: 1.0625rem; }
.st-few { color: var(--warning); font-weight: 500; }
.st-full { color: var(--text); font-weight: 500; }
.st-full .st-sub { color: var(--text-2); font-weight: 400; }
.st-mine { color: var(--success); font-weight: 500; }
.st-wait { color: var(--warning); font-weight: 500; }
.cls-hint { font-size: .8125rem; color: var(--text-2); }
.cls.is-wait { border: 1px dashed color-mix(in srgb, var(--warning) 60%, transparent); background: color-mix(in srgb, var(--warning) 6%, var(--surface)); box-shadow: inset 3px 0 0 var(--warning); }
.cls.is-full .cls-time { color: var(--text-2); }
.btn-wait svg { color: var(--warning); }
.bday .dot.wait { background: transparent; box-shadow: inset 0 0 0 1.5px var(--warning); }
.mybk .pill, .pill { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 500; white-space: nowrap; }
.pill.ok { color: var(--success); background: var(--success-bg); }
.pill.wait { color: var(--warning); background: var(--warning-bg); }
.slot-chip.is-few .s { color: var(--warning); }
.slot-chip.is-full { border-style: dashed; }
.slot-chip.is-full .s { color: var(--warning); }
.slot-chip .k { font-size: .8125rem; color: var(--text); max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Accueil : mes réservations */
.bkbox h2 { font-size: 1.125rem; }
.bkbox .mybk { margin-top: var(--s2); }
.bkbox .mybk a { padding: 10px 0; }
.wk .bk { font-size: .75rem; line-height: 1; padding: 3px 5px; border-radius: 6px; background: var(--brand-soft); color: var(--text); }
.wk .bk.wait { background: var(--warning-bg); color: var(--warning); }
@media (min-width: 1024px) { .wk .bk { margin-left: auto; font-size: .8125rem; padding: 4px 8px; } }

.mybk li { display: block; }
.mybk a { width: 100%; }
.mybk .grow { min-width: 0; }
.mybk .pill { margin-left: auto; }
