/* StravaCoach – dark theme */

:root {
  --bs-body-bg: #111827;
  --card-bg: #1f2937;
  --border-color: #374151;
}

body {
  background: var(--bs-body-bg);
  color: #e5e7eb;
  font-size: 0.9rem;
}

.navbar {
  border-bottom: 1px solid var(--border-color) !important;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.card-header {
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border-color);
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ─── KPI Cards ─────────────────────────────────────────── */
.card-kpi {
  border-radius: 12px;
  transition: transform 0.15s;
}
.card-kpi:hover { transform: translateY(-2px); }

.kpi-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
}
.kpi-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-top: 2px;
}
.kpi-sub {
  font-size: 0.75rem;
  margin-top: 4px;
  min-height: 1rem;
}

/* ─── Zones chart ────────────────────────────────────────── */
.zones-chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
  font-weight: 900;
  pointer-events: none;
}

.zones-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.zone-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.zone-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.zone-name {
  width: 118px;
  font-weight: 600;
  font-size: 0.76rem;
  white-space: nowrap;
}
.zone-bar-wrap {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
}
.zone-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}
.zone-pct {
  width: 36px;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 600;
}
.zone-time {
  width: 50px;
  text-align: right;
  font-size: 0.72rem;
}

/* ─── Activities feed ────────────────────────────────────── */
.activities-feed {
  max-height: 420px;
  overflow-y: auto;
}

.activity-card {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.1s;
}
.activity-card:hover { background: rgba(255,255,255,0.03); }
.activity-card:last-child { border-bottom: none; }

.activity-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}
.activity-day {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}
.activity-type {
  font-size: 0.72rem;
  color: #9ca3af;
}
.activity-name {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: #d1d5db;
}

/* Mini zone bars */
.zone-mini-bars {
  display: flex;
  gap: 2px;
  height: 20px;
  align-items: flex-end;
}
.zone-mini-bar-wrap {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  height: 100%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.zone-mini-bar {
  width: 100%;
  border-radius: 2px;
  min-height: 2px;
}

/* ─── Tables ─────────────────────────────────────────────── */
.table-dark {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(255,255,255,0.04);
  --bs-table-border-color: var(--border-color);
}
.table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  font-weight: 600;
  border-color: var(--border-color);
}
.table td {
  border-color: var(--border-color);
  vertical-align: middle;
}

/* ─── Sport badges ───────────────────────────────────────── */
.badge { font-weight: 600; }

.sport-badge-vélo   { background: #1a56db; }
.sport-badge-velo   { background: #1a56db; }
.sport-badge-course { background: #0e9f6e; }
.sport-badge-marche { background: #7e3af2; }
.sport-badge-musculation { background: #e3a008; color:#000; }
.sport-badge-natation    { background: #0694a2; }
.sport-badge-autre  { background: #6b7280; }

/* ─── Plan page ──────────────────────────────────────────── */
.planned-text {
  font-size: 0.82rem;
  color: #93c5fd;
}

.activity-chip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  padding: 4px 8px;
  margin: 2px 0;
  font-size: 0.82rem;
  gap: 2px;
}

/* ─── Feedback détaillé ──────────────────────────────────── */
.feedback-day {
  border-bottom: 1px solid var(--border-color);
  padding: 12px 16px;
}
.feedback-day:last-child { border-bottom: none; }

.feedback-day-header {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fbbf24;
  margin-bottom: 6px;
}
.feedback-day-body {
  white-space: pre-wrap;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #d1d5db;
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace;
}

.week-fb-summary {
  border-bottom: 1px solid var(--border-color);
}
.week-fb-toggle {
  width: 100%;
  text-align: left;
  background: rgba(59,130,246,0.08);
  border: none;
  color: #e5e7eb;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.week-fb-toggle:hover { background: rgba(59,130,246,0.15); }
.week-fb-body {
  white-space: pre-wrap;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #cbd5e1;
  padding: 12px 16px;
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, monospace;
  background: rgba(0,0,0,0.15);
}

/* Scrollbar custom */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #374151; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #4b5563; }

/* text-orange for zone 4 */
.text-orange { color: #fd7e14 !important; }
.bg-orange   { background-color: #fd7e14 !important; }
