/* ============================================================
   STREET FORGE — Thème sombre, accents néon
   ============================================================ */

:root {
  --bg:           #0b0d10;
  --bg-elev-1:   #14181d;
  --bg-elev-2:   #1c2128;
  --bg-elev-3:   #262d36;
  --border:      #2b333d;
  --text:        #e8edf2;
  --text-dim:    #8d96a3;
  --text-muted:  #5b6471;
  --accent:      #d4ff3b;      /* vert néon */
  --accent-2:    #ff6b1a;      /* orange feu */
  --success:     #4dff88;
  --danger:      #ff4d4d;
  --warning:     #ffc24d;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow-neon: 0 0 0 1px rgba(212, 255, 59, 0.35), 0 0 24px rgba(212, 255, 59, 0.18);
  --font:        'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
}

body {
  background:
    radial-gradient(1200px 800px at 20% -10%, rgba(212, 255, 59, 0.06), transparent 60%),
    radial-gradient(1000px 700px at 110% 10%, rgba(255, 107, 26, 0.05), transparent 60%),
    var(--bg);
}

/* ====== TOPBAR ====== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px;
  background: rgba(20, 24, 29, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand .logo { font-size: 32px; filter: drop-shadow(0 0 8px var(--accent)); }
.brand h1 { margin: 0; font-size: 22px; letter-spacing: 4px; font-weight: 900; text-transform: uppercase; }
.brand .accent { color: var(--accent); text-shadow: 0 0 12px rgba(212, 255, 59, 0.55); }
.brand .tagline { margin: 2px 0 0; color: var(--text-dim); font-size: 12px; letter-spacing: 1px; }

.global-progress { flex: 1; max-width: 360px; min-width: 200px; }

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.progress-label #globalPercent { color: var(--accent); font-weight: 700; }

.progress-bar {
  height: 8px;
  background: var(--bg-elev-2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.4s ease;
  box-shadow: 0 0 12px rgba(212, 255, 59, 0.4);
}

.topbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ====== LAYOUT ====== */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 24px 28px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 12px;
  font-weight: 700;
}

/* ====== SIDEBAR ====== */
.sidebar { position: sticky; top: 92px; height: fit-content; }

.levels-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.level-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.18s ease;
}

.level-item:hover { border-color: var(--accent); transform: translateX(2px); }
.level-item.active { background: var(--bg-elev-2); border-color: var(--accent); box-shadow: var(--shadow-neon); }
.level-item.locked { opacity: 0.55; cursor: not-allowed; }
.level-item.locked:hover { border-color: var(--border); transform: none; }

.belt-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4);
}

.level-item-text { flex: 1; min-width: 0; }
.level-item-name { font-weight: 700; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; }
.level-item-meta { font-size: 11px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }

.level-item-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-elev-3);
  color: var(--text-dim);
  letter-spacing: 1px;
}

.level-item-badge.done { background: rgba(77, 255, 136, 0.15); color: var(--success); }
.level-item-badge.in-progress { background: rgba(255, 194, 77, 0.15); color: var(--warning); }

/* ====== CONTENT ====== */
.content { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.next-step-banner {
  background: linear-gradient(135deg, rgba(212, 255, 59, 0.12), rgba(255, 107, 26, 0.08));
  border: 1px solid rgba(212, 255, 59, 0.35);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.banner-label { font-size: 11px; letter-spacing: 3px; color: var(--accent); font-weight: 700; }
.banner-content { font-size: 17px; font-weight: 600; color: var(--text); line-height: 1.4; }
.banner-content strong { color: var(--accent); }

/* ====== LEVEL HEADER ====== */
.level-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.level-name-row { display: flex; align-items: center; gap: 12px; }

.belt-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 12px currentColor;
}

.level-header h2 { margin: 0; font-size: 24px; text-transform: uppercase; letter-spacing: 2px; }
.level-subtitle { font-size: 13px; color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; }
.level-description { margin: 8px 0 0; color: var(--text-dim); font-size: 14px; max-width: 520px; }

.level-stats { display: flex; gap: 18px; }
.stat { text-align: center; padding: 8px 14px; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: var(--radius); min-width: 70px; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-label { font-size: 10px; letter-spacing: 2px; color: var(--text-dim); text-transform: uppercase; margin-top: 4px; }

/* ====== MUSCLES GRID ====== */
.muscles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.muscle-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.muscle-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
}

.muscle-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
  color: #000;
}

