:root {
  /* Tokens calés sur maquettes Figma (échantillon pixels) */
  --bg: #09080e;
  --fg: #f5f5f7;
  --surface: #0f0e14;
  --surface-2: #1a1920;
  --border: #24232c;
  --muted: #9a99a3;
  --accent: #ff5530;
  --accent-fg: #ffffff;
  --macro-prot: #ff5530;
  --macro-carb: #ff7a8a;
  --macro-fat: #f0c14a;
  --sidebar: #13121a;
  --sans: "Outfit", system-ui, sans-serif;
  --display: "Space Grotesk", system-ui, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --radius: 16px;
}
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
.main [id] {
  scroll-margin-top: 1.1rem;
  scroll-margin-bottom: 5.5rem;
}
html[data-theme="light"] {
  --bg: #f8f9fb;
  --fg: #121214;
  --surface: #ffffff;
  --surface-2: #f0f1f4;
  --border: #e6e7eb;
  --muted: #6b6b75;
  --accent: #ff5530;
  --accent-fg: #ffffff;
  --sidebar: #ffffff;
}
html[data-theme="dark"] {
  --bg: #09080e;
  --fg: #f5f5f7;
  --surface: #0f0e14;
  --surface-2: #1a1920;
  --border: #24232c;
  --muted: #9a99a3;
  --accent: #ff5530;
  --accent-fg: #ffffff;
  --sidebar: #13121a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  min-height: 100dvh;
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}
a { color: inherit; text-decoration: none; }
h1,h2,h3 { font-family: var(--display); margin: 0 0 .5rem; letter-spacing: -.02em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.05rem; }
p { margin: .35rem 0; }
.muted { color: var(--muted); font-size: .9rem; }
.accent, .accent-text { color: var(--accent); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.eyebrow .nav-icon {
  width: .85rem;
  height: .85rem;
  color: var(--accent);
  flex-shrink: 0;
}

.shell {
  margin: 0 auto;
  display: flex;
  gap: 1.1rem;
  min-height: 100dvh;
  padding: 1rem 1rem 6rem;
  width: 100%;
  max-width: min(92rem, 100%);
  box-sizing: border-box;
  overflow-x: hidden;
}
.sidebar {
  display: none;
  position: sticky;
  top: 1rem;
  width: 15.5rem;
  flex-shrink: 0;
  height: calc(100dvh - 2rem);
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--sidebar);
  border-radius: 1.15rem;
  padding: .85rem;
  box-shadow: none;
}
html[data-theme="light"] .sidebar {
  box-shadow: 0 1px 2px rgba(16, 16, 24, .04);
}
html[data-theme="light"] .card {
  box-shadow: 0 1px 2px rgba(16, 16, 24, .04);
}
.brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  padding: .35rem .35rem .85rem;
}
.app-version {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: .15rem;
  padding: .2rem .45rem;
  border-radius: .45rem;
  background: var(--accent);
  color: var(--accent-fg);
  font: 700 .65rem/1 var(--display);
  letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.brand-logo {
  display: block;
  line-height: 0;
  max-width: 100%;
}
.brand-logo__img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}
/* Blanc sur fond sombre (défaut) */
.brand-logo__img--on-dark { display: block; }
.brand-logo__img--on-light { display: none; }
html[data-theme="light"] .brand-logo__img--on-dark { display: none; }
html[data-theme="light"] .brand-logo__img--on-light { display: block; }

.brand-logo--sidebar { width: 100%; max-width: 9.5rem; }
.brand-logo--mobile {
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(48vw, 9.5rem);
}
.brand-logo--auth { width: min(100%, 12rem); margin-inline: auto; }
.brand-logo--md { width: min(100%, 12rem); }

@media (max-width: 380px) {
  .brand-logo--mobile { max-width: min(46vw, 8.5rem); }
}
@media (min-width: 768px) and (max-width: 960px) {
  .brand-logo--sidebar { max-width: 8.5rem; }
}

.clock { font-size: .75rem; color: var(--muted); margin-top: .5rem; }
.clock strong { display: block; color: var(--fg); font-family: var(--display); font-size: 1rem; }
.clock.compact strong { font-size: .95rem; }
.side-profile {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .35rem .4rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: .65rem;
}
.avatar {
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, var(--surface-2));
  color: var(--accent);
  display: grid; place-items: center;
  font-weight: 700; font-size: .8rem; font-family: var(--display);
  flex-shrink: 0;
  overflow: hidden;
}
.avatar--photo,
.settings-avatar--photo {
  padding: 0;
  background: var(--surface-2);
}
.avatar--photo img,
.settings-avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.side-profile__name { font-weight: 600; font-size: .92rem; }
.side-profile__role { color: var(--muted); font-size: .72rem; }
.side-nav { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .75rem;
  border-radius: .85rem;
  color: var(--muted);
  font-size: .9rem;
  transition: background .15s, color .15s, border-color .15s;
  border: 1px solid transparent;
  background: transparent;
}
.nav-link:hover { background: var(--surface-2); color: var(--fg); }
a.nav-link.active,
.side-nav a.active {
  background: color-mix(in srgb, var(--accent) 10%, transparent) !important;
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}
.nav-icon { flex-shrink: 0; width: 1rem; height: 1rem; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: .15rem; padding-top: .5rem; }
.theme-btn { width: 100%; border: 0; background: transparent; cursor: pointer; font: inherit; text-align: left; }
.side-logout-form { margin-top: .45rem; }
.side-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .75rem;
  padding: .65rem .75rem;
  border-radius: .85rem;
  border: 1px solid #1a1a1a;
  background: #0a0a0a;
  color: #f5f5f7;
  font: 500 .9rem var(--sans);
  text-align: left;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.side-logout .nav-icon { width: 1rem; height: 1rem; flex-shrink: 0; color: inherit; }
