/* ═══════════════════════════════════════════════════════════════════════
   TRAININGPIXEL — profil.css
   Styles spécifiques à la page Profil
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Layout global : pas de padding-top sur main, le hero gère ça ── */
.profil-main { padding-top: 0; }

/* ══════════════════════════════════════════════════════════
   HERO PROFIL — écrase les styles .section pour lui
══════════════════════════════════════════════════════════ */
.profil-hero.section {
  padding: var(--header-h) 0 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.profil-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 80% at 18% 55%, rgba(124,58,237,0.13) 0%, transparent 58%),
    radial-gradient(ellipse 45% 55% at 82% 30%, rgba(6,182,212,0.07) 0%, transparent 52%),
    linear-gradient(rgba(124,58,237,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.03) 1px, transparent 1px);
  background-size: auto, auto, 52px 52px, 52px 52px;
  pointer-events: none;
}

.profil-hero-inner {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 48px 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ── Colonnes latérales hero ── */
.ph-side-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ph-side-right {
  align-items: flex-end;
}

.ph-side-right .ph-action-btns {
  flex-direction: column;
  align-items: stretch;
  padding-top: 0;
  gap: 8px;
}

/* ── Colonne centrale hero ── */
.ph-center-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.ph-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

/* ── Stats verticales (boîte) ── */
.ph-stat-vert {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  width: 100%;
}

.ph-sv-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ph-sv-val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.ph-sv-label {
  font-size: 0.63rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.ph-sv-sep {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}

/* ── Titre de la page hero ── */
.ph-hero-heading {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 48px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.ph-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ── XP bar pleine largeur ── */
.ph-xp-bar-wrap {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 8px 48px 0;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════════════════════
   SP-INNER — équivalent de s1-inner pour toutes les sections
   Contenu centré verticalement dans min-height: 100vh
══════════════════════════════════════════════════════════ */
.sp-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: calc(100vh - 96px);
  justify-content: center;
}

/* Suivi : override overflow pour permettre scroll interne si besoin */
#sp-suivi.section { overflow: visible; }
#sp-suivi .sp-inner {
  gap: 20px;
  justify-content: flex-start;
  padding-top: 52px;
  padding-bottom: 60px;
}

/* Toutes les sections profil : titre ancré en haut, comportement identique scroll/ancre */
#sp-apt .sp-inner,
#sp-tests .sp-inner,
#sp-prog .sp-inner {
  justify-content: flex-start;
  padding-top: 56px;
  padding-bottom: 60px;
}

/* Suivi — ligne du milieu : heatmap + récup côte à côte */
.suivi-mid-row {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: stretch;
}

.suivi-mid-row > .suivi-right {
  position: static;
}

/* Colonne gauche du mid-row : heatmap + séance empilés */
.suivi-mid-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Section 6 : contenu ancré en haut */
#sp-extra .sp-inner {
  justify-content: flex-start;
  padding-top: 52px;
  padding-bottom: 60px;
}

/* En-tête de chaque section profil */
.sp-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.sp-header .section-title { margin: 0; line-height: 1.1; white-space: nowrap; }
.sp-header > .btn-primary,
.sp-header > .btn-outline { margin-left: auto; white-space: nowrap; }

/* Groupe d'actions dans le header section (poussé à droite) */
.sp-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Lien action inline dans les colonnes contenu */
.col-action-link {
  font-size: 0.68rem;
  color: var(--purple-light);
  text-decoration: none;
  opacity: 0.75;
  white-space: nowrap;
  transition: opacity var(--transition);
}
.col-action-link:hover { opacity: 1; text-decoration: underline; }

/* En-tête colonne avec titre + lien */
.athlete-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.athlete-col-header .athlete-col-title { margin-bottom: 0; }

/* En-tête bloc delta avec lien */
.delta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

/* Score + lien classement */
.score-classement-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════
   HERO — Avatar et infos
══════════════════════════════════════════════════════════ */
.ph-avatar-bloc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ph-avatar-stage {
  position: relative;
  width: 180px;
  height: 260px;
}

.ph-avatar-tabs { width: 100%; }

.ph-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ph-toprow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.ph-name-block { display: flex; flex-direction: column; gap: 4px; }

.ph-pixel-badge {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--purple-light);
  display: inline-block;
  margin-bottom: 2px;
}