.muscle-card-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.muscle-card-count { margin-left: auto; font-size: 12px; color: var(--text-dim); }

.exercise-list { list-style: none; margin: 0; padding: 0; }

.exercise {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.exercise:last-child { border-bottom: none; }
.exercise.next-step { background: rgba(212, 255, 59, 0.06); border-left: 3px solid var(--accent); }
.exercise.validated { opacity: 0.65; }
.exercise.regression-ready::after {
  content: '✦ Prêt à tenter !';
  font-size: 10px;
  color: var(--accent-2);
  font-weight: 700;
  letter-spacing: 1px;
  margin-left: 8px;
}

.exercise-check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--bg);
  font-weight: 900;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.exercise-check:hover { border-color: var(--accent); }
.exercise-check.checked { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px rgba(212, 255, 59, 0.5); }

.exercise-body { flex: 1; min-width: 0; }
.exercise-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }

.exercise-meta {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.exercise-target { color: var(--accent); font-weight: 600; }
.exercise-tip { font-size: 11px; color: var(--text-muted); font-style: italic; margin-top: 2px; }

.regression-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--accent-2);
  background: rgba(255, 107, 26, 0.12);
  border: 1px solid rgba(255, 107, 26, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.exercise-actions { display: flex; gap: 6px; flex-shrink: 0; }

.btn-icon {
  background: var(--bg-elev-3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: all 0.15s ease;
}

.btn-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon.timer { color: var(--accent-2); }

.exercise-last { font-size: 11px; color: var(--text-muted); }

/* ====== EXAM ====== */
.exam-card {
  background:
    linear-gradient(135deg, rgba(255, 107, 26, 0.08), rgba(212, 255, 59, 0.04)),
    var(--bg-elev-1);
  border: 1px solid var(--accent-2);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}

.exam-card.locked { opacity: 0.6; border-color: var(--border); background: var(--bg-elev-1); }
.exam-card.passed { border-color: var(--success); background: linear-gradient(135deg, rgba(77, 255, 136, 0.12), transparent), var(--bg-elev-1); }

.exam-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.exam-header h3 { margin: 0; font-size: 18px; text-transform: uppercase; letter-spacing: 2px; color: var(--accent-2); }
.exam-card.passed .exam-header h3 { color: var(--success); }
.exam-card.locked .exam-header h3 { color: var(--text-dim); }

.exam-status { font-size: 11px; padding: 4px 10px; border-radius: 4px; letter-spacing: 2px; background: var(--bg-elev-3); color: var(--text-dim); }
.exam-card:not(.locked):not(.passed) .exam-status { background: var(--accent-2); color: #000; }
.exam-card.passed .exam-status { background: var(--success); color: #000; }

.exam-requirements { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.exam-requirements li { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; }
.exam-requirements li::before { content: '▸'; color: var(--accent-2); font-weight: 800; }
.exam-card.passed .exam-requirements li::before { color: var(--success); }

/* ====== BUTTONS ====== */
.btn-primary {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
}

.btn-primary:hover:not(:disabled) { background: var(--accent-2); color: #fff; box-shadow: 0 0 16px rgba(255, 107, 26, 0.5); }
.btn-primary:disabled { background: var(--bg-elev-3); color: var(--text-muted); cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.15s ease;
}

.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }
.btn-ghost.small { padding: 4px 10px; font-size: 11px; }
.btn-ghost.danger:hover { color: var(--danger); border-color: var(--danger); }

/* ====== HISTORY ====== */
.history-section {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
}

.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.history-header h3 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-dim); }

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-list::-webkit-scrollbar { width: 6px; }
.history-list::-webkit-scrollbar-thumb { background: var(--bg-elev-3); border-radius: 3px; }

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-elev-2);
  border-radius: 6px;
  border-left: 2px solid var(--accent);
  font-size: 13px;
}

.history-date { font-size: 11px; color: var(--text-dim); font-family: monospace; white-space: nowrap; }
.history-ex { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.history-value { font-size: 12px; color: var(--accent); font-weight: 700; white-space: nowrap; }

.history-empty { text-align: center; color: var(--text-muted); padding: 24px; font-style: italic; font-size: 13px; }

/* ====== MODAL — base ====== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--bg-elev-1);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-neon);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-large { max-width: 720px; }
.modal-timer { max-width: 380px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-elev-1);
  z-index: 1;
}

.modal-header h3 { margin: 0; font-size: 14px; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); }

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.modal-close:hover { color: var(--accent); }

.modal-body { padding: 22px; }
.modal-ex-name { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.modal-target { margin: 0 0 20px; color: var(--accent); font-size: 13px; font-weight: 600; }

.modal-body label {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin: 12px 0 4px;
}

.modal-body input[type="number"], .modal-body select {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.modal-body input[type="number"]:focus, .modal-body select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(212, 255, 59, 0.2);
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin-top: 18px !important;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--text) !important;
  font-size: 13px !important;
}

.checkbox-row input { width: auto !important; cursor: pointer; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
}

/* ====== ENTRY TABS (principal / régression) ====== */
.entry-tabs, .timer-mode-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  background: var(--bg-elev-2);
  padding: 4px;
  border-radius: 8px;
}

.tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.15s ease;
}

