/* styles.css */
/* Base styles */


html, body {
    height: 100%; /* Nécessaire pour que le flex s'applique sur toute la hauteur */
    margin: 0; /* Supprime les marges par défaut */
    
}

body {
    background-color: #ffffff;
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
    overflow-x: hidden; /* Cache le débordement horizontal */
    color: rgba(0, 0, 0, 0.9);
    font-weight: 400;
    line-height: 1.6;
} 

.wrapper {
    display: flex; /* Active Flexbox */
    flex-direction: column; /* Disposition en colonne (header, contenu, footer) */
    min-height: 100vh; /* La hauteur minimale est la hauteur de la fenêtre */
}

.main-container {
    flex: 1;
    padding: 1% 2%;
    width: 98%;
    position: relative;
}

/* Overlay subtil pour harmoniser avec la navbar */
.main-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    pointer-events: none;
    z-index: 0;
}

/* Contenu du main au-dessus de l'overlay */
.main-container > * {
    position: relative;
    z-index: 1;
}

.onecolumn {
    max-width: 1200px;
    margin: 0 auto;
}

/* Fonctions text */
/* Typography */

.vertical-text {
    transform: rotate(-90deg); /* Rotation de 90° dans le sens des aiguilles d'une montre */
    display: inline-block; /* Nécessaire pour appliquer transform */
}

h1, h2, h3 {
    font-family: 'Poppins', 'Inter', system-ui, sans-serif;
    font-weight: 600;
}

h1 {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 1rem;
    color: rgba(0, 0, 0, 0.9);
    line-height: 1.2;
    margin: 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(59, 130, 246, 0.6);
    padding-bottom: 0.5rem;
}

h2 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: rgba(0, 0, 0, 0.85);
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: rgba(0, 0, 0, 0.8);
}

p {
    margin: 0;
    font-size: 0.875rem;
}

@media (max-width: 768px)
{
body {
    font-size: 0.7rem;
}

h1{font-size: 1rem;}
h2, h3 {font-size: 0.8rem;}
p{font-size: 0.75rem;}
}

.article p{
    line-height: 1;
    margin: 20px 0;
}

.Gold{
    background: linear-gradient(135deg, rgba(233, 202, 66, 0.3) 0%, rgba(255, 215, 0, 0.2) 100%) !important;
    border-left: 3px solid #ffd700 !important;
    position: relative;
}

.Gold::before {

    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.Silver{
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.3) 0%, rgba(169, 169, 169, 0.2) 100%) !important;
    border-left: 3px solid #c0c0c0 !important;
    position: relative;
}

.Silver::before {

    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.Bronze{
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.3) 0%, rgba(184, 115, 51, 0.2) 100%) !important;
    border-left: 3px solid #cd7f32 !important;
    position: relative;
}

.Bronze::before {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Style pour les points des médailles */
.medal-points {
    display: inline-block;
    vertical-align: middle;
    font-weight: 600;
}

.Gold .medal-points {
    color: #b8860b;
}

.Silver .medal-points {
    color: #696969;
}

.Bronze .medal-points {
    color: #8b4513;
}

.Goldlight{
    background-color: #e9ca4252 !important;
}

.Silverlight{
    background-color: #7a7979a1 !important;
}

.Bronzelight{
    background-color: #965e149c !important;
}

.firstPlace {
    background-color: #e9ca42a7; /* Couleur du surlignage */
    color: white; /* Couleur du texte */
    border-radius: 5px; /* Coins arrondis */
    padding: 2px 4px; /* Espacement interne pour un effet visuel agréable */
    display: inline; /* Assure que le style s'applique uniquement au texte */
}

.secondPlace {
    background-color: #7a7979; /* Couleur du surlignage */
    color: white; /* Couleur du texte */
    border-radius: 5px; /* Coins arrondis */
    padding: 2px 4px; /* Espacement interne pour un effet visuel agréable */
    display: inline; /* Assure que le style s'applique uniquement au texte */
}

.thirdPlace {
    background-color: #965d14; /* Couleur du surlignage */
    color: white; /* Couleur du texte */
    border-radius: 5px; /* Coins arrondis */
    padding: 2px 4px; /* Espacement interne pour un effet visuel agréable */
    display: inline; /* Assure que le style s'applique uniquement au texte */
}

.surligne-Actif {
    background-color: green; /* Couleur du surlignage */
    color: white; /* Couleur du texte */
    border-radius: 5px; /* Coins arrondis */
    padding: 2px 4px; /* Espacement interne pour un effet visuel agréable */
    display: inline; /* Assure que le style s'applique uniquement au texte */
}

.surligne-Inactif {
    background-color: grey; /* Couleur du surlignage */
    color: white; /* Couleur du texte */
    border-radius: 5px; /* Coins arrondis */
    padding: 2px 4px; /* Espacement interne pour un effet visuel agréable */
    display: inline; /* Assure que le style s'applique uniquement au texte */
}

.surligne-Invite {
    background-color: orange; /* Couleur du surlignage */
    color: white; /* Couleur du texte */
    border-radius: 5px; /* Coins arrondis */
    padding: 2px 4px; /* Espacement interne pour un effet visuel agréable */
    display: inline; /* Assure que le style s'applique uniquement au texte */
}

.surligne-Parti {
    background-color: red; /* Couleur du surlignage */
    color: white; /* Couleur du texte */
    border-radius: 5px; /* Coins arrondis */
    padding: 2px 4px; /* Espacement interne pour un effet visuel agréable */
    display: inline; /* Assure que le style s'applique uniquement au texte */
}

.strikethrough {
    text-decoration: line-through !important;
}

/* Assurer que le strikethrough fonctionne sur les éléments enfants */
.strikethrough .medal-points,
.strikethrough span,
td.strikethrough .medal-points,
td.strikethrough span,
.Gold.strikethrough .medal-points,
.Silver.strikethrough .medal-points,
.Bronze.strikethrough .medal-points,
.Gold.strikethrough span,
.Silver.strikethrough span,
.Bronze.strikethrough span {
    text-decoration: line-through !important;
}

.season-details {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    text-align: center;
}
.season-title {
    background: #1f2937;
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    padding: 10px;
    border-radius: 8px;
}
.season-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 1.1em;
    margin-top: 10px;
}
.season-status-container {
    margin-top: 10px;
    font-size: 1.2em;
    font-weight: bold;
}
.season-status {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 1em;
}
.status-in-progress {
    background-color: green;
    color: white;
}
.status-closed {
    background-color: red;
    color: white;
}
    

.badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7em;
    color: white;
    background-color: #444; /* défaut : gris foncé */
}

/* Couleurs spécifiques */
.badge.gr1 { background-color: rgba(194, 52, 52, 0.815); }
.badge.gr2 { background-color: rgba(57, 57, 180, 0.788); }
.badge.gr3 { background-color: rgba(53, 172, 53, 0.575); }
.badge.gr4 { background-color: rgba(187, 144, 66, 0.822); }


/* Fonctions tables */
.bigtable {

    border-collapse: collapse;
    margin: 20px auto;
    text-align: center;
    min-width: 70%;
    width: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    text-align: center;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    flex:1; 
}
th {
    background-color: #27627e;
    color:  #ffffff;
}
tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Styles pour figer la première ligne */
.responsive-table th.sticky-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 2;
}

/* Styles pour figer les deux premières colonnes */
.responsive-table th.sticky-col,
.responsive-table td.sticky-col {
    position: sticky;
    left: 0;
    background: white;
    z-index: 1;
}


.tr-dark {
    background-color: #1f2937; /* Gris foncé */
    color: #ffffff; /* Texte blanc */
    border-radius: 5px 5px 0 0; /* Bords supérieurs arrondis */
    display: table-row; /* Assure la compatibilité avec les éléments tr */
    width: 100%;
    border : 0px;
}

.dark-cell {
    background-color: #333333; /* Gris foncé */
    color: #ffffff; /* Blanc */
    padding: 10px; /* Espacement interne */
    text-align: center; /* Centrage du texte */
    font-weight: bold; /* Texte en gras */
    border: 1px solid #555555; /* Optionnel : bordure légèrement plus claire */
  }


.light-cell {
  background-color: #ffffff; /* Blanc */
  color: #000000; /* Noir */
  padding: 10px; /* Espacement interne */
  text-align: center; /* Centrage du texte */
  border: 1px solid #dddddd; /* Optionnel : bordure grise claire */
  font-weight: normal; /* Texte normal */
}
.light-cell-purple{
    background-color: #ffffff; /* Blanc */
    color: #a60ce2; /* Noir */
    padding: 10px; /* Espacement interne */
    text-align: center; /* Centrage du texte */
    border: 1px solid #dddddd; /* Optionnel : bordure grise claire */
    font-weight: normal; /* Texte normal */
  }

.cell10 {
    width: 10%;
}

.cell15 {
    width: 15%;
}

.cell20 {
    width: 20%;
}

.cellmain {
    text-align: center;
}

.bestlaps {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    table-layout: auto;
  }

  .pseudoandflag{
    align-items: center;    
    justify-content: space-between;

  }

/*Fonctions images */



img {
    width: 100%; /* L'image occupe toute la largeur de la cellule */
    height: auto; /* Garde les proportions de l'image */
}
.vignette-round {
    height: auto;
    border-radius: 50%;
    overflow: hidden;
}

.vignette{
    width: 100px;
    height: auto;
    border-radius: 5%;
    overflow: hidden;
    margin-right: 20px;
}

.flag{
    width: 2rem;
    height: 1.3rem;
    border-radius: 8%;
    border: 1px solid  #c8c8c9;
    overflow: hidden;
    margin-right: 10px;
}

@media (max-width: 520px)
{
.flag{
    width: 1.5rem;
    height: auto;
    border-radius: 8%;
    border: 1px solid  #c8c8c9;
    overflow: hidden;
    margin-right: 2px;
    }
}

.smallflag{
    width: 1.2rem;
    height: auto;
    border-radius: 8%;
    border: 1px solid  #c8c8c97f;
    overflow: hidden;
    margin-right: 10px;
    vertical-align: middle;
}

