:root {
    --main-purple: rgb(130, 5, 177);
    --dark-purple: rgb(93, 4, 128);
    --light-purple-bg: rgb(240, 230, 247);
    --light-blue-bg: #eef;
    --danger-color: #721c24;
    --danger-bg: #f8d7da;
    --danger-border: #f5c6cb;

    /* New variables for link/button colors */
    --leaderboard-link-color: #ffd700; /* Default gold */
    --theme-button-color: #add8e6; /* Default light blue */
    --modal-content-background-color: white;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('/images/fond.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 5vh;
}
#app {
    width: 95%;
    max-width: 1200px;
    margin: 0;
    /* <-- CORRECTION : On retire la marge verticale */
    background-color: var(--modal-content-background-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 20px;
}
header h1 {
    text-align: center;
    color: var(--dark-purple);
    font-size: 1.8em;
    margin: 0 0 20px 0;
}
#auth-section {
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: var(--lobby-actions-background-color);
    text-align: center;
}
#auth-section input {
    padding: 10px;
    margin: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: calc(50% - 12px);
    max-width: 250px;
}
#auth-section button {
    background-color: var(--main-purple);
    color: white;
    padding: 10px 20px;
    margin: 10px 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}
#auth-section button:hover {
    background-color: var(--dark-purple);
}
#auth-message {
    color: red;
    font-weight: bold;
}
#lobby-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#lobby-columns-container {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #ddd;
    border-radius: 8px;

    overflow: hidden;
}

/*#lobby-right-column {
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
#lobby-left-column {
!*    padding: 5px;*!
    gap: 5px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: var(--table-row-fond);
    !*border-right: 1px solid #ddd;*!
}
#lobby-right-column {
    flex: 3;
    !*min-width: 400px;
    *!
}*/

#lobby-left-column,
#lobby-right-column {
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
#lobby-left-column {
    background-color: var(--table-row-fond);
    border-right: 1px solid #ddd;
}
#lobby-right-column {
    flex: 3;
    min-width: 400px;
}

#chat-box {
    height: 260px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow-wrap: break-word;
}
#chat-box p {
    margin: 3px 0;
    padding: 0;
    line-height: 1.4;
}
#chat-input-controls {
    display: flex;
    gap: 10px;
}
#chat-input {
    background-color: var(--chat-background-color);
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
#send-chat {
    padding: 8px 15px;
    background-color: var(--main-purple);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
#send-chat:hover {
    background-color: var(--dark-purple);
}
#player-table-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background-color: #eee;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-y: auto;
    max-height: 280px;
}

.player-table-header,
.player-table-row {
    padding: 8px 10px;
    text-align: left;
}
.player-table-header {
    background-color: var(--dark-purple);
    color: white;
    font-weight: bold;
    text-align: center;
}
.player-table-row {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
}

#game-list-container {
    border: 1px solid #ddd;
    padding: 2px;
    border-radius: 5px;
    background-color: var(--game-list-row-background-color);
}
#game-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
#game-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#game-list li button {
    margin-left: 10px;
    padding: 5px 10px;
    font-size: 0.8em;
    background-color: var(--main-purple);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
#game-list li button:hover {
    background-color: var(--dark-purple);
}
#score-board {
    padding: 10px;
    border: 1px solid #ddd;
    background-color: var(--light-purple-bg);
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}
#game-info-summary {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: var(--dark-purple, #4a148c);
    padding: 8px 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 1em;
    font-weight: normal;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    text-shadow: none;
}
#game-info-summary span {
    color: #311b92;
    font-weight: bold;
    background-color: transparent;
    padding: 3px 8px;
    border-radius: 4px;
}
#game-columns-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    flex-grow: 1;
    min-height: 0;
}
#game-main-column {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#game-right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: flex-end;
    min-height: 0;
}
#game-area {
    position: relative;
    width: 100%;
    height: 450px;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url('../images/table_background.png');
    background-size: cover;
    /* Ajuste la taille de l'image pour couvrir toute la zone */
    background-position: center;
    /* Centre l'image */
    background-repeat: no-repeat;
    /* Empêche la répétition de l'image */
    border-radius: 15px;
    /* Optionnel: si votre table est carrée, vous pouvez ajouter des bords arrondis pour mieux l'intégrer à l'image */
    /* Optionnel: ajoute une ombre pour donner plus de profondeur */
    border: 5px solid var(--dark-purple);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}