.tab.active { background: var(--accent); color: #000; }
.tab:not(.active):hover { color: var(--text); }

.entry-regression-info {
  background: rgba(255, 107, 26, 0.08);
  border: 1px solid rgba(255, 107, 26, 0.25);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px;
}

.entry-regression-info strong { color: var(--accent-2); }

/* ====== DETAILS MODAL ====== */
.details-body { padding: 0 22px 22px; }

.details-muscle {
  display: inline-block;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
  font-weight: 800;
  color: #000;
  margin: 14px 0 10px;
}

.details-section { margin-top: 22px; }
.details-section h4 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

.details-target { font-size: 16px; font-weight: 700; color: var(--text); margin: 0; }

.details-execution, .details-mistakes {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.details-execution li { padding-left: 4px; margin-bottom: 4px; }
.details-mistakes li { padding-left: 4px; margin-bottom: 4px; color: var(--text); }
.details-mistakes li::marker { color: var(--danger); }

.regression-card {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-2);
  border-radius: 8px;
  padding: 14px 16px;
}

.regression-name { font-weight: 700; font-size: 15px; color: var(--text); }
.regression-target { color: var(--accent); font-size: 13px; font-weight: 600; margin-top: 4px; }
.regression-tip { font-size: 12px; color: var(--text-dim); font-style: italic; margin-top: 6px; }
.regression-threshold {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--accent-2);
  font-weight: 600;
}

.details-video-hint { font-size: 12px; color: var(--text-dim); margin: 0 0 12px; }
.video-link { display: inline-block; text-decoration: none; }

/* ====== TIMER ====== */
.timer-body { text-align: center; padding: 28px 22px; }

.timer-display {
  font-size: 64px;
  font-weight: 900;
  font-family: 'Courier New', monospace;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(212, 255, 59, 0.6);
  margin: 18px 0 6px;
  letter-spacing: 4px;
}

.timer-display.running { animation: pulse 1s ease-in-out infinite; }
.timer-display.done { color: var(--accent-2); text-shadow: 0 0 20px rgba(255, 107, 26, 0.7); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.timer-target { font-size: 12px; color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 22px; }

.timer-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-bottom: 14px;
}

/* ====== CHART ====== */
.chart-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.chart-toolbar label { margin: 0 !important; color: var(--text) !important; text-transform: none !important; letter-spacing: 0 !important; font-size: 13px !important; }
.chart-toolbar select { flex: 1; max-width: 280px; }

