/* ============================================================
   REEWIRE - Feuille de style principale
   Identite : fond sombre, accent or, Bebas Neue + DM Sans
   ============================================================ */

:root {
  --bg:          #0a0a0a;
  --bg-card:     #111111;
  --bg-elevated: #161616;
  --accent:      #C9A96E;
  --accent-soft: #d4b87a;
  --accent-dim:  rgba(201, 169, 110, 0.12);
  --accent-glow: rgba(201, 169, 110, 0.35);
  --text:        #FFFFFF;
  --text-sec:    #8A8A8A;
  --text-muted:  #555555;
  --border:      #1E1E1E;
  --success:     #4ADE80;
  --warning:     #FBBF24;
  --danger:      #F87171;
  --blue:        #60A5FA;

  --radius:    16px;
  --radius-sm: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg);
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

::selection { background: var(--accent-dim); color: var(--text); }

h1, h2, h3, h4 {
  font-family: 'Bebas Neue', Impact, sans-serif;
  letter-spacing: 0.05em;
  line-height: 1.1;
  font-weight: 400;
}

a { color: var(--accent); text-decoration: none; transition: color 0.25s; }
a:hover { color: var(--accent-soft); }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container--narrow { max-width: 460px; }

main { flex: 1; padding: 2.5rem 0 4rem; }

/* ─────────────── Navigation ─────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav__brand {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
}
.nav__links a {
  color: var(--text-sec);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.nav__links a:hover,
.nav__links a.is-active { color: var(--accent); }

/* ─────────────── Titres de section ─────────────── */
.eyebrow {
  font-size: 0.78rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-weight: 500;
  margin-bottom: 0.6rem;
}
.title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 0.6rem;
}
.subtitle {
  color: var(--text-sec);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* ─────────────── Cartes ─────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.card--auth { padding: 2.2rem; }

/* ─────────────── Formulaires ─────────────── */
.field { margin-bottom: 1.1rem; }

.field label {
  display: block;
  font-size: 0.74rem;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.45rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.field input::placeholder { color: var(--text-muted); }

.field--error input { border-color: var(--danger); }

.field__error {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--danger);
}
.field__hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ─────────────── Boutons ─────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.25s, transform 0.2s, border-color 0.25s, color 0.25s;
  text-align: center;
}
.btn--primary { background: var(--accent); color: #0a0a0a; }
.btn--primary:hover { background: var(--accent-soft); color: #0a0a0a; transform: translateY(-2px); }

.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-sec);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--block { width: 100%; }

/* ─────────────── Alertes ─────────────── */
.alert {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
  border: 1px solid;
}
.alert--success { background: rgba(74, 222, 128, 0.10);  border-color: rgba(74, 222, 128, 0.30);  color: var(--success); }
.alert--error   { background: rgba(248, 113, 113, 0.10); border-color: rgba(248, 113, 113, 0.30); color: var(--danger); }
.alert--info    { background: var(--accent-dim);         border-color: rgba(201, 169, 110, 0.30); color: var(--accent); }
.alert--warning { background: rgba(251, 191, 36, 0.10);  border-color: rgba(251, 191, 36, 0.30);  color: var(--warning); }

/* ─────────────── Page d'authentification ─────────────── */
.auth {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}
.auth__head { text-align: center; margin-bottom: 1.8rem; }
.auth__head h1 { font-size: 2.4rem; margin-bottom: 0.3rem; }
.auth__head p  { color: var(--text-sec); font-size: 0.9rem; }

.auth__footer {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-sec);
}

/* ─────────────── Tableau de bord ─────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-align: center;
}
.stat__value {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 2.2rem;
  color: var(--accent);
  line-height: 1;
}
.stat__label {
  font-size: 0.72rem;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 0.4rem;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.badge--paid    { background: rgba(74, 222, 128, 0.15); color: var(--success); border: 1px solid rgba(74, 222, 128, 0.3); }
.badge--pending { background: rgba(251, 191, 36, 0.15); color: var(--warning); border: 1px solid rgba(251, 191, 36, 0.3); }

/* ─────────────── Pied de page ─────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
}
.footer a { color: var(--text-sec); }
.footer a:hover { color: var(--accent); }
.footer__links {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

/* ─────────────── Sélecteurs en cartes (radio) ─────────────── */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.7rem;
}
.choice-grid--tight { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }

