/* ══════════════════════════════════════════════════════
   DESIGN TOKENS
   ══════════════════════════════════════════════════════ */
/* ── Mode nuit (défaut) ─────────────────────────────── */
:root {
  /* ── Couleurs ─────────────────────────────────────── */
  --bg:          #0a0e13;
  --surface:     #111820;
  --surface2:    #1a2333;
  --surface3:    #212d40;
  --border:      #253047;
  --border-dim:  #1a2333;
  --green:       #22c55e;
  --green-dark:  #16a34a;
  --green-glow:  rgba(34,197,94,0.15);
  --green-dim:   rgba(34,197,94,0.10);
  --text:        #e2eaf4;
  --text-muted:  #7a90b0;
  --text-dim:    #374b66;
  --red:         #f05151;
  --yellow:      #e6a817;
  --blue:        #60a5fa;

  /* ── Forme ────────────────────────────────────────── */
  --radius:      14px;
  --radius-sm:   9px;
  --radius-xs:   6px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.3);
  --transition:  0.18s cubic-bezier(0.4,0,0.2,1);

  /* ── Layout responsive ─────────────────────────────
     Ces variables centralisent toute la gestion des
     safe areas et de la nav — un seul endroit à changer.
  ─────────────────────────────────────────────────── */
  --sat: env(safe-area-inset-top,    0px);   /* notch / Dynamic Island */
  --sar: env(safe-area-inset-right,  0px);
  --sab: env(safe-area-inset-bottom, 0px);   /* home indicator iOS */
  --sal: env(safe-area-inset-left,   0px);

  --nav-h:       60px;
  --nav-total:   calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));

  /* ── Typographie responsive ──────────────────────── */
  --text-xs:   clamp(10px, 2.5vw, 11px);
  --text-sm:   clamp(12px, 3vw,   13px);
  --text-base: clamp(14px, 3.5vw, 15px);
  --text-md:   clamp(15px, 3.8vw, 16px);
  --text-lg:   clamp(17px, 4.2vw, 19px);
  --text-xl:   clamp(20px, 5vw,   24px);
  --text-2xl:  clamp(24px, 6vw,   30px);

  /* ── Touch targets ───────────────────────────────── */
  --touch-min: 44px;   /* minimum Apple/Google HIG */
}

/* ── Mode jour ─────────────────────────────────────── */
[data-theme="light"] {
  --bg:          #f0f2f5;
  --surface:     #ffffff;
  --surface2:    #f5f7fa;
  --surface3:    #eaecf0;
  --border:      #d8dde6;
  --border-dim:  #e8ebf0;
  --green:       #16a34a;
  --green-dark:  #15803d;
  --green-glow:  rgba(22,163,74,0.12);
  --green-dim:   rgba(22,163,74,0.08);
  --text:        #0f1923;
  --text-muted:  #5a6a80;
  --text-dim:    #9aaabb;
  --red:         #dc2626;
  --yellow:      #d97706;
  --blue:        #2563eb;
  --shadow:      0 4px 24px rgba(0,0,0,0.10);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.07);
}

/* ══════════════════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html {
  height: 100%;
  /* Empêche iOS de zoomer le texte en landscape */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  /* Empêche le scroll bounce iOS sur le body */
  overscroll-behavior: none;
}

/* ══════════════════════════════════════════════════════
   DESKTOP SHELL — phone-like container on wide screens
   ══════════════════════════════════════════════════════ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(34,197,94,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 20%, rgba(34,197,94,0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
  /* dvh = dynamic viewport height (prend en compte la barre URL mobile)
     Fallback vh pour navigateurs plus anciens */
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  /* Safe area top : notch, Dynamic Island, status bar */
  padding-top: env(safe-area-inset-top, 0px);
}

/* ── Desktop: centered narrow container ── */
@media (min-width: 768px) {
  body { background: #060a0f; overflow: auto; }
  body::before {
    background:
      radial-gradient(ellipse 80% 60% at 30% 90%, rgba(34,197,94,0.06) 0%, transparent 60%),
      radial-gradient(ellipse 60% 40% at 75% 10%, rgba(34,197,94,0.04) 0%, transparent 50%);
  }

  #app {
    max-width: 480px;
    margin: 0 auto;
    height: 100dvh;
    min-height: 600px;
    box-shadow: 0 0 0 1px var(--border), 0 32px 80px rgba(0,0,0,0.7);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }

  /* On very wide screens, add decorative side elements */
  body::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
      linear-gradient(90deg, #060a0f 0%, transparent 25%, transparent 75%, #060a0f 100%);
    pointer-events: none;
    z-index: 0;
  }
}

/* ══════════════════════════════════════════════════════
   VIEWS
   ══════════════════════════════════════════════════════ */
/* ── Système de vues ─────────────────────────────────
   Règle d'or : NE JAMAIS mettre display:flex sur un
   #view-xxx spécifique — seul .view.active le fait.
   Chaque view est un flex-column qui remplit tout l'espace.
   Le scroll se fait dans le container interne, pas la view.
────────────────────────────────────────────────────── */
.view {
  display: none;          /* caché par défaut */
  flex-direction: column;
  flex: 1;                /* remplit #app moins la nav */
  overflow: hidden;       /* pas de débordement */
  animation: fadeIn 0.15s ease;
}
.view.active { display: flex; } /* UN SEUL endroit qui affiche */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════
   BOTTOM NAV
   ══════════════════════════════════════════════════════ */
#bottom-nav {
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  flex-shrink: 0;
}
#bottom-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: var(--touch-min);
  padding: 12px 0 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition);
  letter-spacing: 0.02em;
}
#bottom-nav button svg { width: 22px; height: 22px; stroke-width: 1.6; }
#bottom-nav button.active { color: var(--green); }
#bottom-nav button.active svg { filter: drop-shadow(0 0 6px rgba(34,197,94,0.5)); }
#bottom-nav.hidden { display: none; }

/* ══════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius);
  border: none;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity var(--transition), transform 0.1s, box-shadow var(--transition);
  user-select: none;
  letter-spacing: -0.01em;
}
.btn:active { transform: scale(0.97); opacity: 0.85; }

.btn-primary {
  background: var(--green);
  color: #000;
  box-shadow: 0 0 20px rgba(34,197,94,0.25), 0 4px 12px rgba(0,0,0,0.3);
}
.btn-primary:hover { box-shadow: 0 0 28px rgba(34,197,94,0.35), 0 4px 16px rgba(0,0,0,0.3); }

.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost { background: none; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }
.btn-danger { background: rgba(240,81,81,0.12); color: var(--red); border: 1px solid rgba(240,81,81,0.25); }
.btn-full { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-xs { padding: 6px 12px; font-size: 12px; border-radius: var(--radius-xs); }

/* ══════════════════════════════════════════════════════
   CARDS & SURFACES
   ══════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

/* ══════════════════════════════════════════════════════
   HOME VIEW
   ══════════════════════════════════════════════════════ */
