:root {
  --bg-color: #0d1117;
  --card-bg: #161b22;
  --text-color: #e6edf3;
  --text-muted: #8b949e;
  --accent: #00aaff;
}

.section {
  text-align: center; 
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ------------------ NAVBAR ------------------ */
/* --- Navbar --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--surface);
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.navbar a {
  text-decoration: none;
  color: inherit; /* conserve la couleur du texte existante */
}


/* Zone gauche : image + titre */
.nav-left {
  display: flex;
  align-items: center;
  gap: 0.8rem; /* espace entre la photo et le titre */
}

/* --- Image de profil --- */
.nav-profile {
  width: 50px;
  height: 50px;
  border-radius: 50%; /* cercle parfait */
  border: 2px solid var(--accent);
  object-fit: cover;
}

.nav-menu {
  width: 50px;
  height: 50px;
  border-radius: 50%; /* cercle parfait */
  object-fit: cover;
}

/* --- Titre du site --- */
.nav-logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* --- Liens de navigation --- */
nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--accent);
}
/* Logo réduit pour mobile */
.nav-icon {
  display: none;
  width: 40px;
  height: 40px;
}

/* --- NEWS BAR --- */
    .news-bar {
      background: #0f1720;
      color: #fff;
      font-family: 'Inter', sans-serif;
      font-size: 0.95rem;
      padding: 0.6rem 0;
      overflow: hidden;
      border-top: 2px solid #1e2a36;
      border-bottom: 2px solid #1e2a36;
      position: relative;
    }

    .news-content {
      display: flex;
      gap: 2rem;
      white-space: nowrap;
      animation: scrollNews 25s linear infinite;
      padding-left: 100%;
    }

    @keyframes scrollNews {
      0% { transform: translateX(0); }
      100% { transform: translateX(-200%); }
    }

    .news-item {
      display: inline-block;
    }

    .news-label {
      background: #1e90ff;
      color: #fff;
      padding: 0.2rem 0.6rem;
      border-radius: 4px;
      font-weight: 600;
      margin-right: 0.4rem;
    }

    /* --- FOOTER --- */
    footer {
      background-color: #0f1720;
      color: #ccc;
      text-align: center;
      padding: 2rem 1rem;
      font-family: 'Inter', sans-serif;
    }

    .footer-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1rem;
    }

    .partners {
      display: flex;
      gap: 5px;
      justify-content: center;
      flex-wrap: wrap;
    }

    .partners img {
      height: 40px;
      filter: brightness(0.9);
      transition: 0.3s;
    }

    .partners img:hover {
      filter: brightness(1.2);
    }

    footer p {
      font-size: 0.9rem;
      color: #888;
    }


/* ------------------ BANNIÈRE ------------------ */
.banner {
  margin-top: 30px; /* espace pour la navbar fixe */
  position: relative;
  height: 200px;
  background-image: url('images/banner.png');
  background-size: cover;
  background-position: 50% 50%;
  background-attachment: scroll;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
}
.banner .overlay {
  position: relative;
  z-index: 1;
}
.banner h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

/* ------------------ GRILLE PRINCIPALE ------------------ */
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem;
  flex-grow: 1;
}

.guide-grid {
  max-width: 1400px;
  margin: 0 auto;
}

/* ------------------ CARTES ------------------ */
.card {
  background-color: var(--card-bg);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 18px rgba(0, 170, 255, 0.3);
}

.card-image {
  height: 200px;
  background-size: cover;
  background-position: 50% 35%;
  filter: brightness(0.7);
  transition: filter 0.3s ease;
}
.card:hover .card-image {
  filter: brightness(0.9);
}

.card-content {
  padding: 1.5rem;
}
.card-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

/* --- Liens avec puces --- */
.card-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.card-content li {
  margin-bottom: 0.6rem;
}
.card-content a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  font-size: 1rem;
}
.card-content a::before {
  content: "•";
  color: var(--accent);
  font-weight: bold;
  margin-right: 0.5rem;
}
.card-content a:hover {
  color: var(--accent);
}


/* ------------------ ROSTER ------------------ */
.stats strong {
  color: #7BA6C9;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* --- Roster container --- */
.roster-container {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* --- Statistiques et filtres --- */
.stats {
  text-align: center;
  margin-bottom: 1.5rem;
}

.stats strong {
  color: #5DA9E9; /* bleu doux adapté à ton thème sombre */
  font-weight: 600;
}

/* --- Grille des coureurs --- */
.rider-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(200px, 1fr)); /* ✅ Responsive */
  gap: 1.2rem;
  justify-items: center;
  width: 100%;
}

