/* Styles généraux du panneau */
#moderation-panel {
    background-color: #f8f9fa;
    /**    padding: 20px 30px; **/
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    /**    max-width: 1200px; **/
    margin: 40px auto;
}

.mod-header {
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 15px;
    margin-bottom: 0;
}

.mod-header h1 {
    color: var(--dark-purple);
    margin: 0;
    font-size: 1.6em;
}

/* Styles pour la navigation par onglets */
.mod-tabs {
    display: flex;
    /* Supprimer la bordure inférieure ici pour la mettre sur les boutons */
    border-bottom: none;
    margin-bottom: 20px;
    background-color: #e9ecef; /* Fond léger pour le conteneur d'onglets */
    border-radius: 8px; /* Coins arrondis pour le conteneur */
    padding: 5px; /* Espacement interne */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); /* Ombre interne subtile */
}

.tab-button {
    flex-grow: 1; /* Permet aux boutons de prendre l'espace disponible */
    padding: 12px 20px; /* Augmenter le padding */
    font-size: 1.05em; /* Légèrement plus grand */
    font-weight: 600; /* Plus gras */
    color: #495057; /* Couleur de texte plus foncée pour inactif */
    border: none; /* Supprimer la bordure par défaut */
    background-color: transparent; /* Fond transparent par défaut */
    border-radius: 6px; /* Coins arrondis pour les boutons */
    transition: all 0.3s ease; /* Transition plus douce */
    position: relative; /* Pour l'effet de bordure active */
    overflow: hidden; /* Cache le débordement de l'effet */
}

.tab-button:hover {
    background-color: #dee2e6; /* Fond au survol */
    color: #212529; /* Texte plus foncé au survol */
}

.tab-button.active {
    color: white; /* Texte blanc pour l'onglet actif */
    background-color: var(
        --main-purple
    ); /* Couleur principale pour l'onglet actif */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Ombre pour l'onglet actif */
    font-weight: bold;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
}

/* Layout principal en deux colonnes (dans le premier onglet) */
.mod-main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

#mod-left-column,
#mod-right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Listes d'utilisateurs */
.user-list-container h3 {
    margin-top: 0;
    font-size: 1.05em;
    color: #333;
}

