/* Variables globales */
:root {
    --legal-gradient-dark: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    --legal-gradient-light: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.9));
    --legal-glass-dark: rgba(255, 255, 255, 0.03);
    --legal-glass-light: rgba(0, 0, 0, 0.02);
    --legal-border-dark: rgba(255, 255, 255, 0.05);
    --legal-border-light: rgba(0, 0, 0, 0.05);
}

/* Styles pour les pages légales */
.legal-page {
    max-width: 1000px;
    margin: 6rem auto;
    padding: 0 2rem;
    font-family: var(--font-primary);
}

/* Header de la page */
.legal-header {
    text-align: center;
    margin-bottom: 5rem;
    padding: 4rem 2rem;
    background: var(--primary-gradient);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.legal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(60px);
}

.legal-title {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
    position: relative;
    letter-spacing: -0.02em;
}

.legal-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Sections */
.legal-section {
    margin-bottom: 4rem;
    padding: 2.5rem;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Thème sombre par défaut */
body:not(.theme-light) .legal-section {
    background: var(--legal-gradient-dark);
    border: 1px solid var(--legal-border-dark);
    color: #ffffff;
}

body:not(.theme-light) .legal-section h2,
body:not(.theme-light) .contact-dpo {
    color: #ffffff;
}

/* Thème clair */
body.theme-light .legal-section {
    background: var(--legal-gradient-light);
    border: 1px solid var(--legal-border-light);
    color: #333333;
}

body.theme-light .legal-section h2,
body.theme-light .contact-dpo {
    color: #333333;
}

.legal-section:hover {
    transform: translateY(-5px);
}

body:not(.theme-light) .legal-section:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

body.theme-light .legal-section:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.legal-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    position: relative;
    letter-spacing: -0.02em;
}

.legal-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.legal-section h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--color-primary);
}

.legal-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.legal-section ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.legal-section li {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 0.8rem;
    position: relative;
}

.legal-section li::before {
    content: '•';
    color: var(--color-primary);
    position: absolute;
    left: -1.2rem;
    font-weight: bold;
}

/* Tableaux */
.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
}

body:not(.theme-light) .legal-table {
    background: var(--legal-glass-dark);
}

body.theme-light .legal-table {
    background: var(--legal-glass-light);
}

.legal-table th,
.legal-table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--legal-border-dark);
}

body.theme-light .legal-table th,
body.theme-light .legal-table td {
    border-bottom: 1px solid var(--legal-border-light);
}

.legal-table th {
    font-weight: 600;
    background: var(--primary-gradient);
    color: #ffffff;
}

/* Contact DPO */
.legal-page .contact-dpo {
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* Thème sombre */
body:not(.theme-light) .legal-page .contact-dpo {
    background: var(--legal-glass-dark);
}

body:not(.theme-light) .legal-page .contact-dpo h2,
body:not(.theme-light) .legal-page .contact-dpo h3,
body:not(.theme-light) .legal-page .contact-dpo p {
    color: var(--text-dark) !important;
}

/* Thème clair */
body.theme-light .legal-page .contact-dpo {
    background: var(--legal-glass-light);
}

body.theme-light .legal-page .contact-dpo h2,
body.theme-light .legal-page .contact-dpo h3,
body.theme-light .legal-page .contact-dpo p {
    color: var(--text-light) !important;
}

.legal-page .contact-dpo h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.legal-page .contact-dpo p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Correction des h2 pour les sections */
body:not(.theme-light) .legal-page .legal-section h2 {
    color: var(--text-dark) !important;
}

body.theme-light .legal-page .legal-section h2 {
    color: var(--text-light) !important;
}

/* Liens */
.legal-section a {
    color: var(--color-primary);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.legal-section a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.legal-section a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Responsive */
@media (max-width: 768px) {
    .legal-page {
        margin: 4rem auto;
    }

    .legal-header {
        padding: 3rem 1.5rem;
        margin-bottom: 3rem;
    }

    .legal-title {
        font-size: 2.2rem;
    }

    .legal-subtitle {
        font-size: 1.1rem;
    }

    .legal-section {
        padding: 1.5rem;
    }

    .legal-section h2 {
        font-size: 1.8rem;
    }

    .legal-section h3 {
        font-size: 1.3rem;
    }

    .legal-section p,
    .legal-section li {
        font-size: 1rem;
    }
}
