/* ✅ Fond global et mise en page */
body {
    background-color: #13181d;
    font-family: Arial, sans-serif;
    color: #f1f1f1;
    margin: 0;
    padding: 20px;

    /* 🔧 corps en colonne, centré, et scrollable */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    min-height: 100vh;
    /* au lieu de height */
    height: auto;
    overflow-y: auto;
    /* au lieu de hidden */
}


.home-button {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 22px;
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    z-index: 1000;
    overflow: hidden;
    display: inline-block;
    background: none;
    border: none;
    padding: 10px 0;
    cursor: pointer;
}

.home-button::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 200%;
    height: 36px;
    background: url("data:image/svg+xml,%3Csvg width='400' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20 Q 50 50 100 20 T 200 20 T 300 20 T 400 20 V60 H0 Z' fill='rgba(63,89,149,0.6)' stroke='rgba(0,0,0,0.4)' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: cover;
    animation: waveMotion 4s linear infinite;
    z-index: -1;
    transition: transform 0.4s ease;
}

.home-button:hover::after {
    transform: translateY(-10px);
    opacity: 1;
}

@keyframes waveMotion {
    0% {
        background-position-x: 0%;
    }

    100% {
        background-position-x: -200px;
    }
}


.div-header-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    /* centre le bloc horizontalement */
    gap: 20px;
    /* espace entre texte et image */
    margin-bottom: 5px;
    width: 100%;
    text-align: center;
}

.div-header-stats h1 {
    font-size: 28px;
    /* 🔠 agrandir le texte */
    color: #f5f4f0;
    margin: 0;
}

.profile-image-rect {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
    margin-left: 0px;
    /* ✅ pour un léger décalage à droite */
}

#totalRecords {
    color: #FFD700;
    /* 🎨 Jaune or */
    text-decoration: underline;
    /* 🔥 Souligné */
    font-weight: bold;
    cursor: pointer;
    /* 🖱️ Affiche un curseur de lien */
    transition: color 0.2s ease-in-out;
}

#totalRecords:hover {
    color: #FFA500;
    /* 🟠 Orange doré au survol */
}

#totalLikes {
    color: #FFD700;
    /* 🎨 Jaune or */
    text-decoration: underline;
    /* 🔥 Souligné */
    font-weight: bold;
    cursor: pointer;
    /* 🖱️ Affiche un curseur de lien */
    transition: color 0.2s ease-in-out;
}

#totalLikes:hover {
    color: #FFA500;
    /* 🟠 Orange doré au survol */
}


/* ✅ Conteneur principal centré */
.stats-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    width: 100%;
}


/* ✅ Alignement et centrage des colonnes */
.stats-wrapper {
    display: flex;
    justify-content: center;
    /* ✅ Centre horizontalement */
    align-items: center;
    /* ✅ Centre verticalement */
    gap: 20px;
    max-width: 1200px;
    width: 100%;
    margin: auto;
    padding-top: 30px;
}

/* ✅ Ajustement des colonnes pour un meilleur alignement */
.stats-column {
    flex: 1;
    background: linear-gradient(145deg, #1e2022, #181a1b, #121314);
    /* ✅ Dégradé amélioré */
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.6),
        /* ✅ Ombre plus marquée en bas */
        inset 0 2px 4px rgba(255, 255, 255, 0.05);
    /* ✅ Légère lumière interne */
    min-height: 525px;
    /* ✅ Alignement en hauteur */
    line-height: 1.2;
    /* Réduit l'espace entre les lignes */
}

.history-column {
    flex: 1;
    background: linear-gradient(145deg, #1e2022, #181a1b, #121314);
    /* ✅ Dégradé amélioré */
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.6),
        /* ✅ Ombre plus marquée en bas */
        inset 0 2px 4px rgba(255, 255, 255, 0.05);
    /* ✅ Légère lumière interne */
    min-height: 450px;
    /* ✅ Assure un alignement en hauteur */
}


/* ✅ Alignement du titre et des tableaux */
.stats-container h1,
.history-container h1 {
    font-size: 20px;
    color: #ffcc00;
    margin-bottom: 15px;
}

/* ✅ Réduction de la hauteur du tableau d'historique */
.history-container {
    max-height: 400px;
    overflow-y: auto;
}

