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

body {
    display: block;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
}

/* Styles pour le message d'erreur */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    display: none; /* Masqué par défaut */
}

/*------------*/
/*    Menu    */
/*------------*/ 
.navbar {
    background-color: rgba(0, 123, 255, 0.6);
    padding: 15px;
    display: flex;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.navbar ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 40px; /* Espace plus large entre les éléments du menu */
}

.navbar ul li {
    display: inline;
}

.navbar ul > li[data-admin-nav-init-only] {
    display: none !important;
}
.navbar ul > li[data-admin-nav-init-only].admin-nav-init-on {
    display: inline !important;
}


.navbar ul li a {
    color: white;
    text-decoration: none;
    font-size: 20px;
    padding: 10px 20px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.3s;
    border-radius: 5px;
}

.navbar ul li a:hover {
    background-color: rgba(0, 86, 179, 0.8);
    transform: scale(1.1); /* Légère mise en avant lors du survol */
    box-shadow: 0 4px 8px rgba(0, 91, 187, 0.3); /* Ombre pour l'effet de survol */
}

/*------------*/
/*    INIT    */
/*------------*/ 
#init {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Alignement en haut */
    align-items: center;
    width: 100%;
    height: 100vh; /* Hauteur ajustée */
    overflow-y: auto; /* Permet le défilement vertical */
    padding-top: 20px; /* Ajoute un espace en haut pour éviter le chevauchement */
}

#init h1 {
    color: blue;
    font-size: 48px; /* Taille en pixels */
    text-align: center;
    margin-bottom: 20px; /* Espace sous le texte */
    height: auto; /* Hauteur ajustée */
}

#selectQuestionnaire {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: auto; /* Hauteur ajustée */
    width: 100%;
    padding: 20px; /* Padding autour du contenu */
    box-sizing: border-box;
}

#selectQuestionnaire h2 {
    font-size: 24px; /* Taille en pixels */
    color: #333; /* Couleur du texte */
    margin-bottom: 10px;
    text-align: center;
}

#selectQuestionnaire select {
    width: 80%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 16px; /* Taille en pixels */
    transition: border-color 0.3s ease, box-shadow 0.3s ease; /* Transitions pour un effet de focus */
    margin-bottom: 10px;
}

#selectQuestionnaire select:focus {
    border-color: #28a745;
    box-shadow: 0 0 5px rgba(0, 255, 106, 0.5); /* Ombre verte lors du focus */
    outline: none; /* Supprimer le contour par défaut */
}

#selectQuestionnaire button {
    width: 50%;
    padding: 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px; /* Taille en pixels */
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
    margin-bottom: 10px;
}

#selectQuestionnaire button:hover {
    background-color: #218838;
}

/*------------*/
/*    READY   */
/*------------*/ 
#ready {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Ajusté pour aligner les éléments en haut */
    align-items: center;
    width: 100%;
    height: 100vh;
    overflow-y: auto; /* Pour éviter le défilement si l'écran est suffisant */
}

#ready h1 {
    color: blue;
    font-size: 48px; /* Taille en pixels */
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
}


/* Conteneur des boutons */
#ready .ready-buttons {
    display: flex;
    justify-content: space-between; /* Espace égal entre les boutons */
    gap: 20px; /* Espacement entre les boutons */
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Styles des boutons */
#ready .ready-buttons button {
    flex: 1; /* Les boutons prennent un espace égal */
    padding: 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 0; /* Supprime les marges individuelles */
}

/* Effet de survol */
#ready .ready-buttons button:hover {
    background-color: #218838;
}

/* Effet de focus */
#ready .ready-buttons button:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

#ready h2 {
    color: black;
    font-size: 24px; /* Taille en pixels */
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
}

#ready h3 {
    color: black;
    font-size: 18px; /* Taille en pixels */
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
}

#ready #readyContent {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 10px;
    overflow-y: auto; /* Permet le défilement du contenu */
}

#ready #questionnaire {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 90vw;
    box-sizing: border-box;
    margin-bottom: 20px; /* Ajoute un espace sous le questionnaire */
}

