* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

html {
    width: 100%;
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
    background-color: #f0f0f0;
    padding:
        env(safe-area-inset-top, 0px)
        env(safe-area-inset-right, 0px)
        env(safe-area-inset-bottom, 0px)
        env(safe-area-inset-left, 0px);
}

/* Écran actif : occupe la zone utile (hors barres navigateur / gestes système) */
.player-screen {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

    /*------------*/
    /*    JOIN    */
    /*------------*/

#join {
    flex-direction: column;
}

#join .player-screen__inner {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    padding: clamp(6px, 2vw, 14px);
}

#join #joinForm {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.20);
    padding: clamp(12px, 4vw, 20px);
    width: 100%;
    max-width: 100%;
    min-height: 0;
    text-align: center;
}

#join h1 {
    font-size: clamp(1.1rem, 5vw, 1.5rem);
    color: #ccc;
    margin-bottom: clamp(6px, 2vw, 10px);
    flex-shrink: 0;
}

#join h2 {
    font-size: clamp(1rem, 4.5vw, 1.25rem);
    color: #333;
    margin-bottom: clamp(6px, 2vw, 10px);
    flex-shrink: 0;
}

#join #joinGame {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#join input[type="text"] {
    width: 100%;
    padding: clamp(10px, 3vw, 14px);
    margin-bottom: clamp(8px, 2.5vw, 12px);
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 16px; /* évite le zoom auto sur iOS */
}

#join input[type="checkbox"] {
    accent-color: red;
    margin-right: 10px;
    margin-bottom: 5px;
}

#join .joinFormCheckbox {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 15px;
}

#join label {
    color: #666;
    font-size: 14px;
    text-align: left;
}

#join label a {
    color: #ff6b6b;
    text-decoration: none;
}

#join button {
    width: 100%;
    padding: clamp(12px, 3.5vw, 15px);
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: clamp(0.95rem, 4vw, 1rem);
    cursor: pointer;
    flex-shrink: 0;
}

#join button:hover {
    background-color: #ff4b4b;
}

    /*------------*/
    /*    INIT    */
    /*------------*/ 

#init {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: clamp(8px, 3vw, 16px);
}

#init h1 {
    color: blue;
    font-size: clamp(1.25rem, 6vw, 2rem);
    text-align: center;
    width: 100%;
    max-width: 100%;
    line-height: 1.2;
}

    /*------------*/
    /*    READY   */
    /*------------*/ 

#ready {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
    padding: clamp(4px, 2vw, 10px);
}

#ready h1 {
    color: blue;
    font-size: clamp(1rem, 5vw, 1.35rem);
    text-align: center;
    width: 100%;
    margin-bottom: clamp(4px, 1.5vw, 8px);
    flex-shrink: 0;
    line-height: 1.15;
}

#ready h2 {
    color: black;
    font-size: clamp(0.95rem, 4.5vw, 1.2rem);
    text-align: center;
    width: 100%;
    margin-bottom: clamp(4px, 1.5vw, 8px);
}

#ready h3 {
    color: black;
    font-size: clamp(0.85rem, 3.5vw, 1rem);
    text-align: center;
    width: 100%;
    margin-bottom: clamp(4px, 1.5vw, 8px);
}

#ready #readyContent {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    gap: clamp(4px, 1.5vw, 8px);
    overflow: hidden;
}

#ready #questionnaire {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background-color: white;
    padding: clamp(8px, 3vw, 16px);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

#ready #questionnaireImageContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    max-height: min(20dvh, 120px);
    width: 100%;
    margin-bottom: clamp(4px, 2vw, 8px);
}

#ready #questionnaireImage {
    max-height: min(20dvh, 120px);
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

#ready #questionnaireName {
    display: flex;
    justify-content: center;
    color: black;
    font-size: clamp(0.9rem, 4vw, 1.1rem);
    text-align: center;
    width: 100%;
    padding-bottom: clamp(4px, 2vw, 8px);
    flex-shrink: 0;
}

#ready #questionnaireRules {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background-color: #f9f9f9;
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: clamp(6px, 2.5vw, 10px);
    padding-left: clamp(14px, 4vw, 20px);
    color: red;
    font-size: clamp(0.65rem, 2.8vw, 0.85rem);
    text-align: left;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    line-height: 1.25;
}

#ready #questionnaireRules ul {
    list-style-type: disc;
    /*padding-left: 20px;*/
    text-align: left;
    margin: 0; /* Ajouté pour supprimer les marges par défaut */
}

    /*------------*/
    /*    GAME    */
    /*------------*/ 

