.labyrintheControles {
	background-color: #eef2f6;
	border-radius: 10px;
	padding: 14px 18px;
	margin: 16px 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 22px;
}
.labyrintheNiveaux {
	display: inline-flex;
	background-color: #fff;
	border-radius: 20px;
	padding: 3px;
	gap: 2px;
}
.labyrintheNiveaux button {
	border: none;
	background: transparent;
	color: #163860;
	font-weight: bold;
	font-size: 0.9em;
	padding: 6px 14px;
	border-radius: 20px;
	cursor: pointer;
}
.labyrintheNiveaux button.actif {
	background-color: #163860;
	color: #fff;
}
.labyrintheStats {
	margin-left: auto;
	font-size: 0.9em;
	color: #5a6b7d;
}
.labyrintheStats b {
	color: #163860;
}
.labyrintheBouton {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: #163860;
	color: #fff !important;
	border: none;
	border-radius: 30px;
	padding: 9px 20px;
	font-size: 0.9em;
	font-weight: bold;
	cursor: pointer;
	text-decoration: none !important;
	box-shadow: 0 2px 6px rgba(22, 56, 96, 0.25);
	transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}
.labyrintheBouton:hover, .labyrintheBouton:focus {
	transform: translateY(-2px);
	box-shadow: 0 6px 14px rgba(22, 56, 96, 0.35);
}

.labyrintheBoutonSecondaire {
	background-color: #fff;
	color: #163860 !important;
	border: 1px solid #163860;
	box-shadow: none;
}
.labyrintheBoutonSecondaire:hover, .labyrintheBoutonSecondaire:focus {
	background-color: #eef2f6;
	box-shadow: none;
}

.labyrintheJeu {
	max-width: 620px;
	margin: 20px auto;
	background-color: #fff;
	border: 1px solid #ddd;
	border-radius: 10px;
	padding: 16px;
	box-shadow: 0 2px 6px rgba(22, 56, 96, 0.12);
	touch-action: none;
	user-select: none;
}
.labyrintheQuestion {
	text-align: center;
	color: #163860;
	font-size: 1.1em;
	margin-bottom: 12px;
}

.labyrintheEtiquettes {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	margin-bottom: 22px;
}
.etiquette {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 2.6em;
	padding: 4px 6px;
	border: 2px solid #163860;
	border-radius: 8px;
	background-color: #eef2f6;
	color: #163860;
	font-weight: bold;
	font-size: clamp(0.7rem, 2.6vw, 1rem);
	text-align: center;
	overflow-wrap: anywhere;
	cursor: pointer;
}
.etiquette .lettre, .case.sortie::before {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5em;
	height: 1.5em;
	flex: none;
	border-radius: 50%;
	background-color: #c9922b;
	color: #fff;
	font-size: 0.85em;
}
.etiquette.bonne {
	background-color: #2fa84f;
	border-color: #2fa84f;
	color: #fff;
}
.etiquette.mauvaise {
	background-color: #e0433d;
	border-color: #e0433d;
	color: #fff;
}

.labyrintheGrille {
	position: relative;
	display: grid;
	width: 100%;
	aspect-ratio: 1 / 1;
	background-color: #fff;
}
.labyrintheGrille .case {
	position: relative;
	box-sizing: border-box;
}
.labyrintheGrille .murHaut { border-top: 2px solid #163860; }
.labyrintheGrille .murGauche { border-left: 2px solid #163860; }
.labyrintheGrille .murDroite { border-right: 2px solid #163860; }
.labyrintheGrille .murBas { border-bottom: 2px solid #163860; }
/* l'ouverture vers la sortie est marquée de la lettre de l'étiquette correspondante */
.labyrintheGrille .case.sortie {
	background-color: #fdf3dd;
}
.case.sortie::before {
	content: attr(data-lettre);
	position: absolute;
	left: 50%;
	top: -1.4em;
	transform: translateX(-50%);
	font-weight: bold;
	font-size: 0.7rem;
}
.labyrintheGrille .personnage {
	position: absolute;
	left: 0;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	pointer-events: none;
	transition: transform 0.1s linear;
}
.labyrintheChargement {
	color: #5a6b7d;
	font-style: italic;
}

#labyrintheDialogue {
	text-align: center;
	border: none;
	border-radius: 16px;
	padding: 24px;
	box-shadow: 0 4px 24px rgba(0,0,0,.3);
	animation: labyrintheDialogueOuverture .3s ease-out;
}
#labyrintheDialogue::backdrop {
	background: rgba(0,0,0,.4);
}
#labyrintheDialogue h1 {
	color: #e0433d;
}
#labyrintheDialogue.gagne h1 {
	color: #2fa84f;
}
@keyframes labyrintheDialogueOuverture {
	from { transform: scale(.85); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}
#labyrintheDialogue button {
	margin-top: 16px;
	border: none;
	border-radius: 20px;
	background-color: #163860;
	color: #fff;
	font-weight: bold;
	padding: 8px 20px;
	cursor: pointer;
}

@media (max-width: 640px) {
	.labyrintheStats { margin-left: 0; }
	.labyrintheJeu { padding: 10px; }
}
