/* --- STYLE GLOBAL --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #393939;
    color: #f6f6f6;
    margin: 20px;
    padding-left: 40px;
    padding-right: 40px;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.bet-button {
    background-color: #f39c12;
    color: #1c1c1c;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
}

.bet-button:hover {
    background-color: #e6b800;
}

.top-bar--fixed {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; /* espace entre les boutons */
}

/* ----------------------------------------
   GENERAL SCROLL FIX
----------------------------------------- */
html {
  overflow-y: scroll;
}

h1 {
    text-align: center;
    color: #be5014;
    margin-bottom: 40px;
}

h2 {
    color: #ffffff;
    border-bottom: 2px solid #f39c12;
    padding-bottom: 5px;
}

/* --- TABLEAU PRINCIPAL --- */

th {
    background-color: #333;
    color: #f39c12;
}

td {
    color: #f0f0f0;
}

th, td {
    padding: 6px;
    font-size: 0.9em;
    width: 500px;
    max-width: 120px;
    word-wrap: break-word;
}

.points-table {
    width: 100%;
    border-collapse: collapse;
    background-color: transparent;
    color: #1c1c1c;
    /*box-shadow: 0 0 0 2px #bfbfbf;*/
}

.points-table thead th {
    background-color: #7f7f7f;
    color: #ffffff;
    text-align: center;
    font-weight: 700;
    padding: 10px 8px;
    border: none;
}

.points-table tbody td {
    padding: 10px 8px;
    border: none;
    text-align: center;
}

table.points-table tbody tr:hover td {
    background-color: #535050;
    font-weight: bold;
}

/* Bordures internes fines */
.points-table thead th,
.points-table tbody td {
    border: 1px solid #cfcfcf; /* blanc léger, semi‑transparent */
    height: 25px;
    padding: 3px 4px; /* haut  droite  bas  gauche */
}


[data-cell="h1c1"],
[data-cell="h1c2"] {
  background-color: #393939 !important;
  border: none !important;
}


/* === BORDURES PAR DATA-CELL === */

/* Trait horizontal sous la 1re ligne d'en-tête (inchangé) */
[data-cell^="h1c"] {
  border-bottom: 3px solid #3f3a36 !important;
}

/* ⚠️ Mis à jour : séparateurs verticaux au niveau des titres des 5 coureurs
   ancien: h1c2, h1c4, h1c6, h1c8, h1c10
   nouveau: h1c3, h1c5, h1c7, h1c9, h1c11 (car une colonne joueur ajoutée) */
[data-cell="h1c3"],
[data-cell="h1c5"],
[data-cell="h1c7"],
[data-cell="h1c9"],
[data-cell="h1c11"] {
  border-top: 3px solid #393939 !important;
  border-right: 3px solid #3f3a36 !important;
}

/* Trait horizontal sous la 2e ligne d'en-tête (inchangé) */
[data-cell^="h2c"] {
  border-bottom: 3px solid #3f3a36 !important;
}


/* ⚠️ Mis à jour : bordures verticales fortes par paires de colonnes
   ancien: c1, c3, c5, c7, c9, c11
   nouveau: c2 (après les 2 colonnes joueurs), puis c4, c6, c8, c10, c12 */
[data-cell$="c2"],
[data-cell$="c4"],
[data-cell$="c6"],
[data-cell$="c8"],
[data-cell$="c10"],
[data-cell$="c12"] {
  border-right: 3px solid #3f3a36 !important;
}

/* Bordure gauche du tableau sur la toute 1re colonne (inchangé) */
[data-cell="r1c1"],
[data-cell="r2c1"],
[data-cell="r3c1"],
[data-cell="r4c1"],
[data-cell="r5c1"],
[data-cell="r6c1"],
[data-cell="r7c1"],
[data-cell="r8c1"],
[data-cell="r9c1"],
[data-cell="r10c1"],
[data-cell="r11c1"],
[data-cell="r12c1"],
[data-cell="r13c1"],
[data-cell="r14c1"],
[data-cell="r15c1"],
[data-cell="r16c1"],
[data-cell="r17c1"],
[data-cell="r18c1"],
[data-cell="r19c1"]   {
  border-left: 3px solid #393939 !important;
}

/* Fond des lignes du tableau (inchangé) */
[data-cell^="r1c"],
[data-cell^="r2c"],
[data-cell^="r3c"],
[data-cell^="r4c"],
[data-cell^="r5c"],
[data-cell^="r6c"],
[data-cell^="r7c"],
[data-cell^="r8c"],
[data-cell^="r9c"],
[data-cell^="r10c"],
[data-cell^="r11c"],
[data-cell^="r12c"],
[data-cell^="r13c"],
[data-cell^="r14c"],
[data-cell^="r14c"],
[data-cell^="r15c"],
[data-cell^="r16c"],
[data-cell^="r17c"],
[data-cell^="r18c"],
[data-cell^="r19c"] {
  background-color: #9b9b9b;
}

