/* ════════════════════════════════════════════════════════════
   NEXUS — Pages légales
   Feuille de style partagée, reprend le langage visuel de la
   landing : dark, glassmorphism, gradients, Outfit + Inter.
   ════════════════════════════════════════════════════════════ */

:root {
    --bg-dark: #121524;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text-main: #f4f4f5;
    --text-muted: #b4b4bf;
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-light: rgba(255, 255, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.7;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

/* ─── BACKGROUND EFFECTS (identiques à la landing) ─── */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 40px 40px,
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 40px 40px,
        radial-gradient(ellipse at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 15%, rgba(236, 72, 153, 0.12) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 90%, rgba(59, 130, 246, 0.1) 0%, transparent 45%);
    z-index: -1;
    pointer-events: none;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #b4b4c0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gradient-accent {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple), var(--accent-pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ─── HEADER ─── */
.legal-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(6, 6, 10, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.nav-brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(236, 72, 153, 0.3);
}

.nav-brand span {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 1px;
    color: white;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.4rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-back:hover {
    background: var(--bg-card-hover);
    border-color: var(--glass-border-light);
    transform: translateY(-2px);
}

/* ─── LAYOUT ─── */
.legal-container {
    max-width: 880px;
    margin: 0 auto;
    padding: 8.5rem 2rem 4rem;
}

/* ─── HERO ─── */
.legal-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.legal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
    background: rgba(99, 102, 241, 0.05);
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.legal-eyebrow .sparkle {
    color: var(--accent-pink);
}

.legal-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ─── SOMMAIRE ─── */
.legal-toc {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.legal-toc h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    border: none;
    padding: 0;
}

.legal-toc ol {
    list-style: none;
    counter-reset: toc;
    columns: 2;
    column-gap: 2rem;
}

.legal-toc li {
    counter-increment: toc;
    margin-bottom: 0.45rem;
    break-inside: avoid;
}

.legal-toc a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s;
}

.legal-toc a::before {
    content: counter(toc, decimal-leading-zero) " — ";
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.legal-toc a:hover {
    color: var(--text-main);
}

/* ─── CONTENU ─── */
.legal-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.legal-card section {
    scroll-margin-top: 6.5rem;
}

.legal-card section + section {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--glass-border);
}

.legal-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.legal-card h2 .num {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple), var(--accent-pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    flex-shrink: 0;
}

.legal-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.6rem;
    color: var(--text-main);
}

.legal-card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.legal-card p strong,
.legal-card li strong {
    color: var(--text-main);
    font-weight: 600;
}

.legal-card ul,
.legal-card ol {
    color: var(--text-muted);
    margin: 0 0 1rem 1.4rem;
}

.legal-card li {
    margin-bottom: 0.5rem;
}

.legal-card a {
    color: var(--accent-indigo);
    text-decoration: none;
    border-bottom: 1px solid rgba(99, 102, 241, 0.35);
    transition: color 0.2s, border-color 0.2s;
}

.legal-card a:hover {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* ─── PLACEHOLDERS À COMPLÉTER ─── */
.placeholder {
    display: inline-block;
    background: rgba(236, 72, 153, 0.12);
    border: 1px dashed rgba(236, 72, 153, 0.5);
    color: #f9a8d4;
    padding: 0 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-style: normal;
    white-space: normal;
}

/* ─── BLOC D'INFOS (éditeur, hébergeur…) ─── */
.info-block {
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 1.5rem 1.8rem;
    margin: 1rem 0 1.5rem;
}

.info-block p {
    margin-bottom: 0.4rem;
}

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

/* ─── TABLEAUX ─── */
.legal-table-wrapper {
    overflow-x: auto;
    margin: 1rem 0 1.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    min-width: 560px;
}

.legal-table th {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    text-align: left;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--glass-border-light);
    white-space: nowrap;
}

.legal-table td {
    padding: 0.85rem 1.1rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
    vertical-align: top;
}

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

.legal-table td strong {
    color: var(--text-main);
}

/* ─── ENCADRÉ IMPORTANT ─── */
.callout {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    background: rgba(59, 130, 246, 0.07);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 14px;
    padding: 1.1rem 1.4rem;
    margin: 1rem 0 1.5rem;
}

.callout .icon {
    color: var(--accent-blue);
    font-size: 1.1rem;
    line-height: 1.7;
    flex-shrink: 0;
}

.callout p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ─── FOOTER ─── */
.legal-footer {
    border-top: 1px solid var(--glass-border);
    background: rgba(6, 6, 10, 0.5);
    padding: 2.5rem 2rem;
    text-align: center;
}

.legal-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    margin-bottom: 1.2rem;
}

.legal-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s;
}

.legal-footer-links a:hover {
    color: var(--accent-blue);
}

.legal-footer-links a.current {
    color: var(--text-main);
    font-weight: 600;
}

.legal-footer-copy {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .legal-container {
        padding: 7rem 1.25rem 3rem;
    }

    .legal-card {
        padding: 2rem 1.4rem;
        border-radius: 18px;
    }

    .legal-toc ol {
        columns: 1;
    }

    .legal-navbar {
        padding: 0.85rem 1.25rem;
    }

    .btn-back span.label {
        display: none;
    }
}
