/* =========================================================
   PRIMETECH SOLUTIONS — PAGES LÉGALES
========================================================= */

.legal-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 8%, rgba(8, 124, 255, .12), transparent 34%),
        var(--navy-deep, #020817);
}

.legal-hero {
    position: relative;
    overflow: hidden;
    padding: 86px 0 58px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.legal-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(22, 141, 255, .6), transparent);
}

.legal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    color: #6bb9ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.legal-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #168dff;
    box-shadow: 0 0 14px rgba(22, 141, 255, .8);
}

.legal-hero h1 {
    max-width: 820px;
    margin: 0;
    color: #f7fbff;
    font-size: clamp(38px, 5vw, 66px);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.legal-hero p {
    max-width: 720px;
    margin: 22px 0 0;
    color: #98a9bf;
    font-size: 16px;
    line-height: 1.75;
}

.legal-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 58px;
    padding: 60px 0 100px;
}

.legal-summary {
    position: sticky;
    top: 112px;
    align-self: start;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    background: rgba(8, 18, 36, .72);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .16);
}

.legal-summary strong {
    display: block;
    margin-bottom: 12px;
    color: #f2f7fc;
    font-size: 12px;
}

.legal-summary a {
    display: block;
    padding: 7px 0;
    color: #8092aa;
    text-decoration: none;
    font-size: 11px;
    line-height: 1.45;
    transition: color .2s ease, transform .2s ease;
}

.legal-summary a:hover {
    color: #4ba8ff;
    transform: translateX(2px);
}

.legal-content {
    min-width: 0;
}

.legal-content section {
    scroll-margin-top: 112px;
    padding: 0 0 38px;
}

.legal-content section + section {
    padding-top: 38px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.legal-content h2 {
    margin: 0 0 16px;
    color: #eef6ff;
    font-size: 25px;
    line-height: 1.25;
    letter-spacing: -.025em;
}

.legal-content h3 {
    margin: 24px 0 10px;
    color: #dcecff;
    font-size: 16px;
}

.legal-content p,
.legal-content li,
.legal-content td,
.legal-content th {
    color: #93a4ba;
    font-size: 14px;
    line-height: 1.75;
}

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

.legal-content ul {
    margin: 12px 0 16px;
    padding-left: 20px;
}

.legal-content a {
    color: #4ba8ff;
}

.legal-content strong {
    color: #dce9f7;
}

.legal-notice {
    margin: 0 0 34px;
    padding: 20px 22px;
    border: 1px solid rgba(255, 184, 77, .28);
    border-radius: 16px;
    background: rgba(255, 166, 38, .07);
}

.legal-notice strong {
    display: block;
    margin-bottom: 6px;
    color: #ffd28d;
}

.legal-notice p {
    margin: 0;
    color: #c6aa80;
    font-size: 12px;
}

.legal-table-wrap {
    overflow-x: auto;
    margin: 20px 0 26px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(7, 17, 34, .55);
}

.legal-table th,
.legal-table td {
    padding: 15px 16px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.legal-table th {
    color: #dce9f7;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

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

.legal-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(22, 141, 255, .34);
    border-radius: 12px;
    background: rgba(22, 141, 255, .10);
    color: #86c8ff;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.legal-action:hover {
    transform: translateY(-1px);
    border-color: rgba(22, 141, 255, .65);
    background: rgba(22, 141, 255, .16);
}

.legal-action-status {
    min-height: 20px;
    margin-top: 10px !important;
    color: #5fd7a1 !important;
    font-size: 12px !important;
}

.legal-updated {
    margin-top: 12px;
    color: #607189 !important;
    font-size: 11px !important;
}

html[data-theme="light"] .legal-page {
    background:
        radial-gradient(circle at 18% 8%, rgba(8, 124, 255, .10), transparent 34%),
        #f5f9fd;
}

html[data-theme="light"] .legal-hero {
    border-color: rgba(13, 45, 82, .08);
}

html[data-theme="light"] .legal-hero h1,
html[data-theme="light"] .legal-content h2 {
    color: #102846;
}

html[data-theme="light"] .legal-hero p,
html[data-theme="light"] .legal-content p,
html[data-theme="light"] .legal-content li,
html[data-theme="light"] .legal-content td {
    color: #5e718a;
}

html[data-theme="light"] .legal-content h3,
html[data-theme="light"] .legal-content strong,
html[data-theme="light"] .legal-table th,
html[data-theme="light"] .legal-summary strong {
    color: #173451;
}

html[data-theme="light"] .legal-summary,
html[data-theme="light"] .legal-table {
    border-color: rgba(13, 45, 82, .10);
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 18px 45px rgba(31, 64, 97, .08);
}

html[data-theme="light"] .legal-content section + section,
html[data-theme="light"] .legal-table th,
html[data-theme="light"] .legal-table td {
    border-color: rgba(13, 45, 82, .08);
}

html[data-theme="light"] .legal-notice {
    background: #fff9ef;
    border-color: #f0cf99;
}

html[data-theme="light"] .legal-notice strong {
    color: #8a580e;
}

html[data-theme="light"] .legal-notice p {
    color: #816b49;
}

@media (max-width: 880px) {
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-top: 36px;
    }

    .legal-summary {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .legal-summary strong {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .legal-hero {
        padding: 58px 0 42px;
    }

    .legal-summary {
        grid-template-columns: 1fr;
    }

    .legal-content h2 {
        font-size: 22px;
    }
}
