.sport-tab { padding: 0; height: 100%; display: flex; flex-direction: column; }

.sport-toolbar {
  display: flex; gap: .7rem; align-items: center;
  padding: .55rem .9rem;
  background: rgba(24, 24, 27, .22);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  min-height: 3.15rem;
  box-sizing: border-box;
}
.sport-toolbar .sport-title {
  color: var(--p-base);
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
}
.sport-toolbar .sport-spacer { flex: 1; }
.sport-toolbar .sport-view-label {
  color: var(--p-light);
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: .76rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  padding: .15rem .55rem;
  border: 1px solid rgba(var(--p-base-rgb), .25);
  border-radius: 4px;
  background: rgba(var(--p-base-rgb), .08);
}
.sport-toolbar .icon-btn {
  background: rgba(39, 39, 42, .45); color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px; padding: .15rem .55rem; font-size: .9rem;
  cursor: pointer;
}
.sport-toolbar .icon-btn:hover { background: rgba(var(--p-base-rgb), .18); color: var(--p-base); }

/* ===== Layout : sidebar + main ===== */
.sport-layout {
  display: grid; grid-template-columns: 240px 1fr;
  flex: 1; min-height: 0;
  transition: grid-template-columns .2s;
}
.sport-layout.sidebar-hidden { grid-template-columns: 0 1fr; }
.sport-layout.sidebar-hidden #sport-sidebar { visibility: hidden; border-right: none; }

#sport-sidebar {
  background: rgba(20, 20, 23, .25);
  border-right: 1px solid rgba(255, 255, 255, .1);
  overflow-y: auto;
  min-height: 0;
}
#sport-tree { list-style: none; margin: 0; padding: .4rem 0; }
#sport-tree .sn-item {
  display: flex; align-items: center; gap: .55rem;
  padding: .55rem .85rem;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background .12s, border-color .12s, color .12s;
  font-size: .82rem; letter-spacing: .03em;
  font-weight: 500; color: #d4d4d8;
}
#sport-tree .sn-item:hover { background: rgba(var(--p-base-rgb), .07); }
#sport-tree .sn-item.active {
  background: rgba(var(--p-glow-rgb), .12);
  box-shadow: inset 2px 0 0 var(--p-base);
}
#sport-tree .sn-item.active .sn-label { color: var(--p-base); font-weight: 600; }
#sport-tree .sn-icon {
  flex-shrink: 0; opacity: .75;
  width: 22px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--p-base);
}
#sport-tree .sn-item:hover .sn-icon { opacity: .95; }
#sport-tree .sn-item.active .sn-icon { opacity: 1; }
#sport-tree .sn-label { color: #e4e4e7; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#sport-main {
  display: flex; flex-direction: column;
  background: transparent;
  position: relative; overflow: hidden; min-height: 0;
}
#sport-main .sidebar-handle {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 12px; height: 64px;
  background: rgba(39, 39, 42, .55); color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, .08);
  border-left: none; border-radius: 0 4px 4px 0;
  cursor: pointer; font-size: .82rem;
  display: flex; align-items: center; justify-content: center;
  z-index: 5; transition: background .15s, color .15s;
}
#sport-main .sidebar-handle:hover { background: rgba(var(--p-base-rgb), .18); color: var(--p-base); }