@media (max-width: 520px)
{
.smallflag{
    width: 1rem;
    height: auto;
    border-radius: 8%;
    border: 1px solid  #c8c8c9;
    overflow: hidden;
    margin-right: 2px;

    }
}

.polaroid {
    width: 450px;
    background: white;
    border: 10px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: rotate(0deg);
    transition: transform 0.3s ease;
  }
  
.post-it:hover {
    transform: rotate(3deg);
  }

  .polaroid:hover {
    transform: rotate(3deg);
  }
  
  .photo-frame {
    overflow: hidden;
    width: auto;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .photo {
    width: 100%;
    height: auto;
  }
  
  .caption {
    margin: 10px 0;
    text-align: center;
    font-family:'Permanent Marker', cursive;
    font-size: 24px;
    color: #611414;
  }
  @media (max-width: 520px)
{
    .polaroid {
        width: 80%;
    }
    .photo-frame {
        height: 200px;
    }
    .caption {
        font-size: 16px;
    }
}
/*classes de texte */
.post-it {
    width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    background-color: #fdfd96; /* Couleur jaune post-it */
    border: 1px solid #e8e4b7;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2), -3px -3px 8px rgba(255, 255, 255, 0.5);
    transform: rotate(0deg);
    font-family:  'Permanent Marker', cursive;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
  }
  
  .post-it p {
    margin: 0;
    white-space: pre-wrap; /* Garde les sauts de ligne */
  }
  
  .post-it::-webkit-scrollbar {
    width: 8px;
  }
  
  .post-it::-webkit-scrollbar-thumb {
    background: #e8e4b7;
    border-radius: 4px;
  }
  
  .post-it::-webkit-scrollbar-track {
    background: #fdfd96;
  }
/*Classes internes */


.pilot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 5px; /* Espacement entre les colonnes et les lignes */
}
.mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 350px));
    gap: 5px; /* Espacement entre les colonnes et les lignes */
}

.card-white .mini-grid {
    gap: 10px; /* Espacement amélioré dans les cards blanches */
}

/* Mini-grid dans card-white : cadres et textes alignés sur le thème clair */
.card-white .mini-grid .cadre {
    background: #f9fafb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.card-white .mini-grid .cadre h2 {
    color: #1f2937;
    border-bottom: 2px solid rgba(59, 130, 246, 0.2);
}

.card-white .mini-grid .cadre td,
.card-white .mini-grid .cadre p {
    color: #374151;
}

.card-white .mini-grid .cadre p {
    color: #4b5563;
}

.card-white .mini-grid .cadre strong {
    color: #1f2937;
}

.card-white .mini-grid .cadre td:first-child,
.card-white .mini-grid .cadre td:last-child {
    border-color: rgba(0, 0, 0, 0.06);
}

.card-white .mini-grid .no-style-link {
    color: inherit;
}

.card-white .mini-grid .no-style-link:hover .cadre {
    background: #f3f4f6;
    border-color: rgba(59, 130, 246, 0.2);
}

.pilot-grid h2 {
    text-align: left;
    margin-left: 0;
}
 .home-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(520px, 800px));
    gap: 10px; /* Espacement entre les colonnes et les lignes */
    justify-content: center; /* Centre les colonnes globalement */
    padding: 0.5%;
}

.champ-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(780px, 1fr));
    gap: 5px; /* Espacement entre les colonnes et les lignes */
    justify-content: center; /* Centre les colonnes globalement */
}

.race-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(650px, 0.8fr));
    gap: 10px; /* Espacement entre les colonnes et les lignes */
    justify-content: center; /* Centre les colonnes globalement */
}

.race-section-title {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}
.race-section-title:first-of-type {
    margin-top: 0;
}

@media (max-width: 520px)
{
    .champ-grid , .pilot-grid,.home-grid, .race-grid{
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    .mini-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 0.99fr));

    }
}

@media (max-width: 768px)
{
    .facultatif{
        display: none;
    }
}
@media (min-width: 768px)
{
    .mobile-only{
        display: none;
    }
}

.driver-banner
{
    background-image: url("./img/Banners/Default-Banner.png");
    height: 294px;
    background-position: 50%;
    position: relative;
    background-size: cover;
    display: block;
}
.driver-portrait
{
position: absolute;
bottom: 0;
left: 48px;
margin: 0;
width: 190px;
}

.driver-mini-portrait
{

width: 50px;
}

.driver-desc {
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    unicode-bidi: isolate;
}
/*
body {
    font-family: Arial, sans-serif;
    margin: 20px;
}
    */
.details {
    margin: 20px 0;
}
.toggle-section {
    margin-top: 15px;
    padding: 10px 15px;
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    color: #60a5fa;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
}

.toggle-section:hover {
    background-color: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    color: #93c5fd;
    transform: translateY(-1px);
}

.toggle-section:active {
    transform: translateY(0);
}

.toggle-section::after {
    content: ' ▼';
    font-size: 0.8em;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.toggle-section.expanded::after {
    transform: rotate(180deg);
}

#extra-details {
    display: none;
    margin-top: 10px;
    padding: 10px 12px;
    background-color: transparent;
    border: none;
    border-radius: 6px;
    animation: fadeIn 0.3s ease;
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
}