.user-list {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.user-list-item {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-list-item:last-child {
    border-bottom: none;
}

.user-list-item:hover {
    background-color: #f0f2f5;
}

.user-list-item.selected {
    background-color: var(--main-purple);
    color: white;
    font-weight: bold;
}

.user-role {
    font-size: 0.8em;
    opacity: 0.7;
}

/* Panneaux d'actions */
.action-panel {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.action-panel h2 {
    margin-top: 0;
    font-size: 1.2em;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.mod-section {
    margin-bottom: 20px;
}

.mod-section:last-child {
    margin-bottom: 0;
}

.mod-section h4 {
    margin-top: 0;
    margin-bottom: 4px;
    font-size: 0.95em;
}

.mod-section p {
    font-size: 0.9em;
    color: #666;
    margin-top: 0;
}

.action-button,
.mod-section select {
    max-width: 100%; /* Changer de width: 100% à max-width: 100% */
    padding: 8px 10px;
    font-size: 0.95em;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.bug-controls {
    display: flex;
    flex-wrap: wrap; /* Permet aux éléments de passer à la ligne si l'espace est insuffisant */
    gap: 10px; /* Espace entre les éléments de filtre */
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f0f2f5;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.bug-controls input[type="text"],
.bug-controls select,
.bug-controls button {
    flex: 1; /* Permet aux éléments de s'étirer et de se réduire */
    min-width: 150px; /* Largeur minimale pour chaque élément */
    box-sizing: border-box; /* S'assure que padding et border sont inclus dans la largeur */
}

/* Ajustement pour le bouton "Appliquer Filtres" */
.bug-controls .action-button {
    flex-grow: 0; /* Empêche le bouton de s'étirer autant que les autres */
    flex-shrink: 0; /* Empêche le bouton de rétrécir */
    min-width: unset; /* Supprime la min-width si non nécessaire */
}


.action-button {
    cursor: pointer;
    background-color: #e9ecef;
    font-weight: bold;
}

.action-button:hover {
    background-color: #dee2e6;
}

/* Zone de danger */
.danger-zone {
    border: 2px solid #d9534f;
    border-radius: 8px;
    padding: 15px;
    background-color: #f2dede;
}

.danger-zone h2,
.danger-zone h4 {
    color: #a94242;
}

.danger-zone button {
    background-color: #d9534f;
    border-color: #d43f3a;
    color: white;
}

.danger-zone button:hover {
    background-color: #c9302c;
}

/* Lien de retour */
.back-link {
    display: inline-block;
    margin-top: 20px;
    text-align: center;
    color: var(--main-purple);
    text-decoration: none;
}

a.action-button {
    background-color: transparent; /* Pas de fond gris */
    border: none; /* Pas de bordure */
    padding: 5px 0; /* Espacement vertical réduit */
    width: auto; /* La largeur s'adapte au texte */
    text-align: left; /* Alignement du texte à gauche */
    color: var(--main-purple); /* Couleur du lien */
    text-decoration: underline; /* On souligne le lien pour la clarté */
    font-weight: normal; /* Police de caractère normale */
}

a.action-button:hover {
    background-color: transparent; /* Pas de changement de fond au survol */
    color: var(--dark-purple); /* Le lien devient plus foncé au survol */
}

.mute-controls {
    display: flex;
    gap: 10px;
}

.mute-controls input {
    flex-grow: 1;
}

/* Styles pour les sous-onglets */
.mod-sub-tabs {
    display: flex;
    border-bottom: 1px solid #dee2e6; /* Bordure plus claire */
    margin-bottom: 20px;
    background-color: #f0f2f5; /* Fond léger pour les sous-onglets */
    border-radius: 6px;
    padding: 3px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.sub-tab-button {
    flex-grow: 1;
    padding: 10px 15px; /* Padding légèrement réduit */
    font-size: 0.95em;
    font-weight: 500;
    color: #6c757d;
    border: none;
    background-color: transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sub-tab-button:hover {
    background-color: #e9ecef;
    color: #343a40;
}

.sub-tab-button.active {
    color: white;
    background-color: var(
        --dark-purple
    ); /* Couleur plus foncée pour le sous-onglet actif */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    font-weight: bold;
}

.sub-tab-content {
    display: none; /* Caché par défaut */
}

.sub-tab-content.active {
    display: block; /* Affiché si actif */
}

.utilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.utility-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease-in-out;
}

.utility-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border-color: var(--main-purple);
}

.utility-card .card-icon {
    font-size: 2em;
    color: var(--main-purple);
    margin-right: 1.5rem;
    width: 40px;
    text-align: center;
}

.utility-card .card-text h3 {
    margin: 0 0 0.25rem 0;
    color: #333;
    font-size: 1.1em;
}

.utility-card .card-text p {
    margin: 0;
    color: #777;
    font-size: 0.9em;
}

/* public/css/moderation.css */

/* --- NOUVEAUX STYLES POUR LES CARTES D'ACTION DB --- */
.database-actions-grid {
    display: grid;
    grid-template-columns: 1fr; /* Une seule colonne pour bien séparer les actions */
    gap: 1.5rem;
    margin-top: 2rem;
}

.action-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.action-card.danger {
    background-color: #fff8f8;
    border-left: 5px solid #e74c3c;
}

.action-card.danger:hover {
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.08);
}

.action-card .card-icon {
    font-size: 2.2em;
    width: 45px;
    text-align: center;
}

.action-card.danger .card-icon {
    color: #e74c3c;
}

.action-card .card-text h3 {
    margin: 0 0 0.4rem 0;
    color: #333;
}

.action-card .card-text p {
    margin: 0;
    color: #666;
    font-size: 0.85em;
}

.action-card .card-action .action-button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.action-card .card-action .action-button:hover {
    background-color: #c0392b;
}

.action-card .card-action .switch {
    margin-right: 1.5rem; /* Aligne l'interrupteur avec les boutons des autres cartes */
}

/* NOUVEAUX STYLES POUR LE TABLEAU DES MOTS INTERDITS ET LE DÉFILEMENT */
#forbidden-words-list {
    max-height: 400px; /* Hauteur maximale avant le défilement */
    overflow-y: auto; /* Ajoute une barre de défilement verticale si le contenu dépasse */
    border: 1px solid #ddd; /* Optionnel: pour mieux visualiser la zone de défilement */
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.forbidden-words-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.forbidden-words-table th,
.forbidden-words-table td {
    border: 1px solid #eee;
    padding: 8px;
    text-align: left;
}

.forbidden-words-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.forbidden-words-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.forbidden-words-table tr:hover {
    background-color: #f1f1f1;
}

.forbidden-words-table td:last-child {
    text-align: center; /* Centre le bouton d'action */
    width: 80px; /* Largeur fixe pour la colonne d'action */
}

/* Styles pour le tableau des logs */
.log-table-container {
    max-height: 500px; /* Hauteur maximale avant le défilement */
    overflow-y: auto; /* Ajoute une barre de défilement verticale si le contenu dépasse */
    border: 1px solid #ddd; /* Optionnel: pour mieux visualiser la zone de défilement */
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

/* --- NOUVEAUX STYLES POUR LA GESTION DES SMILEYS --- */
.form-group {
    margin-bottom: 15px; /* Espace entre les groupes de formulaires */
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.file-upload-group {
    display: flex;
    align-items: center;
    gap: 10px; /* Espace entre le bouton et le nom du fichier */
}

.file-upload-group .action-button {
    width: auto; /* Permet au bouton de s'adapter à son contenu */
    flex-shrink: 0; /* Empêche le bouton de rétrécir */
}

.file-upload-group #selected-file-name {
    flex-grow: 1; /* Permet au texte de prendre l'espace restant */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #555;
}

.smiley-preview-container {
    margin-top: 10px;
    margin-bottom: 15px;
}

.smiley-list-container {
    max-height: 350px; /* Hauteur maximale avant le défilement */
    overflow-y: auto; /* Ajoute une barre de défilement verticale si le contenu dépasse */
    border: 1px solid #ddd;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.smiley-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.smiley-table th,
.smiley-table td {
    border: 1px solid #eee;
    padding: 8px;
    text-align: left;
}

.smiley-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.smiley-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.smiley-table tr:hover {
    background-color: #f1f1f1;
}

.smiley-table td:last-child {
    text-align: center; /* Centre le bouton d'action */
    width: 120px; /* Largeur fixe pour la colonne d'action */
}

.smiley-preview {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.smiley-table .action-button {
    padding: 5px 8px;
    font-size: 0.8em;
    margin: 0 2px;
    width: auto;
}

.log-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.log-table th,
.log-table td {
    border: 1px solid #eee;
    padding: 6px 8px; /* Adjusted padding for visual density */
    text-align: left;
    vertical-align: top; /* Align content to top */
    font-size: 0.9em; /* Slightly smaller font size */
}

.log-table th {
    background-color: #e9ecef; /* Slightly darker header background */
    font-weight: bold;
}

.log-table tr:nth-child(even) {
    background-color: #f2f2f2; /* More distinct light gray for even rows */
}

.log-table tr:hover {
    background-color: #e2e6ea; /* Hover effect */
}

/* Styles pour les niveaux de log */
.log-level-trace {
    color: #adb5bd; /* Light Gray */
}

.log-level-debug {
    color: #6c757d; /* Gray */
}

.log-level-info {
    color: #28a745; /* Green */
    font-weight: bold;
}

.log-level-warn {
    color: #ffc107; /* Yellow */
    font-weight: bold;
}

.log-level-error {
    color: #dc3545; /* Red */
    font-weight: bold;
}

.log-level-fatal {
    color: #8b0000; /* Darker Red for Fatal */
    font-weight: bold;
}

.log-context p {
    margin: 0; /* Remove default paragraph margins */
    font-size: 0.9em;
    color: #555;
}

.log-context strong {
    color: #333;
}

/* Styles for sortable table headers */
.log-table th[data-sort-by] {
    cursor: pointer;
    position: relative;
    padding-right: 25px; /* Make space for the arrow */
}

.log-table th .sort-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.log-table th[data-sort-by]:hover .sort-arrow {
    opacity: 0.7;
}

.log-table th.sorted-asc .sort-arrow::before {
    content: '▲'; /* Up arrow for ascending */
    opacity: 1;
}

.log-table th.sorted-desc .sort-arrow::before {
    content: '▼'; /* Down arrow for descending */
    opacity: 1;
}

.log-table th:not(.sorted-asc):not(.sorted-desc) .sort-arrow::before {
    content: '◆'; /* Diamond or similar for unsorted */
}

/* Filter row styles */
.filter-row td {
    padding-top: 5px;
    padding-bottom: 5px;
    border-top: 1px solid #eee;
}

.filter-row input[type='text'] {
    width: 100%;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
    font-size: 0.9em;
}

/* Truncation for long content in table cells */
.log-table td.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px; /* Adjust as needed for different columns */
}

/* Styles spécifiques pour les textareas du MotD */
textarea#current-motd-display,
textarea#new-motd-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    min-height: 80px;
    resize: vertical;
    box-sizing: border-box;
}

textarea#current-motd-display {
    background-color: #e9ecef; /* Un fond légèrement différent pour le message actuel */
    color: #495057;
}

#feedback-message {
    min-height: 20px; /* Reserve space even when empty */
    margin-top: 15px;
    font-weight: bold;
    text-align: center;
}



.view-game-btn,
.delete-game-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.view-game-btn {
    color: var(--main-purple);
}

.view-game-btn:hover {
    color: white;
    background: linear-gradient(
        135deg,
        var(--main-purple) 0%,
        var(--dark-purple) 100%
    );
    transform: translateY(-2px);
}

.delete-game-btn {
    color: #ef4444;
}

.delete-game-btn:hover {
    color: white;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    transform: translateY(-2px);
}

.action-button {
    padding: 10px 20px;
    margin-right: 10px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(
        135deg,
        var(--main-purple) 0%,
        var(--dark-purple) 100%
    );
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(130, 5, 177, 0.3);
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(130, 5, 177, 0.4);
}

.action-button i {
    margin-right: 5px;
}

.action-button.export-btn {
    padding: 8px 12px;
    font-size: 13px;
    width: auto;
    display: inline-block;
}

.player-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.player-card p {
    margin: 5px 0;
}

/* Enhanced Tournament Game Detail Modal Styles */
#game-detail-modal .modal-content {
    background-color: var(--modal-content-background-color);
    max-width: 95%;
    width: 1400px;
}

#game-detail-modal .modal-header {
    background-color: var(--modal-content-background-color);
    border-bottom: 1px solid #e0e0e0;
    padding: 16px 24px;
}

#game-detail-modal .modal-header h2 {
    color: var(--dark-purple);
    font-size: 1.5em;
    margin: 0;
}

#game-detail-modal .close-button {
    color: #999;
    font-size: 32px;
    transition: all 0.2s;
}