#player-positions {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 10;
}
.game-player {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
    padding: 10px;
    min-width: 80px;
    border: 4px solid transparent;
    transition: all 0.3s ease-in-out;
    border-radius: 12px;
}
#player-top {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}
#player-left {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}
#player-right {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}
#player-bottom {
    bottom: 0%;
    left: 45%;
    transform: translateX(-10%);
    color: yellowgreen;
    height: 0px;
}
#game-table {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 60%;
    transform: translate(-50%, -50%);
    z-index: 1;
}
#played-cards {
    position: relative;
    width: 100%;
    height: 100%;
}
.card {
    background-color: transparent;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}
.card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 5px;
}
.card span {
    display: none;
}

.card.hearts,
.card.diamonds {
    color: red;
}
.card.spades {
    color: black;
}
.card.clubs {
    color: #008000;
}
.card.selected {
    border: 3px solid blue;
    box-shadow: 0 0 10px blue;
    transform: translateY(-20px);
}
.played-card {
    position: absolute;
    cursor: default;
    transition:
        transform 0.6s cubic-bezier(0.25, 1, 0.5, 1),
        opacity 0.4s ease-out;
}
#your-hand {
    text-align: center;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    padding: 0;
}
#hand-cards {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    position: absolute;
    bottom: -310px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 300px;
}
#in-game-chat-container {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    background-color: var(--game-list-row-background-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 200px;
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0;
    margin-bottom: 10px;
}
#in-game-chat-box {
    height: 100%;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: var(--chat-background-color);
    overflow-wrap: break-word;
    flex-grow: 1;
}
#in-game-chat-input-controls {
    display: flex;
    gap: 10px;
}
#in-game-chat-input {
    background-color: var(--chat-background-color);
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 0;
}
#send-in-game-chat {
    padding: 8px 15px;
    background-color: var(--create-game-button-bg);
    color: black;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
#game-messages {
    height: 120px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
    background-color: var(--lobby-actions-background-color);
    border-radius: 5px;
}
#game-messages p {
    margin: 2px 0;
    font-size: 0.9em;
}
#game-messages .info {
    color: #0056b3;
}
#game-messages .error {
    color: #c82333;
    font-weight: bold;
}
#game-messages p.announcement {
    color: #17a2b8;
    font-weight: bold;
    font-style: italic;
}
#action-container {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    background-color: var(--lobby-actions-background-color);
}
#game-controls {
    margin: 0 auto;
}
.icon-button {
    position: relative;
    background: none;
    border: none;
    font-size: 1.4em;
    padding: 8px;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.icon-button:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #000;
}
.icon-button.leave {
    color: #ff4d4d;
}
.icon-button.leave:hover {
    background-color: #ff4d4d;
    color: #fff;
}
.icon-button[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background-color: #333;
    color: #fff;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
    z-index: 100;
}
.icon-button[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    border: 5px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
    z-index: 100;
}

.icon-button[data-tooltip]:hover::before,
.icon-button[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

#bid-controls,
#announcement-controls {
    text-align: center;
}

#bid-controls,
#coinche-bid-controls {
    position: static;
    transform: none;
    left: auto;
    bottom: auto;
    width: auto;
    margin: 0 auto;
    flex-wrap: nowrap;
}
#bid-buttons-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}
.bid-button {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: bold;
    font-size: 1em;
}
#bid-buttons-container .bid-button:hover {
    background-color: #a7d1ff;
}

#bid-buttons-container .bid-button[data-suit='pass'] {
    grid-column: 1 / -1;
    background-color: #e2e3e5;
    border-color: #d6d8db;
    color: #383d41;
}
.modal {
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}
.modal-content {
    background-color: var(--modal-content-background-color);
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    max-width: 500px;
    width: 90%;
    max-height: 90%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease-out;
}
.close-button {
    color: #999;
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}
.close-button:hover {
    color: #333;
    transform: scale(1.1);
}
#create-game-modal .modal-content {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 90%;
}
#game-closed-modal .modal-content {
    width: 500px;
    padding: 30px;
    text-align: center;
}

#last-trick-modal .modal-content,
#announcement-modal .modal-content {
    width: auto;
    min-width: 400px;
    max-width: 600px;
    text-align: center;
}
#soundboard-modal .modal-content {
    width: 400px;
}
#proposed-card-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 50;
}
#proposed-card-container h4 {
    margin: 0 0 10px 0;
    color: white;
    text-shadow: 1px 1px 2px black;
}
#proposed-card-display .card {
    cursor: default;
    box-shadow: 0 0 15px yellow;
}
@keyframes flip-deal-in {
    from {
        transform: scale(0.5) rotateY(90deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotateY(0deg);
        opacity: 1;
    }
}
#proposed-card-display .card.dealt-in-center {
    animation: flip-deal-in 0.6s ease-out;
}
#soundboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 20px 0;
}
.sound-btn {
    padding: 20px;
    font-size: 1.2em;
    border: 1px solid #ddd;
    background-color: #f8f9fa;
    cursor: pointer;
}
.sound-btn:active {
    transform: scale(0.95);
}
.sound-indicator {
    position: absolute;
    top: -20px;
    font-size: 2em;
    animation: fade-up 2s ease-out;
}
@keyframes fade-up {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}
#announcement-cards-display {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}
#last-trick-cards-display {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    min-height: 120px;
}
#last-trick-cards-display .played-card-in-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

