/* --- STYLES GÉNERAUX --- */
:root {
    --primary: #6c5ce7;
    --secondary: #00cec9;
    --danger: #ff7675;
    --dark: #2d3436;
    --light: #f5f6fa;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #192a56 0%, #273c75 100%);
    color: var(--dark);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- CONTENEUR PRINCIPAL (Les Cartes) --- */
.card {
    background: #ffffff;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
    box-sizing: border-box;
    margin-bottom: 20px;
}

h1, h2, h3 {
    color: var(--primary);
    margin-top: 0;
}

/* --- BOUTONS --- */
button {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    margin-bottom: 10px;
    color: white;
    box-sizing: border-box;
}
button:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
button:active { transform: translateY(0); }

.btn-primary { background: var(--primary); }
.btn-secondary { background: var(--secondary); color: var(--dark); }
.btn-danger { background: var(--danger); width: auto; padding: 5px 10px; }
.btn-game-choice { font-size: 1.3em; padding: 20px; margin-bottom: 15px; }

/* --- CHAMPS DE SAISIE --- */
input[type="text"] {
    font-family: 'Poppins', sans-serif;
    width: 100%;
    padding: 12px;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    margin-bottom: 15px;
    transition: border-color 0.2s;
}
input[type="text"]:focus { border-color: var(--primary); outline: none; }

/* --- LISTES ET TABLEAU DES SCORES --- */
ul { list-style-type: none; padding: 0; }
li {
    background: var(--light);
    margin-bottom: 8px;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
}

#scoreCorner {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: none;
    z-index: 1000;
    min-width: 150px;
}
#scoreCorner h4 { margin: 0 0 10px 0; color: var(--primary); border-bottom: 2px solid var(--light); padding-bottom: 5px;}

/* --- ÉDITEUR DE QUESTIONS --- */
#optionsDiv {
    display: none;
    background: var(--light);
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: left;
}
.question-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid #dfe6e9;
    font-size: 0.9em;
}
.add-question-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* --- DETAILS (ACCORDÉONS DE FIN) --- */
details { background: white; padding: 15px; margin-bottom: 10px; border-radius: 8px; border: 1px solid #dfe6e9; cursor: pointer; text-align: left;}
summary { font-weight: bold; color: var(--primary); outline: none; }
.success-item { color: #00b894; border-left: 4px solid #00b894; padding-left: 10px; }
.fail-item { color: #d63031; border-left: 4px solid #d63031; padding-left: 10px; }

hr { border: 0; height: 2px; background: #dfe6e9; margin: 25px 0; }

/* --- ADAPTATION POUR TÉLÉPHONES (MOBILE FIRST) --- */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    #scoreCorner {
        position: static; /* On annule l'effet "fixé" qui passe par dessus le texte */
        width: 100%;
        max-width: 500px;
        margin-bottom: 20px;
        box-sizing: border-box;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
}


/* --- NOUVEAUX STYLES AJOUTÉS --- */
.header-game { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; background: var(--light); padding: 10px; border-radius: 8px;}
.pb-validation-item { display: flex; justify-content: space-between; align-items: center; background: white; border: 1px solid #ccc; padding: 10px; margin-bottom: 8px; border-radius: 6px;}
.hidden-points { font-style: italic; color: #888; font-size: 0.8em; }

/* Styles spécifiques au Quizz */
.quizz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.quizz-btn { 
	padding: 15px; 
	font-size: 1.1em; 
	border-radius: 8px; 
	background: var(--light); 
	border: 2px solid #ccc; 
	cursor: pointer; 
	transition: 0.2s; 
	font-weight: bold;
	color: #2c3e50 !important; 
	}
.quizz-btn:hover, .quizz-btn.selected { background: var(--primary); color: white; border-color: var(--primary); }
.quizz-theme-btn { margin-bottom: 10px; width: 100%; }
.result-box { background: var(--light); padding: 15px; border-radius: 8px; margin-top: 20px; text-align: left; }


/* --- Styles spécifiques au PENDU --- */
#penduKeyboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto 20px auto;
}
.pendu-key { 
    padding: 10px; 
    font-size: 1.2em; 
    border-radius: 8px; 
    background: #ffffff; 
    border: 2px solid #ccc; 
    cursor: pointer; 
    width: 45px; /* Largeur fixe pour faire des carrés propres */
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--dark);
    transition: 0.2s;
    box-sizing: border-box;
}
.pendu-key:hover { background: var(--primary); color: white; border-color: var(--primary); }
.pendu-key:disabled { background: #dfe6e9; color: #b2bec3; border-color: #dfe6e9; cursor: not-allowed; transform: none; box-shadow: none; }
