/* CBF SuperPrestige — Dark theme inspired by ZwiftPower */

/* A11y — focus visible global (clavier seulement, pas la souris).
   Override les outline:none locaux (DataTables filter, year select, etc). */
.sp-classement-container :focus-visible,
.sp-standalone-container :focus-visible,
.sp-info-page :focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
a:focus-visible {
  outline: 2px solid #00b4d8;
  outline-offset: 2px;
  border-radius: 3px;
}

:root {
  /* Backgrounds */
  --sp-bg-main: #1e2130;
  --sp-bg-card: #252838;
  --sp-bg-input: #2a2d3e;
  --sp-bg-deep: #1a1d2e;
  --sp-bg-deeper: #191c2a;
  --sp-bg-row-even: #222538;
  --sp-bg-row-hover: #2a2f48;

  /* Borders */
  --sp-border: #2a2d3e;
  --sp-border-pill: #3a3d4e;
  --sp-border-subtle: rgba(255, 255, 255, 0.08);

  /* Text */
  --sp-text-primary: #c8ccd4;
  --sp-text-secondary: #8a8d9a;
  --sp-text-muted: #6a6d7a;
  --sp-text-bright: #e8e8f0;
  --sp-text-white: #fff;
  --sp-text-dim: #b0b3c0;
  --sp-text-pts: #9ea1ac;
  --sp-text-detail: #a0a3b0;

  /* Accent — Rose/Pink */
  --sp-pink: #F7A6CD;
  --sp-pink-bright: #ff6eb4;
  --sp-pink-light: #ffb6d9;

  /* Accent — Teal/Blue */
  --sp-teal: #00b4d8;
  --sp-teal-light: #4dd4f0;
  --sp-blue: #3498db;
  --sp-blue-royal: #2563eb;
  --sp-cyan: #22d3ee;

  /* Status */
  --sp-green: #4ade80;
  --sp-red: #f87171;
  --sp-orange: #e67e22;
  --sp-yellow: #FFD700;
  --sp-purple: #9b59b6;
}

html {
  overflow-y: scroll;
}

.sp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  background-color: var(--sp-bg-main);
  border-radius: 8px;
  color: var(--sp-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.sp-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 24px 0;
  letter-spacing: 1.5px;
}

/* Title + year selector wrapper */
.sp-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.sp-title-row .sp-title,
.sp-title-row .sp-race-title {
  margin-bottom: 0;
}

/* "Super" en blanc lumineux avec glow */
.sp-title-super {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* "Prestige" en rose bling avec shimmer + glow */
.sp-title-prestige {
  background: linear-gradient(90deg, #F7A6CD, #ff6eb4, #ffb6d9, #ff6eb4, #F7A6CD);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: sp-shimmer 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(247, 166, 205, 0.6));
}

/* Année avec glow rose subtil */
.sp-title-year {
  color: var(--sp-pink);
  font-size: 26px;
  font-weight: 600;
  opacity: 0.8;
  text-shadow: 0 0 12px rgba(247, 166, 205, 0.4);
}

@keyframes sp-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Sparkle décoratif après le titre */
.sp-title::after {
  content: ' ✦';
  color: var(--sp-pink);
  animation: sp-sparkle 1.5s ease-in-out infinite;
  font-size: 20px;
}

@keyframes sp-sparkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ── Pill Filters ── */
.sp-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--sp-border);
}

.sp-pill-group {
  display: inline-flex;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--sp-border-pill);
}

.sp-pill {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--sp-bg-input);
  color: var(--sp-text-secondary);
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1.3;
}

.sp-pill:hover {
  background: #363950; /* hover state — intentional slightly lighter than --sp-bg-input */
  color: var(--sp-text-primary);
}

.sp-pill + .sp-pill {
  border-left: 1px solid var(--sp-border-pill);
}

/* Gender pills — orange/red active */
.sp-pill-gender.active {
  background: #e74c3c;
  color: #fff;
}

/* Age pills — blue active */
.sp-pill-age.active {
  background: #3498db;
  color: #fff;
}

/* Reset filters button */
.sp-pill-reset {
  margin-left: 8px;
  background: transparent;
  color: #e74c3c;
  border: 1px solid #e74c3c;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}
.sp-pill-reset:hover {
  background: #e74c3c;
  color: #fff;
}

/* Share button (filter bar) */
.sp-pill-share {
  background: transparent;
  color: #DC4793;
  border: 1px solid #DC4793;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.sp-pill-share:hover {
  background: #DC4793;
  color: #fff;
}
.sp-share-icon { font-size: 14px; line-height: 1; }
@media (max-width: 480px) {
  .sp-share-label { display: none; }
  .sp-pill-share { padding: 8px 10px; }
}

/* Share button (rider popup header) */
.sp-rider-share-btn {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 8px;
  background: transparent;
  color: #DC4793;
  border: 1px solid #DC4793;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  vertical-align: middle;
}
.sp-rider-share-btn:hover {
  background: #DC4793;
  color: #fff;
}

/* Toast (clipboard fallback feedback) */
.sp-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  background: #1e2130;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid #DC4793;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.sp-toast.sp-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Season info ── */
.sp-season-info {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--sp-text-muted);
  margin-right: auto;
  visibility: hidden;
}
.dataTables_filter .sp-season-info {
  visibility: visible;
}

.sp-container .dataTables_filter {
  display: flex !important;
  align-items: center;
  gap: 16px;
}