#game-list-table {
    background-image: var(--background-image-fond-chat);
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 5px;
    padding: 2px;
    min-height: 200px;
    background-color: var(--background-color);
    border-radius: 8px;
}
.game-list-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-shrink: 0;
}
.game-list-players {
    display: grid;
    grid-template-areas: 'ouest . nord' 'sud centre est';
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: repeat(3, auto);
    gap: 10px;
    align-items: center;
    justify-content: center;
    background-image: url('/images/table.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: 300px;
    height: 200px;
    padding: 10px;
}
.game-list-details-center {
    grid-area: centre;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
    padding: 5px;
    pointer-events: none;
    background-color: var(--game-list-details-center-background-color);
    border-radius: 10px;
}
.game-list-details-center h4 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    color: white;
}
.game-list-details-center p {
    margin: 2px 0;
    font-size: 0.8em;
}
.player-slot {
    font-weight: bold;
    text-align: center;
    border-radius: 5px;
    min-width: 80px;
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid #ccc;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 5px;
}
.player-slot.north {
    grid-area: nord;
}
.player-slot.south {
    grid-area: sud;
}
.player-slot.east {
    grid-area: est;
}
.player-slot.west {
    grid-area: ouest;
}
.player-slot .join-slot-button {
    background-color: var(--main-purple);
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
    white-space: nowrap;
}
.player-slot .join-slot-button:hover {
    background-color: var(--dark-purple);
}
#bid-buttons-container .pass-button {
    grid-column: 1 / -1;
    background-color: #d9534f;
    border-color: #d43f3a;
    color: white;
    font-size: 1.1em;
    font-weight: bold;
}
#bid-buttons-container .pass-button:hover {
    background-color: #c9302c;
}
#game-type-display {
    text-align: center;
    font-style: italic;
    color: #555;
    margin-top: -10px;
    margin-bottom: 15px;
}
.spectate-game-button {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.2s ease;
}
.spectate-game-button:hover {
    background-color: #138496;
}
.user-display-container {
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 500;
}

.lobby-actions button,
.lobby-actions a {
    margin: 0;
    border: none;
    padding: 12px 20px;
    line-height: 1.5;
    display: inline-block;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s ease;
    box-sizing: border-box;
    /**    display: inline-flex; **/
    align-items: center;
    justify-content: center;
    text-align: center;
}
.lobby-actions {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-top: 0px;
}

.lobby-actions button:active,
.lobby-actions a:active {
    transform: scale(0.97);
}
#moderation-link {
    background-color: #ff0000;
    color: black; /* Couleur rouge pour le lien de modération */
    display: none;
}
#moderation-link:hover {
    background-color: #fa4040;
}
.logout-btn {
    background-color: #6c757d;
    color: white;
}
.logout-btn:hover {
    background-color: #5a6268;
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.modal-header {
    background-color: var(--modal-content-background-color);
    padding: 16px 24px;
    border-bottom: 1px solid #e0e0e0;
}
.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: var(--dark-purple);
}
.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    line-height: 1.6;
}
.modal-footer {
    background-color: var(--modal-content-background-color);
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
.modal-content button.modal-button {
    padding: 10px 20px;
    border-radius: 5px;
    border: 1px solid transparent;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9em;
}

.modal-button.secondary {
    background-color: #e9ecef;
    border-color: #e9ecef;
    color: #495057;
}
.modal-button.secondary:hover {
    background-color: #dee2e6;
}

#create-game-modal .modal-body input,
#create-game-modal .modal-body select {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}
.danger-zone {
    border: 2px solid #d9534f;
    border-radius: 8px;
    padding: 15px;
    background-color: #f2dede;
}
.danger-zone h2 {
    color: #a94442;
}
.danger-zone button {
    background-color: #d9534f;
    color: white;
}
.danger-zone button:hover {
    background-color: #c9302c;
}
.current-turn-highlight {
    border-color: #ffd700;
    box-shadow: 0 0 20px 8px rgba(255, 215, 0, 0.75);
}
.summary-turn {
    margin-left: auto;
}
.player-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}
.lobby-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
}
.game-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    margin-bottom: 5px;
}
.game-list-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    border: 1px solid #ccc;
}
.player-slot.empty-slot {
    background-color: transparent;
    border-color: transparent;
    padding: 0;
}
#radio-player-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 6px 12px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

