.scene {
	--papier: #f4f1eb;
	position: relative;
	max-width: min(1080px, 86vw, 128vh);
	margin: 0 auto;
	perspective: 2600px;
	perspective-origin: 50% 50%;
}

.livre {
	position: relative;
	width: 100%;
	aspect-ratio: 3 / 2;
	transform-style: preserve-3d;
}

.ombre-sol {
	position: absolute;
	left: 4%;
	right: 4%;
	bottom: -26px;
	height: 46px;
	background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,.24), rgba(0,0,0,0) 72%);
	filter: blur(14px);
}

.bloc {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 50%;
	z-index: 10;
	transform-style: preserve-3d;
}

.bloc.gauche {
	left: 50%;
	transform-origin: left center;
	transform: rotateY(-180deg);
}

.bloc.droite {
	right: 0;
	transform-origin: left center;
	transform: rotateY(0deg);
}

.bloc.gauche .feuillet {
	transform: rotateY(180deg);
	backface-visibility: hidden;
}

.epaisseur {
	position: absolute;
	top: 3px;
	bottom: 3px;
	width: 9px;
	background: repeating-linear-gradient(to right, #e8e4dd 0 1px, #f7f5f1 1px 2.6px);
	box-shadow: 0 10px 22px rgba(0,0,0,.16);
}

.bloc.gauche .epaisseur,
.bloc.droite .epaisseur { right: -7px; border-radius: 0 2px 2px 0; }

.couverture {
	position: absolute;
	top: -4px;
	bottom: -4px;
	width: 5px;
	box-shadow: 0 14px 30px rgba(0,0,0,.18);
}

.bloc.gauche .couverture,
.bloc.droite .couverture {
	right: -12px;
	border-radius: 0 2px 2px 0;
	background: linear-gradient(to left, #b9b3aa, var(--couv));
}

.livre .feuillet {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background-color: var(--papier);
	background-image: var(--texture-papier, none);
	background-size: 620px auto;
}

.bloc .feuillet { border-radius: 3px; }

.gouttiere {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 34%;
	pointer-events: none;
	z-index: 5;
}

.bloc.gauche .gouttiere,
.bloc.droite .gouttiere {
	left: 0;
	background: linear-gradient(to left, rgba(0,0,0,0), rgba(0,0,0,.06) 52%, rgba(0,0,0,.34));
}

.reliure {
	position: absolute;
	top: -3px;
	bottom: -3px;
	left: 50%;
	width: 42px;
	margin-left: -21px;
	z-index: 400;
	pointer-events: none;
	background: linear-gradient(to right,
		rgba(0,0,0,0) 0%,
		rgba(0,0,0,.2) 34%,
		rgba(0,0,0,.34) 49%,
		rgba(255,255,255,.08) 51%,
		rgba(0,0,0,.34) 53%,
		rgba(0,0,0,.2) 66%,
		rgba(0,0,0,0) 100%);
}

.feuille {
	position: absolute;
	top: 0;
	left: 50%;
	width: 50%;
	height: 100%;
	transform-origin: left center;
	transform-style: preserve-3d;
	transform: rotateY(0deg);
	transition: transform 1.05s cubic-bezier(.5,.02,.28,1);
	will-change: transform;
}

.feuille.tournee { transform: rotateY(-180deg); }

.face {
	position: absolute;
	inset: 0;
	overflow: hidden;
	backface-visibility: hidden;
	background-color: var(--papier);
	background-image: var(--texture-papier, none);
	background-size: 620px auto;
}

.face.recto { border-radius: 0 3px 3px 0; }
.face.verso { transform: rotateY(180deg); border-radius: 3px 0 0 3px; }

.visuel {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.visuel img {
	height: 100%;
	display: block;
	object-fit: cover;
	filter: contrast(1.02);
}

.visuel.entiere img { width: 100%; }

.visuel.moitie img {
	width: 200%;
	max-width: none;
}

.visuel.moitie-droite img { margin-left: -100%; }

.face .pli {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 36%;
	pointer-events: none;
	z-index: 4;
}

.face.recto .pli {
	left: 0;
	background: linear-gradient(to right, rgba(0,0,0,.36), rgba(0,0,0,.07) 48%, rgba(0,0,0,0));
}

.face.verso .pli {
	right: 0;
	background: linear-gradient(to left, rgba(0,0,0,.36), rgba(0,0,0,.07) 48%, rgba(0,0,0,0));
}

.face .lueur {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 6;
	opacity: 0;
}

.face.recto .lueur {
	background: linear-gradient(to right,
		rgba(6,8,10,.55) 0%,
		rgba(6,8,10,.26) 22%,
		rgba(6,8,10,.1) 48%,
		rgba(6,8,10,.02) 78%,
		rgba(6,8,10,0) 100%);
}

.face.verso .lueur {
	background: linear-gradient(to left,
		rgba(6,8,10,.55) 0%,
		rgba(6,8,10,.26) 22%,
		rgba(6,8,10,.1) 48%,
		rgba(6,8,10,.02) 78%,
		rgba(6,8,10,0) 100%);
}

@keyframes mc-lueur {
	0% { opacity: 0; }
	18% { opacity: .35; }
	46% { opacity: 1; }
	72% { opacity: .5; }
	100% { opacity: 0; }
}

.feuille.bascule .lueur {
	animation: mc-lueur 1.05s cubic-bezier(.5,.02,.28,1) both;
}

.voile {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 50%;
	z-index: 350;
	pointer-events: none;
	opacity: 0;
	background: linear-gradient(to left,
		rgba(0,0,0,.42) 0%,
		rgba(0,0,0,.16) 26%,
		rgba(0,0,0,0) 62%);
}

@keyframes mc-voile {
	0% { opacity: 0; }
	26% { opacity: 1; }
	62% { opacity: .58; }
	100% { opacity: 0; }
}

.livre.anime .voile {
	animation: mc-voile 1.05s cubic-bezier(.5,.02,.28,1) both;
}

.zone {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 50%;
	z-index: 500;
	cursor: pointer;
}

.zone.arriere { left: 0; }
.zone.avant { right: 0; }

.fleche {
	position: absolute;
	top: 50%;
	z-index: 600;
	width: 54px;
	height: 54px;
	margin-top: -27px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: var(--encre);
	opacity: .38;
	transition: opacity .45s ease, transform .55s cubic-bezier(.19,1,.22,1);
}

.fleche svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1; }

.fleche.gauche { left: -66px; }
.fleche.droite { right: -66px; }

.scene:hover .fleche { opacity: .62; }

.fleche:hover { opacity: 1; }
.fleche.gauche:hover { transform: translateX(-5px); }
.fleche.droite:hover { transform: translateX(5px); }

.fleche:disabled { opacity: .1; cursor: default; transform: none; }

.fleche::after {
	content: '';
	position: absolute;
	bottom: 12px;
	left: 50%;
	width: 26px;
	height: 1px;
	background: currentColor;
	transform: translateX(-50%) scaleX(0);
	transition: transform .5s cubic-bezier(.19,1,.22,1);
}

.fleche:hover:not(:disabled)::after { transform: translateX(-50%) scaleX(1); }

.barre {
	display: flex;
	justify-content: center;
	margin-top: clamp(30px, 4vw, 46px);
}

.compteur { font-size: .72rem; letter-spacing: .22em; color: var(--gris); }

@media (max-width: 1120px) {
	.fleche.gauche { left: 4px; }
	.fleche.droite { right: 4px; }
	.fleche { color: #fff; opacity: .55; mix-blend-mode: difference; }
}

@media (max-width: 860px) {
	.onglets,
	#vue-livre {
		display: none !important;
	}

	#vue-mosaique {
		display: block !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.feuille, .fleche { transition: none; }
	.lueur, .voile { animation: none; opacity: 0; }
}


.onglets {
	display: flex;
	gap: 0;
	margin: clamp(30px, 4vw, 48px) 0 clamp(22px, 2.6vw, 32px);
	border-bottom: 1px solid var(--trait);
}

.onglets button {
	position: relative;
	background: none;
	border: 0;
	padding: 0 0 14px;
	margin-right: 34px;
	font-family: var(--texte);
	font-weight: 300;
	font-size: .74rem;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--gris);
	cursor: pointer;
	transition: color .4s ease;
}

.onglets button::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 1px;
	background: var(--encre);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform .5s cubic-bezier(.19,1,.22,1);
}

