/*==========================================================================
  LISEUSE — page lire.php (utilise les variables de theme.css)
==========================================================================*/

.page-reader {
	padding-top: 72px;
}

.reader {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: calc(100vh - 72px);
	padding: 14px 10px 10px;
	background: inherit;
}

.reader:fullscreen {
	padding-top: 20px;
	background-color: var(--green-950);
}

.reader-title {
	font-family: 'Aref Ruqaa', serif;
	font-size: 30px;
	line-height: 1.3;
	color: var(--gold-light);
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
	margin: 0 0 12px;
	text-align: center;
}

.reader:fullscreen .reader-title {
	display: none;
}

/*-------------------------------- LIVRE ---------------------------------*/

.reader-stage {
	direction: ltr; /* flèche gauche à gauche, flèche droite à droite */
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	flex: 1;
}

.reader-book-wrap {
	position: relative;
	min-height: 200px;
}

.reader-book {
	filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5));
}

.reader-page {
	background-color: #ffffff;
}

.reader-page canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.reader-page-blank {
	background-color: var(--cream);
}

.reader-status {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: var(--cream);
	font-family: 'Amiri', serif;
	font-size: 20px;
	padding: 20px;
}

.reader-status a {
	color: var(--gold-light);
	text-decoration: underline !important;
}

.reader-notfound {
	position: static;
	flex-direction: column;
	gap: 20px;
	margin-top: 80px;
}

.reader-notfound p {
	color: var(--cream);
	font-size: 24px;
}

/*------------------------------- FLÈCHES --------------------------------*/

.reader-arrow {
	flex: none;
	width: 48px;
	height: 48px;
	margin: 0 10px;
	border-radius: 50%;
	border: 1px solid rgba(201, 162, 74, 0.6);
	background: rgba(6, 32, 26, 0.6);
	color: var(--gold-light);
	font-size: 20px;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.reader-arrow:hover {
	background: rgba(201, 162, 74, 0.3);
	transform: scale(1.06);
}

.reader-arrow:focus-visible,
.reader-btn:focus-visible {
	outline: 3px solid var(--gold-light);
	outline-offset: 3px;
}

/*------------------------------ BARRE D'OUTILS --------------------------*/

.reader-toolbar {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(6, 32, 26, 0.75);
	border: 1px solid rgba(201, 162, 74, 0.4);
}

.reader-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 4px 16px;
	border-radius: 999px;
	border: 1px solid rgba(201, 162, 74, 0.6);
	background: transparent;
	color: var(--cream);
	font-family: 'Amiri', serif;
	font-size: 16px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.reader-btn:hover,
.reader-btn:focus {
	background: rgba(201, 162, 74, 0.25);
	color: var(--cream);
}

.reader-btn-icon {
	width: 36px;
	padding: 0;
}

.reader-pages {
	min-width: 140px;
	text-align: center;
	color: var(--gold-light);
	font-family: 'Amiri', serif;
	font-size: 17px;
}

/*----------------------------- RESPONSIVE --------------------------------*/

@media (max-width: 767px) {
	.page-reader {
		padding-top: 120px;
	}

	.reader {
		min-height: calc(100vh - 120px);
		padding: 8px 4px;
	}

	.reader-title {
		font-size: 24px;
		margin-bottom: 8px;
	}

	.reader-arrow {
		width: 36px;
		height: 36px;
		margin: 0 4px;
		font-size: 15px;
	}

	.reader-toolbar {
		gap: 6px;
		padding: 6px 10px;
		border-radius: 18px;
	}

	.reader-btn {
		font-size: 14px;
		padding: 2px 10px;
		min-height: 32px;
	}

	.reader-btn-icon {
		width: 32px;
	}

	.reader-pages {
		order: -1;
		width: 100%;
		min-width: 0;
	}
}