#extra-details.extra-details-expanded {
    display: block;
}

#extra-details table {
    width: auto;
    margin: 0 auto;
    font-size: 0.95em;
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
}

#extra-details th {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.95em;
    padding: 6px 10px 6px 0;
    text-align: left;
    vertical-align: top;
    width: 35%;
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
    background-color: transparent;
}

#extra-details td {
    padding: 6px 10px;
    color: #ffffff;
    line-height: 1.5;
    font-size: 0.95em;
    vertical-align: top;
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
    background-color: transparent;
}

#extra-details tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background-color: transparent;
}

#extra-details tr:last-child {
    border-bottom: none;
}

#extra-details tr th[colspan="2"] {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9em;
    padding: 10px 0 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 6px;
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
    background-color: transparent;
}

#extra-details tr td[colspan="2"] {
    padding: 8px 0;
    color: #ffffff;
    font-size: 0.9em;
    line-height: 1.6;
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
    background-color: transparent;
}

/* Style pour la description courte */
.card.no-hover .short-description {
    margin-top: 15px;
    padding: 12px 15px;
    background-color: rgba(31, 41, 55, 0.3);
    border-left: 3px solid rgba(59, 130, 246, 0.5);
    border-radius: 4px;
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
}

.card.no-hover .short-description p {
    margin: 0;
    color: #e5e7eb;
    font-size: 0.95em;
    line-height: 1.6;
    font-style: italic;
    text-align: left;
}

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

/* Bandeau de navigation pour les pages de championnat */
.championship-section-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 1.5rem 0 1rem 0;
    padding: 0.75rem 0;
    border-bottom: 2px solid rgba(59, 130, 246, 0.6);
    flex-wrap: wrap;
}

.championship-section-nav .nav-item {
    font-family: 'Poppins', 'Inter', system-ui, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(0, 0, 0, 0.7);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.championship-section-nav .nav-item:hover {
    color: rgba(59, 130, 246, 0.9);
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
}

.championship-section-nav .nav-item.active {
    color: rgba(0, 0, 0, 0.9);
    font-weight: bold;
    cursor: default;
    pointer-events: none;
}

.championship-section-nav .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 0;
    right: 0;
    height: 3px;
    background-color: rgba(59, 130, 246, 0.9);
    border-radius: 2px 2px 0 0;
}

/* Smooth scroll pour les ancres */
html {
    scroll-behavior: smooth;
}

/* Offset pour les ancres */
section[id] {
    scroll-margin-top: 80px;
}

/* Menu déroulant mobile */
.championship-section-nav-mobile {
    display: none;
}

.championship-nav-select {
    width: 100%;
    padding: 0.75rem;
    font-family: 'Poppins', 'Inter', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(0, 0, 0, 0.9);
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(59, 130, 246, 0.6);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.championship-nav-select:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.9);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

@media (max-width: 768px) {
    /* Cache le bandeau desktop en mobile */
    .championship-section-nav {
        display: none;
    }
    
    /* Affiche le select mobile */
    .championship-section-nav-mobile {
        display: block;
        margin: 1rem 0 0.75rem 0;
    }
    
    section[id] {
        scroll-margin-top: 60px;
    }
}

@media (min-width: 769px) {
    /* Cache les titres h1 en desktop */
    .mobile-only {
        display: none;
    }
}

.no-style-link {
    text-decoration: none; /* Supprime le soulignement */
    color: inherit; /* Garde la couleur du texte environnant */
}

.no-style-link:hover,
.no-style-link:focus {
    text-decoration: none; /* Évite le surlignage au survol ou au focus */
    color: inherit; /* Conserve la couleur */
}

/*Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
}

.page-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.page-link.active {
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
    pointer-events: none;
    border-color: #0056b3;
}
/* Navigation */
.navbar {
    /*background-color: #1f2937; */
    background-color:  #000000;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;

}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3%;
    height: 4rem;
    width: 100%;
}

.nav-logo {
    text-align: left; /* Aligne le logo/titre à gauche */
    margin-left: 1rem; /* Ajoute de l'espace entre le bord gauche et le titre */
}

.nav-logo span {
    font-size: 1.25rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 1rem;

}

.nav-links a {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    text-decoration: none;
}

.nav-links a:hover {
    background-color: #374151;
}

/* Styles pour petits écrans */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        gap: 0;
        background-color: #1f2937;
        position: absolute;
        top: 4rem;
        right: 0;
        left: 0;
        text-align: left; /* Alignement du texte à gauche */
        padding-left: 1rem; /* Optionnel : ajout d'un padding pour un meilleur visuel */
    }

    .nav-links a {
        padding: 1rem 0;
        border-bottom: 1px solid #374151;
    }

    .nav-links.show {
        display: flex;
    }
}

/* Card styles */
/* Bannière de championnat */
.championship-banner {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.championship-banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.cadre{
    /*border: 2px solid #3b82f6;*/
    /*margin: 10px;*/
    padding: 0;
    background: rgba(31, 41, 55, 0.98);
    border-radius: 12px;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.3),
        0 0 0 3px rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
}

