@import url('https://fonts.googleapis.com/css2?family=Michroma&family=Space+Mono:wght@400;700&display=swap');

/* RaceLine — style.css */
@import url('/assets/css/global.css');

/* Curseur custom */
*, *::before, *::after { cursor: none !important; }

/* ════════════════════════════════════════
   HEADER — Nouvelle version
   ════════════════════════════════════════ */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(12px, 1.8vw, 28px);
  height: clamp(40px, 5vh, 52px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--panel-border);
  flex-shrink: 0;
  position: relative;
  gap: 12px;
}

/* ── GAUCHE ── */
.header-left {
  display: flex; align-items: center;
  gap: clamp(8px, 0.8vw, 14px);
  flex-shrink: 0;
}

.rl-home-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--muted); text-decoration: none;
  transition: color 0.18s, border-color 0.18s;
  flex-shrink: 0;
}
.rl-home-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }
body:not(.dark) .rl-home-btn { border-color: rgba(0,0,0,0.1); }
body:not(.dark) .rl-home-btn:hover { border-color: rgba(0,0,0,0.3); }

.rl-header-sep {
  width: 1px; height: 18px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}
body:not(.dark) .rl-header-sep { background: rgba(0,0,0,0.08); }

.logo-img {
  height: clamp(20px, 2.8vh, 30px);
  width: auto;
  border-radius: 6px;
  background: transparent;
}
body:not(.dark) .logo-img { background: transparent; mix-blend-mode: multiply; }

.brand-name {
  font-family: 'Michroma', sans-serif;
  font-size: clamp(11px, 1.2vw, 16px);
  letter-spacing: 0.2em;
  color: var(--text);
  white-space: nowrap;
}
.brand-name span { color: var(--red); }

/* ── CENTRE : Année ── */
.header-center {
  position: absolute;
  left: 50%; transform: translateX(-50%);
}

.season-selector {
  display: flex; align-items: center;
  gap: clamp(6px, 0.6vw, 12px);
}

.season-btn {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 16px; line-height: 1;
  padding: 0 4px; transition: color 0.18s;
  font-family: 'Michroma', sans-serif;
}
.season-btn:hover { color: var(--red); }

.season-value {
  font-family: 'Michroma', sans-serif;
  font-size: clamp(12px, 1.3vw, 17px);
  letter-spacing: 0.25em;
  color: var(--text);
  min-width: 48px; text-align: center;
}

/* ── DROITE ── */
.header-right {
  display: flex; align-items: center;
  gap: clamp(6px, 0.7vw, 12px);
  flex-shrink: 0;
}

.live-dot {
  display: flex; align-items: center; gap: 6px;
  font-family: 'Michroma', sans-serif;
  font-size: clamp(7px, 0.65vw, 9px);
  letter-spacing: 0.15em; color: var(--muted);
}

/* Bouton icône générique */
.rl-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.1);
  background: none; cursor: pointer;
  color: var(--muted);
  transition: color 0.18s, border-color 0.18s;
  padding: 0;
}
.rl-icon-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }
.rl-icon-btn.active { color: var(--red); border-color: rgba(225,6,0,0.4); }
body:not(.dark) .rl-icon-btn { border-color: rgba(0,0,0,0.1); }
body:not(.dark) .rl-icon-btn:hover { border-color: rgba(0,0,0,0.25); }

/* Session selector R/Q/S */
.session-selector {
  display: flex; align-items: center;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 5px;
  overflow: hidden;
}
body:not(.dark) .session-selector { border-color: rgba(0,0,0,0.1); }

.session-btn {
  background: none; border: none; border-right: 1px solid rgba(255,255,255,0.08);
  cursor: pointer; padding: 0 10px; height: 28px;
  font-family: 'Michroma', sans-serif;
  font-size: clamp(8px, 0.7vw, 10px); letter-spacing: 0.1em;
  color: var(--muted); transition: color 0.18s, background 0.18s;
}
body:not(.dark) .session-btn { border-right-color: rgba(0,0,0,0.06); }
.session-btn:last-child { border-right: none; }
.session-btn:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.session-btn.active { color: var(--red); background: rgba(225,6,0,0.08); }