/* #view-home hérite de .view : display:none/flex, flex:1, overflow:hidden */
/* PAS de overflow-y ici — le scroll est dans .home-scroll-inner */

.home-scroll-inner {
  flex: 1;
  min-height: 0;          /* CRITIQUE : autorise le shrink sous la taille du contenu */
  overflow-y: auto;
  overflow-x: hidden;
  /* Espace sous le contenu pour le sticky CTA */
  padding-bottom: 110px;
  background: var(--bg);
}
.home-scroll-inner::-webkit-scrollbar { width: 0; }

/* Sticky CTA — fixed, visible only on home view */
.home-sticky-cta {
  position: fixed;
  /* Se place exactement au-dessus de la bottom nav (nav-h + home indicator) */
  bottom: env(safe-area-inset-bottom, 0px);
  bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  padding: 10px 16px 12px;
  background: var(--bg);
  /* Ombre vers le haut pour masquer le contenu qui défile en dessous */
  box-shadow: 0 -8px 16px 4px var(--bg);
  z-index: 100;
  /* Sur desktop : centré comme le reste */
  max-width: 480px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .home-sticky-cta {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 480px;
  }
}
.home-sticky-cta.hidden { display: none; }
.home-sticky-cta .btn-choose-session { margin-top: 2px; }

/* Header */
.home-header {
  padding: 22px 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.home-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.home-settings-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: var(--touch-min);
  height: var(--touch-min);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.home-settings-btn:active { opacity: 0.6; }
.home-header-left h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.home-header-left .home-date {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 3px;
}

.phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-dim);
  border: 1px solid rgba(34,197,94,0.25);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
.phase-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

/* Week progress */
.week-progress {
  padding: 18px 20px 0;
}
.week-progress-top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.week-label-btn {
  background: none;
  border: none;
  /* padding vertical pour atteindre min 44px sans déformer le layout */
  padding: 12px 4px;
  margin: -12px -4px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  font-weight: inherit;
  -webkit-tap-highlight-color: transparent;
}
.week-label-btn:active { opacity: 0.6; }
.week-progress-top strong { color: var(--text); font-weight: 600; }
.progress-bar {
  height: 5px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-dark), var(--green));
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 8px rgba(34,197,94,0.4);
}

/* Next session card */
.next-session-card {
  margin: 16px 16px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  /* S'étire pour remplir l'espace vertical disponible */
  flex: 1;
}
.next-session-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green-dark), var(--green), transparent);
}
.next-session-card.has-override::before { display: none; }
.home-override-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(234,179,8,0.12);
  border-bottom: 1px solid rgba(234,179,8,0.3);
  color: #eab308;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
}
.home-override-banner svg { flex-shrink: 0; }
.home-override-banner span { flex: 1; }
.ov-reset-btn {
  background: rgba(234,179,8,0.15);
  border: 1px solid rgba(234,179,8,0.35);
  color: #eab308;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ov-reset-btn:active { opacity: 0.7; }

.next-session-top {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border-dim);
}
.next-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.next-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.next-meta {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.meta-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-muted);
}
.meta-chip svg { width: 12px; height: 12px; }

/* Previous form note in home */
.prev-form-note {
  margin: 0 16px 0;
  padding: 12px 14px;
  background: rgba(34,197,94,0.05);
  border: 1px solid rgba(34,197,94,0.15);
  border-radius: var(--radius-sm);
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.prev-form-note .pfn-label {
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.prev-form-note .pfn-text {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.45;
}

.exercise-preview {
  padding: 12px 18px 14px;
  border-bottom: 1px solid var(--border-dim);
}
.preview-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.preview-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.preview-item {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}
.preview-item::before {
  content: '';
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  opacity: 0.6;
}
.preview-item.more { color: var(--text-dim); font-style: italic; }
.preview-item.more::before { display: none; }

/* Muscles row */
.muscles-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 18px 12px;
  border-bottom: 1px solid var(--border-dim);
}
.muscle-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 9px;
  letter-spacing: 0.01em;
}

/* Exercise preview header row with expand button */
.preview-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.preview-expand-btn {
  background: none;
  border: none;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.02em;
}

.session-cta {
  padding: 14px 16px 16px;
}

/* Session dots */
.week-dots-section {
  padding: 12px 16px 16px;
}
.week-dots-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 2px;
  margin-bottom: 10px;
}
.week-dots {
  display: flex;
  gap: 6px;
}
.session-dot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 4px;
  min-height: var(--touch-min);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all var(--transition);
  cursor: pointer;
  font-family: inherit;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.session-dot:active { opacity: 0.7; transform: scale(0.96); }
/* flèche retour sur la séance prévue quand override actif */
.dot-scheduled-arrow {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-2, #1e2530);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.session-dot .dot-icon { line-height: 1; display: flex; align-items: center; justify-content: center; }
.session-dot .dot-icon svg { width: 26px; height: 26px; color: currentColor; }
.session-dot.done {
  background: rgba(22,163,74,0.08);
  border-color: rgba(34,197,94,0.2);
  color: var(--green-dark);
}
.session-dot.done .dot-icon { filter: grayscale(0.3); }
.session-dot.done.override {
  background: rgba(22,163,74,0.18);
  border-color: var(--green);
  border-width: 2px;
  color: var(--green);
  box-shadow: 0 0 10px rgba(34,197,94,0.25);
}
.session-dot.current {
  background: var(--green-dim);
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 12px rgba(34,197,94,0.15);
}

/* ══════════════════════════════════════════════════════
   FORM CHECK MODAL (pre-workout)
   ══════════════════════════════════════════════════════ */
.form-check-overlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  padding: 32px 20px;
  padding-bottom: 32px;
  animation: slideUp 0.3s cubic-bezier(0.4,0,0.2,1);
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.fc-header {
  margin-bottom: 24px;
}
.fc-header .fc-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.fc-header h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.fc-header p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 6px;
  line-height: 1.5;
}

.prev-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.prev-form-card .pfc-label {
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.prev-form-card .pfc-date {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.prev-form-card .pfc-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  font-style: italic;
}

.fc-emoji-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.fc-emoji-btn {
  flex: 1;
  padding: 14px 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all var(--transition);
  font-size: 24px;
  color: var(--text-muted);
  font-family: var(--font);
}
.fc-emoji-btn span { font-size: 11px; font-weight: 600; letter-spacing: 0.03em; }
.fc-emoji-btn.selected {
  border-color: var(--green);
  background: var(--green-dim);
  color: var(--green);
  box-shadow: 0 0 12px rgba(34,197,94,0.15);
}
.fc-emoji-btn:active { transform: scale(0.96); }

.fc-textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  padding: 14px 16px;
  resize: none;
  height: 88px;
  max-height: 110px;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}