/* ✅ Ajustement des tableaux */
.stats-table,
.history-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* ✅ Conteneur de la meilleure partie et historique */
.history-container,
.best-game-container {
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 15px;

    /* ✅ Ajout d'un contour en relief */
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Bordure fine */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5),
        inset 1px 1px 3px rgba(255, 255, 255, 0.1);
    /* Ombre externe + interne légère */
}


/* ✅ Lignes alternées */
.history-table tr:nth-child(even) {
    background-color: #333;
}

/* ✅ Ajustement des tableaux */
.stats-table,
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}


/* ✅ Lignes alternées */
.history-table tr:nth-child(even),
.stats-table tr:nth-child(even) {
    background-color: #6d2222;
}


/* ✅ Ajustement des tailles de texte */
h1,
h2 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 15px;
}

.song-count {
    cursor: pointer;
    text-decoration: underline;
}

/* ✅ Titre principal */
.stats-container h1 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #ffcc00;
}

/* ✅ Tableau des statistiques */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

/* ✅ En-têtes du tableau */
.stats-table thead {
    background-color: #444;
    color: white;
}

/* ✅ Titres des colonnes */
.stats-table th,
.history-table th {
    background: #444;
    padding: 10px;
    font-size: 16px;
    text-transform: uppercase;
}

/* ✅ Lignes des stats */
.stats-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

/* ✅ Augmente l'espace entre les lignes du tableau */
.stats-table td,
.stats-table th {
    padding: 15px;
    /* Augmente légèrement l'espacement intérieur */
    line-height: 1.2;
    /* Augmente la hauteur des lignes */
}

/* ✅ Ajuste aussi la hauteur des lignes du tableau */
.stats-table tr {
    height: 40px;
    /* Augmente l’espace vertical entre chaque ligne */
}


/* ✅ Lignes alternées */
.history-table tr:nth-child(even),
.stats-table tr:nth-child(even) {
    background-color: #333;
}

/* ✅ Bouton de retour */
.back-button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 15px;
    background-color: #1DB954;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.back-button:hover {
    background-color: #1ed760;
}


/* ✅ Conteneur principal de la chanson la plus rapide */
tr#fastestTrackContainer {
    background-color: #222;
    border-radius: 10px;
    color: white;
    text-align: center;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    /* 🔥 Aligne en ligne pour éviter que ça bouge */
    align-items: center;
    justify-content: space-between;
    /* ✅ Équilibre bien les éléments */
    padding: 10px;
    width: 100%;
    max-width: 500px;
    /* ✅ Empêche un agrandissement excessif */
    margin: auto;
}

/* ✅ Conteneur principal */
.fastest-track-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* ✅ Fixe bien la position de la cover */
    gap: 15px;
    width: 100%;
}

/* ✅ La cover reste fixe et centrée */
#fastestCover {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease-in-out;
    display: block;
    max-width: 120px;
    max-height: 120px;
    flex-shrink: 0;
    /* 🔥 Empêche l'image de rétrécir */
}

/* ✅ Conteneur du texte pour éviter que ça bouge */
.fastest-track-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: calc(100% - 140px);
    /* 🔥 Garde de la place pour la cover */
    min-width: 0;
    /* ✅ Évite que le texte force la mise en page */
}

/* ✅ Texte bien calé et limité en largeur */
p#fastestTrackTitle {
    font-size: 15px;
    font-weight: bold;
    max-width: 200px;
    /* ✅ Limite la largeur du titre */
    -webkit-line-clamp: 2;
    /* 🔥 Coupe après 2 lignes max */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}



/* ✅ Décale uniquement le texte "🚀 Chanson la plus rapide" */
.fastest-track-label {
    padding-left: 20px;
    /* 🔥 Décale vers la droite */
    display: block;
    /* ✅ S'assure que la mise en forme reste correcte */
    font-weight: bold;
}


.stats-table td:first-child {
    white-space: pre-line;
    /* Permet les retours à la ligne */
    text-align: left;
    /* Alignement à gauche pour lisibilité */
}


#fastestCover:hover {
    transform: scale(1.1);
}

.fastest-track-info {
    display: flex;
    flex-direction: column;
}


/* ✅ Tableau de l'historique */
.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

/* ✅ Style des en-têtes */
.history-table thead {
    background-color: #444;
    color: white;
}

/* ✅ Cellules */
.history-table th,
.history-table td {
    padding: 10px;
    font-size: 14px;
    border-bottom: 1px solid #555;
}

