/* La Gazette — kiosque et lecteur */

.gz-kiosque {
	--gz-encre: #1c4034;
	--gz-papier: #f7f6f2;
	--gz-trait: rgba(28, 64, 52, 0.16);

	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 2.25rem 1.75rem;
	margin: 2rem 0;
}

.gz-carte {
	margin: 0;
}

.gz-ouvrir {
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 0;
	background: none;
	border: 0;
	text-align: left;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	font: inherit;
}

.gz-couverture {
	position: relative;
	display: block;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: #ece9e2;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.gz-couverture img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gz-ouvrir:hover .gz-couverture,
.gz-ouvrir:focus-visible .gz-couverture {
	transform: translateY(-4px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.gz-ouvrir:focus-visible {
	outline: 2px solid #1c4034;
	outline-offset: 4px;
}

.gz-couverture-vide {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	font-size: 2rem;
	color: rgba(28, 64, 52, 0.35);
}

.gz-cadenas {
	position: absolute;
	right: 0.6rem;
	bottom: 0.6rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	font-size: 0.95rem;
	background: rgba(255, 255, 255, 0.94);
	border-radius: 50%;
}

.est-verrouille .gz-couverture img {
	filter: grayscale(0.35) brightness(0.94);
}

.gz-titre {
	display: block;
	margin-top: 0.85rem;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	color: #1c4034;
}

.gz-action {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.82rem;
	color: rgba(28, 64, 52, 0.65);
}

/* Le lecteur */

body.gz-ouvert {
	overflow: hidden;
}

.gz-lecteur {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	background: #101d18;
}

.gz-lecteur[hidden] {
	display: none;
}

.gz-lecteur-barre {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.85rem 1.1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.gz-lecteur-titre {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: #f2f0ea;
}

.gz-fermer {
	width: 40px;
	height: 40px;
	font-size: 1.1rem;
	color: #f2f0ea;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 50%;
	cursor: pointer;
}

.gz-fermer:hover,
.gz-fermer:focus-visible {
	background: rgba(255, 255, 255, 0.12);
}

.gz-scene {
	position: relative;
	flex: 1;
	display: flex;
	align-items: stretch;
	justify-content: center;
	padding: 0.5rem 0.5rem 0;
	min-height: 0;
}

.gz-livre {
	width: 100%;
	max-width: 1500px;
	height: 100%;
	min-height: 0;
}

.gz-feuille {
	background: #fff;
	overflow: hidden;
}

.gz-feuille img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #fff;
}

.gz-etat {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.9rem;
	padding: 1rem;
	color: #e8e5dd;
	font-size: 0.95rem;
	text-align: center;
}

.gz-roue {
	width: 26px;
	height: 26px;
	border: 2px solid rgba(255, 255, 255, 0.25);
	border-top-color: #e8e5dd;
	border-radius: 50%;
	animation: gz-tourne 0.9s linear infinite;
}

@keyframes gz-tourne {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.gz-roue {
		animation-duration: 3s;
	}
}

.gz-commandes {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 0.85rem 1rem 1.15rem;
}

.gz-bouton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	font-size: 1.4rem;
	line-height: 1;
	color: #f2f0ea;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 50%;
	cursor: pointer;
}

.gz-bouton:hover,
.gz-bouton:focus-visible {
	background: rgba(255, 255, 255, 0.14);
}

.gz-compteur {
	min-width: 5.5rem;
	margin: 0;
	font-size: 0.9rem;
	font-variant-numeric: tabular-nums;
	color: rgba(242, 240, 234, 0.85);
	text-align: center;
}

.gz-note {
	padding: 0.9rem 1.1rem;
	color: #7a3b12;
	background: #fdf3e7;
	border-left: 3px solid #c97a2c;
	font-size: 0.92rem;
}

@media (max-width: 700px) {
	.gz-kiosque {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 1.5rem 1rem;
	}

	.gz-scene {
		padding: 0.6rem;
	}
}

/* Affichage de secours : lecteur PDF du navigateur */

.gz-repli {
	display: block;
	flex: 1;
	width: 100%;
	height: 100%;
	min-height: 0;
	border: 0;
	background: #fff;
}

/* Lien plein ecran sous le lecteur */

.gz-lien-plein {
	display: inline-block;
	margin-top: 0.75rem;
	font-size: 0.88rem;
	color: rgba(242, 240, 234, 0.9);
	text-decoration: underline;
}

.gz-lien-plein:hover,
.gz-lien-plein:focus-visible {
	color: #fff;
}

.gz-scene .gz-livre {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.gz-lien-plein {
	flex: 0 0 auto;
	padding: 0.5rem 0 0.7rem;
}

/* Carte reliee a DearFlip */

.gz-via-dflip {
	cursor: pointer;
}

.gz-declencheur {
	margin-top: 0.5rem;
}

.gz-declencheur a,
.gz-declencheur button {
	display: inline-block;
	padding: 0.45rem 0.9rem;
	font-size: 0.85rem;
	color: #fff;
	background: #1c4034;
	border: 0;
	border-radius: 3px;
	text-decoration: none;
	cursor: pointer;
}

.gz-via-dflip .gz-action {
	display: none;
}

/* Le bouton reste present mais invisible : c'est la couverture qui le declenche */

.gz-via-dflip.gz-clic-ok .gz-declencheur {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.gz-via-dflip.gz-clic-ok .gz-action {
	display: block;
}

.gz-carte {
	position: relative;
}

/* Toutes les couvertures au meme format, quelle que soit l'image d'origine */

.gz-kiosque .gz-couverture {
	position: relative;
	display: block;
	width: 100%;
	height: auto;
	padding-top: 133%;
	aspect-ratio: auto;
	overflow: hidden;
}

.gz-kiosque .gz-couverture img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	object-fit: cover;
	object-position: top center;
}

.gz-kiosque .gz-couverture-vide,
.gz-kiosque .gz-cadenas {
	position: absolute;
}

.gz-kiosque .gz-couverture-vide {
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.gz-kiosque .gz-titre {
	font-size: 0.95rem;
}

@media (max-width: 700px) {
	.gz-kiosque .gz-titre {
		font-size: 0.88rem;
	}

	.gz-kiosque .gz-action {
		font-size: 0.78rem;
	}
}

/* Couvertures plus sobres, hauteur maitrisee */

.gz-kiosque {
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1.75rem 1.25rem;
	align-items: start;
}

.gz-kiosque .gz-carte {
	max-width: 260px;
}

.gz-kiosque .gz-couverture {
	padding-top: 0;
	height: 260px;
}

@media (max-width: 700px) {
	.gz-kiosque {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.25rem 0.9rem;
	}

	.gz-kiosque .gz-couverture {
		height: 200px;
	}
}