#radio-now-playing-container {
    width: 300px;
    overflow: hidden;
    position: relative;
    height: 1.2em;
}

#radio-now-playing {
    font-weight: bold;
    font-size: 0.9em;
    position: absolute;
    white-space: nowrap;
    will-change: transform;
    animation: none; /* Animation is paused by default */
    display: inline-block;
}

#radio-now-playing.scrolling {
    animation: marquee 15s linear infinite;
}

@keyframes marquee {
    from {
        transform: translateX(300px);
    }
    to {
        transform: translateX(-100%);
    }
}

#radio-play-pause-btn,
#radio-mute-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4em;
    padding: 0;
    margin: 0;
    line-height: 1;
    transition:
        transform 0.1s,
        opacity 0.2s;
}

#radio-play-pause-btn:hover,
#radio-mute-btn:hover {
    transform: scale(1.1);
}

#radio-play-pause-btn:active,
#radio-mute-btn:active {
    transform: scale(0.95);
}
#radio-volume-slider {
    width: 70px;
    cursor: pointer;
    transition: opacity 0.3s;
}

#radio-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #4caf50;
    cursor: pointer;
    border-radius: 50%;
}

#radio-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #4caf50;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}
.kick-bot-btn {
    background: #ffc107;
    color: #212529;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    margin-left: 8px;
    opacity: 0.8;
    transition: all 0.2s;
}
.kick-bot-btn:hover {
    opacity: 1;
    background: #e0a800;
}

.kick-player-game-btn {
    background-color: #dc3545; /* Red */
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    margin-left: 5px;
    transition: background-color 0.2s ease;
}

.kick-player-game-btn:hover {
    background-color: #c82333; /* Darker red on hover */
}
#color-swatch-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 20px;
}
.color-swatch {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}
.color-swatch:hover {
    transform: scale(1.1);
}

#game-color-picker-btn {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}
.card span:last-child {
    font-size: 1.9em;
    line-height: 0.9;
}
#bid-buttons-container .bid-button .bid-symbol {
    font-size: 2.2em;
    line-height: 1;
}

#bid-buttons-container .bid-button[data-suit='hearts'],
#bid-buttons-container .bid-button[data-suit='diamonds'] {
    color: #d32f2f !important;
}

#bid-buttons-container .bid-button[data-suit='clubs'] {
    color: #008000 !important;
}

#bid-buttons-container .bid-button[data-suit='spades'] {
    color: #000000 !important;
}

#bid-buttons-container .bid-button[data-suit='sans-atout'],
#bid-buttons-container .bid-button[data-suit='tout-atout'] {
    color: #1a237e !important;
}
.card.clubs .suit-symbol {
    color: #008000;
}
.card.spades .suit-symbol {
    color: black;
}
.whisper {
    color: #6a1b9a;
    background-color: #f3e5f5;
    padding: 5px 8px;
    border-radius: 4px;
    font-style: italic;
}
#whisper-modal .modal-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
#whisper-modal label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

#whisper-modal select,
#whisper-modal textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    font-family: inherit;
}
#whisper-modal-message {
    min-height: 1.2em;
}
#open-whisper-modal-btn {
    background-color: var(--background-color);
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
}

#open-smiley-modal-btn {
    background-color: var(--background-color);
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
}

#lobby-color-picker-btn {
    background-color: var(--background-color);
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
}
#coinche-bid-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--main-purple);
    background-color: var(--light-purple-bg);
    border-radius: 8px;
}
#coinche-bid-controls h3 {
    margin: 0;
    text-align: center;
    color: var(--dark-purple);
}
.coinche-contract-display {
    text-align: center;
    font-weight: bold;
    background-color: #fff;
    padding: 8px;
    border-radius: 5px;
}
.coinche-contract-display span {
    color: var(--main-purple);
}
.coinche-bid-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.contract-bid-section {
    display: flex;
    gap: 10px;
}
#coinche-bid-value {
    flex: 1;
    padding: 10px;
    font-size: 1.1em;
    border: 1px solid #ccc;
    border-radius: 5px;
}
#coinche-suit-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

/* ==========================================================================
   Couleurs pour les boutons d'enchères de la Coinche
   ========================================================================== */