.ph-name {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.ph-type {
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-display);
}

.ph-action-btns {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 8px;
}

/* Quick stats */
.ph-quick-stats {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 0;
  flex-wrap: wrap;
}

.ph-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 0 14px;
  flex: 1;
  min-width: 70px;
}

.ph-stat-val {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}

.ph-stat-label {
  font-size: 0.67rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.ph-stat-sep {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* XP Bar */
.ph-xp-section { display: flex; flex-direction: column; gap: 6px; }

.ph-xp-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.ph-xp-level { font-weight: 600; color: var(--purple-light); }

.ph-xp-track {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}

.ph-xp-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--purple), var(--magenta));
  border-radius: 99px;
  box-shadow: 0 0 12px rgba(124,58,237,0.5);
  transition: width 1.4s cubic-bezier(0.4,0,0.2,1);
}
.ph-xp-fill.animated { width: 64%; }

/* Meta tags */
.ph-meta-tags { display: flex; gap: 10px; flex-wrap: wrap; }

.ph-meta-tag {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-card);
}

/* ══════════════════════════════════════════════════════════
   SECTION CARACTÉRISTIQUES (sp-apt)
══════════════════════════════════════════════════════════ */

.apt-card {
  padding: 28px 24px;
}

.apt-layout {
  display: grid;
  grid-template-columns: 1fr 280px 1fr;
  gap: 28px;
  align-items: start;
}

/* Col centre radar */
.apt-radar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.apt-radar-tabs {
  display: flex;
  gap: 3px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px;
  width: 100%;
}

.apt-rtab {
  flex: 1;
  padding: 5px 0;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
  text-align: center;
}
.apt-rtab.active { background: var(--purple); color: #fff; box-shadow: 0 0 14px var(--glow-p); }
.apt-rtab:hover:not(.active) { color: var(--text); }

/* Radar SVG */
.apt-radar-wrap { width: 100%; max-width: 280px; position: relative; }

.radar-svg { width: 100%; height: auto; overflow: visible; }

.radar-poly {
  transition: all 0.6s cubic-bezier(0.4,0,0.2,1);
  transform-origin: 120px 120px;
  animation: radarPulse 4s ease-in-out infinite;
}

@keyframes radarPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(124,58,237,0.4)); }
  50%       { filter: drop-shadow(0 0 14px rgba(236,72,153,0.5)); }
}

.radar-dot {
  transition: r 0.3s;
  animation: radarDotPulse 3s ease-in-out infinite;
}
@keyframes radarDotPulse {
  0%, 100% { opacity: 0.9; }
  50%       { opacity: 1; }
}

.radar-prev-poly { transition: opacity 0.4s; }
.radar-prev-poly.visible { opacity: 1; }