#game {
    width: 100%;
    max-width: 100%;
    padding: clamp(4px, 2vw, 10px);
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    position: relative;
}
#game .player-ranking {
    font-size: clamp(0.7rem, 3vw, 0.8rem);
    color: #555;
    margin-bottom: clamp(4px, 2vw, 8px);
    white-space: nowrap;
    text-align: center;
    flex-shrink: 0;
}

#game h1 {
    font-size: clamp(0.8rem, 3.5vw, 1rem);
    color: #333;
    margin-bottom: clamp(4px, 2vw, 8px);
    flex-shrink: 0;
}

#game .countdown-text {
    font-size: clamp(1.5rem, 8vw, 3rem);
    color: white;
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    position: absolute;
    inset: 0;
    z-index: 9999;
}

#game h3 {
    font-size: clamp(0.9rem, 4vw, 1.2rem);
    color: #555;
    margin-bottom: clamp(6px, 2vw, 12px);
    font-weight: bold;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    line-height: 1.2;
}

#game .gameForm {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.20);
    padding: clamp(8px, 3vw, 16px);
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    transition: opacity 0.5s ease-in-out;
}

#game .options-container {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: clamp(3px, 1vw, 6px);
    margin-bottom: clamp(4px, 2vw, 10px);
    overflow: hidden;
}


#game .checkbox-btn {
    flex: 1 1 0;
    min-height: clamp(44px, 10vh, 72px);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid;
    border-radius: 10px;
    margin: 0;
    font-size: clamp(0.95rem, 3.8vw, 1.35rem);
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    color: #fff;
}

#game .checkbox-btn:nth-of-type(1) {
    background-color: #f8b195;
    border-color: #f67280;
}

#game .checkbox-btn:nth-of-type(2) {
    background-color: #c06c84;
    border-color: #6c5b7b;
}

#game .checkbox-btn:nth-of-type(3) {
    background-color: #355c7d;
    border-color: #6c5b7b;
}

#game .checkbox-btn:nth-of-type(4) {
    background-color: #ffcc5c;
    border-color: #ffb347;
}

#game .checkbox-btn:hover {
    filter: brightness(90%);
}

#game .checkbox-btn input[type="checkbox"] {
    display: none;
}

#game .checkbox-btn span {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#game .validate-btn {
    padding: clamp(10px, 3vw, 14px) clamp(14px, 4vw, 20px);
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: clamp(0.95rem, 4vw, 1.2rem);
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: clamp(4px, 2vw, 10px);
    flex-shrink: 0;
    width: 100%;
}

#game .validate-btn:hover {
    background-color: #218838;
}

#game .checkbox-btn input[type="checkbox"]:checked + span {
    filter: brightness(70%);
    color: #fff;
}

#game .points-text {
    font-size: 48px;
    font-weight: bold;
    text-align: center;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

#game .points-text.green {
    color: #28a745;
}

#game .points-text.red {
    color: #dc3545;
}

#game .answer-rejected {
    font-size: 48px;
    font-weight: bold;
    text-align: center;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    color: #dc3545;
}

#game .answer-position {
    font-size: clamp(1.5rem, 6vw, 2.25rem);
    font-weight: bold;
    text-align: center;
    width: min(92%, 28rem);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    color: #7b0fe1;
    pointer-events: none;
}

/* 1er buzzé : au-dessus du calque pause, message bien lisible */
#game .answer-position.answer-position--your-turn {
    z-index: 10002;
    color: #fff;
    background: linear-gradient(145deg, #16a34a 0%, #15803d 100%);
    border-radius: 16px;
    padding: clamp(1rem, 4vw, 1.75rem) clamp(1.25rem, 5vw, 2rem);
    box-shadow: 0 8px 28px rgba(22, 163, 74, 0.45);
    animation: answer-position-pulse 1.4s ease-in-out infinite;
}

#game .answer-position__title {
    display: block;
    font-size: clamp(1.75rem, 8vw, 2.75rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.15;
}

#game .answer-position__hint {
    display: block;
    margin-top: 0.4em;
    font-size: clamp(0.9rem, 3.8vw, 1.15rem);
    font-weight: 600;
    opacity: 0.95;
    line-height: 1.25;
}

@keyframes answer-position-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.03); }
}

/* Calque pause invité : plein écran (fixe), centré, tous mobiles / encoches */
#game .pause {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: -webkit-fill-available;
    margin: 0;
    padding:
        max(8px, env(safe-area-inset-top, 0px))
        max(8px, env(safe-area-inset-right, 0px))
        max(8px, env(safe-area-inset-bottom, 0px))
        max(8px, env(safe-area-inset-left, 0px));
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: rgba(255, 255, 255, 0.55);
    pointer-events: auto;
    box-sizing: border-box;
}