/* Style de base pour tous les boutons de couleur */
#coinche-suit-buttons button {
    font-size: 2em; /* Augmente la taille des symboles */
    font-weight: bold;
}

/* Couleur pour Pique (♠) */
#coinche-suit-buttons button[data-suit='spades'] {
    color: #333; /* Noir/Gris foncé */
}

/* Couleur pour Cœur (♥) */
#coinche-suit-buttons button[data-suit='hearts'] {
    color: #e74c3c; /* Rouge vif */
}

/* Couleur pour Carreau (♦) */
#coinche-suit-buttons button[data-suit='diamonds'] {
    color: #e74c3c; /* Rouge vif */
}

/* Couleur pour Trèfle (♣) */
#coinche-suit-buttons button[data-suit='clubs'] {
    color: #008000; /* Noir/Gris foncé */
}

/* Style pour les boutons "Sans Atout" et "Tout Atout" */
#coinche-suit-buttons button[data-suit='sans-atout'],
#coinche-suit-buttons button[data-suit='tout-atout'] {
    font-size: 1.5em; /* Taille de police normale pour le texte */
    font-weight: normal;
    color: #2c3e50;
}
.special-bid-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
#coinche-pass-btn {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}
#coinche-coinche-btn {
    background-color: #ffc107;
    border-color: #e0a800;
}
#coinche-coinche-btn:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}
#game-type-selection-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}
.game-type-card {
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border-color: var(--dark-purple);
    background-color: var(--light-purple-bg);
}
.game-type-card.active {
    border: 4px solid red;
    background-color: var(--light-purple-bg);
    box-shadow: 0 4px 12px rgba(93, 4, 128, 0.2);
    transform: scale(1.03);
}
.game-type-card h3 {
    margin: 0 0 5px 0;
    color: var(--dark-purple);
}
.game-type-card p {
    font-size: 0.85em;
    color: #555;
    margin: 0;
}
.announcement-switch-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
}
.slider:before {
    position: absolute;
    content: '';
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
}
input:checked + .slider {
    background-color: var(--main-purple);
}
input:focus + .slider {
    box-shadow: 0 0 1px var(--main-purple);
}
input:checked + .slider:before {
    transform: translateX(26px);
}
.slider.round {
    border-radius: 34px;
}
.slider.round:before {
    border-radius: 50%;
}
.bid-button-symbol {
    font-size: 2em;
}
#game-messages .trick-points {
    color: #fd7e14;
    font-weight: bold;
    background-color: #fff3e0;
    padding: 3px 6px;
    border-radius: 4px;
}
.private-game-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}
#password-input-container {
    width: 100%;
    margin-top: 15px;
}
#password-input-container input {
    width: 100%;
    box-sizing: border-box;
}
.game-actions-container {
    display: flex;
    align-items: center;
    gap: 5px;
}
.close-game-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    line-height: 1;
    margin-left: 0;
    transition: background-color 0.2s ease;
}
#smiley-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 15px;
    padding: 10px;
    max-height: 400px;
    overflow-y: auto;
}
.smiley-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    cursor: pointer;
    border-radius: 8px;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}
.smiley-item:hover {
    background-color: #f0f2f5;
}
.smiley-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}
.chat-smiley {
    vertical-align: middle;
    margin: 0 2px;
}

#player-bottom .game-avatar,
#player-bottom > span {
    display: none;
}
#your-hand h3 {
    display: none;
}

.card-holder {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 1px;
    height: 100%;
    transform-origin: bottom center;
}
.card-holder .card {
    position: absolute;
    bottom: 100%;
    left: -40px;
    width: 80px;
    height: 112px;
    transition: transform 0.2s ease-out;
}
.card-holder:hover .card {
    transform: translateY(-20px);
    z-index: 100;
}

html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}
#game-section {
    display: flex;
    flex-direction: column;
}

#in-game-chat-input-container {
    flex-shrink: 0;
}
#game-status-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr 1fr 1fr;
    justify-content: space-between;
    align-items: center;
    width: 99%;
    height: 70px; /* IMPORTANT: Fixez la hauteur à celle de votre image */
    margin: 5px auto 10px auto;
    padding: 8px;

    background-color: transparent; /* Mettez en transparent pour laisser l'image apparaître */
    background-image: url('../images/fond-barre.png'); /* Chemin vers votre image */
    background-position: center; /* Centre l'image si elle ne couvre pas exactement */
    background-size: 100% 100%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5); /* Garde l'ombre pour la profondeur */
    gap: 10px;
}
.team-score {
    flex-basis: 20%;
    text-align: center;
    padding: 5px;
    border-radius: var(--border-radius);
    background-color: rgba(0, 0, 0, 0.2);
}
.team-score span {
    display: block;
}

