*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

/* ════════════════════════════════
   VARIABLES
════════════════════════════════ */
:root {
    --blue: #416FAF;
    --bg: #f8fafd;
    --text: #0f1a2e;
    --text-muted: rgba(15, 26, 46, 0.55);
    --card-bg: #ffffff;
    --border: rgba(65, 111, 175, 0.12);
    --surface: rgba(65, 111, 175, 0.05);
}

body.dark-mode {
    --bg: #0d0f14;
    --text: #f0f4fa;
    --text-muted: rgba(240, 244, 250, 0.45);
    --card-bg: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --surface: rgba(255, 255, 255, 0.04);
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

/* ════════════════════════════════
   ACCESSIBILITÉ
════════════════════════════════ */
#btn-top {
    position: fixed;
    bottom: 100px;
    right: 28px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--blue);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(65, 111, 175, 0.35);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s;
    z-index: 900;
    pointer-events: none;
}

#btn-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

#btn-top:hover {
    background: #3460a0;
}

#btn-top svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

#btn-access {
    position: fixed;
    bottom: 36px;
    right: 28px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(65, 111, 175, 0.15);
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    z-index: 900;
}

#btn-access:hover {
    border-color: var(--blue);
    transform: scale(1.05);
}

#btn-access svg {
    width: 22px;
    height: 22px;
    stroke: var(--blue);
}

#access-panel {
    position: fixed;
    bottom: 90px;
    right: 28px;
    width: 240px;
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 40px rgba(65, 111, 175, 0.15);
    z-index: 901;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateY(10px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    backdrop-filter: blur(12px);
}

#access-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.panel-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(65, 111, 175, 0.6);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.access-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: transparent;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-align: left;
    width: 100%;
}

.access-btn:hover {
    background: rgba(65, 111, 175, 0.08);
    border-color: rgba(65, 111, 175, 0.3);
}

.access-btn.active {
    background: rgba(65, 111, 175, 0.12);
    border-color: var(--blue);
    color: var(--blue);
}

.access-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.reading-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--blue);
    padding: 8px 14px;
    background: rgba(65, 111, 175, 0.08);
    border-radius: 8px;
}

.reading-indicator.show {
    display: flex;
}

.reading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.7);
    }
}

/* ════════════════════════════════
   MENU
════════════════════════════════ */
#site-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 48px);
    max-width: 1160px;
}

.header-inner {
    background: #0f1a2e;
    backdrop-filter: blur(18px);
    border-radius: 15px;
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.header-logo {
    flex-shrink: 0;
    text-decoration: none;
}

nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

nav>a,
.dropdown-toggle {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

nav>a:hover,
.dropdown-toggle:hover {
    color: white;
    border-color: var(--blue);
}

nav>a.active {
    color: white;
    border-color: var(--blue);
}

.dropdown-toggle svg {
    width: 13px;
    height: 13px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.dropdown:hover .dropdown-toggle svg {
    transform: rotate(180deg);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 12px;
    z-index: 100;
}

.dropdown-menu-inner {
    background: #0f1a2ec0;
    border-radius: 13px;
    padding: 8px;
    min-width: 290px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.84);
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 7px;
    transition: background 0.12s, color 0.12s;
}

.dropdown-menu a:hover {
    background: rgba(65, 111, 175, 0.35);
    color: white;
}

.btn-cta {
    flex-shrink: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: white;
    background: var(--blue);
    border: 1px solid rgba(100, 150, 220, 0.6);
    padding: 8px 22px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 0 10px rgba(65, 111, 175, 0.45), 0 0 0 1px rgba(100, 150, 220, 0.15);
}

.btn-cta:hover {
    background: #3460a0;
}

/* ════════════════════════════════
   PAGE WRAP + SIDEBAR
════════════════════════════════ */
.page-wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 120px 48px 100px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 60px;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-left: 4px;
}

.folder {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(65, 111, 175, 0.06);
}

.folder-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.folder-header svg {
    width: 18px;
    height: 18px;
    stroke: var(--blue);
    flex-shrink: 0;
}

.folder-header span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.folder-items {
    padding: 8px;
}

.folder-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.folder-item:hover {
    background: rgba(65, 111, 175, 0.06);
    color: var(--text);
}

.folder-item.active {
    background: rgba(65, 111, 175, 0.1);
    color: var(--blue);
}

.folder-item svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* ════════════════════════════════
   CONTENU
════════════════════════════════ */
.content-area {
    min-width: 0;
}

.content-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 14px;
}

