/**
 * Flore — Puzzles floraux. Version 1.6.1.
 *
 * La page d'accueil des puzzles (cartes) vit dans le contenu ; le jeu s'ouvre en plein
 * écran par-dessus. Le plateau reste couleur papier de nuit comme de jour : c'est une
 * planche dessinée, pas un élément d'interface.
 */

/* --- la liste des puzzles ------------------------------------------------------------ */

.flore-pz__cartes {
	list-style: none;
	margin: 1.25rem 0 2.25rem;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
	gap: 1rem;
}

.flore-pz__cartes--photos {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr));
	gap: .75rem;
}

.flore-pz__carte {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--flore-violet-pale, #D6C9E6);
	border-radius: 14px;
	background: rgba(255, 255, 255, .55);
	overflow: hidden;
}

.flore-pz .flore-pz__lancer {
	display: block;
	position: relative;
	color: inherit;
	text-decoration: none;
	border-bottom: 0;
	box-shadow: none;
}

.flore-pz__vignette {
	display: block;
	position: relative;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background: #F7F4EC;
}

.flore-pz__vignette img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
	pointer-events: none;
	-webkit-user-select: none;
	user-select: none;
	-webkit-user-drag: none;
}

.flore-pz__vignette::after {
	content: "";
	position: absolute;
	inset: 0;
	border: 3px solid transparent;
	border-radius: 14px 14px 0 0;
	transition: border-color .2s ease;
	pointer-events: none;
}

.flore-pz__lancer:hover .flore-pz__vignette img,
.flore-pz__lancer:focus-visible .flore-pz__vignette img {
	transform: scale(1.06);
}

