/* EH Editorial : FAQ keynote */

html:has(.eh-kfaq) {
	overflow-x: clip;
}

.eh-kfaq {
	--kf-bg: #12100e;
	--kf-ink: #f5f1eb;
	--kf-muted: rgba(245, 241, 235, 0.58);
	--kf-soft: rgba(245, 241, 235, 0.74);
	--kf-line: rgba(245, 241, 235, 0.14);
	--kf-pad: clamp(1.25rem, 4.5vw, 4.5rem);
	--kf-ease: cubic-bezier(0.16, 1, 0.3, 1);
	position: relative;
	isolation: isolate;
	width: auto;
	margin: 0 calc(50% - 50vw) !important;
	padding: clamp(5rem, 11vw, 9.5rem) var(--kf-pad) !important;
	overflow: hidden;
	background: var(--kf-bg);
	color: var(--kf-ink);
	font-family: "Urbanist", "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	interpolate-size: allow-keywords;
}

.eh-kfaq::before {
	content: "";
	position: absolute;
	inset: -20% -10% auto auto;
	z-index: -1;
	width: min(70vw, 900px);
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(201, 169, 110, 0.16), rgba(201, 169, 110, 0) 62%);
	pointer-events: none;
}

.eh-kfaq *,
.eh-kfaq *::before,
.eh-kfaq *::after {
	box-sizing: border-box;
}

.eh-kfaq__inner {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	grid-template-areas: "side list";
	column-gap: clamp(2.5rem, 7vw, 7rem);
	max-width: 1360px;
	margin: 0 auto;
}

/* ── Tête épinglée ── */
.eh-kfaq__side {
	grid-area: side;
	align-self: start;
}

.eh-kfaq__head {
	grid-area: head;
}