#progressChart {
  width: 100%;
  height: 320px;
  background: var(--bg-elev-2);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.chart-legend { margin-top: 12px; font-size: 12px; color: var(--text-dim); text-align: center; }

/* ====== SESSION ====== */
.session-intro { color: var(--text-dim); font-size: 13px; margin: 0 0 14px; }

.session-focus-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px;
  background: var(--bg-elev-2);
  border-radius: 10px;
}

.focus-tab {
  flex: 1 1 auto;
  min-width: 90px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.focus-tab:not(.active):hover {
  color: var(--text);
  border-color: var(--border);
}

.focus-tab.active {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 12px rgba(212, 255, 59, 0.35);
}

.session-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.session-list li {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.session-list .ses-tag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  color: #000;
  font-weight: 800;
  letter-spacing: 1px;
}

.session-list .ses-name { flex: 1; font-weight: 600; }
.session-list .ses-target { color: var(--accent); font-size: 12px; font-weight: 700; }

.session-meta {
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 18px;
  padding: 10px;
  background: var(--bg-elev-2);
  border-radius: 8px;
}

.session-meta strong { color: var(--accent); }

/* ====== STREAK / TODAY PILL ====== */
.streak-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.streak-pill, .today-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-2);
  letter-spacing: 0.5px;
}
.today-pill { color: var(--accent); }

/* ====== CUSTOM EXERCISES SECTION ====== */
.custom-section {
  background: var(--bg-elev-1);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}
.custom-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.custom-header h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-dim); }
.custom-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.custom-list .exercise { background: var(--bg-elev-2); border-radius: 8px; border-bottom: none; }
.custom-list .custom-empty { color: var(--text-muted); text-align: center; padding: 10px; font-style: italic; font-size: 12px; }

/* ====== TOAST ====== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
  pointer-events: none;
}
.toast {
  background: var(--bg-elev-2);
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--text);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(212, 255, 59, 0.25);
  min-width: 280px;
  max-width: 380px;
  animation: toast-in 0.3s ease;
  pointer-events: all;
}
.toast.pr { border-left-color: var(--accent-2); }
.toast.pr .toast-title { color: var(--accent-2); }
.toast-title { font-weight: 800; font-size: 13px; letter-spacing: 1px; color: var(--accent); margin-bottom: 4px; }
.toast-body { font-size: 13px; color: var(--text); line-height: 1.4; }

@keyframes toast-in {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ====== ACTIVE SESSION OVERLAY (plein écran) ====== */
.active-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 150;
  display: flex;
  flex-direction: column;
}
.active-overlay[hidden] { display: none; }

.active-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev-1);
}
.active-progress {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--accent);
  white-space: nowrap;
}
.active-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-elev-2);
  border-radius: 999px;
  overflow: hidden;
}
.active-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.4s ease;
}