#game-detail-modal .close-button:hover {
    color: #333;
    transform: scale(1.1);
}

#game-detail-modal .modal-body {
    padding: 20px 24px;
    max-height: 70vh;
    overflow-y: auto;
    line-height: 1.6;
}

#game-detail-modal h3 {
    color: var(--dark-purple);
    font-size: 1.3em;
    margin-top: 25px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

#game-detail-modal h3:first-child {
    margin-top: 0;
}

#game-detail-modal .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    background-color: #f8f9fa;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 4px solid var(--main-purple);
}

.info-item label {
    display: block;
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item .value {
    font-size: 1.1em;
    color: #212529;
    font-weight: 600;
}

/* Cartes de joueur */
.players-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.player-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid var(--main-purple);
}

.player-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.player-card.team1 {
    border-left: 5px solid #28a745;
}

.player-card.team2 {
    border-left: 5px solid #dc3545;
}

.player-card .player-name {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--dark-purple);
    margin-bottom: 8px;
}

.player-card .player-score {
    font-size: 1.5em;
    color: var(--main-purple);
    font-weight: 700;
}

.player-card .player-team {
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 4px;
    font-weight: 600;
}

/* Section de l'historique */
.history-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.history-section h4 {
    margin-top: 0;
    color: var(--dark-purple);
    border-bottom: 2px solid var(--main-purple);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.history-item {
    padding: 8px 12px;
    margin-bottom: 6px;
    background-color: white;
    border-radius: 4px;
    border-left: 3px solid #dee2e6;
    font-size: 0.9em;
}

.history-item.bid {
    border-left-color: #ffc107;
}

.history-item.play {
    border-left-color: #17a2b8;
}

.history-item.trick {
    border-left-color: #28a745;
    font-weight: 600;
}

/* Section des manches */
.rounds-section {
    margin-top: 20px;
}

.round-card {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
}

.round-card h5 {
    margin: 0 0 10px 0;
    color: var(--dark-purple);
    font-size: 1.1em;
}

.round-scores {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.round-scores .score-item {
    text-align: center;
}

.round-scores .score-item label {
    display: block;
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 4px;
}

.round-scores .score-item .value {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--main-purple);
}

/* Styles pour les tableaux de tournoi */
.mod-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mod-table thead {
    background: linear-gradient(135deg, var(--main-purple), var(--dark-purple));
    color: white;
}

.mod-table thead th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mod-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.mod-table tbody tr:hover {
    background-color: #f8f9fa;
}

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

.mod-table tbody td {
    padding: 12px;
    font-size: 0.9em;
    color: #495057;
}

.mod-table tbody td:first-child {
    font-weight: 600;
}

/* Styles pour les boutons d'action dans les tableaux */
.mod-table .action-button,
.mod-table .view-game-btn,
.mod-table .delete-game-btn {
    background: none;
    border: none;
    color: var(--main-purple);
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin: 0 3px;
}

.mod-table .view-game-btn:hover {
    background-color: #e3f2fd;
    color: #1976d2;
}

.mod-table .delete-game-btn {
    color: #dc3545;
}

.mod-table .delete-game-btn:hover {
    background-color: #ffebee;
    color: #c62828;
}

/* Modale détails de partie de tournoi */
#game-details-modal .modal-content {
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
}

