/* Écran « Aujourd'hui » (préfixe td-). */

.td-head { margin-bottom: 16px; }
.td-head .page-sub { margin-bottom: 0; }

.td-lv-1 { --td-level: var(--level-1); }
.td-lv-2 { --td-level: var(--level-2); }
.td-lv-3 { --td-level: var(--level-3); }

/* ───────── Séance en cours ───────── */

.td-live {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-color: rgba(255, 200, 87, 0.32);
  background: linear-gradient(145deg, rgba(255, 200, 87, 0.1) 0%, var(--surface) 70%);
}
.td-live-row { display: flex; align-items: center; gap: 12px; }
.td-live-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warn);
  animation: td-pulse 1.8s ease-out infinite;
}
@keyframes td-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 200, 87, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(255, 200, 87, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 200, 87, 0); }
}
.td-live-title { font-weight: 600; }
.td-live-title strong { font-weight: 750; }
.td-live-when { font-size: 13px; color: var(--muted); margin-top: 2px; }
.td-live-actions { display: flex; gap: 10px; }
.td-live-actions .btn { flex: 1; }

/* ───────── Séance du jour ───────── */

.td-hero { padding: 20px 18px 16px; }
.td-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.td-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.td-hero-prog {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  white-space: nowrap;
}
.td-hero-prog::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--td-level, var(--accent));
}
.td-hero-title { font-size: 28px; font-weight: 780; letter-spacing: -0.02em; }
.td-hero-sub { margin-top: 2px; color: var(--muted); font-weight: 550; }

.td-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.td-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
  font-weight: 650;
}
.td-meta-item .icon { color: var(--muted); }

.td-ex-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.td-ex {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.td-ex-name { min-width: 0; font-weight: 600; }
.td-ex-target { flex: none; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }

.td-adjust {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 14px;
  font-weight: 600;
}

.td-start { margin-top: 16px; }

.td-hero-foot { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.td-prog-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.td-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  flex: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}

/* ───────── Programme terminé ───────── */

.td-finished { text-align: center; padding: 24px 18px 18px; }
.td-trophy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--warn-soft);
  color: var(--warn);
}
.td-finished h2 { font-size: 24px; margin-bottom: 6px; }
.td-finished-next { margin-top: 12px; }
.td-finished-next .badge { vertical-align: 1px; }
.td-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* ───────── Choix du niveau ───────── */

.td-welcome { padding: 20px 16px 12px; }
.td-welcome h2 { font-size: 22px; }
.td-welcome-sub { margin: 4px 0 14px; }
.td-progs { display: flex; flex-direction: column; gap: 10px; }
.td-prog {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 14px 12px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.td-prog::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--td-level, var(--accent));
}
.td-prog:active { background: var(--surface-3); }
.td-prog-name { margin-top: 6px; font-size: 17px; font-weight: 720; }
.td-prog-meta { font-size: 13px; color: var(--muted); }
.td-chev { color: var(--faint); }
.td-free {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* ───────── Série de jours ───────── */

.td-streak-top { display: flex; align-items: center; gap: 14px; }
.td-flame {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--faint);
}
.td-streak.is-lit .td-flame { background: var(--accent-soft); color: var(--accent); }
.td-streak.is-lit .td-flame svg { fill: currentColor; fill-opacity: 0.22; }
.td-streak-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 780;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.td-streak-unit { font-size: 17px; font-weight: 700; }
.td-streak-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.td-streak-best { flex: none; text-align: right; }
.td-streak-best-value { font-size: 15px; font-weight: 750; }

.td-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin: 16px 0 12px;
}
.td-day { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.td-day-letter { font-size: 12px; font-weight: 700; color: var(--faint); }
.td-day-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.td-day.future .td-day-dot { background: transparent; border: 1px dashed var(--line); color: var(--faint); }
.td-day.done .td-day-dot { background: var(--accent); color: #1a0d08; }
.td-day.today .td-day-letter { color: var(--text); }
.td-day.today .td-day-dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); color: var(--text); }
.td-day.today.done .td-day-dot { color: #1a0d08; }

.td-streak-foot { display: flex; flex-direction: column; gap: 2px; }
.td-week-count { font-size: 15px; font-weight: 650; }
.td-week-count.ok { color: var(--ok); }
.td-streak-msg { font-size: 14px; color: var(--muted); }
.td-streak-rule {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--faint);
}

/* ───────── Dernière séance ───────── */

.td-last { display: block; }
.td-last:active { background: var(--surface-2); }
.td-last-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
}
.td-last-side { flex: none; text-align: right; }
.td-last-dur { font-weight: 700; }

@media (hover: hover) {
  .td-prog:hover { background: var(--surface-3); }
  .td-last:hover { background: var(--surface-2); }
  .td-link:hover, .td-free:hover { text-decoration: underline; }
}
