/* Quizos — pages légales : présentation commune */

.legal-hero {
    position: relative;
    overflow: hidden;
    padding: 7.25rem 0 4rem !important;
    background: linear-gradient(135deg, #172235 0%, #24345f 54%, #2a7be4 145%) !important;
}

.legal-hero::after {
    content: '';
    position: absolute;
    width: 24rem;
    height: 24rem;
    right: -8rem;
    top: -12rem;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
    box-shadow: 0 0 0 2rem rgba(255,255,255,.045), 0 0 0 4rem rgba(255,255,255,.03);
}

.legal-hero .container { position: relative; z-index: 1; }
.legal-hero .badge-accent {
    background: rgba(245,128,62,.18) !important;
    color: #ffc08e !important;
    border-color: rgba(245,128,62,.45) !important;
}

.legal-content {
    background: linear-gradient(180deg, var(--bs-tertiary-bg, #f8f9fa), var(--bs-body-bg, #fff));
}

.legal-toc {
    padding: 1rem;
    border: 1px solid var(--bs-border-color, #d8e2ef);
    border-radius: 1rem;
    background: var(--bs-body-bg, #fff);
    box-shadow: 0 .35rem 1.25rem rgba(28,39,60,.05);
}

.legal-toc .nav-link {
    border-radius: .45rem;
}

.legal-toc .nav-link:hover,
.legal-toc .nav-link.active {
    color: #e76f35 !important;
    background: rgba(245,128,62,.09) !important;
}

.legal-document {
    border: 1px solid var(--bs-border-color, #d8e2ef) !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 .65rem 2rem rgba(28,39,60,.07) !important;
}

.legal-section { scroll-margin-top: 100px; }
.legal-section h2 {
    font-size: 1.3rem !important;
    letter-spacing: -.01em;
}

.legal-section h3 {
    margin-top: 1.35rem;
    color: var(--bs-emphasis-color);
    font-size: 1.05rem;
    font-weight: 700;
}

.legal-section p,
.legal-section li { line-height: 1.8 !important; }
.legal-section a { color: #d96831 !important; }
.legal-section a:hover { color: #2a7be4 !important; }

.legal-callout {
    border-radius: .75rem !important;
    background: rgba(245,128,62,.09) !important;
}

.legal-callout a { color: #c75d2d !important; }

.data-table {
    border-radius: .75rem !important;
    overflow: hidden;
}

.data-table thead {
    background: linear-gradient(90deg, rgba(245,128,62,.12), rgba(42,123,228,.08)) !important;
}

.right-pill {
    background: rgba(245,128,62,.09) !important;
    border-color: rgba(245,128,62,.3) !important;
}

.right-pill i { color: #e76f35 !important; }

.legal-page-link {
    border-radius: .65rem;
    border-color: rgba(245,128,62,.6) !important;
    color: #d96831 !important;
}

.qz-auth-switch {
    padding-top: 1rem;
    border-top: 1px solid var(--bs-border-color, #d8e2ef);
    text-align: center;
    color: var(--bs-secondary-color, #748194);
    font-size: .88rem;
}

.qz-auth-switch a {
    color: #e76f35;
    font-weight: 700;
    text-decoration: none;
    transition: color .15s ease;
}

.qz-auth-switch a:hover { color: #2a7be4; }

[data-bs-theme="light"] .legal-section .text-warning,
[data-bs-theme="light"] .legal-section strong.text-warning {
    color: #b65326 !important;
}

[data-bs-theme="light"] .legal-section .text-muted,
[data-bs-theme="light"] .legal-document small,
[data-bs-theme="light"] .legal-toc .text-muted {
    color: #596579 !important;
}

/* ---------------------------------------------------------------------
   Dark mode : contraste explicite pour les éléments du document légal.
   Les couleurs sont déclarées ici plutôt que laissées aux styles hérités
   afin que le texte reste lisible avec data-bs-theme="dark".
   --------------------------------------------------------------------- */
[data-bs-theme="dark"] .legal-content {
    background: #101827 !important;
}

[data-bs-theme="dark"] .legal-toc,
[data-bs-theme="dark"] .legal-document {
    color: #e7edf6;
    background: #172235 !important;
    border-color: #34415a !important;
}

[data-bs-theme="dark"] .legal-toc .text-muted,
[data-bs-theme="dark"] .legal-section .text-muted,
[data-bs-theme="dark"] .legal-document small {
    color: #aeb9ca !important;
}

[data-bs-theme="dark"] .legal-toc .nav-link {
    color: #c3ccda !important;
}

[data-bs-theme="dark"] .legal-toc .nav-link:hover,
[data-bs-theme="dark"] .legal-toc .nav-link.active {
    color: #ffc08e !important;
    background: rgba(245,128,62,.16) !important;
}

[data-bs-theme="dark"] .legal-section h2,
[data-bs-theme="dark"] .legal-section h3 {
    color: #f5f7fb !important;
}

[data-bs-theme="dark"] .legal-section p,
[data-bs-theme="dark"] .legal-section li,
[data-bs-theme="dark"] .legal-section td,
[data-bs-theme="dark"] .legal-section th {
    color: #d7deea !important;
}

[data-bs-theme="dark"] .legal-section strong,
[data-bs-theme="dark"] .legal-section b {
    color: #f5f7fb;
}

[data-bs-theme="dark"] .legal-section a,
[data-bs-theme="dark"] .legal-callout a,
[data-bs-theme="dark"] .qz-auth-switch a {
    color: #ffc08e !important;
}

[data-bs-theme="dark"] .legal-section a:hover,
[data-bs-theme="dark"] .legal-callout a:hover,
[data-bs-theme="dark"] .qz-auth-switch a:hover {
    color: #8fc3ff !important;
}

[data-bs-theme="dark"] .legal-callout {
    color: #e1e7f0 !important;
    background: rgba(245,128,62,.16) !important;
}

[data-bs-theme="dark"] .data-table {
    color: #d7deea;
    border-color: #34415a !important;
}

[data-bs-theme="dark"] .data-table thead {
    color: #f5f7fb !important;
    background: linear-gradient(90deg, rgba(245,128,62,.2), rgba(42,123,228,.18)) !important;
}

[data-bs-theme="dark"] .data-table tbody tr,
[data-bs-theme="dark"] .data-table tbody td,
[data-bs-theme="dark"] .data-table thead th {
    border-color: #34415a !important;
}

[data-bs-theme="dark"] .right-pill {
    color: #f5f7fb !important;
    background: rgba(245,128,62,.16) !important;
    border-color: rgba(245,128,62,.45) !important;
}

[data-bs-theme="dark"] .right-pill i { color: #ffc08e !important; }

[data-bs-theme="dark"] .qz-auth-switch {
    color: #aeb9ca;
    border-top-color: #34415a;
}

@media (max-width: 991.98px) {
    .legal-hero { padding: 6.25rem 0 3rem !important; }
    .legal-toc { position: static !important; }
}
