/*
 * lmeatlm-toc — Sommaire flottant
 */

.lmeatlm-toc {
	font-family: 'Inter', -apple-system, system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #1a1a1a;
}

.lmeatlm-toc[hidden] {
	display: none !important;
}

.lmeatlm-toc-inner {
	background: #fafafa;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 1.2em 1em 1em;
}

.lmeatlm-toc-title {
	margin: 0 0 0.6em;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #4a4a4a;
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	user-select: none;
}

.lmeatlm-toc-title::after {
	content: '▾';
	font-size: 14px;
	transition: transform 0.2s ease;
	color: #b8123e;
}

.lmeatlm-toc.is-collapsed .lmeatlm-toc-title::after {
	transform: rotate(-90deg);
}

.lmeatlm-toc.is-collapsed .lmeatlm-toc-list {
	display: none;
}

.lmeatlm-toc-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.lmeatlm-toc-list li {
	margin: 0;
	padding: 0;
}

.lmeatlm-toc-list a {
	display: block;
	padding: 0.45em 0.6em;
	color: #4a4a4a;
	text-decoration: none;
	border-left: 2px solid transparent;
	border-radius: 0 4px 4px 0;
	font-size: 14px;
	line-height: 1.4;
	transition: all 0.15s ease;
}

.lmeatlm-toc-list a:hover {
	color: #b8123e;
	background: #fff;
	border-left-color: #e5e5e5;
}

.lmeatlm-toc-list a.is-active {
	color: #b8123e;
	background: #fff;
	border-left-color: #b8123e;
	font-weight: 500;
}

.lmeatlm-toc-list .toc-h3 a {
	padding-left: 1.6em;
	font-size: 13px;
}

/* Desktop : sticky en colonne droite */
@media (min-width: 1100px) {
	.lmeatlm-toc {
		display: block;
		position: sticky;
		top: 100px;
		align-self: start;
		max-height: calc(100vh - 140px);
		overflow-y: auto;
	}
}

/* Mobile : accordéon en haut de l'article */
@media (max-width: 1099px) {
	.lmeatlm-toc {
		display: block;
		margin: 1em 0 2em;
	}
	.lmeatlm-toc-list a {
		padding: 0.6em 0.6em;
	}
}