/* Ajustement du border-radius du cadre si une bannière est présente */
.card.no-hover:has(.championship-banner) .cadre {
    border-radius: 0 0 12px 12px;
}

.cadre table {
    margin: 0;
    width: 100%;
}

.cadre td.cellmain {
    padding: 15px;
}

/* Mise en exergue du titre dans le cadre */
.cadre h2 {
    color: #3b82f6;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #3b82f6;
}


.cadre td:first-child {
    vertical-align: middle;
    padding: 0;
    /* background-color: rgba(59, 130, 246, 0.05);*/
    border: none;
    border-right: 1px solid rgba(59, 130, 246, 0.2);
    width: 120px;
    min-width: 120px;
}

.cadre td:last-child {
    vertical-align: middle;
    padding: 0;
    /*background-color: rgba(59, 130, 246, 0.05);*/
    border: none;
    border-left: 1px solid rgba(59, 130, 246, 0.2);
    width: 120px;
    min-width: 120px;
}

.cadre table tr {
    height: auto;
    background-color: transparent;
}


.cadre table td:not(.cell10) {
    padding: 5px 0 0 0;
}

/* Limite la taille des logos dans le cadre */
.cadre .vignette-round {
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Mobile : les cellules logo du cadre ne forcent plus 120px, respectent 10% / 15% */
@media (max-width: 768px) {
    .cadre table {
        table-layout: fixed;
    }
    .cadre td:first-child {
        width: 10%;
        min-width: 0;
    }
    .cadre td:last-child {
        width: 15%;
        min-width: 0;
    }
    .cadre td:first-child img.vignette-round,
    .cadre td:last-child img {
        max-width: 100%;
        height: auto;
        object-fit: contain;
    }
}

.card {
    background-color: #374151;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    padding: 0.5rem;
    margin-bottom: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    background-color: rgba(31, 41, 55, 0.8);
    border-color: rgba(59, 130, 246, 0.4);
}

.card.no-hover:hover {
    transform: none;
    box-shadow: none;
    background-color: #374151;
    border-color: rgba(255, 255, 255, 0.1);
}

/* Désactive tous les effets de survol pour le composant championships_infos */
.card.no-hover,
.card.no-hover .cadre,
.card.no-hover .cadre:hover {
    transition: none;
    cursor: default;
}

.card td,.card th, .card table{
    border: 0px solid transparent;
    margin: 0px;
    padding: 0px;   
    color: rgba(255, 255, 255, 0.9);
     /*overflow: hidden; Cache tout débordement */
     /*text-overflow: ellipsis; /* Ajoute des points de suspension pour les textes trop longs */
}

.card h2, .card h3 {
    color: rgba(255, 255, 255, 0.95);
}

.card p {
    color: rgba(255, 255, 255, 0.8);
}

.card strong {
    color: rgba(255, 255, 255, 0.95);
}

.card table {
    width: 100%; /* La table occupe toute la largeur disponible dans la carte */
    table-layout: fixed; /* Assure un comportement de largeur fixe */
    overflow-wrap: break-word; /* Permet de couper les mots longs */
}



/* Mobile : date + drapeau sur une ligne, nom du circuit en dessous */
@media (max-width: 768px) {

    /* Taille de police forcée pour la cellule date uniquement en mobile */
    .card td.race-calendar-date,
    .card td.race-calendar-date p {
        font-size: 0.69rem !important;
    }
}

/* Logos contraints dans les cellules pour ne pas dépasser le cadre */
.card td.cell10 img.vignette,
.card td.cell10 img.vignette-round {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Liste des courses : couleur manche et mise en valeur du pool */
.card .race-round {
    color: #93c5fd;
    font-weight: 600;
}
.card .race-pool-name {
    color: #fcd34d;
    font-weight: 700;
}

/* Card blanche pour la page d'accueil */
.card-white {
    background-color: #ffffff;
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    background-color: #ffffff;
    border-color: rgba(59, 130, 246, 0.3);
}

.card-white.no-hover:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

.card-white td, .card-white th, .card-white table {
    border: 0px solid transparent;
    margin: 0px;
    color: #374151;
}

.card-white h1 {
    color: #1f2937;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.25rem;
    padding-left: 0.5rem;
    border-bottom: 2px solid rgba(59, 130, 246, 0.2);
}

.card-white h2, .card-white h3 {
    color: #1f2937;
    font-weight: 600;
}

.card-white p {
    color: #4b5563;
    line-height: 1.6;
}

.card-white strong {
    color: #1f2937;
    font-weight: 600;
}

.card-white table {
    width: 100%;
    table-layout: fixed;
    overflow-wrap: break-word;
    margin-bottom: 0.25rem;
}

.card-white table tr:not(.tr-dark) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-white table tr:not(.tr-dark):hover {
    background-color: rgba(59, 130, 246, 0.03);
}

.card-white .race-round {
    color: #2563eb;
    font-weight: 600;
}

.card-white .race-pool-name {
    color: #d97706;
    font-weight: 700;
}

/* Style pour tr-dark dans les cards blanches */
.card-white .tr-dark {
    background-color: #f3f4f6;
    color: #1f2937;
    font-weight: 600;
}

/* Style pour cardimg dans les cards blanches */
.card-white.cardimg {
    overflow: hidden;
    position: relative;
}

.card-white.cardimg img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.card-white.cardimg:hover img {
    transform: scale(1.02);
}

.card-white.cardimg h2 {
    position: absolute;
    top: 20px;
    left: 20px;
    margin: 0;
    padding: 12px 20px;
    background-color: rgba(255, 255, 255, 0.98);
    color: #1f2937;
    font-size: 2rem;
    font-weight: 700;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 2;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.card-white.cardimg p {
    font-size: 1.1rem;
    line-height: 1.7;
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    margin: 0;
    padding: 12px 20px;
    background-color: rgba(255, 255, 255, 0.98);
    color: #374151;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 2;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Styles mobiles */
@media (max-width: 768px) {

    .card, .card-white, .cardimg {
        padding: 0.5rem;
    }

    .card-white.cardimg h2 {
        background-color: rgba(255, 255, 255, 0.75);
        padding: 8px 12px;
        font-size: 1.2em;
        top: 10px;
        left: 10px;
        right: auto;
    }
    
    .card-white.cardimg p {
        background-color: rgba(255, 255, 255, 0.75);
        padding: 8px 12px;
        font-size: 0.85rem;
        line-height: 1.5;
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
}

@media (max-width: 520px) {
    .card-white.cardimg p {
        font-size: 0.75rem;
        padding: 6px 10px;
        left: 8px;
        right: 8px;
        bottom: 8px;
    }
}

/* Cards imbriquées dans card-white héritent du style blanc */
.card-white .card {
    background-color: #ffffff;
    color: #1f2937;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);

    transition: all 0.2s ease;
}

.card-white .card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    border-color: rgba(59, 130, 246, 0.25);
}

.card-white .card td, .card-white .card th, .card-white .card table {
    color: #374151;
}

.card-white .card p {
    color: #4b5563;
}

.card-white .card strong {
    color: #1f2937;
}
/* Ligne d'en-tête calendrier : même bleu/gris-bleu que le header (navbar), texte blanc */
.card .race-calendar-header-row,
.card .race-calendar-header-row td {
    background-color: #1f2937;
    color: #ffffff;
}
.card .race-calendar-header-row p,
.card .race-calendar-header-row strong {
    color: #ffffff;
}
.card-white .race-calendar-header-row,
.card-white .race-calendar-header-row td {
    background-color: #1f2937;
    color: #ffffff;
}
.card-white .race-calendar-header-row p,
.card-white .race-calendar-header-row strong {
    color: #ffffff;
}
/* Styles pour les filtres */
.filters {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: rgba(31, 41, 55, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.filters form {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filters label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.9rem;
}

.filters select {
    background-color: rgba(31, 41, 55, 0.7);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', 'Poppins', system-ui, sans-serif;
}

.filters select:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background-color: rgba(31, 41, 55, 0.9);
}

.filters select:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.filters select option {
    background-color: rgba(31, 41, 55, 0.95);
    color: rgba(255, 255, 255, 0.95);
}

/* Message aucun résultat */
.no-results {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    background-color: rgba(31, 41, 55, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}


.cardimg img{
    width: 100%;
    height: auto;
    display: block;
}
.cardimg h2 {
    position: relative;
    top: 10px;
    left: 10px;
    margin: 0;
    padding: 5px 10px;
    background-color: rgba(200, 200, 200, 0.8);
    color: #000;
    font-size: 2rem;
}
.cardimg p {
    padding: 20px;
    font-size: 1rem;
    line-height: 1.5;
    position: relative;
    bottom: 10px;
    left: 10px;
    margin: 0;
    padding: 5px 10px;
    background-color: rgba(200, 200, 200, 0.8);
    color: #000;
}

/* Style pour la cellule des points */
.points-cell {
    position: relative;
    cursor: pointer;
}

/* Conteneur du tooltip */
.tooltip-container {
    position: relative;
    display: inline-block;
}

/* Contenu du tooltip (caché par défaut) */
.tooltip-content {
    visibility: hidden;
    width: 200px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: left;
    padding: 10px;
    border-radius: 5px;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
    font-size: 12px;
}

/* Affichage du tooltip au survol */
.tooltip-container:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Petite flèche du tooltip */
.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

/* Hero section */
.hero-section {
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-section p {
    color: #4b5563;
}

/* Grid section */
.grid-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .grid-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Races list */
.races-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.race-item {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.race-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.status-upcoming {
    background-color: #fef3c7;
    color: #92400e;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

/* Drivers list */
.drivers-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.driver-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.driver-content {
    display: flex;
    align-items: center;
}

.driver-avatar {
    width: 2rem;
    height: 2rem;
    background-color: #e5e7eb;
    border-radius: 9999px;
    margin-right: 0.75rem;
}

/* Events grid */
.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.event-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
}

.event-date {
    font-size: 0.875rem;
    color: #4b5563;
}

/* Footer */
.footer {
    background-color: #1f2937;
    color: white;
    margin-top: 2rem;
}

.footer-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-logo {
    font-family: 'Orbitron', 'Rajdhani', system-ui, sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #ffffff;
    margin: 0;
}

.footer-tagline {
    font-family: 'Rajdhani', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #9ca3af;
    margin: 0.25rem 0 0 0;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: white;
    font-size: 0.875rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: #d1d5db;
}



.caroussel {
    display: flex;
    justify-content: center; /* Centre horizontalement */
    align-items: center; /* Centre verticalement */
    /* min-height: 100vh; S'assure que le corps occupe toute la hauteur */
    /*margin: 0; /* Supprime les marges par défaut */
    /*background-color: #129112;  Optionnel, une couleur de fond */
  }
  

.swiper-container {
    

    align-items: center;
    width:50%;
    height: 400px;
    padding-top: 50px;
    padding-bottom: 50px;
    background-color: #05041d; /* Optionnel, pour visualiser le conteneur */
  border-radius: 2px; /* Bords arrondis optionnels */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* Ombre optionnelle */
  }
  
  .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background-position: center;
    background-size: cover;

  }
  
  .swiper-slide img {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: auto;
    border-radius: 10px; /* Optionnel, pour des bords arrondis */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Ombre optionnelle */
    object-fit: contain;
  }
  
  .overlay-text {
    position: relative;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 1);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1.2rem;
    z-index: 10;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  
  .overlay-text p
  { 
    color: white;
  }

  /* Afficher au survol (desktop) */
  .swiper-slide:hover .overlay-text {
    opacity: 1;
    transform: translateY(0);
  }

  /*Style lié à l'affichage des places gagnées ou perdues*/

    .delta-positive {
        color: green;
    }

    .delta-positive:before {
        content: '▲ ';
    }

    .delta-negative {
        color: red;
    }

    .delta-negative:before {
        content: '▼ ';
    }
 
    /* Style pour les pilotes actifs */
    .ActivePilot {
        font-weight: bold;
    }

 /* Style du bouton "Afficher les détails" */
.openTableModal {
    display: none; /* Masqué par défaut */
    font-size: 14px;
    color: #777;
    border: 1px solid #777;
    background: transparent;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
}

/* Affichage uniquement sur mobile */
@media screen and (max-width: 768px) {
    .openTableModal {
        display: inline-block;
    }
}

/* Style de la pop-up */
#popupModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

/* Contenu de la pop-up */
.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

/* Style de la croix de fermeture */
.close {
    position: absolute;
    top: -20px; /* Pour bien centrer visuellement */
    left: 50%;
    transform: translateX(-50%);
    font-size: 28px;
    color: #FF0000; /* Rouge pour attirer l'attention */
    cursor: pointer;
    padding: 5px 10px;
    background: white;
    border-radius: 50%;
    border: 2px solid #FF0000;
    transition: 0.3s;
}

.close:hover {
    background-color: #FF0000;
    color: white;
}
    #rankingTableContainer {
        width: 95%;
        max-height: 90vh; /* Ajuster pour éviter les coupures */
        overflow: auto;
        background: white; /* Pour éviter que le tableau soit caché */
        padding: 10px;
        position: relative;
    }

    /* Ajuster la largeur de la colonne pilote dans le modal */
    #rankingTableContainer .bigtable {
        table-layout: auto;
    }
    
    #rankingTableContainer .bigtable th:nth-child(2),
    #rankingTableContainer .bigtable td:nth-child(2) {
        width: auto;
        min-width: fit-content;
        white-space: nowrap;
        max-width: none;
    }
    
    /* Éviter les retours à la ligne dans la colonne pilote du modal */
    #rankingTableContainer .bigtable td.pseudoandflag {
        display: flex;
        align-items: center;
        justify-content: space-between;
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    
    #rankingTableContainer .bigtable td.pseudoandflag span {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    #rankingTableContainer .bigtable td.pseudoandflag img.smallflag {
        float: none;
        flex-shrink: 0;
        margin-left: 10px;
        margin-right: 0;
    }

/* ============================================
   Race Media Section - Modern Design
   ============================================ */

/* Container principal pour la section media */
.race-media-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    align-items: start;
}

/* Carte photo moderne */
.race-media-photo {
    width: 100%;
}

.race-photo-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.race-photo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.race-photo-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 66.67%; /* Ratio 3:2 */
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
}

.race-photo-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.race-photo-card:hover .race-photo-img {
    transform: scale(1.05);
}

.race-photo-caption {
    padding: 1rem 1.5rem;
    background: linear-gradient(to bottom, #ffffff, #f9fafb);
    border-top: 1px solid #e5e7eb;
}

.race-photo-caption p {
    margin: 0;
    font-size: 0.95rem;
    color: #6b7280;
    font-style: italic;
    font-weight: bold;
    text-align: center;
    line-height: 1.5;
}

/* Carte commentaire moderne */
.race-media-comment {
    width: 100%;
}

.race-comment-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #ffffff;
}

.race-comment-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.25), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.race-comment-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.race-comment-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.race-comment-content {
    padding: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
}

