/* ═══ Pages légales ═══ */
.eh-ed-legal {
	--lg-cream: #f6f2ec;
	--lg-line: rgba(17, 17, 17, 0.1);
}

/* En-tête */
.eh-lg-hero {
	padding: clamp(7.5rem, 16vh, 10rem) var(--pad) 0;
	background: var(--lg-cream);
}

.eh-lg-hero__in {
	max-width: 1180px;
	margin: 0 auto;
	padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

#eh-ed .eh-lg-eyebrow {
	margin: 0 0 1.25rem;
	color: var(--muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

#eh-ed .eh-lg-title {
	margin: 0;
	color: var(--ink);
	font-size: clamp(2.6rem, 6vw, 5.5rem);
	font-weight: 400;
	line-height: 1.02;
	letter-spacing: -0.045em;
}

#eh-ed .eh-lg-updated {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 1.5rem 0 0;
	padding: 0.45rem 0.9rem;
	border-radius: 999px;
	background: #fff;
	color: rgba(17, 17, 17, 0.7);
	font-size: 0.85rem;
}

.eh-lg-updated::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #7a9a7e;
}

.eh-lg-switch {
	display: flex;
	gap: 0.5rem;
	max-width: 1180px;
	margin: 0 auto;
	overflow-x: auto;
	scrollbar-width: none;
}

.eh-lg-switch::-webkit-scrollbar {
	display: none;
}

#eh-ed .eh-lg-switch a {
	flex: 0 0 auto;
	padding: 0.95rem 1.2rem;
	border-radius: 10px 10px 0 0;
	color: rgba(17, 17, 17, 0.6);
	font-size: 0.9rem;
	text-decoration: none;
	transition: color 0.2s ease, background 0.2s ease;
}

#eh-ed .eh-lg-switch a:hover {
	color: var(--ink);
}

#eh-ed .eh-lg-switch a[aria-current="page"] {
	background: #fff;
	color: var(--ink);
}

/* Corps */
.eh-lg-body {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: clamp(2.5rem, 6vw, 6rem);
	max-width: 1180px;
	margin: 0 auto;
	padding: clamp(3rem, 6vw, 5rem) var(--pad) clamp(4rem, 8vw, 6rem);
}

.eh-lg-body:not(:has(.eh-lg-toc)) {
	grid-template-columns: minmax(0, 1fr);
	max-width: 860px;
}

.eh-lg-toc {
	position: sticky;
	top: 104px;
	align-self: start;
	max-height: calc(100vh - 130px);
	overflow-y: auto;
}

#eh-ed .eh-lg-toc__title {
	margin: 0 0 1rem;
	color: var(--muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.eh-lg-toc ol {
	margin: 0;
	padding: 0;
	list-style: none;
	border-left: 1px solid var(--lg-line);
}

#eh-ed .eh-lg-toc a {
	display: flex;
	gap: 0.75rem;
	margin-left: -1px;
	padding: 0.5rem 0 0.5rem 1rem;
	border-left: 1px solid transparent;
	color: rgba(17, 17, 17, 0.58);
	font-size: 0.9rem;
	line-height: 1.4;
	text-decoration: none;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.eh-lg-toc a span {
	flex: 0 0 auto;
	color: rgba(17, 17, 17, 0.35);
	font-variant-numeric: tabular-nums;
}

#eh-ed .eh-lg-toc a:hover,
#eh-ed .eh-lg-toc a.is-active {
	border-left-color: var(--ink);
	color: var(--ink);
}

.eh-lg-content {
	min-width: 0;
	max-width: 760px;
}

#eh-ed .eh-lg-intro p {
	margin: 0 0 2.5rem;
	color: var(--ink);
	font-size: clamp(1.15rem, 1.6vw, 1.35rem);
	line-height: 1.6;
	letter-spacing: -0.01em;
}

.eh-lg-chapter {
	padding: 2.25rem 0;
	border-top: 1px solid var(--lg-line);
	scroll-margin-top: 96px;
}

.eh-lg-chapter:first-of-type {
	border-top: 0;
	padding-top: 0;
}

#eh-ed .eh-lg-chapter h2 {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	margin: 0 0 1.25rem;
	color: var(--ink);
	font-size: clamp(1.45rem, 2.2vw, 1.9rem);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.025em;
}

.eh-lg-chapter__n {
	flex: 0 0 auto;
	color: rgba(17, 17, 17, 0.35);
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	font-variant-numeric: tabular-nums;
}

#eh-ed .eh-lg-chapter__body h3 {
	margin: 1.75rem 0 0.75rem;
	color: var(--ink);
	font-size: 1.1rem;
	font-weight: 500;
	letter-spacing: -0.01em;
}

#eh-ed .eh-lg-chapter__body p,
#eh-ed .eh-lg-chapter__body li {
	color: rgba(17, 17, 17, 0.74);
	font-size: 1rem;
	line-height: 1.75;
}

#eh-ed .eh-lg-chapter__body p {
	margin: 0 0 1rem;
}