/* ✅ Lignes alternées pour meilleure lisibilité */
.history-table tr:nth-child(even) {
    background-color: #333;
}

/* ✅ Style des boutons Play */
.play-btn {
    background-color: #1db954;
    /* Vert Spotify */
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.play-btn:hover {
    background-color: #1aa34a;
}


/* ✅ Fond assombri pour le modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

/* ✅ Limite la largeur du modal */
.modal-container {
    background: #222;
    width: 50%;
    /* Fait en sorte qu'il ne prenne que la moitié de l'écran */
    max-width: 600px;
    /* Empêche qu'il devienne trop large sur grands écrans */
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: fadeIn 0.3s ease-in-out;
    padding: 10px;
}

/* ✅ En-tête du modal */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #333;
    color: #ffcc00;
}

/* ✅ Limitation du titre pour éviter l'agrandissement */
.modal-header h2 {
    margin: 0;
    font-size: 16px;
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ✅ Bouton de fermeture */
.modal-header .close-btn {
    background: none;
    border: none;
    color: #ffcc00;
    font-size: 22px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-header .close-btn:hover {
    color: #ffd633;
}


/* ✅ Ajout d'un défilement vertical pour éviter les débordements */
.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* ✅ S'assure que le tableau ne déborde pas */
.song-table {
    width: 100%;
    table-layout: fixed;
    /* Garde les colonnes équilibrées */
    border-collapse: collapse;
    margin-top: 5px;
}

/* ✅ Fixe la largeur des colonnes et empêche les débordements */
.song-table th,
.song-table td {
    max-width: 150px;
    /* Ajustable si besoin */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-wrap: break-word;
    padding: 8px;
    text-align: left;
}

/* ✅ En-têtes de tableau */
.song-table th {
    background: #444;
    color: #ffcc00;
    padding: 10px;
    font-size: 14px;
    /* Réduction de la police */
}

/* ✅ Cellules du tableau */
.song-table td {
    background: #2a2a2a;
    color: #f1f1f1;
    padding: 8px;
    border: 1px solid #555;
    font-size: 12px;
    /* Réduction de la police pour éviter de prendre trop de place */
    white-space: nowrap;
    /* Empêche les retours à la ligne */
    overflow: hidden;
    text-overflow: ellipsis;
    /* Ajoute "..." si le texte est trop long */
}

/* ✅ Lignes alternées */
.song-table tr:nth-child(even) {
    background-color: #333;
}

/* ✅ Animation du modal */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ✅ Effet interactif sur les chansons cliquables */
.clickable-song {
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease-in-out;
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    /* Taille réduite pour éviter l'agrandissement du modal */
}

.clickable-song:hover {
    background: #444;
    transform: scale(1.02);
}

/* ✅ Animation d'affichage du tableau */
.song-table-container {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease-in-out, max-height 0.5s ease-in-out;
}

.song-table-container.active {
    opacity: 1;
    max-height: 600px;
    animation: slideDown 0.3s ease-out;
}

/* ✅ Effet interactif sur le nombre de chansons cliquables */
.song-count {
    cursor: pointer;
    text-decoration: underline;
    color: #ffcc00;
    font-weight: bold;
    transition: color 0.3s ease-in-out, transform 0.2s ease-in-out;
}

.song-count:hover {
    color: #ffd633;
    transform: scale(1.05);
}

/* ✅ Effet de glissement du tableau lorsqu'on ouvre */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ✅ Tableau de la meilleure partie */
.best-game-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

/* ✅ En-tête */
.best-game-table thead {
    background-color: #444;
    color: white;
}

/* ✅ Cellules */
.best-game-table th,
.best-game-table td {
    padding: 10px;
    font-size: 14px;
    border-bottom: 1px solid #555;
}

/* ✅ Lignes alternées */
.best-game-table tr:nth-child(even) {
    background-color: #333;
}



/* ====== Format "MMQ" compact, centré ====== */

/* Colonne globale de la section */
.section-comments {
    max-width: 600px;
    /* colonne étroite (≈ MMQ) */
    width: 100%;
    margin: 24px auto 0;
    /* centrée */
}

/* Liste : ajoute un vrai espacement vertical entre les cartes */
.comments-list {
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
    padding-right: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* au lieu de 8px */
}

/* Formulaire : compact + centrage */
#commentForm {
    display: flex;
    flex-direction: row;
    /* textarea + bouton sur la même ligne */
    align-items: flex-start;
    gap: 8px;
    max-width: 560px;
    width: 100%;
    margin: 8px auto 14px;
    /* centré */
}


/* Textarea (zone d'écriture) */
#commentInput {
    width: 94%;
    /* prend toute la largeur du form */
    max-width: 560px;
    /* même largeur que les commentaires */
    min-height: 70px;
    max-height: 140px;

    background: linear-gradient(180deg, #121216 0%, #1a1a1f 100%);
    color: #f2f2f2;
    font-size: 15px;
    line-height: 1.45;
    font-family: inherit;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;

    padding: 14px 16px;
    /* même padding que .comment-item */
    resize: vertical;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 2px 10px rgba(0, 0, 0, 0.35);
    margin: 0 auto;
    /* centrage comme les cartes */
    display: block;
    /* force l’alignement comme un bloc */
}

#commentForm {
    display: flex;
    flex-direction: column;
    /* textarea au-dessus, bouton en dessous */
    gap: 12px;
    max-width: 560px;
    margin: 8px auto 20px;
}

