/* =========================================================
   MENTIONS LÉGALES — page dédiée Sir Patoche
   Réutilise volontairement le hero et les thèmes de l'accueil.
   ========================================================= */

.legal-page {
    min-height: 100vh;
}

/* =========================================================
   V89 — FINITIONS PAGE LÉGALE
   Fond clair blanc, sans le dégradé rosé de l'accueil.
   ========================================================= */
html[data-theme="light"] body.legal-page {
    background: #FFFFFF !important;
}

html[data-theme="dark"] body.legal-page {
    background: #0D0E20 !important;
}

body.legal-page .page-noise {
    opacity: 0 !important;
}

.legal-site-header .header-inner {
    justify-content: space-between;
}

.legal-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 30px;
}

.legal-return-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-soft);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 180ms ease;
}

.legal-return-link:hover,
.legal-return-link:focus-visible {
    color: #D8B9EF;
}

html[data-theme="light"] body .legal-return-link {
    color: #8E7CA3;
}

html[data-theme="light"] body .legal-return-link:hover,
html[data-theme="light"] body .legal-return-link:focus-visible {
    color: #5E3F6F;
}

.legal-hero .hero-content {
    pointer-events: none;
    align-items: center;
}

/* En mode clair, la règle générale du hero est plus spécifique et
   remettait le contenu en haut. On force ici le même centrage qu'en sombre. */
html[data-theme="light"] body .legal-hero .hero-content {
    align-items: center;
}

.legal-hero-title {
    max-width: 760px;
}

.legal-hero-title .hero-title-line,
.legal-hero-title .hero-title-accent {
    white-space: normal;
}

.legal-section {
    padding-top: clamp(38px, 6vw, 82px);
    padding-bottom: clamp(72px, 8vw, 120px);
}

.legal-document {
    width: min(980px, 100%);
    margin: 0 auto;
    padding: clamp(28px, 5vw, 64px);
    border: 1px solid #2B2A4E;
    border-radius: 28px;
    background: rgba(17, 20, 42, .74);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
}

.legal-document-heading {
    padding-bottom: 28px;
    border-bottom: 1px solid #2B2A4E;
}

.legal-document-heading h2,
.legal-chapter-title h2,
.legal-block h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
}

.legal-document-heading h2 {
    color: #F7F7FA;
    font-size: clamp(1.9rem, 4vw, 3.25rem);
    line-height: 1.08;
}

.legal-document-heading p {
    margin: 12px 0 0;
    color: #C39BE7;
    font-size: .9rem;
}

.legal-block {
    padding: 34px 0;
    border-bottom: 1px solid rgba(58, 51, 95, .72);
}

.legal-block:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.legal-block h3 {
    margin-bottom: 18px;
    color: #D8B9EF;
    font-size: clamp(1.25rem, 2.2vw, 1.7rem);
    line-height: 1.25;
}

.legal-block p,
.legal-block li,
.legal-table {
    color: #C9C7D6;
    font-size: .98rem;
    line-height: 1.78;
}

.legal-block p {
    margin: 0 0 15px;
}

.legal-block p:last-child {
    margin-bottom: 0;
}

.legal-block ul {
    margin: 8px 0 18px;
    padding-left: 1.35rem;
}

.legal-block li + li {
    margin-top: 5px;
}

.legal-block li::marker {
    color: #C39BE7;
}

.legal-chapter-title {
    margin: 54px 0 0;
    padding: 25px 0 4px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.legal-chapter-title span {
    color: #C39BE7;
    font-size: 1rem;
}

.legal-chapter-title h2 {
    color: #F7F7FA;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.legal-table-wrap {
    width: 100%;
    margin: 20px 0 24px;
    overflow-x: auto;
    border: 1px solid #342C58;
    border-radius: 16px;
}

.legal-table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
    background: rgba(7, 11, 24, .42);
}

.legal-table th,
.legal-table td {
    padding: 15px 18px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #342C58;
}

.legal-table th {
    color: #D8B9EF;
    background: rgba(116, 75, 139, .16);
    font-size: .82rem;
    letter-spacing: .04em;
}

.legal-table tbody tr:last-child td {
    border-bottom: 0;
}

.footer-legal-link {
    color: #C39BE7;
    font-size: .76rem;
    text-decoration: none;
    transition: color 180ms ease;
}

.footer-legal-link:hover,
.footer-legal-link:focus-visible {
    color: #D8B9EF;
}

.site-footer:has(.footer-legal-link) {
    flex-direction: column;
    gap: 9px;
}

html[data-theme="light"] body .legal-document {
    border-color: #E3D6F2;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 22px 60px rgba(94, 63, 111, .10);
}

html[data-theme="light"] body .legal-document-heading {
    border-bottom-color: #E3D6F2;
}

html[data-theme="light"] body .legal-document-heading h2,
html[data-theme="light"] body .legal-chapter-title h2 {
    color: #5E3F6F;
}

html[data-theme="light"] body .legal-document-heading p,
html[data-theme="light"] body .legal-chapter-title span,
html[data-theme="light"] body .legal-block h3,
html[data-theme="light"] body .legal-block li::marker {
    color: #744B8B;
}

html[data-theme="light"] body .legal-block {
    border-bottom-color: #E3D6F2;
}

html[data-theme="light"] body .legal-block p,
html[data-theme="light"] body .legal-block li,
html[data-theme="light"] body .legal-table {
    color: #746681;
}

html[data-theme="light"] body .legal-table-wrap {
    border-color: #E3D6F2;
}

html[data-theme="light"] body .legal-table {
    background: rgba(247, 244, 251, .76);
}

html[data-theme="light"] body .legal-table th,
html[data-theme="light"] body .legal-table td {
    border-bottom-color: #E3D6F2;
}

html[data-theme="light"] body .legal-table th {
    color: #5E3F6F;
    background: rgba(216, 185, 239, .24);
}

html[data-theme="light"] body .footer-legal-link {
    color: #744B8B;
}

html[data-theme="light"] body .footer-legal-link:hover,
html[data-theme="light"] body .footer-legal-link:focus-visible {
    color: #5E3F6F;
}

@media (max-width: 820px) {
    .legal-site-header .header-inner {
        gap: 12px;
    }

    .legal-header-actions {
        gap: 10px;
    }

    .legal-return-link {
        font-size: .7rem;
        letter-spacing: .08em;
    }

    .legal-hero-title {
        max-width: 560px;
    }
}

@media (max-width: 560px) {
    .legal-site-header .brand-main {
        font-size: .92rem;
    }

    .legal-return-link {
        max-width: 86px;
        line-height: 1.2;
    }

    .legal-return-link span {
        display: none;
    }

    .legal-header-actions {
        gap: 8px;
    }

    .legal-hero-title .hero-title-line,
    .legal-hero-title .hero-title-accent {
        font-size: clamp(2rem, 12vw, 3.15rem) !important;
    }

    .legal-document {
        padding: 24px 19px;
        border-radius: 20px;
    }

    .legal-block {
        padding: 28px 0;
    }

    .legal-chapter-title {
        margin-top: 36px;
    }
}
