/* Boutemont – Recommandations de livres (site). */

.bmt-books {
	--bmt-books-bg: #4f7539;
	--bmt-books-ink: #ffffff;
	--bmt-books-text: #f4f1ea;
	--bmt-books-soft: #cfdcc6;
	--bmt-books-cols: 4.4;
	--bmt-books-gap: 32px;
	display: grid;
	grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
	gap: 64px;
	padding: 80px 0 80px 6vw;
	background: var(--bmt-books-bg);
	color: var(--bmt-books-text);
	font-family: 'Open Sans', sans-serif;
	overflow: hidden;
	box-sizing: border-box;
}

.bmt-books *,
.bmt-books *::before,
.bmt-books *::after {
	box-sizing: border-box;
}

.bmt-books__head {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

.bmt-books .bmt-books__kicker {
	margin: 0;
	color: var(--bmt-books-soft);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .28em;
	line-height: 1.4;
	text-transform: uppercase;
}

.bmt-books .bmt-books__title {
	margin: 0;
	color: var(--bmt-books-ink);
	font-family: 'EB Garamond', Georgia, serif;
	font-size: clamp(32px, 3.2vw, 46px);
	overflow-wrap: break-word;
	font-weight: 500;
	line-height: 1.04;
	text-transform: none;
}

.bmt-books .bmt-books__intro {
	margin: 0;
	color: var(--bmt-books-text);
	font-size: 15px;
	line-height: 1.65;
}

.bmt-books__arrows {
	display: flex;
	gap: 12px;
	margin-top: auto;
	padding-top: 12px;
}

.bmt-books .bmt-books__arrow,
.bmt-books .bmt-books__arrow:hover,
.bmt-books .bmt-books__arrow:focus {
	display: inline-grid;
	place-items: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 1px solid var(--bmt-books-ink) !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: var(--bmt-books-ink) !important;
	font-size: 22px;
	line-height: 1;
	box-shadow: none !important;
	cursor: pointer;
	transition: background-color .2s, color .2s, opacity .2s;
}

.bmt-books .bmt-books__arrow:hover,
.bmt-books .bmt-books__arrow:focus-visible {
	background: var(--bmt-books-ink) !important;
	color: var(--bmt-books-bg) !important;
	outline: none;
}

.bmt-books .bmt-books__arrow:disabled {
	opacity: .35;
	cursor: default;
	background: transparent !important;
	color: var(--bmt-books-ink) !important;
}

.bmt-books--no-scroll .bmt-books__arrows {
	display: none;
}

.bmt-books__track {
	display: flex;
	gap: var(--bmt-books-gap);
	margin: 0;
	padding: 6px 6vw 8px 0;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.bmt-books__track::-webkit-scrollbar {
	display: none;
}

.bmt-books__book {
	flex: 0 0 calc((100% - (var(--bmt-books-cols) - 1) * var(--bmt-books-gap)) / var(--bmt-books-cols));
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	margin: 0;
	padding: 0;
	scroll-snap-align: start;
}

.bmt-books__cover,
a.bmt-books__cover:hover {
	color: inherit;
	text-decoration: none;
}

.bmt-books__cover {
	display: block;
	aspect-ratio: 2 / 3;
	margin-bottom: 12px;
	overflow: hidden;
	border-radius: 3px;
	background: rgba(255, 255, 255, .12);
	box-shadow: 0 20px 32px -20px rgba(0, 0, 0, .6);
}

.bmt-books .bmt-books__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}

a.bmt-books__cover:hover .bmt-books__img {
	transform: scale(1.03);
}

.bmt-books__noimg {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 18px;
	color: var(--bmt-books-ink);
	font-family: 'EB Garamond', Georgia, serif;
	font-size: 20px;
	line-height: 1.2;
	text-align: center;
}

.bmt-books .bmt-books__book-title {
	margin: 0;
	color: var(--bmt-books-ink);
	font-family: 'EB Garamond', Georgia, serif;
	font-size: 24px;
	font-weight: 500;
	line-height: 1.12;
	text-transform: none;
}

.bmt-books .bmt-books__book-title a {
	color: inherit;
	text-decoration: none;
}

.bmt-books .bmt-books__book-title a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.bmt-books .bmt-books__author {
	margin: 0;
	color: var(--bmt-books-soft);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .16em;
	line-height: 1.4;
	text-transform: uppercase;
}

.bmt-books .bmt-books__note {
	margin: 10px 0 0;
	padding-top: 12px;
	border-top: 1px solid rgba(255, 255, 255, .22);
	color: var(--bmt-books-text);
	font-family: 'EB Garamond', Georgia, serif;
	font-size: 17px;
	font-style: italic;
	line-height: 1.45;
}

.bmt-books--empty {
	display: block;
	padding: 40px;
	font-size: 14px;
}

@media (max-width: 1024px) {
	.bmt-books {
		--bmt-books-cols: 2.6;
		grid-template-columns: 1fr;
		gap: 32px;
		padding: 64px 0 64px 40px;
	}

	.bmt-books__head {
		padding-right: 40px;
	}

	.bmt-books__arrows {
		margin-top: 0;
	}

	.bmt-books__track {
		padding-right: 40px;
	}
}

@media (max-width: 767px) {
	.bmt-books {
		--bmt-books-cols: 1.7;
		--bmt-books-gap: 20px;
		gap: 24px;
		padding: 48px 0 44px 20px;
	}

	.bmt-books__head {
		padding-right: 20px;
		gap: 16px;
	}

	.bmt-books__track {
		padding-right: 20px;
	}

	.bmt-books .bmt-books__arrow {
		width: 46px;
		height: 46px;
		font-size: 20px;
	}

	.bmt-books .bmt-books__book-title {
		font-size: 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bmt-books__track {
		scroll-behavior: auto;
	}

	.bmt-books .bmt-books__img {
		transition: none;
	}
}