.choice { position: relative; display: block; cursor: pointer; }
.choice input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.choice__body {
  padding: 0.9rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.25s, background 0.25s;
  height: 100%;
}
.choice:hover .choice__body { border-color: var(--text-muted); }
.choice input:checked + .choice__body {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.choice input:focus-visible + .choice__body {
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.choice__name { font-weight: 600; font-size: 0.9rem; }
.choice input:checked + .choice__body .choice__name { color: var(--accent); }
.choice__desc { font-size: 0.75rem; color: var(--text-sec); margin-top: 0.15rem; }

/* ─────────────── Cases à cocher ─────────────── */
.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.check { position: relative; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__body {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.82rem;
  color: var(--text-sec);
  transition: all 0.25s;
}
.check input:checked + .check__body {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

/* ─────────────── Macros ─────────────── */
.macro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}
.macro {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.macro::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.macro--kcal::before { background: var(--accent); }
.macro--prot::before { background: var(--danger); }
.macro--carb::before { background: var(--warning); }
.macro--fat::before  { background: var(--blue); }

.macro__value {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 2.3rem;
  line-height: 1;
}
.macro--kcal .macro__value { color: var(--accent); }
.macro--prot .macro__value { color: var(--danger); }
.macro--carb .macro__value { color: var(--warning); }
.macro--fat  .macro__value { color: var(--blue); }

.macro__label {
  font-size: 0.68rem;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 0.3rem;
}
.macro__share { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ─────────────── Lignes de résultat ─────────────── */
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.result-row:last-child { border-bottom: none; }
.result-row__label { color: var(--text-sec); font-size: 0.9rem; }
.result-row__hint  { color: var(--text-muted); font-size: 0.76rem; margin-top: 0.1rem; }
.result-row__value {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.5rem;
  color: var(--accent);
  white-space: nowrap;
}

/* ─────────────── Contenu verrouillé ─────────────── */
.locked { position: relative; overflow: hidden; border-radius: var(--radius); }
.locked__content {
  filter: blur(6px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}
.locked__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(10,10,10,0.55), rgba(10,10,10,0.9));
}
.locked__title {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.7rem;
  color: var(--accent);
}
.locked__text { color: var(--text-sec); font-size: 0.88rem; max-width: 380px; }

/* ─────────────── Liste à puces dorées ─────────────── */
.tick-list { list-style: none; }
.tick-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--text-sec);
  font-size: 0.9rem;
}
.tick-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ─────────────── Accordéon (séances / repas) ─────────────── */
.accordion {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.8rem;
  overflow: hidden;
}
.accordion__head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: background 0.25s;
}
.accordion__head:hover { background: rgba(255, 255, 255, 0.02); }
.accordion__title {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.accordion__meta { font-size: 0.8rem; color: var(--text-sec); margin-top: 0.15rem; }
.accordion__chevron {
  color: var(--text-muted);
  transition: transform 0.3s;
  flex-shrink: 0;
  font-size: 0.9rem;
}
.accordion[open] .accordion__chevron { transform: rotate(180deg); }
.accordion__body { padding: 0 1.4rem 1.4rem; }

.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tag--force  { background: rgba(248, 113, 113, 0.15); color: var(--danger); }
.tag--volume { background: rgba(96, 165, 250, 0.15);  color: var(--blue); }
.tag--lourd  { background: rgba(248, 113, 113, 0.15); color: var(--danger); }
.tag--moyen  { background: rgba(251, 191, 36, 0.15);  color: var(--warning); }
.tag--leger  { background: rgba(74, 222, 128, 0.15);  color: var(--success); }
.tag--muscle { background: var(--accent-dim); color: var(--accent); }
.tag--soon   { background: rgba(255,255,255,0.06); color: var(--text-muted); }

/* ─────────────── Séance : liste + schéma ─────────────── */
.workout-layout {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 1.8rem;
  align-items: start;
}
.exercise {
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.exercise:last-child { border-bottom: none; }
.exercise__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.exercise__name { font-weight: 500; font-size: 0.95rem; }
.exercise__cue  { color: var(--text-sec); font-size: 0.78rem; margin-top: 0.15rem; }
.exercise__sets {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.2rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.video-toggle {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}
.video-btn {
  padding: 0.3rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-sec);
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.25s;
}
.video-btn:hover { border-color: var(--accent); color: var(--accent); }
.video-btn.is-active { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }

.video-wrap { margin-top: 0.7rem; }
.video-wrap video,
.video-wrap iframe {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #000;
  display: block;
}
/* Le lecteur embarqué n'a pas de hauteur intrinsèque : on la fixe en 16/9. */
.video-wrap iframe {
  aspect-ratio: 16 / 9;
  height: auto;
}

/* ─────────────── Schéma musculaire ─────────────── */
.muscle-map-box {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.muscle-map-box__label {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.muscle-map svg { width: 185px; height: auto; display: block; }
.muscle-map .m {
  fill: #1c1c1c;
  stroke: #222;
  stroke-width: 0.3;
  transition: fill 0.6s ease, filter 0.6s ease;
}
.muscle-map .m.on {
  fill: var(--accent);
  stroke: rgba(201, 169, 110, 0.7);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}
.muscle-map .m.on-soft {
  fill: rgba(201, 169, 110, 0.45);
  stroke: rgba(201, 169, 110, 0.35);
}
.muscle-map .skin    { fill: #161616; stroke: none; }
.muscle-map .outline { fill: none; stroke: #222; stroke-width: 0.4; }
.muscle-map .sep     { fill: none; stroke: #0f0f0f; stroke-width: 0.3; }

/* ─────────────── Repas ─────────────── */
.food {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
}
.food:last-child { border-bottom: none; }
.food__qty  { color: var(--accent); font-size: 0.85rem; white-space: nowrap; }
.food__warn { color: var(--warning); font-size: 0.72rem; display: block; }

.macro-pills { display: flex; gap: 0.5rem; margin-top: 0.9rem; flex-wrap: wrap; }
.pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}
.pill--p { background: rgba(248, 113, 113, 0.12); color: var(--danger); }
.pill--g { background: rgba(251, 191, 36, 0.12);  color: var(--warning); }
.pill--l { background: rgba(96, 165, 250, 0.12);  color: var(--blue); }

/* ─────────────── Minuteur ─────────────── */
.timer { text-align: center; }
.timer__display {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 4rem;
  color: var(--accent);
  line-height: 1;
  margin: 0.8rem 0;
  font-variant-numeric: tabular-nums;
}
.timer__bar {
  width: 100%;
  height: 4px;
  background: var(--bg);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1.2rem;
}
.timer__fill {
  height: 100%;
  width: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 1s linear;
}
.timer__presets, .timer__controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.timer__presets { margin-bottom: 1.2rem; }

/* ─────────────── Landing ─────────────── */
.hero {
  text-align: center;
  padding: 4rem 0 3rem;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20% 0 0;
  background: radial-gradient(ellipse 60% 50% at 50% 30%, var(--accent-dim), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.hero h1 {
  font-size: clamp(2.8rem, 9vw, 5.5rem);
  line-height: 0.95;
  margin-bottom: 1.2rem;
}
.hero h1 .accent { color: var(--accent); }
.hero__lead {
  color: var(--text-sec);
  max-width: 540px;
  margin: 0 auto 2rem;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.7;
}
.hero__cta {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.hero__note {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.section { padding: 3.5rem 0; }
.section__head { text-align: center; margin-bottom: 2.5rem; }
.section__head .title { font-size: clamp(1.8rem, 5vw, 2.8rem); }
.section__head .subtitle { max-width: 560px; margin: 0 auto; }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.step { position: relative; padding-top: 0.5rem; }
.step__num {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.35;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.step h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.step p { color: var(--text-sec); font-size: 0.9rem; }

/* Offre / prix */
.offer {
  background: var(--bg-card);
  border: 1px solid rgba(201, 169, 110, 0.3);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
.offer__price {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: clamp(3.5rem, 12vw, 5.5rem);
  color: var(--accent);
  line-height: 1;
}
.offer__once {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 1.8rem;
}
.offer .tick-list { text-align: left; max-width: 420px; margin: 0 auto 1.8rem; }

/* FAQ */
.faq {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  padding: 1.1rem 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  color: var(--accent);
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: transform 0.25s;
}
.faq[open] summary::after { transform: rotate(45deg); }
.faq p {
  color: var(--text-sec);
  font-size: 0.92rem;
  padding-bottom: 1.1rem;
  max-width: 66ch;
}

.disclaimer {
  font-size: 0.76rem;
  color: var(--text-muted);
  max-width: 70ch;
  margin: 2.5rem auto 0;
  text-align: center;
  line-height: 1.6;
}

/* ─────────────── Forum ─────────────── */
.stories {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  padding: 0.3rem 0 1rem;
  scrollbar-width: thin;
}
.story {
  flex: 0 0 210px;
  background: var(--bg-card);
  border: 1px solid rgba(201, 169, 110, 0.35);
  border-radius: var(--radius);
  padding: 1rem;
  position: relative;
  display: block;
  color: inherit;
}
.story:hover { border-color: var(--accent); }
.story--pinned { border-color: var(--accent); background: var(--accent-dim); }
.story__badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.4rem;
  display: block;
}
.story__title {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
  line-height: 1.15;
}
.story__excerpt {
  font-size: 0.78rem;
  color: var(--text-sec);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story__timer {
  font-size: 0.68rem;
  color: var(--warning);
  margin-top: 0.5rem;
  display: block;
}

.post {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
  margin-bottom: 1rem;
}
.post--pinned { border-color: rgba(201, 169, 110, 0.4); }
.post__head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(201, 169, 110, 0.3);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1rem;
  flex-shrink: 0;
}
.post__author { font-weight: 600; font-size: 0.92rem; }
.post__meta { font-size: 0.74rem; color: var(--text-muted); }
.post__title {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}
.post__body { color: var(--text-sec); font-size: 0.93rem; line-height: 1.7; }
.post__body a { word-break: break-word; }

.post__images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-top: 0.9rem;
}
/* Les photos gardent leur cadrage d'origine. Un ratio impose (4/3) avec
   object-fit: cover rognait les cotes : une photo verticale prise au
   telephone, le cas le plus courant ici, perdait la tete et les pieds.
   La hauteur est simplement plafonnee pour qu'une image en portrait
   n'occupe pas tout l'ecran ; contain evite alors toute deformation. */
.post__images img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  margin-inline: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: block;
}

.post__foot {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}
.react {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--text-sec);
  font-family: inherit;
  transition: all 0.2s;
  line-height: 1.3;
}
.react:hover { border-color: var(--accent); }
.react.is-on { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.react__n { font-size: 0.74rem; margin-left: 0.2rem; }

.comment {
  display: flex;
  gap: 0.7rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.comment:last-child { border-bottom: none; }
.comment__body { color: var(--text-sec); font-size: 0.9rem; line-height: 1.6; }

/* ─────────────── Messagerie ─────────────── */
.chat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  height: min(62vh, 560px);
}
.chat__scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.chat__empty {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 34ch;
}

.bubble {
  max-width: 78%;
  padding: 0.7rem 0.95rem;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.55;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.bubble--them {
  align-self: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.bubble--me {
  align-self: flex-end;
  background: var(--accent-dim);
  border: 1px solid rgba(201, 169, 110, 0.3);
  border-bottom-right-radius: 4px;
}
.bubble__meta {
  display: block;
  font-size: 0.66rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}
.bubble--me .bubble__meta { text-align: right; }

.chat__form {
  border-top: 1px solid var(--border);
  padding: 0.8rem;
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
}
.chat__form textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 140px;
  padding: 0.7rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
}
.chat__form textarea:focus { border-color: var(--accent); }
.chat__closed {
  border-top: 1px solid var(--border);
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.conv {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  color: inherit;
}
.conv:last-child { border-bottom: none; }
.conv:hover { background: rgba(255, 255, 255, 0.02); }
.conv--unread { background: var(--accent-dim); }
.conv__name { font-weight: 600; font-size: 0.92rem; }
.conv__last {
  font-size: 0.8rem;
  color: var(--text-sec);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42ch;
}
.conv__badge {
  background: var(--accent);
  color: #0a0a0a;
  border-radius: 99px;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0 0.4rem;
  flex-shrink: 0;
}

.nav__badge {
  background: var(--accent);
  color: #0a0a0a;
  border-radius: 99px;
  padding: 0.05rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: 0.2rem;
}

/* ─────────────── Pages légales ─────────────── */
.legal { max-width: 760px; }
.legal h2 {
  font-size: 1.5rem;
  margin: 2.2rem 0 0.7rem;
  color: var(--accent);
}
.legal h3 {
  font-size: 1.1rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  margin: 1.4rem 0 0.4rem;
}
.legal p,
.legal li {
  color: var(--text-sec);
  font-size: 0.93rem;
  line-height: 1.75;
}
.legal p { margin-bottom: 0.8rem; }
.legal ul, .legal ol { margin: 0 0 0.9rem 1.2rem; }
.legal li { margin-bottom: 0.35rem; }
.legal strong { color: var(--text); }
.legal__updated {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.legal dl { margin-bottom: 1rem; }
.legal dt {
  font-weight: 600;
  color: var(--text);
  font-size: 0.88rem;
  margin-top: 0.7rem;
}
.legal dd {
  margin-left: 0;
  color: var(--text-sec);
  font-size: 0.9rem;
}

/* Champ que seul l'exploitant peut renseigner */
.todo {
  display: inline-block;
  background: rgba(251, 191, 36, 0.12);
  border: 1px dashed rgba(251, 191, 36, 0.45);
  color: var(--warning);
  border-radius: 5px;
  padding: 0.08rem 0.45rem;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ─────────────── Tableaux (admin) ─────────────── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 560px;
}
table.data th {
  text-align: left;
  padding: 0.85rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
table.data .num {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.1rem;
  color: var(--accent);
}
.muted { color: var(--text-muted); }

.admin-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
}
.admin-nav a {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-sec);
  transition: all 0.25s;
}
.admin-nav a:hover { border-color: var(--accent); color: var(--accent); }
.admin-nav a.is-active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

/* ─────────────── Mobile ─────────────── */
@media (max-width: 900px) {
  .workout-layout { grid-template-columns: 1fr; }
  .muscle-map-box { position: relative; top: 0; margin-bottom: 1rem; }
}

@media (max-width: 640px) {
  .nav__inner { padding: 0.9rem 1.2rem; flex-wrap: wrap; }
  .nav__links { gap: 1rem; width: 100%; justify-content: flex-start; }
  .nav__links a { font-size: 0.74rem; }
  .container { padding: 0 1.2rem; }
  .card { padding: 1.4rem; }
  .title { font-size: clamp(1.7rem, 8vw, 2.4rem); }
  main { padding: 1.5rem 0 3rem; }

  .macro-grid { grid-template-columns: repeat(2, 1fr); }
  .macro__value { font-size: 1.9rem; }
  .choice-grid { grid-template-columns: 1fr; }
  .choice-grid--tight { grid-template-columns: 1fr 1fr; }
}
