/* Legal documents (/terms, /privacy).
   A quiet reading column in the site's own vocabulary — Poppins for
   structure, Open Sans for text, and the brand gradient used exactly once:
   as the vertical spine that marks the sommaire, each part, and the
   acceptance note. Everything else stays documentary. */

.legal-doc {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4px 4px 40px;
    color: #35415a;
    font-size: 16px;
    line-height: 1.75;
}

/* Wide screens: the sommaire becomes a sticky sidebar and the text keeps a
   book-like measure beside it — widening the text itself would push lines
   past 100 characters, which reads worse, not better. On mobile the same
   markup stacks: sommaire first, then the document. */
@media (min-width: 992px) {
    .legal-layout {
        display: flex;
        align-items: flex-start;
        gap: 48px;
    }

    .legal-main {
        flex: 1;
        min-width: 0;
        max-width: 780px;
    }

    .legal-aside {
        flex: 0 0 300px;
        order: 2;
        position: sticky;
        top: 96px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }

    .legal-aside .legal-toc {
        margin-bottom: 0;
    }
}

.legal-doc [id] {
    scroll-margin-top: 100px;   /* anchors land clear of the fixed header */
}

/* ── Document meta line ─────────────────────────────────────────────── */

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    align-items: baseline;
    margin: 4px 0 28px;
    font-family: 'Poppins', sans-serif;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #8a94ab;
}

/* ── The gradient spine (the one accent) ────────────────────────────── */

.legal-toc,
.legal-part,
.legal-accept {
    position: relative;
    padding-left: 22px;
}

.legal-toc::before,
.legal-part::before,
.legal-accept::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, #1CA4FF 0%, #6078EA 100%);
}

/* ── Sommaire ───────────────────────────────────────────────────────── */

.legal-toc {
    background: #f7fafd;
    border: 1px solid #e3e9f4;
    border-radius: 10px;
    padding: 20px 24px 18px 26px;
    margin: 0 0 42px;
}

.legal-toc-title {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #8a94ab;
    margin: 0 0 10px;
}

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

.legal-toc li + li {
    border-top: 1px solid #e9eef7;
}

.legal-doc .legal-toc a {
    display: block;
    padding: 9px 0;
    font-family: 'Poppins', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    color: #22304d;
    text-decoration: none;
}

.legal-doc .legal-toc a:hover {
    color: #1CA4FF;
}

.legal-toc .legal-toc-sub {
    display: block;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #8a94ab;
    margin-top: 1px;
}

/* ── Part headers ───────────────────────────────────────────────────── */

.legal-part {
    margin: 56px 0 14px;
    padding-top: 2px;
    padding-bottom: 2px;
}

.legal-part-kicker {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #1CA4FF;
    margin: 0 0 3px;
}

.legal-part h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.35;
    color: #182339;
    margin: 0;
}

/* ── Articles ───────────────────────────────────────────────────────── */

/* Overrides the global .contral-article-title (thin + underlined); the bare
   h3 selector covers /privacy, whose headings carry no class. */
.legal-doc h3,
.legal-doc .contral-article-title {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .05em;
    color: #182339;
    text-decoration: none;
    margin: 34px 0 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid #e9edf5;
}

.legal-doc h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #35415a;
    margin: 24px 0 6px;
}

.legal-doc p {
    margin: 0 0 14px;
}

/* ── Lists ──────────────────────────────────────────────────────────── */

.legal-doc ul {
    list-style: none;
    margin: 10px 0 16px;
    padding-left: 2px;
}

.legal-doc ul li {
    position: relative;
    padding-left: 20px;
    margin: 6px 0;
    color: #35415a;       /* the site's global li rule is lighter than body text */
    font-size: inherit;
    line-height: inherit;
}

.legal-doc ul li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: .72em;
    width: 8px;
    height: 2px;
    border-radius: 1px;
    background: #1CA4FF;
}

/* ── Links ──────────────────────────────────────────────────────────── */

.legal-doc a {
    color: #1CA4FF;
}

.legal-doc a:focus-visible {
    outline: 2px solid #1CA4FF;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ── Acceptance note ────────────────────────────────────────────────── */

.legal-accept {
    margin-top: 48px;
    background: #f7fafd;
    border: 1px solid #e3e9f4;
    border-radius: 10px;
    padding: 16px 22px 16px 26px;
    font-size: 15px;
    color: #35415a;
}

.legal-accept p {
    margin: 0;
}

/* ── Small screens ──────────────────────────────────────────────────── */

@media (max-width: 575.98px) {
    .legal-doc {
        font-size: 15px;
    }

    .legal-part h2 {
        font-size: 19px;
    }

    .legal-toc {
        padding: 16px 18px 14px 22px;
    }
}