.race-comment-content p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.8;
    color: #ffffff;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.race-comment-content::-webkit-scrollbar {
    width: 8px;
}

.race-comment-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.race-comment-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.race-comment-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .race-media-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .race-photo-wrapper {
        padding-bottom: 75%; /* Ratio 4:3 sur mobile */
    }
    
    .race-comment-header h2 {
        font-size: 1.25rem;
    }
    
    .race-comment-content {
        padding: 1.25rem;
        max-height: 500px;
    }
    
    .race-comment-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

@media (max-width: 520px) {
    .race-media-container {
        gap: 1rem;
        margin: 1rem 0;
    }
    
    .race-photo-caption {
        padding: 0.75rem 1rem;
    }
    
    .race-photo-caption p {
        font-size: 0.85rem;
        font-weight: bold;
    }
    
    .race-comment-header {
        padding: 1rem 1rem 0.75rem;
    }
    
    .race-comment-header h2 {
        font-size: 1.1rem;
    }
    
    .race-comment-content {
        padding: 1rem;
        max-height: 400px;
    }
    
    .race-comment-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

/* ============================================
   Race Stats Section - Modern Design
   ============================================ */

.race-stats-header {
    margin-bottom: 2rem;
    text-align: center;
}

.race-stats-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
}

.race-stats-subtitle {
    margin: 0;
    font-size: 1rem;
    color: #6b7280;
    font-style: italic;
}

