/* ============ Paddock — design system ============ */
:root {
  --bg: #08100d;
  --bg-2: #0c1612;
  --surface: #111c18;
  --surface-2: #16241f;
  --surface-3: #1c2d27;
  --border: #22342d;
  --border-strong: #2e463d;
  --text: #e9f1ec;
  --text-2: #b7c7bf;
  --muted: #7f958b;
  --primary: #22c55e;
  --primary-2: #16a34a;
  --primary-soft: rgba(34, 197, 94, 0.12);
  --gold: #f2b84b;
  --gold-soft: rgba(242, 184, 75, 0.12);
  --red: #f05252;
  --red-soft: rgba(240, 82, 82, 0.12);
  --blue: #4f9cf9;
  --violet: #a78bfa;
  --orange: #fb923c;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-num: 'Barlow Condensed', 'Inter', sans-serif;
  --header-h: 64px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 400 15px/1.5 var(--font);
  color: var(--text);
  background: radial-gradient(1200px 500px at 15% -10%, rgba(34, 197, 94, 0.09), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(242, 184, 75, 0.05), transparent 60%), var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
body.modal-open {
  overflow: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
input {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  font-weight: 800;
}
h2 {
  font-size: 1.1rem;
  font-weight: 700;
}
p {
  margin: 0;
}
img {
  max-width: 100%;
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}
.muted {
  color: var(--muted);
}
.cap::first-letter {
  text-transform: uppercase;
}
.pos {
  color: var(--primary);
}
.neg {
  color: var(--red);
}
.nowrap {
  white-space: nowrap;
}
.center {
  text-align: center;
}
.fine {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 8px;
  z-index: 100;
  background: var(--primary);
  color: #04110a;
  padding: 8px 12px;
  border-radius: 8px;
}
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}
main.container {
  flex: 1;
  padding-top: 28px;
  padding-bottom: 60px;
  outline: none;
}
.ic {
  display: inline-flex;
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.15em;
  flex: none;
}
.ic svg {
  width: 100%;
  height: 100%;
}
.ic-xl {
  width: 40px;
  height: 40px;
  color: var(--muted);
}

/* ============ Header ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 16, 13, 0.82);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #04110a;
  background: linear-gradient(135deg, #4ade80, #16a34a);
  box-shadow: 0 6px 18px -6px rgba(34, 197, 94, 0.7);
}
.brand-mark svg {
  width: 22px;
  height: 22px;
}
.nav {
  display: flex;
  gap: 4px;
}
.nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s;
}
.nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}
.nav a.active {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 -2px 0 var(--primary);
}
.pill {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--primary);
  color: #04110a;
  display: inline-grid;
  place-items: center;
}
.account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.balance {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 5px 14px;
  border-radius: 10px;
  background: var(--primary-soft);
  border: 1px solid rgba(34, 197, 94, 0.25);
  line-height: 1.15;
}
.balance-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.balance-value {
  font-family: var(--font-num);
  font-size: 1.25rem;
  color: #86efac;
  font-variant-numeric: tabular-nums;
}
.menu {
  position: relative;
}
.avatar,
.top-avatar,
.mini-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
  color: #04110a;
  background: linear-gradient(135deg, #fde68a, #f2b84b);
}
.avatar {
  width: 38px;
  height: 38px;
  font-size: 13px;
}
.menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7);
  padding: 6px;
  display: none;
}
.menu.open .menu-pop {
  display: block;
  animation: pop 0.14s ease-out;
}
.menu-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
}
.menu-head span {
  color: var(--muted);
  font-size: 13px;
}
.menu-pop a,
.menu-pop button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  text-align: left;
}
.menu-pop a:hover,
.menu-pop button:hover {
  background: var(--surface-2);
}
.menu-pop .danger {
  color: var(--red);
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.offline-bar {
  display: none;
  text-align: center;
  font-size: 13px;
  padding: 6px;
  background: var(--gold-soft);
  color: var(--gold);
}
body.offline .offline-bar {
  display: block;
}

/* ============ Boutons, chips, onglets ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  transition: transform 0.08s, background 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.btn:active:not(:disabled) {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-primary {
  background: linear-gradient(180deg, #2fd46a, var(--primary-2));
  color: #03140a;
  box-shadow: 0 8px 20px -10px rgba(34, 197, 94, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #4ade80, #22c55e);
}
.btn-gold {
  background: linear-gradient(180deg, #f8cd70, #e0a12f);
  color: #231703;
  box-shadow: 0 8px 20px -10px rgba(242, 184, 75, 0.8);
}
.btn-ghost {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  background: var(--surface-3);
}
.btn-block {
  width: 100%;
}
.btn-lg {
  height: 50px;
  font-size: 15px;
}
.link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.link:hover {
  color: var(--text);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.15s;
}
.chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.chip.active {
  background: var(--primary-soft);
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: fit-content;
  margin-bottom: 18px;
}
.tab {
  padding: 8px 16px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
}
.tab.active {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.5);
}
.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.seg-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 16px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.2;
}
.seg-btn small {
  font-weight: 500;
  font-size: 11px;
  color: var(--muted);
  text-transform: capitalize;
}
.seg-btn.active {
  background: var(--primary-soft);
  color: #86efac;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.4);
}
.tag {
  display: inline-flex;
  align-items: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text-2);
  vertical-align: 1px;
  letter-spacing: 0.01em;
}
.tag-gold {
  background: var(--gold-soft);
  color: var(--gold);
}
.tag-red {
  background: var(--red-soft);
  color: var(--red);
}
.badge {
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-2);
}
.badge-won,
.badge-win,
.badge-signup,
.badge-bonus {
  background: var(--primary-soft);
  color: #86efac;
}
.badge-lost,
.badge-bet {
  background: var(--red-soft);
  color: #fca5a5;
}
.badge-pending {
  background: rgba(79, 156, 249, 0.14);
  color: #93c5fd;
}
.badge-refunded,
.badge-refund,
.badge-partial {
  background: var(--gold-soft);
  color: var(--gold);
}
.disc {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  margin-right: 4px;
}
.d-plat {
  background: var(--primary-soft);
  color: #86efac;
}
.d-attele {
  background: rgba(79, 156, 249, 0.14);
  color: #93c5fd;
}
.d-monte {
  background: rgba(167, 139, 250, 0.15);
  color: #c4b5fd;
}
.d-obstacle {
  background: rgba(251, 146, 60, 0.14);
  color: #fdba74;
}
.dot-live {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(240, 82, 82, 0.7);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(240, 82, 82, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(240, 82, 82, 0);
  }
}

/* ============ Cartes & blocs ============ */
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.page-head p {
  margin-top: 6px;
}
.block {
  margin-bottom: 30px;
}
.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.block-head h2 small {
  font-size: 0.85rem;
  margin-left: 4px;
}
.live-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fca5a5;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.empty-state.big {
  padding: 90px 20px;
}
.empty-state.big h1 {
  color: var(--text);
}
.row-gap {
  display: flex;
  gap: 10px;
}
.loader {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 100px 0;
}
.loader span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  animation: bounce 1s infinite ease-in-out;
}
.loader span:nth-child(2) {
  animation-delay: 0.15s;
}
.loader span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes bounce {
  0%,
  100% {
    transform: scale(0.5);
    opacity: 0.4;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============ Accueil ============ */
.welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  margin-bottom: 28px;
  background: linear-gradient(120deg, rgba(34, 197, 94, 0.16), rgba(17, 28, 24, 0.9) 55%), var(--surface);
  border-color: rgba(34, 197, 94, 0.3);
}
.welcome h2 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}
.next-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.next-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.15s, transform 0.15s;
}
.next-card:hover {
  border-color: rgba(34, 197, 94, 0.45);
  transform: translateY(-2px);
}
.next-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.next-top b {
  font-family: var(--font-num);
  font-size: 1.05rem;
  color: #86efac;
}
.next-hippo {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flag {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--muted);
}
.next-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.next-meta {
  font-size: 12px;
  color: var(--muted);
}
.next-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.next-time {
  font-family: var(--font-num);
  font-size: 1.5rem;
  line-height: 1;
}
.next-cd {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.spotlight {
  display: block;
  margin-bottom: 30px;
  padding: 22px 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(242, 184, 75, 0.35);
  background: radial-gradient(500px 200px at 100% 0%, rgba(242, 184, 75, 0.2), transparent 70%),
    linear-gradient(120deg, #1c1a10, var(--surface) 60%);
  transition: border-color 0.15s;
}
.spotlight:hover {
  border-color: rgba(242, 184, 75, 0.7);
}
.spot-label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 10px;
}
.spot-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.spot-title {
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  font-weight: 800;
}
.spot-meta {
  color: var(--text-2);
  margin-top: 4px;
  font-size: 14px;
}
.spot-side {
  display: flex;
  align-items: center;
  gap: 18px;
}
.spot-prize {
  font-family: var(--font-num);
  font-size: 1.9rem;
  color: var(--gold);
}
.spot-time {
  font-weight: 600;
  color: var(--text-2);
}
.reunions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(560px, 1fr));
  gap: 16px;
}
.reunion {
  overflow: hidden;
}
.reunion-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.reunion-num {
  font-family: var(--font-num);
  font-size: 1.35rem;
  font-weight: 700;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary-soft);
  color: #86efac;
}
.reunion-title h3 {
  font-size: 1.05rem;
  text-transform: capitalize;
}
.reunion-title span {
  font-size: 13px;
  text-transform: capitalize;
}
.reunion-info {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.race-row {
  display: grid;
  grid-template-columns: 38px 50px 1fr auto 18px;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.race-row:last-child {
  border-bottom: 0;
}
.race-row:hover {
  background: var(--surface-2);
}
.race-code {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-2);
}
.race-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.race-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.race-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.race-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.race-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.race-status.open {
  background: var(--gold-soft);
  color: var(--gold);
}
.race-status.done {
  background: var(--surface-3);
  color: var(--text);
  font-family: var(--font-num);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.race-status.live {
  background: var(--red-soft);
  color: #fca5a5;
}
.race-status.closed,
.race-status.cancel {
  background: var(--surface-3);
  color: var(--muted);
}
.race-row.done .race-name,
.race-row.done .race-time {
  color: var(--text-2);
}
.race-go {
  color: var(--muted);
  display: flex;
}

/* ============ Page course ============ */
.crumbs {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}
.crumbs a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--text-2);
}
.crumbs a:hover {
  color: var(--text);
}
.crumbs > span {
  text-transform: capitalize;
}
.crumbs > span::before {
  content: '/';
  margin-right: 12px;
  opacity: 0.5;
}
.race-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  scrollbar-width: thin;
}
.race-pill {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 62px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  line-height: 1.2;
}
.race-pill b {
  font-family: var(--font-num);
  font-size: 1.05rem;
}
.race-pill small {
  font-size: 11px;
  color: var(--muted);
}
.race-pill.done {
  opacity: 0.65;
}
.race-pill.open b {
  color: #86efac;
}
.race-pill.active {
  background: var(--primary-soft);
  border-color: rgba(34, 197, 94, 0.6);
  opacity: 1;
}
.course-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}
.course-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.hero {
  padding: 22px 24px;
}
.hero-top {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.hero-code {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  border-radius: 16px;
  background: linear-gradient(160deg, #1f3a2e, #102019);
  border: 1px solid var(--border-strong);
  font-family: var(--font-num);
  line-height: 1;
}
.hero-code span:first-child {
  font-size: 1rem;
  color: var(--muted);
}
.hero-code span:last-child {
  font-size: 1.8rem;
  color: #86efac;
}
.hero-title {
  flex: 1;
  min-width: 0;
}
.hero-kicker {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 6px;
  text-transform: capitalize;
}
.hero-title p {
  margin-top: 4px;
  font-size: 13px;
}
.state {
  flex: none;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 999px;
}
.state-open {
  background: var(--primary-soft);
  color: #86efac;
}
.state-live {
  background: var(--red-soft);
  color: #fca5a5;
}
.state-done,
.state-closed,
.state-cancel {
  background: var(--surface-3);
  color: var(--text-2);
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  margin: 20px 0 0;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.stats div {
  background: var(--surface);
  padding: 10px 14px;
}
.stats dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.stats dd {
  margin: 2px 0 0;
  font-weight: 700;
  font-size: 15px;
}
.stats dd small {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.conditions {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-2);
}
.conditions summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
}
.conditions p {
  margin-top: 8px;
  line-height: 1.6;
}
.results {
  padding: 20px 24px;
  border-color: rgba(242, 184, 75, 0.3);
}
.podium {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}
.podium li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  min-width: 0;
}
.podium .pos {
  font-family: var(--font-num);
  font-size: 1.4rem;
  width: 34px;
}
.podium .pos sup {
  font-size: 0.6em;
}
.podium .pos-1 {
  border-color: rgba(242, 184, 75, 0.6);
  background: var(--gold-soft);
}
.podium .pos-1 .pos {
  color: var(--gold);
}
.podium .num {
  font-weight: 800;
}
.pod-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sub {
  font-size: 14px;
  margin-bottom: 10px;
}
.rapports {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.rapport {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.rapport-type {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--gold);
}
.rapport-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  font-size: 13px;
  padding: 3px 0;
  border-top: 1px dashed var(--border);
}
.rapport-line:first-of-type {
  border-top: 0;
}
.rapport-line span {
  color: var(--muted);
}
.rapport-line em {
  font-style: normal;
  font-weight: 700;
  min-width: 70px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.runners {
  padding: 18px 0 14px;
}
.runners .block-head,
.runners .fine {
  padding: 0 20px;
}
.table-wrap {
  overflow-x: auto;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tbl th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tbl tbody tr:last-child td {
  border-bottom: 0;
}
.tbl th:first-child,
.tbl td:first-child {
  padding-left: 20px;
}
.tbl th:last-child,
.tbl td:last-child {
  padding-right: 20px;
}
.c-num {
  width: 52px;
}
.c-silk {
  width: 44px;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.c-sm {
  text-align: right !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.c-cote {
  text-align: right !important;
  width: 90px;
}
.runners-tbl tbody tr {
  transition: background 0.12s;
}
.runners-tbl tr.selectable {
  cursor: pointer;
}
.runners-tbl tr.selectable:hover {
  background: var(--surface-2);
}
.runners-tbl tr.selected {
  background: var(--primary-soft) !important;
  box-shadow: inset 3px 0 0 var(--primary);
}
.runners-tbl tr.np {
  opacity: 0.45;
}
.runners-tbl tr.np .horse {
  text-decoration: line-through;
}
.numbox {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: 8px;
  font-weight: 800;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  font-variant-numeric: tabular-nums;
}
.selected .numbox {
  background: var(--primary);
  border-color: var(--primary);
  color: #03140a;
}
.numbox em {
  position: absolute;
  top: -7px;
  right: -7px;
  font-style: normal;
  font-size: 10px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #231703;
}
.silk {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}
.horse {
  font-weight: 700;
}
.sub-line {
  font-size: 12px;
  color: var(--muted);
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.c-jockey div:first-child {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.musique {
  display: inline-flex;
  gap: 3px;
  font-family: var(--font-num);
  font-size: 14px;
  white-space: nowrap;
}
.musique b {
  font-weight: 600;
  color: var(--text-2);
}
.musique .mu-1 {
  color: var(--gold);
}
.musique .mu-p {
  color: #86efac;
}
.musique .mu-x {
  color: var(--muted);
}
.musique .mu-year {
  font-style: normal;
  color: var(--muted);
  opacity: 0.6;
}
.cote {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-width: 62px;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--surface-3);
  font-family: var(--font-num);
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cote .ic {
  width: 14px;
  height: 14px;
}
.cote.up .ic {
  color: var(--red);
}
.cote.down .ic {
  color: var(--primary);
}
.flash-up {
  animation: flashUp 1.4s ease-out;
}
.flash-down {
  animation: flashDown 1.4s ease-out;
}
@keyframes flashUp {
  0% {
    background: rgba(240, 82, 82, 0.5);
  }
}
@keyframes flashDown {
  0% {
    background: rgba(34, 197, 94, 0.5);
  }
}

/* ============ Ticket ============ */
.slip {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding: 18px;
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
}
.slip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.slip-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
}
.slip-sheet-close {
  display: none;
}
.slip-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.type-btn {
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.type-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.type-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #03140a;
}
.slip-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0;
  line-height: 1.5;
}
.slip-sel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  min-height: 60px;
  border-radius: 12px;
  border: 1px dashed var(--border-strong);
  background: var(--bg-2);
}
.placeholder {
  margin: auto;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.sel-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 9px;
  background: var(--surface-2);
  font-size: 13px;
  animation: pop 0.14s ease-out;
}
.sel-chip em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: #231703;
}
.sel-chip b {
  min-width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #03140a;
}
.sel-chip span {
  flex: 1;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sel-chip button {
  color: var(--muted);
  display: flex;
  padding: 3px;
}
.sel-chip button:hover {
  color: var(--red);
}
.stake {
  margin-top: 16px;
}
.stake label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 8px;
}
.stake-ctl {
  display: flex;
  align-items: center;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  overflow: hidden;
}
.stake-ctl:focus-within {
  border-color: var(--primary);
}
.stake-ctl button {
  width: 48px;
  height: 100%;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-2);
}
.stake-ctl button:hover {
  background: var(--surface-2);
  color: var(--text);
}
.stake-ctl input {
  flex: 1;
  min-width: 0;
  height: 100%;
  text-align: right;
  background: none;
  border: 0;
  outline: none;
  font-family: var(--font-num);
  font-size: 1.5rem;
  font-weight: 700;
}
.stake-ctl .eur {
  padding: 0 6px 0 4px;
  color: var(--muted);
  font-weight: 700;
}
.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.quick .chip {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}
.slip-sum {
  margin: 16px 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
}
.sum-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  padding: 3px 0;
}
.sum-line span {
  color: var(--muted);
}
.slip-closed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 18px 0;
}
.slip-closed .btn {
  margin-top: 10px;
}
.slip-mybets {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.slip-mybets h4 {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.mini-bet {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  font-size: 13px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
}
.mini-bet .st {
  font-weight: 700;
  min-width: 70px;
  text-align: right;
}
.mini-bet.st-won .st {
  color: var(--primary);
}
.mini-bet.st-lost .st {
  color: var(--red);
}
.mini-bet.st-pending .st {
  color: #93c5fd;
}
.slip-bar {
  display: none;
}

/* ============ Mes paris ============ */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.kpi {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.kpi span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.kpi b {
  font-family: var(--font-num);
  font-size: 1.9rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.kpi small {
  color: var(--muted);
  font-size: 12px;
}
.bet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bet {
  display: flex;
  gap: 20px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
}
.bet.st-won {
  border-left-color: var(--primary);
}
.bet.st-lost {
  border-left-color: var(--red);
}
.bet.st-pending {
  border-left-color: var(--blue);
}
.bet.st-refunded,
.bet.st-partial {
  border-left-color: var(--gold);
}
.bet-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bet-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bet-type {
  font-weight: 800;
  font-size: 15px;
}
.bet-course {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: capitalize;
}
.bet-course:hover {
  color: var(--text);
  text-decoration: underline;
}
.bet-sel {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.bet-sel .numbox {
  min-width: 28px;
  height: 28px;
  font-size: 13px;
}
.bet-meta {
  font-size: 12px;
  color: var(--muted);
}
.bet-wins {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bet-wins span {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: #86efac;
}
.bet-side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 130px;
}
.bet-stake {
  display: flex;
  gap: 10px;
  font-size: 13px;
}
.bet-stake span {
  color: var(--muted);
}
.bet-net {
  font-family: var(--font-num);
  font-size: 1.5rem;
  font-weight: 700;
}

/* ============ Classement ============ */
.podium-top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.top-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 14px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}
.top-card.rank-1 {
  border-color: rgba(242, 184, 75, 0.55);
  background: radial-gradient(260px 120px at 50% 0%, rgba(242, 184, 75, 0.18), transparent), var(--surface);
}
.top-card.me {
  box-shadow: 0 0 0 2px var(--primary);
}
.medal {
  position: absolute;
  top: 12px;
  left: 14px;
  font-family: var(--font-num);
  font-size: 1.4rem;
  color: var(--muted);
}
.rank-1 .medal {
  color: var(--gold);
}
.top-avatar {
  width: 54px;
  height: 54px;
  font-size: 18px;
}
.top-avatar.big {
  width: 72px;
  height: 72px;
  font-size: 24px;
  flex: none;
}
.top-card > span:not(.medal):not(.top-avatar) {
  font-family: var(--font-num);
  font-size: 1.5rem;
}
.board tr.me td {
  background: var(--primary-soft);
}
.who {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.mini-avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

/* ============ Compte ============ */
.account-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
  margin-bottom: 18px;
}
.profile {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
}
.wallet {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 22px;
}
.wallet-amount {
  font-family: var(--font-num);
  font-size: 2.6rem;
  line-height: 1;
  color: #86efac;
}
.wallet .btn {
  margin-top: 6px;
}
.card > .block-head {
  padding: 18px 20px 0;
}
.note {
  margin-top: 18px;
  padding: 18px 20px;
}
.note h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

/* ============ Modale & formulaires ============ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(2, 6, 4, 0.7);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s;
}
.modal-backdrop.in {
  opacity: 1;
}
.modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 28px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  transform: translateY(10px);
  transition: transform 0.18s;
}
.modal-backdrop.in .modal {
  transform: none;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--muted);
}
.modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.3rem;
  margin-bottom: 18px;
}
.logo-ic {
  width: 32px;
  height: 32px;
  color: var(--primary);
}
.auth-tabs {
  width: 100%;
}
.auth-tabs .tab {
  flex: 1;
}
.auth-pitch {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 16px;
}
.auth[data-mode='login'] .register-only,
.auth[data-mode='register'] .login-only {
  display: none;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.field span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.form-error {
  min-height: 1em;
  color: #fca5a5;
  font-size: 13px;
}
.form-error:empty {
  display: none;
}

/* ============ Toasts ============ */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 32px));
}
.toast {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.7);
  transform: translateY(12px);
  opacity: 0;
  transition: all 0.25s;
}
.toast.in {
  transform: none;
  opacity: 1;
}
.toast-success {
  border-color: rgba(34, 197, 94, 0.5);
  border-left: 4px solid var(--primary);
}
.toast-error {
  border-color: rgba(240, 82, 82, 0.5);
  border-left: 4px solid var(--red);
}

