/* ===========================
   STINT — CSS Principal
   Thème : Racing Dark / Rouge Carbone
   =========================== */

:root {
  --red: #e8001d;
  --red-dark: #b5001a;
  --black: #0a0a0a;
  --dark: #111111;
  --dark2: #1a1a1a;
  --dark3: #222222;
  --gray: #888888;
  --gray-light: #cccccc;
  --white: #f5f5f5;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 8px;
  --radius-lg: 14px;
  --bottom-nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--black); color: var(--white);
  font-family: var(--font-body); font-weight: 400; line-height: 1.5;
  min-height: 100vh; padding-bottom: var(--bottom-nav-h);
  -webkit-font-smoothing: antialiased;
}

/* HEADER */
.header { position: sticky; top: 0; z-index: 100; background: var(--black); border-bottom: 1px solid #1f1f1f; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; height: 52px; }
.logo-img { display: flex; align-items: center; text-decoration: none; }
.logo-img img { height: 36px; width: auto; object-fit: contain; }
.season-badge { font-family: var(--font-body); font-size: 10px; font-weight: 600; letter-spacing: 2px; color: var(--red); border: 1px solid var(--red); padding: 3px 8px; border-radius: 4px; }

/* NAV TABS */
.nav-tabs { display: flex; border-bottom: 1px solid #1f1f1f; padding: 0 16px; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav-tabs::-webkit-scrollbar { display: none; }
.tab { background: none; border: none; color: var(--gray); font-family: var(--font-body); font-size: 13px; font-weight: 500; padding: 12px 16px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; transition: all 0.2s; letter-spacing: 0.5px; }
.tab:hover { color: var(--white); }
.tab.active { color: var(--white); border-bottom-color: var(--red); }

.main { padding: 16px; max-width: 680px; margin: 0 auto; }
.tab-content { display: none; animation: fadeIn 0.25s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.section-title { font-family: var(--font-display); font-size: 22px; letter-spacing: 2px; color: var(--white); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } }

/* SKELETON */
.skeleton-card { background: linear-gradient(90deg, var(--dark2) 25%, var(--dark3) 50%, var(--dark2) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius); height: 90px; margin-bottom: 12px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* NEWS */
.news-list { display: flex; flex-direction: column; gap: 12px; }
.news-card { background: var(--dark2); border: 1px solid #222; border-radius: var(--radius-lg); padding: 14px 16px; text-decoration: none; display: block; transition: all 0.2s; position: relative; overflow: hidden; }
.news-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--red); transform: scaleY(0); transition: transform 0.2s; }
.news-card:hover { background: var(--dark3); border-color: #333; transform: translateX(4px); }
.news-card:hover::before { transform: scaleY(1); }
.news-source { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; color: var(--red); text-transform: uppercase; margin-bottom: 6px; }
.news-title { font-size: 14px; font-weight: 500; color: var(--white); line-height: 1.4; margin-bottom: 6px; }
.news-desc { font-size: 12px; color: var(--gray); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-date { font-size: 11px; color: var(--gray); margin-top: 8px; }
.news-ai-summary { font-size: 12px; color: var(--gray-light); line-height: 1.5; margin: 6px 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; border-left: 2px solid var(--red); padding-left: 8px; }

/* CALENDAR */
.calendar-list { display: flex; flex-direction: column; gap: 10px; }
.race-card { background: var(--dark2); border: 1px solid #222; border-radius: var(--radius-lg); padding: 14px 16px; display: flex; align-items: center; gap: 14px; transition: all 0.2s; cursor: pointer; }
.race-card:hover { border-color: #333; background: var(--dark3); }
.race-card.next-race { border-color: var(--red); background: rgba(232, 0, 29, 0.06); }
.race-round { font-family: var(--font-display); font-size: 28px; color: var(--red); min-width: 44px; text-align: center; line-height: 1; }
.race-info { flex: 1; }
.race-name { font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 3px; }
.race-circuit { font-size: 12px; color: var(--gray); }
.race-weekend-dates { font-size: 11px; color: var(--gray); margin-top: 2px; letter-spacing: 0.5px; }
.race-date { text-align: right; }
.race-date-day { font-family: var(--font-display); font-size: 20px; color: var(--white); line-height: 1; }
.race-date-month { font-size: 11px; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; }
.race-status { display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 1px; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; margin-top: 4px; }
.race-status.completed { background: rgba(255,255,255,0.08); color: var(--gray); }
.race-status.upcoming { background: rgba(232, 0, 29, 0.2); color: var(--red); }
.race-status.live { background: var(--red); color: white; animation: pulse 1s infinite; }
.race-chevron { font-size: 20px; color: var(--gray); margin-top: 4px; text-align: right; }

/* STANDINGS */
.standings-toggle { display: flex; gap: 8px; margin-bottom: 16px; background: var(--dark2); padding: 4px; border-radius: var(--radius); }
.standings-btn { flex: 1; background: none; border: none; color: var(--gray); font-family: var(--font-body); font-size: 13px; font-weight: 500; padding: 8px; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.standings-btn.active { background: var(--red); color: white; }
.standings-list { display: flex; flex-direction: column; gap: 8px; }
.standing-card { background: var(--dark2); border: 1px solid #222; border-radius: var(--radius); padding: 12px 16px; display: flex; align-items: center; gap: 14px; transition: all 0.2s; }
.standing-card:hover { border-color: #333; }
.standing-card.podium-1 { border-left: 3px solid #FFD700; }
.standing-card.podium-2 { border-left: 3px solid #C0C0C0; }
.standing-card.podium-3 { border-left: 3px solid #CD7F32; }
.standing-pos { font-family: var(--font-display); font-size: 24px; color: var(--gray); min-width: 32px; text-align: center; }
.standing-card.podium-1 .standing-pos { color: #FFD700; }
.standing-card.podium-2 .standing-pos { color: #C0C0C0; }
.standing-card.podium-3 .standing-pos { color: #CD7F32; }
.standing-info { flex: 1; }
.standing-name { font-size: 14px; font-weight: 600; color: var(--white); }
.standing-team { font-size: 12px; color: var(--gray); margin-top: 2px; }
.standing-points { text-align: right; }
.standing-pts-value { font-family: var(--font-display); font-size: 22px; color: var(--white); line-height: 1; }
.standing-pts-label { font-size: 10px; color: var(--gray); letter-spacing: 1px; }

/* BOTTOM NAV */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: var(--bottom-nav-h); background: var(--dark); border-top: 1px solid #1f1f1f; display: flex; z-index: 100; }
.bottom-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: none; border: none; color: var(--gray); font-family: var(--font-body); font-size: 10px; font-weight: 500; cursor: pointer; transition: all 0.2s; letter-spacing: 0.5px; }
.bottom-nav-item.active { color: var(--red); }

/* STATES */
.error-state { text-align: center; padding: 40px 20px; color: var(--gray); }
.error-state svg { margin-bottom: 12px; opacity: 0.4; }
.error-state p { font-size: 13px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray); font-size: 13px; }

/* RACE DETAIL */
.back-btn { font-size: 13px; color: var(--red); font-weight: 500; padding: 8px 0 16px 0; cursor: pointer; display: flex; align-items: center; gap: 4px; letter-spacing: 0.5px; }
.back-btn:hover { opacity: 0.8; }
.race-detail-header { display: flex; align-items: center; gap: 16px; background: rgba(232, 0, 29, 0.06); border: 1px solid var(--red); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 16px; }
.race-detail-round { font-family: var(--font-display); font-size: 36px; color: var(--red); line-height: 1; min-width: 50px; text-align: center; }
.race-detail-name { font-size: 16px; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.race-detail-country { font-size: 13px; color: var(--gray); }
.sessions-list { display: flex; flex-direction: column; gap: 8px; }
.session-card { background: var(--dark2); border: 1px solid #222; border-radius: var(--radius); padding: 12px 16px; display: flex; align-items: center; gap: 14px; transition: all 0.2s; }
.session-card:hover { border-color: #333; background: var(--dark3); }
.session-icon { font-size: 18px; min-width: 28px; text-align: center; }
.session-info { flex: 1; }
.session-label { font-size: 14px; font-weight: 600; color: var(--white); }
.session-date { font-size: 12px; color: var(--gray); margin-top: 2px; text-transform: capitalize; }
.session-time { font-family: var(--font-display); font-size: 22px; color: var(--red); letter-spacing: 1px; }

/* RESULT TABS */
.result-tabs { display: flex; gap: 6px; margin-bottom: 16px; background: var(--dark2); padding: 4px; border-radius: var(--radius); width: 100%; }
.result-tab { flex: 1; background: none; border: none; color: var(--gray); font-family: var(--font-body); font-size: 12px; font-weight: 500; padding: 8px 4px; border-radius: 6px; cursor: pointer; transition: all 0.2s; white-space: nowrap; text-align: center; min-width: 0; }
.result-tab.active { background: var(--red); color: white; }
.result-tab:hover:not(.active) { color: var(--white); }
.result-panel { display: none; }
.result-panel.active { display: block; animation: fadeIn 0.25s ease; }

/* PIT STOPS */
.pit-card { background: var(--dark2); border: 1px solid #222; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; }
.pit-driver { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--red); margin-bottom: 8px; }
.pit-stop-row { display: flex; align-items: center; gap: 12px; padding: 4px 0; border-top: 1px solid #1f1f1f; }
.pit-stop-num { font-size: 12px; color: var(--gray); min-width: 55px; }
.pit-lap { font-size: 13px; color: var(--white); flex: 1; }
.pit-duration { font-family: var(--font-display); font-size: 18px; color: var(--white); letter-spacing: 1px; }

/* ===========================
   HISTORIQUE F1
   =========================== */

.history-nav { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.history-nav::-webkit-scrollbar { display: none; }
.history-btn { background: var(--dark2); border: 1px solid #222; color: var(--gray); font-family: var(--font-body); font-size: 12px; font-weight: 500; padding: 8px 14px; border-radius: 20px; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.history-btn.active { background: var(--red); border-color: var(--red); color: white; }
.history-btn:hover:not(.active) { border-color: #444; color: var(--white); }

/* Champion card */
.champion-card { background: var(--dark2); border: 1px solid #222; border-radius: var(--radius); padding: 12px 16px; display: flex; align-items: center; gap: 14px; margin-bottom: 8px; transition: all 0.2s; cursor: pointer; }
.champion-card:hover { border-color: #333; background: var(--dark3); }
.champion-season { font-family: var(--font-display); font-size: 26px; color: var(--red); min-width: 54px; text-align: center; line-height: 1; }
.champion-info { flex: 1; }
.champion-name { font-size: 14px; font-weight: 600; color: var(--white); }
.champion-team { font-size: 12px; color: var(--gray); margin-top: 2px; }
.champion-nat { font-size: 10px; letter-spacing: 1px; color: var(--gray); }
.champion-stats { text-align: right; }
.champion-wins { font-family: var(--font-display); font-size: 22px; color: var(--white); line-height: 1; }
.champion-wins-label { font-size: 10px; color: var(--gray); letter-spacing: 1px; }

/* Season selector */
.history-select-row { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.history-select { flex: 1; background: var(--dark2); border: 1px solid #333; color: var(--white); font-family: var(--font-body); font-size: 14px; padding: 10px 14px; border-radius: var(--radius); cursor: pointer; outline: none; }
.history-select:focus { border-color: var(--red); }
.history-select option { background: var(--dark2); }

/* History race card */
.h-race-card { background: var(--dark2); border: 1px solid #222; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 14px; }
.h-race-card:hover { border-color: #333; background: var(--dark3); }
.h-race-round { font-family: var(--font-display); font-size: 24px; color: var(--red); min-width: 40px; text-align: center; }
.h-race-info { flex: 1; }
.h-race-name { font-size: 14px; font-weight: 600; color: var(--white); }
.h-race-winner { font-size: 12px; color: var(--gray); margin-top: 3px; }
.h-race-winner span { color: var(--white); }
.h-race-date { font-size: 11px; color: var(--gray); text-align: right; white-space: nowrap; }

/* Driver search */
.history-search { width: 100%; background: var(--dark2); border: 1px solid #333; color: var(--white); font-family: var(--font-body); font-size: 14px; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; outline: none; }
.history-search:focus { border-color: var(--red); }
.history-search::placeholder { color: var(--gray); }

/* Driver card */
.h-driver-card { background: var(--dark2); border: 1px solid #222; border-radius: var(--radius); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; }
.h-driver-card:hover { border-color: #333; background: var(--dark3); }
.h-driver-name { font-size: 14px; font-weight: 600; color: var(--white); }
.h-driver-nat { font-size: 12px; color: var(--gray); margin-top: 2px; }
.h-driver-code { font-family: var(--font-display); font-size: 22px; color: var(--red); letter-spacing: 2px; }

/* Driver profile */
.h-profile { background: rgba(232,0,29,0.06); border: 1px solid var(--red); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 16px; }
.h-profile-name { font-family: var(--font-display); font-size: 30px; letter-spacing: 2px; color: var(--white); line-height: 1; margin-bottom: 4px; }
.h-profile-nat { font-size: 12px; color: var(--gray); margin-bottom: 12px; }
.h-profile-stats { display: flex; gap: 20px; }
.h-stat { text-align: center; }
.h-stat-value { font-family: var(--font-display); font-size: 28px; color: var(--red); line-height: 1; }
.h-stat-label { font-size: 10px; color: var(--gray); letter-spacing: 1px; margin-top: 2px; }
.h-wins-title { font-family: var(--font-display); font-size: 16px; letter-spacing: 1px; color: var(--gray); margin: 16px 0 10px; }

/* Circuit card */
.h-circuit-card { background: var(--dark2); border: 1px solid #222; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.h-circuit-name { font-size: 14px; font-weight: 600; color: var(--white); }
.h-circuit-location { font-size: 12px; color: var(--gray); margin-top: 2px; }
.h-circuit-country { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--red); text-align: right; }

/* Constructor card */
.h-constructor-card { background: var(--dark2); border: 1px solid #222; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 14px; }
.h-constructor-card:hover { border-color: #333; background: var(--dark3); }
.h-constructor-name { font-size: 14px; font-weight: 600; color: var(--white); }
.h-constructor-nat { font-size: 12px; color: var(--gray); margin-top: 2px; }
.h-constructor-titles { font-family: var(--font-display); font-size: 22px; color: var(--red); }

/* Load more */
.load-more-btn { width: 100%; background: var(--dark2); border: 1px solid #333; color: var(--gray); font-family: var(--font-body); font-size: 13px; padding: 12px; border-radius: var(--radius); cursor: pointer; margin-top: 8px; transition: all 0.2s; }
.load-more-btn:hover { border-color: var(--red); color: var(--white); }

/* RESPONSIVE */
/* Historique visible seulement sur desktop dans la nav du haut */
.tab-desktop-only { display: none; }

@media (min-width: 768px) {
  .tab-desktop-only { display: block; }
  .bottom-nav { display: none; }
  body { padding-bottom: 0; }
  .main { padding: 24px; max-width: 780px; }
  .news-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
}

/* ===========================
   NOTIFICATIONS
   =========================== */

.notif-btn {
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-right: 8px;
}

.notif-btn:hover { color: var(--white); background: var(--dark2); }

.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark3);
  border: 1px solid #333;
  color: var(--white);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  white-space: nowrap;
}

.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===========================
   PAGE ARTICLE
   =========================== */
.article-page {
  padding: 8px 0 40px;
}
.article-source {
  font-size: 11px;
  font-weight: 600;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.article-title {
  font-family: var(--font-head);
  font-size: 26px;
  color: var(--white);
  line-height: 1.2;
  margin: 0 0 8px;
}
.article-date {
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #1f1f1f;
}
.article-body {
  font-size: 15px;
  line-height: 1.7;
  color: #ccc;
  margin-bottom: 28px;
}
.article-body p {
  margin: 0 0 16px;
}
.article-source-link {
  display: block;
  padding: 14px 16px;
  background: #111;
  border: 1px solid #1f1f1f;
  border-left: 3px solid var(--red);
  border-radius: 8px;
  color: var(--gray);
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s;
}
.article-source-link:hover {
  color: var(--white);
  border-left-color: var(--red);
  background: #1a1a1a;
}

/* Sessions cliquables */
.session-clickable {
  cursor: pointer;
  transition: background 0.2s;
}
.session-clickable:hover {
  background: #1a1a1a;
}
.session-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.session-past {
  color: var(--gray);
  font-size: 11px;
}
.session-arrow {
  color: var(--red);
  font-size: 18px;
  font-weight: bold;
}

/* Barre couleur équipe dans classement constructeurs */
.standing-team-bar {
  width: 4px;
  height: 28px;
  border-radius: 2px;
  margin-right: 8px;
  flex-shrink: 0;
}
.standing-points {
  display: flex;
  align-items: center;
}

/* ===========================
   RÉSULTATS SESSION (même style que standing-card)
   =========================== */
.session-result-card {
  background: var(--dark2);
  border: 1px solid #222;
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s;
  margin-bottom: 6px;
}
.session-result-card:hover { border-color: #333; }
.session-podium-1 { border-left: 3px solid #FFD700 !important; }
.session-podium-2 { border-left: 3px solid #C0C0C0 !important; }
.session-podium-3 { border-left: 3px solid #CD7F32 !important; }

.sr-pos {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--gray);
  min-width: 32px;
  text-align: center;
  flex-shrink: 0;
}
.session-podium-1 .sr-pos { color: #FFD700; }
.session-podium-2 .sr-pos { color: #C0C0C0; }
.session-podium-3 .sr-pos { color: #CD7F32; }

.sr-info { flex: 1; min-width: 0; }
.sr-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sr-team { font-size: 12px; margin-top: 2px; }

.sr-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
  min-width: 90px;
}
.sr-time {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
}
.session-podium-1 .sr-time { color: #FFD700; }
.sr-gap {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--gray);
}
.sr-pts {
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
}
.sr-dnf {
  font-size: 11px;
  font-weight: 700;
  color: #ff5555;
  background: rgba(255,85,85,0.12);
  padding: 2px 7px;
  border-radius: 4px;
}

/* ===========================
   CARTES ACTUALITÉS AVEC PHOTO
   =========================== */
.news-photo {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  margin: -14px -14px 12px -14px;
  width: calc(100% + 28px);
}
.news-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.news-card:hover .news-photo img {
  transform: scale(1.03);
}
.news-card-body { flex: 1; }
.news-ai-badge {
  display: inline-block;
  background: #e8132a;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 5px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 6px;
}

/* ===========================
   HISTORIQUE 2026 EN COURS
   =========================== */
.badge-in-progress {
  display: inline-block;
  background: #e8132a;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 8px;
}
.champion-in-progress {
  border-left: 3px solid #e8132a !important;
}
.champion-in-progress .champion-season {
  color: #e8132a;
}
.h-race-future {
  opacity: 0.5;
}
.h-race-future .h-race-round {
  color: var(--gray);
}

/* ===========================
   PROFIL ÉCURIE
   =========================== */
.title-years-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.title-year-badge {
  background: #1a1a1a;
  border: 1px solid #FFD700;
  color: #FFD700;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.title-year-badge:hover { background: rgba(255,215,0,0.1); }
.season-badge {
  border-color: #333;
  color: #888;
  font-size: 12px;
  padding: 4px 10px;
}
.season-badge:hover { border-color: #e8132a; color: #e8132a; background: rgba(232,19,42,0.05); }
.history-section { margin-bottom: 20px; }
.history-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #e8132a;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.h-constructor-card { cursor: pointer; }
.h-constructor-card:hover { border-color: #333; }

/* ===========================
   PROFILS PILOTES & ÉCURIES
   =========================== */
.driver-profile-card {
  background: var(--dark2);
  border: 1px solid #222;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.driver-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.driver-profile-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
}
.driver-profile-nat {
  font-size: 13px;
  color: var(--gray);
  margin-top: 4px;
}
.driver-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.driver-stat {
  background: #0f0f0f;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}
.driver-stat-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
}
.driver-stat-label {
  font-size: 9px;
  color: var(--gray);
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ===========================
   WIDGET PROCHAINE SESSION
   =========================== */
.next-session-widget {
  background: linear-gradient(135deg, #1a1a1a 0%, #111 100%);
  border: 1px solid #2a2a2a;
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.next-session-widget::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(232,19,42,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.nsw-session {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}
.nsw-gp {
  font-size: 17px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.2;
}
.nsw-countdown {
  font-family: 'Courier New', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.nsw-weather {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #aaa;
  flex-wrap: wrap;
}
.nsw-weather-icon { font-size: 16px; }
.nsw-weather-temp { font-weight: 700; color: var(--white); }
.nsw-weather-sep { color: #444; }
.nsw-weather-wind, .nsw-weather-rain { color: #888; font-size: 12px; }

/* ===========================
   WIDGET PROCHAINE SESSION
   =========================== */
.next-session-widget {
  background: linear-gradient(135deg, #1a1a1a 0%, #111 100%);
  border: 1px solid #2a2a2a;
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.next-session-widget::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(232,19,42,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.nsw-session {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}
.nsw-gp {
  font-size: 17px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.2;
}
.nsw-countdown {
  font-family: 'Courier New', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.nsw-weather-label {
  font-size: 9px;
  color: #888;
  letter-spacing: 0.3px;
  margin-bottom: 5px;
  text-transform: uppercase;
}
.nsw-weather {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  color: #aaa;
  flex-wrap: wrap;
}
.nsw-weather-icon { font-size: 22px; }
.nsw-weather-temp { font-weight: 700; color: var(--white); font-size: 22px; }
.nsw-weather-sep { color: #333; }
.nsw-weather-wind, .nsw-weather-rain { color: #888; font-size: 22px; }
.nsw-weather-unavailable {
  font-size: 11px;
  color: #444;
  font-style: italic;
}

/* ===========================
   WIDGET LIVE TIMING
   =========================== */
.live-widget {
  background: #0d0d0d;
  border: 1px solid #1a1a1a;
  border-top: 3px solid #e8132a;
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.live-widget-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #111;
  border-bottom: 1px solid #1a1a1a;
}
.live-badge {
  font-size: 11px;
  font-weight: 800;
  color: #e8132a;
  letter-spacing: 1px;
  animation: livePulse 1.5s infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.live-session-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  flex: 1;
}
.live-flag {
  font-size: 18px;
}

/* Carte 2D */
.live-map-container {
  padding: 8px;
  background: #0a0a0a;
  position: relative;
}
.live-circuit-svg {
  width: 100%;
  height: 200px;
  display: block;
}
.circuit-path {
  fill: none;
  stroke: #2a2a2a;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.circuit-path-line {
  fill: none;
  stroke: #3a3a3a;
  stroke-width: 2;
}
.car-dot {
  transition: cx 0.8s ease, cy 0.8s ease;
}
.car-label {
  font-size: 7px;
  font-weight: 700;
  fill: white;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

/* Météo piste */
.live-weather-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: #111;
  border-bottom: 1px solid #1a1a1a;
  font-size: 12px;
  color: #888;
  flex-wrap: wrap;
}
.live-weather-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.live-weather-item strong { color: var(--white); }

/* Classement */
.live-standings-list {
  max-height: 280px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.live-standings-list.expanded { max-height: 1000px; }

.live-standing-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-bottom: 1px solid #111;
  font-size: 12px;
}
.live-standing-row:last-child { border-bottom: none; }

.lsr-pos {
  width: 20px;
  font-weight: 800;
  font-size: 13px;
  color: var(--gray);
  text-align: center;
  flex-shrink: 0;
}
.lsr-pos.p1 { color: #FFD700; }
.lsr-pos.p2 { color: #C0C0C0; }
.lsr-pos.p3 { color: #CD7F32; }

.lsr-num {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.lsr-info {
  flex: 1;
  min-width: 0;
}
.lsr-name {
  font-weight: 700;
  font-size: 12px;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lsr-team {
  font-size: 10px;
  color: var(--gray);
}
.lsr-gap {
  font-size: 11px;
  color: #888;
  min-width: 60px;
  text-align: right;
  flex-shrink: 0;
}
.lsr-tyre {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 800;
  flex-shrink: 0;
}
.tyre-SOFT     { border-color: #e8132a; color: #e8132a; }
.tyre-MEDIUM   { border-color: #FFD700; color: #FFD700; }
.tyre-HARD     { border-color: #ccc;    color: #ccc;    }
.tyre-INTER    { border-color: #00aa00; color: #00aa00; }
.tyre-WET      { border-color: #0077ff; color: #0077ff; }

.lsr-pits {
  font-size: 10px;
  color: #555;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.live-expand-btn {
  width: 100%;
  padding: 8px;
  background: #111;
  border: none;
  border-top: 1px solid #1a1a1a;
  color: #555;
  font-size: 11px;
  cursor: pointer;
  text-align: center;
}
.live-expand-btn:active { color: var(--white); }

/* Widget cliquable */
.live-widget { cursor: pointer; }
.live-widget:active { opacity: 0.9; }
.live-expand-hint {
  font-size: 10px;
  color: #444;
  margin-left: auto;
}

/* Modal Live Plein Écran */
.live-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  animation: modalFadeIn 0.2s ease;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.live-modal-inner {
  width: 100%;
  max-height: 95dvh;
  background: #0d0d0d;
  border-top: 3px solid #e8132a;
  border-radius: 16px 16px 0 0;
  overflow-y: auto;
  animation: modalSlideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
  -webkit-overflow-scrolling: touch;
}
@keyframes modalSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.live-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #111;
  border-bottom: 1px solid #1a1a1a;
  position: sticky;
  top: 0;
  z-index: 10;
}
.live-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.live-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #333;
  background: #1a1a1a;
  color: #aaa;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.live-modal-close:active { background: #e8132a; color: white; }

.live-modal-weather {
  border-bottom: 1px solid #1a1a1a;
}
.live-modal-map {
  padding: 10px;
  background: #0a0a0a;
  border-bottom: 1px solid #111;
}
.live-modal-map svg {
  width: 100%;
  height: 240px;
  display: block;
}
.live-modal-standings {
  padding-bottom: 24px;
}
.live-modal-standings .live-standing-row {
  padding: 10px 16px;
  font-size: 13px;
}
.live-modal-standings .lsr-name { font-size: 13px; }
.live-modal-standings .lsr-team { font-size: 11px; }
.live-modal-standings .lsr-num  { width: 26px; height: 26px; font-size: 11px; }
.live-modal-standings .lsr-tyre { width: 32px; height: 32px; font-size: 9px; }

/* ============================
   AUTH MODAL
============================= */
.auth-modal {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: flex-end;
  animation: modalFadeIn 0.2s ease;
}
.auth-modal-inner {
  width: 100%; max-height: 92dvh;
  background: #0d0d0d;
  border-top: 3px solid #e8001d;
  border-radius: 16px 16px 0 0;
  overflow-y: auto;
  padding: 24px 20px 40px;
  animation: modalSlideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
}
.auth-modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid #333; background: #1a1a1a;
  color: #aaa; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.auth-logo {
  font-size: 26px; font-weight: 900; color: #e8001d;
  letter-spacing: 6px; text-align: center; margin-bottom: 4px;
  font-family: Georgia, serif;
}
.auth-subtitle {
  font-size: 14px; color: #888; text-align: center;
  margin-bottom: 24px; letter-spacing: 1px;
}
.auth-desc {
  font-size: 13px; color: #666; text-align: center;
  margin-bottom: 20px; line-height: 1.5;
}
.auth-back {
  background: none; border: none; color: #e8001d;
  font-size: 13px; cursor: pointer; margin-bottom: 16px;
  display: block;
}
.btn-google {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; background: white; color: #333;
  border: none; border-radius: 10px;
  padding: 13px 20px; font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; width: 100%;
  margin-bottom: 16px;
}
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: #222;
}
.auth-divider span { color: #444; font-size: 12px; }
.auth-input {
  width: 100%; background: #111; border: 1px solid #2a2a2a;
  color: #f5f5f5; padding: 13px 14px; border-radius: 10px;
  font-size: 14px; outline: none; margin-bottom: 10px;
  -webkit-appearance: none; box-sizing: border-box;
}
.auth-input:focus { border-color: #e8001d; }
.auth-btn-primary {
  width: 100%; background: #e8001d; color: white;
  border: none; border-radius: 10px; padding: 14px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  margin-top: 4px;
}
.auth-btn-secondary {
  width: 100%; background: #1a1a1a; color: #888;
  border: 1px solid #333; border-radius: 10px; padding: 14px;
  font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 8px;
}
.auth-error {
  color: #e8001d; font-size: 12px; margin-bottom: 8px;
  padding: 8px 12px; background: rgba(232,0,29,0.1);
  border-radius: 8px; border-left: 3px solid #e8001d;
}
.auth-feedback { font-size: 12px; margin-bottom: 8px; min-height: 16px; }
.auth-feedback.ok { color: #22c55e; }
.auth-feedback.error { color: #e8001d; }
.auth-link { background: none; border: none; color: #555; font-size: 12px; cursor: pointer; margin-top: 8px; display: block; width: 100%; text-align: center; }
.auth-link-inline { background: none; border: none; color: #e8001d; font-size: 14px; cursor: pointer; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 13px; color: #555; }
.auth-sent-icon { font-size: 48px; text-align: center; margin-bottom: 12px; }

/* ============================
   PADDOCK CHAT
============================= */
.paddock-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid #1a1a1a;
}
.paddock-title {
  font-size: 18px; font-weight: 800; color: #f5f5f5;
  letter-spacing: 1px;
}
.paddock-online {
  font-size: 11px; color: #555; display: flex; align-items: center; gap: 5px;
}
.paddock-online::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e; display: inline-block;
}
.paddock-user-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: #0d0d0d;
  border-bottom: 1px solid #1a1a1a;
}
.paddock-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.paddock-avatar-placeholder {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white; flex-shrink: 0;
}
.paddock-username { font-size: 13px; font-weight: 600; color: #f5f5f5; flex: 1; }
.paddock-logout-btn {
  font-size: 11px; color: #555; background: none; border: none; cursor: pointer;
}

/* Messages */
.paddock-messages {
  flex: 1; overflow-y: auto; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 10px;
  max-height: calc(100dvh - 300px);
  -webkit-overflow-scrolling: touch;
}
.paddock-msg {
  display: flex; gap: 8px; align-items: flex-start;
}
.paddock-msg-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0; margin-top: 2px;
}
.paddock-msg-avatar-ph {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: white; flex-shrink: 0; margin-top: 2px;
}
.paddock-msg-body { flex: 1; min-width: 0; }
.paddock-msg-meta {
  display: flex; align-items: baseline; gap: 6px; margin-bottom: 2px;
}
.paddock-msg-name {
  font-size: 12px; font-weight: 700; color: #e8001d;
}
.paddock-msg-name.is-admin { color: #FFD700; }
.paddock-msg-time { font-size: 10px; color: #444; }
.paddock-msg-text {
  font-size: 13px; color: #ddd; line-height: 1.5;
  word-break: break-word;
}
.paddock-msg-actions {
  display: flex; gap: 10px; margin-top: 4px;
}
.paddock-msg-like {
  background: none; border: none; color: #555; font-size: 11px;
  cursor: pointer; padding: 0; display: flex; align-items: center; gap: 3px;
}
.paddock-msg-like.liked { color: #e8001d; }
.paddock-msg-delete {
  background: none; border: none; color: #333; font-size: 11px;
  cursor: pointer; padding: 0;
}

/* Input */
.paddock-input-row {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 16px; border-top: 1px solid #1a1a1a;
  background: #0d0d0d;
}
.paddock-input {
  flex: 1; background: #111; border: 1px solid #2a2a2a;
  color: #f5f5f5; padding: 10px 14px; border-radius: 24px;
  font-size: 14px; outline: none; -webkit-appearance: none;
}
.paddock-input:focus { border-color: #e8001d; }
.paddock-send-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: #e8001d; border: none; color: white;
  font-size: 18px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

/* Bannière connexion */
.paddock-login-banner {
  margin: 16px; padding: 20px; background: #111;
  border: 1px solid #2a2a2a; border-radius: 12px; text-align: center;
}
.paddock-login-banner p { color: #666; font-size: 13px; margin-bottom: 14px; }

/* ============================
   BOUTON FLOTTANT CHAT LIVE
============================= */
.live-chat-float {
  position: fixed; bottom: 84px; right: 16px;
  background: #e8001d; color: white;
  border-radius: 24px; padding: 10px 16px;
  font-size: 15px; font-weight: 700;
  box-shadow: 0 4px 20px rgba(232,0,29,0.4);
  cursor: pointer; z-index: 500;
  display: flex; align-items: center; gap: 6px;
  animation: float-pulse 2s ease-in-out infinite;
}
@keyframes float-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.live-chat-badge {
  background: white; color: #e8001d;
  border-radius: 10px; padding: 1px 6px;
  font-size: 11px; font-weight: 800;
}

/* Panel chat live overlay */
.live-chat-panel {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 52dvh; z-index: 600;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 2px solid #e8001d;
  border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column;
  animation: modalSlideUp 0.25s ease;
}
.live-chat-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 13px; font-weight: 700; color: #f5f5f5;
}
.live-chat-panel-header button {
  background: none; border: none; color: #888; font-size: 16px; cursor: pointer;
}
.live-chat-messages {
  flex: 1; overflow-y: auto; padding: 10px 14px;
  display: flex; flex-direction: column; gap: 8px;
  -webkit-overflow-scrolling: touch;
}
.live-chat-msg {
  font-size: 12px; color: #ddd; line-height: 1.4;
}
.live-chat-msg-name { font-weight: 700; color: #e8001d; margin-right: 5px; }
.live-chat-input-row {
  display: flex; gap: 8px; padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.live-chat-input {
  flex: 1; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: #f5f5f5; padding: 9px 14px; border-radius: 20px;
  font-size: 13px; outline: none;
}
.live-chat-send {
  width: 36px; height: 36px; border-radius: 50%;
  background: #e8001d; border: none; color: white;
  font-size: 16px; cursor: pointer;
}