#team1-names,
#team2-names {
    font-size: 0.8em;
    font-weight: 500;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#team1-score,
#team2-score {
    font-size: 1.4em;
    font-weight: 700;
    color: #fff;
}

#game-main-info {
    font-size: 1.1em;
    font-weight: 600;
    color: #ffff00;
    margin-bottom: 2px;
}
#game-turn-info {
    font-size: 0.9em;
    font-weight: 400;
    color: #e0e0e0;
}
#lobby-lists-area {
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0;
    margin-top: 0px;
}
#lobby-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 10px;
}
.lobby-tab {
    padding: 10px 20px;
    cursor: pointer;
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.1em;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}
.lobby-tab:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
.lobby-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.lobby-tab-content {
    display: none;
}
.lobby-tab-content.active {
    display: block;
}
.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.status-dot.registering {
    background-color: #28a745;
}
.status-dot.in-progress {
    background-color: #ffc107;
}
.status-dot.finished {
    background-color: #6c757d;
}
.status-text {
    font-weight: 500;
    color: #e2e8f0;
}
.player-count {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}
.player-progress-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    overflow: hidden;
}
.player-progress-bar .progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}
.typing-indicator-wrapper {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 6px;
}
.typing-indicator-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #90a4ae;
    border-radius: 50%;
    margin: 0 1px;
    animation: typing-pulse 1.4s infinite ease-in-out both;
}
.typing-indicator-dot:nth-child(1) {
    animation-delay: -0.32s;
}
.typing-indicator-dot:nth-child(2) {
    animation-delay: -0.16s;
}
@keyframes typing-pulse {
    0%,
    80%,
    100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}
.modal-options-container {
    display: flex;
    /* The key property to align items horizontally */
    width: 100%;
    gap: 20px;
    margin-bottom: 15px;
    /* Adds some space below */
}

.announcement-switch-container,
.private-container,
.tournament-container {
    gap: 10px;
    /* Adds space between the label and the switch */
}
/* Taille de la carte elle-même et de son image */
.tarot-game .card,
.tarot-game .card img {
    width: 65px;
    height: 122px;
}
/* Taille des cartes jouées sur le tapis */
.tarot-game .played-card {
    width: 65px;
    height: 122px;
}
/* On ajuste la taille de la carte proposée (si utilisée un jour au tarot) */
.tarot-game #proposed-card-display .card {
    width: 65px;
    height: 122px;
}

/* ========================================================================= NOUVEAU : Style pour la modale de l'écart au Tarot ========================================================================= */
.modal-content.large {
    max-width: 90%;
    width: 1200px;
}

#ecart-chien-container,
#ecart-hand-container {
    text-align: center;
}

#ecart-chien-cards,
#ecart-hand-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    min-height: 130px;
}
#ecart-hand-cards .card {
    cursor: pointer;
    transition: all 0.2s ease;
}
#ecart-hand-cards .card:hover {
    transform: translateY(-5px);
}
#ecart-hand-cards .card.selected {
    transform: scale(0.9);
    box-shadow: 0 0 15px 5px var(--primary-color);
    opacity: 0.7;
}
#ecart-counter {
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

/* ========================================================================= CORRECTION : Style robuste pour la boussole ========================================================================= */
#turn-compass {
    position: absolute;
    top: 10%;
    left: 6%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 1;
}
#compass-pointer {
    width: 100%;
    height: 100%;
    position: relative;
    /* CORRECTION : Essentiel pour positionner la flèche à l'intérieur */
    transition: transform 0.5s cubic-bezier(0.4, 1.8, 0.5, 1);
}
#compass-pointer::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid var(--primary-color, #ffc107);
}

