:root {
  --primary: #2f9556;
  --secondary: #0071cf;
  --light: #f3fcf7;
  --dark: #023560;

  --dgs-blue: var(--secondary);
  --dgs-blue-dark: var(--dark);
  --dgs-green: var(--primary);
  --dgs-yellow: var(--light);
  --dgs-white: #ffffff;
  --dgs-muted: #6c7782;
  --panel-border: #e5ebea;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: #243445;
  background: #f5f7f8;
}

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
}

.top-strip {
  min-height: 64px;
  display: flex;
  align-items: center;
  color: var(--dgs-white);
  background: var(--dgs-blue);
}

.min-w-0 {
  min-width: 0;
}

.social-link {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--dgs-white);
  border: 2px solid rgba(255, 255, 255, .78);
  border-radius: 50%;
  text-decoration: none;
}

.mail-link,
.top-action,
.language-btn {
  color: var(--dgs-white);
  font-weight: 700;
  text-decoration: none;
}

.mail-link {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-btn {
  border: 0;
  background: transparent;
}

.main-nav {
  min-height: 116px;
  background: rgba(15, 38, 65, .46);
  backdrop-filter: blur(4px);
}

.navbar-brand {
  color: var(--dgs-white);
}

.brand-mark {
  width: 46px;
  height: 56px;
  display: inline-block;
  background:
    linear-gradient(90deg, transparent 0 10%, #fff 10% 17%, transparent 17% 25%, #fff 25% 33%, transparent 33% 41%, #fff 41% 49%, transparent 49% 57%, #fff 57% 65%, transparent 65% 73%, #fff 73% 81%, transparent 81% 100%);
  opacity: .95;
}

.brand-text {
  color: var(--dgs-white);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 0;
}

.flag-gabon {
  width: 52px;
  height: 34px;
  display: inline-block;
  margin-left: 5vw;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  background: linear-gradient(#22964f 0 33.3%, #f6d44c 33.3% 66.6%, #2365b5 66.6% 100%);
}

.navbar .nav-link {
  color: rgba(255, 255, 255, .96);
  font-size: 1.06rem;
  font-weight: 800;
}

.navbar .nav-link.active {
  color: var(--dgs-yellow);
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, .6);
}

.navbar-toggler-icon {
  filter: invert(1);
}

.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 210px 0 92px;
  overflow: hidden;
  color: var(--dgs-white);
  background-image:
    linear-gradient(90deg, rgba(17, 50, 82, .82), rgba(17, 50, 82, .55)),
    url("https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&w=2200&q=80");
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 45, 74, .22);
}

