:root { --brand: #0d1b2a; --accent: #1d9bf0; }
body { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }

.bg-dark-blue { background: var(--brand) !important; }

.hero {
    background: linear-gradient(135deg, #0d1b2a 0%, #1a2d45 60%, #1d9bf0 150%);
    min-height: 340px;
    display: flex; align-items: center;
}

.theme-card { transition: transform .15s, box-shadow .15s; }
.theme-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.08); }

.article-body { line-height: 1.75; font-size: 1.02rem; color: #1f2937; }

.narrative-step { border: 1px solid #eef2f7; }

/* Carte */
.geo-wrapper { position: relative; height: calc(100vh - 72px); }
#map { position: absolute; inset: 0; }
.geo-sidebar {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 380px; max-width: 90vw;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0,0,0,.08);
    padding: 1.25rem;
    overflow-y: auto;
    z-index: 500;
    transition: transform .25s;
}
.geo-sidebar.collapsed { transform: translateX(100%); }

#filters button.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Search highlight */
mark { background: #fef3c7; padding: 0 .15em; border-radius: 2px; }

.project-hero {
    background: linear-gradient(135deg, #0d1b2a 0%, #1a2d45 100%);
}
.stat-tile {
    background: #f8fafc;
    border-left: 3px solid #1d9bf0;
    padding: .75rem 1rem;
    border-radius: 6px;
}

.article-preview:hover { background: #f8fafc; margin: 0 -.75rem; padding-left: .75rem; padding-right: .75rem; }
#search:focus { box-shadow: 0 0 0 .2rem rgba(29,155,240,.25); border-color: #1d9bf0; }

.strategy-hero {
    background: linear-gradient(135deg, #0d1b2a 0%, #1a2d45 60%, #1d9bf0 160%);
}
.strategy-summary-card {
    background: #f0f7ff;
    border-left: 4px solid #1d9bf0;
    border-radius: 8px;
}

.kpi-card {
    background: #fff;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    border-top: 3px solid #1d9bf0;
}
.kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0d1b2a;
    margin-top: .25rem;
}

.pilar-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    border-left: 4px solid #f59e0b;
}
.pilar-icon {
    font-size: 2rem;
    line-height: 1;
}

.badge-type-gaz { background: #f59e0b; color: #0d1b2a; }
.badge-type-solaire { background: #10b981; }
.badge-type-eolien { background: #3b82f6; }
.badge-type-thermique { background: #6b7280; }
.badge-type-mixte { background: #8b5cf6; }
.badge-type-bess { background: #6366f1; }
.badge-type-transport { background: #0891b2; }
.badge-type-interconnexion { background: #0891b2; }
.badge-type-erd { background: #10b981; }
.badge-type-cuisson { background: #ec4899; }
.badge-type-biomasse { background: #84cc16; }

.raw-text-details summary {
    cursor: pointer;
    padding: .75rem 0;
    list-style: none;
}
.raw-text-details summary::before { content: '▸ '; }
.raw-text-details[open] summary::before { content: '▾ '; }
.raw-text-pre {
    max-height: 400px;
    overflow-y: auto;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 6px;
    font-size: .72rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: 1px solid #e2e8f0;
}
.proj-filter.active { color: #fff !important; }

.reports-hero {
    background: linear-gradient(135deg, #0d1b2a 0%, #2c3e50 55%, #8b5cf6 165%);
}
.featured-card {
    background: #f5f3ff;
    border-left: 4px solid #8b5cf6;
    border-radius: 10px;
}
.doc-card { transition: transform .15s, box-shadow .15s; }
.doc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
}

.badge-cat-strategie   { background: #1d9bf0; }
.badge-cat-loi         { background: #0d1b2a; }
.badge-cat-regulation  { background: #6366f1; }
.badge-cat-rapport     { background: #3b82f6; }
.badge-cat-enquete     { background: #ec4899; }
.badge-cat-audit       { background: #ef4444; }
.badge-cat-evaluation  { background: #10b981; }
.badge-cat-finance     { background: #f59e0b; color: #0d1b2a; }

:root {
    --tone-primary: #1d9bf0;
    --tone-dark:    #1e293b;
    --tone-danger:  #ef4444;
    --tone-warning: #f59e0b;
    --tone-info:    #06b6d4;
}

.doc-hero { color: #fff; }

.doc-summary-card {
    background: #f8fafc;
    border-left: 4px solid #1d9bf0;
    border-radius: 8px;
}
.doc-summary-card[style*="border-left-color"] {
    border-left: 4px solid var(--tone, #1d9bf0) !important;
}

.kpi-card {
    background: #fff;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    border-top: 3px solid var(--tone-primary);
}
.kpi-card.tone-primary { border-top-color: var(--tone-primary); }
.kpi-card.tone-dark    { border-top-color: var(--tone-dark); }
.kpi-card.tone-danger  { border-top-color: var(--tone-danger); background: #fef2f2; }
.kpi-card.tone-warning { border-top-color: var(--tone-warning); background: #fffbeb; }
.kpi-card.tone-info    { border-top-color: var(--tone-info); background: #ecfeff; }

.kpi-label {
    font-size: .75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d1b2a;
    margin-top: .25rem;
    line-height: 1.2;
    word-break: break-word;
}

.webdocs-home {
    min-height: 100vh;
    color: #102235;
    background:
        radial-gradient(ellipse at 85% 0%, rgba(29, 155, 240, .12), transparent 38rem),
        #f4f7fa;
}
.webdocs-header { background: #0d1b2a; }
.webdocs-brand {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-decoration: none;
}
.webdocs-brand .brand-country {
    color: #9bb1c5;
    font-size: .8em;
    font-weight: 600;
}
.webdocs-intro { padding: 5rem 1rem 3.5rem; }
.webdocs-intro h1 { color: #0d1b2a; }
.webdocs-intro .lead {
    max-width: 680px;
    color: #64748b;
}
.webdocs-eyebrow {
    color: #1683c5;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.webdocs-card {
    position: relative;
    display: flex;
    min-height: 270px;
    flex-direction: column;
    overflow: hidden;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    border-top: 4px solid var(--webdocs-accent);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 35, 55, .06);
    color: #102235;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}
.webdocs-card[href]:hover,
.webdocs-card[href]:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(15, 35, 55, .13);
}
.webdocs-card:focus-visible {
    outline: 3px solid var(--webdocs-accent);
    outline-offset: 3px;
}
.webdocs-card-icon {
    margin-bottom: 1rem;
    font-size: 2rem;
    line-height: 1;
}
.webdocs-card-kicker {
    color: #718096;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
}
.webdocs-card h2 {
    margin: .55rem 0 .65rem;
    font-size: clamp(1.15rem, 2.5vw, 1.55rem);
    font-weight: 800;
    line-height: 1.25;
}
.webdocs-card h2 span { color: var(--webdocs-accent); }
.webdocs-card p {
    margin-bottom: 1.25rem;
    color: #64748b;
}
.webdocs-card-action {
    margin-top: auto;
    color: var(--webdocs-accent);
    font-weight: 700;
}
.webdocs-coming-soon {
    align-self: flex-start;
    margin-top: auto;
    padding: .4rem .7rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
}
.webdocs-card-energy { --webdocs-accent: #d99c00; }
.webdocs-card-mines { --webdocs-accent: #64748b; }
.webdocs-card-agriculture { --webdocs-accent: #18845b; }
.webdocs-card-water { --webdocs-accent: #1683c5; }
.webdocs-footer {
    border-top: 1px solid #e2e8f0;
    color: #718096;
    font-size: .85rem;
}

@media (max-width: 575.98px) {
    .webdocs-intro { padding: 3.5rem 1rem 2.5rem; }
    .webdocs-card { min-height: 250px; padding: 1.5rem; }
}

.comparator-hero {
    background: linear-gradient(135deg, #0d1b2a 0%, #7f1d1d 120%);
}
.comparator-table .severity-critique { border-left: 4px solid #ef4444; }
.comparator-table .severity-élevée { border-left: 4px solid #f59e0b; }
.comparator-table .severity-modérée { border-left: 4px solid #6b7280; }

/* ---------- HOME — hero ---------- */
.home-hero {
    background: linear-gradient(135deg, #0d1b2a 0%, #1a2d45 55%, #1d9bf0 150%);
    min-height: 380px;
}
.letter-spacing { letter-spacing: .12em; }
.hero-emblem {
    font-size: 10rem;
    text-align: center;
    opacity: .15;
    line-height: 1;
    filter: drop-shadow(0 0 30px rgba(255,255,255,.3));
}

/* ---------- BANDEAU CHIFFRES ---------- */
.corpus-banner {
    background: #0d1b2a;
    color: #fff;
    padding: 1.75rem 0;
}
.corpus-stat {
    padding: .5rem 1rem;
    border-right: 1px solid rgba(255,255,255,.1);
}
.corpus-stat:last-child { border-right: none; }
@media (max-width: 767px) {
    .corpus-stat:nth-child(2n) { border-right: none; }
    .corpus-stat:nth-child(-n+2) {
        border-bottom: 1px solid rgba(255,255,255,.1);
        padding-bottom: 1rem;
    }
    .corpus-stat:nth-child(n+3) { padding-top: 1rem; }
}
.corpus-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fbbf24;
    line-height: 1;
}
.corpus-label {
    font-size: .8rem;
    color: #cbd5e1;
    margin-top: .25rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ---------- COMPARATEUR PREVIEW ---------- */
.comparator-preview-row {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    border-left: 4px solid #94a3b8;
}
.comparator-preview-row.severity-critique { border-left-color: #ef4444; }
.comparator-preview-row.severity-élevée   { border-left-color: #f59e0b; }
.comparator-preview-row.severity-modérée  { border-left-color: #6b7280; }

/* ---------- PARCOURS ---------- */
.parcours-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    position: relative;
}
.parcours-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    border-color: #1d9bf0;
}
.parcours-icon {
    font-size: 2rem;
    line-height: 1;
}
.parcours-meta {
    font-size: .78rem;
    color: #64748b;
    padding-top: .75rem;
    border-top: 1px solid #e2e8f0;
}

/* ---------- DOCUMENTS & PROJETS HOME ---------- */
.doc-home-card,
.project-home-card,
.article-home-card {
    transition: transform .15s, box-shadow .15s;
    border: 1px solid #e2e8f0;
}
.doc-home-card:hover,
.project-home-card:hover,
.article-home-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    border-color: #1d9bf0;
}

/* ---------- CTA FINAL ---------- */
.home-cta {
    background: linear-gradient(135deg, #f0f7ff 0%, #eef2ff 100%);
    border: 1px solid #dbeafe;
}

.about-hero {
    background: linear-gradient(135deg, #0d1b2a 0%, #1e293b 60%, #475569 140%);
}
.about-stat {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    border-top: 3px solid #1d9bf0;
}
.about-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0d1b2a;
    line-height: 1;
}
.about-stat-label {
    font-size: .75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-top: .25rem;
}

/* ---------- PAGES D'ERREUR ---------- */
.error-hero {
    min-height: 300px;
}
.error-hero-404 {
    background: linear-gradient(135deg, #0d1b2a 0%, #1a2d45 55%, #1d9bf0 150%);
}
.error-hero-500 {
    background: linear-gradient(135deg, #0d1b2a 0%, #7f1d1d 65%, #ef4444 160%);
}

.error-code-display {
    font-size: 5.5rem;
    font-weight: 900;
    line-height: 1;
    opacity: .35;
    letter-spacing: -.03em;
    margin-bottom: .5rem;
}

/* ---------- CARTES DE SUGGESTION ---------- */
.suggestion-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    height: 100%;
}
.suggestion-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    border-color: #1d9bf0;
}
.suggestion-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}
.suggestion-body {
    flex: 1;
    min-width: 0;
}
.suggestion-title {
    font-weight: 600;
    color: #0d1b2a;
    margin-bottom: .15rem;
}
.suggestion-meta {
    font-size: .8rem;
    color: #64748b;
    line-height: 1.35;
}

.legal-hero {
    background: linear-gradient(135deg, #0d1b2a 0%, #334155 70%, #475569 140%);
}
.contact-hero {
    background: linear-gradient(135deg, #0d1b2a 0%, #1e293b 55%, #1d9bf0 150%);
}

.contact-info-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    height: 100%;
}
.contact-info-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: .35rem;
}
.contact-info-label {
    font-size: .72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .25rem;
}