/* PDF Book Library — front-end styles */

.pbl-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
	margin: 30px 0;
}
.pbl-columns-2 { grid-template-columns: repeat(2, 1fr); }
.pbl-columns-3 { grid-template-columns: repeat(3, 1fr); }
.pbl-columns-4 { grid-template-columns: repeat(4, 1fr); }
.pbl-columns-5 { grid-template-columns: repeat(5, 1fr); }
.pbl-columns-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 900px) {
	.pbl-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
	.pbl-grid { grid-template-columns: 1fr !important; }
}

.pbl-card {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease;
	display: flex;
	flex-direction: column;
}
.pbl-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.pbl-cover-link { position: relative; display: block; text-align: center; background: #ececec; }
.pbl-cover {
	width: 281px;
	max-width: 100%;
	height: 400px;
	object-fit: cover;
	display: block;
	margin: 0 auto;
	background: #eee;
}
.pbl-cover-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	font-size: 40px;
}
.pbl-cover-large { width: 281px; height: 400px; }

.pbl-badge-pdf {
	position: absolute;
	top: 8px;
	inset-inline-end: 8px;
	background: #d92d20;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 4px;
	letter-spacing: .5px;
}

.pbl-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.pbl-title { font-size: 15px; margin: 0 0 4px; line-height: 1.35; }
.pbl-title a { color: #1a1a1a; text-decoration: none; }
.pbl-title a:hover { color: #0073aa; }
.pbl-author { font-size: 13px; color: #777; margin: 0 0 4px; }
.pbl-pages { font-size: 12px; color: #999; margin: 0 0 12px; }

.pbl-btn {
	display: inline-block;
	text-align: center;
	padding: 8px 14px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: none;
}
.pbl-card-actions {
	display: flex;
	gap: 8px;
	margin-top: auto;
}
.pbl-card-actions .pbl-btn {
	flex: 1;
	padding: 8px 10px;
}
.pbl-btn-online { background: #0073aa; color: #fff; }
.pbl-btn-online:hover { background: #005a87; }
.pbl-btn-download { background: #16a34a; color: #000; }
.pbl-btn-download:hover { background: #128a3e; color: #000; }

/* Page livre unique */
.pbl-single-wrap {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 40px;
	margin: 40px 0;
}
@media (max-width: 782px) {
	.pbl-single-wrap { grid-template-columns: 1fr; }
}
.pbl-single-title { margin-top: 0; font-size: 28px; }
.pbl-meta-list { list-style: none; padding: 0; margin: 0 0 20px; }
.pbl-meta-list li { padding: 4px 0; font-size: 14px; color: #444; }

.pbl-single-actions { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.pbl-btn-download { background: #16a34a; color: #fff; padding: 10px 20px; }
.pbl-btn-download:hover { background: #128a3e; color: #fff; }
.pbl-btn-online { background: #0073aa; color: #fff; padding: 10px 20px; }
.pbl-btn-online:hover { background: #005a87; }

.pbl-single-desc { line-height: 1.7; }

/* Modale lecture en ligne */
.pbl-modal {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.75);
	z-index: 100000;
	align-items: center;
	justify-content: center;
}
.pbl-modal.pbl-modal-open { display: flex; }
.pbl-modal-inner {
	background: #fff;
	width: 90%;
	height: 90%;
	max-width: 1000px;
	border-radius: 6px;
	position: relative;
	overflow: hidden;
}
.pbl-modal-inner iframe { width: 100%; height: 100%; border: none; }
.pbl-modal-close {
	position: absolute;
	top: 8px;
	inset-inline-end: 12px;
	font-size: 28px;
	background: none;
	border: none;
	cursor: pointer;
	z-index: 2;
	color: #333;
}

.pbl-progress-wrap {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: rgba(0,0,0,0.08);
	z-index: 3;
	overflow: hidden;
	display: none;
}
.pbl-progress-wrap.pbl-progress-active { display: block; }
.pbl-progress-bar {
	height: 100%;
	width: 0%;
	background: #0073aa;
	transition: width .25s ease;
}

.pbl-empty { text-align: center; padding: 40px; color: #777; }