.network-lines {
  position: absolute;
  inset: 0;
  opacity: .38;
  background-image:
    linear-gradient(30deg, transparent 48%, rgba(255, 255, 255, .35) 49%, transparent 50%),
    radial-gradient(circle at 16% 42%, rgba(255, 255, 255, .72) 0 2px, transparent 3px),
    radial-gradient(circle at 68% 31%, rgba(255, 255, 255, .72) 0 2px, transparent 3px),
    radial-gradient(circle at 91% 62%, rgba(255, 255, 255, .72) 0 2px, transparent 3px);
  background-size: 290px 250px, 100% 100%, 100% 100%, 100% 100%;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-content h1 {
  margin-bottom: 34px;
  color: var(--dgs-white);
  font-size: clamp(2rem, 4.2vw, 4rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.search-wrapper {
  max-width: 920px;
  margin: 0 auto 72px;
  position: relative;
}

.search-box {
  min-height: 72px;
  display: flex;
  background: var(--dgs-white);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .22);
}

/* ── Résultats de recherche ───────────────────────────────────────────────── */
.search-results {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 200;
  max-height: 340px;
  overflow-y: auto;
}
.search-results[hidden] { display: none; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  cursor: pointer;
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  transition: background .12s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover,
.search-result-item.active { background: #f0f7f3; }
.search-result-item i { color: var(--dgs-green); font-size: 1.1rem; flex-shrink: 0; }
.search-result-title { font-weight: 700; font-size: 0.92rem; }
.search-result-hint  { font-size: 0.75rem; color: #888; margin-top: 1px; }
.search-no-result {
  padding: 12px 18px;
  color: #888;
  font-size: 0.85rem;
  font-style: italic;
}

.search-box .form-control {
  min-height: 72px;
  padding: 0 28px;
  border: 0;
  border-radius: 0;
  font-size: 1.2rem;
}

.btn-search {
  width: 94px;
  border-radius: 0;
  color: var(--dgs-white);
  background: var(--dgs-green);
}

.btn-search:hover,
.btn-search:focus {
  color: var(--dgs-white);
  background: #438453;
}

.key-figure {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--dgs-white);
}

.key-figure i {
  margin-bottom: 14px;
  color: var(--dgs-yellow);
  font-size: 3.6rem;
  line-height: 1;
}

.key-figure h2 {
  margin: 0;
  color: var(--dgs-white);
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 900;
  letter-spacing: 0;
}

.key-figure strong {
  display: block;
  min-height: 62px;
  color: var(--dgs-yellow);
  font-size: clamp(2rem, 3.4vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.15;
}

.key-figure span {
  color: rgba(255, 255, 255, .96);
  font-size: 1.15rem;
  font-weight: 800;
}

.dashboard-section,
.series-section,
.integration-section {
  padding: 76px 0;
}

.dashboard-section {
  background: #ffffff;
}

.series-section {
  background: #f5f7f8;
}

.integration-section {
  background: #ffffff;
}

/* ── Section présentation IHPC ──────────────────────────────────────────── */
.ihpc-presentation-section {
  background: #f7faf8;
  border-top: 4px solid #1a7a3c;
  border-bottom: 1px solid #d4e8da;
  padding: 52px 0;
}

.ihpc-pres-inner {
  display: flex;
  align-items: center;
  gap: 48px;
}

.ihpc-pres-text {
  flex: 1;
}

.ihpc-pres-text h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: 900;
  color: #1a4a2c;
  margin-bottom: 16px;
}

.ihpc-pres-text p {
  font-size: 0.97rem;
  color: #333;
  line-height: 1.7;
  margin-bottom: 12px;
}

.ihpc-pres-text p:last-of-type { margin-bottom: 0; }

.btn-comprendre {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.25rem;
  padding: .6rem 1.25rem;
  background: var(--dgs-blue);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  border-radius: 2rem;
  text-decoration: none;
  transition: background .2s, transform .15s;
}
.btn-comprendre:hover { background: #0a2e6e; color: #fff; transform: translateY(2px); }
.btn-comprendre .bi-arrow-down { font-size: .8rem; opacity: .8; }

.ihpc-pres-badge {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: #1a7a3c;
  color: #fff;
  text-align: center;
  box-shadow: 0 4px 18px rgba(26,122,60,.3);
}

.ihpc-badge-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .85;
  line-height: 1.2;
}

.ihpc-badge-year {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  margin: 4px 0 2px;
}

.ihpc-badge-sub {
  font-size: 0.65rem;
  opacity: .8;
}

@media (max-width: 640px) {
  .ihpc-pres-inner { flex-direction: column; }
  .ihpc-pres-badge { width: 100px; height: 100px; }
  .ihpc-badge-year { font-size: 1.7rem; }
}

/* ── Footer institutionnel ───────────────────────────────────────────────── */
.site-footer {
  background: #0f2d1a;
  color: #c8dbd0;
  padding: 36px 0 28px;
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.footer-brand-mark {
  width: 36px;
  height: 36px;
  opacity: .7;
}

.footer-brand strong {
  display: block;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.footer-brand span {
  font-size: 0.75rem;
  color: #8fbc9f;
}

.footer-institution {
  flex: 1;
  min-width: 220px;
}

.footer-institution p {
  margin: 0 0 6px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.footer-institution strong { color: #e8f5ec; }
.footer-institution .bi   { margin-top: 2px; flex-shrink: 0; color: #5da877; }

.footer-adresse {
  font-size: 0.78rem;
  color: #8fbc9f;
}

.footer-adresse a { color: #8fbc9f; text-decoration: none; }
.footer-adresse a:hover { color: #c8dbd0; }

.footer-copy {
  flex-shrink: 0;
  text-align: right;
  color: #6a9b7a;
  font-size: 0.78rem;
}

.footer-copy p { margin: 0 0 4px; }

@media (max-width: 640px) {
  .footer-inner  { flex-direction: column; gap: 24px; }
  .footer-copy   { text-align: left; }
}

/* ── Glossaire ───────────────────────────────────────────────────────────── */
.glossaire-section {
  background: #f0f5f2;
  padding: 60px 0 72px;
  border-top: 3px solid #1a7a3c;
}

.glossaire-title {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  font-weight: 900;
  color: #1a4a2c;
  text-align: center;
  margin-bottom: 36px;
  letter-spacing: 0;
}

.glossaire-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
}

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

.glossaire-dl { margin: 0; }

.glossaire-dl dt {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  font-size: 0.88rem;
  color: #1a7a3c;
  border-left: 3px solid #1a7a3c;
  padding: 2px 0 2px 10px;
  margin: 18px 0 4px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.glossaire-dl dd {
  margin: 0 0 0 13px;
  font-size: 0.84rem;
  color: #333;
  line-height: 1.6;
  text-align: justify;
}

.dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 16px;
}

.section-kicker {
  margin-bottom: 12px;
  color: var(--dgs-green);
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-head h2,
.work-panel h3,
.integration-card h3 {
  color: var(--dgs-blue-dark);
  font-weight: 900;
  letter-spacing: 0;
}

.dashboard-head h2 {
  max-width: 760px;
  font-size: clamp(1.9rem, 3vw, 3rem);
}

.lead {
  max-width: 760px;
  color: var(--dgs-muted);
}

.api-pill {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 1px solid #e2c863;
  border-radius: 999px;
  color: #755b00;
  background: #fff7d6;
  font-weight: 900;
}

.api-pill.is-live {
  border-color: #bfe1c6;
  color: #216d35;
  background: #e8f6eb;
}

.metric-card,
.work-panel,
.integration-card {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(20, 58, 99, .08);
}

.metric-card {
  min-height: 164px;
  padding: 24px;
  border-top: 6px solid var(--dgs-green);
}

.metric-card span {
  display: block;
  color: var(--dgs-muted);
  font-weight: 900;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  margin-top: 12px;
  color: var(--dgs-blue-dark);
  font-size: 2.25rem;
  font-weight: 900;
}

.metric-card small {
  color: var(--dgs-muted);
  font-weight: 700;
}

.work-panel,
.integration-card {
  padding: 28px;
}

.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.chart-shell {
  position: relative;
  width: 100%;
  overflow-x: auto;
  padding: 8px 6px 0;
  border: 1px solid #e4ebe8;
  border-radius: 14px;
  background: #fff;
}

#ipch-chart {
  width: 100%;
  min-width: 640px;
  height: auto;
}

.grid-line {
  stroke: #d5ddda;
  stroke-width: 1;
}

.vertical-grid {
  stroke: #e3e9e7;
}

.axis-line {
  stroke: #718078;
  stroke-width: 1.2;
}

.axis-label {
  fill: #6c7782;
  font-size: 12px;
  font-weight: 600;
}

.x-label {
  text-anchor: middle;
}

.y-label {
  text-anchor: end;
}

.chart-line {
  fill: none;
  stroke: var(--series-color);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-dot {
  fill: #fff;
  stroke: var(--series-color);
  stroke-width: 2;
  opacity: .65;
}

/* ── Tooltip graphique ──────────────────────────────────── */
.chart-tooltip-box {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--dgs-blue);
  color: #fff;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  pointer-events: none;
}

.ct-period { font-weight: 900; font-size: 11px; opacity: .8; text-transform: uppercase; }
.ct-index  { font-size: 15px; font-weight: 900; color: var(--dgs-yellow); margin: 2px 0; }
.ct-var    { font-size: 11px; opacity: .9; }

.chart-dot {
  cursor: pointer;
  transition: opacity .15s, r .15s;
}

.chart-dot:hover {
  opacity: 1;
  r: 5px;
}

.chart-dot.is-active {
  opacity: 1;
  r: 5.5px;
  stroke-width: 3;
}

.chart-active-band {
  fill: #e4f0e9;
  opacity: .62;
}

.chart-active-line {
  stroke: var(--dgs-green);
  stroke-width: 2;
  stroke-dasharray: 5 4;
}

.chart-hover-zone {
  fill: transparent;
  cursor: crosshair;
}

.chart-tooltip-live {
  position: absolute;
  z-index: 5;
  display: none;
  width: 238px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(20, 58, 99, .96);
  color: #fff;
  box-shadow: 0 10px 28px rgba(20, 58, 99, .28);
  pointer-events: none;
}

.chart-tooltip-live.is-visible {
  display: block;
}

.chart-tooltip-live strong {
  display: block;
  margin-bottom: 7px;
  color: var(--dgs-yellow);
  font-size: .78rem;
  text-transform: capitalize;
}

.chart-tooltip-live span {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 3px 0;
  font-size: .72rem;
}

.chart-tooltip-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.chart-tooltip-live b {
  font-size: .8rem;
  white-space: nowrap;
}

/* ── Toggle Graphique / Tableau ────────────────────────── */
.view-toggle {
  display: flex;
  gap: 8px;
}

.btn-view {
  padding: 9px 22px;
  border: 2px solid var(--dgs-blue);
  border-radius: 999px;
  background: transparent;
  color: var(--dgs-blue);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.btn-view.active {
  background: var(--dgs-blue);
  color: #fff;
}

.btn-view:not(.active):hover {
  background: #eef2f7;
}

.refresh-control {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.refresh-control small {
  color: var(--dgs-muted);
  font-size: .74rem;
  font-weight: 700;
}

.refresh-control small.is-success {
  color: #2e7d4f;
}

.refresh-control small.is-error {
  color: #b42318;
}

#refresh-button.is-loading i {
  animation: detail-spin .8s linear infinite;
}

/* ── Titre et légende du graphique ─────────────────────── */
.series-title {
  margin: 0 0 2px;
  color: var(--dgs-blue-dark);
  font-weight: 900;
}

.series-base-label {
  margin-bottom: 14px;
  color: var(--dgs-muted);
  font-size: .875rem;
  font-style: italic;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7f9f8;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #243445;
  font-size: .85rem;
  font-weight: 700;
}

.legend-item::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 4px;
  border-radius: 2px;
  flex-shrink: 0;
  background: var(--series-color);
}

.chart-reading,
.chart-source {
  margin: 12px 2px 0;
  color: #48574f;
  font-size: .82rem;
}

.chart-source {
  margin-top: 2px;
  color: var(--dgs-muted);
}

.data-freshness-note {
  margin: 8px 2px 0;
  color: var(--dgs-muted);
  font-size: .84rem;
}

.data-freshness-note.is-warning {
  background: #fff7e6;
  border-left: 3px solid #d9901f;
  border-radius: 10px;
  color: #7a4f08;
  padding: .65rem .8rem;
}

/* ── Filtres visuels année / mois ──────────────────────── */
.filter-panel {
  display: flex;
  align-items: stretch;
  gap: 20px;
  padding: 16px 18px;
  border: 1px solid #dce7e1;
  border-radius: 14px;
  background: linear-gradient(135deg, #f7faf8 0%, #eef5f1 100%);
}

.filter-group {
  min-width: 0;
  flex: 1;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--dgs-blue-dark);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  padding: 7px 14px;
  border: 1px solid #b9cbc2;
  border-radius: 999px;
  background: #fff;
  color: #31483c;
  font-size: .82rem;
  font-weight: 800;
  text-transform: capitalize;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, transform .15s;
}

.filter-chip:hover {
  border-color: var(--dgs-green);
  transform: translateY(-1px);
}

.filter-chip.active {
  border-color: var(--dgs-blue);
  background: var(--dgs-blue);
  color: #fff;
  box-shadow: 0 5px 12px rgba(30, 78, 148, .18);
}

.month-chip.active {
  border-color: var(--dgs-green);
  background: var(--dgs-green);
}

.detail-status {
  display: inline-flex;
  align-items: center;
  margin-top: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #dceee4;
  color: #235b3d;
  font-size: .76rem;
  font-weight: 800;
  text-transform: capitalize;
}

.detail-status.is-loading::before {
  content: "";
  width: 11px;
  height: 11px;
  margin-right: 7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: detail-spin .7s linear infinite;
}

.detail-loading {
  opacity: .45;
  transition: opacity .15s;
}

@keyframes detail-spin {
  to { transform: rotate(360deg); }
}

.filter-divider {
  width: 1px;
  background: #cfddd5;
}

.data-count-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: #e8f2ec;
  color: #24583c;
  font-size: .78rem;
  font-weight: 900;
}

.product-prices-section {
  background: #f7faf8;
}

.price-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px;
  gap: 14px;
  margin-bottom: 14px;
}

.price-controls label span {
  display: block;
  margin-bottom: 6px;
  color: var(--dgs-blue-dark);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.price-zone-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.zone-chip.active {
  border-color: var(--dgs-green);
  background: var(--dgs-green);
}

.price-chart-shell #price-chart {
  width: 100%;
  min-width: 680px;
}

/* ── Tableau de série ──────────────────────────────────── */
.series-table thead th {
  background: #f4f8f5;
  color: var(--dgs-blue-dark);
  font-weight: 900;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.series-note {
  color: var(--dgs-muted);
  font-size: .82rem;
  border-top: 1px solid var(--panel-border);
  padding-top: 10px;
}

/* ── Portail documentaire ──────────────────────────────── */
.documentation-section {
  padding: 82px 0;
  background: linear-gradient(180deg, #fff 0%, #f4f8f5 100%);
}

.documentation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

#price-year option.is-empty-year {
  color: #9aa4ad;
  font-style: italic;
}

.documentation-card {
  min-height: 270px;
  padding: 24px;
  border: 1px solid #dce7e1;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(20, 58, 99, .08);
}

.documentation-card.is-primary {
  background: var(--dgs-blue);
  color: #fff;
}

.documentation-card > i {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 14px;
  background: #e8f2ec;
  color: var(--dgs-green);
  font-size: 1.45rem;
}

.documentation-card.is-primary > i {
  background: rgba(255,255,255,.16);
  color: var(--dgs-yellow);
}

.doc-type {
  display: block;
  color: var(--dgs-green);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.documentation-card.is-primary .doc-type {
  color: var(--dgs-yellow);
}

.documentation-card h3 {
  margin: 8px 0 10px;
  color: var(--dgs-blue-dark);
  font-size: 1.25rem;
  font-weight: 900;
}

.documentation-card.is-primary h3,
.documentation-card.is-primary p {
  color: #fff;
}

.documentation-card p {
  color: var(--dgs-muted);
  font-size: .9rem;
}

.doc-download,
.doc-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: #e8f2ec;
  color: var(--dgs-blue);
  font-size: .82rem;
  font-weight: 900;
  text-decoration: none;
}

.documentation-card.is-primary .doc-download {
  background: #fff;
  color: var(--dgs-blue);
}

.report-year-select {
  max-width: 220px;
}

.report-download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.report-download-card {
  display: block;
  padding: 15px;
  border: 1px solid #dce7e1;
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}

.report-download-card:hover {
  border-color: var(--dgs-green);
  box-shadow: 0 10px 22px rgba(20, 58, 99, .1);
  transform: translateY(-2px);
}

.report-download-card span {
  color: var(--dgs-green);
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.report-download-card strong {
  display: block;
  margin: 6px 0;
  color: var(--dgs-blue-dark);
}

.report-download-card small {
  display: block;
  color: var(--dgs-muted);
}

.report-download-card em {
  display: inline-flex;
  gap: 6px;
  margin-top: 10px;
  color: var(--dgs-blue);
  font-size: .8rem;
  font-style: normal;
  font-weight: 900;
}

/* ── Barres régionales ─────────────────────────────────── */
.region-bar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  font-size: .82rem;
}

.region-bar-label {
  flex: 0 0 130px;
  color: #243445;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.region-bar-track {
  flex: 1;
  height: 10px;
  background: #eef4ef;
  border-radius: 5px;
  overflow: hidden;
}

.region-bar-fill {
  height: 100%;
  background: var(--dgs-green);
  border-radius: 5px;
  opacity: .55;
  transition: width .4s;
}

.region-bar-fill.is-national {
  opacity: 1;
  background: var(--dgs-blue);
}

.region-bar-value {
  flex: 0 0 44px;
  text-align: right;
  color: var(--dgs-muted);
  font-weight: 700;
}

/* ── Nomenclatures secondaires : barres horizontales ───── */
.secondary-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sec-bar-row {
  display: grid;
  grid-template-columns: 220px 1fr 80px;
  align-items: center;
  gap: 12px;
  font-size: .84rem;
}

.sec-bar-label {
  font-weight: 700;
  color: #243445;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sec-bar-track {
  position: relative;
  height: 22px;
  background: #eef4ef;
  border-radius: 4px;
  overflow: hidden;
}

.sec-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .4s;
}

.sec-bar-fill.bar-positive { background: var(--dgs-blue); opacity: .75; }
.sec-bar-fill.bar-negative { background: #d9534f; opacity: .65; }
.sec-bar-fill.bar-neutral  { background: var(--dgs-muted); opacity: .45; }

.sec-bar-index {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: .78rem;
  font-weight: 900;
  color: #243445;
}

.sec-bar-var {
  text-align: right;
  font-weight: 700;
  font-size: .82rem;
}

/* En-têtes de groupe dans le graphique barres */
.sec-group-header {
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--dgs-blue, #0071cf);
  padding: 10px 0 2px;
  border-bottom: 2px solid currentColor;
  margin-bottom: 4px;
}

/* En-têtes de groupe dans le tableau */
.sec-group-row .sec-group-cell {
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--dgs-blue, #0071cf);
  background: #f0f6ff;
  padding: 6px 12px;
  border-top: 2px solid var(--dgs-blue, #0071cf);
}

/* ── CEMAC : jauge ──────────────────────────────────────── */
.cemac-gauge {
  max-width: 680px;
}

.cemac-gauge-track {
  position: relative;
  height: 36px;
  background: #eef4ef;
  border-radius: 8px;
  overflow: visible;
}

.cemac-gauge-fill {
  height: 100%;
  border-radius: 8px;
  transition: width .5s;
}

.cemac-ok     { background: var(--dgs-green); }
.cemac-breach { background: #d9534f; }

.cemac-target-line {
  position: absolute;
  top: -6px;
  width: 3px;
  height: calc(100% + 12px);
  background: var(--dgs-blue);
  border-radius: 2px;
}

.cemac-target-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dgs-blue);
}

.cemac-gauge-labels {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
  font-size: .78rem;
  color: var(--dgs-muted);
  font-weight: 700;
}

.cemac-target-label {
  display: inline-block;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--dgs-blue);
  color: #fff;
  font-size: .75rem;
  font-weight: 900;
  white-space: nowrap;
}

.cemac-big-value {
  font-size: 2rem;
  font-weight: 900;
}

.cemac-period {
  font-size: 1rem;
  font-weight: 700;
}

.cemac-note {
  color: var(--dgs-muted);
  font-size: .88rem;
  border-left: 3px solid var(--dgs-green);
  padding-left: 12px;
}

/* ── Tableau chaleur régions × fonctions ────────────────── */
.regions-heat-table th {
  background: var(--dgs-blue);
  color: #fff;
  font-weight: 900;
  font-size: .78rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.regions-heat-table td {
  font-size: .82rem;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .sec-bar-row {
    grid-template-columns: 140px 1fr 60px;
  }
}

.functions-table-wrap {
  max-height: 430px;
}

.code-pill {
  display: inline-flex;
  width: 38px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--dgs-blue-dark);
  background: #eef4ef;
  font-weight: 900;
}

.endpoint-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.endpoint-list li,
.config-preview {
  padding: 12px 14px;
  border-radius: 6px;
  background: #f4f8f5;
}

.config-preview {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.chatbot-button {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 20;
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #1e4e94;
  background: var(--dgs-white);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .25);
  font-size: 2.35rem;
}

@media (max-width: 991.98px) {
  .site-header {
    position: relative;
  }

  .main-nav {
    background: var(--dgs-blue-dark);
  }

  .flag-gabon {
    margin-left: auto;
    margin-right: 16px;
  }

  .hero-section {
    min-height: auto;
    padding-top: 72px;
  }

  .search-box {
    margin-bottom: 42px;
  }

  .dashboard-head {
    display: block;
  }

  .api-pill {
    display: inline-flex;
    margin-top: 18px;
  }

  .documentation-grid,
  .price-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .top-strip {
    min-height: 84px;
  }

  .mail-link {
    max-width: 170px;
  }

  .search-box,
  .search-box .form-control {
    min-height: 60px;
  }

  .btn-search {
    width: 70px;
  }

  .panel-title-row {
    display: block;
  }

  .filter-panel {
    display: block;
  }

  .filter-divider {
    width: 100%;
    height: 1px;
    margin: 16px 0;
  }

  .chatbot-button {
    right: 18px;
    bottom: 18px;
    width: 62px;
    height: 62px;
  }
}
