/* Socle — legal pages (module legal): reading card on the grid of the site, table of contents.
   A theme sets the variables below to match its own grid, colours and font. */
:root {
	--socle-legal-max: 1440px;         /* width of the content of the site */
	--socle-legal-gutter: 50px;        /* side margin of the site */
	--socle-legal-toc-width: 280px;
	--socle-legal-sticky: 110px;       /* top of the sticky table of contents (under a fixed header) */
	--socle-legal-font: inherit;
	--socle-legal-card: #fff;
	--socle-legal-line: #e6e3da;
	--socle-legal-text: #545454;
	--socle-legal-title: #1e1a17;
	--socle-legal-accent: #1e1a17;
	--socle-legal-soft: #f5f3ee;
	--socle-legal-radius: 20px;
}
.socle-legal { box-sizing: border-box; display: grid; grid-template-columns: var(--socle-legal-toc-width) minmax(0, 1fr); gap: 40px; align-items: start; width: 100%; max-width: calc(var(--socle-legal-max) + 2 * var(--socle-legal-gutter)); margin: 0 auto 90px; padding: 0 var(--socle-legal-gutter); font-family: var(--socle-legal-font); }
.socle-legal--alone { grid-template-columns: minmax(0, 1fr); }
/* 2.20.1 : a theme that wraps the page content in a narrow column (e.g. 830 px for reading) would squeeze the
   table of contents and the text: that direct wrapper lets the legal grid use the width of the site. */
body :has(> .socle-legal) { max-width: none; }
.socle-legal__doc { box-sizing: border-box; width: 100%; min-width: 0; padding: 52px 64px 56px; background: var(--socle-legal-card); border: 1px solid var(--socle-legal-line); border-radius: var(--socle-legal-radius); }
.socle-legal__doc :is(h1, h2) { margin: 36px 0 14px; padding-top: 30px; font-size: 24px; line-height: 1.3; font-weight: 500; color: var(--socle-legal-title); border-top: 1px solid var(--socle-legal-line); }
.socle-legal__doc h3 { margin: 32px 0 12px; padding-top: 26px; font-size: 21px; line-height: 1.3; font-weight: 500; color: var(--socle-legal-title); border-top: 1px solid var(--socle-legal-line); }
.socle-legal__doc h4 { margin: 24px 0 8px; font-size: 17px; line-height: 1.4; font-weight: 600; color: var(--socle-legal-title); }
.socle-legal__doc > :is(h1, h2, h3):first-child, .socle-legal__doc > .socle-legal__version + :is(h1, h2, h3) { margin-top: 0; padding-top: 0; border-top: 0; }
.socle-legal__doc :is(p, li) { font-size: 15.5px; line-height: 1.75; color: var(--socle-legal-text); }
.socle-legal__doc p { margin: 0 0 14px; }
.socle-legal__doc :is(ul, ol) { margin: 0 0 16px; padding-left: 1.3em; }
.socle-legal__doc li + li { margin-top: 4px; }
.socle-legal__doc li::marker { color: var(--socle-legal-accent); }
.socle-legal__doc a { color: var(--socle-legal-accent); text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }
.socle-legal__doc strong { color: var(--socle-legal-title); font-weight: 600; }
.socle-legal__doc [id] { scroll-margin-top: var(--socle-legal-sticky); }
.socle-legal__version { display: inline-block; margin: 0 0 28px !important; padding: 6px 14px; font-size: 13px !important; line-height: 1.4 !important; font-weight: 600; color: var(--socle-legal-accent) !important; background: var(--socle-legal-soft); border-radius: 999px; }
/* Table of contents */
.socle-toc { position: sticky; top: var(--socle-legal-sticky); max-height: calc(100vh - var(--socle-legal-sticky) - 30px); overflow: auto; }
.socle-toc__box { padding: 22px 24px; background: var(--socle-legal-card); border: 1px solid var(--socle-legal-line); border-radius: min(16px, var(--socle-legal-radius)); }
.socle-toc__title { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--socle-legal-accent); }
.socle-toc__title::-webkit-details-marker { display: none; }
.socle-toc__title::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .25s; }
.socle-toc__box:not([open]) .socle-toc__title::after { transform: rotate(-45deg); }
.socle-toc__list { margin: 14px 0 0; padding: 0; list-style: none; }
.socle-toc__list .socle-toc__list { margin: 6px 0 0 14px; padding-left: 12px; border-left: 1px solid var(--socle-legal-line); }
.socle-toc__list li + li { margin-top: 8px; }
.socle-toc__list a { position: relative; display: block; padding: 4px 0 4px 14px; font-size: 14px; line-height: 1.4; color: var(--socle-legal-text); text-decoration: none; transition: color .2s; }
.socle-toc__list a::before { content: ""; position: absolute; left: 0; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: var(--socle-legal-line); transition: background-color .2s, transform .2s; }
.socle-toc__list a:hover, .socle-toc__list a.is-active { color: var(--socle-legal-accent); }
.socle-toc__list a.is-active { font-weight: 600; }
.socle-toc__list a.is-active::before { background: var(--socle-legal-accent); transform: scale(1.5); }
@media (max-width: 1024px) {
	.socle-legal { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.socle-toc { position: static; max-height: none; }
}
@media (max-width: 767px) {
	.socle-legal { --socle-legal-gutter: 15px; margin-bottom: 60px; }
	.socle-legal__doc { padding: 26px 20px 30px; border-radius: min(16px, var(--socle-legal-radius)); }
	.socle-legal__doc :is(h1, h2) { font-size: 20px; }
	.socle-legal__doc h3 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
	.socle-toc__title::after, .socle-toc__list a, .socle-toc__list a::before { transition: none; }
}