#ready #questionnaireName {
    display: flex;
    justify-content: center;
    color: black;
    font-size: 24px; /* Taille en pixels */
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    padding-bottom: 10px;
}

#ready #questionnaireRules {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f9f9f9;
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: 10px;
    color: red;
    font-size: 18px; /* Taille en pixels */
    text-align: center;
    width: 100%;
    height: auto;
    overflow-y: auto; /* Permet le défilement vertical */
    margin-block: auto;
    padding-left: 20px; /* Décalage point rouge règles */
}

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

/*------------*/
/*    GAME    */
/*------------*/ 
#game .game {
    width: 100%;
    padding: 20px;
    height: 70vh;
    display: block;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

#game .game-time {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

#game .time-button {
    padding: 5px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#game .time-button:hover {
    background-color: #0056b3;
}

#game .time-button:focus {
    outline: none;
}

#game .time-button.add-time {
    background-color: #28a745;
}

#game .time-button.add-time:hover {
    background-color: #218838;
}

#game .time-button.subtract-time {
    background-color: #dc3545;
}

#game .time-button.subtract-time:hover {
    background-color: #c82333;
}

/*------------*/
/* Game utils */
/*------------*/ 
#game-utils {
    /*height: 20vh;*/
    display: block;

    position: relative;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.20);
    padding: 10px;
    margin-top : 20px;
    text-align: center;
    transition: opacity 0.5s ease-in-out;
}

/* Chronomètre / état sous forme « Temps restant » (zone visible quand jeu actif). */
#game .timer-head {
    align-self: center;
    width: 100%;
    max-width: 44rem;
    margin: 0 auto 12px auto;
    padding: 10px 14px;
    border-radius: 8px;
    box-sizing: border-box;
    border: 2px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#game .timer-head--playing {
    background: rgba(40, 167, 69, 0.08);
    border-color: rgba(40, 167, 69, 0.38);
}

#game .timer-head--paused {
    background: rgba(255, 193, 7, 0.18);
    border-color: #e8940c;
    box-shadow: 0 0 0 1px rgba(232, 148, 12, 0.25);
}

#game .timer-head__line {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

#game .timer-pause-pill {
    flex-shrink: 0;
    display: none;
    align-items: center;
    padding: 0.18rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-radius: 999px;
    background: #fd7e14;
    color: #fff;
    line-height: 1.2;
}

#game .timer-pause-pill.timer-pause-pill--visible {
    display: inline-flex;
}

#game .timer-head--paused #game-h1-body {
    color: #664d03;
}

#game.game--session-paused .gameForm {
    box-shadow: 0 0 0 2px rgba(232, 148, 12, 0.35), 0 0 10px rgba(0, 0, 0, 0.2);
}

#game.game--session-playing .gameForm {
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2), 0 0 10px rgba(0, 0, 0, 0.2);
}

#game-utils .next-question-preview {
    font-size: 12px; /* Taille en pixels */
    color: #333;
    margin-top: 20px;
    text-align: center;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 100%;
    box-sizing: border-box;
}

/*------------*/
/*   AUDIO    */
/*------------*/ 
#game .audio-container {
    align-self: center;
    justify-content: space-evenly;
    width : 50%;
    padding-top: 20px;
    padding-bottom : 15px;
    min-height: 80px;

}
#game .audio-title {
    font-size: 20px;
    color: #333;
    align-self : center;
}
#game .audio-button {
    padding: 0px 10px;
    background-color: #ffc107;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;

}

#game .play{
    background-color: #28a745;
}

/*------------*/
/* Control Buttons */
/*------------*/ 

#game-utils .buttons{
    display: flex;
    justify-content: center;
}

#game-utils .control-button {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 10px;
}

#game-utils .control-button:hover {
    background-color: #0056b3;
}

#game-utils .control-button:focus {
    outline: none;
}

#game-utils .pause-button {
    background-color: #ffc107;
}

#game-utils .pause-button:hover {
    background-color: #e0a800;
}

#game-utils .resume-button {
    background-color: #28a745;
}

#game-utils .resume-button:hover {
    background-color: #218838;
}