#game #gameIn.game-in-paused {
    pointer-events: none;
    user-select: none;
}

#game .pause-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
}

    /*------------*/
    /* Buzzer     */
    /*------------*/
#game .buzzer-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: clamp(4px, 2vw, 10px);
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

#game .buzzer-checkbox {
    display: none;
}

#game .buzzer-label {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: min(72vw, 240px);
    max-height: min(38dvh, 240px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background-color: #ff4141;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
}

#game .buzzer-checkbox:checked + .buzzer-label {
    background-color: #4CAF50;
    box-shadow: 0px 5px 15px rgba(0, 255, 0, 0.3);
    transform: scale(0.9);
}

#game .buzzer-text {
    margin-top: 10px;
    font-size: 24px;
    color: #333;
    text-align: center;
}

/* Style pour le bouton de buzzer désactivé */
#game .buzzer-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #666;
    box-shadow: none;
    pointer-events: none;
    transition: color 0.3s, color 0.3s;
}

#game .buzzer-disabled:hover {
    color: #666;
}


    /*------------*/
    /* SCOREBOARD */
    /*------------*/ 

#scoreboard {
    width: 100%;
    max-width: 100%;
    padding: clamp(6px, 2.5vw, 14px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    position: relative;
    overflow: hidden;
}

#scoreboard h1 {
    font-size: clamp(1rem, 5vw, 1.5rem);
    font-weight: bold;
    color: #333;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: clamp(4px, 2vw, 8px);
    text-align: center;
    flex-shrink: 0;
    line-height: 1.15;
}

#scoreboard .player-ranking {
    font-size: clamp(0.85rem, 3.8vw, 1.1rem);
    color: #555;
    margin-bottom: clamp(4px, 2vw, 10px);
    transition: height 1000ms ease-in-out, opacity 1000ms ease-in-out;
    text-align: center;
    flex-shrink: 0;
    line-height: 1.2;
}

#scoreboard .leaderboard {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 5px;
    background: #fafafa;
    overflow: hidden;
    flex: 0 1 auto;
    min-height: 0;
    transition: background 500ms ease-in-out, color 500ms ease-in-out;
}

#scoreboard .leaderboard__podiums {
    display: flex;
    justify-content: space-around;
    margin: 10px auto;
}

#scoreboard .leaderboard__podium {
    display: flex;
    flex-direction: column;
    align-self: flex-end;
    margin: 0 10px;
    opacity: 0;
    top: -10px;
    transition: opacity 500ms ease-in-out, top 500ms ease-in-out;
    width : 90px;
}

#scoreboard .leaderboard__podium.is-visible {
    opacity: 1;
    top: 0;
}

#scoreboard .leaderboard__podium-rank {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 700;
}

#scoreboard .leaderboard__podium-base {
    position: relative;
    min-width: 100px;
    color: #fff;
    background: #ececec;
    border-radius: 5px;
    transition: height 1000ms ease-in-out, opacity 1000ms ease-in-out;
}

#scoreboard .leaderboard__podium-base.is-expanding {
    opacity: 1;
}

#scoreboard .leaderboard__podium-base--first {
    background: linear-gradient(to bottom, #BD4F6C 0%, #9e3b55 100%);
    height: min(22dvh, 160px);
}

#scoreboard .leaderboard__podium-base--second {
    background: linear-gradient(to bottom, #F0CF65 0%, #ebc137 100%);
    height: min(18dvh, 130px);
}

#scoreboard .leaderboard__podium-base--third {
    background: linear-gradient(to bottom, #5E9EAD 0%, #49828f 100%);
    height: min(14dvh, 100px);
}

#scoreboard .leaderboard__podium-number {
    text-align: center;
    font-size: 1rem;
    margin-top: 10px;
    height: 60px; /* Fixed height to ensure consistent alignment */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#scoreboard .leaderboard__podium-number small {
    display: block;
    font-size: 150%;
    color: blue;
    line-height: 1.5;
    text-transform: uppercase;
}

#scoreboard .bump {
    animation: bump 500ms ease-in-out;
}

@keyframes bump {
    50% {
        transform: scale(1.1);
    }
    60% {
        transform: scale(1);
    }
}

