/* Écrans « Programmes » : liste et détail (préfixe pg-). */

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

/* ───────── Liste ───────── */

.pg-list { display: flex; flex-direction: column; gap: 12px; }
.pg-list > .card + .card { margin-top: 0; }

.pg-card { position: relative; overflow: hidden; padding: 16px 16px 16px 20px; }
.pg-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--pg-level, var(--accent));
}
.pg-card.is-active { border-color: rgba(255, 107, 74, 0.35); }
.pg-card-top { display: flex; align-items: center; gap: 8px; }
.pg-chev { margin-left: auto; color: var(--faint); }
.pg-card-name { margin-top: 10px; font-size: 22px; font-weight: 760; }
.pg-card-tagline { margin-top: 4px; font-size: 15px; color: var(--muted); }
.pg-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
}
.pg-meta { display: inline-flex; align-items: center; gap: 6px; }
.pg-meta .icon { color: var(--faint); }
.pg-card-equip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
.pg-card-equip .icon { margin-top: 1px; color: var(--faint); }
.pg-card-progress { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pg-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.pg-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 44px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
.pg-foot .accent { font-weight: 650; }
.pg-foot .icon { color: var(--accent); }

/* ───────── Détail : présentation ───────── */

.pg-hero { padding-top: 4px; }
.pg-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.pg-hero-name { margin-top: 10px; }
.pg-hero-tagline { margin-top: 2px; font-size: 17px; font-weight: 600; }
.pg-hero-desc { margin-top: 10px; font-size: 15px; color: var(--muted); }

.pg-stats { margin-top: 18px; }
.pg-stat .stat-value { white-space: nowrap; }
.pg-stat-prefix { margin-right: 3px; font-size: 18px; font-weight: 650; color: var(--muted); }

.pg-equip { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-equip-item {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
}

/* ───────── Détail : suivi ───────── */

.pg-status { margin-top: 24px; }
.pg-status-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.pg-status-title { font-size: 17px; font-weight: 750; }
.pg-status-sub { margin-top: 2px; font-size: 14px; color: var(--muted); }
.pg-status-count {
  flex: none;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 780;
  line-height: 1;
  letter-spacing: -0.02em;
}
.pg-status-count span { font-size: 15px; font-weight: 650; color: var(--muted); letter-spacing: 0; }
.pg-status-since { margin-top: 8px; font-size: 13px; color: var(--faint); }
.pg-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;
}
.pg-status-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

.pg-start { margin-top: 24px; }
.pg-start-note { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: center; }

/* ───────── Détail : semaines repliables ───────── */

.pg-week {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.pg-week + .pg-week { margin-top: 10px; }
.pg-week.is-current { border-color: rgba(255, 107, 74, 0.35); }
.pg-week-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  padding: 12px 14px 12px 16px;
  border: 0;
  background: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.pg-week-head:active { background: var(--surface-2); }
.pg-week-title { display: block; font-size: 16px; font-weight: 700; }
.pg-week-sub { display: block; font-size: 13px; color: var(--muted); }
.pg-week-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
}
.pg-week-chev { color: var(--faint); transition: transform 0.2s ease; }
.pg-week.open .pg-week-chev { transform: rotate(90deg); }

.pg-week-body { display: flex; flex-direction: column; gap: 10px; padding: 0 10px 10px; }
.pg-week-body[hidden] { display: none; }

/* ───────── Détail : séances ───────── */

.pg-day {
  padding: 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.pg-day.is-next {
  border-color: rgba(255, 107, 74, 0.45);
  background: linear-gradient(145deg, #2a1712 0%, var(--surface-2) 70%);
}
.pg-day-head { display: flex; align-items: center; gap: 12px; }
.pg-day-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.pg-day.is-done .pg-day-mark { background: var(--ok-soft); color: var(--ok); }
.pg-day.is-next .pg-day-mark { background: var(--accent); color: #1a0d08; }
.pg-day-title { font-size: 16px; font-weight: 700; }
.pg-day.is-done .pg-day-title { color: var(--muted); }
.pg-day-sub { font-size: 13px; color: var(--muted); }

.pg-ex-list { list-style: none; margin: 10px 0 0; padding: 0; }
.pg-ex {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.pg-ex-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 550; }
.pg-ex-target { flex: none; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pg-ex-chev { color: var(--faint); }
.pg-ex:active .pg-ex-name { color: var(--accent); }

.pg-day-actions { margin-top: 12px; }
.pg-day-btn { min-height: 46px; font-size: 15px; }
.pg-day .btn-secondary { background: var(--surface-3); }
.pg-day-note { margin-top: 6px; font-size: 12px; color: var(--faint); text-align: center; }

@media (hover: hover) {
  .pg-week-head:hover { background: var(--surface-2); }
  .pg-ex:hover .pg-ex-name { color: var(--accent); }
  .pg-foot:hover .accent { text-decoration: underline; }
}