.fc-textarea:focus { outline: none; border-color: var(--green); }
.fc-textarea::placeholder { color: var(--text-dim); }

.fc-footer {
  margin-top: auto;
}

/* ══════════════════════════════════════════════════════
   WORKOUT VIEW
   ══════════════════════════════════════════════════════ */
#view-workout {
  position: relative;
  overflow: hidden;
}

.workout-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: rgba(10,14,19,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.wt-left { display: flex; align-items: center; gap: 10px; }
.wt-title-wrap { display: flex; align-items: center; gap: 10px; }
.btn-quit-workout {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}
.btn-quit-workout:active { background: var(--border); color: var(--text); }
.workout-session-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.workout-ex-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 9px;
  font-weight: 500;
}
.wt-right { display: flex; align-items: center; gap: 8px; }
.btn-end-workout {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
}
.btn-end-workout:hover { border-color: var(--red); color: var(--red); }

/* Exercise nav pills */
.ex-nav-bar {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}
.ex-nav-bar::-webkit-scrollbar { display: none; }

.ex-pill {
  flex-shrink: 0;
  padding: 6px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--surface2);
  color: var(--text-dim);
  border: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  letter-spacing: -0.01em;
}
.ex-pill.active {
  background: var(--green);
  color: #000;
  border-color: var(--green);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(34,197,94,0.3);
}
.ex-pill.done {
  color: var(--green-dark);
  border-color: rgba(34,197,94,0.3);
  background: rgba(22,163,74,0.08);
}
.ex-pill.done::after {
  content: ' ✓';
  font-size: 10px;
}
.pill-num {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  opacity: 0.55;
  margin-right: 5px;
  letter-spacing: 0;
}

/* Carousel */
.exercise-carousel {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.exercise-slides {
  display: flex;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
  will-change: transform;
}
.exercise-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 16px 16px 100px;
  -webkit-overflow-scrolling: touch;
}
.exercise-slide::-webkit-scrollbar { width: 0; }

/* ── Exercise header: name + progress ──────────────── */
.ex-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.ex-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  flex: 1;
}
.ex-progress-badge {
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 4px 10px;
  margin-top: 3px;
  letter-spacing: 0.04em;
}
/* ── Objectif + Repos bar ─────────────────────────── */
.ex-goal-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.ex-goal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.ex-goal-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--green);
  opacity: 0.7;
}
.ex-goal-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 3px;
  opacity: 0.75;
}
/* Both cards — structure identique : icon + [label / val] */
.ex-goal-item-obj,
.ex-goal-item-rest { align-items: flex-start; padding-top: 11px; padding-bottom: 11px; }
.ex-goal-obj-content,
.ex-goal-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ex-goal-numbers {
  display: flex;
  align-items: center;
  gap: 5px;
}
.ex-goal-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.ex-goal-info-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}
.ex-goal-info-btn:active { background: var(--border); color: var(--text); }

/* Sets info modal content */
.sets-info-body { text-align: left; margin-bottom: 20px; display: flex; flex-direction: column; gap: 14px; }
.sets-info-block { background: var(--surface2); border-radius: var(--radius-sm); padding: 12px 14px; }
.sets-info-term { font-size: 13px; font-weight: 700; color: var(--green); margin-bottom: 6px; }
.sets-info-def { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.sets-info-def strong { color: var(--text); }
.sets-info-example { background: rgba(34,197,94,0.06); border: 1px solid rgba(34,197,94,0.15); border-radius: var(--radius-sm); padding: 12px 14px; }
.sie-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--green); margin-bottom: 6px; }
.sie-text { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ── Tips : échauffement / technique / cue ─────────── */
.ex-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 8px;
}
.ex-tip-icon { flex-shrink: 0; font-size: 15px; line-height: 1.4; }
.ex-tip-warmup {
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  color: #a5b4fc;
}

/* ── Warmup protocol block ──────────────────────────── */
.ex-warmup-block {
  background: rgba(99,102,241,0.06);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.ex-warmup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 4px;
}
.ex-warmup-title {
  font-size: 13px;
  font-weight: 700;
  color: #a5b4fc;
}
.ex-warmup-ref {
  font-size: 11px;
  color: rgba(165,180,252,0.6);
}
.ex-warmup-ref strong { color: #a5b4fc; }
.wu-rows { display: flex; flex-direction: column; gap: 6px; }
.wu-row {
  display: grid;
  grid-template-columns: 22px 1fr 1fr auto;
  align-items: center;
  gap: 8px;
  background: rgba(99,102,241,0.07);
  border-radius: var(--radius-xs);
  padding: 8px 10px;
}
.wu-optional { opacity: 0.65; }
.wu-num {
  font-size: 12px;
  font-weight: 700;
  color: rgba(165,180,252,0.6);
  text-align: center;
}
.wu-weight {
  font-size: 15px;
  font-weight: 800;
  color: #a5b4fc;
  letter-spacing: -0.02em;
}
.wu-pct {
  font-size: 14px;
  font-weight: 700;
  color: #a5b4fc;
}
.wu-reps {
  font-size: 13px;
  color: rgba(165,180,252,0.8);
  font-weight: 500;
}
.wu-pct-label {
  font-size: 11px;
  color: rgba(165,180,252,0.4);
  text-align: right;
}
.wu-optional-note {
  font-size: 11px;
  color: rgba(165,180,252,0.45);
  margin-top: 6px;
  font-style: italic;
}
.ex-tip-tech {
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.2);
  color: var(--yellow, #f59e0b);
}
.ex-tip strong { font-weight: 700; }

/* ── Coach cue (ex.notes) ─────────────────────────── */
.ex-cue {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  background: rgba(96,165,250,0.05);
  border: 1px solid rgba(96,165,250,0.18);
  border-left: 2px solid rgba(96,165,250,0.5);
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  margin-bottom: 14px;
  line-height: 1.5;
}
.ex-cue svg { flex-shrink: 0; margin-top: 2px; color: var(--blue); opacity: 0.7; }

/* Last session */
/* ── Dernière fois — référence performance ─────────────── */
.last-ref {
  background: rgba(99,102,241,0.04);
  border: 1px solid rgba(99,102,241,0.18);
  border-left: 3px solid rgba(99,102,241,0.5);
  border-radius: var(--radius-sm);
  padding: 10px 12px 10px 11px;
  margin-bottom: 14px;
}
.last-ref-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
}
.last-ref-header-icon {
  width: 13px;
  height: 13px;
  color: rgba(99,102,241,0.7);
  flex-shrink: 0;
}
.last-ref-label {
  font-size: 9px;
  font-weight: 700;
  color: rgba(99,102,241,0.8);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex: 1;
}
.last-ref-date-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: 4px;
  padding: 1px 6px;
  letter-spacing: 0.02em;
}
.last-ref-perf {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1px;
}
.last-ref-perf::-webkit-scrollbar { display: none; }
.last-ref-set-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: 6px;
  padding: 4px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.last-ref-set-num {
  font-size: 9px;
  font-weight: 700;
  color: rgba(99,102,241,0.75);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.last-ref-set-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.last-ref-note {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 7px;
  line-height: 1.4;
  padding-top: 6px;
  border-top: 1px solid rgba(99,102,241,0.1);
  opacity: 0.85;
}

/* Sets */
/* ── Sets section wrapper ───────────────────────────── */
.sets-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 12px 12px 14px;
  margin-bottom: 12px;
}
.sets-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.sets-section-header {
  display: grid;
  grid-template-columns: 22px 1fr 1fr 38px;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-dim);
  margin-bottom: 8px;
}
.set-col-label {
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
/* legacy .set-header fallback (kept for safety) */
.set-header {
  display: grid;
  grid-template-columns: 30px 1fr 1fr 38px;
  gap: 8px;
  padding: 0 0 5px;
}
.sets-list { display: flex; flex-direction: column; gap: 7px; }
.set-row {
  display: grid;
  grid-template-columns: 22px 1fr 1fr 38px;
  gap: 6px;
  align-items: center;
  transition: opacity 0.2s;
}
.set-row.done { opacity: 0.55; }
.set-num {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  text-align: center;
}

/* Stepper: − [value] + */
.set-stepper {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  overflow: hidden;
  height: 42px;
}
.step-btn {
  flex-shrink: 0;
  width: 32px;
  height: 100%;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.step-btn:active { background: var(--border); color: var(--text); }
.step-btn:disabled { opacity: 0.3; cursor: default; }
.step-val-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}
.step-input {
  width: 100%;
  min-width: 0;
  max-width: 52px;
  background: none;
  border: none;
  outline: none;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font);
  -moz-appearance: textfield;
  padding: 0;
}
.step-input::-webkit-inner-spin-button,
.step-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.step-input::placeholder {
  color: var(--text-dim);
  font-weight: 500;
  font-style: italic;
}
.step-input.is-hint {
  color: var(--text-dim);
  font-weight: 500;
  font-style: italic;
}
.step-unit {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  flex-shrink: 0;
}
/* hint = value from previous session, shown dimmer */
.step-val.is-hint {
  color: var(--text-dim);
  font-weight: 500;
  font-style: italic;
}