.onglets button:hover { color: var(--encre); }

.onglets button.actif { color: var(--encre); }

.onglets button.actif::after,
.onglets button:hover::after {
	transform: scaleX(1);
	transform-origin: left;
}

.vue { display: none; }
.vue.visible { display: block; }


.tax-categorie-projet .section-courte { padding-bottom: clamp(10px, 1.6vw, 20px); }


.face { overflow: hidden; }

.feuillet-final {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-color: var(--papier);
	background-image: var(--texture-papier, none);
	background-size: 620px auto;

	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 26px;
	padding: clamp(24px, 4vw, 48px);
	text-align: center;
	background-color: var(--papier);
	background-image: var(--texture-papier, none);
	background-size: 620px auto;
}

.feuillet-logo {
	max-width: min(62%, 250px);
	height: auto;
	opacity: .9;
}

.feuillet-nom {
	font-family: var(--texte);
	font-weight: 300;
	font-size: clamp(.9rem, 1.6vw, 1.2rem);
	letter-spacing: .3em;
	text-indent: .3em;
	text-transform: uppercase;
}

.feuillet-mot {
	font-family: var(--titre);
	font-weight: 400;
	font-size: clamp(.96rem, 1.76vw, 1.4rem);
	line-height: 1.2;
	max-width: 20ch;
	color: var(--encre);
}

.feuillet-lien {
	font-family: var(--texte);
	font-size: .66rem;
	letter-spacing: .22em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--gris);
	padding-bottom: 6px;
	border-bottom: 1px solid var(--trait);
	transition: color .4s ease, border-color .4s ease;
}

.feuillet-lien:hover { color: var(--accent); border-color: var(--accent); }

.feuillet-final { pointer-events: auto; }
.feuillet-lien { position: relative; z-index: 2; }

.livre-fin .fleche.droite,
.livre-fin .zone.avant { display: none; }


@media (prefers-reduced-motion: reduce) {
	.feuillet-final { animation: none; }
}


.feuillet-titre { justify-content: space-between; padding: clamp(34px, 5vw, 62px) clamp(24px, 4vw, 48px); }

.feuillet-serie {
	font-family: var(--titre);
	font-weight: 400;
	font-size: clamp(1.28rem, 2.4vw, 1.92rem);
	line-height: 1.15;
	margin: auto 0;
	max-width: 14ch;
}

.feuillet-logo-bas { max-width: min(46%, 170px); opacity: .55; margin: 0; }

.feuillet-titre .feuillet-nom { opacity: .55; font-size: .72rem; }


.onglets button:focus-visible,
.fleche:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}
