#chat-log-panel {
    background-color: #f8f9fa;
    padding: 20px 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 1400px; /* On peut agrandir un peu */
    margin: 40px auto;
}

/* NOUVEAU : Barre de contrôles */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-container {
    display: flex;
    gap: 10px;
}

#search-username {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
}

.search-container button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#search-button {
    background-color: var(--main-purple);
    color: white;
}

#reset-button {
    background-color: #6c757d;
    color: white;
}

.pagination-container button {
    padding: 8px 12px;
    margin-left: 5px;
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: pointer;
}

.pagination-container button.active {
    background-color: var(--main-purple);
    color: white;
    font-weight: bold;
}

.pagination-container button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Styles pour les logs */
#log-container {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    height: 70vh;
    overflow-y: auto;
    padding: 15px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85em; /* Police de caractère plus petite */
    background-image: var(--background-image-fond-chat);
}

.log-message {
    padding: 4px 0; /* On réduit le padding */
    border-bottom: 1px solid #eee;
}

.log-meta {
    font-size: 0.9em;
    color: #888;
}

.log-content {
    white-space: pre-wrap;
    word-break: break-all;
    padding-left: 10px;
}

.log-context-lobby,
.log-context-game {
    font-weight: bold;
}

.log-context-lobby {
    color: #0056b3;
}

.log-context-game {
    color: #28a745;
}

/* Styles for the new chat log table */
.chat-log-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

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

.chat-log-table thead th {
    background-color: #f2f2f2;
    color: #333;
    cursor: pointer; /* Indicate sortable columns */
    position: relative;
}

.chat-log-table tbody tr:nth-child(even) {
    background-color: #f9f9f9; /* Slightly different background for even rows */
}

.chat-log-table tbody tr:hover {
    background-color: #e9e9e9; /* Highlight on hover */
}

.filter-row td {
    padding: 5px 8px;
    background-color: #f2f2f2;
}

.filter-input {
    width: calc(100% - 10px);
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.8em;
}

.filter-input::placeholder {
    color: #aaa;
}

.sort-arrow {
    position: absolute;
    right: 5px;
    font-size: 0.8em;
}

/* Adjust existing log-context styles for table cells */
.chat-log-table .log-context-lobby,
.chat-log-table .log-context-game {
    font-weight: bold;
}

.chat-log-table .log-context-lobby {
    color: #0056b3;
}

.chat-log-table .log-context-game {
    color: #28a745;
}
