/* « Ma séance du jour » (hub) and the « Prête à X % » gauge (hub
   preparation lines, KA pack header). Theme tokens only, with fallbacks. */

.ss-card {
  position: relative;
  box-sizing: border-box;
  max-width: min(760px, 100%);
  margin: 0 auto 22px;
  padding: 16px 18px;
  border-radius: calc(var(--radius-k, 1px) * 18);
  border: 1px solid var(--primary-neon, var(--accent, #3b82f6));
  background: var(--glass-bg, var(--paper, transparent));
  box-shadow: var(--glass-shadow, none);
  color: var(--text-main, var(--ink, inherit));
  overflow: hidden;
}
.ss-card[hidden] {
  display: none;
}
.ss-card.ss-finished {
  border-color: var(--success-neon, #22c55e);
}
.ss-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.ss-main {
  flex: 1 1 260px;
  margin: 0;
  font-family: var(--font-display, inherit);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: inherit;
  overflow-wrap: anywhere;
}
a.ss-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--primary-neon, #3b82f6);
  color: var(--on-accent, #fff);
  text-decoration: none;
  text-align: center;
}
a.ss-main:hover,
a.ss-main:focus-visible {
  filter: brightness(1.08);
}
.ss-finished .ss-main {
  color: var(--success-neon, #22c55e);
}
.ss-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.ss-bar,
.rd-bar {
  position: relative;
  display: inline-block;
  width: 120px;
  max-width: 40vw;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted, #888) 25%, transparent);
  overflow: hidden;
}
.ss-bar-fill,
.rd-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: var(--primary-neon, #3b82f6);
}
.ss-finished .ss-bar-fill {
  background: var(--success-neon, #22c55e);
}
.ss-note {
  margin: 10px 0 0;
  color: var(--text-muted, inherit);
}
.ss-steps {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ss-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 8px 10px;
  border-radius: calc(var(--radius-k, 1px) * 12);
  border: 1px solid var(--glass-border, var(--line, rgba(127, 127, 127, 0.3)));
}
.ss-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--primary-neon, #3b82f6);
  font-weight: 700;
}
.ss-done .ss-mark {
  border-color: var(--success-neon, #22c55e);
  background: var(--success-neon, #22c55e);
  color: var(--on-accent, #fff);
}
.ss-text {
  display: flex;
  flex-direction: column;
  flex: 1 1 220px;
  min-width: 0;
}
.ss-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}
.ss-title {
  overflow-wrap: anywhere;
}
.ss-done .ss-title {
  text-decoration: line-through;
  opacity: 0.75;
}
.ss-subject {
  font-size: 0.8rem;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--glass-border, rgba(127, 127, 127, 0.4));
  color: var(--text-muted, inherit);
}
.ss-detail {
  font-size: 0.88rem;
  color: var(--text-muted, inherit);
  overflow-wrap: anywhere;
}
.ss-min {
  font-size: 0.85rem;
  color: var(--text-muted, inherit);
  white-space: nowrap;
}
.ss-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--primary-neon, #3b82f6);
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.ss-go:hover,
.ss-go:focus-visible {
  background: color-mix(in srgb, var(--primary-neon, #3b82f6) 18%, transparent);
}
.ss-ok {
  color: var(--success-neon, #22c55e);
  font-weight: 700;
}
@media (max-width: 520px) {
  .ss-card {
    padding: 14px 12px;
  }
  .ss-min {
    order: 3;
  }
  .ss-go {
    order: 4;
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* Small celebration once the session is done. */
.ss-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ss-burst span {
  position: absolute;
  left: calc(8% + var(--i) * 12%);
  bottom: -10px;
  font-size: 1.4rem;
  animation: ss-rise 2.2s ease-out forwards;
  animation-delay: calc(var(--i) * 70ms);
  opacity: 0;
}
@keyframes ss-rise {
  0% {
    transform: translateY(0) scale(0.6);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(-140px) scale(1.1) rotate(20deg);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ss-burst {
    display: none;
  }
}

/* « 🎯 English KA 1 · 19/10 — prête à 62 % » */
.rd-gauge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 0 0 1rem;
  padding: 8px 14px;
  border-radius: calc(var(--radius-k, 1px) * 14);
  border: 1px solid var(--glass-border, var(--line, rgba(127, 127, 127, 0.3)));
  border-left: 4px solid var(--rd-color, var(--text-muted, #888));
  background: var(--glass-bg, var(--paper, transparent));
  color: var(--text-main, var(--ink, inherit));
}
.rd-gauge[data-level="low"] {
  --rd-color: var(--secondary-neon, #ef4444);
}
.rd-gauge[data-level="mid"] {
  --rd-color: var(--warning-neon, #f59e0b);
}
.rd-gauge[data-level="high"] {
  --rd-color: var(--success-neon, #22c55e);
}
.rd-gauge .rd-bar-fill {
  background: var(--rd-color, var(--text-muted, #888));
}
.rd-head {
  flex: 1 1 240px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.rd-title {
  font-weight: 600;
}
.rd-pct {
  color: var(--rd-color, inherit);
}
.rd-weak {
  flex: 1 1 100%;
  font-size: 0.88rem;
  color: inherit;
  overflow-wrap: anywhere;
}
a.rd-weak {
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* On a hub preparation line: no frame of its own. */
.rd-gauge.rd-compact {
  flex: 1 1 100%;
  margin: 2px 0 0;
  padding: 4px 0 0;
  border: 0;
  border-top: 1px dashed
    var(--glass-border, var(--line, rgba(127, 127, 127, 0.3)));
  border-radius: 0;
  background: none;
}
.rd-compact .rd-head::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--rd-color, var(--text-muted, #888));
}

/* « Étape suivante → » on the result screens of the player: the time
   still to do and the primary button (src/session/next-ui.ts); the other
   buttons of the screen look secondary. */
.gm-cta-session {
  text-decoration: none;
}
.ss-next {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.ss-next-time {
  margin: 0;
  max-width: 34rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: var(--text-main, inherit);
  overflow-wrap: anywhere;
}
/* A séance link with nothing left in a trainer (next-ui.ts nothingToDoScreen). */
.ss-empty-title {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  color: var(--success-neon, #22c55e);
  overflow-wrap: anywhere;
}
.ss-empty-text {
  margin: 0 0 14px;
  line-height: 1.4;
  text-align: center;
  color: var(--text-main, inherit);
}
.ss-next-time[hidden] {
  display: none;
}
.ss-next .gm-cta.gm-cta-session {
  justify-content: center;
  width: min(100%, 26rem);
  min-height: 56px;
  font-size: 1.05rem;
  text-align: center;
  background: var(--primary-neon, #3b82f6);
  border-color: var(--primary-neon, #3b82f6);
  color: var(--on-accent, #fff);
}
.ss-next .gm-cta.gm-cta-session:hover,
.ss-next .gm-cta.gm-cta-session:focus-visible {
  filter: brightness(1.08);
}
.ss-next .gm-cta-session[data-state="finished"] {
  background: var(--success-neon, #22c55e);
  border-color: var(--success-neon, #22c55e);
}
.ss-next-actions > .gm-cta:not(.gm-cta-session) {
  border-color: var(--text-muted, #888);
  background: color-mix(in srgb, var(--overlay, #888) 4%, transparent);
  color: var(--text-muted, inherit);
  font-size: 0.85rem;
}
.ss-next-actions > .gm-cta:not(.gm-cta-session):hover {
  color: var(--primary-neon, inherit);
  border-color: var(--primary-neon, currentColor);
}

/* The short recap on the hub after leaving a result screen mid-séance. */
.ss-recap {
  position: relative;
  margin: 12px 0 4px;
  padding: 12px 44px 12px 14px;
  border-radius: calc(var(--radius-k, 1px) * 12);
  border: 1px dashed var(--primary-neon, #3b82f6);
  background: color-mix(in srgb, var(--primary-neon, #3b82f6) 7%, transparent);
}
.ss-recap h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}
.ss-recap ul {
  margin: 4px 0;
  padding-left: 1.2em;
}
.ss-recap p {
  margin: 4px 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.ss-recap-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted, inherit);
  font-size: 1.1rem;
  cursor: pointer;
}
.ss-recap-close:hover,
.ss-recap-close:focus-visible {
  color: var(--primary-neon, inherit);
}
.ss-recap .ss-go {
  margin-top: 6px;
}

/* Parent dashboard: « Prête à » column of the KA preparation table. */
.pd-ready-low {
  color: var(--secondary-neon, #ef4444);
}
.pd-ready-mid {
  color: var(--warning-neon, #f59e0b);
}
.pd-ready-high {
  color: var(--success-neon, #22c55e);
}
.pd-ready-weak {
  color: var(--text-muted, inherit);
}

/* A preparation step: its time today against its minutes. */
.ss-step-bar {
  width: 100%;
  max-width: 220px;
  height: 6px;
  margin-top: 4px;
}

/* Parent dashboard: « Séances du jour ». */
.pd-sd-bar {
  width: 80px;
  height: 6px;
  margin-left: 8px;
  vertical-align: middle;
}
.pd-session-steps {
  margin: 6px 0 0;
  padding-left: 1.1rem;
  list-style: none;
}
.pd-session-steps li {
  overflow-wrap: anywhere;
}
.pd-session-step-done {
  color: var(--success-neon, #22c55e);
}
.ss-hint {
  margin: 10px 0 0;
  font-size: 0.92em;
  color: var(--text-muted, inherit);
}
.ss-hint .fa-seedling,
.ss-step[data-kind="prog"] .fa-seedling {
  color: var(--success-neon, #22c55e);
}
.ss-hint-link {
  color: var(--primary-neon, #3b82f6);
  font-weight: 600;
  white-space: nowrap;
}
.ss-hint-done {
  white-space: nowrap;
}
/* Parent dashboard: « Programme d'amélioration » (src/time/programme.ts). */
.pd-programme {
  margin: 16px 0;
}
.pd-programme .fa-seedling {
  color: var(--success-neon, #22c55e);
}
.pd-programme-modules {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pd-programme-modules li {
  overflow-wrap: anywhere;
}
.pd-prog-done {
  color: var(--success-neon, #22c55e);
}
.pd-prog-current {
  font-weight: 700;
}
.pd-programme-hint {
  font-weight: 600;
}
.pd-programme-misses-summary {
  font-weight: 600;
}
.pd-miss-details {
  margin: 2px 0 6px 1.2em;
}
.pd-miss-details summary {
  cursor: pointer;
  color: var(--warning-neon, #f59e0b);
  font-weight: 600;
}
.pd-miss-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 400;
}
.pd-miss {
  border-left: 3px solid var(--warning-neon, #f59e0b);
  padding: 4px 0 4px 10px;
}
.pd-miss-fixed {
  border-left-color: var(--success-neon, #22c55e);
}
.pd-miss p {
  margin: 2px 0;
}
.pd-miss-tag {
  font-weight: 700;
  white-space: nowrap;
}
.pd-miss-fixed .pd-miss-tag {
  color: var(--success-neon, #22c55e);
}
.pd-miss-why,
.pd-miss-count {
  font-size: 0.85rem;
  color: var(--text-muted, #94a3b8);
}

/* « ⏪ Rattraper hier » / « ⏪ Rattrapage de la semaine »: optional, after
   today's steps (docs/seance-du-jour.md). */
.ss-step.ss-catchup {
  border-style: dashed;
}
.ss-catchup .ss-mark {
  border-style: dashed;
}
.ss-bonus {
  font-size: 0.75rem;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px dashed var(--warning-neon, #f59e0b);
  color: var(--warning-neon, #f59e0b);
}