#game-utils .previous-button {
    background-color: #9e18bc;
}

#game-utils .previous-button:hover {
    background-color: #9028a7;
}

#game-utils .end-button {
    background-color: #dc3545;
}

#game-utils .end-button:hover {
    background-color: #c82333;
}

#game-utils .scoreboard-button {
    background-color: #bd781d;
}

#game-utils .scoreboard-button:hover {
    background-color: #ff9100;
}

/*------------*/
/* Next Question Preview */
/*------------*/ 
#game .question-stats {
    font-size: 12px; /* Taille en pixels */
    color: #333;
    text-align: center;
}
#game .answer-stats {
    font-size: 14px; /* Taille en pixels */
    color: #333;
    margin-top: 5px;
    margin-bottom: 10px;
    text-align: center;
}


#game .countdown-text {
    font-size: 48px; /* Taille en pixels */
    color: white;
    text-align: center;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7); /* semi-transparent background */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9999;
}

#game h4 {
    font-size: 12px;
    color: #555;
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

#game .question-story {
    font-size: 16px; /* Taille en pixels */
    color: #333;
    margin-top: 20px;
    text-align: center;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 100%;
    box-sizing: border-box;
}

#game .gameForm {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.20);
    padding: 20px;
    width: 100%;
    height: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: opacity 0.5s ease-in-out, box-shadow 0.2s ease;
}

#game .buzzer-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    background-color: #f7f7f7;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#game .buzzer-container h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

#game .buzzer-list {
    display: flex;
    gap: 10px;
}

#game .buzzer-list-item {
    display: flex;
    flex: 1;
    justify-content: space-between;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background-color: #e8e8e8;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 1.2rem;
}

#game .buzzer-position {
    font-weight: bold;
    color: #007BFF;
}

#game .buzzer-player-name {
    color: #333;
}

#game .buzzer-controls {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

#game .buzzer-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    color: #fff;
    transition: background-color 0.3s;
}

#game .accept-btn {
    background-color: #28a745;
}

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

#game .reject-btn {
    background-color: #dc3545;
}

#game .reject-btn:hover {
    background-color: #c82333;
}

#game .options-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 20px;
}

#game .checkbox-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid;
    border-radius: 10px;
    margin: 5px 0;
    font-size: 18px; /* Taille en pixels */
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease; /* Ajout de la transition */
    color: #fff;
}

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

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

#game .checkbox-btn .response {
    flex : 2;
    font-size: 32px;
}

#game .info {
    flex : 1;
    font-size: 16px;
}

/*------------*/
/* SCOREBOARD */
/*------------*/ 
#scoreboard {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    margin-top: 20px; /* Ajoute un espace au-dessus du scoreboard */
    margin-bottom: 20px; /* Ajoute un espace en-dessous du scoreboard */
    flex-grow: 1;

    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.20);
    padding: 20px;
    transition: opacity 0.5s ease-in-out;
}

#scoreboard h2 {
    font-size: 24px; /* Taille en pixels */
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

#scoreboard table {
    width: 100%;
    border-collapse: collapse;
    flex-grow: 1; /* Permet à la table de grandir pour occuper l'espace disponible */
}

#scoreboard th, #scoreboard td {
    border: 1px solid #ccc;
    padding: 8px;
    box-sizing: border-box; /* Assure que padding est inclus dans les dimensions */
}

#scoreboard th {
    background-color: #f9f9f9;
    color: blue;
    text-align: center;
}

#scoreboard td {
    text-align: center;
}

#scoreboard td.scoreboardPosition, #scoreboard td.scoreboardScore {
    text-align: center; /* Centre les cellules de position et de score */
}

#scoreboardHead {
    height: auto;
}

#scoreboardBody {
    width: 100%;
    overflow-y: auto; /* Permet le défilement à l'intérieur de la table si nécessaire */
}

#scoreboard .answered { font-weight: bold; }

#scoreboard .scoreboardName {
    text-align: left;
}

#scoreboard .scoreboard-player-label {
    display: inline;
}

#scoreboard .answer-outcome-pill {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    vertical-align: middle;
    line-height: 1.3;
}

