:root {
    --primary: #0066FF;
    --accent: #FF6B00;
    --bg-dark: #0A0A0F;
    --bg-card: #12121A;
    --bg-input: #1A1A25;
    --text-primary: #FFFFFF;
    --text-secondary: #9595A8;
    --text-muted: #5C5C6F;
    --border: #2A2A3A;
    --success: #00D26A;
}

/* Thème clair */
:root[data-theme="light"] {
    --bg-dark: #F5F7FA;
    --bg-card: #FFFFFF;
    --bg-input: #E8ECF0;
    --text-primary: #1A1A2E;
    --text-secondary: #4A4A68;
    --text-muted: #7A7A98;
    --border: #D0D5DD;
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Bouton retour */
.btn-back-nav {
    position: fixed;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    z-index: 1000;
    transition: all 0.2s;
}

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

/* Header */
header {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    z-index: 100;
}

:root[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.95);
}

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

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0066FF, #00D4FF);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: white;
}

.logo-text {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-text span {
    color: var(--accent);
}

.btn-back {
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Main Content */
.legal-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

h1 {
    font-family: 'Space Grotesk', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #0066FF, #00D4FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.last-update {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
}

.intro-box {
    background: rgba(0, 102, 255, 0.1);
    border: 1px solid rgba(0, 102, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.intro-box p {
    color: var(--text-secondary);
    margin: 0;
}

section {
    margin-bottom: 2.5rem;
}

h2 {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

ul {
    color: var(--text-secondary);
    margin: 0.75rem 0 1rem 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent);
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

em {
    color: var(--accent);
    font-style: italic;
}

/* Info Box */
.info-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin: 1rem 0;
}

.info-box p {
    margin-bottom: 0.5rem;
}

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

/* Tables */
table, .data-table, .cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.9rem;
}

th, td {
    padding: 0.875rem 1rem;
    text-align: left;
    border: 1px solid var(--border);
}

th {
    background: var(--bg-input);
    color: var(--text-primary);
    font-weight: 600;
}

td {
    color: var(--text-secondary);
    background: var(--bg-card);
}

tr:hover td {
    background: var(--bg-input);
}

/* Rights Grid */
.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.right-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.right-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.right-card h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.right-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Buttons */
.btn-manage-cookies {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #FF6B00, #FFB800);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1rem 0;
}

.btn-manage-cookies:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 107, 0, 0.4);
}

/* Footer */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

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

/* Responsive */
@media (max-width: 768px) {
    .legal-container {
        padding: 2rem 1rem 3rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .footer-links {
        gap: 1rem;
    }
}