#game-details-modal .modal-header {
    background: linear-gradient(135deg, var(--main-purple), var(--dark-purple));
    color: white;
    border-bottom: none;
}

#game-details-modal .modal-header h2 {
    color: white;
    margin: 0;
}

#game-details-modal .modal-header .close-button {
    color: rgba(255, 255, 255, 0.8);
}

#game-details-modal .close-button:hover {
    color: white;
}

#game-details-modal .modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

#game-details-modal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#game-details-modal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#game-details-modal .modal-body::-webkit-scrollbar-thumb {
    background: var(--main-purple);
    border-radius: 10px;
}

#game-details-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--dark-purple);
}

/* Styles pour les cartes de joueurs dans la modale */
.player-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid var(--main-purple);
}

.player-card h4 {
    margin: 0 0 8px 0;
    color: var(--dark-purple);
    font-size: 1.1em;
}

.player-card .score {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--main-purple);
}

/* Styles pour les rangs du classement */
.mod-table tbody tr[data-rank='1'] td:first-child {
    color: #ffd700;
    font-size: 1.1em;
}

.mod-table tbody tr[data-rank='2'] td:first-child {
    color: #c0c0c0;
    font-size: 1.1em;
}

.mod-table tbody tr[data-rank='3'] td:first-child {
    color: #cd7f32;
    font-size: 1.1em;
}