.set-check {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: none;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
  font-size: 0;
}
.set-check svg { width: 15px; height: 15px; opacity: 0; transition: opacity var(--transition); }
.set-check.done {
  border-color: var(--green);
  background: var(--green-dim);
  color: var(--green);
  box-shadow: 0 0 10px rgba(34,197,94,0.2);
}
.set-check.done svg { opacity: 1; }
.set-check:active { transform: scale(0.9); }
@keyframes checkPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.4); box-shadow: 0 0 18px rgba(34,197,94,0.5); }
  100% { transform: scale(1); }
}
.set-check.done { animation: checkPop 0.28s ease-out; }

/* Exercise note */
.ex-note-section {
  margin-bottom: 14px;
}
.ex-note-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.ex-note-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.5;
  padding: 9px 12px;
  resize: none;
  height: 52px;
  transition: border-color var(--transition);
}
.ex-note-input:focus { outline: none; border-color: rgba(34,197,94,0.3); }
.ex-note-input::placeholder { color: var(--text-dim); }

/* YouTube link */
/* YouTube inline embed */
.yt-embed {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
}
.yt-embed .yt-expanded-content { background: #000; }
/* Compact video button */
.yt-compact-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}
.yt-compact-btn svg:first-child { color: var(--red); flex-shrink: 0; }
.yt-compact-btn span { flex: 1; text-align: left; }
.yt-chevron { flex-shrink: 0; transition: transform 0.2s ease; color: var(--text-dim); }
.yt-compact-btn:active { background: var(--surface2); }
.yt-expanded-content { background: #000; }
.yt-expanded-content.hidden { display: none; }
.yt-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  cursor: pointer;
  overflow: hidden;
}
.yt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.yt-thumb:active img { transform: scale(0.98); }
.yt-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0,0,0,0.45);
}
.yt-play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, background 0.15s;
}
.yt-thumb:active .yt-play-btn {
  transform: scale(0.93);
  background: rgba(200,0,0,0.95);
}
.yt-play-btn svg {
  width: 20px;
  height: 20px;
  color: #fff;
  margin-left: 3px; /* optical centering of play triangle */
}
.yt-play-overlay span {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.03em;
}
.yt-iframe-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
}
.yt-iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Rest Timer ──────────────────────────────────── */
.rest-timer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(10,14,19,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--green);
  padding: 16px 20px;
  padding-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 100;
  transform: translateY(110%);
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), visibility 0s linear 0.35s;
  box-shadow: 0 -8px 32px rgba(34,197,94,0.1);
}
.rest-timer.visible {
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), visibility 0s linear 0s;
}
.timer-bar {
  position: absolute;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green-dark), var(--green));
  transition: width 1s linear;
  box-shadow: 0 0 8px rgba(34,197,94,0.6);
}
.timer-time {
  font-size: 38px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--green);
  flex-shrink: 0;
  min-width: 84px;
  letter-spacing: -0.02em;
  text-shadow: 0 0 20px rgba(34,197,94,0.4);
  transition: color var(--transition);
}
.timer-time.urgent { color: var(--red); text-shadow: 0 0 20px rgba(240,81,81,0.4); }
.timer-info { flex: 1; }
.timer-info .ti-label { font-size: 11px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.timer-info .ti-next { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.timer-skip-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-xs);
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.timer-skip-btn:hover { border-color: var(--text-muted); color: var(--text); }

/* Workout bottom CTA */
.workout-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  padding-bottom: 12px;
  background: linear-gradient(transparent, var(--bg) 30%, var(--bg) 100%);
  pointer-events: none;
}
.workout-bottom .btn {
  pointer-events: all;
}

/* ══════════════════════════════════════════════════════
   SUMMARY VIEW
   ══════════════════════════════════════════════════════ */
/* #view-summary hérite de .view */
.summary-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 18px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.summary-scroll::-webkit-scrollbar { width: 0; }

.summary-hero {
  text-align: center;
  padding: 8px 0 4px;
}
.summary-emoji {
  font-size: 52px;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 16px rgba(34,197,94,0.4));
}
.summary-hero h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.summary-hero p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
}
.stat-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.summary-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 2px;
  margin-bottom: -6px;
}