.race-stats-modern {
    width: 100%;
}

.race-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.race-stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.race-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.race-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.race-stat-card:hover::before {
    transform: scaleY(1);
}

.race-stat-card-secondary {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    opacity: 0.9;
}

.race-stat-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.25);
}

.race-stat-card-secondary .race-stat-icon {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    box-shadow: 0 4px 6px rgba(156, 163, 175, 0.25);
}

.race-stat-content {
    flex: 1;
    min-width: 0;
}

.race-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.race-stat-type {
    font-size: 0.95rem;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.race-stat-pilot {
    font-size: 1rem;
    color: #374151;
    font-weight: 600;
}

/* Details pour les stats secondaires */
.race-stats-details {
    margin-top: 2rem;
    border-top: 2px solid #e5e7eb;
    padding-top: 2rem;
}

.race-stats-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    transition: all 0.3s ease;
    user-select: none;
}

.race-stats-summary:hover {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-color: #d1d5db;
}

.race-stats-summary::-webkit-details-marker {
    display: none;
}

.race-stats-arrow {
    transition: transform 0.3s ease;
    color: #6b7280;
}

.race-stats-details[open] .race-stats-arrow {
    transform: rotate(180deg);
}

.race-stats-details[open] .race-stats-summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}

.race-stats-grid-secondary {
    margin-top: 1rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 10px 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .race-stats-header h2 {
        font-size: 1.75rem;
    }
    
    .race-stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.25rem;
    }
    
    .race-stat-card {
        padding: 1.25rem;
    }
    
    .race-stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .race-stat-value {
        font-size: 1.5rem;
    }
    
    .race-stat-type {
        font-size: 0.9rem;
    }
    
    .race-stat-pilot {
        font-size: 0.95rem;
    }
}