/* ============ Pied de page ============ */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  font-size: 13px;
  color: var(--text-2);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 24px;
  padding-bottom: 28px;
}

/* ============ Responsive ============ */
@media (max-width: 1100px) {
  .course-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
  .c-gains,
  .c-mus {
    display: none;
  }
  .reunions {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 860px) {
  :root {
    --header-h: 108px;
  }
  .topbar-inner {
    height: auto;
    flex-wrap: wrap;
    gap: 0 12px;
    padding-top: 10px;
  }
  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    margin: 6px -4px 0;
    padding-bottom: 4px;
  }
  .nav a.active {
    box-shadow: inset 0 -2px 0 var(--primary);
  }
  .course-layout {
    grid-template-columns: 1fr;
  }
  .slip {
    position: fixed;
    inset: auto 0 0 0;
    top: auto;
    z-index: 70;
    max-height: 88vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(105%);
    transition: transform 0.25s ease;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
  body.slip-open .slip {
    transform: none;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.7);
  }
  body.slip-open::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(0, 0, 0, 0.55);
  }
  .slip-sheet-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--surface-2);
  }
  .slip-head .link {
    margin-left: auto;
    margin-right: 12px;
  }
  .slip-bar:not([hidden]) {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 10px 10px 16px;
    border-radius: 14px;
    background: var(--surface-3);
    border: 1px solid var(--border-strong);
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.8);
    font-size: 14px;
  }
  .slip-bar span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .account-grid {
    grid-template-columns: 1fr;
  }
  .c-jockey,
  .c-corde,
  .c-hide-m {
    display: none;
  }
}
@media (max-width: 600px) {
  .container {
    padding: 0 14px;
  }
  main.container {
    padding-top: 20px;
  }
  .balance-label {
    display: none;
  }
  .balance {
    padding: 4px 10px;
  }
  .account .btn {
    height: 36px;
    padding: 0 12px;
  }
  .welcome {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }
  .race-row {
    grid-template-columns: 32px 44px 1fr auto;
    padding: 10px 14px;
    gap: 8px;
  }
  .race-go {
    display: none;
  }
  .reunion-info {
    display: none;
  }
  .hero {
    padding: 18px;
  }
  .hero-top {
    flex-wrap: wrap;
  }
  .hero-code {
    width: 58px;
    height: 58px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .spot-side {
    width: 100%;
    justify-content: space-between;
  }
  .tbl td,
  .tbl th {
    padding: 8px 6px;
  }
  .tbl th:first-child,
  .tbl td:first-child {
    padding-left: 12px;
  }
  .tbl th:last-child,
  .tbl td:last-child {
    padding-right: 12px;
  }
  .runners .block-head,
  .runners .fine {
    padding: 0 12px;
  }
  .sub-line {
    max-width: 160px;
  }
  .bet {
    flex-direction: column;
    gap: 10px;
  }
  .bet-side {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .podium-top {
    grid-template-columns: 1fr;
  }
  .seg-btn {
    padding: 6px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
[hidden] {
  display: none !important;
}
.silk {
  max-width: none;
}
.c-silk {
  min-width: 44px;
}
@media (max-width: 1500px) {
  .c-gains {
    display: none;
  }
}
.runners-tbl .sub-line {
  max-width: 220px;
}
.results > .block-head {
  padding: 0;
}
@media (max-width: 600px) {
  .hero-title {
    order: 3;
    flex-basis: 100%;
  }
  .hero-top .state {
    margin-left: auto;
  }
  .hero h1 {
    font-size: 1.35rem;
  }
}
@media (max-width: 600px) {
  .runners-tbl .sub-line {
    max-width: 150px;
  }
  .c-poids {
    display: none;
  }
}

/* ============ Pronostic IA ============ */
.small {
  font-size: 12px;
}
.prono {
  padding: 20px 22px;
  border-color: rgba(167, 139, 250, 0.35);
  background: radial-gradient(420px 160px at 100% 0%, rgba(167, 139, 250, 0.14), transparent 70%),
    linear-gradient(180deg, var(--surface), var(--bg-2));
}
.prono-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.prono-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-badge {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  color: #160b33;
  background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
  box-shadow: 0 6px 16px -6px rgba(139, 92, 246, 0.8);
}
.conf {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.conf-elevee {
  background: var(--primary-soft);
  color: #86efac;
}
.conf-moyenne {
  background: var(--gold-soft);
  color: var(--gold);
}
.conf-faible {
  background: var(--red-soft);
  color: #fca5a5;
}
.prono-rank {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prono-rank li {
  display: grid;
  grid-template-columns: 22px 34px minmax(0, 1fr) minmax(60px, 160px) 46px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--surface-2);
}
.prono-rank li:first-child {
  background: rgba(167, 139, 250, 0.12);
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.35);
}
.prono-rank li.is-outsider .pr-name small {
  color: var(--gold);
}
.rk {
  font-family: var(--font-num);
  font-size: 1.1rem;
  color: var(--muted);
}
.pr-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pr-name b,
.pr-name small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pr-name small {
  font-size: 12px;
  color: var(--muted);
}
.pr-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
}
.pr-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #8b5cf6, #c4b5fd);
  transition: width 0.6s ease;
}
.pr-pct {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.outsider {
  margin-top: 10px;
  font-size: 13px;
  color: var(--gold);
}
.prono-analysis {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
}
.typing {
  color: var(--muted);
}
.typing span {
  animation: blink 1.2s infinite;
}
.typing span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.prono-sugg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}
.sugg {
  padding: 6px 11px;
  border-radius: 9px;
  font-size: 13px;
  background: var(--surface-2);
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: var(--text-2);
  transition: background 0.15s;
}
.sugg:hover {
  background: rgba(167, 139, 250, 0.16);
  color: var(--text);
}
.sugg b {
  color: #c4b5fd;
  margin-right: 4px;
}
.bilan {
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}
.bilan.ok {
  background: var(--primary-soft);
  color: #86efac;
}
.bilan.mid {
  background: var(--gold-soft);
  color: var(--gold);
}
.bilan.ko {
  background: var(--surface-3);
  color: var(--text-2);
}
.skeleton {
  height: 150px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
.ia-prob {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #c4b5fd;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .prono {
    padding: 16px;
  }
  .prono-rank li {
    grid-template-columns: 18px 30px minmax(0, 1fr) 42px;
  }
  .pr-bar {
    display: none;
  }
}
.runners-tbl.is-done .c-mus {
  display: none;
}