.summary-ex-list { display: flex; flex-direction: column; gap: 6px; }
.summary-ex-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.srow-info { flex: 1; min-width: 0; }
.srow-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.srow-detail { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.perf-badge { font-size: 20px; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════
   TRACKING VIEW
   ══════════════════════════════════════════════════════ */
/* #view-tracking hérite de .view */
.tracking-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tracking-scroll::-webkit-scrollbar { width: 0; }

/* ── Track mode toggle ── */
.track-mode-toggle {
  display: flex;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
}
.track-mode-btn {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}
.track-mode-btn.active {
  background: var(--surface3);
  color: var(--text);
}

/* ── Track session dots (same as home but smaller gap) ── */
.track-session-dots {
  display: flex;
  gap: 6px;
}
.track-session-dot { cursor: pointer; flex: 1; }
.track-session-dot.no-data { opacity: 0.45; }

/* ── Muscle chips ── */
.track-muscle-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.track-muscle-chips .filter-chip.dim { opacity: 0.4; }

/* ── Exercise list ── */
.track-ex-section { display: flex; flex-direction: column; gap: 6px; }
.track-ex-section + .track-ex-section { margin-top: 12px; }
.track-ex-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  margin-bottom: 2px;
}
/* Exercices sans données : plus compacts et discrets */
.track-ex-section.no-data-section .track-ex-card {
  padding: 8px 14px;
  opacity: 0.5;
}
.track-ex-section.no-data-section .tec-name {
  font-size: 13px;
}
.track-ex-section.no-data-section .tec-last {
  display: none;
}
.track-ex-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), border-color var(--transition);
}
.track-ex-card:active { background: var(--surface2); }
.track-ex-card.dim { opacity: 0.35; cursor: default; }
.tec-info { flex: 1; min-width: 0; }
.tec-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tec-last {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.tec-arrow { width: 16px; height: 16px; color: var(--text-dim); flex-shrink: 0; }

/* ── Chart back button ── */
.track-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  padding: 4px 0 8px;
}
.track-back-btn svg { width: 16px; height: 16px; }

.tracking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tracking-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.settings-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.settings-btn:active { background: var(--surface3); color: var(--text); }
.settings-btn svg { width: 18px; height: 18px; }

/* ── Settings modal ── */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.settings-overlay.hidden { display: none; }
.settings-sheet {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 0 0 20px;
}
.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-dim);
}
.settings-header h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.settings-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
}
.settings-close svg { width: 14px; height: 14px; }
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  gap: 16px;
}
.settings-row-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.settings-row-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
/* lang-toggle styles moved to SETTINGS UPDATES section above */

.filter-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.filter-chip.active {
  background: var(--green);
  color: #000;
  border-color: var(--green);
  box-shadow: 0 0 12px rgba(34,197,94,0.25);
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.chart-card .cc-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.chart-card .cc-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.history-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
}
.h-entry-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.h-entry-name { font-size: 14px; font-weight: 600; }
.h-entry-date { font-size: 12px; color: var(--text-dim); }
.h-sets { display: flex; flex-direction: column; gap: 2px; }
.h-set { font-size: 12px; color: var(--text-muted); }
.h-set span { color: var(--text); font-weight: 500; }
.h-note {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-dim);
}

/* ══════════════════════════════════════════════════════
   UTILITY
   ══════════════════════════════════════════════════════ */
.hidden { display: none !important; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

.empty-state {
  text-align: center;
  padding: 52px 24px;
  color: var(--text-muted);
}
.empty-state .es-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 14px; color: var(--text-dim); }

/* ══════════════════════════════════════════════════════
   AUTH VIEW
   ══════════════════════════════════════════════════════ */
/* #view-auth hérite de .view (display:none par défaut)
   .active ajoute display:flex via .view.active
   On surcharge juste l'alignement pour centrer le formulaire */
#view-auth.active {
  align-items: center;
  /* flex-start + padding-top pour positionner le form dans le tiers supérieur
     comme les apps iOS natives — évite le grand vide en bas */
  justify-content: flex-start;
  padding: calc(env(safe-area-inset-top, 0px) + 10vh) 24px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.auth-container {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.auth-logo {
  text-align: center;
  padding: 0 0 32px;
}
.auth-logo-icon {
  font-size: 48px;
  margin-bottom: 12px;
  line-height: 1;
}
.auth-logo h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 6px;
}
.auth-logo p {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
}
.auth-tabs {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 16px;
}
.auth-tab {
  flex: 1;
  padding: 9px 0;
  border: none;
  background: none;
  border-radius: calc(var(--radius-sm) - 2px);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.auth-tab.active {
  background: var(--green);
  color: #000;
  font-weight: 700;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.auth-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}
.auth-error {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.5);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #fca5a5;
  text-align: center;
  line-height: 1.4;
}
.auth-error.hidden { display: none; }

/* ══════════════════════════════════════════════════════
   SETTINGS UPDATES
   ══════════════════════════════════════════════════════ */
.settings-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.btn-logout {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid rgba(239,68,68,0.4);
  background: rgba(239,68,68,0.08);
  color: #f87171;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-logout:active { opacity: 0.7; }

/* 3-button lang toggle */
.lang-toggle { display: flex; gap: 4px; flex-shrink: 0; }
.lang-btn {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.lang-btn.active {
  background: var(--green);
  color: #000;
  border-color: var(--green);
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
.theme-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
}
.theme-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
[data-theme="light"] .theme-btn.active {
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

/* ── Settings toggle switch ─────────────────────── */
.settings-toggle-btn {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 13px;
  border: none;
  background: var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
  padding: 0;
}
.settings-toggle-btn[aria-checked="true"] {
  background: var(--green);
}
.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.settings-toggle-btn[aria-checked="true"] .toggle-knob {
  transform: translateX(20px);
}

/* ══════════════════════════════════════════════════════
   SESSION PICKER
   ══════════════════════════════════════════════════════ */
.btn-choose-session {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 10px 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 4px;
}
.btn-choose-session svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.btn-choose-session:active { opacity: 0.7; }

.picker-sheet {
  /* Taille réduite : juste assez pour le contenu, pas plus */
  max-height: 62vh;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
  touch-action: none;
}

/* Poignée universelle pour toutes les sheets */
.sheet-drag-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 4px;
  flex-shrink: 0;
}
/* Picker header compact */
.picker-header {
  padding: 2px 16px 12px;
  display: flex;
  align-items: center;
}
.picker-header-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text);
}

.picker-body  { flex: 1; overflow-y: auto; padding: 0 14px 0; min-height: 0; }
.picker-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

/* Semaines : scroll horizontal — une seule ligne */
.picker-weeks {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}
.picker-weeks::-webkit-scrollbar { display: none; }
.picker-week-btn {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
}
.picker-week-btn.selected {
  border-color: var(--green);
  background: rgba(34,197,94,0.1);
  color: var(--green);
  font-weight: 700;
}
.picker-week-btn.week-done { opacity: 0.7; }
.pwb-status { font-size: 9px; }

