
/* RACCOURCIS VS CODE (shift = maj):
Décaler à droite : Tab
Décaler à gauche : Shift + Tab
Reformater un bloc ou tout le fichier : Shift + Alt + F
Sélectionner un mot entier : Ctrl + D
Sélectionner toutes les occurrences du mot : Ctrl + Shift + L
Sélection colonne / multi-lignes verticales : Alt + Click + Drag (cliques)
Aller à une ligne spécifique : Ctrl + G
Retour à la position précédente : Alt + ←
Plier tous les blocs : Ctrl + K Ctrl + 0
Déplier tous les blocs : Ctrl + K Ctrl + J 

font-size
px	rem
12px	0.75rem
14px	0.875rem
16px	1rem
18px	1.125rem
20px	1.25rem
22px    1.375rem
24px	1.5rem
32px	2rem
*/

/* POLICES LOCALES */

/* f1_regular.otf -> Police "f1" en style normal (400) */
@font-face {
  font-family: 'f1_regular';
  src: url('fonts/f1_regular.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* f1_bold.otf -> Police "f1" en style gras (700) */
@font-face {
  font-family: 'f1_bold';
  src: url('fonts/f1_bold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* futura_bold_oblique.otf -> Police "FuturaCustom" en gras/italique */
@font-face {
  font-family: 'futura';
  src: url('fonts/futura_bold_oblique.otf') format('opentype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}


/* CSS commun */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #000000;
    font-family: 'Titillium Web', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: #d4d7dd;
    font-size: 16px;
    /* Pour aller progressivement jusqu'aux ancres # */
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

footer {
    margin-top: auto;
}

h1, h2, h3 {
    font-family: 'f1_bold', 'Poppins', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

h1 {
    font-weight: 800;
}

.logo_and_name_header {
    display: flex;
    align-items: center;
}

.logo_header img, .logo_footer img {
    max-width: 100px;
    height: auto;
}

.name_header {
    display: block;
    font-family: 'f1_bold', 'Poppins', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: white;
    padding-left: 5%;
    font-weight: bold;
    font-size: 1.5rem;
    white-space: nowrap; 
}

nav {
    display: flex;
}

.logo_footer {
    display: flex;
    align-items: center;
}

.logo_footer p {
    padding-right: 20px;
}


/* Background avec bandes du header et footer */
header {
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

footer {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

header, footer {
    z-index: 99;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: #15151E;

    /* Valeur par défaut : dégradé vers le bas */
    --fade-dir: to bottom;

    background-image:
        linear-gradient(var(--fade-dir),
            transparent 40%,
            #15151E 100%
        ),
        repeating-linear-gradient(
            135deg,           
            rgba(255,255,255,0.05) 0 40px,   
            transparent 40px 45px,       
            rgba(255,255,255,0.05) 45px 85px,
            transparent 85px 200px,
            rgba(255,255,255,0.05) 200px 230px,
            transparent 230px 235px,       
            rgba(255,255,255,0.05) 235px 265px,
            transparent 265px 400px
        );
}

/* Fondu vers le haut des bandes claires */
footer {
    --fade-dir: to top;
}

/* Boutons */
.nav-btn {
    padding: 10px 22px;
    border-radius: 20px;
    background: white;
    color: #000000;
    text-decoration: none;
    margin-left: 10px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.3s; /* Animation douce */
}

.nav-btn:hover {
    background-color: #a0a0a0;
}

.nav-btn.red { 
    background: #E10600;
    color: white; 
}

.nav-btn.red:hover {
    background-color: #fdbcba;
    color: #000000;
}

/* sections des pages */

.section {
    display: flex;
    justify-content: space-around ;
    background: #15151E;
    margin: 40px;
    padding: 30px;
    border-radius: 20px;
    gap: 20px;
}

.section-noflex {
    background: #15151E;
    margin: 40px;
    padding: 30px;
    border-radius: 20px;
}

/* Page Mentions Légales */

.page-header.no-margin {
    margin: 0;
}

/* Visuel Dashboard */
.section-dashboard {
    background: #15151E;
    margin: 30px;
    padding: 30px;
    border-radius: 20px;
    gap: 20px;
}

.btn-header-dashboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.btn-header-dashboard span {
    font-weight: 600;
}

.section-btn-dashboard {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    
}

/* Page Admin / Modérateur : Classes pour spécificités de certains boutons du Dashboard */
.category-title.has-content.category-title-dashboard {
    margin-top: 40px;
    padding: 5px 22px;
    font-size: 1.3rem;
}

.btn-width-large {
    width: 100%;
}

.no-margin {
    margin: 0;
}

.btn-subtitle {
    color: #757677;
    margin-left: auto;
}

@media (max-width: 780px) {
    .btn-subtitle {
        display: none;
    }
}

.home-nav-btn-dashboard {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}


.nav-btn-dashboard {
    margin: 3px 0px;
    padding: 10px 22px;
    border-radius: 20px;
    background: white;
    color: #000000;
    text-decoration: none;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.3s; /* Animation douce */
}

.nav-btn-dashboard:hover {
    background-color: #a0a0a0;
}

.nav-btn-dashboard.red { 
    background: #E10600;
    color: white;  
}

.nav-btn-dashboard.red:hover {
    background-color: #fdbcba;
    color: #000000;
}

.section img {
    display: flex;
    max-width: 45%;
    max-height: 200px;
    border-radius: 15px;
    object-fit: cover;
}

.text-block { 
    width: 55%; 
}

.text-block h2 {
    font-family: 'f1_bold', 'Poppins', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: white;
    margin-bottom: 12px;
}

.category-title.has-content.section-title-crud {
    margin: 40px 0px 20px
}

.dashboard-crud-title {
    font-size: 1.3rem;
}

.dashboard-crud-subtitle {
    font-size: 0.875rem;
    font-weight: normal;
    margin: 0;
    padding-top: 0.5rem;
    color: #b8bbc0;
}

/* Page Accueil / Index */
/* Section en haut de page avec l'animation des voitures en background */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: auto;
    text-align: center;
}

.hero h1 {
    font-family: 'f1_bold', 'Poppins', sans-serif;
    font-size: 2rem;
    margin: 10px 0px;
    color: white;
}

/* Texte secondaire mais dans le h1 pour le SEO */
.community-tag {
    display: block;               /* Force la ligne suivante */
    font-size: 1.5rem;             /* Plus petit que le h1 principal */
    font-weight: 400;
    color: #E10600;
    margin: 5px 0px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Devise : Fair-play & Courtoisie */
.hero-motto {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 15px 0px;
    font-family: 'f1_bold', 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Texte sous la devise */
.hero-subtitle {
    font-size: 1rem;
    color: #d4d7dd;
    margin-bottom: 22px;
}

/* Boutons avec ancres qui redirige sur les sections */
.hero-cta {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Animation voitures rouges et blanc */
.hero {
    position: relative;
    padding: 20px 20px 20px;
    margin-top: -20px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    background: #15151E;
    overflow: hidden;
}

/* div qui contient toutes les voitures */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* Voitures animées */
.hero-car {
    position: absolute;
    width: 60px;
    height: 20px;
    border-radius: 4px;
    filter: blur(2px);
    transform: translateX(-100%);
    animation: heroCarMove 4s linear infinite;
}

/* Voitures rouges */
.hero-car.red {
    background: rgba(225,6,0,0.2);
}

/* Voitures blanches */
.hero-car:not(.red) {
    background: rgba(255,255,255,0.2);
}

/* Animation voiture gauche->droite */
@keyframes heroCarMove {
    0% { transform: translateX(-100%) translateY(0); }
    100% { transform: translateX(120vw) translateY(0); }
}

/* Animation voiture droite->gauche */
.hero-car.rev {
    animation: heroCarMoveRev 6s linear infinite;
}

@keyframes heroCarMoveRev {
    0% { transform: translateX(120vw) translateY(0); }
    100% { transform: translateX(-120vw) translateY(0); }
}

/* Différentes lignes et vitesses */
.hero-bg .hero-car:nth-child(1) { top: 15%; animation-duration: 4s; }
.hero-bg .hero-car:nth-child(2) { top: 30%; animation-duration: 6s; }
.hero-bg .hero-car:nth-child(3) { top: 45%; animation-duration: 5s; }
.hero-bg .hero-car:nth-child(4) { top: 60%; animation-duration: 7s; }
.hero-bg .hero-car:nth-child(5) { top: 75%; animation-duration: 6.5s; }

/* Sections Communauté, Championnats, Lives et Discord */
.hero-section {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    background: #15151E;
    margin: 20px;
    padding: 20px;
    border-radius: 20px;
    flex-wrap: wrap;
}

.hero-text-block {
    max-width: 600px;
}

.hero-text-block h2 {
    font-family: 'f1_bold', 'Poppins', sans-serif;
    color: white;
    margin-bottom: 12px;
}

/* Images */
.hero-section img {
    max-width: 45%;
    max-height: 250px;
    border-radius: 15px;
    object-fit: cover;
}

/* Boutons Twitch et Youtube */
.hero-streams .stream-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.stream-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 22px;
    border-radius: 18px;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stream-btn i {
    font-size: 1.375rem;
}

/* Twitch */
.stream-btn.twitch {
    background: #9146FF;
}

.stream-btn.twitch:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(145,70,255,0.5);
}

/* YouTube */
.stream-btn.youtube {
    background: #FF0000;
}

.stream-btn.youtube:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255,0,0,0.5);
}

/* Section Discord */
.hero-discord {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.discord-btn {
    white-space: nowrap;
    background: #5865F2;
    color: white;
    padding: 22px 22px;
    border-radius: 18px;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.discord-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(88,101,242,0.5);
}

/* Animation au scroll pour chaque section de la page d'accueil */
.hero-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

/* Formulaire de connexion au DASHBOARD */
.login-container {
    background-color: #15151E;
    border-radius: 20px;
}

.login-container h1 {
    font-family: 'f1_bold', 'Poppins', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    text-align: center;
    margin-top : 0;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    font-family: 'f1_bold', 'Poppins', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    width: 100%;
    padding: 10px 0px 10px 0px;
    border:0;
    font-size: 0.875rem;
    border-radius: 10px;
    text-indent: 20px;
}

.btn:hover {
    background-color: #fdbcba;
    color: white;
}

.error-message {
    background-color: rgb(248, 157, 54);
    color: black;
    font-weight: 600;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 10px;
    text-align: center;
}

/* TABLEAUX de toutes les pages Classements et Dashboard */

.table-responsive {
    overflow-x: auto;
    border-radius: 10px;
    margin-top: 20px;
}

/* Paramètre de toutes les tables */
.dashboard-table {
    width: 100%;
    position: relative;
    border-collapse: collapse;
    background: #0f0f15;
    border-radius: 10px;
    overflow: hidden;
}

/* Permet aux largeurs fixées d'être respectées */
.dashboard-table {
    table-layout: fixed;
}

.dashboard-table thead th {
    background-color: var(--category-color, #E10600);
}

.dashboard-table th {
    background: var(--category-color, #E10600);
    text-align: left;
    color: white;
    font-weight: 600;
}

.dashboard-table th {
    border-bottom: 1px solid #15151E;
}

.dashboard-table td {
    border-bottom: 1px solid #15151E;
}

.dashboard-table th.text-right,
.dashboard-table td.text-right {
    text-align: right;
}

.dashboard-table th.text-center,
.dashboard-table td.text-center {
    text-align: center;
}

.dashboard-table td {
    position: relative;
    z-index: 1;
}

.dashboard-table td::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.03);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 2;
}

.dashboard-table tr:hover td::after {
    opacity: 1;
}

/* Dashboard Largeurs des colonnes des tableaux des index du CRUD */

.dashboard-table th.width-actions,
.dashboard-table td.width-actions {
    width: 130px;
}

.dashboard-table th.width-numbers,
.dashboard-table td.width-numbers {
    width: 60px;
}

.dashboard-table th.width-small-info,
.dashboard-table td.width-small-info {
    width: 90px;
}

/* Spécificités gestion des status active / desactive */

.table-responsive.with-status-btn {
    margin-top: 0px;
}

.dashboard-table th.width-checkbox,
.dashboard-table td.width-checkbox {
    width: 20px;
}

button.status-btn {
    border: none;
    font: inherit;
    box-shadow: none;
    -webkit-appearance: none;
    text-align: center;
    width: 100px;
    margin: 20px 0px 5px;
    padding: 2px;
    border-radius: 5px;
    background: white;
    color: #000000;
    text-decoration: none;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

button.status-btn:hover {
    background-color: #a0a0a0;
}


/* Tableau : Classes pour permettre aux éléments trop longs 
de se cacher derrière ou passer au dessus de la cellule suivante */

table.fix{
  table-layout: fixed;
}

/* Texte passes en dessous de la celulle suivante */
th.down,
td.down {
  white-space: nowrap;
  overflow: hidden;
}

/* Texte reste visible dans la celulle suivante */
th.upside,
td.upside {
  white-space: nowrap;
}

/* Classe Mettre en gras une colonne */

.td-bold {
    font-weight: 700;
}

/* Icones Update et Delete dans les Index des tables de la BDD */

.action-btn {
    padding: 2px 20px;
    border-radius: 10px;
    margin: 0 4px;
    text-decoration: none;
    display: inline-flex;
    transition: background-color 0.3s; /* Animation douce */
}

.action-btn.edit {
    background: white;
    color: #000000;
}

.action-btn.edit:hover {
    background-color: #a0a0a0;
}

.action-btn.delete {
    background: #E10600;
    color: white;
}

.action-btn.delete:hover {
    background-color: #fdbcba;
}

/* DASHBOARD Mettre en fond différent les éléments désactivés dans les INDEX des tables */
.row-desactive {
    background-color: rgba(255, 0, 0, 0.219)
}

/* TABLE GP Résultats */
/* colonne du nom du GP */
.dashboard-table th.width-gp-hidden,
.dashboard-table td.width-gp-hidden {
    width: 20px;
}

/* Largeur de la colonne pour révéler résultats */
.dashboard-table th.width-reveal-gp,
.dashboard-table td.width-reveal-gp {
    width: 70px;
}

/* Pour DNF DNS DSQ */
.dashboard-table th.width-3-letters,
.dashboard-table td.width-3-letters {
    width: 40px;
}

@media screen and (max-width: 700px) {
    .dashboard-table th.width-3-letters,
    .dashboard-table td.width-3-letters {
        width: 30px;
    }
}

/* Colonne noms des pilotes et teams */
.width-gp-points-main {
    width: 25%;
}

/* Table GP Pole & Fastest Lap / Table Pénalités */

/* Pour les noms des GP */
.dashboard-table th.name-gp-verylong,
.dashboard-table td.name-gp-verylong {
    width: 30%;
}

/* Pour les chronos */
.dashboard-table th.width-chrono,
.dashboard-table td.width-chrono {
    width: 100px;
}

.badge-purple-dashboard {
    background: #8e44ad;
    color: white;
    padding: 0px 4px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Table Catégories */
/* Colonne active / desactive */
.dashboard-table th.status,
.dashboard-table td.status {
    width: 100px;
}

.preview-color {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 9px;
    background-color: var(--preview-color);
    vertical-align: middle;
}

/* Table Pays */
/* Largeur de la colonne pour révéler résultats */
.dashboard-table th.width-code,
.dashboard-table td.width-code {
    width: 80px;
}

/* Table Teams */
.dashboard-table th.teams-color,
.dashboard-table td.teams-color {
    width: 100px;
}

.dashboard-table th.teams-logo,
.dashboard-table td.teams-logo {
    width: 110px;
}

.preview-logo {
    width: auto;
    max-width : 110px;
    height: 22px;
    vertical-align: middle;
}

/* Message succès ou échec après une requete du CRUD */

.msg-success {
    text-align: center;
    background: #66fd93;
    color: #000000;
    margin: 40px;
    padding: 10px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-weight: bold;
}

.msg-error {
    text-align: center;
    background: #E10600;
    margin: 40px;
    padding: 10px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-weight: bold;
}

/* Formulaires Create & Update, les Select pages Classements ... */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: white;
}

.form-group input {
    width: 100%;
    /* padding: 12px; */
    border-radius: 10px;
    border: none;
    background: #323245;
    color: white;
    font-size: 1rem;
}

.form-group select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: #323245;
    color: white;
    font-size: 1rem;
}

.form-group select#season_filter,
.form-group select#category_filter,
.form-group select#circuit_filter
 {
    border-radius: 20px;
    background: #E10600;
}


/* Checkbox pour supprimer la couleur dans la table Teams UPDATE */
.form-group input[type="checkbox"] {
    width: auto;
    display: inline-block;
    margin-left: 60px;
}

.form-group input:focus,
.form-group select:focus {
    outline: 2px solid white;
}

/* Pour cacher les label côté front mais ne pas enlever le contenu pour l'accessibilité */
.visually-hidden {
    position: absolute;      /* Sort du flux */
    width: 1px;
    height: 1px;             /* Évite impact layout */
    margin: -1px;            /* Cache totalement */
    overflow: hidden;        /* Empêche débordement */
    clip: rect(0, 0, 0, 0);  /* Masque visuellement */
    white-space: nowrap;     /* Évite retour à la ligne */
    border: 0;
    padding: 0;              /* Nettoyage */
}

/* Suppression des flèches natives haut/bas d'un select type number */
/* Chrome, Safari, Edge, Opera */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

/* Pages DELETE */
/* Forme des boutons Supprimer / Annuler */
.h3-delete {
    display: flex;
    justify-content: center ;
}

 .btn, button {
    font-family: 'f1_bold', 'Poppins', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    width: 100%;
    font-size: 1rem;
    padding: 10px;
    background-color: #E10600;
    border-radius: 10px;
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s; /* Animation douce */
}

.delete-actions {
    display: flex;
    justify-content: space-around;
}

.annule-width {
    display: flex;
}

.annule-width,
.delete-width {
    width: 40%;
}

.btn.red:hover {
    background-color: #fdbcba;
    color : white;
}

.btn.black {
    text-align: center;
}

.black {
    background: white;
    color: #000000;
}

.btn.black:hover {
    background-color: #a0a0a0;
    color: #000000;
}

.btn-reveal-gp {
    width: 60px;
    font-size: 0.85rem;
    padding: 2px;
    border-radius: 10px;
    border: none;
    color: #000000;
    background-color: white;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s; /* Animation douce */
}

.btn-reveal-gp:hover {
    background-color: #a0a0a0;
}

.btn-reveal-gp-open {
    background-color: #E10600;
    color: white;
}

.btn-reveal-gp-open:hover {
    background-color: #fdbcba;
}

/* Page Classements ... */

/* Mise en forme des titres des pages Classements, Palmarès et Circuits */

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background: #000000;
    padding: 12px 16px;
    margin: 40px 0px 10px;
    border-radius: 10px;

    --fade-dir: to bottom;

    background-image:
        linear-gradient(var(--fade-dir),
            transparent 00%,
            #15151E 100%
        ),
        repeating-linear-gradient(
            135deg,           
            rgba(255,255,255,0.05) 0 40px,   
            transparent 40px 45px,       
            rgba(255,255,255,0.05) 45px 85px,
            transparent 85px 200px,
            rgba(255,255,255,0.05) 200px 230px,
            transparent 230px 235px,       
            rgba(255,255,255,0.05) 235px 265px,
            transparent 265px 400px
        );
}

/* Réutilisé dans le dashboard mais avec margin spécifique */
.page-header-dashboard {
    margin: 10px 0px 10px;
}

.page-header h1 {
    margin: 0;
    color: white;
    font-size: 1.6rem;
}

.page-header .last-update {
    margin: 0;
    margin-left: auto;
    color: #b8bbc0;
    font-size: 0.85rem;
}

.page-header-dashboard-subtitle-right {
    margin: 0;
    margin-left: auto;
    color: #b8bbc0;
    font-size: 0.85rem;
}

/* SELECT de la page Classements pour SEASONS */

.select-wrapper {
    position: relative;
    display: inline-block;
}

/* Select */
.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    font-family: 'Titillium Web', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;

    color: #d4d7dd;
    background-color: #000000;

    padding: 0.5rem 2.2rem 0.5rem 0.75rem;
    border: 1px solid #2c2f36;
    border-radius: 6px;

    cursor: pointer;
}

/* Icône Font Awesome */
.select-wrapper::after {
    content: "\f078"; /* fa-chevron-down */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;

    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);

    pointer-events: none;
    color: #d4d7dd;
    font-size: 0.75rem;
}

/* Bordure des titles h2 de chaque catégorie */

.category-title.has-content {
    margin-top: 80px ;
    position: relative;
    padding: 5px 40px;
    color: white;
    font-size: 1.85rem;
    font-weight: 900;

    border-top: 6px solid var(--category-color, #E10600);
    border-right: 6px solid var(--category-color, #E10600);
    border-top-right-radius: 16px;

    overflow: hidden;
}

.category-title.has-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        color-mix(in srgb, var(--category-color, #E10600) 40%, transparent),
        transparent 90%
    );
    z-index: 0;
}

/* Nom de la catégorie F1 F2 ... */
.category-title .category-name {
    font-size: 1.85rem;
    font-weight: 900;
}

/* Pour réduire l'espace verticale si il y a un retour à la ligne */
/* Présent aussi dans style900px */
.category-title {
    line-height: 0.8;
}

/* Saison */
.category-title .season-title {
    font-size: 1.25rem;
    font-weight: 400;
    margin-left: 40px;
    opacity: 0.85;
}

/* Videogame + platform */
.category-title .category-extra {
    display: inline-block;
    margin-left: 40px;
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.6;
    white-space: nowrap;
}

/* Le texte passe au-dessus du fond */
.category-title > * {
    position: relative;
    z-index: 1;
}

/* Badges 1 / 2 / 3 ... */
.badge {
    padding: 0px 6px;
    border-radius: 5px;
    font-weight: bold;
    min-width: 15px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dashboard-table th.badge-width,
.dashboard-table td.badge-width {
    width: 40px;
    text-align: center;
    vertical-align: middle;
}

/* Podiums */
.badge-gold { background: #ffd700; color: #403600; }
.badge-silver { background: #c0c0c0; color: #363636; }
.badge-bronze { background: #cd7f32; color: #482D11;; }

/* Positions 4+ */
.badge-normal { background: #525274; color: #d4d7dd;; }

/* Colonne Pilote */
.driver-cell {
    position: relative;
    overflow: hidden;
}

/* Dégradé : couleur définie via la variable CSS de la table teams.color */
.driver-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to left,
        color-mix(in srgb, var(--team-color) 100%, transparent) 0%,
        color-mix(in srgb, var(--team-color) 0%, transparent) 70%
    );
    z-index: 1;
}

.driver-content {
    position: relative;
    z-index: 2;
    padding-left: 4px;
    display: flex;
    align-items: center;
}

.drivers-teams-flag {
    height: 12px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

/* colonne Equipe */

.team-cell {
    background-color: var(--team-color, transparent);
    background-image: var(--team-logo, none);
    background-repeat: no-repeat;
    background-position: right -20px center;
    background-size: 160px auto;
    height: auto;
}

.team-name {
    position: relative;
    z-index: 1;
}

/* Colonne Pilote */
.drivers-table td.driver-cell,
.drivers-table th:nth-child(2) {
    width: 20%;
}

/* Colonne Équipe */
.drivers-table td.team-cell,
.drivers-table th:nth-child(3) {
    width: 20%;
}

.drivers-table .driver-name,
.drivers-table .team-name,
.teams-table .teams-table-team-name,
.modal-gp-results-table .driver-name,
.modal-gp-results-table .team-name {
    text-shadow:     
        0 0 2px rgba(0,0,0,0.7);
}

/* Colonne Points */
.drivers-table tbody td:nth-child(4) {
    font-weight: 700;
}

/* Alignement à gauche du contenu des colonnes */
.text-left {
    text-align: left;
}

/* Classement Equipes uniquement */
.teams-team-cell {
    position: relative;
    overflow: hidden;
}

.team-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to left,
        color-mix(in srgb, var(--team-color) 100%, transparent) 40%,
        color-mix(in srgb, var(--team-color) 0%, transparent) 90%
    );
    z-index: 1;
}

.team-logo-bg {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    height: auto;
    width: 160px;
    z-index: 2;
}

.team-content {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    padding-left: 4px;
}

/* Colonne Équipe */
.teams-table td.team-cell,
.teams-table th:nth-child(2) {
    width: 40.2%;
}

@media screen and (max-width: 1000px) {
    .teams-table td.team-cell,
    .teams-table th:nth-child(2) {
        width: 48%;
    }
}

/* Colonne Points */
.teams-table tbody td:nth-child(3) {
    font-weight: 700;
}

/* Tableaux Pénalités uniquement */

.penalties-table {
    width: 100%;
    table-layout: fixed; /* IMPORTANT pour forcer les widths */
}

/* GP */
.penalties-table th:nth-child(1),
.penalties-table td:nth-child(1) {
    width: 25%;
}

/* Pilote */
.penalties-table th:nth-child(2),
.penalties-table td:nth-child(2) {
    width: 20%;
}

/* Équipe */
.penalties-table th:nth-child(3),
.penalties-table td:nth-child(3) {
    width: 20%;
}

/* Pénalité (points) */
.penalties-table th:nth-child(4),
.penalties-table td:nth-child(4) {
    width: 10%;
}

.penalties-table tbody td:nth-child(4) {
    font-weight: 700;
}

/* Commentaire */
.penalties-table th:nth-child(5),
.penalties-table td:nth-child(5) {
    width: 25%;
}


/* Tableaux Résultats GP : Top 3 + PP + FL de la Saison uniquement */
 
/* Circuit */
.gp-season-table th:nth-child(2),
.gp-season-table td:nth-child(2) {
    width: 20%;
}

.country-code {
    opacity: 0.7;
    margin-left: 4px;
}

.gp-row {
    cursor: pointer;
    transition: background 0.2s ease;
}

.gp-row:hover {
    background: rgba(255,255,255,0.05);
}


/* Liste des GP */


.gp-title {
    margin-bottom: 0;
}

.gp-subtitle {
    font-size: 0.85rem;
    margin: 0;
    color: #b8bbc0;
}


/* --- Modal dynamique AJAX pour Afficher les résultats complets --- */
.gp-modal {
    display: none; /* caché par défaut */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0,0,0,0.5); /* fond semi-transparent */
    padding-top: 60px;
}

.gp-modal-content {
    background-color: #15151E;
    margin: 5% auto;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease;
}

.gp-modal-close {
    padding-left: 10px;
    color: #aaa;
    float: right;
    font-size: 1.75rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.gp-modal-close:hover {
    color: #000;
}

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

/* --- Table inside modal --- */
.gp-details-container .dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.gp-details-container .dashboard-table th,
.gp-details-container .dashboard-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.gp-details-container .dashboard-table th {
    background-color: #f4f4f4;
    font-weight: 600;
}

.gp-details-container .dashboard-table tbody tr:hover {
    background-color: #f1f1f1;
}

.gp-details-container h2, 
.gp-details-container h3 {
    margin-top: 15px;
    margin-bottom: 10px;
}

.gp-details-container p {
    margin: 5px 0;
}

/* Bordure du title des Résultats Complets du GP */

.modal-gp-title.has-content {
    margin-top: 0px ;
    position: relative;
    padding: 5px 40px;
    color: white;
    font-size: 1.25rem;
    font-weight: 900;

    border-top: 6px solid var(--category-color, #E10600);
    border-right: 6px solid var(--category-color, #E10600);
    border-top-right-radius: 16px;

    overflow: hidden;
}

.modal-gp-title.has-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        color-mix(in srgb, var(--category-color, #E10600) 40%, transparent),
        transparent 90%
    );
    z-index: 0;
}

/* Le texte passe au-dessus du fond */
.gp-title-text-modal {
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

.gp-title-text-modal img,
.gp-title-text-modal i {
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* Réduire l'espace vertical des lignes Pole Position et Fastest Lap */
.modal-pp-fl {
    margin: 0;
    padding: 5px 5px 0px 30px;
}

/* Tableau des Résultats du GP */

/* Pilote */
.modal-gp-results-table th:nth-child(2),
.modal-gp-results-table td:nth-child(2) {
    width: 35%;
}

/* Équipe */
.modal-gp-results-table th:nth-child(3),
.modal-gp-results-table td:nth-child(3) {
    width: 35%;
}

/* Page Palmarès et Circuits pour effectuer le tri par colonne en Javascript */

table.sortable th {
    cursor: pointer;
    position: relative;
    padding-bottom: 20px;
}

/* Centrer verticalement contenu du thead */
table.sortable th span {
    display: flex;
    align-items: center;
}

/* Créer une fausse deuxième ligne avec ::before */
table.sortable th::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
}

/* Flèches à gauche pour la colonne "Pilote" (2ème colonne) */
table.sortable th:nth-child(2)::after {
    left: 15px;
    transform: none;
}

table.sortable th::after {
    content: "⇅";
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.4;
    z-index: 1;
}

table.sortable th.asc::after {
    content: "▲";
    opacity: 1;
}

table.sortable th.desc::after {
    content: "▼";
    opacity: 1;
}

/* no-sort : Supprime les flèches de tri et garde le curseur de la souris par défaut */
table.sortable th.no-sort {
    cursor: default;
}

table.sortable th.no-sort::after {
    content: none;
}

/* Met en gras la colonne triée */
.highlight-column {
    font-weight: 700;
}

/* Palmarès Pilotes + Equipes - subtitle et thead responsive */
.label-aria {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

.table-th-responsive th.th-responsive span {
    display: none;
    white-space: nowrap;
}

.gp-subtitle span {
    display: none;
}

@media (min-width: 901px) {
    .table-th-responsive th.th-responsive .label-long {
        display: inline;
    }

    .gp-subtitle .label-long {
        display: inline;
    }
}

@media (min-width: 701px) and (max-width: 900px) {
    .table-th-responsive th.th-responsive .label-medium {
        display: inline;
    }

    .gp-subtitle .label-medium {
        display: inline;
    }
}

@media (max-width: 700px) {
    .table-th-responsive th.th-responsive .label-short {
        display: inline;
    }

    .gp-subtitle .label-short {
        display: inline;
    }
}

/* Palmarès Pilotes */

/* Tailles des colonnes */

/* 3 colonnes : Champions + Vice-Champions + Troisièmes */
.palmares-drivers-table th:nth-child(3),
.palmares-drivers-table td:nth-child(3),
.palmares-drivers-table th:nth-child(4),
.palmares-drivers-table td:nth-child(4),
.palmares-drivers-table th:nth-child(5),
.palmares-drivers-table td:nth-child(5) {
    width: 8%;
}

/* 2 colonnes : Victoires + Podiums */
.palmares-drivers-table th:nth-child(6),
.palmares-drivers-table td:nth-child(6),
.palmares-drivers-table th:nth-child(7),
.palmares-drivers-table td:nth-child(7) {
    width: 10%;
}

/* Colonne : GP */
.palmares-drivers-table th:nth-child(8),
.palmares-drivers-table td:nth-child(8) {
    width: 15%;
}

/* Colonne : Points */
.palmares-drivers-table th:nth-child(9),
.palmares-drivers-table td:nth-child(9) {
    width: 15%;
}

.icon-champion {
    color: #ffd700;
}

.icon-second {
    color: #c0c0c0;
}

.icon-third {
    color: #cd7f32;
}

/* Page Circuits */

.selected-circuit,
.selected-statsdrivers {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selected-circuit img.circuit-flag,
.selected-statsdrivers img.statsdrivers-flag,
.gp-title-text-modal img.circuit-flag {
    width: 32px;
    border-radius: 4px;
    height: auto;
}

/* Chronos avec Badge violet */
.badge-purple {
    background: #8e44ad;
    color: white;
    padding: 0px 8px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
}

.circuit-title,
.statsdrivers-title {
    font-size: 1.5rem;
}


/* TOP 10 Tailles des colonnes*/

/* Pilote */
.circuits-top10-table th:nth-child(2),
.circuits-top10-table td:nth-child(2) {
    /* width: 25%; */
}

/* Chrono */
.circuits-top10-table th:nth-child(3),
.circuits-top10-table td:nth-child(3) {
    width: 20%;
}

/* Type */
.circuits-top10-table th:nth-child(4),
.circuits-top10-table td:nth-child(4) {
    width: 10%;
}

/* Catégorie */
.circuits-top10-table th:nth-child(5),
.circuits-top10-table td:nth-child(5) {
    width: 10%;
}

/* Saison */
.circuits-top10-table th:nth-child(6),
.circuits-top10-table td:nth-child(6) {
    width: 10%;
}

/* Console */
.circuits-top10-table th:nth-child(7),
.circuits-top10-table td:nth-child(7) {
    /* width: 20%; */
}

/* COURSES DISPUTEES */
.total-row {
    font-weight: bold;
}

/* CIRCUITS CLASSEMENT PILOTES */
/* Tailles des colonnes */

/* 5 colonnes : GP + Victoires + Podiums + PP + FL */
.circuits-drivers-table th:nth-child(3),
.circuits-drivers-table td:nth-child(3),
.circuits-drivers-table th:nth-child(4),
.circuits-drivers-table td:nth-child(4),
.circuits-drivers-table th:nth-child(5),
.circuits-drivers-table td:nth-child(5),
.circuits-drivers-table th:nth-child(6),
.circuits-drivers-table td:nth-child(6),
.circuits-drivers-table th:nth-child(7),
.circuits-drivers-table td:nth-child(7) {
    width: 13%;
}


/* Bouton retour en haut */
#scrollToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: white;
    color: black;
    font-size: 1.125rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

/* Apparition */
#scrollToTop.show {
    opacity: 0.7;
    visibility: visible;
}

/* Hover desktop */
#scrollToTop:hover {
    opacity: 0.9;
    transform: translateY(-3px);
}

/* Tableaux des Stats Pilotes */

/* Header avec Nom du pilote */

.page-header.has-content.header-statsdrivers {
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: 0; 
}

/* Nom de la catégorie */
.category-title.has-content.category-title-statsdrivers {
    margin: 20px 0px 0px 0px;
}

/* Forme des tableaux */
.table-responsive.statsdrivers-table table {
    margin-bottom : 20px;
    }

/* Colonne Saison & Jeu vidéo */
.statsdrivers-table td:nth-child(1),
.statsdrivers-table th:nth-child(1) {
    width: 140px;
    padding-left: 10px;
}

/* Colonne Jeu */
/* .statsdrivers-table td:nth-child(2),
.statsdrivers-table th:nth-child(2) {
    width: 100px;
} */

/* Colonne Équipe */
.statsdrivers-table td.team-cell,
.statsdrivers-table th:nth-child(2) {
    width: 20%;
}

/* Colonne Position */
.statsdrivers-table td:nth-child(3),
.statsdrivers-table th:nth-child(3) {
    width: 60px;
}

/* Colonne Points */
.statsdrivers-table td:nth-child(4),
.statsdrivers-table th:nth-child(4) {
    width: 10%;
}

/* Colonne GP */
.statsdrivers-table td:nth-child(5),
.statsdrivers-table th:nth-child(5) {
    width: 8%;
}

.season-cell .statsdrivers-videogame {
    font-size: 0.85rem;
}


/* Dégradé : couleur définie via la variable CSS de la table teams.color */
.team-cell-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to left,
        color-mix(in srgb, var(--team-color) 100%, transparent) 0%,
        color-mix(in srgb, var(--team-color) 0%, transparent) 70%
    );
    z-index: 1;
}

.statsdrivers-table .team-name {
    text-shadow:     
        0 0 2px rgba(0,0,0,0.7);
}

@media screen and (min-width: 701px) and (max-width: 900px) {
    /* Réduction taille du texte des totaux dans le tfoot */
    .dashboard-table tfoot td.tfoot-very-small-text {
        font-size: 0.875rem;
    }
}

/* .driver-name a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    border-radius: 10px;
}

.driver-name a:hover {
    background-color: color-mix(in srgb, var(--category-color, #E10600) 60%, transparent);;
    border-radius: 10px;
} */

/* 1. La cellule devient entièrement cliquable partout */
.driver-cell.standings-page,
.driver-cell.palmares-page,
.season-cell.statsdrivers-page {
    position: relative;
    cursor: pointer;
}

/* 2. Le lien occupe tout l'espace de la case de manière invisible pour le clic */
.driver-cell.standings-page .driver-cell-link,
.driver-cell.palmares-page .driver-cell-link,
.season-cell.statsdrivers-page .season-cell-link {
    color: inherit;
    text-decoration: none;
}
.driver-cell.standings-page .driver-cell-link::after,
.driver-cell.palmares-page .driver-cell-link::after,
.season-cell.statsdrivers-page .season-cell-link::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2; /* S'assure que le clic couvre aussi le drapeau et le fond */
}

/* 3. Style de base du nom */
.driver-cell.standings-page .driver-name a,
.driver-cell.palmares-page.driver-name a,
.season-cell.statsdrivers-page a {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    border-radius: 10px;
    padding: 0px 4px;
}

/* 4. Au survol de la CELLULE (td), on applique le fond sur le LIEN (a) */
.driver-cell.standings-page:hover .driver-name a,
.driver-cell.palmares-page:hover.driver-name a,
.season-cell.statsdrivers-page:hover a {
    background-color: color-mix(in srgb, var(--category-color, #E10600) 60%, transparent);
    border-radius: 10px;
}

/* Pour que les ancres des liens fassent apparaitre la page avec un leger décalage vertical */
[id] {
    scroll-margin-top: 10px;
}
