/* « Mes Trophées »: the level band reuses .profile / .stats of « Qui suis-je ? »; only additions here. */

.ps-level-icon {
  flex: none;
  inline-size: 6rem;
  block-size: 6rem;
  object-fit: contain;
}

.ps-level .profile-id > div {
  display: grid;
  gap: 0.35rem;
  min-inline-size: 0;
}

.ps-level-progress {
  inline-size: min(100%, 16rem);
  block-size: 0.5rem;
  accent-color: var(--primary);
}

/* Chart sections: 2 per line, 3 for the « Statistiques » doughnuts on desktop; wide blocks take the whole line. */
.ps-charts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem 2rem;
}

@media (width >= 36rem) {
  .ps-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-chart-wide { grid-column: 1 / -1; }
}

@media (width >= 64rem) {
  .ps-charts-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}

.ps-chart {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  min-inline-size: 0;
  gap: 0.6rem;
}

.ps-chart h3 { margin: 0; }

/* Chart.js needs a sized, positioned box (maintainAspectRatio: false). */
.ps-chart-canvas {
  position: relative;
  min-inline-size: 0;
  block-size: 16rem;
}

.ps-chart-donut { block-size: 15rem; }

/* Calendar: one row per year (newest first), one cell per month. */
.ps-calendar-scroll { overflow-x: auto; }

.ps-calendar {
  display: grid;
  grid-template-columns: 3rem repeat(12, minmax(1.5rem, 1fr));
  gap: 3px;
  align-items: center;
  min-inline-size: 24rem;
}

.ps-calendar-head {
  color: var(--text-muted);
  font-size: var(--step--1);
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.ps-month {
  display: inline-block;
  block-size: 1.1rem;
  border-radius: 2px;
  background: var(--surface-2);
}

.ps-month-none { background: transparent; }
.ps-month-1 { background: color-mix(in oklch, var(--primary) 30%, var(--surface-2)); }
.ps-month-2 { background: color-mix(in oklch, var(--primary) 55%, var(--surface-2)); }
.ps-month-3 { background: color-mix(in oklch, var(--primary) 80%, var(--surface-2)); }
.ps-month-4 { background: var(--primary); }

.ps-calendar-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin: 0;
  color: var(--text-muted);
  font-size: var(--step--1);
}

.ps-calendar-legend .ps-month { inline-size: 1.1rem; }

.ps-rarest td,
.ps-platinum-list td { vertical-align: middle; }

.ps-platinums[aria-busy="true"] { opacity: 0.6; }
.ps-platinums:focus { outline: none; }

.ps-trophy-icon {
  display: block;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  border-radius: 2px;
  object-fit: cover;
}

.ps-podium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 0.5rem 1.5rem;
  font-size: var(--step--1);
}

.ps-podium-title { margin: 0; font-weight: 700; }
.ps-podium ol { margin: 0.25rem 0 0; padding-inline-start: 1.25rem; }

/* « Jeux à terminer »: the list scrolls in its box; the header (site table colours) stays visible. */
.ps-unfinished-scroll {
  max-block-size: 32rem;
  overflow: auto;
}

.ps-unfinished thead th {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
}

.ps-unfinished progress {
  display: block;
  inline-size: 100%;
  min-inline-size: 5rem;
  block-size: 0.5rem;
  accent-color: var(--primary);
}

.ps-unfinished td small { color: var(--text-muted); }

.ps-remaining {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.6rem;
  font-size: var(--step--1);
}

.ps-grade-platinum { color: var(--ps-platinum); }
.ps-grade-gold { color: var(--ps-gold); }
.ps-grade-silver { color: var(--ps-silver); }
.ps-grade-bronze { color: var(--ps-bronze); }