/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .header-center { display: none; }
  .brand-name { display: none; }
  .live-dot span { display: none; }
}

:root {
    --red: #E10600;
    --bg: #eaeaea;
    --panel-bg: rgba(255,255,255,0.88);
    --panel-border: rgba(225,6,0,0.5);
    --text: #1a1a2e;
    --text-light: #555;
    --muted: #888;
    --header-bg: rgba(255,255,255,0.95);
    --cell-empty: rgba(0,0,0,0.07);
    --row-hover: rgba(225,6,0,0.05);
    --row-border: rgba(0,0,0,0.06);
    --input-bg: #f0f0f0;
  }
  body.dark {
    --bg: #1e2129;
    --panel-bg: rgba(38,42,52,0.95);
    --panel-border: rgba(225,6,0,0.6);
    --text: #e8e8f0;
    --text-light: #aaa;
    --muted: #666;
    --header-bg: rgba(28,31,40,0.98);
    --cell-empty: rgba(255,255,255,0.06);
    --row-hover: rgba(225,6,0,0.08);
    --row-border: rgba(255,255,255,0.05);
    --input-bg: #2a2d38;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html, body {
    width: 100%;
    height: 100%;
  }

  body {
    background-color: var(--bg);
    background-size: 280px 280px;
    background-repeat: repeat;
    color: var(--text);
    font-family: 'Space Mono', monospace;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* ── HEADER ── */
  
  
  
  
  

  
  
  
  
  
  
  
  
  
  .dot { width: 8px; height: 8px; border-radius: 50%; background: #ccc; flex-shrink: 0; }
  .dot.live { background: var(--red); animation: blink 1.2s infinite; }
  @keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.2} }

  /* ── GRID ── */
  
  /* ── PANELS ── */
  .panel {
    background: var(--panel-bg);
    border: 2px solid var(--panel-border);
    border-radius: 8px;
    padding: clamp(8px, 1.2vh, 16px) clamp(8px, 1vw, 14px);
    display: flex; flex-direction: column;
    overflow: hidden; min-height: 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(225,6,0,0.07);
    position: relative;
  }


  .panel::before { display: none; }
  .panel-title {
    font-family: 'Michroma', sans-serif;
    font-size: clamp(9px, 0.9vw, 13px);
    letter-spacing: 0.25vw; color: var(--red);
    margin-bottom: clamp(4px, 0.6vh, 10px);
    flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  }
  .panel-title::after { display: none; }

  /* ── SCROLLBARS ── */
  .standings-list, .victories-body, .sessions-list {
    overflow-y: auto; scrollbar-width: thin;
    scrollbar-color: rgba(225,6,0,0.3) transparent;
  }

  /* ── PILOTES ── */
  .standings-list { flex: 1; min-height: 0; }
  .driver-row {
    display: grid;
    grid-template-columns: clamp(16px,1.5vw,24px) clamp(18px,1.8vw,26px) 1fr auto auto;
    align-items: center;
    gap: clamp(4px, 0.5vw, 9px);
    padding: clamp(2px, 0.4vh, 6px) 4px;
    border-bottom: 1px solid var(--row-border);
    border-radius: 3px; transition: background 0.15s;
  }
  .driver-row:hover { background: var(--row-hover); }
  .driver-row.leader { background: rgba(225,6,0,0.06); }
  .pos { font-family: 'Michroma', sans-serif; font-size: clamp(9px,0.85vw,12px); color: var(--muted); text-align: right; }
  .num-badge {
    width: clamp(16px,1.6vw,24px); height: clamp(14px,1.4vh,20px);
    border-radius: 3px; display: flex; align-items: center; justify-content: center;
    font-family: 'Michroma', sans-serif; font-size: clamp(6px,0.55vw,8px); flex-shrink: 0;
  }
  .driver-name { font-weight: 700; font-size: clamp(11px,1.1vw,16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .driver-team { font-size: clamp(8px,0.75vw,11px); color: var(--muted); }
  .pts { font-family: 'Michroma', sans-serif; font-size: clamp(10px,0.95vw,14px); }
  .gap-val { font-size: clamp(9px,0.85vw,12px); color: var(--muted); text-align: right; min-width: 3vw; }

  /* ── VICTOIRES ── */
  .victories-container { flex: 1; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
  .victories-header-row { display: flex; gap: 2px; margin-bottom: 2px; flex-shrink: 0; padding-left: clamp(80px,8vw,112px); }
  .race-col-label { flex: 1; text-align: center; font-size: clamp(5px,0.5vw,7px); color: var(--muted); font-family: 'Michroma', sans-serif; }
  .victories-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(225,6,0,0.3) transparent; display: flex; flex-direction: column; gap: 2px; }
  .victory-row { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
  .v-driver-name {
    width: clamp(80px,8vw,110px); font-size: clamp(9px,0.85vw,12px);
    color: var(--text-light); flex-shrink: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-family: 'Space Mono', monospace;
  }
  .v-cells { display: flex; gap: 2px; flex: 1; }
  .v-cell {
    flex: 1; height: clamp(10px,1.3vh,17px);
    border-radius: 2px; background: var(--cell-empty);
    position: relative; cursor: default; transition: transform 0.1s, filter 0.1s;
  }
  .v-cell.won { animation: cellIn 0.25s ease both; }
  @keyframes cellIn { from{transform:scaleY(0)} to{transform:scaleY(1)} }
  .v-cell:hover { transform: scaleY(1.3); filter: brightness(1.2); z-index: 5; }
  /* tooltip géré en JS */

  /* ── CONSTRUCTEURS ── */
  .constructor-row {
    display: grid;
    grid-template-columns: clamp(16px,1.5vw,22px) 5px 1fr auto;
    align-items: center;
    gap: clamp(4px, 0.5vw, 9px);
    padding: clamp(2px, 0.5vh, 7px) 4px;
    border-bottom: 1px solid var(--row-border);
    border-radius: 3px; transition: background 0.15s;
  }
  .constructor-row:hover { background: var(--row-hover); }
  .team-stripe { width: 4px; height: clamp(18px,2.2vh,28px); border-radius: 2px; }
  .team-name { font-size: clamp(11px,1.1vw,16px); font-weight: 700; letter-spacing: 0.03vw; }
  .team-sub { font-size: clamp(6px,0.6vw,9px); color: var(--muted); }
  .team-pts { font-family: 'Michroma', sans-serif; font-size: clamp(11px,1.05vw,15px); min-width: 3vw; text-align: right; }
  .bar-wrap { height: 3px; background: rgba(128,128,128,0.15); border-radius: 2px; margin-top: 2px; }
  .bar-fill { height: 100%; border-radius: 2px; width: 0%; transition: width 1s ease; }

  /* ── HORAIRES ── */
  .next-race-info { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: clamp(4px,0.6vh,10px); flex-shrink: 0; }
  .next-race-name { font-family: 'Michroma', sans-serif; font-size: clamp(12px,1.3vw,18px); color: var(--text); letter-spacing: 0.1vw; line-height: 1.3; }
  .next-race-circuit { font-size: clamp(9px,0.85vw,12px); color: var(--muted); letter-spacing: 0.05vw; margin-top: 2px; }
  .round-badge { background: var(--red); color: #fff; font-family: 'Michroma', sans-serif; font-size: clamp(6px,0.65vw,9px); padding: clamp(2px,0.3vh,4px) clamp(5px,0.6vw,9px); border-radius: 3px; letter-spacing: 0.1vw; flex-shrink: 0; }
  .cd-label-row { text-align: center; margin-bottom: clamp(3px,0.5vh,8px); flex-shrink: 0; }
  #cd-label { font-family: 'Michroma', sans-serif; font-size: clamp(7px,0.7vw,10px); letter-spacing: 0.25vw; color: var(--red); }
  .countdown { display: flex; gap: clamp(4px,0.5vw,8px); margin-bottom: clamp(4px,0.6vh,10px); flex-shrink: 0; }
  .countdown-unit {
    flex: 1; background: var(--input-bg);
    border: 1px solid var(--row-border); border-top: 2px solid var(--red);
    padding: clamp(3px,0.5vh,8px) 4px; text-align: center; border-radius: 4px;
  }
  .countdown-value { font-family: 'Michroma', sans-serif; font-size: clamp(18px,2.4vh,32px); color: var(--red); line-height: 1; display: block; }
  .countdown-label { font-size: clamp(6px,0.6vh,8px); color: var(--muted); letter-spacing: 0.15vw; display: block; margin-top: 2px; }
  #schedulePanel { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  .sessions-list { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(225,6,0,0.3) transparent; }
  .session-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: clamp(3px,0.45vh,6px) 8px;
    border-bottom: 1px solid var(--row-border);
    position: relative; border-radius: 3px;
    cursor: pointer; transition: background 0.15s;
  }
  .session-row:not(.past):hover { background: rgba(225,6,0,0.08); }
  .session-row.past { opacity: 0.35; }
  .session-row.selected { background: rgba(225,6,0,0.12) !important; padding-left: 12px; }
  .session-row.selected::before { content: ''; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; background: var(--red); border-radius: 2px; }
  .session-name { font-weight: 700; font-size: clamp(9px,0.9vw,13px); letter-spacing: 0.05vw; }
  .session-time { font-family: 'Michroma', sans-serif; font-size: clamp(9px,0.9vw,13px); color: var(--text-light); text-align: right; }

  /* ── LOADING ── */
  .loading { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 10px; color: var(--muted); font-size: clamp(8px,0.8vw,11px); letter-spacing: 2px; }
  .spinner { width: 22px; height: 22px; border: 2px solid rgba(225,6,0,0.2); border-top-color: var(--red); border-radius: 50%; animation: spin 0.8s linear infinite; }
  @keyframes spin { to{transform:rotate(360deg)} }
  .info-msg { color: var(--muted); font-size: clamp(8px,0.8vw,11px); text-align: center; padding: 16px; letter-spacing: 1px; line-height: 1.8; }

  /* ── RESPONSIVE MOBILE ── */
  @media (max-width: 768px) {
    html, body { height: auto; overflow-y: auto; overflow-x: hidden; }
    body { overflow: auto; }
    
  /* ── PANELS ── */
  .panel {
    background: var(--panel-bg);
    border: 2px solid var(--panel-border);
    border-radius: 8px;
    padding: clamp(8px, 1.2vh, 16px) clamp(8px, 1vw, 14px);
    display: flex; flex-direction: column;
    overflow: hidden; min-height: 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(225,6,0,0.07);
    position: relative;
  }

    .panel { overflow: hidden; }
    
    
    
  }

  /* ── SESSION BUTTONS (compact) ── */
  .session-btns {
    display: flex;
    gap: clamp(4px, 0.5vw, 8px);
    flex-shrink: 0;
    margin-bottom: clamp(6px, 1vh, 12px);
    flex-wrap: wrap;
  }
  .sess-btn {
    flex: 1;
    min-width: 0;
    padding: clamp(5px,0.7vh,9px) clamp(4px,0.4vw,8px);
    background: var(--input-bg);
    border: 1px solid var(--border-col, var(--row-border));
    border-radius: 5px;
    font-family: 'Michroma', sans-serif;
    font-size: clamp(8px, 0.75vw, 11px);
    color: var(--muted);
    cursor: pointer;
    text-align: center;
    transition: all 0.18s ease;
    letter-spacing: 0.05em;
    line-height: 1.2;
    white-space: nowrap;
  }
  .sess-btn .sess-time {
    display: block;
    font-size: clamp(7px, 0.65vw, 9px);
    color: var(--muted);
    margin-top: 2px;
    opacity: 0.8;
    font-family: 'Space Mono', monospace;
  }
  .sess-btn:hover:not(.past-btn) {
    border-color: var(--red);
    color: var(--text);
    background: rgba(225,6,0,0.06);
  }
  .sess-btn.active-btn {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
  }
  .sess-btn.active-btn .sess-time { color: rgba(255,255,255,0.75); }
  .sess-btn.past-btn {
    opacity: 0.38;
    cursor: default;
  }

  /* ── LIVE TIMING BUTTONS ── */
  .lt-section {
    flex-shrink: 0;
    margin-top: clamp(6px, 1vh, 12px);
    text-align: center;
  }
  .lt-label {
    font-family: 'Michroma', sans-serif;
    font-size: clamp(7px, 0.65vw, 9px);
    letter-spacing: 0.2em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 6px;
    text-align: center;
  }
  .lt-btns {
    display: flex;
    gap: clamp(4px, 0.5vw, 8px);
    flex-wrap: wrap;
    justify-content: center;
  }
  .lt-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: clamp(5px,0.6vh,8px) clamp(8px,0.8vw,14px);
    border-radius: 5px;
    font-family: 'Michroma', sans-serif;
    font-size: clamp(8px, 0.75vw, 11px);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s ease;
    border: 1px solid transparent;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }
  .lt-btn.lt-official {
    background: #E10600;
    color: #fff;
  }
  .lt-btn.lt-official:hover { background: #bf0500; }
  .lt-btn.lt-canal {
    background: var(--input-bg);
    color: var(--text);
    border-color: var(--row-border);
  }
  .lt-btn.lt-canal:hover { border-color: var(--red); background: rgba(225,6,0,0.06); }
  .lt-btn.lt-f1tv {
    background: #15151e;
    color: #fff;
    border-color: #333;
  }
  .lt-btn.lt-f1tv:hover { border-color: var(--red); }
  body.dark .lt-btn.lt-canal {
    background: var(--input-bg);
    border-color: var(--row-border);
    color: var(--text);
  }

  /* ── LISIBILITE DARK/LIGHT améliorée ── */
  body.dark .panel {
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  }
  body.dark .sess-btn {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: #aaa;
  }
  body.dark .sess-btn:hover:not(.past-btn) {
    background: rgba(225,6,0,0.12);
    border-color: var(--red);
    color: #fff;
  }
  body.dark .driver-row { border-bottom-color: rgba(255,255,255,0.06); }
  body.dark .constructor-row { border-bottom-color: rgba(255,255,255,0.06); }
  body.dark .num-badge { box-shadow: none; }
  body.dark .countdown-unit {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
  }
  body.dark .next-race-name { color: #e8e8f0; }
  body.dark .round-badge { box-shadow: 0 0 12px rgba(225,6,0,0.3); }

  /* Light mode lisibilité */
  .driver-row.leader { background: rgba(225,6,0,0.05); border-left: 2px solid var(--red); }
  .countdown-unit { box-shadow: inset 0 1px 0 rgba(255,255,255,0.6); }
  body.dark .countdown-unit { box-shadow: none; }


  
  


  .next-race-label {
    font-family: 'Michroma', sans-serif;
    font-size: clamp(8px, 0.75vw, 11px);
    color: var(--red);
    letter-spacing: 0.2em;
    margin-bottom: 4px;
    text-transform: uppercase;
  }
  .lt-btn.lt-perso {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    opacity: 0.75;
  }
  .lt-btn.lt-perso:hover { opacity: 1; }


  /* ── TOOLTIP GLOBAL VICTOIRES ── */
  #vTooltip {
    position: fixed;
    background: var(--text);
    color: var(--bg);
    font-family: 'Michroma', sans-serif;
    font-size: 9px;
    padding: 5px 10px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.12s ease;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  }
  #vTooltip.visible { opacity: 1; }


  
  
/* ── FOOTER RACELINE ── */
.rl-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px clamp(12px,2vw,24px);
  border-top: 1px solid var(--row-border);
  font-family: 'Michroma', sans-serif;
  font-size: 9px; letter-spacing: 0.15em;
  color: var(--muted);
  flex-shrink: 0;
  flex-wrap: wrap; gap: 6px;
}
.rl-footer a {
  color: var(--muted); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.rl-footer a:hover { color: var(--red); border-color: var(--red); }

/* ── Navigation GP prev/next ── */
.gp-nav {
  display: flex; align-items: center;
  gap: 8px; width: 100%;
}
.gp-nav-center {
  flex: 1; min-width: 0;
}
.gp-nav-btn {
  background: none; border: 1px solid var(--panel-border);
  border-radius: 4px; color: var(--muted); font-size: 18px; line-height: 1;
  width: 26px; height: 26px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, border-color .15s;
}
.gp-nav-btn:hover:not([disabled]) { color: var(--text); border-color: var(--text); }
.gp-nav-btn[disabled] { opacity: 0.25; cursor: default; }
.next-race-weekend {
  font-size: clamp(8px,.75vw,10px); color: var(--muted);
  letter-spacing: .05em; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.round-badge-row {
  display: flex; justify-content: flex-end;
  margin: 4px 0 2px;
}


/* ══ LAYOUT 4 QUADRANTS — fix hauteur ══ */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  grid-template-areas:
    "standings circuit"
    "victories schedule";
  height: calc(100vh - var(--header-h) - 32px);
  gap: 0;
  overflow: hidden;
}

.panel-standings { grid-area: standings; display:flex; flex-direction:column; overflow:hidden; border-right: 1px solid var(--panel-border); border-bottom: 1px solid var(--panel-border); }
.panel-circuit   { grid-area: circuit;  display:flex; flex-direction:column; overflow:hidden; border-bottom: 1px solid var(--panel-border); }
.panel-victories { grid-area: victories;display:flex; flex-direction:column; overflow:hidden; border-right: 1px solid var(--panel-border); }
.panel-schedule  { grid-area: schedule; display:flex; flex-direction:column; overflow:hidden; }

/* Override les styles .panel existants pour les 4 zones */
.panel-standings.panel, .panel-circuit.panel,
.panel-victories.panel, .panel-schedule.panel {
  border-radius: 0;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* Séparations entre panneaux */
.panel-standings  { border-right: 1px solid var(--panel-border); border-bottom: 1px solid var(--panel-border); }
.panel-circuit    { border-bottom: 1px solid var(--panel-border); }
.panel-victories  { border-right: 1px solid var(--panel-border); }

/* ══ TABS CLASSEMENTS ══ */
.standings-tabs {
  display: flex; align-items: center; gap: 0;
  border-bottom: 1px solid var(--panel-border);
  padding: 0 clamp(8px,1vw,14px);
  flex-shrink: 0;
}
.st-tab {
  background: none; border: none; cursor: pointer;
  font-family: var(--mono); font-size: clamp(8px,.75vw,10px);
  letter-spacing: .12em; color: var(--muted);
  padding: 10px 14px 9px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.st-tab:hover { color: var(--text); }
.st-tab.active { color: var(--red); border-bottom-color: var(--red); }
.st-sep { width: 1px; height: 14px; background: var(--panel-border); margin: 0 4px; }
.standings-pane { flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column; }

/* ══ CIRCUIT PANEL ══ */
.circuit-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0;
}
.circuit-map-area { display: none; }
.circuit-map-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.circuit-svg-placeholder { width: 80%; height: 80%; }
.circuit-stats {
  flex: 1; overflow-y: auto;
  padding: clamp(14px,1.8vw,24px) clamp(16px,2vw,28px);
  display: flex; flex-direction: column; gap: 0;
}
.cs-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  font-size: clamp(10px,.9vw,12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.cs-label { color: var(--muted); letter-spacing: .1em; font-size: clamp(8px,.72vw,10px); }
.cs-val   { color: var(--text); font-family: var(--mono); font-size: clamp(10px,.9vw,12px); }
.cs-val b { color: var(--red); }
.cs-record { color: var(--red); letter-spacing: .04em; }
.cs-type {
  font-size: 8px; letter-spacing: .1em;
  padding: 2px 7px; border: 1px solid var(--panel-border);
  border-radius: 3px; color: var(--muted);
}
.cs-divider {
  height: 1px; background: var(--panel-border);
  margin: 6px 0;
}
.circuit-placeholder {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--muted); font-size: 11px; letter-spacing: .08em;
}

/* ══ PANEL SCHEDULE (BAS DROIT) ══ */
.panel-schedule #schedulePanel {
  height: 100%;
  display: flex; flex-direction: column;
}

/* ══ RESPONSIVE ══ */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, auto);
    grid-template-areas: "standings" "circuit" "victories" "schedule";
    height: auto;
  }
  .panel-standings, .panel-circuit, .panel-victories { border-right: none; }
  .standings-pane { max-height: 350px; }
  .circuit-layout { min-height: 300px; }
}