@media (max-width: 1500px) {
.rider-grid {
  grid-template-columns: repeat(4, minmax(200px, 1fr)); /* ✅ Responsive */
}
}

@media (max-width: 1000px) {
.rider-grid {
  grid-template-columns: repeat(3, minmax(200px, 1fr)); /* ✅ Responsive */
}
}

@media (max-width: 768px) {
.rider-grid {
  grid-template-columns: repeat(2, minmax(200px, 1fr)); /* ✅ Responsive */
}
}

@media (max-width: 480px) {
.rider-grid {
  grid-template-columns: repeat(1, minmax(200px, 1fr)); /* ✅ Responsive */
}
}

/* --- Cartes de coureurs --- */
.rider-card {
  background-color: var(--card-bg);
  border-radius: 1rem;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  width: 220px;     /* ✅ largeur fixe */
  min-width: 220px; /* ✅ empêche le rétrécissement */
  max-width: 220px; /* ✅ cohérence parfaite */
}

.rider-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
  z-index: 10;
}

.rider-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: top;
}

.rider-info {
  padding: 1rem;
}

.rider-info h3 {
  color: var(--accent);
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.rider-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.2rem 0;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  border-radius: 5px;
  text-decoration: none;
  color: #00aaff;
  border: 1px solid #00aaff;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background-color: #00aaff;
  color: white;
}

.pagination .active-page {
  background-color: #00aaff;
  color: white;
  font-weight: bold;
  cursor: default;
}


/* --- Filtres --- */
.filters form {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 20px;
}

.filters input[type="text"],
.filters select,
.filters button {
  padding: 0.6rem 1rem;
  border: 1px solid var(--accent);
  background: none;
  color: var(--accent);
  border-radius: 8px;
  font-size: 1rem;
}

.filters input[type="text"]::placeholder {
  color: var(--text-muted);
}

.filters button:hover,
.filters select:hover {
  background-color: var(--accent);
  color: #fff;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .rider-card img { height: 260px; }
}

@media (max-width: 768px) {
  .rider-card img { height: 220px; }
  .filters form {
    flex-direction: column;
    align-items: center;
  }
  .filters input[type="text"], .filters select {
    width: 80%;
  }
}

@media (max-width: 480px) {
  .rider-card img { height: 200px; }
  .rider-info h3 { font-size: 0.9rem; }
  .rider-info p { font-size: 0.8rem; }
  .stats h2 { font-size: 1.1rem; }
}


/* --- Moyennes notes rider --- */
.role-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  margin-top: 20px;
  text-align: center;
}


/* --- Moyennes notes rider --- */
.role-stats2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  margin-top: 20px;
  text-align: center;
}
.role-box {
  background: rgba(25, 25, 35, 0.85);
  border-radius: 14px;
  padding: 10px 8px;
  transition: all 0.25s ease;
  border: 2px solid transparent;
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
}

.role-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.role-icon {
  width: 60px;
  height: 60px;
  border-radius: 5px;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 3px rgba(255,255,255,0.2));
}

.role-label {
  font-size: 0.85em;
  color: #e0e6f0;
  margin-bottom: 4px;
}

.role-score {
  font-size: 1.1em;
  font-weight: bold;
  color: var(--role-color);
}

.best-role {
  border-color: var(--role-color);
  background: linear-gradient(135deg, rgba(77,184,255,0.1), rgba(255,255,255,0.05));
  box-shadow: 0 0 12px var(--role-color);
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .role-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

/* --- Rankings rider --- */
.ranking-stats {
  display: flex;
  flex-wrap: wrap;        /* permet aux cartes de passer à la ligne si besoin */
  justify-content: center; /* centre les cartes */
  gap: 18px;
  margin: 20px auto;
  width: 100%;
  max-width: 750px;
  border: 1px solid rgba(77,184,255,0.2);
  border-radius: 6px;
}

.ranking-card {
  padding: 10px 8px;
  transition: all 0.25s ease;
  width: 100%;       /* par défaut sur mobile, prend toute la largeur */
  max-width: 350px;  /* sur grand écran, limite la largeur pour être côte à côte */
  text-align: center;
  margin-bottom:10px;
}

.ranking-card:hover {
  transform: translateY(-3px);
}


.ranking-card h4 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  color: #e0e6f0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.year-tag {
  background: #4db8ff;
  color: #111;
  font-weight: bold;
  font-size: 0.85em;
  border-radius: 6px;
  padding: 2px 8px;
}