.side-logout:hover {
  background: #161616;
  border-color: #2a2a2a;
  color: #fff;
}
html[data-theme="light"] .side-logout {
  background: #0a0a0a;
  border-color: #0a0a0a;
  color: #f5f5f7;
}
html[data-theme="light"] .side-logout:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}
.muted-link { color: var(--muted) !important; }
.main { flex: 1; min-width: 0; padding-bottom: 1rem; }
.mobile-brand {
  display: flex; justify-content: space-between; align-items: center;
  gap: .75rem;
  margin-bottom: .85rem;
}
.mobile-tools { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  width: 2.25rem; height: 2.25rem; border-radius: .75rem;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--fg); display: grid; place-items: center; cursor: pointer;
}
.theme-toggle { margin-top: auto; padding-top: .5rem; }
.theme-btn { width: 100%; border: 0; background: transparent; cursor: pointer; font: inherit; }
.food-table-wrap { overflow-x: auto; }
.food-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.food-table th, .food-table td { text-align: left; padding: .55rem .35rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.food-table th { color: var(--muted); font-weight: 500; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }

.aliments {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.aliments > .card { margin: 0; }
.aliments-search__form {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: flex-end;
}
.aliments-search__field {
  flex: 1 1 12rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin: 0;
}
.aliments-search__field input {
  width: 100%;
}
.aliments-cats {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .9rem;
}
.aliments-cat {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font: 600 .78rem var(--sans);
  text-decoration: none;
}
.aliments-cat .nav-icon {
  width: .8rem;
  height: .8rem;
}
.aliments-cat strong {
  color: var(--fg);
  font-weight: 700;
}
.aliments-cat.is-on {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.aliments-cat.is-on strong { color: var(--accent); }
.aliments-group__head {
  margin-bottom: .75rem;
}
.aliments-group__head h2 {
  margin: 0;
  font-size: 1.05rem;
}
.aliments-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.aliment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .85rem .95rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  flex-wrap: wrap;
}
.aliment-card__main {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 0;
  flex: 1;
}
.aliment-card__name {
  font-size: 1rem;
  letter-spacing: -.01em;
}
.aliment-card__macros {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .25rem;
  font-size: .8rem;
  color: var(--muted);
}
.aliment-card__macros b {
  color: var(--fg);
  font-weight: 700;
}
.aliment-card__serve {
  margin: 0;
}
@media (min-width: 720px) {
  .aliments-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: .85rem 0;
}
.dash .card { margin: 0; }
.card.highlight { border-color: var(--accent); }
.card.center { text-align: center; }
.weight { font-size: 2.2rem; font-weight: 600; letter-spacing: -.03em; }

/* ——— Progression ——— */
.progression {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.progression > .card { margin: 0; }
.progression-hero__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}
.progression-hero__kg {
  font-family: var(--display);
  font-size: clamp(2.2rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
}
.progression-hero__kg span {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
  margin-left: .2rem;
}
.progression-hero__delta {
  margin: .45rem 0 0;
  font-size: .92rem;
  color: var(--muted);
}
.progression-hero__delta.is-ok {
  color: #2f9d6a;
}
.progression-hero__delta strong {
  color: var(--accent);
}
.progression-chart {
  flex: 1 1 12rem;
  max-width: 22rem;
  width: 100%;
}
.progression-weigh__row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .65rem;
}
.progression-weigh__row .onboard-field {
  flex: 0 1 10rem;
}
.progression-measures {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.progression-measure {
  padding: .85rem .95rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.progression-measure strong {
  display: block;
  margin-bottom: .35rem;
}
.progression-measure__bits {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem .85rem;
  font-size: .85rem;
  color: var(--muted);
}
.progression-measure__bits b {
  color: var(--fg);
  font-weight: 700;
}
.progression-photos {
  margin-top: 1rem;
}
.progression-photos figcaption {
  margin-top: .35rem;
}
.progression-badges .badge {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.progression-badge__ico {
  font-size: 1.25rem;
  line-height: 1;
}
.progression-badge__ok {
  margin-top: .25rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
}

.bar, .progress-line {
  height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: .6rem;
}
.bar > i, .progress-line > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff7a45); }

.btn, button.quick, .quick-grid form button, .food-grid button, .habit {
  font: 600 .9rem var(--sans);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: var(--surface-2);
  color: var(--fg);
  padding: .7rem 1rem;
}
.btn.primary, .quick-grid form button { background: var(--accent); color: var(--accent-fg); }
.btn.secondary { background: var(--surface-2); }
.btn.ghost, .linkish { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn.block { width: 100%; justify-content: center; }
.pill {
  display: inline-block; margin-top: .4rem; margin-right: .35rem;
  padding: .3rem .55rem; border-radius: 8px; font-size: .75rem;
  background: rgba(255,90,60,.15); color: var(--accent);
}
.pill.warn { background: rgba(255,180,0,.15); color: #ffb400; }

.quick-grid, .food-grid, .remain, .badges, .photo-grid {
  display: grid; gap: .6rem;
}
.quick-grid { grid-template-columns: repeat(4, 1fr); }
.food-grid { grid-template-columns: repeat(2, 1fr); }
.remain { grid-template-columns: 1fr 1fr; }
.remain .n { font-size: 1.25rem; font-weight: 600; }
.badges { grid-template-columns: repeat(2, 1fr); }
.badge { background: var(--surface-2); border-radius: 12px; padding: .75rem; opacity: .45; }
.badge.on { opacity: 1; border: 1px solid var(--accent); }
.photo-grid { grid-template-columns: repeat(3, 1fr); }
.photo-grid img { width: 100%; border-radius: 10px; aspect-ratio: 1; object-fit: cover; }

.actions-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.actions-row.wrap { flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.stack { display: grid; gap: .65rem; }
.stack label, form label { display: grid; gap: .3rem; font-size: .85rem; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: .65rem .75rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--fg);
  font: inherit;
}
.habits { display: flex; flex-wrap: wrap; gap: .4rem; }
.habit.on { background: rgba(255,90,60,.2); color: var(--accent); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.check-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .75rem;
  text-align: left;
  padding: .75rem .85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  font: 500 .92rem var(--sans);
  cursor: pointer;
}
.check-row:hover { background: var(--surface-2); }
.check-row.on { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.check-box {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: .4rem;
  border: 1.5px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1;
}
.check-row.on .check-box {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}
.meal-item {
  display: flex; justify-content: space-between; gap: .75rem; align-items: center;
  padding: .65rem 0; border-bottom: 1px solid var(--border);
}
.meal-item:last-child { border-bottom: 0; }
.ex-list { list-style: none; padding: 0; margin: .75rem 0 0; }
.ex-list li {
  display: flex; justify-content: space-between; gap: .5rem;
  padding: .45rem 0; border-bottom: 1px solid var(--border); font-size: .92rem;
}
.prog-day { font-size: 1.15rem; margin: 0 0 .15rem; }
.ex-rich-list { list-style: none; padding: 0; margin: .85rem 0 0; }
.ex-rich-list li {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .65rem 0; border-bottom: 1px solid var(--border);
}
.ex-rich-list li:last-child { border-bottom: 0; }
.ex-rich-body { min-width: 0; flex: 1; }
.ex-cue { margin-top: .25rem; font-size: .78rem; color: var(--muted); }
.ex-guide-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .45rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
  font: 600 .75rem var(--sans);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ex-guide-btn .nav-icon { width: .85rem; height: .85rem; }
.ex-guide-btn:hover {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.seance-guide-wrap { margin: .55rem 0 .25rem; display: flex; justify-content: center; }

.ex-guide-dialog {
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  background: var(--surface);
  color: var(--fg);
  padding: 0;
  width: min(94vw, 26rem);
  max-width: calc(100vw - 1.5rem);
  max-height: min(88dvh, 40rem);
  overflow: auto;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.ex-guide-dialog:not([open]) {
  display: none !important;
}
.ex-guide-dialog::backdrop { background: rgba(0, 0, 0, .55); }
/* Empêche le gros JSON inline d’élargir la page sur mobile */
script[type="application/json"] {
  display: none !important;
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: normal !important;
}
.ex-guide-dialog__top {
  display: flex;
  justify-content: flex-end;
  padding: .65rem .65rem 0;
  margin: 0;
}
.ex-guide-dialog__body {
  padding: 0 1.1rem 1rem;
  display: grid;
  gap: .75rem;
}
.ex-guide-dialog__body h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
}
.ex-guide-blurb { margin: 0; font-size: .92rem; line-height: 1.4; }
.ex-guide-grid {
  display: grid;
  gap: .55rem;
}
@media (min-width: 420px) {
  .ex-guide-grid { grid-template-columns: 1fr 1fr; }
}
.ex-guide-card {
  border: 1px solid var(--border);
  border-radius: .9rem;
  background: var(--surface-2);
  padding: .7rem .8rem;
}
.ex-guide-card h3,
.ex-guide-steps-wrap h3 {
  margin: 0 0 .35rem;
  font-family: var(--display);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.ex-guide-card p { margin: 0; font-size: .88rem; line-height: 1.4; }
.ex-guide-steps {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: .35rem;
  font-size: .9rem;
  line-height: 1.4;
}
.ex-guide-tip {
  margin: 0;
  padding: .7rem .8rem;
  border-radius: .9rem;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  font-size: .88rem;
  line-height: 1.4;
  color: var(--fg);
}
.ex-guide-tip::before {
  content: "Le truc · ";
  font-weight: 700;
  color: var(--accent);
  font-family: var(--display);
}
.ex-guide-dialog__foot {
  display: flex;
  justify-content: stretch;
  padding: 0 1.1rem 1.1rem;
  margin: 0;
}
.ex-guide-dialog__foot .chip-btn { width: 100%; justify-content: center; }
.ex-visual {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: .75rem;
  overflow: hidden;
  color: var(--fg);
}
.ex-visual svg { display: block; width: 100%; height: 100%; padding: .2rem; box-sizing: border-box; }
.ex-visual.sm { width: 3.5rem; height: 3.5rem; }
.ex-visual.md { width: 5rem; height: 5rem; }
.ex-visual.lg { width: 10rem; height: 10rem; }
.badminton-note {
  margin-top: .85rem;
  background: var(--surface-2);
  border-radius: .75rem;
  padding: .65rem .85rem;
  font-size: .9rem;
}
.meal-plan-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: .75rem;
}
@media (min-width: 640px) {
  .meal-plan-grid { grid-template-columns: 1fr 1fr; }
}
.muted-list { list-style: none; padding: 0; margin: .35rem 0 0; color: var(--muted); font-size: .9rem; }
.muted-list li { padding: .15rem 0; }
.flash { padding: .75rem 1rem; border-radius: 12px; margin-bottom: .75rem; }
.flash-success { background: #14301f; color: #9dffc2; }
.flash-error { background: #3b1510; color: #ffb4a8; }
html[data-theme="light"] .flash-success { background: #d9f5e4; color: #0d5c32; }
html[data-theme="light"] .flash-error { background: #ffe0da; color: #8a2414; }

/* —— UX pack —— */
.toast-host {
  position: fixed;
  top: 1rem;
  right: 1rem;
  left: auto;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
  width: min(22rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  margin: 0;
  box-sizing: border-box;
}
.toast {
  pointer-events: auto;
  padding: .85rem 1rem;
  border-radius: 12px;
  font-size: .92rem;
  font-weight: 500;
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
  animation: toast-in .35s ease, toast-out .4s ease 2.6s forwards;
}
.toast-success { background: #14301f; color: #9dffc2; border: 1px solid #2a5a3a; }
.toast-error { background: #3b1510; color: #ffb4a8; border: 1px solid #6a2a20; }
html[data-theme="light"] .toast-success { background: #d9f5e4; color: #0d5c32; border-color: #9dd4b0; }
html[data-theme="light"] .toast-error { background: #ffe0da; color: #8a2414; border-color: #f0a090; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(-6px); }
}

.hero-card {
  padding: 1.25rem 1.35rem;
  border-radius: 1.25rem;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  margin-bottom: 1rem;
}
.hero-card .hero-title {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin: .2rem 0 .35rem;
}
.banner-row { display: grid; gap: .5rem; margin-bottom: .85rem; }
.banner {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: .9rem;
  padding: .85rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: var(--fg);
}
.banner.warn { background: color-mix(in srgb, #e8a838 28%, var(--surface)); }
.banner.info { background: color-mix(in srgb, #3a8ee8 22%, var(--surface)); }
.two-col {
  display: grid;
  gap: .75rem;
  grid-template-columns: 1fr;
  margin-bottom: .75rem;
}
@media (min-width: 560px) {
  .two-col { grid-template-columns: 1fr 1fr; }
}
.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 1rem .5rem;
  font-size: .95rem;
}
.btn.xl, button.xl {
  font-size: 1.05rem;
  padding: 1rem 1.25rem;
  min-height: 3.25rem;
}
.btn.block { width: 100%; display: block; }
.suggest-card {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  text-align: center;
}
.focus-card .next-ex {
  display: flex;
  gap: .85rem;
  align-items: center;
  margin-top: .75rem;
}
.remain.compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin-top: .5rem;
}
.remain .n { font-family: var(--display); font-size: 1.25rem; font-weight: 700; }
.pill-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; }
.timeline {
  list-style: none;
  margin: .5rem 0 0;
  padding: 0;
}
.timeline li {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.timeline li:last-child { border-bottom: 0; }
.timeline.rich li {
  justify-content: flex-start;
  align-items: flex-start;
  gap: .75rem;
  position: relative;
  padding-left: .15rem;
}
.tl-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--accent);
  margin-top: .4rem;
  flex-shrink: 0;
}
.kind-weight .tl-dot { background: #5bc0de; }
.kind-log .tl-dot { background: var(--muted); }
.timeline-day h2 { font-size: 1rem; }

/* ——— Historique ——— */
.historique {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.historique > .card { margin: 0; }

.histo-cal__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
}
.histo-cal__title {
  text-align: center;
  min-width: 0;
  flex: 1;
}
.histo-cal__title h2 {
  margin: 0;
  font-size: 1.15rem;
  text-transform: capitalize;
}
.histo-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .35rem;
}
.histo-cal__dow {
  text-align: center;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .25rem 0 .45rem;
}
.histo-cal__cell.is-empty {
  min-height: 2.6rem;
}
.histo-cal__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  min-height: 2.75rem;
  padding: .35rem .2rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--fg);
  text-decoration: none;
  font: inherit;
  transition: border-color .15s, background .15s, color .15s;
}
.histo-cal__day:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}
.histo-cal__num {
  font-weight: 600;
  font-size: .95rem;
  line-height: 1;
}
.histo-cal__dot {
  width: .35rem;
  height: .35rem;
  border-radius: 999px;
  background: var(--accent);
}
.histo-cal__day.is-today {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}
.histo-cal__day.is-on {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}
.histo-cal__day.is-on .histo-cal__dot {
  background: var(--accent-fg);
}
.histo-cal__day.has-events:not(.is-on) {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
}

.historique-day__head {
  margin-bottom: .75rem;
}
.historique-day__head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.historique-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}
.historique-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem .85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  flex-wrap: wrap;
}
.historique-item__ico {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent);
}
.historique-item__ico .nav-icon {
  width: .95rem;
  height: .95rem;
}
.kind-weight .historique-item__ico {
  background: color-mix(in srgb, #5bc0de 18%, var(--surface));
  color: #5bc0de;
}
.kind-measure .historique-item__ico {
  background: color-mix(in srgb, #c9a227 18%, var(--surface));
  color: #c9a227;
}
.kind-water .historique-item__ico {
  background: color-mix(in srgb, #4aa3ff 18%, var(--surface));
  color: #4aa3ff;
}
.kind-food .historique-item__ico {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
}
.kind-courses .historique-item__ico {
  background: color-mix(in srgb, #7c6af2 16%, var(--surface));
  color: #7c6af2;
}
.historique-item__main {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
  flex: 1;
}
.historique-item__main strong {
  font-size: .95rem;
}

.onboard-steps {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
}
.onboard-steps span {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 700;
  font-size: .85rem;
}
.onboard-steps span.on {
  background: var(--accent);
  color: var(--accent-fg);
}

.onboard-progress {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: .15rem 0 .35rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.onboard-progress__step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .35rem;
  min-width: 0;
}
.onboard-progress__dot {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: .8rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.onboard-progress__label {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
.onboard-progress__hint {
  font-size: .68rem;
  color: var(--muted);
  line-height: 1.25;
}
.onboard-progress__line {
  flex: .55;
  height: 2px;
  margin-top: 1.05rem;
  background: var(--border);
  border-radius: 999px;
  align-self: flex-start;
}
.onboard-progress__line.is-done {
  background: color-mix(in srgb, var(--accent) 70%, var(--border));
}
.onboard-progress__step.is-current .onboard-progress__dot {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.onboard-progress__step.is-done .onboard-progress__dot {
  background: color-mix(in srgb, var(--accent) 22%, var(--surface-2));
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.onboard-progress__step.is-current .onboard-progress__label,
.onboard-progress__step.is-done .onboard-progress__label {
  color: var(--fg);
}

@media (max-width: 520px) {
  .onboard-progress {
    padding: .85rem .65rem;
  }
  .onboard-progress__hint { display: none; }
  .onboard-progress__label { font-size: .72rem; }
  .onboard-progress__line { flex: .35; }
}
body.onboarding-mode .sidebar,
body.onboarding-mode .bottom-nav { display: none !important; }
body.onboarding-mode .more-nav { display: none !important; }
body.onboarding-mode .shell {
  max-width: 40rem;
  padding-bottom: 2rem;
}
.onboard { display: flex; flex-direction: column; gap: .85rem; }
.onboard > .card { margin: 0; }
.onboard .btn.xl {
  width: 100%;
  margin-top: .15rem;
  padding: .95rem 1.1rem;
  font-size: 1rem;
}

.onboard-panel-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .25rem;
  margin-bottom: 1.1rem;
}
.onboard-panel-head h2 {
  margin: 0;
}
.onboard-panel-head .muted {
  margin: .15rem 0 0;
  max-width: 36rem;
}

.onboard-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}
.onboard-form > .chip-btn,
.onboard-form > .btn {
  align-self: flex-start;
  width: auto;
}
.courses-create-form .onboard-fields {
  align-items: end;
}
@media (min-width: 560px) {
  .courses-create-form .courses-create-actions {
    display: flex;
    align-items: end;
    gap: .65rem;
  }
  .courses-create-form .courses-create-actions .onboard-field {
    flex: 0 1 12rem;
  }
}

.onboard-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: .85rem 1rem;
  width: 100%;
  align-items: start;
}
@media (min-width: 560px) {
  .onboard-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.onboard-fields--stack {
  grid-template-columns: 1fr;
}

.onboard-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin: 0;
  min-width: 0;
  width: 100%;
  font-size: .85rem;
  color: var(--muted);
}
.onboard-field__lab {
  display: block;
  line-height: 1.3;
  min-height: 1.3em;
}
.onboard-field input,
.onboard-field select {
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 2.75rem;
  margin: 0;
}

.onboard-suggest {
  margin: 0;
  padding: 1rem 1.05rem;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .5rem;
}
.onboard-suggest__head {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.onboard-suggest__head .eyebrow { margin: 0; }
.onboard-suggest__head strong {
  font-size: 1.05rem;
  letter-spacing: -.02em;
  color: var(--fg);
}
.onboard-suggest .muted { margin: 0; }
.onboard-suggest__btn {
  width: 100%;
  margin-top: .25rem;
}

.onboard-back { margin-top: .85rem; }
.onboard-reco { margin: 0 0 1rem; }

.onboard-theme-grid { margin-top: .25rem; }
.onboard-theme {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.onboard-theme:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.onboard-theme.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
}
.onboard button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.field-hint {
  display: block;
  margin-top: .15rem;
  font-size: .72rem;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.35;
}

/* ——— Nutrition ——— */
.nutri {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.nutri > .card { margin: 0; }

.nutri-howto {
  padding: .95rem 1.05rem 1.05rem;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
}
.nutri-howto[hidden] {
  display: none !important;
}
.nutri-howto__head {
  margin-bottom: .65rem;
}
.nutri-howto__head h2 {
  margin: 0;
  font-size: 1.05rem;
}
.nutri-howto__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .35rem;
  font-size: .9rem;
  color: var(--muted);
}
.nutri-howto__list strong { color: var(--accent); }
.nutri-howto__list em {
  font-style: normal;
  font-weight: 600;
  color: var(--fg);
}
.nutri-howto__foot {
  margin: .75rem 0 0;
}
.nutri-jumps.dash-actions {
  margin: 0;
}

.nutri-water {
  background:
    linear-gradient(180deg, color-mix(in srgb, #4aa3ff 14%, var(--surface)), var(--surface));
  border-color: color-mix(in srgb, #4aa3ff 35%, var(--border));
}
.nutri-water--ok {
  border-color: color-mix(in srgb, #3dcf8e 45%, var(--border));
  background:
    linear-gradient(180deg, color-mix(in srgb, #3dcf8e 12%, var(--surface)), var(--surface));
}
.nutri-water__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: .9rem;
}
.nutri-water__head h2 { margin: 0; }
.nutri-water__score {
  text-align: right;
  flex-shrink: 0;
}
.nutri-water__score strong {
  display: block;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
  color: #4aa3ff;
}
.nutri-water--ok .nutri-water__score strong { color: #2f9d6a; }
.nutri-water__score span {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.nutri-water__gauge {
  position: relative;
  height: 1.35rem;
  border-radius: 999px;
  background: color-mix(in srgb, #4aa3ff 12%, var(--surface-2));
  border: 1px solid color-mix(in srgb, #4aa3ff 25%, var(--border));
  overflow: hidden;
}
.nutri-water__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6bb7ff, #3a8fff);
  transition: width .35s ease;
}
.nutri-water--ok .nutri-water__fill {
  background: linear-gradient(90deg, #5ed9a0, #2f9d6a);
}
.nutri-water__pct {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: .72rem;
  font-weight: 700;
  color: var(--fg);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.nutri-water__status {
  margin: .65rem 0 .85rem;
  font-size: .92rem;
  color: var(--muted);
}
.nutri-water__status strong { color: var(--fg); }
.nutri-water__btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.nutri-water__btns form:last-child {
  grid-column: 1 / -1;
}
.nutri-water__btns .btn {
  width: 100%;
  min-height: 2.85rem;
  font-size: 1rem;
}
@media (min-width: 560px) {
  .nutri-water__btns {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .nutri-water__btns form:last-child {
    grid-column: auto;
  }
}

.nutri-bilan__row {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  flex-wrap: wrap;
}
.nutri-bilan .ring { margin: 0; }

.nutri-bars {
  display: grid;
  gap: .7rem;
  margin-top: 1.1rem;
}
.nutri-bar__lab {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: .3rem;
}
.nutri-bar__lab strong { color: var(--fg); font-weight: 600; }
.nutri-bar .progress-line { margin-bottom: 0; height: 6px; border-radius: 999px; }
.nutri-bar--carb .progress-line i { background: #5bc0de; }
.nutri-bar--fat .progress-line i { background: #c9a227; }

.nutri-section-lab {
  margin: 0 0 .55rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  font-weight: 600;
}

.nutri-add-block {
  padding: 1.1rem 0 0;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
}
.nutri-add-block:first-of-type {
  margin-top: .35rem;
  padding-top: .85rem;
}
.nutri-add-block__head {
  margin-bottom: .75rem;
}
.nutri-add-block__head h3 {
  margin: 0 0 .2rem;
  font-family: "Space Grotesk", Outfit, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.nutri-add-block__head .muted {
  margin: 0;
}
.nutri-add-block__foot {
  margin-top: .85rem;
}

.nutri-fav-edit__name {
  display: grid;
  gap: .65rem;
}
@media (min-width: 560px) {
  .nutri-fav-edit__name {
    grid-template-columns: 1fr 10rem auto;
    align-items: end;
  }
}
.nutri-fav-edit__meta {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.nutri-tap-grid button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .2rem;
  text-align: left;
  padding: .85rem .9rem;
  width: 100%;
}
.nutri-tap-grid button strong { font-size: .92rem; }

.nutri-fav-grid {
  display: grid;
  gap: .65rem;
}
.nutri-fav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .85rem .95rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  flex-wrap: wrap;
}
.nutri-fav__main {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
  flex: 1;
}
.nutri-fav__actions {
  display: flex;
  gap: .4rem;
  align-items: center;
  flex-wrap: wrap;
}

.nutri-meal-block {
  padding: .85rem 0;
  border-top: 1px solid var(--border);
}
.nutri-meal-block:first-of-type { border-top: 0; padding-top: 0; }
.nutri-meal-block__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: .55rem;
}
.nutri-meal-block__head strong {
  display: block;
  font-size: 1rem;
}
.nutri-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}
.nutri-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .8rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}
.nutri-item__info {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
  flex: 1;
}
.nutri-item__actions {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}
.nutri-qty {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.nutri-qty input {
  width: 4.25rem;
  height: 2.35rem;
  padding: .35rem .45rem;
}
.btn.nutri-remove {
  background: color-mix(in srgb, #e25555 14%, var(--surface-2));
  color: #c23b3b;
  border: 1px solid color-mix(in srgb, #e25555 30%, var(--border));
  font-weight: 600;
}
.btn.nutri-remove:hover {
  background: color-mix(in srgb, #e25555 22%, var(--surface-2));
}
html[data-theme="dark"] .btn.nutri-remove,
body[data-theme="dark"] .btn.nutri-remove {
  color: #ff9b9b;
}

@media (min-width: 720px) {
  .nutri-fav-grid { grid-template-columns: 1fr 1fr; }
  .food-grid.nutri-tap-grid { grid-template-columns: repeat(3, 1fr); }
}

.seance-form .btn.xl { margin-top: 1rem; }
.progress-line {
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: .75rem;
}
.progress-line i {
  display: block;
  height: 100%;
  background: var(--accent);
}
.linkish {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.card.highlight {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}

.bottom-nav {
  display: grid;
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  transform: translateX(-50%);
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  backdrop-filter: blur(8px);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: .35rem .25rem calc(.35rem + var(--safe-bottom));
  text-align: center; font-size: .62rem; color: var(--muted); z-index: 40;
  width: 100%;
  max-width: 32rem;
  margin: 0;
  box-sizing: border-box;
}
.bottom-nav a,
.bottom-nav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
  padding: .35rem .15rem; color: var(--muted);
  background: transparent; border: 0; font: inherit; cursor: pointer;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav a .nav-icon,
.bottom-nav button .nav-icon { width: 1.25rem; height: 1.25rem; }
.bottom-nav .on,
.bottom-nav__more.on { color: var(--accent); }
.bottom-nav span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Menu « Plus » (mobile) */
.more-nav {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.more-nav:not([hidden]) { pointer-events: auto; }
.more-nav[hidden] { display: none !important; }
.more-nav__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, .55);
  cursor: pointer;
}
.more-nav__panel {
  position: relative;
  width: min(100%, 32rem);
  max-height: min(82dvh, 40rem);
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 1.15rem 1.15rem 0 0;
  background: var(--surface);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .35);
  display: flex;
  flex-direction: column;
  animation: more-nav-up .22s ease-out;
}
@keyframes more-nav-up {
  from { transform: translateY(18px); opacity: .6; }
  to { transform: translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .more-nav__panel { animation: none; }
}
.more-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-shrink: 0;
  padding: .85rem .9rem .55rem;
}
.more-nav__head strong {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -.02em;
}
.more-nav__close { flex-shrink: 0; }
.more-nav__list {
  display: grid;
  gap: .3rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0 .9rem .35rem;
  -webkit-overflow-scrolling: touch;
}
.more-nav__link {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .7rem .8rem;
  border-radius: .85rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg);
  font: 500 .95rem var(--sans);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.more-nav__link:hover { background: var(--surface-2); }
.more-nav__link.on {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  border-color: var(--accent);
}
.more-nav__link .nav-icon { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
.more-nav__foot {
  display: grid;
  gap: .45rem;
  flex-shrink: 0;
  padding: .65rem .9rem calc(.85rem + var(--safe-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.more-nav__theme { color: var(--muted); }
body.more-nav-open { overflow: hidden; }
body.more-nav-open .bottom-nav { visibility: hidden; pointer-events: none; }

.ring {
  --p: 0;
  width: 120px; height: 120px; margin: .5rem auto;
  border-radius: 50%;
  background:
    conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .1rem;
  position: relative;
  line-height: 1;
}
.ring::before {
  content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface);
}
.ring strong, .ring span {
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
  margin: 0;
  padding: 0;
  line-height: 1.05;
}
.ring strong { font-size: 1.3rem; font-family: var(--display); font-weight: 700; }
.ring span { font-size: .7rem; color: var(--muted); }
.ring-sm { width: 76px; height: 76px; margin: 0; flex-shrink: 0; }
.ring-sm::before { inset: 8px; }
.ring-sm strong { font-size: 1.05rem; }
.ring-sm span { font-size: .62rem; }

.seance-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .9rem; color: var(--muted); margin-bottom: .5rem;
}
.seance-center { text-align: center; padding: 1.5rem 0; }
.thumb {
  width: 110px; height: 110px; margin: .75rem auto; border-radius: 20px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 2.5rem; font-family: var(--display);
}
.stepper { display: flex; align-items: center; justify-content: center; gap: .75rem; }
.stepper button {
  width: 56px; height: 56px; border-radius: 12px; font-size: 1.4rem;
  background: var(--surface-2); border: 0; color: var(--fg);
}
.stepper input { width: 6rem; text-align: center; font-size: 1.8rem; font-weight: 700; font-family: var(--display); }
.rest-banner {
  background: var(--accent); color: var(--accent-fg);
  text-align: center; padding: .85rem; font-size: 1.4rem; font-weight: 700;
  font-family: var(--display); display: flex; gap: 1rem; justify-content: center; align-items: center;
  margin: .5rem -1.25rem 0;
}
.rest-banner.hidden { display: none; }
.rest-banner button { background: transparent; border: 1px solid var(--accent-fg); border-radius: 8px; padding: .3rem .6rem; }

dialog {
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--fg);
  padding: 1rem; width: min(92vw, 360px);
}
dialog::backdrop { background: rgba(0,0,0,.55); }

/* —— Dashboard Aujourd'hui (Figma) —— */
.dash { display: flex; flex-direction: column; gap: 1rem; }
.dash-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; flex-wrap: wrap;
}
.dash-date { color: var(--muted); font-size: .88rem; margin-bottom: .15rem; }
.dash-hello {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -.03em;
  margin: 0;
}
.dash-badges { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.chip, .chip-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--accent) 55%, var(--border));
  background: transparent;
  color: var(--fg);
  font: 600 .85rem var(--sans);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.chip-accent {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.dash-actions,
.page-actions,
.prog-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.prog-head__actions,
.page-actions {
  justify-content: flex-end;
}
.chip-btn { color: var(--accent); border-color: var(--accent); }
.chip-btn:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.chip-btn .nav-icon {
  width: .95rem;
  height: .95rem;
  flex-shrink: 0;
}
.chip-btn--solid {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
}
.chip-btn--solid:hover {
  background: color-mix(in srgb, var(--accent) 86%, #000);
  color: var(--accent-fg);
}
.chip-btn--danger {
  color: color-mix(in srgb, #c0392b 85%, var(--fg));
  border-color: color-mix(in srgb, #c0392b 35%, var(--border));
}
.chip-btn--danger:hover {
  background: color-mix(in srgb, #c0392b 12%, var(--surface));
}
.chip-btn[aria-expanded="true"] {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.chip-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}
form.chip-inline {
  display: inline;
  margin: 0;
}
.prog-ex-edit { margin-top: .45rem; }
.prog-ex-edit label { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: .3rem; }
.prog-edit-head { margin-bottom: .75rem; }
.add-ex-form {
  margin-top: 1rem;
  padding-top: .85rem;
  border-top: 1px solid var(--border);
  min-width: 0;
  max-width: 100%;
}
.add-ex-pick {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: 100%;
}
.builder-card h2 { margin-bottom: .25rem; }

/* ——— Programme ——— */
.prog {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}
.prog > .card { margin: 0; max-width: 100%; }
.prog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0;
  min-width: 0;
}
.prog-head__main { min-width: 0; flex: 1 1 12rem; }
.prog-head h1 { margin: 0 0 .25rem; }
.prog-head__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .65rem;
}
.prog-head__actions {
  max-width: 100%;
}
.prog-head__actions .chip-btn {
  max-width: 100%;
}
.prog-today__body {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  min-width: 0;
}
.prog-today__body > div { min-width: 0; flex: 1 1 12rem; }
.prog-today__title {
  margin: 0 0 .2rem;
  font-size: 1.45rem;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.prog-today__meta {
  margin: .45rem 0 0;
  font-size: .88rem;
  color: var(--muted);
}
.prog-today__sport {
  margin: .35rem 0 0;
  font-size: .88rem;
  color: var(--accent);
  font-weight: 500;
}
.prog-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .35rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.prog-strip__day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  padding: .55rem .2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  text-align: center;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: border-color .15s ease, background .15s ease;
}
.prog-strip__day:hover { border-color: var(--accent); }
.prog-strip__day.is-today {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
.prog-strip__day.is-rest { opacity: .72; }
.prog-strip__dow {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.prog-strip__name {
  font-size: .68rem;
  font-weight: 600;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prog-strip__dot {
  width: .35rem;
  height: .35rem;
  border-radius: 999px;
  background: var(--accent);
}
.prog-days {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.prog-day-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .15rem;
}
.prog-day-card__aside {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.prog-day-card--rest {
  background: color-mix(in srgb, var(--surface-2) 55%, var(--surface));
}
.prog-rest-copy { margin: .5rem 0 0; }
.prog-edit-inline { margin-top: .35rem; }
.prog-builder-form { margin-top: .15rem; }
.prog-builder-danger {
  margin-top: 1rem;
  padding-top: .85rem;
  border-top: 1px solid var(--border);
}
.prog-path-grid {
  display: grid;
  gap: .65rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .prog-path-grid { grid-template-columns: repeat(3, 1fr); }
}
.prog-path {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .85rem .9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}
.prog-path:hover,
.prog-path.is-active {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.prog-path__letter {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: .25rem;
}
.prog-path strong { font-size: .95rem; }
.prog-quiz__grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .prog-quiz__grid { grid-template-columns: repeat(3, 1fr); }
}
.prog-quiz__result {
  margin-top: .9rem;
  padding: .7rem .85rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.theme-grid {
  display: grid;
  gap: .85rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
}
.theme-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.theme-card--reco {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent);
}
.theme-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.theme-card__letter {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.theme-card__pill {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .25rem .55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}
.theme-card__pill.muted-pill {
  background: var(--surface);
  color: var(--muted);
}
.theme-card h3 {
  margin: .15rem 0 0;
  font-size: 1.05rem;
}
.theme-card__tag {
  margin: 0;
  font-weight: 500;
  font-size: .9rem;
}
.theme-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .35rem 0 .55rem;
  font-size: .75rem;
  color: var(--muted);
}
.theme-card__meta span {
  padding: .2rem .5rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.theme-card form { margin-top: auto; }
.theme-card .btn { width: 100%; }
.meal-plan-block {
  padding: .75rem .85rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.meal-plan-block .muted-list li::before {
  content: "· ";
  color: var(--accent);
}
.prog-meal-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  font-size: .9rem;
  color: var(--muted);
}
.tiny { font-size: .8rem; }

@media (max-width: 520px) {
  .prog-strip {
    gap: .25rem;
  }
  .prog-strip__day {
    padding: .45rem .1rem;
  }
  .prog-strip__name {
    font-size: .6rem;
  }
  .prog-today__body {
    align-items: stretch;
  }
  .prog-today__body > .chip-btn {
    width: 100%;
    justify-content: center;
  }
  .prog-head__actions {
    width: 100%;
    justify-content: flex-start;
  }
  .add-ex-form .actions-row {
    flex-direction: column;
    align-items: stretch;
  }
  .add-ex-form label {
    width: 100%;
    min-width: 0 !important;
  }
  .add-ex-form select,
  .add-ex-form input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .prog-ex-edit .actions-row {
    gap: .4rem;
  }
  .prog-ex-edit input {
    max-width: 100%;
    box-sizing: border-box;
  }
}

.dash-kpis {
  display: grid;
  gap: .85rem;
  grid-template-columns: 1fr;
}
.kpi-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: .45rem;
}
.kpi-label .nav-icon {
  width: .95rem;
  height: .95rem;
  color: var(--accent);
  stroke: currentColor;
}
.kpi-value {
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.kpi-value .unit { font-size: 1rem; color: var(--muted); font-weight: 500; }
.kpi-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.kpi-delta { margin-top: .35rem; font-size: .82rem; font-weight: 600; }
.kpi-delta.down { color: var(--accent); }
.kpi-delta.up { color: #e05a5a; }
.spark { width: 120px; height: 48px; flex-shrink: 0; }
.water-adds {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.1rem;
  margin-top: .55rem;
}
.day-checks {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .35rem 0 .75rem;
}
.check-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .85rem;
  cursor: pointer;
}
.check-pill:has(input:checked) {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.check-pill input { accent-color: var(--accent); }
.check-row-inline {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .9rem;
  margin: .5rem 0 1rem;
}
.check-row-inline input { margin-top: .2rem; accent-color: var(--accent); }

/* ——— Paramètres ——— */
.settings { width: 100%; max-width: none; }
.settings-head { margin-bottom: .35rem; }
.settings-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.settings-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.settings-logout-mobile {
  display: block;
  margin: .5rem 0 1.25rem;
}
.settings-logout-mobile .side-logout {
  max-width: 100%;
}
@media (min-width: 768px) {
  .settings-logout-mobile { display: none; }
}
.settings-account__main {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-width: 0;
}
.settings-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 1rem var(--display);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-2));
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}
.settings-avatar--lg {
  width: 4.5rem;
  height: 4.5rem;
  font-size: 1.25rem;
  border-radius: 50%;
}
.settings-avatar-row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.settings-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  min-width: min(100%, 16rem);
}
.settings-avatar-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}
.settings-account__name {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -.02em;
}
.settings-form { display: grid; gap: .85rem; }
.settings-form > .card { margin: 0; }
.settings-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.settings-panel__head h2 { margin: 0; }
.settings-panel__head .eyebrow { margin: 0 0 .2rem; }
.settings-password-form { margin-top: 1rem; }
.settings-password-form .chip-btn { align-self: flex-start; }
.settings-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .settings-grid,
  .settings-grid--2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .settings-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .settings-grid--2 { grid-template-columns: 1fr 1fr; }
  .settings-macros { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.settings-macros {
  display: grid;
  gap: .65rem;
  margin-top: 1rem;
}
.settings-macro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .85rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}
.settings-macro__label {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .88rem;
  font-weight: 600;
}
.settings-range {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.settings-range input {
  width: 4.6rem;
  text-align: center;
}
.settings-time__inputs input[type="time"] {
  width: auto;
  min-width: 7.5rem;
  max-width: 10rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding: .45rem .55rem;
  box-sizing: border-box;
}
.settings-range__sep {
  color: var(--muted);
  font-size: .85rem;
}
.settings-range .unit {
  color: var(--muted);
  font-size: .8rem;
  min-width: 1rem;
}
.settings-theme {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .3rem;
}
.settings-theme legend {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: .15rem;
}
.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;
}
.seg--theme {
  max-width: 22rem;
}
.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .35rem;
  padding: .3rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.seg__item {
  display: grid;
  margin: 0;
  cursor: pointer;
}
.seg__item input { position: absolute; opacity: 0; pointer-events: none; }
.seg__item span {
  display: grid;
  place-items: center;
  padding: .55rem .4rem;
  border-radius: 9px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.seg__item:has(input:checked) span {
  background: var(--surface);
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.day-checks--lg { margin: 0 0 1rem; }
.day-chip {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 2.7rem;
  padding: .55rem .65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.day-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.day-chip:has(input:checked) {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.settings-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .65rem .8rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.settings-time__label {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 500;
}
.settings-time__inputs {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.sport-list {
  display: grid;
  gap: .75rem;
}
@media (min-width: 960px) {
  .sport-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.sport-card {
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}
.sport-card--new {
  border-style: dashed;
  background: transparent;
}
.sport-card__top {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .75rem;
}
.sport-card__badge {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: .8rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font: 500 1.15rem/1 var(--display);
  background: color-mix(in srgb, var(--accent) 16%, var(--surface-2));
  color: var(--accent);
}
.sport-card--new .sport-card__badge {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 500;
}
.sport-card__name {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.sport-card__name .eyebrow { margin: 0 0 .2rem; }
.sport-card__fields {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: .55rem;
}
.sport-card__custom { margin: 0; }
.sport-card__custom[hidden] { display: none !important; }
.sport-card__hint { margin: .65rem 0 0; }
.settings-toggle {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  margin: 0;
  cursor: pointer;
}
.settings-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.settings-toggle__ui {
  width: 2.6rem;
  height: 1.45rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
  margin-top: .15rem;
  transition: background .15s, border-color .15s;
}
.settings-toggle__ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--fg);
  opacity: .45;
  transition: transform .15s, opacity .15s, background .15s;
}
.settings-toggle:has(input:checked) .settings-toggle__ui {
  background: color-mix(in srgb, var(--accent) 30%, var(--surface-2));
  border-color: var(--accent);
}
.settings-toggle:has(input:checked) .settings-toggle__ui::after {
  transform: translateX(1.1rem);
  background: var(--accent);
  opacity: 1;
}
.settings-toggle__text {
  display: grid;
  gap: .15rem;
  font-size: .9rem;
}
.settings-toggle__text strong { font-size: .95rem; }
.settings-save {
  position: sticky;
  bottom: calc(4.5rem + var(--safe-bottom));
  z-index: 5;
  padding: .65rem 0 .35rem;
  background: linear-gradient(180deg, transparent, var(--bg) 35%);
}
.settings-save .chip-btn,
.settings-save .btn {
  width: auto;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 28%, transparent);
}
.settings-details {
  margin: .85rem 0 0;
}
.settings-details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.settings-details summary::-webkit-details-marker { display: none; }
.settings-details summary > span {
  display: grid;
  gap: .15rem;
}
.settings-details summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
}
.settings-details[open] summary::after { content: "–"; }
.settings-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.settings-chip {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--fg);
  border-radius: 999px;
  padding: .45rem .75rem;
  font: 500 .82rem var(--sans);
  cursor: pointer;
}
.settings-chip em {
  font-style: normal;
  color: var(--muted);
  margin-left: .25rem;
}
.settings-chip.on {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.grocery-add {
  display: grid;
  gap: .65rem;
  grid-template-columns: 1fr;
  margin-bottom: 1rem;
  align-items: end;
}
@media (min-width: 720px) {
  .grocery-add {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  }
}
.grocery-list { align-items: center; }
.grocery-item {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
}
.grocery-item form { margin: 0; }
.grocery-del {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: .75rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.grocery-del:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ——— Courses ——— */
.courses {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.courses > .card { margin: 0; }
.courses-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 720px) {
  .courses-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .courses-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.courses-card {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin: 0;
  padding: .95rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.courses-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.courses-card__link:hover .courses-card__top strong {
  color: var(--accent);
}
.courses-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: .35rem;
}
.courses-card__top strong {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -.02em;
}
.courses-card__del { margin: 0; align-self: flex-start; }
.courses-staples-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  flex-wrap: wrap;
}
.courses-staples-head h2 { margin: 0; }
.courses-progress { margin: 0; height: 10px; }
.courses-section { margin: 0; }
.courses-check {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .35rem;
}
.courses-check li {
  display: flex;
  align-items: center;
  gap: .35rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: .15rem .35rem .15rem .15rem;
}
.courses-check li.done { opacity: .55; }
.courses-check__main { flex: 1; min-width: 0; margin: 0; }
.courses-check__btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .75rem;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  padding: .55rem .6rem;
  cursor: pointer;
  border-radius: 10px;
}
.courses-check__box {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: .4rem;
  border: 1.5px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  position: relative;
}
.courses-check li.done .courses-check__box {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 25%, var(--surface));
}
.courses-check li.done .courses-check__box::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.courses-check__label {
  display: grid;
  gap: .1rem;
  min-width: 0;
}
.courses-check__label strong {
  font-weight: 600;
  font-size: .95rem;
}
.courses-check li.done .courses-check__label strong {
  text-decoration: line-through;
}
.courses-check__label em {
  font-style: normal;
  color: var(--muted);
  font-size: .8rem;
}
.grocery-add__staple {
  margin: .35rem 0 .65rem;
  display: flex;
}
.chip-btn.nutri-remove {
  color: #c23b3b;
  border-color: color-mix(in srgb, #e25555 40%, var(--border));
  background: color-mix(in srgb, #e25555 10%, transparent);
}
.chip-btn.nutri-remove:hover {
  background: color-mix(in srgb, #e25555 18%, transparent);
  color: #c23b3b;
}
.grocery-ac { position: relative; }
.grocery-ac__list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + .25rem);
  margin: 0;
  padding: .3rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  max-height: 14rem;
  overflow: auto;
}
.grocery-ac__item {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: baseline;
  padding: .55rem .65rem;
  border-radius: 9px;
  cursor: pointer;
  font-size: .9rem;
}
.grocery-ac__item:hover,
.grocery-ac__item.on {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
}
.grocery-ac__meta {
  color: var(--muted);
  font-size: .75rem;
  white-space: nowrap;
}

.settings-reminders {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.settings-reminders li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .65rem 0;
  border-top: 1px solid var(--border);
}
.settings-reminders li:first-child { border-top: 0; padding-top: 0; }
.settings-data {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
}
.settings-import {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  flex: 1;
}
.file-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  padding: .65rem .9rem;
  border-radius: 999px;
  border: 1px dashed var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: .82rem;
  cursor: pointer;
  margin: 0;
}
.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-btn span { pointer-events: none; }

/* legacy day pills still used elsewhere */
.sport-block {
  padding: .85rem 0;
  border-top: 1px solid var(--border);
}
.sport-block:first-of-type { border-top: 0; padding-top: 0; }
.sport-block + .sport-block { margin-top: .25rem; }
.link-accent {
  background: none; border: 0; padding: 0;
  color: var(--accent); font: 600 .85rem var(--sans); cursor: pointer;
}
.dash-tagline {
  margin: .35rem 0 0;
  color: var(--muted);
  font-size: .95rem;
  max-width: 28rem;
}
.boule-meter {
  margin: 0 0 .85rem;
  padding: 1.05rem 1.15rem 1.15rem;
}
.boule-meter__intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}
.boule-meter__msg {
  margin: .3rem 0 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -.02em;
  line-height: 1.3;
  max-width: 22rem;
}
.boule-meter__scorechip {
  flex-shrink: 0;
  min-width: 4.25rem;
  padding: .55rem .7rem .5rem;
  border-radius: 14px;
  text-align: center;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
}
.boule-meter__scorechip-val {
  display: block;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--accent);
  line-height: 1;
}
.boule-meter__scorechip-lab {
  display: block;
  margin-top: .25rem;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  font-weight: 600;
}
.boule-meter__daybar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin-bottom: .95rem;
}
.boule-meter__daybar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff3d1a, var(--accent), #ff9a6b);
  transition: width .4s ease;
}
.boule-meter__tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
}
.boule-meter__tile {
  display: grid;
  gap: .25rem;
  padding: .7rem .65rem .65rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: inherit;
  text-decoration: none;
  min-height: 4.6rem;
  transition: border-color .15s, transform .15s, background .15s;
}
.boule-meter__tile:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  transform: translateY(-1px);
}
.boule-meter__tile-ico {
  color: var(--muted);
  line-height: 0;
}
.boule-meter__tile-ico .nav-icon {
  width: 1rem;
  height: 1rem;
}
.boule-meter__tile-lab {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 500;
}
.boule-meter__tile-val {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -.02em;
}
.boule-meter__tile-ok {
  font-size: .65rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .04em;
}
.boule-meter__tile--done {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}
.boule-meter__tile--done .boule-meter__tile-ico { color: var(--accent); }
.boule-meter__tile--mid .boule-meter__tile-val { color: var(--fg); }
.boule-meter__tile--low .boule-meter__tile-val { color: var(--muted); }
@media (max-width: 640px) {
  .boule-meter__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.seance-cheer {
  margin-top: .55rem;
  font-family: var(--display);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -.01em;
}
.seance-boom .boom-title {
  font-size: clamp(2.4rem, 10vw, 3.4rem);
  margin: .2rem 0;
  letter-spacing: -.04em;
  color: var(--accent);
}
.seance-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin: 1.25rem 0 1.5rem;
  width: min(100%, 22rem);
}
.seance-stats div {
  padding: .75rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  gap: .15rem;
}
.seance-stats strong {
  font-family: var(--display);
  font-size: 1.25rem;
}
@keyframes boule-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.pulse-ok {
  animation: boule-pulse 1.1s ease-in-out 2;
}
.badge.on.pulse-badge {
  animation: boule-pulse .9s ease-in-out 1;
}
.btn-boom {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
}
.toast {
  animation: toast-in .25s ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}


.dash-mid {
  display: grid;
  gap: .85rem;
  grid-template-columns: 1fr;
}
.dash-col-main, .dash-col-side { display: flex; flex-direction: column; gap: .85rem; }
.session-card__head { align-items: flex-start; margin-bottom: .75rem; gap: .75rem; }
.session-title {
  font-size: 1.15rem;
  margin: .15rem 0 0;
  letter-spacing: -.02em;
}
.session-list { list-style: none; margin: 0; padding: 0; }
.session-list li {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem 0;
  border-top: 1px solid var(--border);
}
.session-list li:first-child { border-top: 0; padding-top: 0; }
.session-ico {
  width: 2.5rem; height: 2.5rem; border-radius: .75rem;
  background: var(--surface-2); display: grid; place-items: center; flex-shrink: 0;
}

.macro-bar {
  display: flex; height: 14px; border-radius: 999px; overflow: hidden;
  background: var(--surface-2); margin: .55rem 0 .75rem;
}
.macro-bar i { display: block; height: 100%; }
.macro-bar .m-prot { background: var(--macro-prot); }
.macro-bar .m-carb { background: var(--macro-carb); }
.macro-bar .m-fat { background: var(--macro-fat); }
.macro-legend {
  display: flex; flex-wrap: wrap; gap: .75rem 1.1rem;
  font-size: .85rem; color: var(--muted);
}
.macro-legend .dot {
  display: inline-block; width: .55rem; height: .55rem; border-radius: 50%;
  margin-right: .35rem; vertical-align: middle;
}
.dot.prot { background: var(--macro-prot); }
.dot.carb { background: var(--macro-carb); }
.dot.fat { background: var(--macro-fat); }

.toggle-list { list-style: none; margin: 0; padding: 0; }
.toggle-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: .75rem; width: 100%; padding: .55rem 0;
  border-bottom: 1px solid var(--border);
  background: none; border-left: 0; border-right: 0; border-top: 0;
  color: inherit; font: inherit; text-align: left;
}
.toggle-list li:last-child .toggle-row { border-bottom: 0; }
.switch {
  width: 2.6rem; height: 1.45rem; border-radius: 999px;
  border: 0; background: var(--surface-2); position: relative; cursor: pointer;
  flex-shrink: 0; padding: 0;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: #fff; transition: transform .18s ease;
}
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(1.15rem); }

.week-dots {
  display: flex; justify-content: space-between; gap: .35rem;
  margin-top: .65rem;
}
.week-dot {
  width: 2.15rem; height: 2.15rem; border-radius: 50%;
  border: 1.5px solid var(--border);
  display: grid; place-items: center;
  font-size: .72rem; font-weight: 600; color: var(--muted);
}
.week-dot.done {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.week-dot.today:not(.done) {
  border-color: var(--accent); color: var(--accent);
}
.note-card textarea { min-height: 5rem; }

@media (min-width: 768px) {
  .sidebar { display: flex; }
  .bottom-nav { display: none; }
  .mobile-brand { display: none; }
  .more-nav { display: none !important; }
  .shell { padding-bottom: 2rem; }
  .dash-kpis { grid-template-columns: repeat(3, 1fr); }
  .dash-mid { grid-template-columns: 1.55fr 1fr; }
}
@media (max-width: 767px) {
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .shell { padding-top: .75rem; padding-bottom: calc(5.5rem + var(--safe-bottom)); overflow-x: clip; }
  .session-card__head { flex-direction: column; }
  .session-card__head .btn { width: 100%; text-align: center; }
  .kpi-value { font-size: 1.55rem; }
  .main { min-width: 0; max-width: 100%; overflow-x: clip; }
  .card, .stack, form { max-width: 100%; }
  input, select, textarea, button, .btn, .chip-btn {
    max-width: 100%;
  }
  .chip-btn {
    white-space: normal;
    text-align: center;
  }
  .mobile-brand {
    position: sticky;
    top: 0;
    z-index: 15;
    padding: .15rem 0 .55rem;
    margin-bottom: .55rem;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(8px);
  }
}
@media (min-width: 1100px) {
  .shell { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* ——— Aide / Communauté ——— */
.help-page,
.communaute-page { display: grid; gap: .85rem; }
.help-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: .55rem;
  line-height: 1.45;
}
.help-bullets {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: .45rem;
  color: var(--muted);
  line-height: 1.45;
}
.help-bullets strong { color: var(--fg); }
.help-bullets a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.help-contact-form textarea { min-height: 7rem; resize: vertical; }
.help-contact-form .chip-btn {
  justify-self: start;
  width: auto;
  margin-top: .25rem;
}
.communaute-hero h2 { margin: .15rem 0 .35rem; }
.communaute-socials { margin-top: 1rem; display: grid; gap: .45rem; }

.comm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 0;
}
.comm-tab {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--card) 88%, transparent);
}
.comm-tab.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.comm-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 .3rem;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-size: .7rem;
  line-height: 1;
}
.comm-tab.is-active .comm-badge {
  background: rgba(255,255,255,.2);
  color: #fff;
}

.comm-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem;
  align-items: center;
}
.comm-search input { margin: 0; }

.comm-people,
.comm-groups,
.comm-feed {
  list-style: none;
  margin: .75rem 0 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.comm-person {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  padding: .55rem .65rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 55%, var(--card));
}
.comm-person__main {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.comm-person__main span {
  display: grid;
  gap: .1rem;
  min-width: 0;
}
.comm-person__main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comm-person__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}
.comm-person__actions form { margin: 0; }

.avatar--sm {
  width: 2.25rem;
  height: 2.25rem;
  font-size: .75rem;
  flex-shrink: 0;
}
.avatar--lg {
  width: 4.5rem;
  height: 4.5rem;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.comm-group-card {
  display: grid;
  gap: .35rem;
  padding: .75rem .85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: color-mix(in srgb, var(--bg) 55%, var(--card));
}
.comm-group-card:hover { border-color: var(--accent); }
.comm-group-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.comm-group-card--row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
}
.comm-group-card__link {
  display: grid;
  gap: .25rem;
  min-width: 0;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.comm-vis {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .4rem;
}
.comm-vis legend {
  font-weight: 600;
  margin-bottom: .25rem;
}
.comm-vis__opt {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .92rem;
  color: var(--muted);
}

.comm-post-form textarea { min-height: 4.5rem; resize: vertical; }
.comm-post-form .chip-btn { justify-self: start; width: auto; }

.comm-feed__item {
  padding: .75rem .85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 55%, var(--card));
}
.comm-feed__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .45rem;
}
.comm-feed__body {
  margin: 0;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.comm-profile__hero {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.comm-profile__hero h2 { margin: 0 0 .15rem; }

@media (max-width: 520px) {
  .comm-search { grid-template-columns: 1fr; }
  .comm-search .chip-btn { width: 100%; justify-content: center; }
}