@media (max-width: 520px) {
    .race-stats-header {
        margin-bottom: 1.5rem;
    }
    
    .race-stats-header h2 {
        font-size: 1.5rem;
    }
    
    .race-stats-subtitle {
        font-size: 0.9rem;
    }
    
    .race-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .race-stat-card {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .race-stat-icon {
        width: 36px;
        height: 36px;
    }
    
    .race-stat-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .race-stat-value {
        font-size: 1.25rem;
    }
    
    .race-stat-type {
        font-size: 0.85rem;
    }
    
    .race-stat-pilot {
        font-size: 0.9rem;
    }
    
    .race-stats-summary {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }
    
    .race-stats-grid-secondary {
        padding: 1rem;
    }
}

/* Liste de fichiers (section Fichiers championnat) */
.files-list {
    margin-top: 1.25rem;
    background: #fafafa;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.files-list-table {
    width: 100%;
    border-collapse: collapse;
}

.files-list-table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.files-list-table tbody tr:last-child {
    border-bottom: none;
}

.files-list-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Cellule icône : image limitée à 5rem max */
.files-list-icon {
    width: 6rem;
    max-width: 6rem;
    padding: 0.75rem 1rem 0.75rem 1rem;
    vertical-align: middle;
    text-align: center;
}

.files-list-icon .file-icon {
    max-width: 5rem;
    max-height: 5rem;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.files-list-icon .file-icon-placeholder {
    font-size: 2rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    max-width: 5rem;
    max-height: 5rem;
    text-align: center;
    opacity: 0.85;
}

.files-list-content {
    padding: 0.75rem 1rem 0.75rem 0;
    vertical-align: middle;
}

.files-list-content .files-list-title-link {
    display: block;
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.files-list-content .files-list-title-link:hover {
    color: #0f172a;
    text-decoration: underline;
}

.files-list-content .files-list-meta {
    display: block;
    margin-top: 0.25rem;
    color: rgba(0, 0, 0, 0.6);
    font-size: 0.875rem;
}

.no-files-message {
    color: rgba(0, 0, 0, 0.55);
    font-style: italic;
    margin: 1.25rem 0;
    font-size: 0.9375rem;
}

    