/* Séances */
.picker-sessions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 8px;
}
.picker-session-btn {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font);
}
.picker-session-btn .psb-info { flex: 1; min-width: 0; }
.picker-session-btn .psb-name { font-size: 13px; font-weight: 600; }
.picker-session-btn .psb-meta { font-size: 11px; color: var(--text-dim); margin-top: 1px; }
.picker-session-btn .psb-badge { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.picker-session-btn.selected {
  border-color: var(--green);
  background: rgba(34,197,94,0.07);
}
.picker-session-btn.selected .psb-name { color: var(--green); }

/* Session status badges */
.picker-session-btn.psb-done {
  opacity: 0.75;
}
.psb-done-icon { color: var(--green); }
.psb-check { color: var(--green); }
.psb-next-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--green);
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 4px;
  padding: 2px 5px;
}
.psb-upcoming-icon {
  font-size: 13px;
  color: var(--text-dim);
  opacity: 0.5;
}
.picker-footer {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

/* Override badge on home card */
.override-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--yellow, #f59e0b);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

/* Override warning in form check */
.override-warning {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.ow-icon { font-size: 18px; flex-shrink: 0; line-height: 1.3; }
.ow-text { font-size: 13px; color: var(--yellow, #f59e0b); line-height: 1.4; }
.ow-text strong { font-weight: 700; }

/* ══════════════════════════════════════════════════════
   SCROLLBAR
   ══════════════════════════════════════════════════════ */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ══════════════════════════════════════════════════════
   BODY MAP SVG
   ══════════════════════════════════════════════════════ */
.body-map-wrap {
  padding: 8px 16px 4px;
  display: flex;
  justify-content: center;
}
.body-map-svg {
  width: 100%;
  max-width: 200px;
  display: block;
}
/* body base silhouette */
.bb { fill: var(--surface-2, #1e2530); }
/* active muscle region */
.ma {
  fill: #ef4444;
  opacity: 0.82;
  filter: url(#mglow);
}
/* inactive muscle region — invisible overlay */
.mi { fill: transparent; }
/* front / back labels */
.body-label {
  font-size: 7px;
  fill: var(--text-dim, #6b7280);
  font-family: var(--font, sans-serif);
}

/* ══════════════════════════════════════════════════════
   QUIT CONFIRM MODAL
   ══════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.modal-overlay.hidden { display: none; }
.modal-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 20px);
  padding: 28px 24px 24px;
  width: 100%;
  text-align: center;
  animation: slideUp 0.22s ease-out;
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-icon { font-size: 36px; margin-bottom: 12px; }
.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}
.modal-body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 24px;
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}
.modal-btn-cancel {
  background: var(--green);
  border: none;
  color: #000;
}
.modal-btn-cancel:active { opacity: 0.85; }
.modal-btn-confirm {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.modal-btn-confirm:active { background: var(--border); }

/* ── Resume workout modal ──────────────────────────── */
.resume-session-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 12px 0 4px;
  text-align: left;
}
.resume-session-name {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.resume-session-info {
  font-size: var(--text-sm);
  color: var(--text-muted);
}
/* Inverser les couleurs pour ce modal : Reprendre = vert, Annuler = discret */
#resume-workout-modal .modal-btn-cancel {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  order: 2;
}
#resume-workout-modal .modal-btn-confirm {
  background: var(--green);
  border: none;
  color: #000;
  order: 1;
}

/* ── Dernière série : badge technique ──────────────── */
.last-set-tech-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  padding: 8px 10px 8px 12px;
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.22);
  border-top: 2px solid rgba(245,158,11,0.35);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 12.5px;
  color: var(--yellow, #f59e0b);
  line-height: 1.45;
}
.last-set-tech-badge > svg { /* lightning bolt */
  flex-shrink: 0;
  color: var(--yellow);
  opacity: 0.9;
}
.last-set-tech-text { flex: 1; }
.last-set-tech-badge strong { color: var(--yellow); font-weight: 700; }
/* ℹ button inside tech badge */
.tech-info-btn {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.35);
  color: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  margin-left: auto;
}
.tech-info-btn:active { background: rgba(245,158,11,0.3); }

/* ── Tech info modal ─────────────────────────────── */
.tech-info-sheet { text-align: left; }
.tech-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.tech-modal-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.tech-modal-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 3px;
}
.tech-modal-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.tech-modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.tech-modal-block {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
}
.tech-modal-block-why {
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.15);
}
.tech-modal-block-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 5px;
}
.tech-modal-block-why .tech-modal-block-label { color: var(--green); }
.tech-modal-block-text {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ══════════════════════════════════════════════════════
   GLOBAL WARM-UP OVERLAY
   ══════════════════════════════════════════════════════ */
.warmup-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.warmup-overlay.hidden { display: none; }

.wu-global-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 32px 20px 0;
  -webkit-overflow-scrolling: touch;
}
.wu-global-scroll::-webkit-scrollbar { width: 0; }

.wu-global-header { text-align: center; margin-bottom: 14px; }
.wu-global-emoji { font-size: 24px; margin-bottom: 4px; }
.wu-global-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}
.wu-global-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Steps list */
.wu-global-scroll { padding: 20px 16px 0; }
.wu-global-steps { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; }

.wu-step {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.wu-step.checked {
  background: rgba(34,197,94,0.05);
  border-color: rgba(34,197,94,0.25);
  opacity: 0.65;
}
.wu-step-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  color: transparent;
}
.wu-step-check.active {
  background: var(--green);
  border-color: var(--green);
  color: #000;
}
.wu-step-emoji { font-size: 15px; flex-shrink: 0; }
.wu-step-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
}
.wu-step.checked .wu-step-name { text-decoration: line-through; color: var(--text-dim); }
.wu-step-duration {
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 10px;
  padding: 2px 7px;
  white-space: nowrap;
  flex-shrink: 0;
}
.wu-step-yt {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255,0,0,0.1);
  border: 1px solid rgba(255,0,0,0.2);
  color: #ff4444;
  flex-shrink: 0;
  text-decoration: none;
  transition: all var(--transition);
}
.wu-step-yt:active { background: rgba(255,0,0,0.2); }

