/* ────────────────────────────────────────────────────────────
   Comptoo — Pages légales (style commun)
   Reprend la palette landing/index.html avec optimisations
   pour la lecture longue : line-height, max-width, hiérarchie
   ──────────────────────────────────────────────────────────── */

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

:root {
    --primary: #6C63FF;
    --primary-dark: #5549e0;
    --bg: #0a0a14;
    --surface: #14142a;
    --surface-hover: #1e1e38;
    --text: #f1f1f4;
    --text-secondary: #c4c4cf;
    --text-muted: #9ca3af;
    --border: #252544;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.65;
    font-size: 16px;
    overflow-x: hidden;
}

/* ── Header ── */
header {
    padding: 24px 40px;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.header-logo img { height: 36px; width: auto; }
.header-logo span { font-size: 22px; font-weight: 400; letter-spacing: -0.02em; }

.btn-login {
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}
.btn-login:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ── Layout ── */
.legal-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 60px 24px 100px;
}

.legal-meta {
    display: inline-block;
    padding: 6px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

h1 {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.lead {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    line-height: 1.55;
}

h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 56px 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 100px;
}

h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 32px 0 12px;
    color: var(--text);
    scroll-margin-top: 100px;
}

p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

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

ul, ol {
    margin: 0 0 16px 24px;
    color: var(--text-secondary);
}

li { margin-bottom: 8px; }

a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(108, 99, 255, 0.4);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}
a:hover { text-decoration-color: var(--primary); }

/* ── Table of contents ── */
.toc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 48px;
}

.toc h2 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 12px;
    padding: 0;
    border: none;
}

.toc ol {
    margin: 0;
    padding-left: 22px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.9;
}

.toc a {
    text-decoration: none;
    color: var(--text-secondary);
}
.toc a:hover { color: var(--primary); }

/* ── Callouts ── */
.callout {
    padding: 18px 22px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    margin: 24px 0;
    font-size: 15px;
    color: var(--text-secondary);
}

.callout strong { color: var(--text); display: block; margin-bottom: 6px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; }

.callout--info { border-left: 3px solid var(--primary); }
.callout--warning { border-left: 3px solid var(--warning); }
.callout--success { border-left: 3px solid var(--success); }

/* ── Table ── */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    font-size: 14px;
}

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

.legal-table th {
    background: var(--surface-hover);
    color: var(--text);
    font-weight: 600;
}

.legal-table td { color: var(--text-secondary); }
.legal-table tr:last-child td { border-bottom: none; }

/* ── Footer ── */
footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 40px 24px;
    margin-top: 80px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

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

.footer-links a:hover { color: var(--text); }

.footer-copy { white-space: nowrap; }

/* ── Mobile ── */
@media (max-width: 640px) {
    header { padding: 16px 20px; }
    .legal-wrap { padding: 40px 16px 80px; }
    h1 { font-size: 28px; }
    h2 { font-size: 20px; margin: 40px 0 14px; }
    h3 { font-size: 16px; margin: 24px 0 10px; }
    .lead { font-size: 16px; margin-bottom: 32px; }
    .toc { padding: 18px 20px; }
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
    .legal-table { font-size: 13px; }
    .legal-table th, .legal-table td { padding: 10px 12px; }
}