#eh-ed .eh-lg-chapter__body ul,
#eh-ed .eh-lg-chapter__body ol {
	margin: 0 0 1.25rem;
	padding-left: 1.25rem;
}

#eh-ed .eh-lg-chapter__body li {
	margin-bottom: 0.4rem;
}

#eh-ed .eh-lg-chapter__body li::marker {
	color: rgba(17, 17, 17, 0.35);
}

#eh-ed .eh-lg-chapter__body strong {
	color: var(--ink);
	font-weight: 500;
}

#eh-ed .eh-lg-content a:not(.eh-lg-more__card) {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: rgba(17, 17, 17, 0.3);
	text-underline-offset: 3px;
	transition: text-decoration-color 0.2s ease;
}

#eh-ed .eh-lg-content a:hover {
	text-decoration-color: var(--ink);
}

/* Fiches clé : valeur */
.eh-lg-dl {
	margin: 0 0 1.25rem;
	border: 1px solid var(--lg-line);
	border-radius: 10px;
	overflow: hidden;
}

.eh-lg-dl > div {
	display: grid;
	grid-template-columns: minmax(9rem, 34%) 1fr;
	gap: 1rem;
	padding: 0.85rem 1.1rem;
}

.eh-lg-dl > div + div {
	border-top: 1px solid var(--lg-line);
}

.eh-lg-dl > div:nth-child(odd) {
	background: #faf8f5;
}

#eh-ed .eh-lg-dl dt {
	color: rgba(17, 17, 17, 0.55);
	font-size: 0.9rem;
}

#eh-ed .eh-lg-dl dd {
	margin: 0;
	color: var(--ink);
	font-size: 0.95rem;
	line-height: 1.55;
	overflow-wrap: anywhere;
}

/* Tableaux */
.eh-lg-chapter__body table {
	display: block;
	width: 100%;
	margin: 0 0 1.5rem;
	overflow-x: auto;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.eh-lg-chapter__body th,
.eh-lg-chapter__body td {
	padding: 0.75rem 0.9rem;
	border-bottom: 1px solid var(--lg-line);
	text-align: left;
	vertical-align: top;
	line-height: 1.5;
}

.eh-lg-chapter__body th {
	background: var(--lg-cream);
	color: var(--ink);
	font-weight: 500;
	white-space: nowrap;
}

.eh-lg-chapter__body td {
	color: rgba(17, 17, 17, 0.74);
	min-width: 9rem;
}

/* Aide */
.eh-lg-help {
	margin-top: 2.5rem;
	padding: 1.75rem;
	border-radius: 12px;
	background: var(--lg-cream);
}

#eh-ed .eh-lg-help__title {
	margin: 0 0 0.5rem;
	color: var(--ink);
	font-size: 1.3rem;
	letter-spacing: -0.015em;
}

#eh-ed .eh-lg-help p:last-child {
	margin: 0;
	color: rgba(17, 17, 17, 0.72);
	line-height: 1.65;
}

/* Autres pages */
.eh-lg-more {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 var(--pad) clamp(4rem, 8vw, 6rem);
}

#eh-ed .eh-lg-more__card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 1.5rem 3.5rem 1.5rem 1.5rem;
	border: 1px solid var(--lg-line);
	border-radius: 12px;
	color: var(--ink);
	text-decoration: none;
	transition: border-color 0.25s ease, transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

#eh-ed .eh-lg-more__card:hover {
	border-color: rgba(17, 17, 17, 0.3);
	box-shadow: 0 20px 40px -28px rgba(20, 16, 12, 0.4);
	transform: translateY(-3px);
}

.eh-lg-more__t {
	font-size: 1.1rem;
	letter-spacing: -0.01em;
}

.eh-lg-more__d {
	color: rgba(17, 17, 17, 0.58);
	font-size: 0.9rem;
}

.eh-lg-more__card svg {
	position: absolute;
	top: 50%;
	right: 1.4rem;
	width: 20px;
	height: 20px;
	transform: translateY(-50%);
	transition: transform 0.3s var(--ease);
}

.eh-lg-more__card:hover svg {
	transform: translate(4px, -50%);
}

@media (max-width: 900px) {
	.eh-lg-body {
		grid-template-columns: minmax(0, 1fr);
		gap: 2rem;
	}

	.eh-lg-toc {
		position: static;
		max-height: none;
		padding: 1.25rem;
		border-radius: 12px;
		background: var(--lg-cream);
	}

	.eh-lg-toc ol {
		border-left: 0;
		columns: 2;
		column-gap: 1.5rem;
	}

	#eh-ed .eh-lg-toc a {
		padding: 0.35rem 0;
		border-left: 0;
		break-inside: avoid;
	}

	.eh-lg-more {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.eh-lg-toc ol {
		columns: 1;
	}

	.eh-lg-dl > div {
		grid-template-columns: 1fr;
		gap: 0.15rem;
	}
}

@media (max-width: 767px) {
	.eh-lg-switch {
		margin: 0 calc(var(--pad) * -1);
		padding: 0 var(--pad);
		scroll-padding-inline: var(--pad);
	}
}