/* Footer */
.wu-global-footer {
  flex-shrink: 0;
  padding: 12px 16px 16px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.btn-skip-warmup {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
  padding: 6px;
  text-align: center;
  width: 100%;
  transition: color var(--transition);
}
.btn-skip-warmup:active { color: var(--text-muted); }

/* ── Swap Exercise Modal ──────────────────────────────── */
.swap-ex-sheet {
  text-align: left;
  padding: 8px 16px 32px;
  touch-action: none; /* géré manuellement pour le swipe */
  transition: transform 0.25s ease;
}
/* Poignée visuelle */
.swap-ex-drag-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 16px;
}
.swap-ex-header { margin-bottom: 16px; }
.swap-ex-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.swap-ex-sub {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}
.swap-ex-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.swap-ex-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  cursor: pointer;
  transition: all var(--transition);
}
.swap-ex-item.is-current {
  border-color: var(--green);
  background: rgba(34,197,94,0.06);
}
.swap-ex-item.is-preferred {
  border-color: rgba(99,102,241,0.5);
  background: rgba(99,102,241,0.06);
}
.swap-ex-item:active { opacity: 0.75; }
.swap-ex-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}
.swap-ex-item.is-current .swap-ex-item-icon { background: rgba(34,197,94,0.12); color: var(--green); }
.swap-ex-item.is-preferred .swap-ex-item-icon { background: rgba(99,102,241,0.12); color: rgba(99,102,241,0.9); }
.swap-ex-item:not(.is-current):not(.is-preferred) .swap-ex-item-icon {
  background: var(--surface2);
  color: var(--text-dim);
}
.swap-ex-item-info { flex: 1; min-width: 0; }
.swap-ex-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.swap-ex-item.is-current .swap-ex-item-name { color: var(--green); }
.swap-ex-item.is-preferred .swap-ex-item-name { color: rgba(99,102,241,0.9); }
.swap-ex-item-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 2px;
}
.swap-ex-item.is-current .swap-ex-item-tag { color: var(--green); opacity: 0.7; }
.swap-ex-item.is-preferred .swap-ex-item-tag { color: rgba(99,102,241,0.7); }
.swap-ex-item:not(.is-current):not(.is-preferred) .swap-ex-item-tag { color: var(--text-dim); }
.swap-ex-reset {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  color: var(--text-dim);
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  width: 100%;
  transition: all var(--transition);
  margin-bottom: 8px;
}
.swap-ex-reset:active { border-color: var(--text-dim); color: var(--text); }

/* ── Swap button on exercise slide ───────────────────── */
.ex-swap-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  font-family: var(--font);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
  white-space: nowrap;
}
.ex-swap-btn.is-swapped {
  border-color: rgba(99,102,241,0.4);
  color: rgba(99,102,241,0.9);
  background: rgba(99,102,241,0.08);
}
.ex-swap-btn:active { opacity: 0.7; }

/* ── Warmup video modal ──────────────────────────────── */
#wu-video-modal {
  align-items: center;
  justify-content: center;
}
.wu-video-sheet {
  background: var(--surface);
  border-radius: 16px;
  width: calc(100% - 32px);
  max-width: 480px;
  padding: 14px 16px 16px;
}
.wu-video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.wu-video-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  padding-right: 8px;
}
.wu-video-close {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-dim);
  flex-shrink: 0;
}
.wu-video-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.wu-video-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE — PETITS TÉLÉPHONES (iPhone SE, Galaxy A)
   max-height: 700px = écrans courts (667px ou moins)
   ══════════════════════════════════════════════════════ */
@media (max-height: 700px) {
  /* Header plus compact */
  .home-header { padding: 12px 16px 0; }
  .home-header-left h1 { font-size: 22px; }
  .home-header-left .home-date { font-size: 12px; }

  /* Semaine plus compact */
  .week-progress { padding: 8px 16px 6px; }
  .week-dots-section { padding: 8px 12px 10px; }

  /* Card séance */
  .next-session-card { margin: 10px 12px 0; }
  .next-session-top { padding: 12px 14px 10px; }
  .next-name { font-size: 18px !important; }
  .exercise-preview { padding: 10px 14px; }

  /* Réduire les espacements globaux */
  .next-session-card > * + * { margin-top: 0; }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE — LANDSCAPE MODE
   ══════════════════════════════════════════════════════ */
@media (orientation: landscape) and (max-height: 500px) {
  /* En landscape sur petit écran, la bottom nav devient latérale
     ou au minimum très compacte */
  #bottom-nav button { padding: 6px 0 2px; min-height: 36px; }
  .home-header { padding: 8px 16px 0; }
  .home-header-left h1 { font-size: 18px; }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE — GRANDS ÉCRANS MOBILES (iPhone Pro Max, etc.)
   ══════════════════════════════════════════════════════ */
@media (min-width: 390px) and (min-height: 844px) {
  /* Un peu plus de respiration sur les grands phones */
  .home-header { padding: 26px 20px 0; }
  .next-session-card { margin: 18px 16px 0; }
}

/* ══════════════════════════════════════════════════════
   BOUTIQUE
   ══════════════════════════════════════════════════════ */
.shop-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0 32px;
}
.shop-scroll::-webkit-scrollbar { width: 0; }

.shop-header {
  padding: 20px 16px 12px;
}
.shop-header h2 {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Bannière salle */
.gym-banner {
  margin: 0 16px 16px;
  background: linear-gradient(135deg, var(--surface2), var(--surface3));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.gym-banner-logo {
  font-size: 32px;
  width: 52px;
  height: 52px;
  background: var(--green-dim);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gym-banner-name {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text);
}
.gym-banner-sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 2px;
}

/* Catégories */
.shop-cats {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.shop-cats::-webkit-scrollbar { display: none; }
.shop-cat {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.shop-cat.active {
  background: var(--green);
  border-color: var(--green);
  color: #000;
}

/* Grille produits */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  padding: 0 12px;
}
.shop-card {
  background: var(--bg);
  border: none;
  padding: 12px 8px 16px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: opacity var(--transition);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.shop-card:active { opacity: 0.75; }
.shop-card.out-of-stock { opacity: 0.45; }

/* Image principale — carré, fond neutre comme MyProtein */
.shop-card-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
  position: relative;
}
.shop-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shop-card-emoji {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  margin-bottom: 10px;
}
.shop-card-emoji-fb {
  font-size: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Badge (Bestseller, Nouveau…) */
.shop-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--green);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Nom du produit */
.shop-card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
}

/* Prix */
.shop-card-price {
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Label vitrine (remplace bouton) */
.shop-card-cta-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}
.out-of-stock .shop-card-cta-label { color: var(--text-dim); }

/* Modal produit */
.shop-modal-sheet {
  text-align: center;
  padding: 8px 20px 32px;
}
.shop-modal-drag-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 16px;
}
.shop-modal-emoji {
  font-size: 52px;
  margin-bottom: 12px;
}
.shop-modal-name {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.shop-modal-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}
.shop-modal-price {
  font-size: var(--text-2xl);
  font-weight: 900;
  color: var(--green);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.shop-modal-close {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: var(--text-base);
  font-family: var(--font);
  cursor: pointer;
}

/* Toast */
.app-toast {
  position: fixed;
  bottom: calc(var(--nav-total) + 90px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 20px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 9000;
  box-shadow: var(--shadow);
}
.app-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Shop : photo produit ────────────────────────── */
.shop-card-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: var(--surface2);
}
.shop-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shop-card-emoji-fb {
  font-size: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Label vitrine (remplace bouton) */
.shop-card-cta-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  padding: 6px 4px 2px;
  letter-spacing: 0.02em;
}
.out-of-stock .shop-card-cta-label { color: var(--text-dim); }

/* Photo dans modal */
.shop-modal-visual { text-align: center; }
.shop-modal-img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.shop-modal-emoji {
  font-size: 52px;
  margin-bottom: 12px;
}

/* Bouton vitrine (vert doux) */
.shop-btn-available {
  background: var(--green-dim);
  border: 1px solid rgba(34,197,94,0.3);
  color: var(--green);
  font-size: var(--text-base);
  font-weight: 700;
  font-family: var(--font);
  padding: 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 100%;
  transition: all var(--transition);
}
.shop-btn-available:active { background: var(--green); color: #000; }

/* Bouton épuisé */
.shop-btn-unavailable {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font);
  padding: 14px;
  border-radius: var(--radius-sm);
  width: 100%;
  cursor: default;
}

/* ── Info sheet (sets + tech) — compact ────────── */
.info-sheet {
  text-align: left;
  padding: 8px 20px 24px;
  touch-action: none;
  transition: transform 0.25s ease;
}
.info-sheet .modal-title {
  font-size: var(--text-lg);
  margin-bottom: 14px;
}
.sets-info-body { display: flex; flex-direction: column; gap: 10px; }
.sets-info-block { display: flex; flex-direction: column; gap: 2px; }
.sets-info-term { font-size: var(--text-sm); font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: 0.06em; }
.sets-info-def { font-size: var(--text-base); color: var(--text-muted); line-height: 1.4; }
.sets-info-example { background: var(--surface2); border-radius: var(--radius-xs); padding: 10px 14px; margin-top: 4px; }
.sie-label { font-size: var(--text-xs); font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.sie-text { font-size: var(--text-base); color: var(--text-muted); }

/* ══════════════════════════════════════════════════════
   HOME — NOUVELLE UI
   ══════════════════════════════════════════════════════ */

/* Bannière promo salle */
.gym-promo-banner {
  margin: 12px 16px 0;
  background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(34,197,94,0.03));
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: default;
}
.gpb-emoji {
  font-size: 28px;
  flex-shrink: 0;
}
.gpb-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text);
}
.gpb-sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 2px;
}

