:root {
    --primary: #7b2cbf;
    --primary-light: #9d4edd;
    --primary-dark: #5a189a;
    --bg-color: #fdfdfd;
    --text-main: #2d3436;
    --text-muted: #57606f;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(123, 44, 191, 0.1);
    --white: #ffffff;

    /* Section Colors */
    --comprendre: #0077b6;
    --soigner: #2b9348;
    --droits: #ffb703;
    --agir: #d00000;
    --recherche: #00b4d8;
    --politique: #3c096c;
    --communaute: #ff4d6d;
    --contact: #006d77;

    --comprendre-soft: rgba(0, 119, 182, 0.1);
    --soigner-soft: rgba(43, 147, 72, 0.1);
    --droits-soft: rgba(255, 183, 3, 0.1);
    --agir-soft: rgba(208, 0, 0, 0.1);
    --communaute-soft: rgba(255, 77, 109, 0.1);
    --info: #0096c7;
    --recherche-bg: #f0f9ff;
}

/* Article Recherche UI Fixes */
.article-container header .display-5 {
    line-height: 1.2;
    margin-top: 0.5rem;
}
.article-container .breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 2rem;
}
.article-container .badge {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.7rem;
}
.article-container .lead {
    font-size: 1rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
    margin-top: 1rem;
}
.rich-text-content {
    font-size: 1.05rem;
    color: var(--text-main);
}
.rich-text-content p:last-child {
    margin-bottom: 0;
}