.sp-season-link {
  color: var(--sp-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.sp-season-link:hover {
  color: var(--sp-teal);
  text-decoration: underline;
}

.sp-season-total {
  color: var(--sp-text-primary);
  font-weight: 600;
}

.sp-season-sep {
  color: var(--sp-border-pill);
  margin: 0 4px;
}

/* Mobile compact (Pixel Fold cover ~412px portrait, smartphones étroits):
   masquer les séparateurs '|' et '—' qui flottent isolés au wrap.
   Le flex-wrap garde un layout propre sans barres orphelines. */
@media (max-width: 599px) {
  .sp-season-sep { display: none; }
  .sp-season-info { gap: 4px 10px; row-gap: 2px; }
  .sp-container .dataTables_filter { flex-wrap: wrap; gap: 8px; }
}

/* ── Search bar ── */
.sp-search-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

/* Hide raw table until DataTables wraps it — fade-in instead of snap */
.sp-dt-wrap { opacity: 0; transition: opacity 0.18s ease; }
.sp-dt-wrap:has(.dataTables_wrapper) { opacity: 1; }

/* ── DataTables Overrides (dark theme) ── */
.sp-container .dataTables_wrapper {
  color: var(--sp-text-primary);
}

.sp-container .dataTables_filter {
  margin-bottom: 12px;
}

.sp-container .dataTables_filter label {
  color: var(--sp-text-secondary);
  font-size: 13px;
}

.sp-container .dataTables_filter input {
  background: var(--sp-bg-input) !important;
  border: 1px solid var(--sp-border-pill) !important;
  border-radius: 4px !important;
  padding: 6px 12px !important;
  color: #e0e0e0 !important; /* search input text */
  font-size: 14px;
  margin-left: 8px;
}

.sp-container .dataTables_filter input:focus {
  outline: none;
  border-color: var(--sp-blue) !important;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.sp-container .dataTables_length {
  margin-bottom: 12px;
}

.sp-container .dataTables_length label {
  color: var(--sp-text-secondary);
  font-size: 13px;
}

.sp-container .dataTables_length select {
  background: var(--sp-bg-input);
  border: 1px solid var(--sp-border-pill);
  border-radius: 4px;
  padding: 4px 8px;
  color: var(--sp-text-primary);
  font-size: 13px;
}

.sp-container .dataTables_info {
  color: var(--sp-text-muted);
  font-size: 13px;
}



/* Table — shared dark theme for ALL DataTables */
.sp-container table.dataTable { width: 100% !important; border-collapse: separate; border-spacing: 0; }
.sp-container table.dataTable thead th { background: var(--sp-bg-card); color: var(--sp-text-secondary); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; padding: 14px 12px; border-bottom: 2px solid var(--sp-border-pill); white-space: nowrap; }
/* Sort indicators — visible on dark theme */
.sp-container table.dataTable thead th.sorting:before,
.sp-container table.dataTable thead th.sorting:after { opacity: 0.3; color: var(--sp-text-muted); }
.sp-container table.dataTable thead th.sorting:hover:before,
.sp-container table.dataTable thead th.sorting:hover:after { opacity: 0.6; }
.sp-container table.dataTable thead th.sorting_asc:before,
.sp-container table.dataTable thead th.sorting_desc:after { opacity: 1; color: var(--sp-teal); }
.sp-container table.dataTable thead th.sorting_asc:after { opacity: 0.3; color: var(--sp-text-muted); }
.sp-container table.dataTable thead th.sorting_desc:before { opacity: 0.3; color: var(--sp-text-muted); }
.sp-container table.dataTable tbody tr { background: var(--sp-bg-main); transition: background-color 0.12s ease; }
.sp-container table.dataTable tbody tr:nth-child(even) { background: var(--sp-bg-row-even); }
.sp-container table.dataTable tbody tr:hover { background: var(--sp-bg-row-hover) !important; }
.sp-container table.dataTable tbody td { padding: 7px 12px; border-bottom: 1px solid var(--sp-border); color: var(--sp-text-primary); font-size: 14px; font-variant-numeric: tabular-nums; vertical-align: middle; }

/* Ligne entière clickable (ouvre popup détail) — remplace la flèche DataTables responsive */
#sp-classement.dataTable tbody tr:not(.sp-detail-row) { cursor: pointer; }

/* Rank column */
#sp-classement.dataTable tbody td:first-child {
  text-align: center;
  width: 60px;
}

.sp-rank-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-weight: 600;
  color: var(--sp-text-secondary);
}

/* Medal badges for top 3 per category */
.sp-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.sp-medal-1 { background: #F7A6CD; box-shadow: 0 0 8px rgba(247, 166, 205, 0.5); }
.sp-medal-2 { background: #A0A0A0; }
.sp-medal-3 { background: #CD7F32; }

.sp-rank-jersey {
  display: inline-flex;
  align-items: center;
  margin-left: 3px;
  vertical-align: middle;
  opacity: 0.85;
}

/* Rank change arrows */
.sp-rank-up { color: var(--sp-green); font-size: 0.75em; margin-left: 3px; vertical-align: middle; white-space: nowrap; font-weight: 700; }
.sp-rank-down { color: var(--sp-red); font-size: 0.75em; margin-left: 3px; vertical-align: middle; white-space: nowrap; font-weight: 700; }

/* Rider name — clickable */
.sp-rider-name {
  color: var(--sp-teal);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
}

.sp-rider-name:hover {
  color: var(--sp-teal-light);
  text-decoration: underline;
}

.sp-expanded .sp-rider-name {
  color: var(--sp-teal-light);
}

/* Rider detail row */
.sp-detail-row td {
  background: var(--sp-bg-deeper) !important;
  padding: 4px 16px 8px !important;
  border-bottom: 2px solid var(--sp-border) !important;
  text-align: left;
}
/* Fade-in animation for popup content */
.sp-detail-row td > * {
  animation: sp-detail-in 0.18s ease-out;
}

.sp-progression { margin: 0 0 8px 0; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px 0; vertical-align: middle; }
.sp-prog-label { color: var(--sp-text-dim); font-size: 0.85em; margin-right: 6px; white-space: nowrap; }
.sp-prog-step { color: #e2e8f0; font-size: 0.85em; padding: 1px 4px; cursor: default; }
.sp-prog-up { color: var(--sp-green); }
.sp-prog-down { color: var(--sp-red); }
.sp-prog-final { font-weight: 700; color: var(--sp-cyan); }
.sp-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sp-prog-arrow { color: #475569; font-size: 0.75em; }

/* UCI ID badge */
.sp-uci-badge { margin-bottom: 8px; }
.sp-uci-badge a { color: var(--sp-text-dim); text-decoration: none; font-size: 0.85em; font-variant-numeric: tabular-nums; transition: color 0.15s; }
.sp-uci-badge a:hover { color: var(--sp-cyan); }
.sp-uci-label { display: inline-block; background: var(--sp-blue-royal); color: #fff; font-size: 0.75em; font-weight: 700; padding: 1px 5px; border-radius: 3px; letter-spacing: 0.5px; vertical-align: middle; margin-right: 4px; }
.sp-uci-ext { font-size: 0.85em; opacity: 0.5; }
.sp-detail-loading,
.sp-detail-error {
  color: var(--sp-text-muted);
  font-size: 13px;
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sp-detail-error { color: var(--sp-red); }

/* Spinner */
.sp-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--sp-border);
  border-top-color: var(--sp-teal);
  border-radius: 50%;
  animation: sp-spin 0.7s linear infinite;
}
@keyframes sp-spin { to { transform: rotate(360deg); } }
@keyframes sp-detail-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Detail mini-table */
.sp-detail-table {
  min-width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.sp-detail-table thead th {
  color: var(--sp-text-muted);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--sp-border);
  text-align: left;
  white-space: nowrap;
}

.sp-detail-table tbody td {
  padding: 6px 10px !important;
  color: var(--sp-text-detail);
  border-bottom: 1px solid var(--sp-bg-row-even) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.sp-detail-table tbody tr:hover td {
  background: rgba(255,255,255,0.03) !important;
}

.sp-detail-prestige { color: var(--sp-orange); }
.sp-detail-total { color: #fff; font-weight: 600; }

/* Excluded results (règle plafond) — soutien et total toujours comptés */
.sp-detail-excluded td {
  opacity: 0.35;
}
.sp-detail-excluded td.sp-detail-soutien,
.sp-detail-excluded td.sp-detail-total {
  opacity: 1;
}

/* Score column */
.sp-score-cell {
  white-space: nowrap;
  font-weight: 700;
  color: #fff;
  font-size: 15px;
}

/* Club badge */
#sp-classement .sp-club-badge { cursor: pointer; }
#sp-classement .sp-club-badge:hover { filter: brightness(1.3); }
.sp-club-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  border: 1px solid;
}

/* Club colors — cycled via PHP data attribute */
.sp-club-badge[data-club-color="0"] { color: #e74c3c; border-color: #e74c3c; }
.sp-club-badge[data-club-color="1"] { color: #3498db; border-color: #3498db; }
.sp-club-badge[data-club-color="2"] { color: #2ecc71; border-color: #2ecc71; }
.sp-club-badge[data-club-color="3"] { color: #e67e22; border-color: #e67e22; }
.sp-club-badge[data-club-color="4"] { color: #9b59b6; border-color: #9b59b6; }
.sp-club-badge[data-club-color="5"] { color: #1abc9c; border-color: #1abc9c; }
.sp-club-badge[data-club-color="6"] { color: #e91e63; border-color: #e91e63; }
.sp-club-badge[data-club-color="7"] { color: #f39c12; border-color: #f39c12; }
.sp-club-badge[data-club-color="8"] { color: #00bcd4; border-color: #00bcd4; }
.sp-club-badge[data-club-color="9"] { color: #8bc34a; border-color: #8bc34a; }
#sp-race-results .sp-club-badge { cursor: pointer; }
#sp-race-results .sp-club-badge:hover { filter: brightness(1.3); }
#sp-club-filter {
  background: #2ecc71;
  color: #fff;
  border-radius: 20px;
  padding: 7px 16px;
  font-weight: 700;
  font-size: 13px;
  border: 2px solid #27ae60;
  animation: sp-club-pop 0.25s ease-out;
}
#sp-club-filter:hover { background: #e74c3c; border-color: #c0392b; }
@keyframes sp-club-pop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Leader row */
#sp-classement.dataTable tbody tr.sp-leader {
  position: relative;
}

/* Effet 1 — Bordure rose à gauche */
#sp-classement.dataTable tbody tr.sp-leader td:first-child {
  border-left: 4px solid #F7A6CD;
}

/* Effet 2 — Fond rosé */
#sp-classement.dataTable tbody tr.sp-leader,
#sp-classement.dataTable tbody tr.sp-leader:nth-child(even) {
  background: rgba(247, 166, 205, 0.15) !important;
}

#sp-classement.dataTable tbody tr.sp-leader:hover {
  background: rgba(247, 166, 205, 0.22) !important;
}

/* Effet 3 — Glow complet (outline + ombre) */
#sp-classement.dataTable tbody tr.sp-leader td {
  box-shadow: 0 -1px 0 rgba(247, 166, 205, 0.4), 0 1px 0 rgba(247, 166, 205, 0.4);
}

#sp-classement.dataTable tbody tr.sp-leader td:first-child {
  box-shadow: 0 -1px 0 rgba(247, 166, 205, 0.4), 0 1px 0 rgba(247, 166, 205, 0.4), -4px 0 8px rgba(247, 166, 205, 0.3);
}

#sp-classement.dataTable tbody tr.sp-leader td:last-child {
  box-shadow: 0 -1px 0 rgba(247, 166, 205, 0.4), 0 1px 0 rgba(247, 166, 205, 0.4), 4px 0 8px rgba(247, 166, 205, 0.3);
}

/* Points columns */
.sp-pts { color: var(--sp-text-pts); }

/* Pagination */
.sp-container .dataTables_paginate .paginate_button {
  background: var(--sp-bg-input) !important;
  border: 1px solid var(--sp-border-pill) !important;
  border-radius: 4px !important;
  color: var(--sp-text-secondary) !important;
  padding: 5px 12px !important;
  margin: 0 2px !important;
  font-size: 13px;
}

.sp-container .dataTables_paginate .paginate_button:hover:not(.disabled) {
  background: #363950 !important; /* pill/pagination hover */
  color: #fff !important;
  border-color: var(--sp-blue) !important;
}

.sp-container .dataTables_paginate .paginate_button.current {
  background: var(--sp-blue) !important;
  color: #fff !important;
  border-color: var(--sp-blue) !important;
}

.sp-container .dataTables_paginate .paginate_button.disabled {
  opacity: 0.3;
}

.sp-no-data {
  text-align: center;
  padding: 60px 20px;
  color: var(--sp-text-muted);
  font-size: 16px;
}
.sp-season-preview {
  text-align: center;
  padding: 40px 20px 16px;
}
.sp-season-msg {
  font-size: 20px;
  font-weight: 600;
  color: var(--sp-text-main, #c8ccd4);
  margin-bottom: 8px;
}
.sp-season-next {
  font-size: 15px;
  color: var(--sp-text-muted, #6a6d7a);
  margin-bottom: 0;
}
.sp-season-next strong { color: var(--sp-blue, #00b4d8); }
.sp-preseason-cal { max-width: 900px; margin: 0 auto; }
.sp-reg-deadline {
  display: inline-block; font-size: 11px; font-weight: 700;
  color: #fff; background: var(--sp-orange, #e67e22);
  padding: 2px 8px; border-radius: 3px; margin-left: 6px;
}
.sp-reg-closed {
  display: inline-block; font-size: 11px; font-weight: 700;
  color: #fff; background: var(--sp-red, #f87171);
  padding: 2px 8px; border-radius: 3px; margin-left: 6px; opacity: 0.8;
}

/* ── Footer ── */
.sp-footer {
  text-align: center;
  padding: 24px 20px 16px;
  margin-top: 30px;
  border-top: 1px solid var(--sp-border, #2a2d3e);
  font-size: 12px;
  color: var(--sp-text-muted, #6a6d7a);
}
.sp-footer a { color: var(--sp-text-secondary, #8a8d9a); text-decoration: none; }
.sp-footer a:hover { color: var(--sp-teal, #00b4d8); }
.sp-footer-sep { margin: 0 8px; }

/* ── Push Notification Banner + Bell ── */
.sp-push-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 998;
  background: var(--sp-bg-card, #252838);
  border-top: 1px solid var(--sp-border, #2a2d3e);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.sp-push-banner.sp-push-show { transform: translateY(0); }
.sp-push-banner-inner {
  max-width: 800px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
}
.sp-push-banner-icon { flex-shrink: 0; }
.sp-push-banner-text { flex: 1; font-size: 14px; color: var(--sp-text-primary, #c8ccd4); }
.sp-push-banner-text strong { color: #fff; }
.sp-push-banner-text span { color: var(--sp-text-secondary, #8a8d9a); }
.sp-push-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
.sp-push-btn-accept {
  background: var(--sp-teal, #00b4d8); color: #fff; border: none;
  padding: 8px 20px; border-radius: 6px; font-weight: 600; font-size: 13px; cursor: pointer;
}
.sp-push-btn-accept:hover { background: #0096b7; }
.sp-push-btn-dismiss {
  background: transparent; color: var(--sp-text-secondary, #8a8d9a);
  border: 1px solid var(--sp-border-pill, #3a3d4e);
  padding: 8px 16px; border-radius: 6px; font-size: 13px; cursor: pointer;
}
.sp-push-btn-dismiss:hover { color: var(--sp-text-primary); border-color: var(--sp-text-secondary); }

.sp-push-bell {
  position: fixed; bottom: 80px; right: 30px; z-index: 997;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--sp-bg-card, #252838); color: var(--sp-teal, #00b4d8);
  border: 1px solid var(--sp-border, #2a2d3e);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: background 0.15s;
}
.sp-push-bell:hover { background: var(--sp-bg-row-hover, #2a2f48); }

.sp-push-topics {
  position: fixed; bottom: 130px; right: 30px; z-index: 998;
  background: var(--sp-bg-card, #252838); border: 1px solid var(--sp-border, #2a2d3e);
  border-radius: 8px; padding: 16px; min-width: 220px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.sp-push-topics-title { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 12px; }
.sp-push-topics label {
  display: block; font-size: 13px; color: var(--sp-text-primary, #c8ccd4);
  padding: 4px 0; cursor: pointer;
}
.sp-push-topics label input { margin-right: 8px; accent-color: var(--sp-teal, #00b4d8); }
.sp-push-btn-unsub {
  display: block; width: 100%; margin-top: 12px; padding: 6px 0;
  background: transparent; border: 1px solid var(--sp-red, #f87171); color: var(--sp-red, #f87171);
  border-radius: 4px; font-size: 12px; cursor: pointer;
}
.sp-push-btn-unsub:hover { background: rgba(248,113,113,0.1); }

@media (max-width: 600px) {
  .sp-push-banner-inner { flex-wrap: wrap; gap: 10px; }
  .sp-push-banner-icon { display: none; }
  .sp-push-banner-actions { width: 100%; justify-content: flex-end; }
}

/* iOS Install Banner — multi-lignes avec étapes */
.sp-push-banner-ios .sp-push-banner-text strong { display: block; font-size: 15px; margin-bottom: 4px; }
.sp-push-banner-ios .sp-push-banner-text span { display: block; margin-bottom: 10px; line-height: 1.4; }
.sp-push-ios-steps { display: flex; flex-direction: column; gap: 6px; }
.sp-push-ios-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--sp-text-primary, #c8ccd4);
}
.sp-push-ios-num {
  flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--sp-teal, #00b4d8); color: #fff;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.sp-push-ios-step em { color: var(--sp-teal, #00b4d8); font-style: normal; font-weight: 600; }
.sp-push-ios-icon { color: var(--sp-teal, #00b4d8); vertical-align: middle; margin: 0 2px; }

/* ── Race Results Page ── */
.sp-back-link {
  display: inline-block;
  color: var(--sp-teal);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 20px;
  transition: color 0.15s;
}

.sp-back-link:hover {
  color: var(--sp-teal-light);
  text-decoration: underline;
}

.sp-race-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--sp-border);
}

.sp-race-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px 0;
}

.sp-race-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 14px;
  color: var(--sp-text-secondary);
}

.sp-race-date {
  color: var(--sp-text-primary);
  font-weight: 500;
}

.sp-race-location {
  color: var(--sp-text-secondary);
}

.sp-race-type {
  color: var(--sp-teal);
  font-weight: 500;
}

.sp-race-circuit {
  color: var(--sp-orange);
  font-weight: 500;
}

.sp-race-source {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  font-size: 13px;
}

.sp-race-source a {
  color: var(--sp-text-secondary);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.sp-race-source a:hover {
  opacity: 1;
  color: var(--sp-teal);
}

/* ── Encart "Comment s'y rendre" ─────────────────────────────────────── */
.sp-race-location {
  margin: 14px 0 22px;
  background: var(--sp-bg-elev, #1d2030);
  border: 1px solid var(--sp-border, #2a2f44);
  border-left: 3px solid var(--sp-teal, #00b4d8);
  border-radius: 6px;
  padding: 14px 16px;
}
.sp-race-location .sp-loc-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.sp-race-location .sp-loc-row + .sp-loc-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--sp-border, #2a2f44);
}
/* 2 colonnes côte à côte dès 600px (Material Design 3 "medium":
   couvre tablettes portrait + foldables internes type Pixel Fold ouvert) */
@media (min-width: 600px) {
  .sp-race-location.has-parking {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .sp-race-location.has-parking .sp-loc-row + .sp-loc-row {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    padding-left: 18px;
    border-left: 1px dashed var(--sp-border, #2a2f44);
  }
}

/* ── Breakpoint medium (600-1023px) — Material Design 3 "medium":
   tablettes portrait + foldables internes (Pixel Fold ouvert ~673px,
   Galaxy Z Fold ~717px), iPad mini portrait. Layout aéré entre mobile
   compact et desktop. ─────────────────────────────────────────────── */
@media (min-width: 600px) and (max-width: 1023px) {
  /* Filter bar : pas de wrap forcé, plus d'espace */
  .sp-filter-bar { gap: 14px; }
  /* Pills standard (pas mobile aggressive) */
  .sp-pill { padding: 7px 13px; font-size: 13px; min-height: 36px; }
  /* Container : padding intermédiaire entre mobile et desktop */
  .sp-container { padding: 18px; }
}
.sp-loc-icon {
  font-size: 22px;
  line-height: 1.2;
  flex-shrink: 0;
}
.sp-loc-body { flex: 1; min-width: 0; }
.sp-loc-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sp-text-secondary, #888fa3);
  font-weight: 600;
  margin-bottom: 2px;
}
.sp-loc-address {
  font-size: 15px;
  color: var(--sp-text, #c8ccd4);
  margin-bottom: 4px;
}
.sp-loc-notes {
  font-size: 13px;
  color: var(--sp-text-secondary, #888fa3);
  font-style: italic;
  margin-bottom: 6px;
}
.sp-loc-times {
  margin: 8px 0 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}
.sp-loc-times-label {
  font-size: 12px;
  color: var(--sp-text-secondary, #888fa3);
  margin-right: 2px;
}
.sp-loc-time {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(0, 180, 216, 0.08);
  border: 1px solid rgba(0, 180, 216, 0.2);
  border-radius: 3px;
  font-size: 12px;
  color: var(--sp-text, #c8ccd4);
  white-space: nowrap;
}
.sp-loc-time strong {
  color: var(--sp-teal, #00b4d8);
  margin-right: 4px;
}
.sp-loc-podium {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 6px 0 4px;
  padding: 4px 8px;
  background: rgba(255, 215, 0, 0.06);
  border-left: 2px solid var(--sp-yellow, #ffd700);
  border-radius: 0 3px 3px 0;
  font-size: 13px;
  color: var(--sp-text, #c8ccd4);
  line-height: 1.4;
}
.sp-loc-podium-icon {
  font-size: 14px;
  line-height: 1.4;
  flex-shrink: 0;
}
.sp-loc-podium-text {
  flex: 1;
}
.sp-loc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.sp-loc-btn {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(0, 180, 216, 0.12);
  border: 1px solid rgba(0, 180, 216, 0.3);
  border-radius: 4px;
  color: var(--sp-teal, #00b4d8);
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  font-weight: 500;
}
.sp-loc-btn:hover {
  background: rgba(0, 180, 216, 0.2);
  border-color: var(--sp-teal, #00b4d8);
  color: #fff;
}
@media (max-width: 600px) {
  .sp-loc-actions { gap: 5px; }
  .sp-loc-btn { padding: 8px 10px; font-size: 13px; flex: 1; text-align: center; min-width: 0; }
}

.sp-prestige-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.sp-prestige-provinciale {
  background: rgba(255, 215, 0, 0.15);
  color: #FFD700;
  border: 1px solid rgba(255, 215, 0, 0.4);
}

.sp-prestige-coupe-qc {
  background: rgba(192, 192, 192, 0.15);
  color: #C0C0C0;
  border: 1px solid rgba(192, 192, 192, 0.4);
}

.sp-prestige-regionale {
  background: rgba(52, 152, 219, 0.15);
  color: var(--sp-blue);
  border: 1px solid rgba(52, 152, 219, 0.4);
}

.sp-race-pos {
  font-weight: 600;
  text-align: center;
  color: var(--sp-text-secondary);
}

.sp-rider-name-static {
  color: var(--sp-teal);
  font-weight: 500;
}

.sp-cat-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(52, 152, 219, 0.15);
  color: var(--sp-blue);
  border: 1px solid rgba(52, 152, 219, 0.3);
}
.sp-type-clm { background: rgba(230, 126, 34, 0.15); color: #e67e22; border-color: rgba(230, 126, 34, 0.3); }
.sp-type-crit { background: rgba(155, 89, 182, 0.15); color: #9b59b6; border-color: rgba(155, 89, 182, 0.3); }
.sp-type-route { background: rgba(46, 204, 113, 0.15); color: #27ae60; border-color: rgba(46, 204, 113, 0.3); }
.sp-type-route-diff { background: rgba(231, 76, 60, 0.15); color: #c0392b; border-color: rgba(231, 76, 60, 0.3); }

/* Pill count badge */
.sp-pill-count {
  font-size: 0.72em;
  font-weight: 500;
  opacity: 0.7;
  margin-left: 2px;
  vertical-align: baseline;
  position: relative;
  top: 2px;
}
.sp-pill.active .sp-pill-count {
  opacity: 0.85;
}

/* Category pills (race results page) */
.sp-pill-cat.active {
  background: #e67e22;
  color: #fff;
}

/* Race type pills (race list page) */
.sp-pill-rtype.active {
  background: #e67e22;
  color: #fff;
}

/* Year dropdown */
.sp-year-select {
  background: linear-gradient(135deg, rgba(247,166,205,0.12), rgba(0,180,216,0.08));
  border: 1px solid rgba(247,166,205,0.4);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--sp-pink-light);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(247,166,205,0.12), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: all 0.2s ease;
}

.sp-year-select:hover {
  border-color: var(--sp-pink);
  box-shadow: 0 0 14px rgba(247,166,205,0.25), inset 0 1px 0 rgba(255,255,255,0.08);
  background: linear-gradient(135deg, rgba(247,166,205,0.2), rgba(0,180,216,0.1));
}

.sp-year-select:focus {
  outline: none;
  border-color: var(--sp-pink);
  box-shadow: 0 0 16px rgba(247,166,205,0.3);
}

.sp-year-select option {
  background: #1a1d2e;
  color: #e8eaf0;
  padding: 6px 10px;
}



/* Detail race link (in rider detail mini-table) */
.sp-detail-race-link {
  color: var(--sp-teal);
  text-decoration: none;
  transition: color 0.15s;
}

.sp-detail-race-link:hover {
  color: var(--sp-teal-light);
  text-decoration: underline;
}



/* ── Profile Link in Popup ── */
.sp-detail-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 8px 0;
  vertical-align: middle;
}

.sp-profile-btn {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(0, 180, 216, 0.15);
  border: 1px solid rgba(0, 180, 216, 0.4);
  border-radius: 4px;
  color: var(--sp-teal);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}

.sp-profile-btn:hover {
  background: rgba(0, 180, 216, 0.25);
  color: var(--sp-teal-light);
}

/* ── Popup score summary ── */
.sp-detail-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 6px 0;
  padding: 6px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  vertical-align: middle;
}
.sp-ds-score {
  font-size: 18px;
  font-weight: 700;
  color: var(--sp-pink);
}
.sp-ds-breakdown {
  font-size: 12px;
  color: #8a8f9d;
}

/* ── Filter chip ── */
.sp-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(247, 166, 205, 0.12);
  border: 1px solid rgba(247, 166, 205, 0.3);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 13px;
  color: var(--sp-pink);
  margin: 8px 0 8px 12px;
}
.sp-filter-clear {
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.sp-filter-clear:hover {
  opacity: 1;
}

/* ── Rider Profile Page ── */
.sp-profile-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--sp-border);
}

.sp-profile-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sp-profile-name {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.sp-profile-cat {
  font-size: 13px;
  padding: 4px 12px;
}

.sp-profile-club {
  margin-top: 8px;
}

.sp-profile-season {
  margin-top: 6px;
  font-size: 14px;
  color: var(--sp-text-muted);
}
.sp-card-circuit-detail {
  margin-top: 8px;
  font-size: 11px;
  color: var(--sp-text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--sp-border);
  padding-top: 6px;
}
.sp-card-circuit-detail strong {
  color: var(--sp-text);
}
.sp-card-context {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.6;
  margin-top: 2px;
}

/* Summary cards */
.sp-profile-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.sp-profile-card {
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.sp-card-highlight {
  border-color: rgba(0, 180, 216, 0.3);
  background: rgba(0, 180, 216, 0.05);
}

.sp-card-value {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.sp-rank-cat {
  display: block;
  font-size: 24px;
}
.sp-rank-cat sup {
  font-size: 14px;
  vertical-align: super;
}

.sp-card-sub {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--sp-text-secondary);
  margin-top: 2px;
}
.sp-card-sub sup {
  font-size: 9px;
}

.sp-card-label {
  font-size: 12px;
  color: var(--sp-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
}

.sp-card-breakdown {
  font-size: 11px;
  color: var(--sp-text-secondary);
  margin-top: 6px;
}

/* Per-circuit score cards */
.sp-circuit-score-card {
  background: var(--sp-bg-card);
  border: 1px solid rgba(0, 180, 216, 0.3);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 12px;
}
.sp-circuit-score-header {
  margin-bottom: 6px;
}
.sp-circuit-score-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--sp-teal);
  text-decoration: none;
}
a.sp-circuit-score-name:hover {
  text-decoration: underline;
}
.sp-circuit-score-main {
  font-size: 15px;
  color: var(--sp-text-bright);
  margin-bottom: 4px;
  line-height: 1.5;
}
.sp-circuit-rank {
  font-weight: 700;
  color: #fff;
}
.sp-circuit-rank sup,
.sp-circuit-gender-rank sup {
  font-size: 9px;
  vertical-align: super;
}
.sp-circuit-gender-rank {
  color: var(--sp-text-secondary);
  font-size: 13px;
}
.sp-circuit-sep {
  margin: 0 6px;
  color: var(--sp-text-muted);
}
.sp-circuit-total-score {
  color: var(--sp-text-dim);
}
.sp-circuit-total-score strong {
  color: #fff;
  font-size: 17px;
}
.sp-circuit-score-breakdown {
  font-size: 11px;
  color: var(--sp-text-secondary);
  margin-top: 4px;
}
.sp-circuit-score-card .sp-keep-info {
  margin-top: 6px;
}

/* Profile sections */
.sp-profile-section {
  margin-bottom: 28px;
}

.sp-profile-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--sp-text-primary);
  margin: 0 0 14px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--sp-border);
}

.sp-profile-progression {
  font-size: 1em;
}

.sp-profile-progression .sp-prog-step {
  font-size: 1em;
  padding: 2px 6px;
}

/* Rivals */
.sp-rivals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.sp-rivals-col {
  background: var(--sp-bg-card);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--sp-border);
}

.sp-rivals-heading {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sp-rivals-beaten { color: var(--sp-green); }
.sp-rivals-lost { color: var(--sp-red); }

.sp-rivals-empty {
  color: var(--sp-text-muted);
  font-size: 13px;
  margin: 0;
}

.sp-rivals-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sp-rival-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 12px;
  align-items: center;
}

.sp-rival-name {
  color: var(--sp-text-primary);
  font-size: 14px;
  font-weight: 500;
  grid-row: 1;
  grid-column: 1;
}

.sp-rival-stats {
  font-size: 13px;
  grid-row: 1;
  grid-column: 2;
  white-space: nowrap;
}

.sp-rival-wins { color: var(--sp-green); font-weight: 600; }
.sp-rival-losses { color: var(--sp-red); font-weight: 600; }
.sp-rival-sep { color: var(--sp-border-pill); margin: 0 3px; }
.sp-rival-encounters { color: var(--sp-text-muted); font-size: 12px; }

.sp-rival-bar {
  grid-row: 2;
  grid-column: 1 / -1;
  height: 4px;
  background: var(--sp-bg-main);
  border-radius: 2px;
  overflow: hidden;
}

.sp-rival-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}

.sp-bar-win { background: var(--sp-green); }
.sp-bar-loss { background: var(--sp-red); }

/* Profile race table */
.sp-profile-table {
  font-size: 14px;
}

/* Profile — Leader badge */
.sp-profile-jersey {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  vertical-align: middle;
  filter: drop-shadow(0 2px 6px rgba(232,55,124,0.4));
}

/* Profile — Year selector */
.sp-profile-year-selector {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.sp-year-pill {
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #8b8fa3;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  text-decoration: none;
  transition: all 0.15s;
}
.sp-year-pill:hover { color: #fff; border-color: rgba(77,216,232,0.4); }
.sp-year-pill.sp-year-active {
  color: #4dd8e8;
  background: rgba(77,216,232,0.1);
  border-color: rgba(77,216,232,0.4);
  pointer-events: none;
}

/* Profile — Score breakdown bars */
.sp-score-bars {
  display: flex;
  gap: 2px;
  height: 18px;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}
.sp-score-bar-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  min-width: 24px;
  transition: flex 0.3s;
}
.sp-bar-clm { background: #e67e22; }
.sp-bar-crit { background: #e74c3c; }
.sp-bar-route { background: #3498db; }
.sp-bar-route_diff { background: #2ecc71; }
.sp-bar-soutien { background: #9b59b6; }
.sp-score-bars-legend {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  font-size: 10px;
  color: #8b8fa3;
}
.sp-score-bars-legend span::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 3px;
  vertical-align: middle;
}
.sp-score-bars-legend .sp-leg-clm::before { background: #e67e22; }
.sp-score-bars-legend .sp-leg-crit::before { background: #e74c3c; }
.sp-score-bars-legend .sp-leg-route::before { background: #3498db; }
.sp-score-bars-legend .sp-leg-rdiff::before { background: #2ecc71; }
.sp-score-bars-legend .sp-leg-soutien::before { background: #9b59b6; }

/* Profile — Consistency stats */
.sp-consistency-stats {
  display: flex;
  gap: 12px;
  margin: 12px 0;
}
.sp-consistency-item {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}
.sp-consistency-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--sp-teal-light, #4dd8e8);
}
.sp-consistency-label {
  display: block;
  font-size: 10px;
  color: #8b8fa3;
  margin-top: 2px;
}

/* Profile — Cumulative score chart */
.sp-cumul-chart {
  position: relative;
  height: 120px;
  margin: 12px 0;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
}
.sp-cumul-svg {
  width: 100%;
  height: 100%;
}

/* Profile — Compare button */
.sp-rival-compare {
  font-size: 10px;
  color: #4dd8e8;
  background: none;
  border: 1px solid rgba(77,216,232,0.3);
  border-radius: 4px;
  padding: 1px 6px;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.15s;
}
.sp-rival-compare:hover {
  background: rgba(77,216,232,0.1);
  border-color: #4dd8e8;
}

/* Profile — Potential points */
.sp-potential-pts {
  font-size: 11px;
  color: #8b8fa3;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.sp-potential-pts strong {
  color: #c8ccd4;
}

/* Profile — Comparison overlay */
.sp-compare-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9998;
  background: rgba(0,0,0,0.9);
  overflow-y: auto;
  padding: 40px 20px;
}
.sp-compare-overlay.active { display: block; }
.sp-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.sp-compare-col {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 16px;
}
.sp-compare-col h3 {
  font-size: 16px;
  color: #fff;
  margin: 0 0 12px;
}
.sp-compare-close {
  position: fixed;
  top: 12px;
  right: 20px;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  background: rgba(0,0,0,0.5);
  border: none;
  padding: 4px 14px;
  border-radius: 4px;
  z-index: 9999;
}
.sp-compare-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
  color: #c8ccd4;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sp-compare-row .label { color: #8b8fa3; }
.sp-compare-row .value { font-weight: 700; }
.sp-compare-row .value.better { color: #4caf50; }
.sp-compare-row .value.worse { color: #e74c3c; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .sp-container { padding: 12px; border-radius: 0; }
  .sp-title { font-size: 20px; }
  .sp-title-row { gap: 8px; margin-bottom: 16px; }
  .sp-filter-bar { gap: 10px; }
  .sp-pill { padding: 6px 10px; font-size: 12px; min-height: 44px; }
  .sp-container .dataTables_length { display: none; }
  .sp-container table.dataTable tbody td { padding: 9px 8px; font-size: 13px; }
  .sp-container table.dataTable thead th { padding: 10px 8px; font-size: 10px; }
  .sp-club-badge { font-size: 10px; padding: 2px 6px; }
  .sp-profile-name { font-size: 22px; }
  .sp-profile-cards { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .sp-card-value { font-size: 22px; }
  .sp-profile-card { padding: 12px; }
  .sp-rivals-grid { grid-template-columns: 1fr; }
  .sp-circuit-score-card { padding: 12px 14px; }
  .sp-circuit-score-main { font-size: 14px; flex-wrap: wrap; }
  .sp-circuit-gender-rank { display: block; font-size: 12px; }
  .sp-circuit-score-breakdown { font-size: 10px; }
  .sp-circuit-total-score strong { font-size: 15px; }
}

/* ── Calendar: sections, future races & no-ranking ── */
.sp-cal-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #c8ccd4;
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(200,204,212,0.12);
}
.sp-cal-section-title:first-of-type { margin-top: 12px; }
.sp-cal-count { font-weight: 400; color: #6a6d7a; font-size: 14px; }
.sp-cal-wrap { overflow-x: auto; }
.sp-cal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.sp-cal-table thead th {
  text-align: left;
  padding: 8px 12px;
  font-size: 12px;
  color: #6a6d7a;
  border-bottom: 1px solid rgba(200,204,212,0.12);
}
.sp-cal-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(200,204,212,0.06);
}
.sp-cal-table tbody tr:hover td { background: rgba(0,180,216,0.04); }
.sp-next-race td { opacity: 1 !important; }
.sp-next-race { border-left: 3px solid var(--sp-blue, #00b4d8); }
.sp-next-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #151722;
  background: var(--sp-blue, #00b4d8);
  border-radius: 3px;
  padding: 1px 7px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sp-btn-register {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(0,180,216,0.15);
  color: var(--sp-blue, #00b4d8);
  border: 1px solid rgba(0,180,216,0.3);
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.sp-btn-register:hover {
  background: rgba(0,180,216,0.3);
  color: #fff;
}
.sp-btn-guide {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(155,89,182,0.15);
  color: #bb86fc;
  border: 1px solid rgba(155,89,182,0.3);
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.sp-btn-guide:hover {
  background: rgba(155,89,182,0.3);
  color: #fff;
}
/* ── Calendar notification badges ── */
.sp-notif-new {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #151722;
  background: #4ade80;
  border-radius: 3px;
  padding: 1px 7px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sp-notif-date-change {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #FFD700;
  border: 1px solid rgba(255,215,0,0.4);
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  cursor: help;
}
.sp-notif-cancelled {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #f87171;
  background: rgba(248,113,113,0.15);
  border: 1px solid rgba(248,113,113,0.3);
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
}
.sp-race-cancelled > td { text-decoration: line-through; opacity: 0.5; }
.sp-race-cancelled > td .sp-notif-cancelled,
.sp-race-cancelled > td .sp-cat-badge { text-decoration: none; opacity: 1; }
.sp-race-cancelled { border-left: 3px solid #f87171; }
.sp-race-date-changed { border-left: 3px solid #FFD700; }
.sp-status-cancelled {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(248,113,113,0.15);
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.3);
}
.sp-status-pending {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(230,126,34,0.15);
  color: #e67e22;
  border: 1px solid rgba(230,126,34,0.3);
}
/* ── Leaders / Maillots du leader ── */
.sp-lh-circuit-selector {
  display: flex;
  gap: 6px;
  margin: 12px 0;
}
.sp-lc-pill {
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  color: #8b8fa3;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  text-decoration: none;
  transition: all 0.15s;
}
.sp-lc-pill:hover { color: #fff; border-color: rgba(77,216,232,0.4); }
.sp-lc-pill.active {
  color: #4dd8e8;
  background: rgba(77,216,232,0.1);
  border-color: rgba(77,216,232,0.4);
  pointer-events: none;
}
.sp-leaders-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.sp-leaders-grid .sp-leader-card {
  width: calc(25% - 12px);
  min-width: 200px;
}
.sp-leaders-row-break {
  flex-basis: 100%;
  height: 0;
  margin: 24px 0;
}
@keyframes sp-card-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.sp-leader-card {
  background: linear-gradient(180deg, #1a1d2e 0%, #161828 100%);
  border-radius: 8px;
  padding: 12px 10px;
  text-align: center;
  border: 1px solid rgba(232,55,124,0.15);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  position: relative;
  overflow: hidden;
  animation: sp-card-in 0.4s ease-out both;
}
.sp-leader-card:nth-child(2) { animation-delay: 0.06s; }
.sp-leader-card:nth-child(3) { animation-delay: 0.12s; }
.sp-leader-card:nth-child(4) { animation-delay: 0.18s; }
.sp-leader-card:nth-child(5) { animation-delay: 0.24s; }
.sp-leader-card:nth-child(6) { animation-delay: 0.30s; }
.sp-leader-card:nth-child(7) { animation-delay: 0.36s; }
.sp-leader-card:nth-child(8) { animation-delay: 0.42s; }
.sp-leader-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #E8377C, #D6296B, #E8377C);
}
.sp-leader-card::after {
  content: '';
  position: absolute;
  top: 3px; left: 50%;
  width: 2px; height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 60%);
  transform: translateX(-50%);
  pointer-events: none;
}
.sp-leader-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(232,55,124,0.2), 0 2px 8px rgba(0,0,0,0.4);
  border-color: rgba(232,55,124,0.3);
}
.sp-leader-card-m::before { background: linear-gradient(90deg, #00b4d8, #0090b0, #00b4d8); }
.sp-leader-card-f::before { background: linear-gradient(90deg, #F7A6CD, #E8377C, #F7A6CD); }
.sp-leader-cat {
  font-size: 10px;
  font-weight: 700;
  color: #8b8fa3;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.sp-leader-jersey {
  margin-bottom: 4px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(232,55,124,0.3));
}
.sp-leader-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  margin-bottom: 4px;
}
.sp-leader-name:hover { color: #F7A6CD; }
.sp-leader-club {
  font-size: 10px;
  color: #9496a8;
  margin-bottom: 4px;
}
.sp-leader-score {
  font-size: 16px;
  font-weight: 800;
  color: var(--sp-teal-light, #4dd8e8);
  margin-bottom: 2px;
}
.sp-leader-gap {
  font-size: 10px;
  font-weight: 600;
  color: #4caf50;
  margin-top: -1px;
  margin-bottom: 2px;
}
.sp-leader-since {
  font-size: 9px;
  color: #8b8fa3;
  line-height: 1.4;
}
@media (max-width: 480px) {
  .sp-leaders-grid { gap: 10px; }
  .sp-leaders-grid .sp-leader-card { width: calc(50% - 5px); min-width: 0; }
  .sp-leader-card { padding: 14px 10px; }
  .sp-leader-jersey { font-size: 24px; }
  .sp-leader-name { font-size: 14px; }
  .sp-leader-score { font-size: 16px; }
}
/* Leader history */
#sp-lh-table tbody tr {
  transition: opacity 0.12s ease;
}
#sp-lh-table tbody tr.sp-lh-hidden {
  display: none;
}
/* Leader history filters */
.sp-lh-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  align-items: center;
}
.sp-pill-lh, .sp-pill-lh-gender {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 5px 14px;
  color: var(--sp-text-secondary, #8b8fa3);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s;
}
.sp-pill-lh:hover, .sp-pill-lh-gender:hover {
  background: rgba(255,255,255,0.08);
  color: var(--sp-text-primary, #e8eaf0);
}
.sp-pill-lh:focus-visible, .sp-pill-lh-gender:focus-visible {
  outline: 2px solid var(--sp-teal, #00b4d8);
  outline-offset: 2px;
}
.sp-pill-lh.active {
  background: rgba(0,180,216,0.15);
  border-color: rgba(0,180,216,0.4);
  color: var(--sp-teal, #00b4d8);
}
.sp-pill-lh-gender.active[data-gender="M"] {
  background: rgba(0,180,216,0.15);
  border-color: rgba(0,180,216,0.4);
  color: var(--sp-teal, #00b4d8);
}
.sp-pill-lh-gender.active[data-gender="F"] {
  background: rgba(247,166,205,0.15);
  border-color: rgba(247,166,205,0.4);
  color: #F7A6CD;
}
.sp-lh-sep {
  color: rgba(255,255,255,0.1);
  margin: 0 4px;
  font-size: 14px;
}
@media (max-width: 480px) {
  .sp-pill-lh, .sp-pill-lh-gender { padding: 4px 10px; font-size: 11.5px; }
}
/* Highlights */
.sp-highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.sp-highlight-card {
  background: linear-gradient(135deg, rgba(247,166,205,0.06), rgba(0,180,216,0.04));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.5;
}
.sp-highlight-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}
.sp-highlight-text {
  font-size: 13.5px;
  color: var(--sp-text-secondary, #c0c3d0);
}
.sp-highlight-text strong {
  color: var(--sp-text-primary, #e8eaf0);
}
@media (max-width: 480px) {
  .sp-highlights-grid { grid-template-columns: 1fr; }
  .sp-highlight-card { padding: 12px; }
}
.sp-race-meta-sep { color: #4a4d5a; margin: 0 4px; }
.sp-cal-race-link { color: var(--sp-blue, #00b4d8); text-decoration: none; }
.sp-cal-race-link:hover { text-decoration: underline; }
.sp-race-future td { opacity: 0.7; }
.sp-race-future td .sp-cal-race-link { opacity: 1; }
.sp-next-race td, .sp-next-race td .sp-cal-race-link { opacity: 1 !important; }
.sp-race-noranking td { font-style: italic; }
.sp-noranking-tag {
  display: inline-block;
  font-size: 10px;
  font-style: normal;
  color: #e67e22;
  border: 1px solid rgba(230, 126, 34, 0.4);
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.sp-status-upcoming {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(52, 152, 219, 0.15);
  color: var(--sp-blue);
  border: 1px solid rgba(52, 152, 219, 0.3);
}
.sp-status-link {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
  text-decoration: none;
  transition: all 0.15s;
}
.sp-status-link:hover {
  background: rgba(46, 204, 113, 0.25);
  color: #4ade80;
}

/* ── Team Classement ── */
.sp-team-table { width: 100% !important; }
.sp-team-name { cursor: pointer; }
.sp-team-name:hover .sp-club-badge { color: var(--sp-teal); }
.sp-team-detail-row td { padding: 0 8px 8px !important; background: var(--sp-bg-deep) !important; }
.sp-rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-weight: 700;
  font-size: .8em;
}
.sp-rank-1 { background: #ffd700; color: #000; }
.sp-rank-2 { background: #aaa; color: #000; }
.sp-rank-3 { background: #cd7f32; color: #fff; }
.sp-rank-other { background: var(--sp-bg-input); color: #8b8fa3; }
.sp-nav-links {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.sp-nav-link {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  background: var(--sp-bg-input);
  color: var(--sp-text-secondary);
  border: 1px solid var(--sp-border-pill);
}
.sp-nav-link:hover {
  background: var(--sp-bg-row-hover);
  color: var(--sp-text-bright);
  border-color: var(--sp-teal);
}
.sp-nav-link-active {
  background: rgba(0, 180, 216, 0.18);
  color: var(--sp-teal-light);
  border-color: var(--sp-teal);
  pointer-events: none;
}

@media (max-width: 768px) {
  .sp-cal-table { font-size: 13px; }
  .sp-cal-table thead th, .sp-cal-table tbody td { padding: 8px 6px; }
  .sp-cal-table thead th:nth-child(3), .sp-cal-table tbody td:nth-child(3) { display: none; }
  .sp-next-badge, .sp-notif-new, .sp-notif-cancelled, .sp-notif-date-change { font-size: 9px; padding: 1px 5px; }
  .sp-btn-register, .sp-btn-guide { padding: 3px 8px; font-size: 11px; }
  .sp-race-title { font-size: 18px; }
}
@media (max-width: 480px) {
  .sp-filter-bar { gap: 8px; }
  .sp-pill { padding: 10px 12px; font-size: 11px; }
  .sp-nav-link { padding: 6px 12px; font-size: 11px; }
  .sp-cal-table { font-size: 12px; }
  .sp-cal-table thead th:nth-child(4), .sp-cal-table tbody td:nth-child(4) { display: none; }
}
@media (max-width: 400px) {
  .sp-pill { padding: 8px 6px; font-size: 10px; }
}

/* ── Info Modal ── */
.sp-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.sp-modal-overlay.sp-modal-open {
  display: flex;
}
.sp-modal {
  background: var(--sp-bg-main);
  border: 1px solid var(--sp-border);
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 600px;
  width: 100%;
  max-height: 95vh;
  overflow-y: auto;
  position: relative;
  color: var(--sp-text-primary);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.sp-modal-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none;
  border: none;
  color: var(--sp-text-muted);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.15s;
}
.sp-modal-close:hover { color: #fff; }
.sp-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 14px 0;
}
.sp-modal-section {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sp-border);
}
.sp-modal-section:last-of-type { border-bottom: none; padding-bottom: 0; }
.sp-modal-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--sp-teal);
  margin: 0 0 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sp-modal-section p {
  margin: 0 0 6px 0;
  font-size: 14px;
  line-height: 1.5;
}
.sp-modal-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  line-height: 2;
}
.sp-modal-example {
  font-style: italic;
  color: var(--sp-text-secondary);
  font-size: 13px;
}
.sp-modal-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--sp-border);
  text-align: center;
}
.sp-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* WCAG touch target ≥ 44×44px */
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: rgba(155, 89, 182, 0.15);
  color: var(--sp-purple);
  border: 1px solid rgba(155, 89, 182, 0.3);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s;
  flex-shrink: 0;
  line-height: 1;
}
.sp-info-btn:hover {
  background: rgba(155, 89, 182, 0.28);
  color: #b07cd8;
  border-color: rgba(155, 89, 182, 0.5);
}

/* ── Info Page ── */
.sp-info-header { margin-bottom: 28px; padding-bottom: 16px; border-bottom: 1px solid var(--sp-border); }
.sp-info-subtitle { color: var(--sp-text-secondary); font-size: 15px; margin-top: 8px; }
.sp-info-section { margin-bottom: 32px; }
.sp-info-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--sp-teal);
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--sp-border);
}
.sp-info-section p { font-size: 15px; line-height: 1.6; color: var(--sp-text-primary); margin: 0 0 12px 0; }
.sp-info-highlight {
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  border-left: 3px solid var(--sp-teal);
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  margin: 12px 0;
}
.sp-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 12px 0;
}
.sp-info-table th {
  background: var(--sp-bg-card);
  color: var(--sp-text-secondary);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 10px;
  border-bottom: 2px solid var(--sp-border-pill);
  text-align: center;
}
.sp-info-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--sp-border);
  color: var(--sp-text-primary);
  text-align: center;
}
.sp-info-table td:first-child,
.sp-info-table th:first-child { text-align: left; }
.sp-info-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.sp-info-type-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
}
.sp-info-formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 12px 0;
  font-size: 15px;
}
.sp-info-formula-op { color: var(--sp-text-muted); font-weight: 700; font-size: 18px; }
.sp-info-formula-result { color: #fff; font-size: 16px; }

/* ── Info: useful links ── */
.sp-info-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.sp-info-link-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border-radius: 8px;
  background: rgba(0,180,216,0.06);
  border: 1px solid rgba(0,180,216,0.15);
  color: var(--sp-blue, #00b4d8);
  text-decoration: none;
  transition: all 0.15s;
}
.sp-info-link-card:hover {
  background: rgba(0,180,216,0.12);
  border-color: rgba(0,180,216,0.3);
}
.sp-info-link-card span { font-size: 12px; color: var(--sp-text-muted); }

/* ── Profile "X retenues sur Y" ── */
.sp-keep-info {
  font-size: 12px;
  color: var(--sp-text-muted);
  margin-top: 8px;
  line-height: 1.6;
}
.sp-keep-info span { display: inline-block; margin-right: 10px; }
.sp-keep-full { color: var(--sp-green); }
.sp-keep-partial { color: var(--sp-orange); }

@media (max-width: 768px) {
  .sp-modal { padding: 20px; }
  .sp-info-types-grid { grid-template-columns: 1fr 1fr; }
  .sp-info-formula { font-size: 13px; gap: 6px; padding: 12px; }
  .sp-info-table { font-size: 11px; }
  .sp-info-table th, .sp-info-table td { padding: 6px 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .sp-title-prestige, .sp-title::after { animation: none; }
}

/* View Transitions */
.sp-title-prestige { view-transition-name: sp-title; }
.sp-dt-wrap { view-transition-name: sp-table; }
.sp-filter-bar { view-transition-name: sp-filters; }
::view-transition-old(sp-table) {
  animation: sp-vt-fade-out 0.18s ease-in;
}
::view-transition-new(sp-table) {
  animation: sp-vt-fade-in 0.22s ease-out;
}
::view-transition-old(sp-filters),
::view-transition-new(sp-filters) {
  animation: none;
}
@keyframes sp-vt-fade-out { to { opacity: 0; translate: 0 -6px; } }
@keyframes sp-vt-fade-in { from { opacity: 0; translate: 0 8px; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*) { animation-duration: 0s; }
}

/* ── Circuit Selector ── */
.sp-circuit-selector {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.sp-circuit-tab {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  background: var(--sp-bg-input);
  color: var(--sp-text-secondary);
  border: 1px solid var(--sp-border-pill);
}
.sp-circuit-tab:hover {
  background: var(--sp-bg-row-hover);
  color: var(--sp-text-bright);
  border-color: var(--sp-teal);
}
.sp-circuit-active {
  background: rgba(0, 180, 216, 0.18);
  color: var(--sp-teal-light);
  border-color: var(--sp-teal);
}
.sp-circuit-hub {
  padding: 6px 10px;
  font-size: 16px;
  line-height: 1;
}

/* ── Hub Page ── */
.sp-hub .sp-title {
  text-align: center;
  margin-bottom: 30px;
}
.sp-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.sp-hub-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: 12px;
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  text-decoration: none;
  transition: all 0.2s;
}
.sp-hub-card:hover {
  border-color: var(--sp-teal);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 180, 216, 0.15);
}
.sp-hub-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--sp-text-bright);
  margin: 0 0 12px;
}
.sp-hub-card-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--sp-text-secondary);
  margin-bottom: 16px;
}
.sp-hub-card-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-teal);
  margin-top: auto;
}
@media (max-width: 600px) {
  .sp-hub-grid { grid-template-columns: 1fr; }
  .sp-circuit-selector { gap: 4px; }
  .sp-circuit-tab { padding: 8px 12px; font-size: 12px; }
}

/* Hide low-info columns on small screens */
@media (max-width: 480px) {
  .sp-col-sqrtn,
  .sp-col-soutien { display: none; }
  .sp-detail-table { font-size: 12px; }
  .sp-detail-table thead th { padding: 4px 6px; }
  .sp-detail-table tbody td { padding: 4px 6px !important; }
}
/* Compare button + floating bar */
.sp-compare-btn { background: none; border: none; color: #555; font-size: 14px; cursor: pointer; padding: 2px 6px; margin-left: 4px; border-radius: 4px; vertical-align: middle; opacity: 0; transition: opacity 0.15s; }
tr:hover .sp-compare-btn, tr:focus-within .sp-compare-btn { opacity: 1; }
.sp-compare-btn:hover { color: #00b4d8; background: rgba(0,180,216,0.1); }
.sp-compare-btn.selected { opacity: 1; color: #00b4d8; background: rgba(0,180,216,0.15); }
tr.sp-compare-selected { background: rgba(0,180,216,0.06) !important; }

.sp-compare-bar { position: fixed; bottom: 0; left: 0; right: 0; background: #1e2030; border-top: 2px solid #00b4d8; padding: 12px 20px; display: flex; align-items: center; justify-content: center; gap: 16px; z-index: 999; font-size: 0.95em; box-shadow: 0 -4px 20px rgba(0,0,0,0.5); transform: translateY(100%); transition: transform 0.25s ease; }
.sp-compare-bar.visible { transform: translateY(0); }
.sp-compare-bar-name { color: #00b4d8; font-weight: 600; }
.sp-compare-bar-vs { color: #888; }
.sp-compare-bar-go { background: #00b4d8; color: #fff; border: none; padding: 8px 20px; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 0.95em; }
.sp-compare-bar-go:hover { background: #0090b0; }
.sp-compare-bar-cancel { background: none; border: 1px solid #555; color: #aaa; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 0.85em; }
.sp-compare-bar-cancel:hover { border-color: #888; color: #ddd; }
@media (max-width: 600px) { .sp-compare-bar { font-size: 0.85em; gap: 8px; padding: 10px 12px; } }