#scoreboard .answer-outcome-pill--correct {
    background-color: #28a745;
    color: #fff;
}

#scoreboard .answer-outcome-pill--partial {
    background-color: #fd7e14;
    color: #fff;
}

#scoreboard .answer-outcome-pill--incorrect {
    background-color: #dc3545;
    color: #fff;
}

#scoreboard .answer-outcome-pill--pending {
    background-color: #6c757d;
    color: #fff;
}

#scoreboard tr.scoreboard-row--correct {
    box-shadow: inset 4px 0 0 #28a745;
}

#scoreboard tr.scoreboard-row--partial {
    box-shadow: inset 4px 0 0 #fd7e14;
}

#scoreboard tr.scoreboard-row--incorrect {
    box-shadow: inset 4px 0 0 #dc3545;
}

#scoreboard tr.scoreboard-row--pending {
    box-shadow: inset 4px 0 0 #6c757d;
}

#scoreboard .scoreboard-row-disconnected {
    opacity: 0.68;
    background-color: #fff8e6;
}

#scoreboard .scoreboard-offline-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background-color: #6c757d;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

#scoreboard .scoreboard-offline-cell {
    text-align: center;
    vertical-align: middle;
}


#scoreboard button {
    padding: 5px 10px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px; /* Taille en pixels */
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#scoreboard button:hover {
    background-color: #218838;
}

#scoreboard button.minus {
    background-color: #dc3545;
}

#scoreboard button.minus:hover {
    background-color: #c82333;
}

#scoreboard button:focus {
    outline: none;
}

#scoreboard .scoreboardModify {
    text-align: center;
}

@media (max-width: 600px) {
    #game {
        display: flex;
        flex-direction: column;
    }

    #ready #questionnaire {
        width: 100%; /* Ajusté pour les smartphones */
    }

    #ready #questionnaireName {
        font-size: 18px; /* Taille en pixels */
    }

    #ready #questionnaireRules {
        font-size: 18px; /* Taille en pixels */
    }

    #scoreboard {
        height: auto;
        margin-top: 20px; /* Ajoute un espace au-dessus du scoreboard */
    }
}

.changelog-page {
    max-width: 800px;
    margin: 0 auto 48px;
    padding: 0 20px;
}
.changelog-intro {
    color: #555;
    margin-bottom: 20px;
}
.changelog-entry {
    background: white;
    padding: 16px 20px;
    margin-bottom: 16px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.changelog-entry h2 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}
.changelog-date {
    font-weight: normal;
    color: #666;
    font-size: 0.95rem;
}
.changelog-section {
    margin-top: 14px;
    padding: 10px 12px 10px 14px;
    border-radius: 8px;
    border-left: 4px solid #ccc;
    background: #fafafa;
}
.changelog-section:first-of-type {
    margin-top: 8px;
}
.changelog-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.changelog-section--nouveaute {
    border-left-color: #2e7d32;
    background: #f1f8f4;
}
.changelog-section--nouveaute .changelog-section-title {
    color: #1b5e20;
}
.changelog-section--amelioration {
    border-left-color: #1565c0;
    background: #f0f6fc;
}
.changelog-section--amelioration .changelog-section-title {
    color: #0d47a1;
}
.changelog-section--comportement {
    border-left-color: #ef6c00;
    background: #fff8f0;
}
.changelog-section--comportement .changelog-section-title {
    color: #e65100;
}
.changelog-section--correction {
    border-left-color: #c62828;
    background: #fdf5f5;
}
.changelog-section--correction .changelog-section-title {
    color: #b71c1c;
}
.changelog-items {
    margin: 0 0 0 1.1rem;
    padding: 0;
}
.changelog-items li {
    margin-bottom: 6px;
}
.changelog-empty {
    color: #666;
    font-style: italic;
}

/*------------*/
/* End */
/*------------*/ 

#end .end {
    width: 100%;
    padding: 20px;
    height: 15vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}
#end button {
    width: 50%;
    padding: 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px; /* Taille en pixels */
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
    margin-bottom: 10px;
}

#end button:hover {
    background-color: #218838;
}