/* ============================================
   Komwiz — Legal Pages Stylesheet
   Shared by mentions-legales.html,
   politique-confidentialite.html, cgu.html
   ============================================ */

:root {
    --primary: #8c2bee;
    --primary-light: #a558f5;
    --primary-dark: #6d1fb8;
    --primary-soft: #f3e8ff;
    --bg-light: #f7f6f8;
    --bg-white: #ffffff;
    --text-primary: #141118;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --accent-mint: #5BC9A3;
    --accent-orange: #ff7a3d;
    --shadow-sm: 0 1px 2px rgba(20, 17, 24, 0.05);
    --shadow-md: 0 4px 12px rgba(20, 17, 24, 0.08);
    --shadow-purple: 0 12px 40px rgba(140, 43, 238, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.container {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== NAVIGATION ===== */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(247, 246, 248, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 18px;
    box-shadow: var(--shadow-purple);
}

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 9999px;
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-back:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.nav-back .material-symbols-outlined {
    font-size: 18px;
}

/* ===== HERO / PAGE HEADER ===== */
.page-hero {
    padding: 72px 24px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-soft) 0%, transparent 70%);
    z-index: -1;
}

.page-tag {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-hero h1 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.page-hero .lede {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
}

.page-hero .updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.page-hero .updated .material-symbols-outlined {
    font-size: 16px;
}

/* ===== ARTICLE CONTENT ===== */
article.legal {
    background: white;
    border-radius: 24px;
    padding: 48px 56px;
    margin: 0 auto 48px;
    box-shadow: var(--shadow-sm);
    max-width: 920px;
}

/* Typography */
article.legal h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.015em;
    margin: 40px 0 14px;
    color: var(--text-primary);
    scroll-margin-top: 84px;
}

article.legal h2:first-child { margin-top: 0; }

article.legal h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 24px 0 10px;
    color: var(--text-primary);
}

article.legal p {
    font-size: 15.5px;
    margin-bottom: 14px;
    color: var(--text-primary);
    line-height: 1.65;
}

article.legal a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(140, 43, 238, 0.4);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s;
}

article.legal a:hover {
    text-decoration-color: var(--primary);
}

article.legal ul, article.legal ol {
    margin: 0 0 14px 24px;
    padding-left: 12px;
}

article.legal li {
    font-size: 15.5px;
    margin-bottom: 6px;
    line-height: 1.6;
}

/* ===== Table of contents (après article pour winning specificity) ===== */
article.legal .toc {
    background: var(--primary-soft);
    border-radius: 14px;
    padding: 18px 22px;
    margin: 0 0 36px 0;
}

article.legal .toc h2 {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 10px 0;
    scroll-margin-top: 0;
}

article.legal .toc ol {
    list-style: none;
    counter-reset: toc;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 24px;
}

article.legal .toc li {
    counter-increment: toc;
    position: relative;
    padding-left: 26px;
    font-size: 13.5px;
    margin-bottom: 0;
    line-height: 1.4;
}

article.legal .toc li::before {
    content: counter(toc) '.';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
}

article.legal .toc a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
    display: inline-block;
    padding: 3px 0;
}

article.legal .toc a:hover { color: var(--primary); }

article.legal strong { font-weight: 700; }

article.legal code {
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    background: var(--primary-soft);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    color: var(--primary-dark);
}

/* Info / note callout */
.note {
    background: linear-gradient(135deg, #fff7e6 0%, #fffbf3 100%);
    border-left: 4px solid #ffb547;
    padding: 18px 22px;
    border-radius: 12px;
    margin: 24px 0;
    font-size: 15px;
    line-height: 1.6;
}

.note strong { color: #9a6400; }

.note.info {
    background: linear-gradient(135deg, #e6efff 0%, #f3f7ff 100%);
    border-left-color: #2463d9;
}

.note.info strong { color: #1a3f8c; }

.note.customize {
    background: linear-gradient(135deg, #fff0e6 0%, #fff7f0 100%);
    border-left-color: #ff7a3d;
}

.note.customize strong { color: #c44e1a; }

/* Data / key-value table */
.key-values {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 10px 20px;
    background: var(--bg-light);
    padding: 20px 24px;
    border-radius: 12px;
    margin: 16px 0 24px;
    font-size: 15px;
}

.key-values dt {
    font-weight: 700;
    color: var(--text-secondary);
}

.key-values dd {
    color: var(--text-primary);
    margin: 0;
    word-break: break-word;
}

/* Highlight placeholder */
.todo {
    background: #fff59d;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: #5c4a00;
}

/* ===== FOOTER ===== */
footer {
    background: var(--text-primary);
    color: #d1d5db;
    padding: 48px 24px 24px;
    margin-top: 64px;
}

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

footer .logo {
    color: white;
}

footer nav.footer-nav {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    position: static;
    background: none;
    backdrop-filter: none;
    border: none;
    padding: 0;
}

footer nav.footer-nav a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

footer nav.footer-nav a:hover { color: white; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 24px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    opacity: 0.7;
    flex-wrap: wrap;
    gap: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 720px) {
    .page-hero { padding: 48px 20px 32px; }
    article.legal { padding: 24px 20px; border-radius: 16px; }
    article.legal h2 { font-size: 20px; margin-top: 32px; }
    article.legal h3 { font-size: 16px; }
    article.legal p, article.legal li { font-size: 15px; }
    article.legal .toc {
        padding: 16px 18px;
    }
    article.legal .toc ol {
        grid-template-columns: 1fr;
        gap: 2px 0;
    }
    article.legal .toc li {
        font-size: 14px;
        padding: 4px 0 4px 24px;
    }
    .key-values {
        grid-template-columns: 1fr;
        gap: 4px 0;
    }
    .key-values dt { margin-top: 10px; }
    .key-values dt:first-child { margin-top: 0; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