/* ⚠️ Mis à jour : colonnes 1 ET 2 (joueurs) avec style "comme header" */
.points-table tbody td:first-child,
.points-table tbody td:nth-child(2) {
    font-weight: 700;       /* comme le thead */
    color: #ffffff;         /* même couleur que th */
    text-align: center;     /* si tu veux aligner comme les th */
}

/* En-têtes réduits à poids normal (inchangé) */
[data-cell^="h2c"]{
  font-weight: normal !important; 
}

/* Trait horizontal sous la dernière ligne du tableau (inchangé) */
[data-cell^="r19c"] {
  border-bottom: 3px solid #393939 !important;
}

[data-cell$="c12"] {
  border-right: 3px solid #393939 !important;
}

[data-cell="h1c12"] {
  border-right: 3px solid #393939 !important;
}

[data-cell="h1c11"],
[data-cell="h1c12"] {
  border-right: 3px solid #393939 !important;
}

[data-cell="h1c2"]{
  border-right: 3px solid #393939 !important;
}

[data-cell="h1c1"],
[data-cell="h1c2"]{
  border-bottom: 3px solid #393939 !important;
}

[data-cell$="c2"]{
  border-right: 3px solid #393939 !important;
}


/* tableau classement généram */

/* === STYLE GLOBAL DU TABLEAU === */
.points-table-general {
  width: 100%;
  border-collapse: collapse;
  background-color: #393939; /* gris du tableau */
  font-family: sans-serif;
  text-align: center;
}

/* === BORDURES DU TABLEAU === */
.points-table-general th,
.points-table-general td {
  border-left: 3px solid #393939;
  border-right: 3px solid #393939;
  border-bottom: 1px solid #cfcfcf  ; /* lignes foncées */
  padding: 10px;
  color: white;
}

/* === EN-TÊTE HAUT (nom + position) === */
.points-table-general th {
  background-color: #7f7f7f; /* gris foncé en-tête */
  font-size: 1.1rem;
  font-weight: bold;
}

/* === LIGNES DU CORPS === */
.points-table-general td {
  background-color: #9b9b9b; /* gris plus clair */
  padding: 3px 4px;
  height: 25px;
}

/* === OPTIONS AMÉLIORÉES (facultatives) === */

/* survol */
.points-table-general tr:hover td {
  background-color: #535050;
  font-weight: bold;
}

/* alignement numérique */
.points-table-general .num {
  font-weight: bold;
}

.points-table-general th {
  border: 3px solid #393939;
}
.points-table-general th {
  border-bottom: 3px solid #393939;
}

.points-table-general tbody {
  border-bottom: 3px solid #393939 !important;
}

.table-legend {
  margin-top: 3px;
  text-align: center;
  color: #fff;
}

/* lien vers la page reglement */
.lien_tableau_course{
  color: #4da3ff; /* ta couleur normale */
  text-decoration: none;
}
        
.lien_tableau_course:hover{
  text-decoration: underline;
}

.lien_tableau_course:visited{
  color: #1482f7; /* optionnel : effet survol */
}


/* Les liens vers le site pcs */
.liens-course a {
  color: #4da3ff; /* ta couleur normale */
  text-decoration: none;
}
        
.liens-course a:hover {
  text-decoration: underline;
}

.liens-course a:visited {
  color: #1482f7; /* optionnel : effet survol */
}

/* lien vers la page de test */
.lien_page_surprise{
  color: #4da3ff; /* ta couleur normale */
  text-decoration: none;
}

.lien_page_surprise:visited {
  text-align: center;
  color: #be5014;
  margin-bottom: 40px; /* optionnel : effet survol */
}


#lastUpdate {
  font-style: italic;
  margin-left: 0.3rem; /* petit espace optionnel */
}


/* =========================
   PAR DÉFAUT : MOBILE
   ========================= */

/* Le SVG est TOUJOURS caché sur mobile */
.line-graph {
  display: none !important;
}

/* Le fallback mobile est visible */
.mobile-fallback {
  display: block;
}


/* =========================
   DESKTOP UNIQUEMENT
   ========================= */

@media (min-width: 1000px) {

  .line-graph {
    display: inline-block !important;
  }

  .mobile-fallback {
    display: none !important;
  }

}