/* ========================================================================= NOUVEAU : Style pour la barre de score du Tarot ========================================================================= */
#tarot-score-banner {
    display: flex;
    justify-content: space-around;
    /* Espace équitable entre les scores */
    width: 100%;
    max-width: 800px;
    margin: 5px auto 10px auto;
    /* Centrage et marges */
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-large);
}
.tarot-player-score {
    text-align: center;
    color: #fff;
    padding: 5px 10px;
}
.tarot-player-score .player-name {
    display: block;
    font-size: 0.9em;
    color: #ccc;
}
.tarot-player-score .player-score {
    display: block;
    font-size: 1.3em;
    font-weight: bold;
}
/* Style pour le score de la manche (le changement) */
.round-score-change {
    font-size: 0.8em;
    font-weight: normal;
}
.round-score-change.positive {
    color: #28a745;
    /* Vert */
}
.round-score-change.negative {
    color: #dc3545;
    /* Rouge */
}
/* Style pour chaque emplacement de score */
.player-score-slot {
    text-align: center;
    padding: 5px;
    border-radius: var(--border-radius);
    background-color: rgba(0, 0, 0, 0.2);
    min-height: 40px;
    display: flex;
    /* Permet un meilleur contrôle vertical */
    flex-direction: column;
    justify-content: center;
}
/* --- DÉBUT DE LA CORRECTION --- */
/* Style pour les noms des joueurs (plus petit, gris clair) */
.player-score-slot .player-name {
    display: block;
    font-size: 0.8em;
    font-weight: 500;
    color: #ccc;
    white-space: nowrap;
    /* Empêche les noms de passer à la ligne */
    overflow: hidden;
    /* Cache le texte qui dépasse */
    text-overflow: ellipsis;
    /* Ajoute "..." si les noms sont trop longs */
}

#refresh-client-text {
    font-weight: bold;
}
/* --- FIN DE LA CORRECTION --- */
/* Style pour le score (grand et blanc) */
.player-score-slot .player-score {
    display: block;
    font-size: 1.4em;
    font-weight: 700;
    color: #fff;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--modal-content-background-color);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden;
    right: 0; /* Align to the right of the button */
}

.dropdown-content a,
.dropdown-content button {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
}

.dropdown-content a:hover,
.dropdown-content button:hover {
    background-color: var(--light-purple-bg);
}

.dropdown-content button#open-theme-modal-btn {
    /* Specific style for the theme button inside dropdown if needed */
    border-top: 1px solid var(--border-color);
}

.dropdown.active .dropdown-content {
    display: block;
}
/* La section centrale (inchangée) */
#game-phase-info {
    text-align: center;
    padding: 0 10px;
}
/* --- STYLES POUR L'ÉCRAN DE CHARGEMENT --- */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
}
#loading-box {
    background-color: #2c3e50;
    padding: 30px 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}
#loading-title {
    font-size: 1.2em;
    margin-bottom: 20px;
}
#loading-bar-container {
    width: 300px;
    height: 20px;
    background-color: #34495e;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}
#loading-bar {
    width: 0%;
    height: 100%;
    background-color: #2980b9;
    border-radius: 10px;
    transition: width 0.2s ease-out;
}
#loading-progress-text {
    margin-top: 15px;
    font-size: 1em;
}

.trick-winner-highlight {
    /* On ajoute une ombre lumineuse et un peu plus large */
    box-shadow: 0 0 15px 5px rgba(255, 215, 0, 0.8);
    /* Or lumineux */
    /* On applique l'animation 'pulse' */
    animation: pulse 1.5s ease-out;
}
@keyframes pulse {
    0% {
        box-shadow: 0 0 15px 5px rgba(255, 215, 0, 0.7);
    }
    50% {
        /* On ne touche plus à "transform", on intensifie juste l'ombre */
        box-shadow: 0 0 25px 10px rgba(255, 215, 0, 1);
        /* Halo plus grand et plus opaque */
    }
    100% {
        box-shadow: 0 0 15px 5px rgba(255, 215, 0, 0.7);
    }
}
.game-message.bid-announcement {
    color: #ff0000;
    font-weight: bold;
    font-style: italic;
}
.game-message.pass-announcement {
    color: green;
    font-style: italic;
}
.bid-tooltip {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: bold;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    animation: fadeIn 0.3s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* On ajoute une petite bordure */
}
/* NOUVEAU : Couleur pour un "Passe" */
.bid-tooltip.pass {
    background-color: #555;
    /* Un gris foncé neutre */
}
/* NOUVEAU : Couleur pour une "Prise" */
.bid-tooltip.take {
    background-color: #27ae60;
    /* Un vert pour indiquer une action positive */
}
/* On définit une exception pour le joueur du haut (inchangé) */
#player-top .bid-tooltip {
    top: auto;
    bottom: -20px;
}

#player-top-left {
    position: absolute;
    top: 25%;
    left: 10%;
    transform: translate(-50%, -50%);
}

#bug-report-modal .modal-content {
    max-width: 600px; /* Ajuster la largeur pour le formulaire */
    padding: 25px; /* Ajouter un padding interne */
    gap: 15px; /* Espacement entre les éléments */
}

#bug-report-modal h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark-purple);
}

#bug-report-modal select,
#bug-report-modal textarea,
#bug-report-modal input[type='email'],
#bug-report-modal input[type='text'] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px; /* Espacement entre les champs */
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1em;
    font-family: inherit;
}