#sport-content {
  flex: 1; overflow-y: auto;
  padding: 1rem 1.2rem;
  display: flex; flex-direction: column; gap: .85rem;
}
.sport-empty { color: #64748b; font-style: italic; text-align: center; padding: 2rem 0; }

/* ===== Card chrome .card-pri ===== */
.sport-card {
  --card-rgb: var(--p-base-rgb);
  border-radius: 8px;
  border-top:    1px solid rgba(var(--card-rgb), .4);
  border-right:  1px solid rgba(var(--card-rgb), .4);
  border-bottom: 1px solid rgba(var(--card-rgb), .4);
  border-left:   2px solid rgba(var(--card-rgb), .9);
  background:
    radial-gradient(circle at top right, rgba(var(--card-rgb), .14), transparent 60%),
    linear-gradient(135deg, rgba(var(--card-rgb), .1) 0%, rgba(var(--card-rgb), .03) 50%, rgba(24, 24, 27, .55) 100%);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  box-shadow:
    inset 8px 0 14px -8px rgba(var(--card-rgb), .55),
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 4px 18px rgba(0, 0, 0, .28);
  padding: .9rem 1.1rem;
}
.sport-card.empty-card { padding: 1.5rem 1.6rem; }
.sport-card .sn-view-title {
  margin: 0 0 .4rem;
  color: var(--p-base);
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 1rem; letter-spacing: .06em;
  text-transform: uppercase; font-weight: 600;
}
.sport-card .sn-tag {
  display: inline-block;
  font-size: .72rem; color: #94a3b8;
  font-family: 'Menlo','Consolas',monospace;
  text-transform: uppercase; letter-spacing: .12em;
  padding: .25rem .65rem;
  border: 1px dashed rgba(255, 255, 255, .18);
  border-radius: 4px;
  margin: .2rem 0 .9rem;
}
.sport-card .sn-hint { font-size: .85rem; color: #cbd5e1; line-height: 1.55; margin: 0; }
.sport-card code { background: rgba(var(--p-base-rgb), .12); padding: 0 .3rem; border-radius: 3px; font-family: 'Menlo','Consolas',monospace; font-size: .8em; }

/* ===== Heatmap ===== */
.heatmap-card { padding: 1rem 1.1rem; }
.heatmap-wrap { overflow-x: auto; padding: .25rem 0; }
.heatmap-grid { display: flex; gap: 2px; }
.hm-col { display: flex; flex-direction: column; gap: 2px; }
.hm-cell {
  width: 11px; height: 11px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .06);
}
.hm-cell.hm-empty { background: transparent; }
.hm-cell.hm-l0 { background: rgba(255, 255, 255, .04); }
.hm-cell.hm-l1 { background: rgba(var(--p-base-rgb), .35); }
.hm-cell.hm-l2 { background: rgba(var(--p-base-rgb), .55); }
.hm-cell.hm-l3 { background: rgba(var(--p-base-rgb), .8); }
.hm-cell.hm-l4 { background: rgb(var(--p-base-rgb)); box-shadow: 0 0 4px rgba(var(--p-base-rgb), .6); }
.heatmap-legend {
  display: flex; align-items: center; gap: .25rem;
  margin-top: .55rem;
  font-size: .68rem; color: #94a3b8;
  font-family: 'Menlo','Consolas',monospace;
  text-transform: uppercase; letter-spacing: .06em;
}

/* ===== Activities table ===== */
.sport-table {
  width: 100%; border-collapse: collapse;
  margin-top: .25rem; font-size: .82rem;
}
.sport-table th, .sport-table td {
  padding: .35rem .55rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.sport-table th {
  color: var(--p-light); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  font-size: .68rem;
  background: rgba(var(--p-base-rgb), .07);
}
.sport-table td { color: #d4d4d8; font-family: 'Menlo','Consolas',monospace; }
.sport-table tr.act-row:hover td { background: rgba(var(--p-base-rgb), .06); cursor: pointer; }
.act-type-pill {
  display: inline-block;
  padding: .1rem .5rem;
  border-radius: 11px;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  background: rgba(var(--ac, 148, 163, 184) / 1, .15);
  border: 1px solid var(--ac);
  color: var(--ac);
}

/* ===== Modal détail activité ===== */
.sport-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .65);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  backdrop-filter: blur(6px);
}
.sport-modal {
  position: relative;
  background: rgba(24, 24, 27, .96);
  border: 1px solid rgba(var(--p-base-rgb), .35);
  border-radius: 8px;
  padding: 1.4rem 1.6rem;
  max-width: 600px; width: 92vw;
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.sport-modal.modal-wide { max-width: 800px; }
.sport-modal .modal-close {
  position: absolute; top: .5rem; right: .65rem;
  background: transparent; border: none;
  color: #94a3b8; font-size: 1.3rem;
  cursor: pointer; line-height: 1;
}
.sport-modal .modal-close:hover { color: var(--p-base); }
.act-detail-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .35rem .9rem;
  margin: .5rem 0 .8rem;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .82rem; color: #d4d4d8;
}
.act-detail-grid .k { color: #64748b; }
.zones-title { color: var(--p-light); font-size: .8rem; margin: .8rem 0 .4rem; text-transform: uppercase; letter-spacing: .06em; }
.zones-list { display: flex; flex-direction: column; gap: .25rem; }
.zone-row {
  display: grid; grid-template-columns: 30px 1fr 60px 50px;
  gap: .55rem; align-items: center;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .76rem;
}
.zone-num { color: var(--p-light); font-weight: 600; }
.zone-bar { background: rgba(255, 255, 255, .08); height: 12px; border-radius: 3px; overflow: hidden; }
.zone-fill { height: 100%; background: linear-gradient(90deg, var(--p-base), var(--p-glow)); }
.zone-time { color: #d4d4d8; }
.zone-pct { color: #94a3b8; text-align: right; }
.act-gpx-info { margin-top: .8rem; font-size: .72rem; color: #64748b; font-family: 'Menlo','Consolas',monospace; }

/* ===== Plans ===== */
.plan-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: .4rem;
}
.plan-section {
  margin: .85rem 0 .35rem;
  color: var(--p-light); font-size: .76rem;
  text-transform: uppercase; letter-spacing: .08em;
  border-bottom: 1px solid rgba(var(--p-base-rgb), .18);
  padding-bottom: .2rem; font-weight: 600;
}
.plan-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .35rem .9rem;
  font-size: .82rem; color: #d4d4d8;
  font-family: 'Menlo','Consolas',monospace;
}
.plan-grid .full { grid-column: 1 / -1; }
.plan-grid .k { color: #64748b; margin-right: .3rem; }

/* Constraintes médicales */
.constraints-list { display: flex; flex-direction: column; gap: .4rem; }
.constraint {
  padding: .45rem .65rem;
  background: rgba(0, 0, 0, .25);
  border-left: 2px solid rgba(255, 255, 255, .15);
  border-radius: 0 4px 4px 0;
  font-size: .8rem;
}
.constraint.sev-attention   { border-left-color: #fb923c; background: rgba(251, 146, 60, .08); }
.constraint.sev-surveillance { border-left-color: #facc15; background: rgba(250, 204, 21, .06); }
.constraint.sev-grave       { border-left-color: #ef4444; background: rgba(239, 68, 68, .1); }
.constraint.inactive { opacity: .5; }
.constraint .c-head { display: flex; gap: .55rem; align-items: baseline; flex-wrap: wrap; margin-bottom: .2rem; }
.constraint .c-zone { color: #e4e4e7; font-weight: 600; font-size: .82rem; }
.constraint .c-type { color: #cbd5e1; font-family: 'Menlo','Consolas',monospace; font-size: .76rem; }
.constraint .c-date { color: #64748b; font-size: .72rem; font-family: 'Menlo','Consolas',monospace; }
.constraint .c-sev  { margin-left: auto; font-size: .65rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; }
.constraint .c-body { color: #d4d4d8; font-size: .8rem; line-height: 1.4; }

/* Ressentis */
.ressenti-list { display: flex; flex-direction: column; gap: .4rem; }
.ressenti-item { padding: .45rem .65rem; background: rgba(0, 0, 0, .2); border-left: 2px solid rgba(var(--p-base-rgb), .35); border-radius: 0 4px 4px 0; }
.r-head { display: flex; gap: .55rem; margin-bottom: .15rem; }
.r-date { color: var(--p-light); font-family: 'Menlo','Consolas',monospace; font-size: .72rem; font-weight: 600; }
.r-score { color: #facc15; font-size: .72rem; font-family: 'Menlo','Consolas',monospace; }
.r-note { color: #d4d4d8; font-size: .82rem; line-height: 1.4; white-space: pre-wrap; }

/* ============================================================================
   Vue d'ensemble + barre chrono + KPI mini + 3 colonnes (sport)
   ============================================================================ */
.sport-header-card {
  --card-rgb: var(--p-base-rgb);
  border-radius: 8px;
  border-top: 1px solid rgba(var(--card-rgb), .4);
  border-right: 1px solid rgba(var(--card-rgb), .4);
  border-bottom: 1px solid rgba(var(--card-rgb), .4);
  border-left: 2px solid rgba(var(--card-rgb), .9);
  background: linear-gradient(135deg, rgba(var(--card-rgb), .12) 0%, rgba(24, 24, 27, .55) 100%);
  padding: 1rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.hc-title h2 {
  margin: 0; color: var(--p-base);
  font-family: 'Menlo','Consolas',monospace;
  font-size: 1.6rem; font-weight: 700; letter-spacing: .02em;
}
.hc-period { color: #94a3b8; font-size: .78rem; margin-top: .2rem; font-family: 'Menlo','Consolas',monospace; }
.hc-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.hc-stat { text-align: center; min-width: 90px; }
.hc-stat .hcs-label { display: block; font-size: .65rem; color: var(--p-light); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.hc-stat .hcs-value { display: block; color: #e4e4e7; font-family: 'Menlo','Consolas',monospace; font-size: 1rem; font-weight: 700; margin-top: .15rem; }

/* Chrono bar (sport) — standalone version (fallback inline) */
.chrono-bar {
  flex: 1;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .5rem .85rem;
  background: rgba(20, 20, 23, .35);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
}
/* Quand monte DANS .sport-toolbar : transparent, pas de carte (ref Biometrie sante) */
.sport-toolbar > .chrono-bar {
  padding: 0; background: transparent; border: 0; border-radius: 0;
  width: 100%; flex-wrap: wrap; gap: .55rem .7rem;
  min-height: 1.65rem;
}
.sport-toolbar > .chrono-bar .chrono-filters:empty { display: none; }
.chrono-periods { display: flex; gap: .25rem; flex-wrap: wrap; }
.period-btn {
  background: rgba(39, 39, 42, .45); color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 6px;
  padding: .22rem .55rem; font-size: .82rem;
  font-family: 'Menlo','Consolas',monospace; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  line-height: 1.2;
}
.period-btn:hover { background: rgba(var(--p-base-rgb), .15); color: var(--p-light); }
.period-btn.active {
  background: rgba(var(--p-base-rgb), .25); color: var(--p-base);
  border-color: rgba(var(--p-base-rgb), .55); font-weight: 700;
}
.chrono-dates { display: flex; align-items: center; gap: .35rem; }
.chrono-lbl { font-size: .7rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; font-family: 'Menlo','Consolas',monospace; }

.chrono-filters { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.chrono-input {
  background: rgba(39, 39, 42, .45); color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 6px;
  padding: .22rem .45rem; font-size: .82rem;
  font-family: 'Menlo','Consolas',monospace;
  line-height: 1.2;
}

/* KPI mini sport */
.kpi-row {
  display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.kpi-mini {
  --card-rgb: var(--p-base-rgb);
  padding: .55rem .75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-top: 3px solid rgba(var(--card-rgb), .8);
  background: rgba(20, 20, 23, .35);
  display: flex; flex-direction: column; gap: .15rem;
}
.kpi-mini.state-positif    { border-top-color: #22c55e; background: rgba(34, 197, 94, .06); }
.kpi-mini.state-attention  { border-top-color: #f59e0b; background: rgba(245, 158, 11, .06); }
.kpi-mini.state-critique   { border-top-color: #ef4444; background: rgba(239, 68, 68, .06); }
.kpi-mini.state-info       { border-top-color: var(--p-base); background: rgba(var(--p-base-rgb), .06); }
.kpi-mini .km-label { font-size: .65rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kpi-mini .km-value { font-family: 'Menlo','Consolas',monospace; font-size: 1.25rem; font-weight: 700; color: #e4e4e7; line-height: 1.05; }
.kpi-mini .km-detail { font-size: .65rem; color: #64748b; font-family: 'Menlo','Consolas',monospace; }

/* 3 colonnes (sport) */
.three-cols-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: .75rem;
}
.sn-section-title {
  margin: 0 0 .55rem;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
}
.sn-section-title.accent-blue   { color: #93c5fd; border-bottom: 1px solid rgba(147, 197, 253, .25); padding-bottom: .25rem; }
.sn-section-title.accent-teal   { color: #5eead4; border-bottom: 1px solid rgba(94, 234, 212, .25); padding-bottom: .25rem; }
.sn-section-title.accent-orange { color: #fdba74; border-bottom: 1px solid rgba(253, 186, 116, .25); padding-bottom: .25rem; }
/* analysis/etat/reco cards — inherit portal main color (--p-base-rgb) */
.sport-card.analysis-card,
.sport-card.etat-card,
.sport-card.reco-card     { --card-rgb: var(--p-base-rgb); }
.sport-card.analysis-card p, .sport-card.etat-card p, .sport-card.reco-card p { font-size: .85rem; color: #d4d4d8; line-height: 1.55; margin: 0 0 .5rem; }
.biom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .9rem; margin-top: .55rem; }
.biom-item { display: flex; flex-direction: column; }
.biom-label { font-size: .65rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; }
.biom-value { font-family: 'Menlo','Consolas',monospace; font-weight: 700; font-size: .95rem; color: #5eead4; }
.reco-list { display: flex; flex-direction: column; gap: .55rem; }
.reco-item { font-size: .82rem; color: #d4d4d8; line-height: 1.5; padding-left: 1rem; position: relative; }
.reco-bullet { position: absolute; left: 0; top: .35rem; width: 8px; height: 8px; border-radius: 50%; }
.reco-bullet.ok    { background: #22c55e; box-shadow: 0 0 4px rgba(34,197,94,.6); }
.reco-bullet.warn  { background: #f59e0b; box-shadow: 0 0 4px rgba(245,158,11,.6); }
.reco-bullet.crit  { background: #ef4444; box-shadow: 0 0 4px rgba(239,68,68,.6); }
.reco-item b { color: #e4e4e7; }

/* Records */
.record-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .35rem; }
.record-item { padding: .55rem .75rem; background: rgba(var(--p-base-rgb), .06); border-radius: 6px; border-left: 3px solid var(--p-base); }
.record-item .rec-label { display: block; font-size: .65rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; }
.record-item .rec-value { display: block; font-family: 'Menlo','Consolas',monospace; font-size: 1.15rem; font-weight: 700; color: #e4e4e7; margin-top: .15rem; }
.record-item .rec-meta { display: block; font-size: .68rem; color: #64748b; font-family: 'Menlo','Consolas',monospace; margin-top: .15rem; }

/* Calendrier */
.cal-month-card { padding: .85rem 1rem; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-top: .55rem;
}
.cal-head {
  text-align: center; padding: .15rem 0;
  font-size: .65rem; color: #94a3b8;
  font-family: 'Menlo','Consolas',monospace;
  text-transform: uppercase; letter-spacing: .06em;
  font-weight: 700;
}
.cal-cell {
  min-height: 63px;
  padding: .25rem .35rem;
  background: rgba(255, 255, 255, .03);
  border-radius: 4px;
  border: 1px solid transparent;
  display: flex; flex-direction: column; gap: .15rem;
  font-family: 'Menlo','Consolas',monospace;
}
.cal-cell.empty { background: transparent; }
.cal-cell.has-activity { background: rgba(var(--p-base-rgb), .08); border-color: rgba(var(--p-base-rgb), .2); }
.cal-cell.today { box-shadow: 0 0 0 2px rgba(var(--p-base-rgb), .8); }
.cal-cell .cal-day { font-size: .68rem; color: #cbd5e1; font-weight: 700; }
.cal-cell .cal-km { font-size: .68rem; color: var(--p-base); font-weight: 700; }
.cal-cell .cal-dots { display: flex; gap: 2px; margin-top: auto; }
.cal-cell .cal-dot { width: 6px; height: 6px; border-radius: 50%; }

/* ============================================================================
   PLANS v3 — refonte 2026-05-01
   ============================================================================ */

/* Header card */
.plan-header-card { padding: 1rem 1.2rem; }
.plan-header-card .plan-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
}
.plan-title { margin: 0 0 .25rem !important; font-size: 1.1rem !important; }
.plan-subline { color: #cbd5e1; font-size: .88rem; }
.plan-meta { font-size: .68rem; color: #64748b; font-family: 'Menlo','Consolas',monospace; margin-top: .35rem; }

/* card-head et card-title : commun aux nouvelles sections */
.sport-card .card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem;
  cursor: default;
}
.sport-card details > .card-head { cursor: pointer; }
.sport-card .card-title {
  color: var(--p-base);
  font-family: 'Menlo','Consolas',monospace;
  font-size: .82rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.sport-card details summary.card-head { list-style: none; }
.sport-card details summary.card-head::-webkit-details-marker { display: none; }
.sport-card details summary.card-head::after {
  content: '▼'; color: var(--p-light); font-size: .65rem; opacity: .6;
  transition: transform .2s;
}
.sport-card details[open] summary.card-head::after { transform: rotate(180deg); }

/* === KPIs grid (6 cards en ligne) === */
.plan-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .55rem;
}
.plan-kpi {
  padding: .65rem .75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-top: 3px solid rgba(148, 163, 184, .4);
  background: rgba(20, 20, 23, .35);
  display: flex; flex-direction: column; gap: .15rem;
}
.plan-kpi .pk-label {
  font-size: .65rem; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}
.plan-kpi .pk-value {
  font-family: 'Menlo','Consolas',monospace;
  font-size: 1.25rem; font-weight: 700;
  color: #e4e4e7;
  line-height: 1.05;
}
.plan-kpi .pk-detail { font-size: .65rem; color: #64748b; font-family: 'Menlo','Consolas',monospace; }

.plan-kpi.state-positif  { border-top-color: #22c55e; box-shadow: 0 0 12px rgba(34,197,94,.12); background: rgba(34, 197, 94, .06); }
.plan-kpi.state-positif .pk-value { color: #86efac; }
.plan-kpi.state-attention { border-top-color: #f59e0b; box-shadow: 0 0 12px rgba(245,158,11,.12); background: rgba(245, 158, 11, .06); }
.plan-kpi.state-attention .pk-value { color: #fcd34d; }
.plan-kpi.state-critique  { border-top-color: #ef4444; box-shadow: 0 0 12px rgba(239,68,68,.12); background: rgba(239, 68, 68, .06); }
.plan-kpi.state-critique .pk-value { color: #fca5a5; }
.plan-kpi.state-info     { border-top-color: var(--p-base); background: rgba(var(--p-base-rgb), .06); }
.plan-kpi.state-info .pk-value { color: var(--p-light); }

/* === Ressenti card === */
.ressenti-card { padding: .85rem 1.1rem; }
.ressenti-input { display: flex; gap: .5rem; align-items: flex-start; margin-top: .5rem; }
.ressenti-input textarea {
  flex: 1; min-height: 63px; resize: vertical;
  background: rgba(20, 20, 23, .6); color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 5px;
  padding: .4rem .55rem; font-size: .85rem;
  font-family: inherit;
}
.ressenti-input textarea:focus { outline: none; border-color: var(--p-base); }
.ressenti-msg { font-size: .72rem; color: var(--p-light); margin-top: .25rem; min-height: 1em; }
.ressenti-history { margin-top: .65rem; }
.ressenti-history summary {
  cursor: pointer; font-size: .68rem; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .06em;
  font-family: 'Menlo','Consolas',monospace;
}
.ressenti-history .ressenti-list { display: flex; flex-direction: column; gap: .3rem; margin-top: .4rem; max-height: 180px; overflow-y: auto; }
.ressenti-list .ressenti-item {
  display: grid; grid-template-columns: 130px 1fr; gap: .55rem;
  font-size: .78rem; padding: .25rem 0;
}
.ressenti-list .r-date { color: var(--p-light); font-family: 'Menlo','Consolas',monospace; font-size: .7rem; }
.ressenti-list .r-note { color: #cbd5e1; }

/* === Macro cycle === */
.macro-card { padding: .85rem 1.1rem; }
.macro-bar {
  display: flex; gap: 2px;
  height: 36px;
  margin-top: .55rem;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  position: relative;
}
.macro-seg {
  display: flex; align-items: center; justify-content: center;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  color: rgba(255, 255, 255, .9);
  padding: 0 .35rem;
  white-space: nowrap; overflow: hidden;
}
.macro-seg.phase-base       { background: rgba(14, 165, 233, .35); color: #7dd3fc; }
.macro-seg.phase-build      { background: rgba(245, 158, 11, .35); color: #fcd34d; }
.macro-seg.phase-peak       { background: rgba(239, 68, 68, .35); color: #fca5a5; }
.macro-seg.phase-taper      { background: rgba(34, 197, 94, .35); color: #86efac; }
.macro-seg.phase-recovery   { background: rgba(20, 184, 166, .3); color: #5eead4; }
.macro-seg.phase-stub,
.macro-seg.phase- { background: rgba(100, 116, 139, .35); color: #cbd5e1; }
.macro-marker {
  position: absolute; top: 0; bottom: 0;
  width: 2px; background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, .8);
}
.macro-legend {
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-top: .5rem; font-size: .68rem; color: #94a3b8;
  font-family: 'Menlo','Consolas',monospace;
}
.macro-legend .ml-item.phase-base    b { color: #7dd3fc; }
.macro-legend .ml-item.phase-build   b { color: #fcd34d; }
.macro-legend .ml-item.phase-peak    b { color: #fca5a5; }
.macro-legend .ml-item.phase-taper   b { color: #86efac; }
.macro-legend .ml-item.phase-recovery b { color: #5eead4; }

/* === Coach message === */
.coach-msg-card { padding: .85rem 1.1rem; border-left-color: rgba(20, 184, 166, .8) !important; }
.coach-msg { color: #d4d4d8; font-size: .9rem; line-height: 1.55; margin: .35rem 0 0; white-space: pre-wrap; }

/* === Days carousel === */
.days-carousel-card { padding: .55rem 0 .75rem; }
.days-carousel-card .card-head { padding: 0 1.1rem .35rem; }
.days-carousel-card .legend { display: flex; gap: .8rem; font-size: .65rem; color: #94a3b8; font-family: 'Menlo','Consolas',monospace; flex-wrap: wrap; }
.legend-item { display: inline-flex; align-items: center; gap: .25rem; }
.legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.legend .dot-done    { background: #22c55e; box-shadow: 0 0 4px rgba(34,197,94,.6); }
.legend .dot-missed  { background: #ef4444; box-shadow: 0 0 4px rgba(239,68,68,.6); }
.legend .dot-rest    { background: #38bdf8; box-shadow: 0 0 4px rgba(56,189,248,.6); }
.legend .dot-planned { background: rgba(255, 255, 255, .25); border: 1px dashed rgba(255, 255, 255, .4); }

.days-carousel {
  display: flex; gap: .5rem;
  overflow-x: auto;
  padding: .25rem 1.1rem 1rem;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--p-base-rgb), .4) transparent;
}
.days-carousel::-webkit-scrollbar { height: 8px; }
.days-carousel::-webkit-scrollbar-thumb { background: rgba(var(--p-base-rgb), .4); border-radius: 4px; }

.week-header {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: .35rem .6rem;
  background: rgba(255, 255, 255, .03);
  border-radius: 6px;
  border-top: 2px solid rgba(255, 255, 255, .15);
  font-family: 'Menlo','Consolas',monospace;
  min-width: 80px;
  align-self: stretch;
  margin-right: .25rem;
}
.week-header .wh-num { font-size: .75rem; font-weight: 700; color: var(--p-base); }
.week-header .wh-phase { font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; color: #cbd5e1; margin-top: .15rem; }
.week-header .wh-vol { font-size: .68rem; color: #d4d4d8; margin-top: .25rem; font-weight: 700; }
.week-header .wh-dates { font-size: .58rem; color: #64748b; margin-top: .2rem; }
.week-header.phase-base    { border-top-color: #38bdf8; }
.week-header.phase-build   { border-top-color: #f59e0b; }
.week-header.phase-peak    { border-top-color: #ef4444; }
.week-header.phase-taper   { border-top-color: #22c55e; }
.week-header.phase-recovery { border-top-color: #14b8a6; }

.day-card {
  flex: 0 0 195px;
  scroll-snap-align: center;
  padding: .55rem .7rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(20, 20, 23, .4);
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
  gap: .25rem;
  font-size: .82rem;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.day-card:hover { transform: translateY(-1px); border-color: rgba(var(--p-base-rgb), .3); }
.day-card.today {
  border-color: var(--p-base);
  border-width: 2px;
  box-shadow: 0 0 12px rgba(var(--p-base-rgb), .25), 0 0 24px rgba(var(--p-base-rgb), .08);
  background: linear-gradient(135deg, rgba(20, 20, 23, .4), rgba(var(--p-base-rgb), .08));
}

.day-card .day-header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: .35rem;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.day-card .day-name {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  font-weight: 700; color: #cbd5e1;
}
.day-card .day-date { font-size: .68rem; color: #64748b; font-family: 'Menlo','Consolas',monospace; }
.day-card .session-type {
  font-size: .85rem; font-weight: 700; line-height: 1.25;
  padding: .25rem 0;
  min-height: 2.4em;
}
.day-card .session-type.type-repos       { color: #86efac; }
.day-card .session-type.type-endurance   { color: #93c5fd; }
.day-card .session-type.type-seuil       { color: #fcd34d; }
.day-card .session-type.type-intense     { color: #fca5a5; }
.day-card .session-type.type-renforcement { color: #5eead4; }
.day-card .session-km {
  font-family: 'Menlo','Consolas',monospace;
  font-weight: 700; font-size: .82rem;
  color: #e4e4e7;
  padding: .15rem 0;
  min-height: 1.3em;
}
.day-card .session-real {
  font-size: .7rem;
  padding: .35rem 0;
  border-top: 1px solid rgba(255, 255, 255, .05);
  min-height: 2.5em;
}
.day-card .session-real .real-label {
  font-size: .58rem; text-transform: uppercase; letter-spacing: .04em;
  color: #64748b; margin-bottom: .15rem;
}
.day-card .session-real .real-data {
  font-family: 'Menlo','Consolas',monospace; font-weight: 600; color: #86efac;
}
.day-card .session-real .real-data.muted { color: #64748b; font-style: italic; }
.day-card .session-info {
  font-size: .72rem; color: #94a3b8; line-height: 1.4;
  padding: .3rem 0;
  border-top: 1px solid rgba(255, 255, 255, .04);
  max-height: 4.5em;
  overflow: hidden;
}
.day-card.expanded .session-info { max-height: none; overflow: auto; }

/* Détails étendus (echauffement, corps_seance, retour_calme, zones_fc, consignes, alternatives) */
.day-card .session-details {
  display: none;
  font-size: .68rem;
  margin-top: .35rem;
  padding-top: .35rem;
  border-top: 1px solid rgba(255, 255, 255, .06);
  line-height: 1.45;
}
.day-card.expanded .session-details { display: flex; flex-direction: column; gap: .35rem; }
.session-details .sd-block {
  display: flex; flex-direction: column; gap: .1rem;
  padding: .3rem .4rem;
  background: rgba(255, 255, 255, .03);
  border-radius: 4px;
  border-left: 2px solid rgba(var(--p-base-rgb), .35);
}
.session-details .sd-block b {
  font-size: .58rem;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--p-light); font-weight: 700;
}
.session-details .sd-block span {
  color: #e4e4e7;
  white-space: pre-wrap; word-break: break-word;
}
.session-details .sd-block.warn { border-left-color: #f59e0b; background: rgba(245, 158, 11, .08); }
.session-details .sd-block.warn b { color: #fcd34d; }
.session-details .sd-block.alt  { border-left-color: #5eead4; background: rgba(20, 184, 166, .06); }
.session-details .sd-block.alt b { color: #5eead4; }

/* En mode expanded, agrandir la card pour mieux lire */
.day-card.expanded {
  width: 320px !important;
  margin-left: -100px !important;
  max-height: 540px;
  overflow-y: auto;
}
.day-card .session-alert {
  font-size: .68rem; line-height: 1.4;
  padding-top: .35rem;
  border-top: 1px solid rgba(255, 255, 255, .04);
}
.day-card .day-alert {
  margin-bottom: .15rem;
  padding: .2rem .35rem;
  border-radius: 3px;
}
.day-card .day-alert.warning  { color: #fcd34d; background: rgba(245, 158, 11, .12); border-left: 2px solid #f59e0b; }
.day-card .day-alert.critique { color: #fca5a5; background: rgba(239, 68, 68, .12); border-left: 2px solid #ef4444; }

/* États day-card */
.day-card.state-done {
  background: linear-gradient(135deg, rgba(34, 197, 94, .15), rgba(34, 197, 94, .06));
  border-color: rgba(34, 197, 94, .45);
}
.day-card.state-missed {
  background: linear-gradient(135deg, rgba(239, 68, 68, .15), rgba(239, 68, 68, .06));
  border-color: rgba(239, 68, 68, .45);
}
.day-card.state-rest {
  background: linear-gradient(135deg, rgba(56, 189, 248, .12), rgba(56, 189, 248, .04));
  border-color: rgba(56, 189, 248, .35);
}
.day-card.state-planned {
  background: rgba(255, 255, 255, .03);
  border-color: rgba(255, 255, 255, .12);
  border-style: dashed;
}

/* === Adaptations alertes === */
.adapt-card { padding: .75rem 1.1rem; }
.adapt-alert {
  border-radius: 5px;
  padding: .45rem .65rem;
  margin-top: .35rem;
  font-size: .78rem; line-height: 1.5;
  border-left: 3px solid;
}
.adapt-alert.info     { background: rgba(56, 189, 248, .1); border-left-color: #38bdf8; color: #bae6fd; }
.adapt-alert.warning,
.adapt-alert.attention { background: rgba(245, 158, 11, .12); border-left-color: #f59e0b; color: #fcd34d; }
.adapt-alert.critique { background: rgba(239, 68, 68, .12); border-left-color: #ef4444; color: #fca5a5; }
.adapt-alert b { font-weight: 700; }

/* === Adhérence barres === */
.adherence-card { padding: .85rem 1.1rem; }
.adh-list { display: flex; flex-direction: column; gap: .25rem; margin-top: .55rem; }
.adh-row {
  display: grid; grid-template-columns: 50px 1fr 100px;
  gap: .55rem; align-items: center;
  font-family: 'Menlo','Consolas',monospace; font-size: .76rem;
}
.adh-label { color: #94a3b8; }
.adh-bar {
  background: rgba(255, 255, 255, .06); height: 12px; border-radius: 3px;
  overflow: hidden;
}
.adh-fill { height: 100%; transition: width .25s; }
.adh-fill.ok   { background: #22c55e; }
.adh-fill.warn { background: #f59e0b; }
.adh-fill.miss { background: #ef4444; }
.adh-fill.rest { background: rgba(255, 255, 255, .15); }
.adh-val { color: #cbd5e1; text-align: right; }
.adh-summary { margin-top: .55rem; font-size: .72rem; color: #94a3b8; text-align: right; font-family: 'Menlo','Consolas',monospace; }
.adh-summary b { color: #e4e4e7; }

/* === Prochaines semaines === */
.next-weeks-card { padding: .55rem 0; }
.next-weeks-card details summary { padding: .25rem 1.1rem; }
.next-weeks-list { display: flex; flex-direction: column; gap: .35rem; padding: .25rem 1.1rem; }
.next-week-row {
  padding: .55rem .75rem;
  background: rgba(20, 20, 23, .35);
  border-radius: 6px;
  border-left: 3px solid rgba(148, 163, 184, .35);
}
.next-week-row.phase-base    { border-left-color: #38bdf8; }
.next-week-row.phase-build   { border-left-color: #f59e0b; }
.next-week-row.phase-peak    { border-left-color: #ef4444; }
.next-week-row.phase-taper   { border-left-color: #22c55e; }
.next-week-row.phase-recovery { border-left-color: #14b8a6; }
.next-week-row .nw-head { display: flex; justify-content: space-between; margin-bottom: .25rem; }
.next-week-row .nw-phase { font-family: 'Menlo','Consolas',monospace; font-size: .72rem; font-weight: 700; color: var(--p-light); letter-spacing: .06em; }
.next-week-row .nw-vol { font-family: 'Menlo','Consolas',monospace; font-size: .72rem; color: #cbd5e1; font-weight: 700; }
.next-week-row .nw-coach { font-size: .8rem; color: #d4d4d8; line-height: 1.45; }
.next-week-row .nw-sessions { margin-top: .25rem; font-size: .7rem; color: #94a3b8; font-family: 'Menlo','Consolas',monospace; }

/* === Rationale (analyse coach) === */
.rationale-card { padding: .85rem 1.1rem; border-left-color: rgba(168, 85, 247, .7) !important; }
.rationale-text { color: #d4d4d8; font-size: .88rem; line-height: 1.6; margin: .35rem 0 0; white-space: pre-wrap; }

/* === Configuration intégrée 2 colonnes === */
.config-card { padding: .55rem 0; }
.config-card details summary { padding: .25rem 1.1rem; }
.config-card .cfg-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: .65rem 1.1rem .85rem;
}
.config-card .cfg-col { display: flex; flex-direction: column; gap: .55rem; }
.config-card .cfg-section {
  margin: .35rem 0 .15rem;
  color: var(--p-light);
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  border-bottom: 1px solid rgba(var(--p-base-rgb), .18);
  padding-bottom: .2rem;
}
.config-card .cfg-field { display: flex; flex-direction: column; gap: .2rem; }
.config-card .cfg-field label {
  font-size: .65rem; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .08em;
  font-family: 'Menlo','Consolas',monospace;
  font-weight: 600;
}
.config-card .cfg-field input,
.config-card .cfg-field select,
.config-card .cfg-field textarea {
  background: rgba(20, 20, 23, .65); color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 5px;
  padding: .35rem .55rem; font-size: .85rem;
  font-family: inherit;
}
.config-card .cfg-field input:focus,
.config-card .cfg-field select:focus,
.config-card .cfg-field textarea:focus {
  outline: none; border-color: var(--p-base);
}
.config-card .cfg-actions {
  grid-column: 1 / -1;
  display: flex; gap: .5rem; justify-content: flex-end;
  margin-top: .55rem; padding-top: .55rem;
  border-top: 1px solid rgba(255, 255, 255, .06);
  align-items: center;
}
.config-card .cfg-actions #cfg-msg { margin-right: auto; }
.config-card .cfg-hint { font-size: .68rem; color: #64748b; margin-top: .35rem; }
.t-btn.small { padding: .15rem .45rem; font-size: .72rem; }

/* Constraintes médicales */
.constraints-list { display: flex; flex-direction: column; gap: .35rem; }
.constraint {
  padding: .35rem .55rem;
  background: rgba(0, 0, 0, .25);
  border-left: 2px solid rgba(255, 255, 255, .15);
  border-radius: 0 4px 4px 0;
  font-size: .78rem;
}
.constraint.sev-attention   { border-left-color: #f59e0b; background: rgba(245, 158, 11, .08); }
.constraint.sev-surveillance { border-left-color: #facc15; background: rgba(250, 204, 21, .06); }
.constraint.sev-grave       { border-left-color: #ef4444; background: rgba(239, 68, 68, .1); }
.constraint.inactive { opacity: .5; }
.constraint .c-head { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; margin-bottom: .15rem; }
.constraint .c-zone { color: #e4e4e7; font-weight: 700; font-size: .8rem; }
.constraint .c-type { color: #cbd5e1; font-family: 'Menlo','Consolas',monospace; font-size: .72rem; }
.constraint .c-date { color: #64748b; font-size: .68rem; font-family: 'Menlo','Consolas',monospace; }
.constraint .c-sev  { margin-left: auto; font-size: .62rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; }
.constraint .c-body { color: #d4d4d8; font-size: .76rem; line-height: 1.4; }

/* ===== Plans : objective + macro + carrousel (legacy, conserve) ===== */
.plan-objective-card { padding: 1rem 1.2rem; }
.plan-actions { display: flex; gap: .5rem; }
.plan-objective-line { color: #cbd5e1; font-size: .9rem; margin: .3rem 0 0; }
.plan-meta { font-size: .7rem; color: #64748b; font-family: 'Menlo','Consolas',monospace; margin-top: .35rem; }
.plan-rationale { color: #cbd5e1; font-size: .88rem; line-height: 1.55; white-space: pre-wrap; margin: .25rem 0 0; }

.macro-bar {
  display: flex; gap: 2px;
  margin-top: .8rem;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
}
.macro-seg {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .68rem; color: #fff;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 0 .35rem;
}
.macro-seg .ms-label { font-weight: 700; line-height: 1; }
.macro-seg .ms-weeks { font-size: .58rem; opacity: .85; line-height: 1.2; }
.macro-seg.phase-base   { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.macro-seg.phase-build  { background: linear-gradient(135deg, #84cc16, #65a30d); }
.macro-seg.phase-peak   { background: linear-gradient(135deg, #f59e0b, #d97706); }
.macro-seg.phase-taper  { background: linear-gradient(135deg, #a855f7, #7e22ce); }
.macro-seg.phase-stub,
.macro-seg.phase-       { background: rgba(100, 116, 139, .5); }

/* Weeks carousel */
.plan-weeks-card { padding: .75rem 0; }
.weeks-toolbar {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0 1.1rem .55rem;
}
.legend { display: flex; gap: .8rem; font-size: .68rem; color: #94a3b8; font-family: 'Menlo','Consolas',monospace; }
.legend-item { display: inline-flex; align-items: center; gap: .25rem; }
.legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.legend .dot-done   { background: #22c55e; box-shadow: 0 0 4px rgba(34,197,94,.6); }
.legend .dot-missed { background: #ef4444; box-shadow: 0 0 4px rgba(239,68,68,.6); }
.legend .dot-rest   { background: #38bdf8; box-shadow: 0 0 4px rgba(56,189,248,.6); }

.weeks-carousel {
  display: flex;
  gap: .7rem;
  overflow-x: auto;
  padding: .25rem 1.1rem 1rem;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--p-base-rgb), .4) transparent;
}
.weeks-carousel::-webkit-scrollbar { height: 8px; }
.weeks-carousel::-webkit-scrollbar-thumb { background: rgba(var(--p-base-rgb), .4); border-radius: 4px; }

.week-card {
  flex: 0 0 360px;
  scroll-snap-align: center;
  padding: .7rem .8rem;
  background: rgba(20, 20, 23, .35);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  display: flex; flex-direction: column; gap: .35rem;
  transition: border-color .2s, box-shadow .2s;
}
.week-card.active {
  border-color: var(--p-base);
  box-shadow: 0 0 0 1px rgba(var(--p-base-rgb), .3), 0 4px 18px rgba(var(--p-base-rgb), .15);
}
.week-card.past { opacity: .85; }
.week-head { display: flex; align-items: baseline; gap: .55rem; }
.week-num { color: var(--p-base); font-weight: 700; font-size: .9rem; font-family: 'Menlo','Consolas',monospace; }
.week-phase {
  font-size: .65rem; padding: .1rem .4rem; border-radius: 3px;
  font-family: 'Menlo','Consolas',monospace;
  text-transform: uppercase; letter-spacing: .06em; color: #fff;
}
.week-phase.phase-base   { background: rgba(14, 165, 233, .65); }
.week-phase.phase-build  { background: rgba(132, 204, 22, .65); }
.week-phase.phase-peak   { background: rgba(245, 158, 11, .65); }
.week-phase.phase-taper  { background: rgba(168, 85, 247, .65); }
.week-phase.phase-stub,
.week-phase.phase-       { background: rgba(100, 116, 139, .65); }
.week-dates { font-size: .72rem; color: #94a3b8; font-family: 'Menlo','Consolas',monospace; }
.week-volume { font-size: .78rem; color: #cbd5e1; font-family: 'Menlo','Consolas',monospace; }
.week-coach { font-size: .76rem; color: #d4d4d8; font-style: italic; line-height: 1.4; padding: .3rem .35rem; background: rgba(var(--p-base-rgb), .06); border-left: 2px solid rgba(var(--p-base-rgb), .35); border-radius: 0 3px 3px 0; }

.week-sessions {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px; margin-top: .35rem;
}

.session-card {
  position: relative;
  padding: .35rem .25rem;
  border-radius: 5px;
  font-size: .65rem;
  font-family: 'Menlo','Consolas',monospace;
  text-align: center;
  cursor: pointer;
  border: 1px solid transparent;
  display: flex; flex-direction: column; gap: 1px;
  min-height: 64px;
  transition: transform .15s, box-shadow .15s;
  overflow: hidden;
}
.session-card:hover { transform: translateY(-1px); }
.session-card.today { box-shadow: 0 0 0 2px rgba(var(--p-base-rgb), .8); }

.session-card.state-done {
  background: linear-gradient(135deg, rgba(34, 197, 94, .25), rgba(34, 197, 94, .12));
  border-color: rgba(34, 197, 94, .55);
  color: #d1fae5;
}
.session-card.state-missed {
  background: linear-gradient(135deg, rgba(239, 68, 68, .25), rgba(239, 68, 68, .12));
  border-color: rgba(239, 68, 68, .55);
  color: #fecaca;
}
.session-card.state-rest {
  background: linear-gradient(135deg, rgba(56, 189, 248, .18), rgba(56, 189, 248, .08));
  border-color: rgba(56, 189, 248, .35);
  color: #bae6fd;
}
.session-card.state-planned {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .08);
  color: #cbd5e1;
  border-style: dashed;
}

.session-card .sc-day { font-size: .6rem; opacity: .8; text-transform: uppercase; letter-spacing: .04em; }
.session-card .sc-date { font-size: .68rem; font-weight: 700; }
.session-card .sc-type { font-weight: 600; font-size: .68rem; margin-top: 1px; }
.session-card .sc-zone {
  display: inline-block;
  padding: 0 .25rem;
  border-radius: 2px;
  background: rgba(255, 255, 255, .15);
  font-size: .58rem;
  font-weight: 700;
  align-self: center;
}
.session-card .sc-volume { font-size: .58rem; opacity: .8; }
.session-card .sc-detail {
  display: none;
}
.session-card.expanded {
  z-index: 4;
  position: absolute;
  width: 280px;
  min-height: auto;
  margin-left: -90px;
  padding: .5rem .7rem;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .55);
}
.session-card.expanded .sc-detail {
  display: block;
  margin-top: .35rem;
  padding-top: .35rem;
  border-top: 1px solid currentColor;
  border-color: rgba(255, 255, 255, .15);
  font-size: .7rem;
  line-height: 1.4;
}
.session-card.expanded .sc-desc { color: inherit; opacity: .95; }
.session-card.expanded .sc-match { margin-top: .4rem; opacity: .85; }

/* Config form */
.cfg-form { grid-template-columns: 1fr 1fr 1fr; }
.cfg-form .full { grid-column: 1 / -1; }
.cfg-section {
  grid-column: 1 / -1;
  margin: .55rem 0 .15rem;
  color: var(--p-light);
  font-size: .76rem;
  text-transform: uppercase; letter-spacing: .08em;
  border-bottom: 1px solid rgba(var(--p-base-rgb), .18);
  padding-bottom: .2rem;
  font-weight: 600;
}

/* Plan editor */
.plan-textarea {
  width: 100%; min-height: 380px;
  background: rgba(20, 20, 23, .85); color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 6px;
  padding: .6rem .7rem;
  font-family: 'Menlo','Consolas',monospace;
  font-size: .82rem; line-height: 1.45;
  margin: .5rem 0;
}
.plan-textarea:focus { outline: none; border-color: var(--p-base); }
.form-error { color: #fca5a5; font-size: .76rem; margin-top: .35rem; min-height: 1em; }

/* ===== Stats / Bilans ===== */
.stats-card .stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .8rem;
  margin-top: .4rem;
}
.stat-box {
  text-align: center;
  padding: .75rem .5rem;
  background: rgba(var(--p-base-rgb), .06);
  border: 1px solid rgba(var(--p-base-rgb), .2);
  border-radius: 6px;
}
.stat-value { font-family: 'Menlo','Consolas',monospace; font-size: 1.7rem; font-weight: 700; color: var(--p-base); line-height: 1.05; }
.stat-label { font-size: .68rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; margin-top: .2rem; }

/* Mois bars */
.month-bars {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: .35rem;
  height: 160px;
  margin-top: .5rem;
  align-items: end;
}
.month-bar { display: flex; flex-direction: column; align-items: center; gap: .15rem; height: 100%; }
.mb-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.mb-bar { width: 80%; background: linear-gradient(180deg, var(--p-glow), var(--p-base)); border-radius: 3px 3px 0 0; min-height: 1px; }
.mb-km { font-size: .68rem; color: #cbd5e1; font-family: 'Menlo','Consolas',monospace; }
.mb-label { font-size: .65rem; color: #64748b; text-transform: uppercase; letter-spacing: .04em; font-family: 'Menlo','Consolas',monospace; }

/* Type bars */
.type-bars { display: flex; flex-direction: column; gap: .35rem; margin-top: .4rem; }
.type-row {
  display: grid; grid-template-columns: 130px 1fr 200px;
  gap: .65rem; align-items: center;
  font-size: .8rem;
}
.type-name { color: #e4e4e7; font-weight: 500; }
.type-bar { background: rgba(255, 255, 255, .06); height: 14px; border-radius: 3px; overflow: hidden; }
.type-fill { height: 100%; border-radius: 3px; }
.type-stats { color: #94a3b8; font-family: 'Menlo','Consolas',monospace; font-size: .76rem; text-align: right; }

/* ===== Forms (réutilise pattern santé) ===== */
.t-btn {
  background: rgba(39, 39, 42, .5); color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 6px;
  padding: .35rem .8rem; font-size: .82rem; cursor: pointer;
}
.t-btn:hover:not(:disabled) { background: rgba(63, 63, 70, .65); border-color: rgba(var(--p-base-rgb), .3); }
.t-btn.primary {
  background: linear-gradient(135deg, rgba(var(--p-base-rgb), .85), rgba(var(--p-glow-rgb), .75));
  color: var(--p-text-on); border-color: rgba(var(--p-soft-rgb), .8); font-weight: 600;
}
.sport-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: .7rem;
  margin-top: .7rem;
}
.sport-form label {
  display: flex; flex-direction: column; gap: .25rem;
  font-size: .76rem; color: var(--p-light);
  text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
}
.sport-form label.full { grid-column: 1 / -1; }
.sport-form input, .sport-form textarea, .sport-form select {
  background: rgba(20, 20, 23, .6); color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 5px;
  padding: .35rem .55rem; font-size: .85rem;
  font-family: inherit;
}
.sport-form input:focus, .sport-form textarea:focus, .sport-form select:focus {
  outline: none; border-color: var(--p-base); background: rgba(20, 20, 23, .85);
}
/* Checkbox custom bulletproof (override de tout style hérité) */
.sport-form input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  background: rgba(20, 20, 23, .65) !important;
  border: 1.5px solid rgba(255, 255, 255, .35) !important;
  border-radius: 3px !important;
  cursor: pointer;
  position: relative;
  margin: 0 .5rem 0 0 !important;
  padding: 0 !important;
  vertical-align: middle;
  flex: 0 0 auto;
  display: inline-block;
}
.sport-form input[type="checkbox"]:hover {
  border-color: var(--p-base) !important;
}
.sport-form input[type="checkbox"]:checked {
  background: var(--p-base) !important;
  border-color: var(--p-base) !important;
}
.sport-form input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}
.sport-form label.full input[type="checkbox"] + br,
.sport-form label.full {
  display: flex;
  flex-direction: row !important;
  align-items: center;
  gap: 0;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: .85rem !important;
  color: #cbd5e1 !important;
  font-weight: normal !important;
}
.form-actions {
  grid-column: 1 / -1;
  display: flex; gap: .5rem; justify-content: flex-end;
  margin-top: .35rem;
}
.me-tag { font-size: .65rem; padding: .1rem .35rem; border: 1px solid rgba(148,163,184,.4); border-radius: 3px; color: #94a3b8; margin-left: .5rem; }
.me-notes { margin-top: .5rem; font-size: .82rem; color: #cbd5e1; line-height: 1.4; }



/* Phase 5+ : style modales Goals/Races aligné design standard */
.ch-input-modal label {
  display: flex; flex-direction: column; gap: 0.25rem;
  font-size: 0.78rem; color: #94a3b8; letter-spacing: 0.02em;
}
.ch-input-modal input[type="text"], .ch-input-modal input[type="date"], .ch-input-modal input[type="number"], .ch-input-modal input[type="url"], .ch-input-modal select, .ch-input-modal textarea {
  background: rgba(39,39,42,.6); color: #e4e4e7;
  border: 1px solid rgba(255,255,255,.12); border-radius: 6px;
  padding: 0.4rem 0.55rem; font-size: 0.85rem; font-family: inherit;
}
.ch-input-modal textarea { resize: vertical; line-height: 1.5; }
.ch-input-modal h3 { font-size: 0.95rem !important; }

/* Vue Objectifs : aligner chip 'Autre' au bord droit de l'onglet Changelog */
.chrono-bar[data-view="objectifs"] {
  padding-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}
.chrono-bar[data-view="objectifs"] .chrono-filters {
  margin-left: auto; justify-content: flex-end;
  padding-right: 0;
}

/* Sport overview : badges + score collés au pin (annule margin-left:auto du pin de sante.css) */
.sport-tab .bsc-pin { margin-left: 0; }

/* Vue d'ensemble Sport : texte interp KPI plus contrasté */
.ov-gauge .ov-gauge-interp {
  font-size: .72rem;
  font-style: italic;
  margin-top: .15rem;
  filter: brightness(1.4) saturate(1.2);
  font-weight: 500;
}



/* Sport overview : pied du mannequin colle a la bordure basse des KPI + agrandi.
   position: absolute sort le wrap du flux pour qu il ne pousse plus la ligne grid. */
.sport-tab .ov-layout > .ov-col-center {
  position: relative;
  overflow: visible;
}
.sport-tab .ov-mannequin-wrap {
  position: absolute;
  bottom: -60px;                 /* abaisse le mannequin de 30px supplementaires */
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 720px;                 /* force la taille agrandie - largeur calculee depuis ratio image 1024x1536 */
  max-width: 480px;
  max-height: 720px;
  overflow: visible;
}
.sport-tab .ov-mannequin-wrap .anat-stack,
.sport-tab .ov-mannequin-wrap .anat-overlay-wrap {
  height: 100%;
  max-height: 100%;
  width: 100%;
}
.sport-tab .ov-mannequin-wrap svg,
.sport-tab .ov-mannequin-wrap img {
  height: 100%;
  max-height: 100%;
  width: auto;
}


/* Sport overview : KPI cols larger than Sante by 30px (350 vs 320) */
.sport-tab .ov-layout {
  grid-template-columns: 350px 1fr 350px !important;
}

/* Sport overview : responsive mannequin
   Strategie : conserver la grille 3-col + mannequin en position absolute a TOUS les
   breakpoints (sauf mobile <480px). Aux tailles intermediaires, les colonnes KPI
   restent les plus larges possibles et le mannequin reste pleine taille DERRIERE
   les DEUX colonnes (z-index: 1 sur les KPI -> ils paint en avant du wrap absolu). */

@media (max-width: 1100px) {
  .sport-tab .ov-layout {
    grid-template-columns: 310px 1fr 310px !important;
    gap: 10px;
  }
}
@media (max-width: 900px) {
  .sport-tab .ov-layout {
    grid-template-columns: 270px 1fr 270px !important;
    gap: 8px;
  }
}
@media (max-width: 768px) {
  /* Cartes trop ecrasees : 1 seule colonne KPI, mannequin masque
     (il ne peut plus jouer son role d arriere-plan glass) */
  .sport-tab .ov-layout {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 10px;
  }
  .sport-tab .ov-col-left,
  .sport-tab .ov-col-right {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 10px;
    z-index: auto;
  }
  .sport-tab .ov-gauge-group {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }
  .sport-tab .ov-layout > .ov-col-center {
    display: none !important;          /* mannequin masque a partir de 768px */
  }
  .sport-tab .ov-mannequin-wrap {
    display: none !important;
  }
}

/* Audit card responsive wrap : promu en standard global dans sante.css */


/* Carte MESSAGE DU COACH (sport-tab plan-adaptation-audit-slot) :
   reutilise le design natif .ov-analysis-card de sante.css en forcant la couleur
   principale (rose) via --ac-rgb. Tout sur une ligne quand collapsee. */
.sport-tab #plan-adaptation-audit-slot.ov-analysis-card,
.sport-tab #plan-adaptation-audit-slot {
  --ac-rgb: var(--p-base-rgb);
}
.sport-tab #plan-adaptation-audit-slot .bs-collapse > .bsc-summary {
  flex-wrap: nowrap !important;
}
.sport-tab #plan-adaptation-audit-slot .bs-collapse > .bsc-summary > .bsc-title {
  flex: 0 1 auto !important;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  color: var(--p-base);
  font-weight: 700;
}
.sport-tab #plan-adaptation-audit-slot .bs-collapse > .bsc-summary > .bsc-badges {
  margin-left: auto !important;
  justify-content: flex-end !important;
  flex: 0 1 auto !important;
}


/* ============================================================================
   Phase 3 : Plan jour par jour - grid 4 colonnes par semaine, hauteur x1.5
   etats visuels (planned=bleu, completed=vert, missed=rouge, partial=orange)
   titre colore par session_type (couleur dynamique --type-color)
   ============================================================================ */
.plan-grid-card { padding: .55rem 0 .85rem; }
.plan-grid-card .card-head { padding: 0 1.1rem .35rem; display:flex; align-items:center; gap:1rem; flex-wrap:wrap; }
.plan-grid-legend { display: flex; gap: .8rem; font-size: .65rem; color: #94a3b8; font-family: 'Menlo','Consolas',monospace; flex-wrap: wrap; }
.pgl-item { padding: .12rem .5rem; border-radius: 4px; border: 1px solid; }
.pgl-completed { color: #4ade80; border-color: rgba(34,197,94,.45); background: rgba(34,197,94,.08); }
.pgl-missed    { color: #fca5a5; border-color: rgba(239,68,68,.45); background: rgba(239,68,68,.08); }
.pgl-planned   { color: #93c5fd; border-color: rgba(59,130,246,.45); background: rgba(59,130,246,.08); }
.pgl-partial   { color: #fdba74; border-color: rgba(249,115,22,.45); background: rgba(249,115,22,.08); }

.plan-grid-weeks {
  display: flex; flex-direction: row; align-items: stretch;
  gap: .65rem;
  padding: .25rem 1.1rem 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding: 1.1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--p-base-rgb), .4) transparent;
}
.plan-grid-weeks { scrollbar-width: none; -ms-overflow-style: none; }
.plan-grid-weeks::-webkit-scrollbar { display: none; height: 0; }

/* Week header devient separateur vertical compact entre sessions */
.plan-week-header {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: .5rem .55rem;
  background: rgba(255, 255, 255, .03);
  border-radius: 6px;
  border-top: 3px solid rgba(var(--p-base-rgb), .5);
  font-family: 'Menlo','Consolas',monospace;
  min-width: 70px; align-self: stretch;
}
.pwh-label { font-size: .8rem; font-weight: 700; color: var(--p-base); }
.pwh-phase { font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; color: #cbd5e1; margin-top: .2rem; text-align: center; }
.pwh-dates { font-size: .58rem; color: #64748b; margin-top: .35rem; text-align: center; line-height: 1.3; }
.plan-week-header.phase-base    { border-top-color: #38bdf8; }
.plan-week-header.phase-build   { border-top-color: #f59e0b; }
.plan-week-header.phase-peak    { border-top-color: #ef4444; }
.plan-week-header.phase-taper   { border-top-color: #22c55e; }
.plan-week-header.phase-recovery{ border-top-color: #14b8a6; }

.pgs-card {
  flex: 0 0 calc((100% - 2 * .65rem - 70px) / 3);
  min-width: 280px; max-width: 540px;
  scroll-snap-align: start;
  display: flex; flex-direction: column; gap: .35rem;
  height: 425px;
  max-height: 425px;
  overflow-y: auto;
  padding: .65rem .8rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-left: 3px solid rgba(var(--p-base-rgb), .35);
  background: linear-gradient(135deg, rgba(20,20,23,.55) 0%, rgba(20,20,23,.4) 100%);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  font-size: .82rem;
  transition: transform .15s, box-shadow .2s, border-color .15s;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.pgs-card::-webkit-scrollbar { width: 0; height: 0; display: none; }
.pgs-card:hover { transform: translateY(-2px); box-shadow: 0 4px 18px rgba(0,0,0,.3); }

.pgs-state-completed {
  border-color: rgba(34,197,94,.35);
  border-left-color: #22c55e;
  background:
    radial-gradient(circle at top right, rgba(34,197,94,.10), transparent 60%),
    linear-gradient(135deg, rgba(34,197,94,.08) 0%, rgba(20,20,23,.5) 100%);
  box-shadow: inset 4px 0 10px -6px rgba(34,197,94,.45);
}
.pgs-state-missed {
  border-color: rgba(239,68,68,.4);
  border-left-color: #ef4444;
  background:
    radial-gradient(circle at top right, rgba(239,68,68,.10), transparent 60%),
    linear-gradient(135deg, rgba(239,68,68,.08) 0%, rgba(20,20,23,.5) 100%);
  box-shadow: inset 4px 0 10px -6px rgba(239,68,68,.45);
}
.pgs-state-planned {
  border-color: rgba(59,130,246,.35);
  border-left-color: #3b82f6;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.10), transparent 60%),
    linear-gradient(135deg, rgba(59,130,246,.08) 0%, rgba(20,20,23,.5) 100%);
  box-shadow: inset 4px 0 10px -6px rgba(59,130,246,.4);
}
.pgs-state-partial {
  border-color: rgba(249,115,22,.4);
  border-left-color: #f97316;
  background:
    radial-gradient(circle at top right, rgba(249,115,22,.10), transparent 60%),
    linear-gradient(135deg, rgba(249,115,22,.08) 0%, rgba(20,20,23,.5) 100%);
  box-shadow: inset 4px 0 10px -6px rgba(249,115,22,.45);
}
.pgs-state-skipped, .pgs-state-replaced {
  border-color: rgba(168,85,247,.35);
  border-left-color: #a855f7;
}

.pgs-card.pgs-today {
  --type-color: var(--p-base) !important;
  border: 1.5px solid var(--p-base);
  border-left: 3px solid var(--p-base);
  background:
    radial-gradient(ellipse at top left, rgba(var(--p-base-rgb), .22) 0%, transparent 60%),
    linear-gradient(180deg, rgba(var(--p-base-rgb), .14) 0%, rgba(var(--p-base-rgb), .06) 100%),
    rgba(40,30,38,.55);
  box-shadow:
    inset 4px 0 12px -6px rgba(var(--p-base-rgb), .55),
    0 0 0 1px rgba(var(--p-base-rgb), .25),
    0 0 12px rgba(var(--p-base-rgb), .38),
    0 0 26px rgba(var(--p-base-rgb), .14),
    inset 0 0 14px rgba(var(--p-base-rgb), .08);
  position: relative;
  z-index: 2;
  padding-top: 1.45rem;
  animation: pgs-today-pulse 3s ease-in-out infinite;
}
.pgs-card.pgs-today .pgs-day,
.pgs-card.pgs-today .pgs-date,
.pgs-card.pgs-today .pgs-title { color: var(--p-base) !important; }
.pgs-card.pgs-today::before {
  content: 'AUJOURD\2019HUI';
  position: absolute;
  top: -1.5px; left: 50%;
  transform: translateX(-50%);
  font-size: .58rem; font-weight: 700; letter-spacing: .14em;
  background: var(--p-base);
  color: #0b0b0f;
  padding: .29rem .7rem .31rem;
  border-radius: 0 0 7px 7px;
  box-shadow: 0 3px 8px rgba(var(--p-base-rgb), .5);
  z-index: 3;
  white-space: nowrap;
  line-height: 1;
}
@keyframes pgs-today-pulse {
  0%, 100% { box-shadow:
    inset 4px 0 12px -6px rgba(var(--p-base-rgb), .55),
    0 0 0 1px rgba(var(--p-base-rgb), .25),
    0 0 12px rgba(var(--p-base-rgb), .38),
    0 0 26px rgba(var(--p-base-rgb), .14),
    inset 0 0 14px rgba(var(--p-base-rgb), .08); }
  50%      { box-shadow:
    inset 4px 0 14px -6px rgba(var(--p-base-rgb), .65),
    0 0 0 1px rgba(var(--p-base-rgb), .32),
    0 0 16px rgba(var(--p-base-rgb), .50),
    0 0 32px rgba(var(--p-base-rgb), .20),
    inset 0 0 18px rgba(var(--p-base-rgb), .12); }
}

.pgs-head { display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: .3rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.pgs-day  { font-size: .7rem; font-weight: 700; letter-spacing: .08em; color: #cbd5e1; }
.pgs-date { font-size: .68rem; color: #94a3b8; font-family: 'Menlo','Consolas',monospace; }

.pgs-title {
  font-size: .92rem; font-weight: 700; line-height: 1.25;
  color: var(--type-color, #e4e4e7);
  margin-top: .15rem;
}
.pgs-meta { font-size: .72rem; color: #a1a1aa; font-family: 'Menlo','Consolas',monospace; }
.pgs-obj  { font-size: .76rem; color: #d4d4d8; font-style: italic; }
.pgs-desc { font-size: .76rem; color: #cbd5e1; line-height: 1.4; }

.pgs-blocks { display: flex; flex-direction: column; gap: .15rem; font-size: .72rem; color: #94a3b8; padding: .25rem .35rem; background: rgba(0,0,0,.2); border-radius: 4px; }
.pgs-blocks b { color: #d4d4d8; font-weight: 600; }
.pgs-block { line-height: 1.3; }

.pgs-structured { font-size: .72rem; color: #94a3b8; }
.pgs-structured > summary { cursor: pointer; padding: .15rem 0; color: var(--p-base); font-weight: 600; font-size: .72rem; }
.pgs-structured ol { padding-left: 1.2rem; margin: .3rem 0; line-height: 1.4; }
.pgs-structured li { margin: .1rem 0; }

.pgs-focus { font-size: .72rem; color: #fde047; display: flex; gap: .35rem; align-items: flex-start; }
.pgs-reco  { font-size: .72rem; color: #d4d4d8; font-style: italic; }
.pgs-warn  { font-size: .72rem; color: #fca5a5; display: flex; gap: .35rem; align-items: flex-start;
             padding: .25rem .35rem; background: rgba(239,68,68,.08); border-left: 2px solid #ef4444; border-radius: 3px; }
.pgs-alt   { font-size: .72rem; color: #93c5fd; }

.pgs-post { margin-top: auto; padding: .35rem .45rem; background: rgba(34,197,94,.06);
            border-top: 1px solid rgba(34,197,94,.2); border-radius: 0 0 6px 6px; font-size: .72rem; }
.pgs-post-title { font-weight: 700; color: #4ade80; margin-bottom: .2rem; }
.pgs-post-body  { color: #d4d4d8; line-height: 1.4; }
.pgs-post-strong { color: #86efac; margin-top: .2rem; }
.pgs-post-imp    { color: #fde047; margin-top: .15rem; }

.pgs-note { font-size: .7rem; color: #cbd5e1; margin-top: auto; padding-top: .3rem; border-top: 1px dashed rgba(255,255,255,.1); }

/* Responsive : reduit le nombre de colonnes selon largeur */
/* media queries grid retirees - layout est desormais flex horizontal scroll */


/* Sections collapsibles dans les pgs-card */
.pgs-coll { margin: .15rem 0; border-top: 1px dashed rgba(255,255,255,.08); }
.pgs-coll > summary {
  list-style: none; cursor: pointer; padding: .25rem 0;
  font-size: .72rem; font-weight: 600; color: var(--p-base);
  text-transform: uppercase; letter-spacing: .04em;
  display: flex; align-items: center; gap: .35rem;
}
.pgs-coll > summary::before {
  content: "\25b8"; font-size: .7rem; transition: transform .15s;
  color: var(--p-base); opacity: .7;
}
.pgs-coll[open] > summary::before { transform: rotate(90deg); }
.pgs-coll > summary::-webkit-details-marker { display: none; }
.pgs-coll > summary::marker { display: none; }
.pgs-coll-body { padding: .25rem 0 .35rem .55rem; font-size: .76rem; line-height: 1.4; color: #d4d4d8; }
.pgs-coll-body .pgs-block { line-height: 1.35; margin: .12rem 0; }
.pgs-coll-body .pgs-block b { color: #e4e4e7; font-weight: 600; }
.pgs-coll-body .pgs-focus { color: #fde047; margin: .15rem 0; }
.pgs-coll-body .pgs-reco { color: #d4d4d8; font-style: italic; margin: .15rem 0; }
.pgs-coll-body .pgs-warn { color: #fca5a5; margin: .2rem 0; padding: .25rem .35rem; background: rgba(239,68,68,.08); border-left: 2px solid #ef4444; border-radius: 3px; }
.pgs-coll-body .pgs-alt { color: #93c5fd; margin: .15rem 0; }
.pgs-struct-list { padding-left: 1rem; margin: .25rem 0; line-height: 1.4; }
.pgs-struct-list li { margin: .1rem 0; }
.pgs-post-coll > summary { color: #4ade80; }
.pgs-post-coll > summary::before { color: #4ade80; }
.pgs-post-body { color: #d4d4d8; line-height: 1.4; margin-bottom: .2rem; }
.pgs-post-strong { color: #86efac; margin-top: .15rem; }
.pgs-post-imp { color: #fde047; margin-top: .12rem; }

/* Saisie ressenti inline */
.pgs-ressenti {
  margin-top: auto; padding-top: .35rem;
  border-top: 1px dashed rgba(255,255,255,.1);
  display: flex; gap: .3rem; align-items: flex-start;
}
.pgs-ressenti-input {
  flex: 1; resize: none; overflow: hidden;
  min-height: 1.6rem; max-height: 100px;
  padding: .25rem .4rem;
  background: rgba(20,20,23,.6); color: #e4e4e7;
  border: 1px solid rgba(255,255,255,.1); border-radius: 4px;
  font-size: .72rem; font-family: inherit; line-height: 1.3;
}
.pgs-ressenti-input:focus { outline: none; border-color: rgba(var(--p-base-rgb), .55); }
.pgs-ressenti-save {
  flex: 0 0 auto;
  padding: .25rem .4rem;
  background: rgba(var(--p-base-rgb), .25);
  color: var(--p-base);
  border: 1px solid rgba(var(--p-base-rgb), .4);
  border-radius: 4px; cursor: pointer; font-size: .72rem;
  display: flex; align-items: center; justify-content: center;
}
.pgs-ressenti-save:hover { background: rgba(var(--p-base-rgb), .35); }
.pgs-ressenti-save:disabled { opacity: .5; cursor: not-allowed; }


/* Score conformity badge (analyse post-seance Claude) */
.pgs-conf-score {
  display: inline-block;
  margin-left: .35rem;
  padding: .1rem .4rem;
  border-radius: 10px;
  font-size: .65rem;
  font-weight: 700;
  font-family: 'Menlo','Consolas',monospace;
  letter-spacing: 0;
  text-transform: none;
}
.pgs-conf-score.score-ok   { background: rgba(34,197,94,.18); color: #4ade80; border: 1px solid rgba(34,197,94,.4); }
.pgs-conf-score.score-warn { background: rgba(245,158,11,.18); color: #fbbf24; border: 1px solid rgba(245,158,11,.4); }
.pgs-conf-score.score-crit { background: rgba(239,68,68,.18); color: #f87171; border: 1px solid rgba(239,68,68,.4); }
.pgs-conf-pending {
  display: inline-block;
  margin-left: .35rem;
  padding: .1rem .4rem;
  border-radius: 10px;
  font-size: .6rem;
  font-weight: 600;
  font-family: 'Menlo','Consolas',monospace;
  text-transform: none;
  letter-spacing: 0;
  background: rgba(255,255,255,.08);
  color: #94a3b8;
  border: 1px solid rgba(255,255,255,.12);
}


/* Carte EVALUATION DU PLAN — design pattern audit standard avec couleur principale */
.sport-tab #plan-evaluation-audit-slot.ov-analysis-card,
.sport-tab #plan-evaluation-audit-slot {
  --ac-rgb: var(--p-base-rgb);
}
.sport-tab #plan-evaluation-audit-slot .bs-collapse > .bsc-summary > .bsc-title {
  color: var(--p-base);
  font-weight: 700;
}


/* Bouton reanalyser session post-seance — adopte le pattern standard .bs-spinner (audit cards) */
.pgs-reanalyse {
  width: 22px; height: 22px;
  padding: 0;
  vertical-align: middle;
  margin-left: .35rem;
}
.pgs-reanalyse svg { display: block; width: 14px; height: 14px; }


/* Bloc Realise dans post-analyse Claude (liste activities du jour, planifiees + extras) */
.pgs-realise {
  margin-bottom: .35rem;
  padding: .3rem .45rem;
  background: rgba(34,197,94,.06);
  border-left: 2px solid rgba(34,197,94,.5);
  border-radius: 3px;
  font-size: .72rem;
}
.pgs-realise-label {
  font-weight: 600; color: #4ade80; margin-bottom: .2rem;
  text-transform: uppercase; letter-spacing: .04em; font-size: .65rem;
}
.pgs-realise-row {
  display: flex; gap: .4rem; align-items: baseline; flex-wrap: wrap;
  padding: .1rem 0;
}
.pgs-realise-type {
  font-family: 'Menlo','Consolas',monospace; color: #d4d4d8; font-weight: 600;
}
.pgs-realise-meta {
  color: #94a3b8; font-family: 'Menlo','Consolas',monospace;
}


/* Cartes activite hors plan (orphan dates) - violet */
.pgs-state-orphan {
  border-color: rgba(168,85,247,.4);
  border-left-color: #a855f7;
  background:
    radial-gradient(circle at top right, rgba(168,85,247,.10), transparent 60%),
    linear-gradient(135deg, rgba(168,85,247,.08) 0%, rgba(20,20,23,.5) 100%);
  box-shadow: inset 4px 0 10px -6px rgba(168,85,247,.45);
}
.pgs-orphan-pending {
  font-size: .72rem; color: #94a3b8; font-style: italic;
  padding: .35rem 0; border-top: 1px dashed rgba(255,255,255,.1);
}


/* Activity matchee a la session planifiee : highlight vert dans pgs-realise */
.pgs-realise-row.pgs-realise-matched {
  background: rgba(34,197,94,.12);
  border-left: 2px solid #22c55e;
  padding: .15rem .35rem;
  border-radius: 3px;
  margin: .1rem 0;
}
.pgs-realise-row.pgs-realise-matched .pgs-realise-type {
  color: #4ade80;
  font-weight: 700;
}
.pgs-realise-row.pgs-realise-matched .pgs-realise-meta { color: #86efac; }
.pgs-realise-row.pgs-realise-matched::before {
  content: '¹3';   /* checkmark */
  color: #22c55e;
  margin-right: .35rem;
  font-weight: 900;
}

/* Prochaines semaines integrees dans la carte audit GENERATION DU PLAN */
.audit-next-weeks { margin-top: 1rem; padding-top: .8rem; border-top: 1px dashed rgba(255,255,255,.08); }
.audit-next-weeks .bs-section-summary {
  display: flex; align-items: center; gap: .5rem;
  cursor: pointer; list-style: none;
  font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--p-base); padding: .25rem 0;
}
.audit-next-weeks .bs-section-summary::-webkit-details-marker { display: none; }
.audit-next-weeks .bs-fb-chev { transition: transform .2s; display: inline-block; font-size: .9em; }
.audit-next-weeks[open] .bs-fb-chev,
.audit-next-weeks details[open] .bs-fb-chev { transform: rotate(90deg); }
.audit-nw-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.audit-nw-row {
  background: rgba(255,255,255,.025);
  border-left: 3px solid rgba(236,72,153,.5);
  border-radius: 6px;
  padding: .55rem .7rem;
}
.audit-nw-row.phase-base       { border-left-color: #60a5fa; }
.audit-nw-row.phase-build      { border-left-color: #22c55e; }
.audit-nw-row.phase-peak       { border-left-color: #f59e0b; }
.audit-nw-row.phase-taper      { border-left-color: #a78bfa; }
.audit-nw-row.phase-recovery   { border-left-color: #94a3b8; }
.audit-nw-row .nw-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .78rem; font-weight: 600;
}
.audit-nw-row .nw-phase { color: var(--p-base); letter-spacing: .04em; }
.audit-nw-row .nw-vol   { color: #94a3b8; font-size: .72rem; }
.audit-nw-row .nw-coach { font-size: .76rem; color: #cbd5e1; margin-top: .25rem; line-height: 1.4; }
.audit-nw-row .nw-sessions { font-size: .7rem; color: #94a3b8; margin-top: .3rem; font-family: Consolas, monospace; }

/* ============================================================================
   Carte unifiee 'Position dans le plan' (fusion Macro + Adherence + extras)
   ============================================================================ */
.ppc-card { display: flex; flex-direction: column; gap: .9rem; }
.ppc-card .card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.ppc-obj-pill {
  font-size: .72rem; font-weight: 600;
  background: rgba(var(--p-base-rgb), .14);
  color: var(--p-base);
  border: 1px solid rgba(var(--p-base-rgb), .35);
  padding: .2rem .55rem; border-radius: 999px;
  letter-spacing: .03em;
}

.ppc-kpi-row {
  display: grid; gap: .6rem;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}
.ppc-kpi {
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
  border-left: 3px solid rgba(var(--p-base-rgb), .5);
  border-radius: 8px;
  padding: .55rem .7rem;
  display: flex; flex-direction: column; gap: .15rem;
  min-height: 4.6rem; justify-content: center;
}
.ppc-kpi.phase-base       { border-left-color: #0ea5e9; }
.ppc-kpi.phase-build      { border-left-color: #f59e0b; }
.ppc-kpi.phase-peak       { border-left-color: #ef4444; }
.ppc-kpi.phase-taper      { border-left-color: #22c55e; }
.ppc-kpi.phase-recovery   { border-left-color: #14b8a6; }
.ppc-kpi-val {
  font-size: 1.35rem; font-weight: 700; line-height: 1.05;
  color: #f1f5f9; font-variant-numeric: tabular-nums;
}
.ppc-kpi-val .ppc-kpi-sub  { font-size: .9rem; color: #94a3b8; font-weight: 500; }
.ppc-kpi-val .ppc-kpi-unit { font-size: .82rem; color: #94a3b8; font-weight: 500; margin-left: .12rem; }
.ppc-kpi-lbl {
  font-size: .65rem; font-weight: 600; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .07em;
}

.ppc-block-head {
  font-size: .68rem; font-weight: 700; color: var(--p-base);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: .35rem;
}

.ppc-macro-block { display: flex; flex-direction: column; gap: .4rem; }
.ppc-macro-bar {
  position: relative; display: flex; height: 28px; border-radius: 6px; overflow: hidden;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}
.ppc-macro-bar .macro-seg {
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  border-right: 1px solid rgba(0,0,0,.35);
}
.ppc-macro-bar .macro-seg:last-child { border-right: 0; }
.ppc-macro-bar .macro-marker {
  position: absolute; top: -3px; bottom: -3px; width: 3px;
  background: var(--p-base);
  box-shadow: 0 0 8px rgba(var(--p-base-rgb), .85), 0 0 16px rgba(var(--p-base-rgb), .35);
  border-radius: 2px;
  z-index: 3;
  pointer-events: none;
}
.ppc-macro-bar .macro-marker-badge {
  position: absolute; bottom: calc(100% + 4px); left: 50%;
  transform: translateX(-50%);
  background: var(--p-base); color: #0b0b0f;
  font-size: .54rem; font-weight: 700; letter-spacing: .12em;
  padding: .14rem .38rem; border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(var(--p-base-rgb), .55);
  pointer-events: none;
}
.ppc-macro-bar .macro-marker-badge::after {
  content: ''; position: absolute; left: 50%; top: 100%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--p-base);
}
.ppc-macro-bar .macro-marker-dot {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--p-base);
  box-shadow: 0 0 8px rgba(var(--p-base-rgb), .9), 0 0 0 2px rgba(15,15,19,.95);
}
.ppc-macro-bar { overflow: visible; }
.ppc-macro-legend {
  display: flex; flex-wrap: wrap; gap: .35rem .8rem;
  font-size: .68rem; color: #94a3b8;
}
.ppc-macro-legend .ml-item b { color: #cbd5e1; font-weight: 600; }
.ppc-macro-legend .ml-item.phase-base       b { color: #7dd3fc; }
.ppc-macro-legend .ml-item.phase-build      b { color: #fcd34d; }
.ppc-macro-legend .ml-item.phase-peak       b { color: #fca5a5; }
.ppc-macro-legend .ml-item.phase-taper      b { color: #86efac; }
.ppc-macro-legend .ml-item.phase-recovery   b { color: #5eead4; }

.ppc-grid-2col {
  display: grid; gap: .9rem;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 720px) { .ppc-grid-2col { grid-template-columns: 1fr; } }

.ppc-vol-block { display: flex; flex-direction: column; gap: .25rem; }
.ppc-spark { display: block; max-height: 60px; }

.ppc-type-block { display: flex; flex-direction: column; gap: .35rem; }
.ppc-type-bars { display: flex; flex-direction: column; gap: .25rem; }
.ppc-type-row { display: grid; grid-template-columns: 120px 1fr 36px; gap: .5rem; align-items: center; font-size: .74rem; }
.ppc-type-lbl { color: #cbd5e1; font-weight: 500; }
.ppc-type-bar { height: 8px; background: rgba(255,255,255,.05); border-radius: 4px; overflow: hidden; }
.ppc-type-fill { height: 100%; border-radius: 4px; transition: width .25s; }
.ppc-type-n { font-size: .7rem; color: #94a3b8; text-align: right; font-variant-numeric: tabular-nums; }

.ppc-adh-block { display: flex; flex-direction: column; gap: .25rem; }

/* Bloc zones FC (Z1-Z5) dans la carte 'Position dans le plan' */
.ppc-zones-block { display: flex; flex-direction: column; gap: .35rem; }
.ppc-zones-bars  { display: flex; flex-direction: column; gap: .25rem; }
.ppc-zones-block .ppc-type-row { grid-template-columns: 110px 1fr 60px; }
.ppc-zones-block .ppc-type-lbl b { font-weight: 700; }
.ppc-empty-zones {
  font-size: .72rem; color: #94a3b8; font-style: italic;
  padding: .6rem; background: rgba(255,255,255,.02); border-radius: 6px;
  text-align: center;
}

/* Carte 'Position dans le plan' collapsible */
.ppc-card .ppc-details summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: .8rem; flex-wrap: wrap; padding: 0;
}
.ppc-head-left  { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.ppc-head-right { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.ppc-card .ppc-details summary::-webkit-details-marker { display: none; }
.ppc-chev {
  display: inline-block;
  font-size: .85rem;
  color: var(--p-base);
  transition: transform .2s;
  flex-shrink: 0;
}
.ppc-card .ppc-details[open] .ppc-chev { transform: rotate(90deg); }
.ppc-body {
  display: flex; flex-direction: column; gap: .9rem;
  margin-top: .8rem;
}

/* Z2 plus court : ajuste largeur colonne label zones */
.ppc-zones-block .ppc-type-row { grid-template-columns: 130px 1fr 64px; }

/* Score satisfaction du plan dans le header de la carte */
.ppc-sat-score {
  display: inline-flex; align-items: baseline; gap: .1rem;
  font-weight: 700; font-variant-numeric: tabular-nums;
  padding: .2rem .55rem; border-radius: 6px;
  border: 1px solid;
  background: rgba(255,255,255,.03);
  cursor: help;
  position: relative;
}
.ppc-sat-val  { font-size: 1.05rem; }
.ppc-sat-unit { font-size: .68rem; opacity: .65; font-weight: 600; }
.ppc-sat-score.sat-ok   { color: #4ade80; border-color: rgba(74,222,128,.45); background: rgba(74,222,128,.08); }
.ppc-sat-score.sat-warn { color: #fb923c; border-color: rgba(251,146,60,.45); background: rgba(251,146,60,.08); }
.ppc-sat-score.sat-crit { color: #ef4444; border-color: rgba(239,68,68,.45); background: rgba(239,68,68,.08); }

/* Tooltip sur sat-score (reuse pattern data-score-help) */
.ppc-sat-score[data-score-help] { cursor: help; }
.ppc-sat-score[data-score-help]::after {
  content: attr(data-score-help);
  position: absolute; bottom: calc(100% + 10px); right: 0;
  z-index: 1000; background: rgba(15,15,19,.98); color: #e4e4e7;
  border: 1px solid rgba(255,255,255,.12); border-radius: 10px;
  padding: .7rem .85rem; font-size: .72rem; font-weight: 400;
  line-height: 1.5; letter-spacing: 0; text-transform: none;
  white-space: pre-line; width: 300px; max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,.6); pointer-events: none;
  backdrop-filter: blur(16px) saturate(180%);
  opacity: 0; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
}
.ppc-sat-score[data-score-help]:hover::after { opacity: 1; transform: translateY(0); }

/* Ellipsis securite sur labels distribution types */
.ppc-type-lbl {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.ppc-sat-score.sat-empty { color: #94a3b8; border-color: rgba(148,163,184,.35); background: rgba(148,163,184,.06); }

/* Aligne le header POSITION DANS LE PLAN sur la carte audit (meme structure) */
.ppc-card details summary.card-head::after { content: none; }
.ppc-card .ppc-details summary {
  align-items: center !important;
  baseline: unset;
  min-height: 2.2rem;
  padding: .15rem 0;
}
.ppc-card .card-title {
  display: inline-flex; align-items: center;
  line-height: 1.1;
}
.ppc-card .ppc-head-right { gap: .8rem; }
.ppc-card .ppc-head-right .bs-score-big { margin-left: .15rem; }

/* Pin standard dans la carte 'Position dans le plan' (reuse style global .bsc-pin) */
.ppc-head-right .bsc-pin { margin-left: .15rem; }

/* ============================================================================
   6 KPI haut vue Plan d entrainement — standard .card-pri (--card-rgb dynamique)
   ============================================================================ */
.plan-kpis-v2 {
  display: grid; gap: .7rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: .85rem;
}
@media (max-width: 1280px) { .plan-kpis-v2 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .plan-kpis-v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px)  { .plan-kpis-v2 { grid-template-columns: 1fr; } }

.plan-kpi-card {
  display: flex; flex-direction: column; gap: .25rem;
  min-height: 5.6rem;
  cursor: help;
}
.plan-kpi-card .pkc-label {
  font-size: .65rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(var(--card-rgb), .9);
  font-family: 'Menlo','Consolas',monospace;
}
.plan-kpi-card .pkc-value {
  display: flex; align-items: baseline; gap: .25rem;
  font-variant-numeric: tabular-nums; line-height: 1.05;
}
.plan-kpi-card .pkc-big {
  font-size: 1.55rem; font-weight: 700;
  color: rgb(var(--card-rgb));
  text-shadow: 0 0 16px rgba(var(--card-rgb), .35);
}
.plan-kpi-card .pkc-unit {
  font-size: .72rem; font-weight: 500; color: #94a3b8;
}
.plan-kpi-card .pkc-trend {
  margin-left: auto;
  font-size: 1.05rem; font-weight: 700;
}
.plan-kpi-card .pkc-sub {
  font-size: .68rem; color: #cbd5e1; line-height: 1.3;
  margin-top: .1rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.plan-kpi-card .pkc-bar {
  height: 4px; border-radius: 2px;
  background: rgba(var(--card-rgb), .1);
  margin-top: .35rem;
  overflow: hidden;
}
.plan-kpi-card .pkc-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(var(--card-rgb), .9), rgba(var(--card-rgb), .55));
  box-shadow: 0 0 6px rgba(var(--card-rgb), .5);
  transition: width .3s;
}

/* On masque l ancien style .plan-kpis si encore utilise ailleurs */
.plan-kpis { display: none !important; }

/* Post-analyse Claude : vert allume si analyse, vert eteint si pas encore */
.pgs-post-coll > summary { color: #4ade80; transition: color .2s, opacity .2s; }
.pgs-post-coll > summary::before { color: #4ade80; }
.pgs-post-coll.is-pending > summary {
  color: #4ade80;
  opacity: .42;
  filter: saturate(.55);
}
.pgs-post-coll.is-pending > summary::before { color: #4ade80; opacity: .7; }
.pgs-post-coll.is-pending:hover > summary { opacity: .65; filter: saturate(.75); }

/* Journal sport : alignement hauteur filtres avec standard chrono-bar (63px toolbar) */
.journ-filter-toggle {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .76rem; color: #cbd5e1;
  padding: .25rem .55rem;
  background: rgba(39, 39, 42, .5);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 4px;
  font-family: 'Menlo','Consolas',monospace;
  cursor: pointer;
  height: 28px;
  box-sizing: border-box;
}
.journ-filter-toggle input[type="checkbox"] { margin: 0; }
.journ-add-btn {
  display: inline-flex; align-items: center; gap: .3rem;
  height: 28px;
  margin-left: .25rem;
}
/* Force consistance hauteur sur period-btn et chrono-input dans la chrono-bar */
.chrono-bar .period-btn,
.chrono-bar .chrono-input { height: 28px; box-sizing: border-box; }
.chrono-filters { align-items: center; min-height: 28px; }

/* ============================================================================
   A3a Responsive Mobile (chirurgical) — sport claude-health (≤ 768px)
   ============================================================================ */
@media (max-width: 768px) {
  .sport-layout {
    grid-template-columns: 0 1fr !important;
  }
  .sport-layout #sport-sidebar {
    visibility: hidden;
    border-right: none;
    position: fixed;
    top: 0; left: 0;
    width: 80%; max-width: 280px;
    height: 100vh;
    background: rgba(20, 20, 23, .98);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform .25s ease-out, visibility .25s;
    overflow-y: auto;
  }
  .sport-layout.sidebar-shown #sport-sidebar {
    visibility: visible;
    transform: translateX(0);
  }

  .sport-toolbar { flex-wrap: wrap !important; gap: .35rem !important; padding: .4rem !important; }

  /* Grilles KPI : passent en 1 col */
  .ov-kpi-grid,
  .plan-kpis-v2,
  .kpi-row,
  .ppc-kpi-row,
  .ppc-grid-2col,
  .ppc-zones-bars,
  .ppc-type-bars {
    grid-template-columns: 1fr !important;
    gap: .5rem !important;
  }

  /* Carousel sessions : cards 100% largeur, 1 visible */
  .plan-grid-weeks .pgs-card {
    flex: 0 0 calc(100% - 1rem) !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  /* Mannequin sport : réduire */
  .sport-tab .ov-mannequin-wrap {
    transform: scale(.7) !important;
    transform-origin: top center !important;
    margin-bottom: -8rem !important;
  }

  /* Modale audit config / rules : full width */
  .std-side .modal { max-width: 95vw !important; }

  /* Cartes audit : padding compact */
  .bs-collapse, .bsc-summary { padding: .35rem .5rem !important; }
}

/* ============================================================================
   FIX MOBILE — sport-tab hauteur fixe pour scroll interne (≤ 768px)
   Bug : portal.css force body overflow-y:auto + main#content height:auto pour
   activer le scroll natif mobile. Mais .sport-tab utilise un flex column avec
   .sport-content / #chat-messages en flex:1 overflow-y:auto qui necessite que
   le parent ait une hauteur DETERMINEE (pas auto).
   Solution : sur ces 3 tabs uniquement, forcer height fixe = viewport - header,
   et le main du layout prend toute la grid (le sidebar mobile est en fixed
   donc out-of-flow).
   ============================================================================ */
@media (max-width: 768px) {
  .sport-tab {
    height: calc(100vh - 50px) !important;
    height: calc(100dvh - 50px) !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 50px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  .sport-layout {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
  }
  /* Le main prend toute la largeur (sidebar est en position:fixed, out of flow) */
  #sport-main {
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
  }
}

/* ============================================================================
   STANDARD TOOLBAR — uniforme reference Biometrie sante (Vincent 2026-05-10)
   Principle DB #102 — zone figee + controls coherents inter-tabs et inter-VMs.
   ============================================================================ */
.sport-toolbar {
  min-height: 3.15rem !important;
  box-sizing: border-box !important;
}
.sport-toolbar input[type="search"],
.sport-toolbar input[type="text"],
.sport-toolbar input[type="date"],
.sport-toolbar input[type="number"],
.sport-toolbar select,
.sport-toolbar button.t-btn {
  background: rgba(39, 39, 42, .45);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
  padding: .22rem .55rem;
  font-size: .82rem;
  font-family: 'Menlo','Consolas',monospace;
  height: 28px;
  box-sizing: border-box;
  line-height: 1.2;
}
.sport-toolbar button.t-btn:hover:not(:disabled) {
  background: rgba(var(--p-base-rgb), .18);
  color: var(--p-base);
  border-color: rgba(var(--p-base-rgb), .35);
}
.sport-toolbar label {
  font-size: .82rem;
  color: #d4d4d8;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  line-height: 1.2;
}