/* Override Bootstrap Info for better visibility */
.bg-info { background-color: var(--info) !important; }
.btn-info { background-color: var(--info) !important; border-color: var(--info) !important; }
.text-info { color: var(--info) !important; }
.border-info { border-color: var(--info) !important; }
.alert-info { border-color: var(--info) !important; color: #0077b6; }

/* --- Accessibility Modes CSS --- */

/* 1. Dark Theme */
body.dark-theme, html.dark-theme {
    --bg-color: #030305 !important;
    --text-main: #e1e1e6 !important;
    --text-muted: #94a3b8 !important;
    --glass-bg: rgba(15, 15, 20, 0.9) !important;
    --glass-border: rgba(255, 255, 255, 0.1) !important;
    --white: #030305 !important;
    background-color: #030305 !important;
    color: #e1e1e6 !important;
}

body.dark-theme *:not([style*="border-color"]) {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .bg-light,
body.dark-theme .bg-white,
body.dark-theme .card:not([style*="border-color"]),
body.dark-theme .content-box,
body.dark-theme .feature-link,
body.dark-theme footer,
body.dark-theme .alert,
body.dark-theme .pill-nav,
body.dark-theme .modal-content,
body.dark-theme .dropdown-menu,
body.dark-theme .list-group-item,
body.dark-theme .map-container,
body.dark-theme .doc-content,
body.dark-theme .document-content,
body.dark-theme .doc-container,
body.dark-theme .inserm-report,
body.dark-theme .toc,
body.dark-theme .point-item,
body.dark-theme .info-box,
body.dark-theme .answer,
body.dark-theme .questions-list,
body.dark-theme .question-item {
    background-color: #0a0a0f !important;
    color: #e1e1e6 !important;
    box-shadow: none !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .bg-white,
body.dark-theme .bg-light {
    background-color: #0a0a0f !important;
}

body.dark-theme .btn-outline-primary {
    color: #c77dff !important;
    border-color: #c77dff !important;
}

body.dark-theme .btn-outline-primary:hover {
    background-color: #7b2cbf !important;
    color: white !important;
}

body.dark-theme .text-primary,
body.dark-theme .btn-link,
body.dark-theme i {
    color: #c77dff !important;
}

body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea,
body.dark-theme .form-control,
body.dark-theme .form-select {
    background-color: #12121a !important;
    color: #e1e1e6 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body.dark-theme .table {
    color: #e1e1e6 !important;
}

body.dark-theme .table thead th {
    border-bottom-color: rgba(255, 255, 255, 0.2) !important;
}

body.dark-theme h1, body.dark-theme h2, body.dark-theme h3, body.dark-theme h4, body.dark-theme h5, body.dark-theme h6, body.dark-theme strong, body.dark-theme .lead {
    color: #ffffff !important;
}

body.dark-theme .doc-content p, 
body.dark-theme .document-content p,
body.dark-theme .doc-content li,
body.dark-theme .document-content li {
    color: #e1e1e6 !important;
}

body.dark-theme .doc-content h1, 
body.dark-theme .doc-content h2, 
body.dark-theme .doc-content h3,
body.dark-theme .document-content h1,
body.dark-theme .document-content h2,
body.dark-theme .document-content h3 {
    color: #ffffff !important;
}

body.dark-theme .doc-content header {
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .text-dark {
    color: #ffffff !important;
}

body.dark-theme .doc-content h1, 
body.dark-theme .doc-content h2, 
body.dark-theme .doc-content h3,
body.dark-theme .doc-content h4,
body.dark-theme .doc-container h1, 
body.dark-theme .doc-container h2, 
body.dark-theme .doc-container h3,
body.dark-theme .inserm-report h1,
body.dark-theme .inserm-report h2,
body.dark-theme .inserm-report h3,
body.dark-theme .inserm-report h4,
body.dark-theme .document-content h1,
body.dark-theme .document-content h2,
body.dark-theme .document-content h3 {
    color: #ffffff !important;
}

body.dark-theme .point-header,
body.dark-theme .point-item {
    color: #e1e1e6 !important;
}

body.dark-theme .toc a {
    color: #c77dff !important;
}

body.dark-theme .report-footer,
body.dark-theme .doc-footer,
body.dark-theme .footer,
body.dark-theme .meta {
    color: #94a3b8 !important;
}

body.dark-theme .text-muted {
    color: #94a3b8 !important;
}

body.dark-theme .illustration-wrapper i {
    color: #c77dff !important;
}

body.dark-theme .feature-link:hover {
    background-color: #12121a !important;
    border-color: #7b2cbf !important;
}

/* 2. High Contrast Theme */
body.high-contrast-theme, html.high-contrast-theme {
    background-color: #000000 !important;
    color: #ffffff !important;
}

body.high-contrast-theme * {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #ffffff !important;
}

body.high-contrast-theme .form-check-input,
body.high-contrast-theme .form-radio-input {
    border: 2px solid #ffffff !important;
    background-color: #000000 !important;
}

body.high-contrast-theme .form-check-input:checked,
body.high-contrast-theme .form-radio-input:checked {
    background-color: #ffff00 !important;
}

body.high-contrast-theme .btn, body.high-contrast-theme .btn-primary, body.high-contrast-theme .pill-nav a {
    background-color: #ffff00 !important;
    color: #000000 !important;
}

/* 3. Dyslexia Mode */
body.dyslexia-mode {
    font-family: 'OpenDyslexic', sans-serif !important;
    letter-spacing: 0.05em !important;
    word-spacing: 0.1em !important;
}

/* 4. Monochrome Mode */
body.monochrome-mode {
    filter: grayscale(100%) !important;
}

/* 5. Reduce Motion */
body.reduce-motion * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

/* 6. Font Size Scaling */
html.font-size-md { font-size: 18px; }
html.font-size-lg { font-size: 20px; }
html.font-size-xl { font-size: 24px; }

/* --- Navigation Îlot Flottant (Pill Nav) --- */

header {
    background: transparent;
    border: none;
    padding: 4rem 0 2rem 0;
    position: relative;
    z-index: 10;
}

.header-top {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    transition: transform 0.3s;
}

.logo-wrapper:hover {
    transform: translateY(-2px);
}

.logo-img {
    width: 250px;
    height: 250px;
    padding-top: 2%;
    background: transparent;
    border-radius: 12px;
    display: block;
    object-fit: contain;
}

.brand-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.brand-name {
    font-weight: 900;
    font-size: 1.6rem;
    color: var(--primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.brand-tagline {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 4px;
}

body.dark-theme .brand-name {
    color: #ffffff !important;
}

body.dark-theme .logo-img {
    box-shadow: none;
}

/* --- Sidebar Navigation (Vertical Stepper) --- */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-right: 1px solid var(--glass-border);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    overflow-x: visible;
}

.sidebar-collapsed .sidebar {
    width: 85px;
    padding: 1.5rem 0.5rem;
    overflow: visible;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 0;
}

.sidebar-toggle-btn {
    background: var(--primary);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(123, 44, 191, 0.3);
    z-index: 1001;
}

.sidebar-collapsed .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

.sidebar-collapsed .sidebar .brand-info,
.sidebar-collapsed .nav-section-title {
    display: none;
}

.sidebar-collapsed .step-link,
.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 1rem 0.5rem;
    position: relative;
    overflow: visible;
}

.sidebar-collapsed .step-text,
.sidebar-collapsed .nav-text {
    display: block !important;
    position: absolute;
    left: 60px;
    background: var(--primary);
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-out;
    white-space: nowrap;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 9999;
}

.sidebar-collapsed .step-text::before,
.sidebar-collapsed .nav-text::before {
    content: "";
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid var(--primary);
}

.sidebar-collapsed .step-link:hover .step-text,
.sidebar-collapsed .nav-item:hover .nav-text {
    opacity: 1;
    visibility: visible;
    left: 75px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex-grow: 1;
}

.sidebar-collapsed .sidebar-nav {
    overflow: visible;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1.2px;
    margin: 1.2rem 0.8rem 0.4rem;
}

.step-link, .nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.step-num {
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: rgba(123, 44, 191, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 900;
}

.step-line {
    width: 2px;
    height: 12px;
    background: rgba(123, 44, 191, 0.1);
    margin-left: 23px;
}

.nav-item i {
    width: 28px;
    min-width: 28px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.step-link:hover, .nav-item:hover {
    background: rgba(123, 44, 191, 0.05);
    color: var(--primary);
}

.step-link.active, .nav-item.active {
    background: var(--primary);
    color: white !important;
}

.step-link.active .step-num {
    background: white;
    color: var(--primary);
}

.step-link.active .step-text, .nav-item.active i, .nav-item.active .nav-text {
    color: white !important;
}

/* --- Article Recherche Header Styling --- */
article header .display-5 {
    line-height: 1.2;
    color: var(--primary);
}

article header .lead {
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 1.5rem;
}

article header .gap-x-4 {
    column-gap: 1.5rem;
}

article header .gap-y-2 {
    row-gap: 0.5rem;
}

.rich-text-content {
    color: #334155;
    line-height: 1.7;
}

.rich-text-content p:last-child {
    margin-bottom: 0;
}


.top-page-header {
    padding: 2rem 3rem;
    display: flex;
    align-items: center;
    background: var(--white);
    border-bottom: 1px solid var(--glass-border);
}

.top-page-header .logo-wrapper {
    gap: 2rem;
}

.top-page-header .brand-name {
    font-size: 1.8rem;
    font-weight: 800;
}

.calming-hero {
    --section-color: var(--primary);
    height: 350px;
    width: 100%;
    background: var(--section-color);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content-overlay {
    position: relative;
    z-index: 10;
    width: 85%;
    max-width: 1000px;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 3rem;
}

body.dark-theme .hero-content-overlay {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-text-area {
    color: white;
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.hero-main-icon {
    font-size: 6rem;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
    flex-shrink: 0;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: -1px;
    line-height: 1;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.2));
}

.hero-watermark {
    position: absolute;
    right: -2%;
    bottom: -10%;
    font-size: 35rem;
    color: rgba(255, 255, 255, 0.15);
    z-index: 1;
    transform: rotate(-10deg);
    pointer-events: none;
}

/* Section Colors */
.hero-comprendre { --section-color: #0077b6; }
.hero-soigner { --section-color: #2b9348; }
.hero-droits { --section-color: #ffb703; }
.hero-agir { --section-color: #d00000; }
.hero-recherche { --section-color: #00b4d8; }
.hero-politique { --section-color: #3c096c; }
.hero-communaute { --section-color: #ff4d6d; }
.hero-contact { --section-color: #006d77; }

/* Section Buttons/Links Variants */
.btn-comprendre { background-color: var(--comprendre); border-color: var(--comprendre); color: white !important; }
.btn-soigner { background-color: var(--soigner); border-color: var(--soigner); color: white !important; }
.btn-droits { background-color: var(--droits); border-color: var(--droits); color: #1a1a1a !important; font-weight: 700; }
.btn-agir { background-color: var(--agir); border-color: var(--agir); color: white !important; }
.btn-recherche { background-color: var(--recherche); border-color: var(--recherche); color: white !important; }
.btn-politique { background-color: var(--politique); border-color: var(--politique); color: white !important; }
.btn-communaute { background-color: var(--communaute); border-color: var(--communaute); color: white !important; }
.btn-contact { background-color: var(--contact); border-color: var(--contact); color: white !important; }

/* Outline Variants */
.btn-outline-comprendre { border-color: var(--comprendre); color: var(--comprendre); background: transparent; }
.btn-outline-comprendre:hover { background-color: var(--comprendre); color: white !important; }

.btn-outline-soigner { border-color: var(--soigner); color: var(--soigner); background: transparent; }
.btn-outline-soigner:hover { background-color: var(--soigner); color: white !important; }

.btn-outline-droits { border-color: var(--droits); color: var(--droits); background: transparent; }
.btn-outline-droits:hover { background-color: var(--droits); color: #1a1a1a !important; }

.btn-outline-agir { border-color: var(--agir); color: var(--agir); background: transparent; }
.btn-outline-agir:hover { background-color: var(--agir); color: white !important; }

.btn-outline-recherche { border-color: #00b4d8; color: #00b4d8; background: transparent; }
.btn-outline-recherche:hover { background-color: #00b4d8; color: white !important; }

.btn-outline-politique { border-color: #3c096c; color: #3c096c; background: transparent; }
.btn-outline-politique:hover { background-color: #3c096c; color: white !important; }

body.dark-theme .btn-outline-comprendre { color: #48cae4; border-color: #48cae4; }
body.dark-theme .btn-outline-comprendre:hover { background-color: #48cae4; color: #030305 !important; }

body.dark-theme .btn-outline-soigner { color: #52b788; border-color: #52b788; }
body.dark-theme .btn-outline-soigner:hover { background-color: #52b788; color: #030305 !important; }

body.dark-theme .btn-outline-droits { color: #ffca3a; border-color: #ffca3a; }
body.dark-theme .btn-outline-droits:hover { background-color: #ffca3a; color: #030305 !important; }

body.dark-theme .btn-outline-agir { color: #ff595e; border-color: #ff595e; }
body.dark-theme .btn-outline-agir:hover { background-color: #ff595e; color: #030305 !important; }

body.dark-theme .btn-outline-recherche { color: #ade8f4; border-color: #ade8f4; }
body.dark-theme .btn-outline-recherche:hover { background-color: #ade8f4; color: #030305 !important; }

body.dark-theme .btn-outline-politique { color: #9d4edd; border-color: #9d4edd; }
body.dark-theme .btn-outline-politique:hover { background-color: #9d4edd; color: #030305 !important; }

.btn-comprendre:hover, .btn-soigner:hover, .btn-droits:hover, .btn-agir:hover, 
.btn-recherche:hover, .btn-politique:hover, .btn-communaute:hover, .btn-contact:hover {
    filter: brightness(1.1);
}

.calming-hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--bg-color), transparent);
}

.sidebar-collapsed .top-page-header {
    padding: 2rem 3rem;
}

/* Mobile Adjustments for new header */
@media (max-width: 992px) {
    .top-page-header {
        padding: 1.5rem 1rem;
    }
    
    .top-page-header .brand-name {
        font-size: 1.2rem;
    }

    .top-page-header .brand-tagline {
        font-size: 0.7rem;
    }

    .top-page-header .logo-img {
        width: 100px;
        height: 100px;
    }
    
    .calming-hero {
        height: auto;
        min-height: 250px;
        padding: 2rem 1rem;
    }

    .hero-content-overlay {
        width: 100%;
        padding: 1.5rem;
        gap: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .hero-text-area {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-main-icon {
        font-size: 4rem;
    }

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

    .hero-watermark {
        font-size: 15rem;
    }
}

/* --- Content Adaptation --- */

.main-wrapper {
    margin-left: 280px;
    min-height: 100vh;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-collapsed .main-wrapper {
    margin-left: 85px;
}

/* Fix Accessibility Bar position */
.acc-bar-container {
    top: 20px !important;
    right: 20px !important;
    transform: none !important;
}

/* --- Breadcrumbs Styling --- */
.breadcrumb {
    padding: 0.75rem 1.25rem;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    display: inline-flex;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-main);
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
    font-weight: bold;
}

body.dark-theme .breadcrumb {
    background: rgba(15, 15, 20, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .breadcrumb-item.active {
    color: #ffffff !important;
}

/* Section-specific Breadcrumbs */
.hero-comprendre ~ main .breadcrumb-item a { color: var(--comprendre); }
.hero-soigner ~ main .breadcrumb-item a { color: var(--soigner); }
.hero-droits ~ main .breadcrumb-item a { color: #b07d00; } /* Darker for readability in light mode */
.hero-agir ~ main .breadcrumb-item a { color: var(--agir); }
.hero-recherche ~ main .breadcrumb-item a { color: var(--recherche); }
.hero-politique ~ main .breadcrumb-item a { color: var(--politique); }
.hero-communaute ~ main .breadcrumb-item a { color: var(--communaute); }
.hero-contact ~ main .breadcrumb-item a { color: var(--contact); }

body.dark-theme .hero-comprendre ~ main .breadcrumb-item a { color: #48cae4; }
body.dark-theme .hero-soigner ~ main .breadcrumb-item a { color: #52b788; }
body.dark-theme .hero-droits ~ main .breadcrumb-item a { color: #ffca3a; }
body.dark-theme .hero-agir ~ main .breadcrumb-item a { color: #ff595e; }
body.dark-theme .hero-recherche ~ main .breadcrumb-item a { color: #ade8f4; }
body.dark-theme .hero-politique ~ main .breadcrumb-item a { color: #9d4edd; }
body.dark-theme .hero-communaute ~ main .breadcrumb-item a { color: #ff4d6d; }
body.dark-theme .hero-contact ~ main .breadcrumb-item a { color: #83c5be; }

.card-theme-full {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 25px;
    border-width: 2px !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-comprendre-full { 
    background: linear-gradient(135deg, rgba(0, 119, 182, 0.85), rgba(0, 95, 141, 0.9)) !important; 
    border-color: rgba(0, 119, 182, 0.4) !important;
    color: white !important; 
}

.card-soigner-full { 
    background: linear-gradient(135deg, rgba(43, 147, 72, 0.85), rgba(27, 94, 32, 0.9)) !important; 
    border-color: rgba(43, 147, 72, 0.4) !important;
    color: white !important; 
}

.card-droits-full { 
    background: linear-gradient(135deg, rgba(255, 183, 3, 0.85), rgba(255, 143, 0, 0.9)) !important; 
    border-color: rgba(255, 183, 3, 0.4) !important;
    color: #1a1a1a !important; 
}

.card-agir-full { 
    background: linear-gradient(135deg, rgba(208, 0, 0, 0.85), rgba(160, 0, 0, 0.9)) !important; 
    border-color: rgba(208, 0, 0, 0.4) !important;
    color: white !important; 
}

body.dark-theme .card-theme-full {
    border-width: 1px !important;
}

body.dark-theme .card-comprendre-full { border-color: rgba(255, 255, 255, 0.1) !important; }
body.dark-theme .card-soigner-full { border-color: rgba(255, 255, 255, 0.1) !important; }
body.dark-theme .card-droits-full { border-color: rgba(255, 255, 255, 0.1) !important; }
body.dark-theme .card-agir-full { border-color: rgba(255, 255, 255, 0.1) !important; }

.card-theme-full:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
}

.card-comprendre-full .btn-light { color: #004d73 !important; }
.card-soigner-full .btn-light { color: #0f3d13 !important; }
.card-droits-full .btn-dark { background-color: #1a1a1a; border: none; color: white !important; }
.card-agir-full .btn-light { color: #6d0000 !important; }

body.dark-theme .card-theme-full .btn-light {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

body.dark-theme .card-droits-full .btn-dark {
    background-color: #000000 !important;
    color: white !important;
}

/* Outline buttons on colored cards */
.card-theme-full .btn-outline-light {
    border-width: 2px;
    font-weight: 600;
    color: white !important;
    border-color: white !important;
}

.card-theme-full .btn-outline-light:hover {
    background-color: white !important;
}

.card-comprendre-full .btn-outline-light:hover { color: var(--comprendre) !important; }
.card-soigner-full .btn-outline-light:hover { color: var(--soigner) !important; }
.card-agir-full .btn-outline-light:hover { color: var(--agir) !important; }

.card-droits-full .btn-outline-dark {
    border-color: #1a1a1a !important;
    color: #1a1a1a !important;
    border-width: 2px;
    font-weight: 600;
}

.card-droits-full .btn-outline-dark:hover {
    background-color: #1a1a1a !important;
    color: white !important;
}

/* --- Footer & Final Touches --- */
footer {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 2px solid var(--agir-soft);
    padding: 3rem 0;
    margin-top: 5rem;
    text-align: center;
    color: var(--text-color);
}

footer p {
    margin-bottom: 0.5rem;
}

#chatbot-placeholder {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.5rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Sidebar Nav Specific Highlights */
.sidebar-nav .step-link#nav-home.active .step-num { background: var(--text-color); }

.sidebar-nav .step-link#nav-ressources:hover .step-text,
.sidebar-nav .step-link#nav-ressources.active .step-text { color: var(--comprendre); }
.sidebar-nav .step-link#nav-ressources:hover .step-num,
.sidebar-nav .step-link#nav-ressources.active .step-num { background: var(--comprendre); color: white; }

.sidebar-nav .step-link#nav-traitements:hover .step-text,
.sidebar-nav .step-link#nav-traitements.active .step-text { color: var(--soigner); }
.sidebar-nav .step-link#nav-traitements:hover .step-num,
.sidebar-nav .step-link#nav-traitements.active .step-num { background: var(--soigner); color: white; }

.sidebar-nav .step-link#nav-droits:hover .step-text,
.sidebar-nav .step-link#nav-droits.active .step-text { color: var(--droits); }
.sidebar-nav .step-link#nav-droits:hover .step-num,
.sidebar-nav .step-link#nav-droits.active .step-num { background: var(--droits); color: white; }

.sidebar-nav .step-link#nav-agir:hover .step-text,
.sidebar-nav .step-link#nav-agir.active .step-text { color: var(--agir); }
.sidebar-nav .step-link#nav-agir:hover .step-num,
.sidebar-nav .step-link#nav-agir.active .step-num { background: var(--agir); color: white; }

.sidebar-nav .nav-item#nav-recherche:hover,
.sidebar-nav .nav-item#nav-recherche.active { color: var(--recherche); border-left-color: var(--recherche); }
.sidebar-nav .nav-item#nav-politique:hover,
.sidebar-nav .nav-item#nav-politique.active { color: var(--politique); border-left-color: var(--politique); }
.sidebar-nav .nav-item#nav-facebook:hover,
.sidebar-nav .nav-item#nav-facebook.active { color: var(--communaute); border-left-color: var(--communaute); }
.sidebar-nav .nav-item#nav-contact:hover,
.sidebar-nav .nav-item#nav-contact.active { color: var(--contact); border-left-color: var(--contact); }
.sidebar-nav .nav-item#nav-questionnaire-link:hover,
.sidebar-nav .nav-item#nav-questionnaire-link.active { color: var(--comprendre); border-left-color: var(--comprendre); }
.sidebar-nav .nav-item#nav-deputes:hover,
.sidebar-nav .nav-item#nav-deputes.active { color: var(--agir); border-left-color: var(--agir); }

/* Ensure Sidebar visibility in dark mode */
body.dark-theme .sidebar {
    background: rgba(15, 15, 20, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Header for mobile */
header.d-lg-none {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 999;
}

/* Responsive Mobile */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-active {
        transform: translateX(0);
        width: 280px;
    }
    
    .main-wrapper {
        margin-left: 0 !important;
    }
    
    .sidebar-toggle-btn {
        display: none;
    }
}

/* Push main content down to avoid overlap with floating menu */
main {
    padding-top: 1rem;
}

/* --- Accessibility Bar Styling --- */

.acc-bar-container {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.acc-bar-toggle {
    background: var(--primary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.acc-bar-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 320px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 15px;
    display: none;
}

.acc-bar-panel.active {
    display: block;
}

.acc-bar-header {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--primary);
}

.acc-section { margin-bottom: 1.5rem; }
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.acc-btn i {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.acc-btn:hover i {
    color: var(--primary-dark);
}

.acc-btn.active i {
    color: white !important;
}

.acc-btn.active { background: var(--primary); color: white !important; }

/* --- Core Layout --- */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero { text-align: center; padding: 4rem 0; }
.hero h1 { font-size: 3.5rem; font-weight: 900; background: linear-gradient(to right, var(--primary), var(--primary-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

.feature-link {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 3rem 2rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-link:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: 0 20px 40px -10px rgba(123, 44, 191, 0.1); }
.feature-link i { color: var(--primary); margin-bottom: 1.5rem; }

.card, .content-box { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 20px; padding: 2rem; margin-bottom: 2rem; }

a.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(123, 44, 191, 0.2) !important;
}

/* --- France Map Styling --- */
.map-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 3rem;
    margin-top: 4rem;
}

.france-map-svg {
    width: 100%;
    height: auto;
    max-height: 600px;
    filter: drop-shadow(0 10px 20px rgba(123, 44, 191, 0.1));
}

.france-map-svg path {
    fill: rgba(123, 44, 191, 0.05);
    stroke: var(--primary);
    stroke-width: 1.5;
    transition: all 0.3s ease;
    cursor: pointer;
}

.france-map-svg path:hover {
    fill: var(--primary);
    stroke-width: 2;
    transform: scale(1.01);
    filter: drop-shadow(0 0 15px rgba(123, 44, 191, 0.4));
}

/* Map Tooltip */
#map-tooltip {
    position: fixed;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(123, 44, 191, 0.2);
    pointer-events: none;
    z-index: 2000;
    display: none;
    min-width: 220px;
    transition: opacity 0.2s;
}

body.dark-theme #map-tooltip {
    background: rgba(15, 15, 20, 0.95);
    color: white;
    border-color: #c77dff;
}

#map-tooltip .region-name {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary);
    display: block;
    margin-bottom: 4px;
}

body.dark-theme #map-tooltip .region-name {
    color: #c77dff;
}

#map-tooltip .group-name {
    font-size: 0.9rem;
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

#map-tooltip .member-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

#map-tooltip .member-count i {
    font-size: 0.8rem;
}

body.dark-theme .france-map-svg path {
    fill: rgba(255, 255, 255, 0.05);
    stroke: #c77dff;
}

body.dark-theme .france-map-svg path:hover {
    fill: #7b2cbf;
    stroke: #ffffff;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.legend-item {
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-muted);
}

footer { padding: 4rem 0; text-align: center; border-top: 1px solid var(--glass-border); color: var(--text-muted); }

.region-label {
    fill: var(--primary);
    font-size: 10px;
    font-weight: 800;
    pointer-events: none;
    text-shadow: 0 0 2px white;
}

body.dark-theme .region-label {
    fill: #c77dff;
    text-shadow: 0 0 2px black;
}

.member-badge {
    fill: var(--primary);
    font-size: 9px;
    font-weight: 700;
    pointer-events: none;
}

body.dark-theme .member-badge {
    fill: #c77dff;
}

/* Animations Premium */
@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(40px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.reveal {
    opacity: 0;
    animation: fadeInUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Apparition décalée (Staggered) pour les cartes */
.grid > *:nth-child(1) { animation-delay: 0.1s; }
.grid > *:nth-child(2) { animation-delay: 0.2s; }
.grid > *:nth-child(3) { animation-delay: 0.3s; }
.grid > *:nth-child(4) { animation-delay: 0.4s; }

.association-info {
    animation-delay: 0.6s;
}

/* --- Bootstrap Overrides for Violet Accent --- */
.btn-primary, .btn-submit {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.btn-primary:hover, .btn-submit:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.btn-outline-primary {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary) !important;
    color: white !important;
}

.text-primary {
    color: var(--primary) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

/* Icons & Links Reinforcement */
i.text-primary, i.fa-check-circle, i.fa-check {
    color: var(--primary) !important;
}

a {
    color: var(--primary);
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-dark);
}

.btn-link {
    color: var(--primary) !important;
    font-weight: 700;
    text-decoration: none;
}

.btn-link:hover {
    color: var(--primary-dark) !important;
}

.alert-info {
    background-color: rgba(123, 44, 191, 0.05) !important;
    border-left: 5px solid var(--primary) !important;
    color: var(--text-main) !important;
}

.alert-primary {
    background-color: rgba(123, 44, 191, 0.1) !important;
    border-color: var(--primary-light) !important;
    color: var(--primary-dark) !important;
}

body.dark-theme .alert-info, 
body.dark-theme .alert-primary {
    background-color: rgba(199, 125, 255, 0.1) !important;
    border-color: rgba(199, 125, 255, 0.2) !important;
    color: #e1e1e6 !important;
}

body.dark-theme .btn-outline-primary {
    border-color: var(--primary-light) !important;
    color: var(--primary-light) !important;
}

body.dark-theme .btn-outline-primary:hover {
    background-color: var(--primary-light) !important;
    color: #030305 !important;
}
  
/* --- WYSIWYG Rich Text Content Styles --- */  
.rich-text-content h1, .rich-text-content h2, .rich-text-content h3 { margin-top: 1.5rem; margin-bottom: 1rem; font-weight: 700; color: var(--bs-primary); }  
.rich-text-content ul, .rich-text-content ol { margin-bottom: 1rem; padding-left: 1.5rem; }  
.rich-text-content li { margin-bottom: 0.5rem; }  
.rich-text-content p { margin-bottom: 1rem; line-height: 1.6; } 