.eh-kfaq:is(section, #eh-kfaq) p,
.eh-kfaq:is(section, #eh-kfaq) h2,
.eh-kfaq:is(section, #eh-kfaq) h3 {
	margin: 0;
	padding: 0;
	color: inherit;
	font-family: inherit;
}

.eh-kfaq:is(section, #eh-kfaq) .eh-kfaq__eyebrow {
	margin-bottom: 1.5rem;
	color: var(--kf-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.24em;
	text-transform: uppercase;
}

.eh-kfaq:is(section, #eh-kfaq) .eh-kfaq__title {
	max-width: 12ch;
	margin-bottom: 1.5rem;
	color: var(--kf-ink);
	font-size: clamp(2.5rem, 5.2vw, 5rem);
	font-weight: 400;
	line-height: 1;
	letter-spacing: -0.045em;
	text-wrap: balance;
}

.eh-kfaq:is(section, #eh-kfaq) .eh-kfaq__lead {
	max-width: 30rem;
	color: var(--kf-soft);
	font-size: clamp(1rem, 1.25vw, 1.125rem);
	line-height: 1.65;
}

.eh-kfaq:is(section, #eh-kfaq) .eh-kfaq__count {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	margin-top: clamp(2rem, 4vw, 3rem);
	color: var(--kf-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.eh-kfaq__count span {
	color: var(--kf-ink);
	font-size: clamp(3rem, 5vw, 4.5rem);
	font-weight: 300;
	line-height: 1;
	letter-spacing: -0.05em;
}

/* ── Aide ── */
.eh-kfaq__help {
	grid-area: help;
	max-width: 26rem;
	margin-top: 3rem;
	padding: 1.75rem;
	border: 1px solid var(--kf-line);
	border-radius: 24px;
	background: rgba(245, 241, 235, 0.04);
	backdrop-filter: blur(12px);
}

.eh-kfaq:is(section, #eh-kfaq) .eh-kfaq__help-title {
	margin-bottom: 0.35rem;
	font-size: 1.25rem;
	letter-spacing: -0.02em;
}

.eh-kfaq:is(section, #eh-kfaq) .eh-kfaq__help-text {
	margin-bottom: 1.25rem;
	color: var(--kf-muted);
	font-size: 0.95rem;
}

.eh-kfaq__help-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.eh-kfaq:is(section, #eh-kfaq) a.eh-kfaq__btn {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 1.25rem;
	border: 1px solid var(--kf-line);
	border-radius: 999px;
	color: var(--kf-ink) !important;
	font-size: 13px;
	text-decoration: none !important;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.eh-kfaq:is(section, #eh-kfaq) a.eh-kfaq__btn:hover,
.eh-kfaq:is(section, #eh-kfaq) a.eh-kfaq__btn:focus-visible {
	border-color: var(--kf-ink);
	background: var(--kf-ink);
	color: var(--kf-bg) !important;
}

.eh-kfaq:is(section, #eh-kfaq) a.eh-kfaq__btn--solid {
	border-color: var(--kf-ink);
	background: var(--kf-ink);
	color: var(--kf-bg) !important;
}

.eh-kfaq:is(section, #eh-kfaq) a.eh-kfaq__btn--solid:hover,
.eh-kfaq:is(section, #eh-kfaq) a.eh-kfaq__btn--solid:focus-visible {
	background: transparent;
	color: var(--kf-ink) !important;
}

/* ── Questions ── */
.eh-kfaq__list {
	grid-area: list;
	border-bottom: 1px solid var(--kf-line);
}

.eh-kfaq__item {
	margin: 0;
	padding: 0;
	border: 0;
	border-top: 1px solid var(--kf-line);
	background: none;
}

.eh-kfaq__sum {
	display: grid;
	grid-template-columns: 3rem minmax(0, 1fr) 44px;
	align-items: center;
	gap: 1rem;
	padding: clamp(1.4rem, 2.4vw, 2rem) 0;
	cursor: pointer;
	list-style: none;
	transition: opacity 0.4s ease;
}

.eh-kfaq__sum::-webkit-details-marker,
.eh-kfaq__sum::marker {
	display: none;
	content: "";
}

.eh-kfaq__sum:focus-visible {
	outline: 2px solid var(--kf-ink);
	outline-offset: 6px;
	border-radius: 4px;
}

.eh-kfaq:is(section, #eh-kfaq) .eh-kfaq__num {
	color: var(--kf-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	font-variant-numeric: tabular-nums;
}

.eh-kfaq:is(section, #eh-kfaq) .eh-kfaq__q {
	color: var(--kf-ink);
	font-size: clamp(1.15rem, 1.9vw, 1.65rem);
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: -0.02em;
	text-transform: none;
	transition: transform 0.5s var(--kf-ease);
}

.eh-kfaq__icon {
	position: relative;
	width: 44px;
	height: 44px;
	border: 1px solid var(--kf-line);
	border-radius: 50%;
	transition: background-color 0.4s ease, border-color 0.4s ease, transform 0.5s var(--kf-ease);
}

.eh-kfaq__icon::before,
.eh-kfaq__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 1.5px;
	margin: -0.75px 0 0 -7px;
	background: var(--kf-ink);
	transition: background-color 0.4s ease;
}

.eh-kfaq__icon::after {
	transform: rotate(90deg);
}

.eh-kfaq__item[open] .eh-kfaq__icon {
	border-color: var(--kf-ink);
	background: var(--kf-ink);
	transform: rotate(135deg);
}

.eh-kfaq__item[open] .eh-kfaq__icon::before,
.eh-kfaq__item[open] .eh-kfaq__icon::after {
	background: var(--kf-bg);
}

@media (hover: hover) {
	.eh-kfaq__list:hover .eh-kfaq__item:not(:hover):not([open]) .eh-kfaq__sum {
		opacity: 0.45;
	}

	.eh-kfaq__sum:hover .eh-kfaq__q {
		transform: translateX(6px);
	}

	.eh-kfaq__sum:hover .eh-kfaq__icon {
		border-color: var(--kf-ink);
	}
}

.eh-kfaq__item::details-content {
	block-size: 0;
	overflow: hidden;
	transition: block-size 0.55s var(--kf-ease), content-visibility 0.55s allow-discrete;
}

.eh-kfaq__item[open]::details-content {
	block-size: auto;
}

.eh-kfaq__a {
	max-width: 44rem;
	padding: 0 calc(44px + 1rem) clamp(1.5rem, 2.5vw, 2.25rem) calc(3rem + 1rem);
	color: var(--kf-soft);
	font-size: clamp(1rem, 1.15vw, 1.0625rem);
	line-height: 1.75;
}

.eh-kfaq:is(section, #eh-kfaq) .eh-kfaq__a p {
	margin: 0 0 0.9rem;
	color: inherit;
}

.eh-kfaq:is(section, #eh-kfaq) .eh-kfaq__a p:first-child {
	color: var(--kf-ink);
}

.eh-kfaq:is(section, #eh-kfaq) .eh-kfaq__a p:last-child {
	margin-bottom: 0;
}

.eh-kfaq:is(section, #eh-kfaq) .eh-kfaq__a a {
	color: var(--kf-ink) !important;
	text-decoration: underline !important;
	text-decoration-thickness: 1px !important;
	text-underline-offset: 4px;
}

.eh-kfaq:is(section, #eh-kfaq) .eh-kfaq__a a:hover {
	opacity: 0.7;
}

/* ── Apparition au scroll ── */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.eh-kfaq__title {
			animation: eh-kf-rise linear both;
			animation-timeline: view();
			animation-range: entry 0% cover 30%;
		}

		.eh-kfaq__item {
			animation: eh-kf-fade linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 90%;
		}
	}
}

@keyframes eh-kf-rise {
	from {
		opacity: 0;
		transform: translateY(40px) scale(0.96);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes eh-kf-fade {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (min-width: 1024px) {
	.eh-kfaq__side {
		position: sticky;
		top: 110px;
	}
}

@media (max-width: 1023px) {
	.eh-kfaq__inner {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"head"
			"list"
			"help";
		grid-template-rows: auto;
	}

	.eh-kfaq__side {
		display: contents;
	}

	.eh-kfaq__head {
		margin-bottom: clamp(2rem, 5vw, 3rem);
	}

	.eh-kfaq:is(section, #eh-kfaq) .eh-kfaq__title {
		max-width: 16ch;
	}

	.eh-kfaq:is(section, #eh-kfaq) .eh-kfaq__count {
		display: none;
	}

	.eh-kfaq__help {
		max-width: none;
	}
}

@media (max-width: 767px) {
	.eh-kfaq__sum {
		grid-template-columns: 2rem minmax(0, 1fr) 36px;
		gap: 0.75rem;
	}

	.eh-kfaq__icon {
		width: 36px;
		height: 36px;
	}

	.eh-kfaq__icon::before,
	.eh-kfaq__icon::after {
		width: 12px;
		margin-left: -6px;
	}

	.eh-kfaq__a {
		padding: 0 0 1.5rem calc(2rem + 0.75rem);
	}

	.eh-kfaq__help {
		padding: 1.5rem;
	}

	.eh-kfaq:is(section, #eh-kfaq) a.eh-kfaq__btn {
		flex: 1 1 auto;
		justify-content: center;
	}
}