#scoreboard .other-scores {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: clamp(4px, 2vw, 10px) auto 0;
    border-radius: 5px;
    background: #fafafa;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    transition: background 500ms ease-in-out, color 500ms ease-in-out;
}

#scoreboard .other-score {
    background: #ececec;
    border-radius: 5px;
    margin: clamp(4px, 1.5vw, 8px);
    padding: clamp(6px, 2vw, 10px);
    width: calc(100% - 16px);
    max-width: 100%;
    text-align: center;
    font-size: clamp(0.75rem, 3vw, 0.95rem);
    transition: transform 300ms ease-in-out, opacity 500ms ease-in-out;
    box-sizing: border-box;
    opacity: 0;
}

#scoreboard .other-score.is-visible {
    opacity: 1;
}

.ingame-scoreboard-overlay {
    position: absolute;
    inset: 0;
    z-index: 10002;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.93);
    overflow-y: auto;
}

.ingame-scoreboard-inner {
    width: 100%;
    max-width: 420px;
}

.ingame-scoreboard-heading {
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.ingame-scoreboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.ingame-scoreboard-table th,
.ingame-scoreboard-table td {
    border: 1px solid #ccc;
    padding: 8px 6px;
    text-align: left;
}

.ingame-scoreboard-table th {
    background: #f0f0f0;
}

.ingame-scoreboard-table td:first-child,
.ingame-scoreboard-table th:first-child {
    width: 2.5rem;
    text-align: center;
}

.ingame-scoreboard-table td:last-child {
    text-align: right;
    font-weight: bold;
}

/* Nuage — player : barre d'envoi en haut, nuage centré (plein reste), sans scroll */
#game .gameForm.gameForm--nuage {
    padding: clamp(6px, 2vw, 12px);
    gap: clamp(4px, 1.2vw, 8px);
}

#game .gameForm.gameForm--nuage #game-h1 {
    display: none;
}

#game .gameForm.gameForm--nuage #question-title {
    margin-bottom: clamp(2px, 1vw, 6px);
    font-size: clamp(0.95rem, 4.2vw, 1.15rem);
}

.wordcloud-player {
    width: 100%;
    max-width: 100%;
    margin: 0;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 1.2vw, 8px);
    overflow: hidden;
}

.wordcloud-composer {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 1.2vw, 6px);
    z-index: 2;
}

.wordcloud-counter {
    text-align: center;
    font-weight: bold;
    margin: 0;
    font-size: clamp(0.8rem, 3.2vw, 0.95rem);
    line-height: 1.2;
}

.wordcloud-form {
    display: flex;
    gap: 0.45rem;
    flex-shrink: 0;
}

.wordcloud-input {
    flex: 1;
    min-width: 0;
    padding: 0.7rem 0.85rem;
    font-size: 16px; /* évite le zoom iOS */
    border: 1px solid #ccc;
    border-radius: 8px;
}

.wordcloud-send {
    padding: 0.7rem 0.95rem;
    border: none;
    border-radius: 8px;
    background: #6f42c1;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    flex-shrink: 0;
}

.wordcloud-send:disabled,
.wordcloud-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.wordcloud-suggestions {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    max-height: min(36dvh, 220px);
    overflow-y: auto;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    z-index: 5;
}

.wordcloud-suggestions li button {
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.85rem;
    border: none;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
}

.wordcloud-suggestions li button:hover {
    background: #f3eefc;
}

.wordcloud-status {
    text-align: center;
    min-height: 1.1em;
    margin: 0;
    color: #666;
    font-size: clamp(0.75rem, 3vw, 0.9rem);
    line-height: 1.2;
}

.wordcloud-mine {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.3rem;
    justify-content: center;
    overflow: hidden;
    max-height: 1.7rem;
}

.wordcloud-mine li {
    background: #eee;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.wordcloud-mini {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Même ratio que le schéma canonique (1000×600) */
    aspect-ratio: 5 / 3;
    max-height: 100%;
}

.wordcloud-mini .wordcloud-svg {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

/*
 * Sandbox TEST banner (player) : fixed + inset, même logique que le board
 * (évite de casser height: 100dvh / flex du player).
 */
body.sandbox-test-on {
  --pw-sandbox-banner-h: 2.5rem;
}

.sandbox-test-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  height: var(--pw-sandbox-banner-h, 2.5rem);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #c62828;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  padding: 0 0.75rem;
  font-size: 1rem;
  pointer-events: none;
}
.sandbox-test-banner[hidden] { display: none !important; }

body.sandbox-test-on .player-screen {
  padding-top: var(--pw-sandbox-banner-h);
  box-sizing: border-box;
}
