:root {
    --wc-green-900: #0d3b2e;
    --wc-green-800: #115a43;
    --wc-green-700: #147a57;
    --wc-green-600: #1e9f6e;
    --wc-green-500: #2db67f;
    --wc-green-100: #dff6eb;
    --wc-bg: #f3faf6;
    --wc-surface: #ffffff;
    --wc-text: #10271f;
    --wc-muted: #587268;
}

body {
    color: var(--wc-text);
    background:
        radial-gradient(circle at 0% 0%, rgba(45, 182, 127, 0.08), transparent 30%),
        radial-gradient(circle at 100% 0%, rgba(30, 159, 110, 0.07), transparent 28%),
        var(--wc-bg) !important;
    padding-top: 72px;
}

.navbar.bg-dark {
    background: linear-gradient(90deg, var(--wc-green-900), var(--wc-green-700)) !important;
    box-shadow: 0 8px 20px rgba(13, 59, 46, 0.25);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.nav-link {
    opacity: 0.92;
}

.nav-link:hover,
.nav-link:focus {
    opacity: 1;
    color: #ecfff5 !important;
}

.card {
    border: 1px solid #d9ede3;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(17, 90, 67, 0.08);
}

.card-header {
    border-bottom: 1px solid #e5f3ec;
    font-weight: 600;
}

.card-header.bg-primary,
.card-header.bg-info {
    background: linear-gradient(90deg, var(--wc-green-700), var(--wc-green-500)) !important;
    color: #fff !important;
    border-bottom: 0;
}

.btn-primary {
    background-color: var(--wc-green-700);
    border-color: var(--wc-green-700);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--wc-green-800);
    border-color: var(--wc-green-800);
}

.btn-outline-primary {
    color: var(--wc-green-700);
    border-color: var(--wc-green-700);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #fff;
    background-color: var(--wc-green-700);
    border-color: var(--wc-green-700);
}

.btn-success {
    background-color: var(--wc-green-600);
    border-color: var(--wc-green-600);
}

.btn-success:hover,
.btn-success:focus {
    background-color: var(--wc-green-700);
    border-color: var(--wc-green-700);
}

.form-control:focus,
.form-select:focus {
    border-color: #8ad6b6;
    box-shadow: 0 0 0 0.2rem rgba(30, 159, 110, 0.18);
}

.table > :not(caption) > * > * {
    border-bottom-color: #e2efe8;
}

.table-hover > tbody > tr:hover > * {
    background-color: #f1faf5;
}

.badge.bg-success {
    background-color: var(--wc-green-700) !important;
}

.alert-success {
    background-color: var(--wc-green-100);
    border-color: #bfe8d3;
    color: #154a38;
}

small.text-muted,
.text-muted {
    color: var(--wc-muted) !important;
}

footer.bg-dark {
    background: linear-gradient(90deg, var(--wc-green-900), var(--wc-green-800)) !important;
}

.kpi-card {
    border-left: 6px solid #9fb6ac;
}

.kpi-card.kpi-good {
    border-left-color: #1e9f6e;
    background: linear-gradient(180deg, rgba(45, 182, 127, 0.14), rgba(45, 182, 127, 0.02));
}

.kpi-card.kpi-bad {
    border-left-color: #c55a4d;
    background: linear-gradient(180deg, rgba(197, 90, 77, 0.13), rgba(197, 90, 77, 0.02));
}

.kpi-card.kpi-neutral {
    border-left-color: #678b7b;
    background: linear-gradient(180deg, rgba(103, 139, 123, 0.12), rgba(103, 139, 123, 0.02));
}

.kpi-title {
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #3f6758;
}

.kpi-main {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.2;
}

.kpi-sub {
    font-size: 0.9rem;
    color: #456859;
}

.kpi-delta {
    margin-top: 0.25rem;
    font-weight: 600;
    color: #1b3f32;
}

.kpi-delta .kpi-good {
    color: #0f6a4f;
}

.kpi-delta .kpi-bad {
    color: #a33f35;
}

.kpi-delta .kpi-neutral {
    color: #4f6a5f;
}

.kpi-trend-label {
    margin-left: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.compare-pill {
    display: inline-block;
    font-size: 0.78rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

td.compare-good,
.compare-pill.compare-good {
    --bs-table-bg-state: rgba(30, 159, 110, 0.16);
    background-color: rgba(30, 159, 110, 0.16);
    color: #0f6a4f;
}

td.compare-bad,
.compare-pill.compare-bad {
    --bs-table-bg-state: rgba(197, 90, 77, 0.15);
    background-color: rgba(197, 90, 77, 0.15);
    color: #a33f35;
}

td.compare-neutral,
.compare-pill.compare-neutral {
    --bs-table-bg-state: rgba(103, 139, 123, 0.12);
    background-color: rgba(103, 139, 123, 0.12);
    color: #45695a;
}

.timeline-visual-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0.25rem;
}

.timeline-visual-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 10px;
    transform: translateY(-50%);
    border-radius: 999px;
    background: #a9c7bb;
    opacity: 1;
    z-index: 1;
}