/* Delta bloc */
.apt-delta-block {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(124,58,237,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.delta-up   { color: #22c55e !important; font-weight: 700; }
.delta-down { color: #ef4444 !important; font-weight: 700; }

/* Date dernier test */
.apt-dernier-test {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  padding: 8px 10px;
  background: rgba(6,182,212,0.06);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: var(--radius-sm);
}
.apt-dt-label {
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--cyan);
}
.apt-dt-date { font-size: 0.82rem; font-weight: 600; margin-top: 2px; }

/* Titre sections historique */
.apt-history-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

/* ══════════════════════════════════════════════════════════
   SECTION MES TESTS PHYSIQUES (sp-tests)
══════════════════════════════════════════════════════════ */

.apt-history-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.apt-hist-card {
  padding: 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.apt-hist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.apt-hist-date { font-size: 0.72rem; color: var(--text-muted); }

.apt-hist-badge {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.apt-hist-current {
  border-color: var(--purple);
  color: var(--purple-light);
  background: rgba(124,58,237,0.1);
}

.apt-hist-score {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple-light), var(--magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.apt-hist-score small {
  font-size: 0.8rem;
  font-weight: 400;
  -webkit-text-fill-color: var(--text-muted);
}

.apt-hist-type { font-size: 0.8rem; font-weight: 600; }

/* Tags aptitudes dans la carte test */
.apt-hist-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.apt-hist-tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}

/* Mini bars radar preview */
.apt-hist-apt {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 40px;
}

.apt-mini-bar {
  flex: 1;
  height: var(--v, 50%);
  max-height: 40px;
  min-height: 4px;
  background: var(--c, var(--purple));
  border-radius: 2px;
  opacity: 0.75;
  display: block;
}

/* CTA card tests */
.apt-hist-cta {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(124,58,237,0.04) !important;
  border-style: dashed !important;
  gap: 12px;
}
.apt-hist-cta p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.apt-cta-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--purple-light);
  font-weight: 300;
}

/* ══════════════════════════════════════════════════════════
   SECTION PROGRAMMATION (sp-prog)
══════════════════════════════════════════════════════════ */

.prog-current {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.prog-current-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.prog-current-tag {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
  border: 1px solid rgba(6,182,212,0.3);
  padding: 2px 9px;
  border-radius: 99px;
  margin-bottom: 8px;
}

.prog-current-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.prog-current-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.prog-dot { opacity: 0.4; }

/* Progress ring */
.prog-current-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.prog-progress-ring {
  position: relative;
  width: 60px; height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prog-ring-pct {
  position: absolute;
  font-size: 0.78rem;
  font-weight: 800;
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--purple-light), var(--magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.prog-ring-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Grille 7 jours */
.prog-week-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.prog-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.prog-day {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.prog-day-name {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.today-chip {
  background: var(--purple);
  color: #fff;
  font-size: 0.55rem;
  padding: 1px 5px;
  border-radius: 99px;
  text-transform: uppercase;
}

.prog-day-card {
  width: 100%;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all var(--transition);
  cursor: default;
}
.prog-day-card--rest { opacity: 0.5; border-style: dashed; }
.prog-day-status { font-size: 0.85rem; line-height: 1; }
.prog-day-type   { font-size: 0.65rem; font-weight: 700; text-align: center; }
.prog-day-detail { font-size: 0.58rem; color: var(--text-muted); text-align: center; line-height: 1.3; }

.prog-day--done .prog-day-card    { border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.05); }
.prog-day--done .prog-day-status  { color: #22c55e; }
.prog-day--today .prog-day-card   { border-color: var(--purple); background: rgba(124,58,237,0.1); box-shadow: 0 0 20px var(--glow-p); }
.prog-day--today .prog-day-status { color: var(--purple-light); }
.prog-day--upcoming .prog-day-card{ opacity: 0.7; }
.prog-day--upcoming .prog-day-status{ color: var(--text-muted); }

/* Historique programmes */
.prog-hist-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.prog-hist-card {
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.prog-hist-info h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.prog-hist-info p  { font-size: 0.72rem; color: var(--text-muted); }
.prog-hist-result {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  background: rgba(34,197,94,0.1);
  border-radius: 99px;
  font-size: 0.65rem;
  color: #22c55e;
  font-weight: 600;
}

.prog-hist-new {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed !important;
  background: rgba(124,58,237,0.03) !important;
}

.prog-hist-buy {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed !important;
  background: rgba(6,182,212,0.03) !important;
}

.prog-buy-icon {
  border-color: rgba(6,182,212,0.4);
  color: var(--cyan);
}

/* ══════════════════════════════════════════════════════════
   SECTION SUIVI (sp-suivi)
══════════════════════════════════════════════════════════ */

.suivi-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.suivi-metric {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.suivi-metric-val {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
}
.suivi-metric-label { font-size: 0.72rem; font-weight: 600; margin-top: 2px; }
.suivi-metric-sub   { font-size: 0.6rem; color: var(--text-muted); }

/* Heatmap */
.suivi-heatmap-wrap { padding: 14px 16px; }

.suivi-heatmap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.suivi-heatmap-header h3 { font-size: 0.82rem; font-weight: 600; }

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--text-muted);
}
.heatmap-legend-cells { display: flex; gap: 3px; }
.hmap-cell {
  width: 12px; height: 12px;
  border-radius: 2px;
  background: rgba(124,58,237, var(--intensity, 0.1));
}

.suivi-heatmap {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.hmap-week   { display: flex; flex-direction: column; gap: 3px; }
.hmap-day {
  width: 11px; height: 11px;
  border-radius: 2px;
  background: rgba(124,58,237, var(--i, 0));
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
  flex-shrink: 0;
}
.hmap-day:hover { transform: scale(1.4); box-shadow: 0 0 6px rgba(124,58,237,0.6); }

/* Sessions */
.suivi-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.session-card {
  padding: 11px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.session-header { display: flex; align-items: center; gap: 14px; }
.session-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(124,58,237, 0.15);
  border: 1px solid rgba(124,58,237, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--sc, var(--purple));
  flex-shrink: 0;
}
.session-meta { flex: 1; }
.session-meta h4   { font-size: 0.85rem; font-weight: 600; margin-bottom: 1px; }
.session-meta span { font-size: 0.68rem; color: var(--text-muted); }
.session-duration {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-muted);
  line-height: 1;
  flex-shrink: 0;
}
.session-duration small { font-size: 0.62rem; font-weight: 400; }

.session-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.session-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
  border-right: 1px solid var(--border);
}
.session-stat:first-child { padding-left: 0; }
.session-stat:last-child  { border-right: none; }
.session-stat span   { font-size: 0.58rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.session-stat strong { font-size: 0.82rem; font-weight: 700; }
.session-pr { color: #22c55e !important; }

/* ══════════════════════════════════════════════════════════
   SECTION NUTRITION + LEADERBOARD (sp-extra)
══════════════════════════════════════════════════════════ */

.extra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.extra-nutrition,
.extra-leaderboard {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.lb-evolution { background: rgba(124,58,237,0.05) !important; }

.lb-evol-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.78rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.lb-evol-row:last-child { border-bottom: none; }
.lb-evol-label { color: var(--text-muted); }
.lb-evol-val   { font-weight: 700; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .apt-history-grid { grid-template-columns: repeat(2, 1fr); }
  .prog-hist-grid   { grid-template-columns: repeat(2, 1fr); }
  .apt-layout { grid-template-columns: 1fr 240px 1fr; }
  .ph-section-nav { grid-template-columns: repeat(3, 1fr); }
  .ph-section-nav .ph-snav-item:nth-child(3) { border-right: none; }
  .suivi-mid-row { grid-template-columns: 1fr 300px; }
}

@media (max-width: 1000px) {
  .profil-hero-inner { grid-template-columns: 1fr auto; gap: 28px; }
  .ph-side-right { display: none; }
  .ph-avatar-stage { width: 180px; height: 280px; }
  .apt-layout  { grid-template-columns: 1fr; gap: 24px; }
  .apt-radar-col { order: -1; }
  .extra-grid  { grid-template-columns: 1fr; }
  .suivi-metrics { grid-template-columns: repeat(2, 1fr); }
  .suivi-mid-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .ph-section-nav { grid-template-columns: repeat(2, 1fr); }
  .ph-section-nav .ph-snav-item:nth-child(2) { border-right: none; }
  .ph-section-nav .ph-snav-item:nth-child(3) { border-right: 1px solid var(--border); }
  .ph-section-nav .ph-snav-item:nth-child(4) { border-right: none; }
  .suivi-mid-row { grid-template-columns: 1fr; }
  .suivi-right { position: static; }
}

@media (max-width: 768px) {
  .sp-inner { padding: 0 24px; gap: 24px; min-height: auto; }
  .profil-hero-inner { grid-template-columns: 1fr; padding: 0 24px 24px; gap: 16px; }
  .ph-side-col { display: none; }
  .profil-hero.section { padding-bottom: 0; }
  .ph-center-col { width: 100%; }
  .ph-hero-heading { padding: 0 24px 16px; }
  .suivi-mid-left { gap: 12px; }
  .suivi-mid-row { grid-template-columns: 1fr; }
  .ph-avatar-bloc { flex-direction: row; justify-content: center; }
  .ph-avatar-stage { width: 120px; height: 200px; }
  .ph-avatar-tabs { width: auto; }
  .ph-name { font-size: 2rem; }
  .ph-identity { gap: 6px; }
  .apt-history-grid { grid-template-columns: 1fr; }
  .prog-hist-grid   { grid-template-columns: 1fr; }
  .session-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .session-stat:nth-child(2) { border-right: none; }
  .session-stat:nth-child(3) { padding-left: 0; }
  .suivi-metrics { grid-template-columns: repeat(2, 1fr); }
  .prog-week-grid { grid-template-columns: repeat(4, 1fr); }
  .sp-header { flex-direction: column; align-items: flex-start; }
  .sp-header-actions { margin-left: 0; }
  .sp-header > .btn-primary,
  .sp-header > .btn-outline { margin-left: 0; }
  .ph-section-nav { grid-template-columns: repeat(2, 1fr); padding: 0 24px 28px; }
  .suivi-mid-row { grid-template-columns: 1fr; }
  .recup-rings { justify-content: center; }
  .ph-xp-bar-wrap { padding: 8px 24px 0; }
}

@media (max-width: 480px) {
  .suivi-metrics { grid-template-columns: 1fr 1fr; }
  .ph-section-nav { grid-template-columns: 1fr; }
  .ph-snav-item { border-right: none; border-bottom: 1px solid var(--border); }
  .ph-snav-item:last-child { border-bottom: none; }
}

/* ══════════════════════════════════════════════════════════
   HERO — BARRE DE NAVIGATION SECTIONS
══════════════════════════════════════════════════════════ */
.ph-section-nav {
  max-width: 1400px;
  width: 100%;
  margin: 12px auto 0;
  padding: 0 48px 28px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.ph-snav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  text-decoration: none;
  border-right: 1px solid var(--border);
  transition: background var(--transition);
  position: relative;
  overflow: hidden;
}

.ph-snav-item:last-child { border-right: none; }

.ph-snav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--magenta));
  opacity: 0;
  transition: opacity var(--transition);
}

.ph-snav-item:hover { background: rgba(124,58,237,0.04); }
.ph-snav-item:hover::after { opacity: 1; }

.ph-snav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ph-snav-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ph-snav-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ph-snav-val {
  font-size: 0.67rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   SECTION TESTS — Barres horizontales lisibles
══════════════════════════════════════════════════════════ */
.apt-hist-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.apt-hbar {
  display: grid;
  grid-template-columns: 62px 1fr 24px;
  align-items: center;
  gap: 7px;
}

.apt-hbar-name {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: right;
}

.apt-hbar-track {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}

.apt-hbar-fill {
  height: 100%;
  background: var(--c, var(--purple));
  border-radius: 99px;
  opacity: 0.85;
}

.apt-hbar-val {
  font-size: 0.65rem;
  font-weight: 700;
  text-align: right;
  font-family: var(--font-display);
}

/* ══════════════════════════════════════════════════════════
   SECTION SUIVI — 2 colonnes
══════════════════════════════════════════════════════════ */
.suivi-2col {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

.suivi-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Carte droite récupération */
.suivi-right {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.recup-title {
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-display);
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

/* Jauges circulaires */
.recup-rings {
  display: flex;
  justify-content: space-around;
  gap: 12px;
}

.recup-ring-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.recup-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(var(--rc, var(--purple)) var(--rp, 50%), rgba(255,255,255,0.06) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.recup-ring::after {
  content: '';
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--bg-card);
}

.recup-ring-pct {
  position: relative;
  z-index: 1;
  font-size: 0.85rem;
  font-weight: 800;
  font-family: var(--font-display);
}

.recup-ring-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 72px;
  line-height: 1.3;
}

/* Indicateurs de progression */
.recup-indicators {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.recup-ind { display: flex; flex-direction: column; gap: 5px; }

.recup-ind-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recup-ind-name {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.recup-ind-val {
  font-size: 0.73rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.recup-ind-track {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}

.recup-ind-fill {
  height: 100%;
  border-radius: 99px;
  opacity: 0.85;
}

.recup-note {
  font-size: 0.62rem;
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: auto;
}

.recup-link {
  font-size: 0.75rem;
  margin-top: -8px;
}

/* ══════════════════════════════════════════════════════════
   LIGHT MODE
══════════════════════════════════════════════════════════ */
html.light .apt-hist-cta { border-color: rgba(249,115,22,0.3) !important; }
html.light .prog-hist-new{ border-color: rgba(249,115,22,0.3) !important; }
html.light .prog-hist-buy{ border-color: rgba(6,182,212,0.3) !important; }
html.light .radar-svg text{ fill: var(--text-muted); }
html.light .recup-ring::after { background: var(--bg); }
html.light .ph-section-nav { border-top-color: var(--border); }
html.light .ph-snav-item:hover { background: rgba(124,58,237,0.06); }