#bug-report-modal textarea {
    min-height: 120px;
    resize: vertical;
}

#bug-report-modal .modal-footer {
    display: flex;
    justify-content: flex-end; /* Aligner les boutons à droite */
    gap: 10px; /* Espacement entre les boutons */
    padding-top: 15px;
    border-top: 1px solid #eee;
}

#bug-report-modal .modal-footer button {
    width: auto; /* Les boutons ne prennent pas toute la largeur */
    padding: 10px 20px;
    font-size: 0.9em;
}

#bug-report-modal #bug-report-message {
    text-align: center;
    margin-top: -10px;
    margin-bottom: 10px;
    font-weight: bold;
}

#bug-report-modal #bug-report-message.error {
    color: var(--danger-color);
}

#bug-report-modal #bug-report-message.success {
    color: #28a745; /* Vert pour le succès */
}

/* --- Styles pour la modale d'appel au Roi (Tarot à 5) --- */

.king-call-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.king-call-btn {
    padding: 15px;
    font-size: 1.2em;
    border: 2px solid var(--border-color, #0f3460);
    color: var(--text-color, #dcdcdc);
    border-radius: var(--border-radius-medium, 6px);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.king-call-btn:hover {
    background-color: var(--main-purple, #6f42c1);
    border-color: var(--main-purple, #6f42c1);
    color: white;
}

.king-symbol {
    font-size: 1.5em;
    margin-right: 10px;
}

.king-symbol.clubs,
.king-symbol.spades {
    color: #555; /* Noir/Gris pour Pique et Trèfle */
}

.king-symbol.hearts,
.king-symbol.diamonds {
    color: #e74c3c; /* Rouge pour Cœur et Carreau */
}

.game-list-players.five-player-layout {
    /* On définit une grille plus complexe pour 5 joueurs */
    grid-template-areas:
        'north-west center north-east'
        'west south east';
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: 1fr 1fr;
    padding: 20px 15px; /* On ajuste le padding pour donner de l'air */
}

.player-slot.north-east {
    grid-area: north-east;
    align-self: start;
    justify-self: end;
}

.five-player-layout .player-slot.west {
    grid-area: west;
    align-self: center;
    justify-self: start;
}

.five-player-layout .player-slot.east {
    grid-area: east;
    align-self: center;
    justify-self: end;
}

.five-player-layout .player-slot.south {
    grid-area: south;
    align-self: end;
    justify-self: center;
}

.five-player-layout .game-list-details-center {
    grid-area: center;
    align-self: start;
}

/* ==========================================================================
   POSITIONNEMENT POUR LE TAROT À 5 JOUEURS
   ========================================================================== */

/* On modifie la position du joueur du haut (celui du centre à l'origine) */
.five-player-game #player-top {
    left: 67%; /* On le déplace pour qu'il soit à 33% du bord droit */
    transform: translateX(-50%);
}

#tarot-score-bar {
    display: none;
    grid-template-columns: 2fr 5fr;
    align-items: center;
    width: 99%;
    height: 70px;
    margin: 5px auto 10px auto;
    padding: 8px;
    background-image: url('../images/fond-barre.png');
    background-position: center;
    background-size: 100% 100%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    gap: 10px;
}

#tarot-player-scores {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

#tarot-game-phase-info {
    text-align: center;
}

#tarot-game-main-info {
    font-size: 1.1em;
    font-weight: 600;
    color: #ffff00;
    margin-bottom: 2px;
}

#tarot-game-turn-info {
    font-size: 0.9em;
    font-weight: 400;
    color: #e0e0e0;
}

#profile-link {
    color: green;
}

#leaderboard-link {
    color: var(--leaderboard-link-color);
}

#open-theme-modal-btn {
    color: var(--theme-button-color);
}

#create-game {
    background-color: var(--create-game-button-bg);
    color: black;
    width: 180px;
}

.btn-admin-red {
    background-color: #dc3545;
    color: white;
}

.btn-admin-red:hover {
    background-color: #c82333;
}

.private-game-icon {
    margin-left: 5px;
    color: #ffc107; /* Une couleur distincte, par exemple, or/jaune */
    font-size: 0.9em;
    vertical-align: middle;
}

.tournament-game-icon {
    margin-left: 5px;
    color: #ffd700; /* Couleur or pour le trophée */
    font-size: 1em;
    vertical-align: middle;
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.5));
}

.info-tooltip {
    cursor: help;
    font-size: 0.85em;
    margin-left: 5px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.info-tooltip:hover {
    opacity: 1;
}
