/* Block: MP – Magazine : rangée de rubrique */

.mp-rub {
	padding-top: 40px;
	padding-bottom: 16px;
	overflow: hidden;
}

/* Heading line */

.mp-rub__tete {
	margin-bottom: 22px;
	display: flex;
	align-items: center;
	gap: 14px;
	white-space: nowrap;
}

.mp-rub__icone {
	flex: none;
	width: 34px;
	height: 34px;
	color: var(--c);
}

.mp-rub__titre {
	margin: 0;
	font-family: var(--mp-font-title);
	font-weight: 700;
	font-size: 26px;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--mp-black);
	text-transform: none;
}

/* Count sits inside the heading, so it follows the last word when the title wraps. */
.mp-rub__compteur {
	position: relative;
	top: -0.9em;
	margin-left: 3px;
	font-family: var(--mp-font-title);
	font-size: 13px;
	font-weight: 700;
	line-height: 0;
	letter-spacing: 0;
	vertical-align: baseline;
	color: var(--c);
}

.mp-rub__desc {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0 0 0 8px;
	padding-left: 16px;
	border-left: 1px solid #E6DCD0;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 15px;
	line-height: 1.4;
	color: #666666;
}

.mp-rub__tout,
.mp-rub__tout:hover {
	flex: none;
	margin-left: auto;
	padding-bottom: 1px;
	border-bottom: 2px solid var(--c);
	font-family: var(--mp-font-title);
	font-weight: 700;
	font-size: 14px;
	color: var(--c);
	text-decoration: none;
}

.mp-rub__desc + .mp-rub__tout {
	margin-left: 0;
}

.mp-rub__fleches {
	flex: none;
	margin-left: 10px;
	display: flex;
	gap: 8px;
}

.mp-rub__fleche {
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 100px;
	border: 1.5px solid #DDD2C6;
	background: transparent;
	color: var(--mp-ink);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.mp-rub__fleche svg {
	width: 18px;
	height: 18px;
}

.mp-rub__fleche:hover:not(:disabled),
.mp-rub__fleche:focus-visible {
	border-color: var(--c);
	background: var(--t);
}

.mp-rub__fleche:disabled {
	opacity: 0.35;
	cursor: default;
}

/* Scrolling row: starts aligned with the page content and bleeds to the right edge. */

.mp-rub__piste {
	list-style: none;
	margin: 0;
	padding: 0 24px 12px max(24px, calc((100% - var(--mp-wrap)) / 2 + 24px));
	scroll-padding-left: max(24px, calc((100% - var(--mp-wrap)) / 2 + 24px));
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.mp-rub__piste::-webkit-scrollbar {
	display: none;
}

.mp-rub__item {
	flex: 0 0 272px;
	margin: 0;
	padding: 0;
	scroll-snap-align: start;
}

.mp-rub__item::before {
	content: none;
}

.mp-rub__carte,
.mp-rub__carte:hover {
	display: flex;
	flex-direction: column;
	gap: 12px;
	color: var(--mp-ink);
	text-decoration: none;
}

.mp-rub__image {
	display: block;
	aspect-ratio: 4 / 5;
	border-radius: 18px;
	overflow: hidden;
	background: #F3EEE8;
}

.mp-rub__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.mp-rub__carte:hover .mp-rub__image img {
	transform: scale(1.05);
}

.mp-rub__carte strong {
	display: -webkit-box;
	min-height: 2.7em;
	overflow: hidden;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	font-family: var(--mp-font-title);
	font-weight: 700;
	font-size: 16px;
	line-height: 1.35;
	transition: color 0.2s ease;
}

.mp-rub__carte:hover strong {
	color: var(--c);
}

.mp-rub__carte small {
	margin-top: -6px;
	font-size: 12px;
	color: #888888;
}

.mp-rub--vide {
	padding: 24px;
	text-align: center;
	color: var(--mp-muted);
}

@media (max-width: 900px) {
	.mp-rub__desc,
	.mp-rub__fleches {
		display: none;
	}

	.mp-rub__tout {
		margin-left: auto;
	}

	.mp-rub__item {
		flex-basis: 220px;
	}
}

@media (max-width: 760px) {
	.mp-rub {
		padding-top: 28px;
	}

	.mp-rub__tete {
		gap: 10px;
		margin-bottom: 16px;
	}

	.mp-rub__icone {
		width: 28px;
		height: 28px;
	}

	.mp-rub__titre {
		min-width: 0;
		font-size: 20px;
		white-space: normal;
	}

	.mp-rub__piste {
		gap: 14px;
	}

	.mp-rub__item {
		flex-basis: 64vw;
		max-width: 240px;
	}

	.mp-rub__carte strong {
		font-size: 15px;
	}
}