.flore-pz__lancer:hover .flore-pz__vignette::after,
.flore-pz__lancer:focus-visible .flore-pz__vignette::after {
	border-color: var(--flore-orange, #935516);
}

.flore-pz__lancer:focus-visible {
	outline: 3px solid var(--flore-rose, #AD717B);
	outline-offset: -3px;
}

.flore-pz__nom {
	display: block;
	padding: .6rem .8rem 0;
	font-weight: 600;
	line-height: 1.3;
}

.flore-pz__meta {
	display: block;
	padding: .15rem .8rem .7rem;
	font-size: .85rem;
	opacity: .78;
}

.flore-pz__compo {
	margin: auto 0 0;
	padding: 0 .8rem .7rem;
	font-size: .88rem;
	line-height: 1.5;
}

.flore-pz__compo summary {
	cursor: pointer;
	font-size: .84rem;
	color: var(--flore-violet, #7B5AA6);
}

.flore-pz__compo summary:focus-visible {
	outline: 3px solid var(--flore-rose, #AD717B);
	outline-offset: 2px;
}

.flore-pz__compo[open] summary {
	margin-bottom: .4rem;
}

.flore-pz__compo p {
	margin: 0 0 .4rem;
}

.flore-pz .flore-pz__roles {
	margin: 0 0 .5rem;
	padding-left: 1.1rem;
}

.flore-pz .flore-pz__roles li {
	margin: 0;
}

.flore-pz__prudence {
	font-weight: 600;
}

html.flore-nuit .flore-pz__carte {
	background: rgba(255, 255, 255, .04);
	border-color: #3a3346;
}

html.flore-nuit .flore-pz__compo summary,
html.flore-nuit .flore-pz--actif .flore-pz__jouer {
	color: #CBB6E6;
}

.flore-pz__jouer {
	display: none;
}

.flore-pz--actif .flore-pz__jouer {
	display: inline-block;
	margin-top: .15rem;
	font-size: .82rem;
	font-weight: 600;
	color: var(--flore-violet, #7B5AA6);
}

.flore-pz__sansjs {
	font-size: .9rem;
	font-style: italic;
}

.flore-pz--actif .flore-pz__sansjs {
	display: none;
}

/* --- le jeu en plein écran ------------------------------------------------------------ */

html.flore-pz-ouvert,
html.flore-pz-ouvert body {
	overflow: hidden;
}

.flore-pz-jeu {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	flex-direction: column;
	background: #F7F4EC;
	color: #342F3D;
	font-size: 16px;
	line-height: 1.4;
}

.flore-pz-jeu[hidden] {
	display: none;
}

html.flore-nuit .flore-pz-jeu {
	background: #17191c;
	color: #E9E4F0;
}

.flore-pz-jeu__barre {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem .9rem;
	padding: .55rem max(16px, 1rem);
	border-bottom: 1px solid #D6C9E6;
}

html.flore-nuit .flore-pz-jeu__barre {
	border-color: #3a3346;
}

.flore-pz-jeu__tete {
	flex: 1 1 12rem;
	min-width: 0;
}

.flore-pz-jeu.flore-pz-jeu .flore-pz-jeu__titre {
	margin: 0;
	font-size: clamp(1.05rem, 2.4vw, 1.4rem);
	line-height: 1.2;
	color: #4C3A6B;
	outline: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

html.flore-nuit .flore-pz-jeu.flore-pz-jeu .flore-pz-jeu__titre {
	color: #CBB6E6;
}

.flore-pz-jeu__compte {
	margin: .1rem 0 0;
	font-size: .85rem;
	opacity: .8;
	font-variant-numeric: tabular-nums;
}

.flore-pz-jeu__niveaux,
.flore-pz-jeu__outils {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
}

.flore-pz-jeu__aide {
	margin: 0;
	padding: .35rem max(16px, 1rem) 0;
	font-size: .88rem;
	font-style: italic;
	opacity: .85;
}

.flore-pz-jeu__annonce {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.flore-pz-jeu.flore-pz-jeu button {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	min-height: 40px;
	margin: 0;
	padding: .35rem .85rem;
	font: inherit;
	font-size: .88rem;
	line-height: 1.1;
	color: #4C3A6B;
	background: #fff;
	border: 1px solid #CDBFE0;
	border-radius: 999px;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}

.flore-pz-jeu.flore-pz-jeu button:hover {
	color: #7B5AA6;
	border-color: #7B5AA6;
	background: #fff;
}

.flore-pz-jeu.flore-pz-jeu button:focus-visible {
	outline: 3px solid #AD717B;
	outline-offset: 2px;
}

.flore-pz-jeu.flore-pz-jeu button[aria-checked="true"],
.flore-pz-jeu.flore-pz-jeu button[aria-pressed="true"],
.flore-pz-jeu.flore-pz-jeu button.est-principal {
	color: #fff;
	background: #7B5AA6;
	border-color: #7B5AA6;
}

html.flore-nuit .flore-pz-jeu.flore-pz-jeu button {
	color: #E9E4F0;
	background: #24212b;
	border-color: #4a4058;
}

html.flore-nuit .flore-pz-jeu.flore-pz-jeu button[aria-checked="true"],
html.flore-nuit .flore-pz-jeu.flore-pz-jeu button[aria-pressed="true"],
html.flore-nuit .flore-pz-jeu.flore-pz-jeu button.est-principal {
	color: #17191c;
	background: #CBB6E6;
	border-color: #CBB6E6;
}

.flore-pz-jeu__pastilles {
	font-size: .45rem;
	letter-spacing: 1px;
	opacity: .8;
}

.flore-pz-jeu.flore-pz-jeu .flore-pz-jeu__fermer {
	padding-left: .5rem;
}

.flore-pz-jeu__fermer svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.flore-pz-jeu__scene {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	padding: .25rem max(8px, .5rem) .5rem;
}

.flore-pz-svg {
	display: block;
	outline: none;
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 0;
	touch-action: none;
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
}

.flore-pz-jeu__fin {
	flex: 0 0 min(27rem, 42%);
	align-self: center;
	max-height: 100%;
	overflow: auto;
	padding: 1rem 1.25rem;
	outline: none;
}

.flore-pz-jeu__fin[hidden] {
	display: none;
}

@media (max-aspect-ratio: 1/1) {
	.flore-pz-jeu__scene.est-fini {
		flex-direction: column;
	}

	.flore-pz-jeu__fin {
		flex: 0 1 auto;
		align-self: stretch;
		max-height: 52%;
	}
}

.flore-pz-jeu.flore-pz-jeu .flore-pz-fin__titre {
	margin: 0 0 .3rem;
	font-size: 1.5rem;
	color: #4C3A6B;
}

html.flore-nuit .flore-pz-jeu.flore-pz-jeu .flore-pz-fin__titre {
	color: #CBB6E6;
}

.flore-pz-fin__bilan {
	margin: 0 0 .8rem;
	font-size: .9rem;
	opacity: .8;
}

.flore-pz-fin__corps p {
	margin: 0 0 .6rem;
}

.flore-pz-fin__corps a,
.flore-pz-fin__fiche {
	color: #7B5AA6;
}

html.flore-nuit .flore-pz-fin__corps a,
html.flore-nuit .flore-pz-fin__fiche {
	color: #CBB6E6;
}

.flore-pz-fin__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
	margin-top: 1rem;
}

@media (max-width: 720px) {
	.flore-pz-jeu__barre {
		gap: .4rem .5rem;
		padding-top: .4rem;
		padding-bottom: .4rem;
	}

	.flore-pz-jeu.flore-pz-jeu button {
		min-height: 36px;
		padding: .3rem .6rem;
		font-size: .8rem;
	}

	.flore-pz-jeu__niveaux,
	.flore-pz-jeu__outils {
		flex: 1 1 100%;
	}

	.flore-pz-jeu__pastilles {
		display: none;
	}

	.flore-pz-jeu__aide {
		display: none;
	}
}

/* --- le plateau ------------------------------------------------------------------------- */

.flore-pz-plateau {
	fill: #FBF9F3;
	stroke: #D6C9E6;
	stroke-width: 2;
}

.flore-pz-bac {
	fill: rgba(214, 201, 230, .26);
	stroke: rgba(123, 90, 166, .3);
	stroke-width: 2;
	stroke-dasharray: 10 8;
}

html.flore-nuit .flore-pz-bac {
	fill: rgba(157, 134, 201, .1);
	stroke: rgba(203, 182, 230, .3);
}

.flore-pz-sil {
	transition: opacity .3s ease;
}

.flore-pz-sil--fantome {
	opacity: .34;
}

.flore-pz-silhouettes.est-uni {
	opacity: .55;
}

.flore-pz-sil.est-couverte {
	opacity: 0;
}

.flore-pz-fantome-photo--0 {
	opacity: .36;
}

.flore-pz-fantome-photo--1 {
	opacity: .14;
}

.flore-pz-decoupe {
	fill: none;
	stroke: rgba(76, 58, 107, .32);
	stroke-width: 2;
}

.flore-pz-tiges {
	transition: opacity .8s ease;
}

.flore-pz-tiges.est-cache {
	opacity: 0;
}

.flore-pz-modele {
	opacity: 0;
	pointer-events: none;
	transition: opacity .5s ease;
}

.est-en-intro .flore-pz-modele,
.est-fini .flore-pz-modele {
	opacity: 1;
}

.montre-modele .flore-pz-modele {
	opacity: .88;
}

.flore-pz-jeton {
	cursor: grab;
	outline: none;
	transition: opacity .35s ease;
}

.flore-pz-jeton.est-anime {
	transition: transform .5s cubic-bezier(.2, .8, .25, 1), opacity .35s ease;
}

.flore-pz-jeton__echelle.est-anime {
	transition: transform .18s ease-out;
}

.est-en-intro .flore-pz-jeton {
	opacity: 0;
}

.flore-pz-jeton.est-pris {
	cursor: grabbing;
}

.flore-pz-jeton__cadre {
	fill: none;
	stroke: #AD717B;
	stroke-width: 3;
	vector-effect: non-scaling-stroke;
	opacity: 0;
}

.flore-pz-jeton:focus-visible .flore-pz-jeton__cadre,
.flore-pz-jeton.est-pris .flore-pz-jeton__cadre {
	opacity: 1;
}

.flore-pz-jeton.est-pris .flore-pz-jeton__cadre {
	stroke: #7B5AA6;
	stroke-dasharray: 6 5;
}

.flore-pz-jeton.est-signale .flore-pz-jeton__cadre {
	stroke: #E07A2E;
	animation: flore-pz-clignote .6s ease-in-out 3;
}

.flore-pz-arete {
	fill: none;
	stroke: rgba(255, 255, 255, .6);
	stroke-width: 2.5;
}

.flore-pz-indice__trace {
	fill: rgba(224, 122, 46, .28);
	stroke: #E07A2E;
	stroke-width: 4;
	animation: flore-pz-clignote .6s ease-in-out 3;
}

.flore-pz-eclosion {
	transform-box: view-box;
	animation: flore-pz-eclot .55s ease-out;
}

@keyframes flore-pz-eclot {
	0% {
		transform: scale(1.07);
		opacity: .7;
	}

	100% {
		transform: scale(1);
		opacity: 1;
	}
}

@keyframes flore-pz-clignote {
	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: .15;
	}
}

@media (prefers-reduced-motion: reduce) {
	.flore-pz-jeton.est-anime,
	.flore-pz-jeton__echelle.est-anime,
	.flore-pz-modele,
	.flore-pz-tiges {
		transition: none;
	}

	.flore-pz-eclosion,
	.flore-pz-indice__trace,
	.flore-pz-jeton.est-signale .flore-pz-jeton__cadre {
		animation: none;
	}
}

@media print {
	.flore-pz-jeu {
		display: none !important;
	}

	.flore-pz__cartes {
		grid-template-columns: repeat(3, 1fr);
	}
}