.content-label::before {
    content: '';
    width: 20px;
    height: 2px;
    background: var(--blue);
    border-radius: 2px;
}

.content-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(36px, 4vw, 52px);
    color: var(--text);
    line-height: 1;
    margin-bottom: 32px;
    letter-spacing: 0.5px;
}

.content-title span {
    color: var(--blue);
}

.legal-block {
    margin-bottom: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--border);
}

.legal-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.legal-block h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legal-block h3::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--blue);
    border-radius: 2px;
    flex-shrink: 0;
}

.legal-block p {
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.85;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.legal-block p:last-child {
    margin-bottom: 0;
}

.legal-block ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.legal-block ul li {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.7;
    padding-left: 18px;
    position: relative;
}

.legal-block ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
    opacity: 0.5;
}

.legal-block ul li strong {
    color: var(--text);
    font-weight: 600;
}

.info-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-top: 12px;
}

.info-box strong {
    color: var(--text);
    font-weight: 600;
}

/* ════════════════════════════════
   FOOTER
════════════════════════════════ */
footer {
    background: #0f1a2e;
    color: white;
    padding: 64px 48px 0;
}

.footer-inner {
    max-width: 1160px;
    margin: 0 auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 64px;
    padding-bottom: 56px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-brand {
    display: flex;
    align-items: center;
}

.footer-desc {
    font-size: 13px;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.4);
    max-width: 280px;
    margin-top: 16px;
}

.footer-col-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-links a::before {
    content: '';
    width: 0;
    height: 1px;
    background: var(--blue);
    transition: width 0.2s;
    border-radius: 1px;
}

.footer-links a:hover {
    color: white;
}

.footer-links a:hover::before {
    width: 12px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-copy {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: rgba(255, 255, 255, 0.6);
}

/* ════════════════════════════════
   BURGER MOBILE
════════════════════════════════ */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.burger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

.burger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.burger.open span:nth-child(2) {
    opacity: 0;
}

.burger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background: rgba(13, 15, 20, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-top: 8px;
    padding: 10px;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav a,
.mobile-accordion-toggle {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    padding: 11px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: border-color 0.15s, color 0.12s;
    background: none;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-nav a:hover,
.mobile-accordion-toggle:hover {
    border-color: var(--blue);
    color: white;
}

.mobile-accordion-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}

.mobile-accordion-toggle.open svg {
    transform: rotate(180deg);
}

.mobile-submenu {
    display: none;
    flex-direction: column;
    padding-left: 14px;
}

.mobile-submenu.open {
    display: flex;
}

.mobile-submenu a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    border: none !important;
}

.mobile-cta {
    margin-top: 6px;
    background: var(--blue) !important;
    color: white !important;
    border: 1px solid var(--blue) !important;
    text-align: center;
    font-weight: 600 !important;
    justify-content: center !important;
}

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 860px) {

    nav,
    .btn-cta {
        display: none;
    }

    .burger {
        display: flex;
    }

    .header-inner {
        padding: 0 20px;
    }

    .page-wrap {
        grid-template-columns: 1fr;
        padding: 100px 24px 60px;
        gap: 40px;
    }

    .sidebar {
        position: static;
    }

    footer {
        padding: 56px 24px 0;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 500px) {
    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .footer-legal {
        flex-wrap: wrap;
        gap: 16px;
    }
}