.active-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.active-phase {
  text-align: center;
  max-width: 600px;
  width: 100%;
  animation: fade-in 0.25s ease;
}
.active-phase[hidden] { display: none !important; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.active-phase-label {
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 12px;
}
.active-phase-label.rest { color: var(--accent-2); }

.active-phase-title {
  font-size: 32px;
  font-weight: 900;
  margin: 0 0 8px;
  line-height: 1.2;
}

.active-phase-tip {
  color: var(--text-dim);
  font-size: 15px;
  font-style: italic;
  margin: 0 0 20px;
}

.active-target {
  display: inline-block;
  background: var(--bg-elev-2);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 20px;
}

.active-set-counter {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
}
.active-set-counter span { color: var(--accent); font-size: 28px; }

.active-timer {
  font-family: 'Courier New', monospace;
  font-size: 56px;
  font-weight: 900;
  color: var(--accent);
  text-shadow: 0 0 16px rgba(212, 255, 59, 0.5);
  margin: 14px 0 22px;
  letter-spacing: 4px;
}
.active-timer.big {
  font-size: 96px;
  color: var(--accent-2);
  text-shadow: 0 0 24px rgba(255, 107, 26, 0.6);
}

.active-rest-next {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 22px;
}
.active-rest-next strong { color: var(--text); }

.active-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary.big {
  padding: 18px 36px;
  font-size: 16px;
  letter-spacing: 3px;
}

.skip-link {
  display: block;
  margin: 18px auto 0;
}

.active-done-emoji { font-size: 80px; margin-bottom: 10px; }

.active-summary {
  background: var(--bg-elev-2);
  border-radius: 12px;
  padding: 18px 24px;
  margin: 22px 0;
  text-align: left;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.7;
}
.active-summary strong { color: var(--accent); }

/* ====== CALENDAR HEATMAP ====== */
.calendar-stats {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.cal-stat {
  flex: 1;
  text-align: center;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  min-width: 100px;
}
.cal-stat-value { font-size: 28px; font-weight: 900; color: var(--accent); line-height: 1; }
.cal-stat-label { font-size: 10px; letter-spacing: 1px; color: var(--text-dim); text-transform: uppercase; margin-top: 6px; }

.calendar-heatmap {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 4px;
  margin: 12px 0;
}
.cal-cell {
  aspect-ratio: 1;
  background: var(--bg-elev-2);
  border-radius: 3px;
  display: inline-block;
  min-width: 14px;
}
.cal-cell.c0 { background: var(--bg-elev-2); }
.cal-cell.c1 { background: rgba(212, 255, 59, 0.25); }
.cal-cell.c2 { background: rgba(212, 255, 59, 0.55); }
.cal-cell.c3 { background: rgba(212, 255, 59, 0.9); box-shadow: 0 0 6px rgba(212, 255, 59, 0.5); }

.calendar-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 12px;
}
.calendar-legend .cal-cell { width: 14px; height: 14px; }

/* ====== SUIVI CORPOREL ====== */
.body-form { background: var(--bg-elev-2); padding: 16px; border-radius: 10px; margin-bottom: 18px; }
.body-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.body-h4 { margin: 18px 0 10px; font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 2px; }

#bodyChart, #progressChart { display: block; width: 100%; background: var(--bg-elev-2); border-radius: 8px; }

.body-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.body-list li {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--bg-elev-2);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  border-left: 2px solid var(--accent);
}
.body-list .b-date { color: var(--text-dim); font-family: monospace; white-space: nowrap; }
.body-list .b-stats { flex: 1; color: var(--text); }
.body-list .b-photo { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; }

/* ====== PROGRAMME HEBDO ====== */
.program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.program-day {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}
.program-day.today { border-color: var(--accent); box-shadow: 0 0 12px rgba(212, 255, 59, 0.3); }
.program-day-name { font-size: 12px; font-weight: 800; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 8px; text-transform: uppercase; }
.program-day select {
  width: 100%;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
}
.program-hint { color: var(--text-muted); font-size: 12px; font-style: italic; margin: 0; }

/* ====== GLOSSAIRE ====== */
.search-input {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 14px;
  font-family: inherit;
}
.search-input:focus { outline: none; border-color: var(--accent); }

.glossary-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.glossary-list li {
  background: var(--bg-elev-2);
  padding: 12px 14px;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}
.glossary-term { font-weight: 800; color: var(--accent); font-size: 14px; margin-bottom: 4px; }
.glossary-def { color: var(--text); font-size: 13px; line-height: 1.5; }

/* ====== PR BLOCK in details ====== */
.pr-content { font-size: 14px; color: var(--text); }
.pr-content .pr-line { display: flex; gap: 12px; align-items: center; padding: 4px 0; }
.pr-content .pr-value { color: var(--accent); font-weight: 800; }

/* ====== SESSION ACTIONS ====== */
.session-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.session-actions .btn-primary { flex: 1; min-width: 180px; }

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .topbar { flex-wrap: wrap; }
  .global-progress { order: 3; max-width: 100%; width: 100%; }
  .level-header { flex-direction: column; }
  .level-stats { width: 100%; justify-content: space-around; }
  .topbar-actions { width: 100%; justify-content: flex-start; }
}