/* Carte prochaine séance — compacte et cliquable */
.next-session-compact {
  display: flex;
  align-items: center;
  padding: 16px 16px 16px 20px;
  gap: 12px;
  cursor: pointer;
}
.nsc-left { flex: 1; min-width: 0; }
.nsc-arrow { color: var(--text-dim); flex-shrink: 0; }

/* Bouton voir les autres séances */
.home-sessions-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 16px 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  width: calc(100% - 32px);
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  color: var(--text);
}
.home-sessions-btn:active { background: var(--surface2); }
.hsb-content { flex: 1; min-width: 0; }
.hsb-title { display: block; font-size: var(--text-base); font-weight: 600; color: var(--text); }
.hsb-sub { display: block; font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; }

/* ── Produits boutique sur l'accueil ────────────── */
.home-shop-section {
  margin: 14px 0 0;
  padding: 0 16px;
}
.home-shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.home-shop-title {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.home-shop-more {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--green);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  padding: 0;
}
.home-shop-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  /* padding droit : dépasse légèrement pour montrer le bord de la 2e carte */
  padding: 0 16px 4px;
  margin: 0 -16px; /* annule le padding du parent pour aller bord à bord */
  -webkit-overflow-scrolling: touch;
}
.home-shop-row::-webkit-scrollbar { display: none; }

.home-shop-card {
  flex-shrink: 0;
  /* 1.6 cartes visibles → on voit le début de la suivante */
  width: calc(58vw);
  max-width: 230px;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: opacity var(--transition);
}
.home-shop-card:active { opacity: 0.75; }

/* Zone image — carré */
.hsc-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface2);
  overflow: hidden;
  position: relative;
}
.hsc-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hsc-emoji {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
}

/* Badge */
.hsc-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--green);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Infos sous l'image */
.hsc-info { padding: 10px 12px 12px; }
.hsc-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hsc-price {
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--text);
}

/* ── Modal résumé de séance ─────────────────────── */
.session-preview-sheet {
  padding: 8px 0 24px;
  touch-action: none;
  transition: transform 0.25s ease;
  /* 85vh moins la sticky CTA + nav pour que rien ne soit caché */
  max-height: calc(100vh - var(--nav-total) - 80px);
  display: flex;
  flex-direction: column;
}

/* Positionner le modal session preview au-dessus du sticky CTA */
#session-preview-modal {
  padding-bottom: calc(var(--nav-total) + 80px);
}
.sp-header {
  padding: 4px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.sp-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  margin-bottom: 4px;
}
.sp-name {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.sp-meta { font-size: var(--text-sm); color: var(--text-muted); }
.sp-muscles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.sp-muscle-chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
}
.sp-exercises {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 20px;
}
.sp-exercises::-webkit-scrollbar { width: 0; }
.sp-ex-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.sp-ex-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-dim);
}
.sp-ex-item:last-child { border-bottom: none; }
.sp-ex-sets {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  flex-shrink: 0;
  min-width: 40px;
}
.sp-ex-name { font-size: var(--text-sm); color: var(--text); }
.session-preview-sheet .btn { margin: 0 20px; width: calc(100% - 40px); flex-shrink: 0; }

/* ══════════════════════════════════════════════════════
   VUE SEMAINES — PROGRESSION
   ══════════════════════════════════════════════════════ */
#track-weeks-view { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }

.wv-week {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.wv-week.wv-current { border-color: var(--green); }
.wv-week.wv-done { opacity: 0.85; }

.wv-week-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wv-week-left { display: flex; flex-direction: column; gap: 2px; }
.wv-week-num { font-size: var(--text-md); font-weight: 700; color: var(--text); }
.wv-week-phase { font-size: var(--text-xs); color: var(--text-dim); }
.wv-week-right { display: flex; align-items: center; gap: 8px; }

.wv-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wv-done .wv-status-badge   { background: rgba(34,197,94,0.1); color: var(--green); }
.wv-current .wv-status-badge { background: rgba(34,197,94,0.15); color: var(--green); }
.wv-upcoming .wv-status-badge { background: var(--surface2); color: var(--text-dim); }

.wv-week-chevron {
  font-size: 18px;
  color: var(--text-dim);
  transition: transform 0.2s;
  line-height: 1;
}

.wv-week-sessions {
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.wv-week-sessions.hidden { display: none; }

.wv-session {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-dim);
}
.wv-session:last-child { border-bottom: none; }

.wv-session-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.wv-session-date { font-size: 11px; color: var(--text-muted); }
.wv-session-top  { font-size: 11px; color: var(--green); margin-top: 2px; }

.wv-session-done     { background: rgba(34,197,94,0.03); }
.wv-session-upcoming { background: var(--surface2); }
.wv-session-missed   { opacity: 0.6; }

/* Bouton "Ne plus me demander" */
.btn-disable-feature {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: var(--text-sm);
  font-family: var(--font);
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.btn-disable-feature:active { opacity: 0.6; }

/* Bouton vidéo démo unique — échauffement */
.wu-demo-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wu-demo-video-btn:active { background: var(--border); }