/* Bouton Publier centré et plus en évidence */
#commentForm button {
    align-self: center;
    /* ➜ centré horizontalement */
    background: #1DB954;
    /* vert Spotify */
    color: #fff;
    font-size: 15px;
    /* un peu plus gros */
    font-weight: 700;
    padding: 10px 26px;
    /* plus large */
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
    transition: background .2s ease, transform .1s ease;
}

#commentForm button:hover {
    background: #1aa34a;
    transform: scale(1.05);
}

#commentForm button:active {
    transform: scale(0.97);
}


/* Carte commentaire plus aérée */
.comment-item {
    position: relative;
    padding: 14px 16px;
    /* plus de padding interne */
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(180deg, #181823 0%, #24242c 100%);
    color: #e8e8e8;
    border-radius: 12px;
    font-size: 15px;
    /* police légèrement agrandie */
    line-height: 1.45;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 2px 10px rgba(0, 0, 0, 0.35);
    transition: border-color .2s, box-shadow .2s, transform .06s;
}

.comment-item:hover {
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 4px 14px rgba(0, 0, 0, 0.45);
}

/* Mise en avant du nouveau commentaire publié */
.comment-item--new {
    border-color: #ffd76a;
    box-shadow:
        0 0 0 2px rgba(255, 215, 106, 0.25),
        0 2px 12px rgba(0, 0, 0, 0.45);
    animation: mmqNewPulse 1.2s ease-out 1;
}

@keyframes mmqNewPulse {
    0% {
        box-shadow: 0 0 0 8px rgba(255, 215, 106, 0.35), 0 2px 12px rgba(0, 0, 0, 0.45);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 106, 0), 0 2px 12px rgba(0, 0, 0, 0.45);
    }
}

/* Si autre CSS override le border, augmente un peu la spécificité */
.section-comments .comments-list .comment-item {
    border-width: 1px;
}

/* Avatar cliquable (si entouré d'un <a>) */
.comment-avatar-link {
    display: inline-block;
    margin-right: 10px;
    /* garde l'espacement à droite */
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    /* évite les petits décalages dans un <a> */
}

/* Nom et date : lisibles en fond sombre */
.comment-name {
    font-weight: 700;
    font-size: 15px;
    color: #ffffff;
    text-decoration: none;
    /* pas de soulignement par défaut */
    cursor: pointer;
}

.comment-name:hover {
    text-decoration: underline;
    /* souligne au hover pour montrer que c’est un lien */
    color: #ffd76a;
    /* optionnel : petit effet doré au hover */
}

.comment-date {
    font-size: 13px;
    color: #9aa0a6;
    margin-left: 6px;
}


/* Texte du commentaire : marge + police */
.comment-text {
    margin-top: 6px;
    font-size: 15px;
    /* +1px */
    color: #dddddd;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: background .15s ease, transform .08s ease;
}

.comment-delete::before,
.comment-delete::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}

.comment-delete::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.comment-delete::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.comment-delete:hover {
    background-color: rgba(255, 255, 255, 0.16);
}

.comment-delete:active {
    transform: scale(0.9);
}


