/* EH Editorial : eShop */

.eh-sh-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: clamp(2.5rem, 6vw, 6rem);
	align-items: center;
	max-width: var(--max);
	margin: 0 auto;
	padding: clamp(7.5rem, 12vw, 10rem) var(--pad) clamp(3rem, 5vw, 4.5rem);
}

.eh-sh-hero__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 2.5rem;
	margin-top: 2.5rem !important;
	padding-top: 1.5rem !important;
	border-top: 1px solid var(--line);
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	color: var(--muted);
}

.eh-sh-hero__facts strong {
	display: block;
	font-size: clamp(1.5rem, 2.2vw, 2rem);
	font-weight: 300;
	letter-spacing: -0.02em;
	line-height: 1.1;
	color: var(--ink);
}

/* Roue des teintes */
.eh-sh-hero__wheel {
	position: relative;
	width: min(100%, 460px);
	aspect-ratio: 1;
	margin-left: auto;
	animation: eh-sh-spin 60s linear infinite;
}

.eh-sh-hero__wheel > span {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 11%;
	aspect-ratio: 1;
	margin: -5.5% 0 0 -5.5%;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 8px 18px -10px rgba(0, 0, 0, 0.35);
	transform: rotate(calc(360deg / var(--n) * var(--i))) translateY(-390%);
	opacity: 0;
	animation: eh-sh-dot 0.9s var(--ease) both;
	animation-delay: calc(0.25s + var(--i) * 60ms);
}

.eh-sh-hero__wheel-img {
	position: absolute;
	inset: 17%;
	overflow: hidden;
	border-radius: 50%;
	animation: eh-sh-spin 60s linear infinite reverse;
}

.eh-sh-hero__wheel-img img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	transform: scale(1.08);
}

@keyframes eh-sh-spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes eh-sh-dot {
	from {
		opacity: 0;
		transform: rotate(calc(360deg / var(--n) * var(--i))) translateY(-250%) scale(0.4);
	}
	to {
		opacity: 1;
	}
}

/* Grille */
.eh-sh-grid {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 var(--pad) clamp(4rem, 8vw, 7rem);
}

#eh-ed .eh-sh-grid .eh-pf__bar {
	margin: 0 calc(var(--pad) * -1);
	padding-left: var(--pad);
	padding-right: var(--pad);
}

/* Familles */
.eh-sh-cats {
	max-width: var(--max);
	margin: 0 auto;
	padding: clamp(4rem, 8vw, 7rem) var(--pad);
	border-top: 1px solid var(--line);
}