/* Styles pour le tableau des mises à jour */
.mod-table.updates-table th,
.mod-table.updates-table td {
    padding: 8px 12px;
    font-size: 0.85em;
    vertical-align: middle;
}

.mod-table.updates-table th:nth-child(1), /* Dépendance */
.mod-table.updates-table td:nth-child(1) {
    width: 30%;
}
.mod-table.updates-table th:nth-child(2), /* Actuelle */
.mod-table.updates-table td:nth-child(2),
.mod-table.updates-table th:nth-child(3), /* Dernière */
.mod-table.updates-table td:nth-child(3) {
    width: 15%;
    text-align: center;
}
.mod-table.updates-table th:nth-child(4), /* Majeur */
.mod-table.updates-table td:nth-child(4),
.mod-table.updates-table th:nth-child(5), /* Mineur */
.mod-table.updates-table td:nth-child(5),
.mod-table.updates-table th:nth-child(6), /* Patch */
.mod-table.updates-table td:nth-child(6) {
    width: 10%;
    text-align: center;
}

.mod-table.updates-table .update-major {
    color: #dc3545; /* Rouge pour majeur */
    font-weight: bold;
}
.mod-table.updates-table .update-minor {
    color: #ffc107; /* Jaune/orange pour mineur */
    font-weight: bold;
}
.mod-table.updates-table .update-patch {
    color: #28a745; /* Vert pour patch */
    font-weight: bold;
}

.mod-table.updates-table td i.fas {
    font-size: 1.1em;
}

/* Styles pour les messages de statut */
.info-message {
    color: #007bff;
    font-style: italic;
    margin-top: 10px;
}

.success-message {
    color: #28a745;
    font-weight: bold;
    margin-top: 10px;
}

.error-message {
    color: #dc3545;
    font-weight: bold;
    margin-top: 10px;
}

.loading-text {
    color: #6c757d;
    font-style: italic;
}

.updates-results-container {
    margin-top: 20px;
}

/* --- STYLES POUR LA GESTION DES SONS --- */
.sound-list-container {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    margin-top: 15px;
}

.sound-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.sound-table th,
.sound-table td {
    border: 1px solid #eee;
    padding: 8px;
    text-align: left;
    vertical-align: middle;
}

.sound-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.sound-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.sound-table tr:hover {
    background-color: #f1f1f1;
}

.sound-table td:last-child {
    text-align: center;
    width: 80px; /* Ajusté pour le bouton unique */
}

.sound-table .action-button {
    padding: 5px 8px;
    font-size: 0.8em;
    margin: 0 2px;
    width: auto;
}

.sound-preview-container audio {
    width: 100%;
    max-width: 250px;
    margin-top: 10px;
}