.ranking-line {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin : 20px auto;
  align-items: center;
  text-align: center;
}

.rank-item {
  background: rgba(35, 40, 55, 0.95);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 150px;
  flex: 1;
  text-align: center;
  max-width: 220px;
  transition: 0.2s;
}

.rank-item:hover {
  background: rgba(45, 50, 65, 1);
}

.rank-label {
  display: block;
  font-size: 0.85em;
  color: #9db0cc;
  margin-bottom: 3px;
}

.rank-value {
  font-size: 1.15em;
  font-weight: bold;
  color: #e0e6f0;
}

.rank-top {
  display: block;
  font-size: 0.85em;
  margin-top: 3px;
  font-weight: bold;
}

/* Responsive : sur petits écrans, les cartes passent en colonne */
@media (max-width: 500px) {
  .ranking-card {
    max-width: 100%;
  }
}

/* --- Couleurs dynamiques selon le % --- */
.rank-top {
  font-weight: 700;
  transition: color 0.2s ease;
  color: #4db8ff; /* couleur par défaut */
}

.rank-top[data-top]:before {
  content: '⬤ ';
  font-size: 0.6em;
  vertical-align: middle;
}

/* Couleurs selon le classement */
.rank-top.top-excellent[data-top] {
  color: #4eff9f; /* vert vif - top 10% */
}

.rank-top.top-good[data-top] {
  color: #ffaa33; /* orange - top 25% */
}

.rank-top.top-bad[data-top] {
  color: #ff4d4d; /* rouge - au-delà */
}


@media (max-width: 600px) {
  .ranking-line {
    flex-direction: column;
  }
}

/* Container responsive */
.saling-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 20px auto;
  width: 100%;
  max-width: 900px;
}

/* Card par rareté */
.saling-card {
  background: rgba(25, 30, 45, 0.9);
  border: 1px solid rgba(77,184,255,0.2);
  border-radius: 16px;
  padding: 14px 18px;
  width: 100%;
  max-width: 250px;
  box-shadow: 0 0 12px rgba(0,0,0,0.5);
  text-align: center;
  transition: all 0.25s ease;
}

.saling-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 6px rgba(77,184,255,0.3);
}

/* Rarety colors */
.saling-card.yellow { border-color: #ffdd33; }
.saling-card.pink   { border-color: #d080ff; }
.saling-card.blue   { border-color: #4db8ff; }

.saling-card h4 {
  margin: 0 0 10px 0;
  font-size: 1rem;
  color: #e0e6f0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

.year-tag {
  font-weight: bold;
  border-radius: 6px;
  padding: 2px 6px;
}

/* Items par période */
.saling-line {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saling-item {
  background: rgba(35, 40, 55, 0.95);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
}

.saling-label {
  display: block;
  font-size: 0.85em;
  color: #9db0cc;
  margin-bottom: 3px;
}

.saling-value {
  font-size: 1.1em;
  font-weight: bold;
  color: #e0e6f0;
}

/* Responsive : plusieurs cartes côte à côte si écran large */
@media (min-width: 600px) {
  .saling-card {
    flex: 1 1 200px;
  }
}


/* Responsive : écran ≤ 768px */
@media (max-width: 768px) {
  .nav-logo,
  nav ul {
    display: none; /* Masque le texte et les liens */
  }

  .nav-icon {
    display: block; /* Affiche le petit logo */
  }

  .navbar {
    justify-content: center; /* Centre le logo */
    padding: 1rem;
  }
}

/* ✅ TABLEAU LIMITÉ À 1400px ET RESPONSIVE */
.table-container {
  max-width: 1400px;
  margin: 0 auto;
  overflow-x: auto;
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
}

/* ✅ TABLEAU CLASSIQUE */
table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  padding: 0.75rem 1rem;
  text-align: center;
  white-space: nowrap;
}

th {
  background-color: #00aaff;
  color: white;
}

tr:nth-child(even) {
  background-color: transparent;
}

tr:hover {
  background-color: rgba(233,236,239,0.3);
}