.timeline-visual-events {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: max-content;
    min-height: 320px;
}

.timeline-visual-event {
    position: relative;
    flex: 0 0 230px;
    height: 300px;
}

.timeline-visual-node {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 4px solid #607893;
    z-index: 3;
}

.timeline-visual-stem {
    position: absolute;
    left: 50%;
    width: 4px;
    border-radius: 4px;
    transform: translateX(-50%);
    background: #607893;
    z-index: 2;
}

.timeline-visual-event.is-top .timeline-visual-stem {
    top: 16%;
    bottom: 50%;
}

.timeline-visual-event.is-bottom .timeline-visual-stem {
    top: 50%;
    bottom: 16%;
}

.timeline-visual-card {
    position: absolute;
    left: 50%;
    width: 210px;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #d8e9e2;
    border-top: 4px solid #607893;
    border-radius: 12px;
    padding: 0.6rem 0.7rem;
    box-shadow: 0 8px 24px rgba(17, 90, 67, 0.1);
    z-index: 4;
}

.timeline-visual-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.timeline-visual-card-link:hover,
.timeline-visual-card-link:focus {
    color: inherit;
    background: #f6fcf8;
}

.timeline-visual-event.is-top .timeline-visual-card {
    top: 0;
}

.timeline-visual-event.is-bottom .timeline-visual-card {
    bottom: 0;
}

.timeline-visual-title {
    font-weight: 700;
    font-size: 0.94rem;
    line-height: 1.3;
    margin-bottom: 0.2rem;
}

.timeline-visual-meta {
    color: #5b7269;
    font-size: 0.76rem;
    margin-bottom: 0.35rem;
}

.timeline-visual-text {
    font-size: 0.82rem;
    color: #1d342c;
    line-height: 1.35;
    max-height: 95px;
    overflow: auto;
}

.timeline-visual-node.type-info_importante,
.timeline-visual-stem.type-info_importante,
.timeline-visual-card.type-info_importante {
    border-color: #4e87cb;
}
.timeline-visual-stem.type-info_importante { background: #4e87cb; }

.timeline-visual-node.type-note_evenement,
.timeline-visual-stem.type-note_evenement,
.timeline-visual-card.type-note_evenement {
    border-color: #48bca9;
}
.timeline-visual-stem.type-note_evenement { background: #48bca9; }

.timeline-visual-node.type-objectif,
.timeline-visual-stem.type-objectif,
.timeline-visual-card.type-objectif {
    border-color: #90c84e;
}
.timeline-visual-stem.type-objectif { background: #90c84e; }

.timeline-visual-node.type-sante,
.timeline-visual-stem.type-sante,
.timeline-visual-card.type-sante {
    border-color: #efc250;
}
.timeline-visual-stem.type-sante { background: #efc250; }

.timeline-visual-node.type-administratif,
.timeline-visual-stem.type-administratif,
.timeline-visual-card.type-administratif {
    border-color: #e65266;
}
.timeline-visual-stem.type-administratif { background: #e65266; }

.timeline-visual-node.type-autre,
.timeline-visual-stem.type-autre,
.timeline-visual-card.type-autre {
    border-color: #607893;
}
.timeline-visual-stem.type-autre { background: #607893; }

.timeline-visual-node.imp-haute {
    box-shadow: 0 0 0 3px rgba(240, 192, 92, 0.35);
}

.timeline-visual-node.imp-critique {
    box-shadow: 0 0 0 4px rgba(230, 82, 102, 0.35);
}

.timeline-mini {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem 0 0.15rem;
}

.timeline-mini-axis {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 42px;
    height: 4px;
    border-radius: 999px;
    background: #a9c7bb;
    opacity: 1;
}

.timeline-mini-items {
    position: relative;
    display: flex;
    gap: 1rem;
    min-width: max-content;
    padding: 0 0.2rem;
}

.timeline-mini-item {
    width: 132px;
    text-align: center;
}

.timeline-mini-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    padding: 0.1rem 0.2rem 0.25rem;
}

.timeline-mini-link:hover,
.timeline-mini-link:focus {
    background: rgba(30, 159, 110, 0.09);
    color: inherit;
}

.timeline-mini-date {
    font-size: 0.78rem;
    color: #506d62;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.timeline-mini-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin: 0 auto 0.5rem;
    border: 3px solid #607893;
    background: #fff;
    position: relative;
    z-index: 2;
}

.timeline-mini-title {
    font-size: 0.8rem;
    color: #10271f;
    line-height: 1.25;
}