/* ══ CIRCUIT HEADER (nom GP en grand dans le panel) ══ */
.circuit-name-header {
  padding: clamp(16px,2vw,28px) clamp(16px,2vw,28px) 0;
  flex-shrink: 0;
}
.circuit-name-gp {
  font-family: var(--serif);
  font-size: clamp(18px,2vw,28px);
  color: var(--text);
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.circuit-name-full {
  font-size: clamp(9px,.8vw,11px);
  color: var(--muted);
  letter-spacing: .1em;
  font-family: var(--mono);
}
.circuit-divider-line {
  height: 1px;
  background: var(--red);
  opacity: .4;
  margin: clamp(12px,1.5vw,20px) 0 0;
}

/* ── Bouton refresh classements ── */
.rl-refresh-btn {
  margin-left: auto;
  background: none; border: 1px solid var(--panel-border);
  border-radius: 4px; padding: 3px 9px;
  font-family: var(--mono); font-size: 8px; letter-spacing:.12em;
  color: var(--muted); cursor: pointer;
  transition: color .15s, border-color .15s;
  flex-shrink: 0;
}
.rl-refresh-btn:hover { color: var(--red); border-color: var(--red); }
.rl-refresh-btn.spinning { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Bande infos circuit dans le panel schedule ── */
.sched-circuit-strip {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0; padding: 8px clamp(10px,1.2vw,18px);
  border-bottom: 1px solid var(--panel-border);
  border-top: 1px solid var(--panel-border);
  background: rgba(225,6,0,.03);
  flex-shrink: 0;
}
.scs-item { display:flex; flex-direction:column; padding: 3px 10px; }
.scs-lbl  { font-size: clamp(6px,.55vw,8px); letter-spacing:.12em; color:var(--muted); text-transform:uppercase; }
.scs-val  { font-family:var(--mono); font-size:clamp(9px,.85vw,12px); color:var(--text); margin-top:1px; }
.scs-val b { color:var(--red); }
.scs-record { color:var(--red); }
.scs-sep  { width:1px; background:var(--panel-border); margin: 4px 0; align-self:stretch; }

/* ── Liens live dans le panel schedule ── */
.sched-links {
  display: flex; align-items: center; gap: 8px;
  padding: 10px clamp(10px,1.2vw,18px);
  flex-shrink: 0;
}
.sched-link {
  font-family: var(--mono); font-size: clamp(8px,.75vw,10px);
  letter-spacing: .1em; color: var(--muted);
  text-decoration: none; padding: 4px 10px;
  border: 1px solid var(--panel-border); border-radius: 4px;
  transition: color .15s, border-color .15s;
}
.sched-link:hover { color: var(--text); border-color: var(--text); }
.pitwall-link { color: var(--red); border-color: rgba(225,6,0,.4); }
.pitwall-link:hover { background: rgba(225,6,0,.08); border-color: var(--red); }