.eh-sh-cats__head {
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.eh-sh-cats__list {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

.eh-sh-cat {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.eh-sh-cat__img {
	display: block;
	overflow: hidden;
	aspect-ratio: 3 / 4;
	margin-bottom: 0.65rem;
	background: var(--sand);
}

.eh-sh-cat__img img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	transition: transform 0.9s var(--ease);
}

.eh-sh-cat:hover .eh-sh-cat__img img {
	transform: scale(1.06);
}

.eh-sh-cat__name {
	font-size: 1rem;
	font-weight: 500;
}

.eh-sh-cat__count {
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	color: var(--muted);
}

/* Engagements */
.eh-sh-promise {
	background: var(--cream);
}

.eh-sh-promise ul {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	max-width: var(--max);
	margin: 0 auto !important;
	padding: clamp(2.5rem, 5vw, 3.5rem) var(--pad) !important;
	gap: 2rem;
}

.eh-sh-promise li {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding-left: 1.25rem;
	border-left: 1px solid rgba(17, 17, 17, 0.18);
}

.eh-sh-promise strong {
	font-weight: 500;
}

.eh-sh-promise span {
	font-size: 0.875rem;
	color: var(--muted);
}

.eh-sh-promise a {
	border-bottom: 1px solid currentColor;
}

body.eh-pf-tinted .eh-sh-promise {
	background: color-mix(in srgb, var(--eh-pf-tint) 16%, #fff);
}

@media (max-width: 1023px) {
	.eh-sh-hero {
		grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
	}

	.eh-sh-cats__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.eh-sh-promise ul {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.eh-sh-hero {
		grid-template-columns: 1fr;
		padding-top: 5.5rem;
		gap: 2rem;
	}

	.eh-sh-hero__wheel {
		order: -1;
		width: min(72vw, 300px);
		margin: 0 auto;
	}

	.eh-sh-hero__facts {
		gap: 0.75rem 1.75rem;
	}

	.eh-sh-cats__list {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--pad);
		scrollbar-width: none;
		margin: 0 calc(var(--pad) * -1) !important;
		padding: 0 var(--pad) !important;
	}

	.eh-sh-cats__list::-webkit-scrollbar {
		display: none;
	}

	.eh-sh-cats__list > li {
		flex: 0 0 42%;
		scroll-snap-align: start;
	}

	.eh-sh-promise ul {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.eh-sh-hero__wheel,
	.eh-sh-hero__wheel-img,
	.eh-sh-hero__wheel > span {
		animation: none;
		opacity: 1;
	}
}

#eh-ed.eh-ed--shop {
	transition: background-color 0.6s ease;
}

body.eh-pf-tinted #eh-ed.eh-ed--shop {
	background-color: color-mix(in srgb, var(--eh-pf-tint) 9%, #fff);
}

/* ═══ Ouverture épinglée ═══ */
.eh-sh-key {
	--p: 0;
	--t: clamp(0, calc(var(--p) / 0.45), 1);
	--b: clamp(0, calc((var(--p) - 0.1) / 0.5), 1);
	--c: clamp(0, calc((var(--p) - 0.64) / 0.22), 1);
	position: relative;
}

@media (min-width: 1024px) {
	.eh-sh-key {
		height: 250vh;
	}

	.eh-sh-key__sticky {
		position: sticky;
		top: 0;
		display: flex;
		align-items: center;
		height: 100vh;
		height: 100svh;
		overflow: hidden;
	}

	.eh-sh-key .eh-sh-hero {
		width: 100%;
		padding-top: 5rem;
		padding-bottom: 0;
	}

	.eh-sh-hero__text {
		opacity: calc(1 - var(--t) * 1.3);
		transform: translateX(calc(var(--t) * -8vw));
	}

	.eh-sh-hero__wheel {
		scale: calc(1 + var(--t) * 0.9);
		opacity: calc(1 - var(--b) * 1.4);
	}

	.eh-sh-key__bloom {
		position: absolute;
		inset: 0;
		z-index: 2;
		margin: 0;
		clip-path: circle(calc(var(--b) * 120vmax) at calc(100% - var(--pad) - min(230px, 16vw)) calc(50% + 2.5rem));
		pointer-events: none;
	}

	#eh-ed .eh-sh-key__bloom img {
		width: 100%;
		height: 100% !important;
		object-fit: cover;
		transform: scale(calc(1.3 - var(--b) * 0.3));
	}

	.eh-sh-key__bloom::after {
		content: "";
		position: absolute;
		inset: 0;
		background: linear-gradient(90deg, rgba(20, 16, 12, 0.55), rgba(20, 16, 12, 0.1) 60%);
		opacity: var(--c);
	}

	.eh-sh-key__caption {
		position: absolute;
		bottom: clamp(3rem, 10vh, 6rem);
		left: var(--pad);
		z-index: 3;
		max-width: 36rem;
		opacity: var(--c);
		transform: translateY(calc((1 - var(--c)) * 30px));
	}

	#eh-ed .eh-sh-key__caption p {
		margin: 0 0 1.75rem;
		color: #fff;
		font-size: clamp(2rem, 3.6vw, 3.5rem);
		font-weight: 400;
		line-height: 1.08;
		letter-spacing: -0.035em;
	}

	.eh-sh-key:not(.is-end) .eh-sh-key__caption a {
		visibility: hidden;
	}
}

@media (max-width: 1023px) {
	.eh-sh-key__bloom,
	.eh-sh-key__caption {
		display: none;
	}
}

/* ═══ Familles en défilement horizontal ═══ */
.eh-sh-cats {
	--hp: 0;
	max-width: none;
	padding: 0;
	border-top: 0;
	background: var(--cream);
}

.eh-sh-cats__sticky {
	padding: clamp(4rem, 8vw, 6rem) 0;
}

.eh-sh-cats.is-pinned .eh-sh-cats__sticky {
	position: sticky;
	top: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 100vh;
	height: 100svh;
	padding: 4.5rem 0 2rem;
	overflow: hidden;
}

.eh-sh-cats__head {
	max-width: var(--max);
	margin: 0 auto clamp(1.5rem, 3vw, 2.5rem);
	padding: 0 var(--pad);
	width: 100%;
}

.eh-sh-cats__rail {
	overflow-x: auto;
	scrollbar-width: none;
}

.eh-sh-cats__rail::-webkit-scrollbar {
	display: none;
}

.eh-sh-cats.is-pinned .eh-sh-cats__rail {
	overflow: visible;
}

#eh-ed .eh-sh-cats__list {
	display: flex;
	gap: clamp(1rem, 2vw, 2rem);
	width: max-content;
	margin: 0 !important;
	padding: 0 var(--pad) !important;
	overflow: visible;
	will-change: transform;
}

#eh-ed .eh-sh-cats__list > li {
	flex: 0 0 auto;
	width: clamp(240px, 25vw, 380px);
}

#eh-ed .eh-sh-cats__list > li:nth-child(even) {
	margin-top: clamp(1.5rem, 5vh, 3.5rem);
}

.eh-sh-cat {
	position: relative;
}

.eh-sh-cat__img {
	aspect-ratio: 4 / 5;
	border-radius: 8px;
	margin-bottom: 1rem;
}

.eh-sh-cat__num {
	position: absolute;
	top: 0.9rem;
	left: 1rem;
	color: #fff;
	font-size: clamp(2.25rem, 3.5vw, 3.5rem);
	line-height: 1;
	letter-spacing: -0.04em;
	text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.eh-sh-cat__meta {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
}

#eh-ed .eh-sh-cat__name {
	font-size: clamp(1.15rem, 1.5vw, 1.4rem);
	font-weight: 400;
	letter-spacing: -0.015em;
}

.eh-sh-cats__bar {
	width: calc(100% - var(--pad) * 2);
	max-width: var(--max);
	height: 1px;
	margin: 2rem auto 0;
	background: rgba(17, 17, 17, 0.14);
}

.eh-sh-cats__bar span {
	display: block;
	height: 100%;
	background: var(--ink);
	transform: scaleX(var(--hp));
	transform-origin: left;
}

.eh-sh-cats:not(.is-pinned) .eh-sh-cats__bar {
	display: none;
}

@media (max-width: 767px) {
	#eh-ed .eh-sh-cats__list > li {
		width: 70vw;
		scroll-snap-align: start;
	}

	#eh-ed .eh-sh-cats__list > li:nth-child(even) {
		margin-top: 0;
	}

	.eh-sh-cats__rail {
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--pad);
	}
}

/* ═══ Mouvement ═══ */
.eh-sh-hero__wheel,
.eh-sh-hero__text,
.eh-sh-key__caption,
.eh-sh-cats__bar span {
	will-change: transform, opacity;
}

.eh-sh-key__bloom {
	will-change: clip-path, transform;
}

#eh-ed .eh-sh-key__bloom img {
	will-change: transform;
	backface-visibility: hidden;
}
