body {
	display: none;
}

.conteneur-edition {
	padding-top: 50px;
	margin-top: 50px;
	margin-bottom: 50px;
	border-top: 1px solid #ddd;
}

.conteneur input,
.conteneur select {
	width: 300px;
}

.conteneur input[type="number"] {
	width: 100px;
}

#champs {
	padding-bottom: 20px;
	border-bottom: 1px solid #ddd;
}

#options {
	padding: 0 0 50px 0;
	margin: 50px 0 30px;
	border-bottom: 1px solid #ddd;
}

#choix {
	display: flex;
	justify-content: center;
}

.oui,
.non {
	display: flex;
}

.oui {
	margin-right: 25px;
}

.oui input,
.non input {
	width: auto;
	padding: 0;
	margin: 0;
	margin-right: 5px;
}

.oui label,
.non label {
	padding: 0;
	margin: 0;
}

.actions {
	text-align: center;
	font-size: 0;
	margin-bottom: 20px;
}

.actions button {
	margin-left: 8px;
	margin-right: 8px;
}

.conteneur-creation {
	display: none;
	margin: 50px auto;
	max-width: 1300px;
}

.conteneur-creation .actions {
	margin-top: 40px;
}

#rejouer {
	display: none;
}

#jeu {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 0;
	border-top: 1px solid #ddd;
	border-bottom: 1px solid #ddd;
}

#illustration {
	width: 30%;
	max-width: 320px;
	margin-right: 50px;
	flex-shrink: 0;
}

.dessin {
	display: none;
	width: 100%;
	height: auto;
	overflow: hidden;
}

.dessin.actif {
	display: block;
}

.dessin .etape {
	opacity: 0;
	transform-box: fill-box;
	transform-origin: center;
	transition: opacity ease-in 0.3s, transform ease-in 0.5s;
}

.dessin .etape.visible {
	opacity: 1;
}

.dessin[data-mode="defaire"] .etape:not(.visible) {
	transform: translateY(40px) rotate(25deg);
}

.dessin .fin-perdu {
	opacity: 0;
	transition: opacity ease-in 0.3s 0.3s;
}

.dessin.perdu .fin-perdu {
	opacity: 1;
}

.dessin.perdu .etape.masque-perdu.visible {
	opacity: 0;
}

.dessin .fondre,
.dessin .decoller {
	transform-box: view-box;
	transform-origin: 100px 205px;
	transition: transform ease-in 2s 0.4s;
}

.dessin.perdu .fondre {
	transform: scale(1.15, 0.4);
}

.dessin.perdu .decoller {
	transform: translateY(-260px);
}

.dessin .coeur,
.dessin .tige {
	transition: fill ease-in 0.5s, stroke ease-in 0.5s;
}

.dessin.perdu .coeur {
	fill: #bbb;
}

.dessin.perdu .tige {
	stroke: #999;
}

#apercu {
	width: 150px;
	margin: 0 auto 10px;
}

#apercu:empty {
	display: none;
}

#apercu img {
	max-width: 100%;
	max-height: 150px;
	border-radius: 0.5em;
}

.conteneur #description-illustration {
	padding-bottom: 30px;
}

#image {
	display: none;
	aspect-ratio: 1;
	border: 1px solid #ddd;
	border-radius: 1em;
	overflow: hidden;
}

#image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	opacity: 0;
	transition: opacity ease-in 0.3s;
}

.conteneur #compteur {
	margin-top: 20px;
	padding: 0;
	font-weight: 700;
}

#compteur strong {
	display: block;
	font-size: 50px;
	line-height: 1.2;
}

#plateau {
	flex-grow: 1;
	min-width: 0;
}

#mot {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 25px 45px;
	margin-bottom: 30px;
}

#mot .groupe {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

#mot .lettre {
	display: inline-block;
	min-width: 1em;
	height: 1.35em;
	font-size: clamp(26px, 4vw, 52px);
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	color: #001d1d;
	border-bottom: 4px solid #001d1d;
}

#mot .lettre.autre {
	min-width: 0.5em;
	border-bottom-color: transparent;
}

#mot.gagne .lettre {
	color: #008f91;
}

#mot.perdu .lettre.manquante {
	color: #ff2d55;
}

.conteneur #resultat {
	min-height: 27px;
	padding: 0 0 25px;
	font-size: 20px;
	font-weight: 700;
}

#resultat.gagne {
	color: #008f91;
}

#resultat.perdu {
	color: #c9372c;
}

#clavier {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	max-width: 760px;
	margin: auto;
}

#clavier button {
	width: 60px;
	height: 60px;
	font-size: 28px;
	font-weight: 700;
	color: #001d1d;
	background: #fff;
	border: 2px solid #001d1d;
	border-radius: 0.5em;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	transition: color ease-in 0.1s, background ease-in 0.1s, border-color ease-in 0.1s;
}

#clavier button:hover:not(:disabled) {
	background: #00ced1;
}

#clavier button:disabled {
	cursor: default;
}

#clavier button.present {
	color: #fff;
	background: #008f91;
	border-color: #008f91;
}

#clavier button.absent {
	color: #767676;
	background: #eee;
	border-color: #ddd;
	text-decoration: line-through;
}

#clavier button:disabled:not(.present):not(.absent) {
	color: #767676;
	border-color: #ddd;
}

@media screen and (max-width: 899px) {
	#jeu {
		flex-direction: column;
	}

	#illustration {
		width: 60%;
		max-width: 240px;
		margin: 0 0 30px;
	}

	#compteur strong {
		font-size: 40px;
	}

	#clavier button {
		width: 48px;
		height: 48px;
		font-size: 22px;
	}
}

@media screen and (max-width: 399px) {
	.conteneur input,
	.conteneur select {
		width: 260px;
	}

	#mot {
		gap: 20px 30px;
	}

	#mot .groupe {
		gap: 6px;
	}

	#clavier {
		gap: 6px;
	}

	#clavier button {
		width: 40px;
		height: 40px;
		font-size: 19px;
	}
}