/* ✅ Ajustement de la largeur pour mobile */
@media all and (max-width: 800px) {

    .section-comments,
    .comments-list,
    #commentForm {
        max-width: 100vw;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding-left: 12px;
        /* petit padding bord écran */
        padding-right: 12px;
        box-sizing: border-box;
    }

    /* Le textarea prend vraiment toute la largeur disponible */
    #commentInput {
        width: 100%;
        max-width: none;
        /* <-- enlève la limite 560px */
        margin: 0;
        /* pas de centrage */
        box-sizing: border-box;
    }

    /* Les cartes commentaires s’alignent aussi plein écran */
    .comment-item {
        max-width: none;
        margin: 0;
    }

    /* Option: bouton bien centré et large, mais pas full-width */
    #commentForm button {
        align-self: center;
        min-width: 200px;
    }

    a.home-button {
        font-size: 15px;
        display: block;
    }

    /* ✅ Conteneur de la meilleure partie et historique */
    .history-container,
    .best-game-container {
        display: none !important;
    }

    .history-column {
        display: none !important;
    }

    .div-header-stats {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        text-align: center;
    }

    .div-header-stats h1 {
        font-size: 22px;
        /* 🔠 Réduction douce pour mobile */
    }

    .profile-image-rect {
        width: 60px;
        height: 60px;
        margin-left: 0;
        /* 🔄 Supprimer le décalage horizontal sur mobile */
    }


    /* ✅ Conteneur principal */
    .stats-container {
        width: 90%;
        max-width: 360px;
        /* Limite la largeur pour éviter les débordements */
        padding: 10px;
        margin: 0 auto;
    }

    /* ✅ Réduction de la largeur des colonnes */
    .stats-column {
        padding: 10px;
        margin-bottom: 20px;
        width: 100%;
    }

    .stats-table,
    .history-table {
        table-layout: fixed;
        /* Force un format de table fixe */
        width: 100%;
        /* Prend toute la largeur disponible */
        overflow: hidden;
    }

    .stats-table th,
    .stats-table td {
        padding: 8px;
        word-wrap: break-word;
        /* Permet le retour à la ligne des mots trop longs */
        white-space: normal;
        /* Autorise les retours à la ligne */
        text-align: center;
        /* Centre les textes */
    }

    .stats-column {
        width: 100%;
        /* Empêche le débordement */
        overflow-x: auto;
        /* Permet le défilement horizontal si nécessaire */
    }

    .stats-wrapper {
        display: block;
        /* Force l'affichage en bloc pour éviter les débordements */
        width: 100%;
        overflow-x: auto;
    }

    .stats-container {
        padding: 10px;
        margin: 0 auto;
        width: 100%;
        max-width: 360px;
    }

    /* ✅ Réduire l'espace entre les lignes du tableau */
    .stats-table tr {
        height: 35px;
        /* Diminue l'espace vertical entre chaque ligne */
    }

    /* ✅ Ajustement des colonnes pour éviter qu'elles dépassent sur le côté */
    .stats-wrapper {
        flex-direction: column;
        gap: 10px;
    }

    #fastestTrackContainer {
        display: block;
        width: 100%;
        overflow-x: auto;
        margin: 0 auto;
        padding: 5px;
        /* Réduction du padding */
    }

    .fastest-track-content {
        display: flex;
        flex-direction: row;
        /* ✅ Mette en ligne les éléments pour économiser de l'espace vertical */
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        gap: 10px;
        /* ✅ Espace réduit entre l'image et les infos */
    }

    .fastest-track-info {
        max-width: 250px;
        /* ✅ Réduction de la largeur pour éviter l'étirement */
        word-wrap: break-word;
        white-space: normal;
    }

    .fastest-track-label {
        font-size: 0.9rem;
        /* Réduction de la taille de la police */
        margin-bottom: 2px;
        /* ✅ Moins d'espace vertical */
    }

    img#fastestCover {
        max-width: 60px;
        /* ✅ Taille réduite de l'image */
        max-height: 60px;
        margin: 0;
    }

    p#fastestTrackTitle {
        font-size: 0.85rem;
        /* ✅ Taille de texte réduite */
        padding: 2px;
        /* ✅ Moins d'espace vertical */
        margin-left: -100px;
    }

    p#fastestTrackTime {
        font-size: 0.85rem;
        /* ✅ Taille de texte réduite */
        margin-top: 70px;
        margin-left: -90px;
        padding: 2px;
        /* ✅ Moins d'espace vertical */
    }
}
