/* Observatoire économique BizNC (/observatoire/ et ses sous-pages) — couche
   minimale par-dessus satellite.css et barometre.css (chiffre géant,
   classements, tableaux, courbe).
   Encres et surfaces : tokens du thème (--ink, --muted, --hair, --card, --w),
   qui basculent avec data-theme. Ce fichier n'ajoute que les filtres, les
   pastilles de signal et les cartes « signaux de tension potentielle ».
   Couleur de signal : orange d'avertissement du design system (--color-warning),
   jamais rouge — un signal de tension potentielle n'est pas une alerte. */

:root { --obs-signal: #ffb74d; --obs-signal-bg: rgba(255, 152, 0, 0.12); --obs-demand: #93c5fd; --obs-demand-bg: rgba(59, 130, 246, 0.14); }
:root[data-theme="light"] { --obs-signal: #9a4a00; --obs-signal-bg: rgba(255, 152, 0, 0.14); --obs-demand: #1d4ed8; --obs-demand-bg: rgba(59, 130, 246, 0.10); }

/* ---------- Chiffres clés ---------- */
.obs-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hair);
}
.obs-figures li {
  padding: 16px 16px 4px 0;
  border-bottom: 1px solid var(--hair);
}
.obs-figures strong {
  display: block;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.obs-figures.is-amounts { grid-template-columns: 1fr; }
.obs-figures.is-amounts strong { font-size: clamp(1.4rem, 4.5vw, 1.9rem); line-height: 1.15; }
.obs-amount { display: block; white-space: nowrap; }
.obs-figures span {
  display: block;
  margin: 6px 0 12px;
  font-size: 0.86rem;
  color: var(--muted);
}

/* ---------- Avertissement de lecture ---------- */
.obs-notice {
  margin: 0;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--gold);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink);
}
.obs-notice + .obs-notice { margin-top: 12px; }

/* ---------- Filtres ---------- */
.obs-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 18px;
}
.obs-filters label {
  display: grid;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 0;
}
.obs-filters select,
.obs-filters input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--hair);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
}
.obs-filters select:focus-visible,
.obs-filters input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.obs-filter-status { margin: 0 0 8px; font-size: 0.86rem; color: var(--muted); }
@media (max-width: 720px) {
  .obs-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .obs-filters { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Tableau des métiers ---------- */
.bar-table.obs-table td.obs-rank,
.bar-table.obs-table th.obs-rank { width: 3rem; padding-right: 12px; text-align: left; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar-table.obs-table td.obs-num,
.bar-table.obs-table th.obs-num { text-align: right; padding-right: 0; padding-left: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-table.obs-rank-table td:last-child,
.bar-table.obs-rank-table th:last-child { text-align: left; padding-left: 18px; min-width: 12rem; }
.bar-table.obs-table td .obs-domain { display: block; margin-top: 2px; font-size: 0.8rem; color: var(--muted); }
.bar-table.obs-table td:first-child { white-space: nowrap; }
.bar-table.obs-rank-table td:first-child { white-space: normal; }
.obs-evo { white-space: nowrap; }
.obs-evo.is-up { color: #4ade80; }
.obs-evo.is-down { color: #f87171; }
:root[data-theme="light"] .obs-evo.is-up { color: #15803d; }
:root[data-theme="light"] .obs-evo.is-down { color: #b91c1c; }
.obs-evo.is-na { color: var(--muted); }
.obs-empty { margin: 8px 0 0; color: var(--muted); }

/* Mobile : chaque ligne devient une carte (rang, métier, offres, puis
   évolution, employeurs et signaux), au lieu d'un tableau à six colonnes qui
   défilait latéralement. */
@media (max-width: 640px) {
  .bar-table.obs-rank-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bar-table.obs-rank-table, .bar-table.obs-rank-table tbody { display: block; }
  .bar-table.obs-rank-table tr { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; gap: 4px 10px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
  .bar-table.obs-rank-table tr:last-child { border-bottom: 0; }
  .bar-table.obs-rank-table td, .bar-table.obs-rank-table td:last-child, .bar-table.obs-rank-table td.obs-num, .bar-table.obs-rank-table td.obs-rank { display: block; width: auto; min-width: 0; padding: 0; border: 0; text-align: left; }
  .bar-table.obs-rank-table td:nth-child(3) { justify-self: end; font-weight: 600; }
  .bar-table.obs-rank-table td:nth-child(3)::after { content: " offres"; font-weight: 400; color: var(--muted); font-size: 0.82rem; }
  .bar-table.obs-rank-table td:nth-child(4), .bar-table.obs-rank-table td:nth-child(5), .bar-table.obs-rank-table td:nth-child(6) { grid-column: 2 / -1; font-size: 0.84rem; color: var(--muted); }
  .bar-table.obs-rank-table td:nth-child(4)::before { content: "Évolution 90 j : "; }
  .bar-table.obs-rank-table td:nth-child(5)::before { content: "Employeurs 90 j : "; }
  .bar-table.obs-rank-table td:nth-child(6) { margin-top: 4px; }
  .bar-table.obs-rank-table td[colspan] { grid-column: 1 / -1; }
}

/* ---------- Pastilles de signal ---------- */
.obs-chips { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
.obs-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 9px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
}
.obs-badge.is-on { border-color: transparent; background: var(--obs-signal-bg); color: var(--obs-signal); }
.obs-badge.is-demand { border-color: transparent; background: var(--obs-demand-bg); color: var(--obs-demand); }
.obs-badge.is-na { border-style: dashed; font-weight: 500; }

/* ---------- Liste des signaux (fiche métier) ---------- */
.obs-signal-list { list-style: none; margin: 0; padding: 0; }
.obs-signal-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--hair);
}
.obs-signal-list li:first-child { border-top: 0; }
.obs-signal-name { font-weight: 600; color: var(--ink); }
.obs-signal-detail { grid-column: 1 / -1; font-size: 0.86rem; line-height: 1.5; color: var(--muted); }
.obs-family {
  margin: 18px 0 4px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.obs-family:first-of-type { margin-top: 0; }
.obs-family.obs-family-sep { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--hair); }
.obs-viz-intro { margin: 0 0 12px; font-size: 0.86rem; line-height: 1.5; color: var(--muted); }
.obs-verdict { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 0.95rem; line-height: 1.55; color: var(--ink); }

/* ---------- Cartes « signaux de tension potentielle » ---------- */
.obs-tension-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.obs-tension-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: rgba(var(--w), 0.02);
  min-width: 0;
}
.obs-tension-card h3 { margin: 0; font-size: 1rem; line-height: 1.3; color: var(--ink); }
.obs-tension-card p { margin: 0; font-size: 0.86rem; line-height: 1.5; color: var(--muted); }

/* ---------- Définitions (méthode) ---------- */
.obs-defs { margin: 0; display: grid; gap: 0; }
.obs-defs div { padding: 12px 0; border-top: 1px solid var(--hair); }
.obs-defs div:first-child { border-top: 0; }
.obs-defs dt { font-weight: 600; color: var(--ink); }
.obs-defs dd { margin: 4px 0 0; font-size: 0.9rem; line-height: 1.55; color: var(--muted); }

/* ---------- Navigation entre les pages de l'observatoire ---------- */
.obs-nav { display: grid; gap: 6px; min-width: 0; }
.obs-nav ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0 0 2px; list-style: none; }
.obs-nav a {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px;
  border: 1px solid var(--hair); border-radius: 999px; background: var(--card);
  color: var(--muted); font-size: 0.86rem; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.obs-nav a:hover { color: var(--ink); border-color: rgba(var(--w), 0.24); }
.obs-nav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--card); }
.obs-nav p { margin: 0; font-size: 0.8rem; color: var(--muted); }

/* ---------- Tuiles d'indicateur (vue d'ensemble) ---------- */
.obs-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.obs-tile { display: grid; gap: 8px; align-content: start; min-width: 0; }
.obs-tile-q { margin: 0; font-size: 0.84rem; font-style: italic; color: var(--muted); }
.obs-tile-value { margin: 0; font-size: clamp(2rem, 6vw, 2.6rem); line-height: 1; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.obs-tile-value.is-na { color: var(--muted); }
.obs-tile-value.is-text { font-size: clamp(1.3rem, 4vw, 1.6rem); line-height: 1.15; letter-spacing: -0.01em; }
.obs-tile-meta { margin: 0; font-size: 0.82rem; color: var(--muted); }
.obs-tile-deltas { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-size: 0.82rem; font-weight: 700; }
.obs-spark { display: block; width: 100%; height: 56px; }
.obs-spark-fill { fill: #3b82f6; fill-opacity: 0.16; stroke: none; }
.obs-spark-line { fill: none; stroke: #3b82f6; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.obs-spark-dot { fill: #3b82f6; }
:root[data-theme="light"] .obs-spark-fill, :root[data-theme="light"] .obs-spark-dot { fill: #2563eb; }
:root[data-theme="light"] .obs-spark-line { stroke: #2563eb; }

/* ---------- Listes de secteurs et de changements ---------- */
.obs-change-list { list-style: none; margin: 0; padding: 0; display: grid; }
.obs-change-list li { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--hair); }
.obs-change-list li:first-child { border-top: 0; padding-top: 0; }
.obs-change-list strong { color: var(--ink); }
.obs-change-list span { font-size: 0.86rem; color: var(--muted); line-height: 1.5; }

/* ---------- Téléchargements ---------- */
.obs-downloads { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.note { margin: 6px 0 0; font-size: 0.82rem; color: var(--muted); }

/* ---------- Vue d'ensemble : sélecteur de courbe, gaufre, définitions ---------- */
.obs-filters.is-single { grid-template-columns: minmax(0, 320px); }
.obs-chart { margin: 0; }
.obs-waffle { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 2px; max-width: 360px; }
.obs-waffle i { aspect-ratio: 1; border-radius: 2px; }
.obs-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: 0.82rem; color: var(--muted); }
.obs-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 999px; }
.obs-defs dd strong { color: var(--ink); font-weight: 600; }
.bar-table.obs-table th abbr { text-decoration: none; }

/* Mobile : attributaires et marchés récurrents s'empilent (nom et chiffre sur
   la première ligne, détails dessous) au lieu de défiler latéralement. */
@media (max-width: 640px) {
  .bar-table.obs-stack-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bar-table.obs-stack-table, .bar-table.obs-stack-table tbody { display: block; }
  .bar-table.obs-stack-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
  .bar-table.obs-stack-table tr:last-child { border-bottom: 0; }
  .bar-table.obs-stack-table td, .bar-table.obs-stack-table td.obs-num, .bar-table.obs-table.obs-stack-table td:first-child { display: block; width: auto; min-width: 0; padding: 0; border: 0; text-align: left; white-space: normal; }
  .bar-table.obs-winners-table td:nth-child(2) { justify-self: end; font-weight: 600; }
  .bar-table.obs-winners-table td:nth-child(2)::after { content: " attrib."; font-weight: 400; color: var(--muted); font-size: 0.82rem; }
  .bar-table.obs-winners-table td:nth-child(3) { grid-column: 1 / -1; font-size: 0.84rem; color: var(--muted); }
  .bar-table.obs-winners-table td:nth-child(3) .obs-amount { display: inline; }
  .bar-table.obs-winners-table td:nth-child(3) .obs-amount + .obs-amount::before { content: " · "; }
  .bar-table.obs-rec-table td:nth-child(2), .bar-table.obs-rec-table td:nth-child(3) { grid-column: 1 / -1; }
  .bar-table.obs-rec-table td:nth-child(1) { font-weight: 600; }
  .bar-table.obs-rec-table td:nth-child(4) { grid-column: 2; grid-row: 1; justify-self: end; font-size: 0.84rem; }
  .bar-table.obs-rec-table td:nth-child(3) { font-size: 0.84rem; color: var(--muted); }
  .bar-table.obs-rec-table td:nth-child(3)::before { content: "Publiée : "; }
  .bar-table.obs-rec-table td:nth-child(4)::before { content: "Prochaine ≈ "; color: var(--muted); }
  .bar-table.obs-window-table td:nth-child(1) { font-weight: 600; }
  .bar-table.obs-window-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .bar-table.obs-window-table td:nth-child(3) { grid-column: 2; grid-row: 1; justify-self: end; font-weight: 600; }
  .bar-table.obs-window-table td:nth-child(3)::after { content: " consult."; font-weight: 400; color: var(--muted); font-size: 0.82rem; }
  .bar-table.obs-window-table td:nth-child(4), .bar-table.obs-window-table td:nth-child(5) { font-size: 0.84rem; color: var(--muted); }
  .bar-table.obs-window-table td:nth-child(5) { justify-self: end; }
  .bar-table.obs-window-table td:nth-child(4)::before { content: "Délai médian : "; }
  .bar-table.obs-window-table td:nth-child(5)::before { content: "Prochaine ≈ "; }
  .bar-table.obs-window-table td:nth-child(4) small { white-space: nowrap; }
  .bar-table.obs-window-table td.is-none { display: none; }
  .bar-table.obs-delay-table td:nth-child(1) { font-weight: 600; }
  .bar-table.obs-att-table td:nth-child(1) { font-weight: 600; }
  .bar-table.obs-att-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; width: auto; min-width: 0; }
  .bar-table.obs-att-table td:nth-child(3) { grid-column: 2; grid-row: 1; font-size: 0.84rem; color: var(--muted); }
  .bar-table.obs-att-table td:nth-child(3)::after { content: " clics / 100 offres"; }
  .bar-table.obs-delay-table td:nth-child(3) { grid-column: 2; grid-row: 1; justify-self: end; font-weight: 600; }
  .bar-table.obs-delay-table td:nth-child(2), .bar-table.obs-delay-table td:nth-child(4) { font-size: 0.84rem; color: var(--muted); }
  .bar-table.obs-delay-table td:nth-child(4) { justify-self: end; }
  .bar-table.obs-delay-table td:nth-child(2)::after { content: " délais mesurés"; }
  .bar-table.obs-delay-table td:nth-child(4)::before { content: "Moitié : "; }
}

/* Bande mensuelle : une case par mois (fenêtre par acheteur). */
.obs-strip { display: inline-grid; grid-template-columns: repeat(12, 14px); gap: 3px; vertical-align: middle; }
.obs-strip i { display: block; height: 14px; border-radius: 3px; background: var(--seq); }
.obs-window-table td:nth-child(2) { white-space: nowrap; }
@media (max-width: 640px) { .obs-strip { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); width: 100%; max-width: 320px; } }

/* ---------- Page Entreprises ---------- */
.obs-rank-meta { display: block; margin-top: 2px; font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.obs-event-list { list-style: none; margin: 8px 0 0; padding: 0; }
.obs-event-list li { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--hair); }
.obs-event-list li:first-child { border-top: 0; }
.obs-event-name { font-weight: 600; color: var(--ink); }
.obs-event-meta { font-size: 0.86rem; color: var(--muted); }

/* Mobile : tableaux à étiquettes. Première cellule en titre, les suivantes
   en lignes « étiquette : valeur » (attribut data-label). */
@media (max-width: 640px) {
  .bar-table.obs-label-table tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
  .bar-table.obs-label-table td.obs-cell-head { flex: 1 1 60%; font-weight: 600; }
  .bar-table.obs-label-table td.obs-cell-value { flex: 0 0 auto; font-weight: 600; }
  .bar-table.obs-label-table td.obs-cell-value::after { content: " entr."; font-weight: 400; color: var(--muted); font-size: 0.82rem; }
  .bar-table.obs-label-table td.obs-cell-sub { flex: 1 1 100%; font-size: 0.84rem; color: var(--muted); }
  .bar-table.obs-label-table td[data-label]:not(.obs-cell-value) { flex: 0 0 auto; font-size: 0.84rem; font-weight: 600; color: var(--ink); }
  .bar-table.obs-label-table td[data-label]:not(.obs-cell-value)::before { content: attr(data-label) " "; font-weight: 400; color: var(--muted); }
}

/* ---------- Page Conjoncture ---------- */
.obs-flag { color: var(--obs-signal); font-weight: 700; }
.obs-signal-history li { scroll-margin-top: 90px; }
.obs-signal-history li:target { background: var(--obs-signal-bg); border-radius: 10px; padding-inline: 10px; }
.obs-event-name .obs-badge { margin-left: 6px; vertical-align: 1px; }

/* ---------- Page Compétences ---------- */
.bar-table.obs-table td.obs-cell-sub { text-align: left; color: var(--muted); }
.bar-table.obs-table th.obs-cell-sub { text-align: left; }
@media (min-width: 641px) { .bar-table.obs-table :is(td, th).obs-num + :is(td, th).obs-cell-sub { padding-left: 24px; } }

/* ---------- Page Territoires ---------- */
.obs-tiles.is-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.obs-tiles.is-three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.obs-tile-facts { margin: 14px 0 0; padding: 0; border-top: 1px solid var(--hair); }
.obs-tile-facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.obs-tile-facts div:last-child { border-bottom: 0; }
.obs-tile-facts dt { font-size: 0.82rem; color: var(--muted); }
.obs-tile-facts dd { margin: 0; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.obs-prov-cols { display: grid; gap: 4px 24px; grid-template-columns: 1fr; }
.obs-prov-col + .obs-prov-col { border-top: 1px solid var(--hair); padding-top: 4px; }
.obs-prov-col .obs-empty { font-size: 0.88rem; }
@media (max-width: 640px) {
  .bar-table.obs-label-table td.obs-cell-head.is-row { flex-basis: 100%; }
  .bar-table.obs-label-table td.obs-cell-value.is-offers::after { content: " offres"; }
}

/* ---------- L'essentiel (GEO) ---------- */
.obs-essentiel-list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.obs-essentiel-list li { position: relative; padding-left: 18px; font-size: 1rem; line-height: 1.55; color: var(--ink); }
.obs-essentiel-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.obs-cite { display: grid; gap: 6px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--hair); }
.obs-cite-label { margin: 0; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.obs-cite-text { margin: 0; font-size: 0.9rem; color: var(--muted); overflow-wrap: anywhere; }
.obs-copy { justify-self: start; }

/* =====================================================================
   Couleurs des données — palette validée (contraste, daltonisme) par le
   script de la méthode dataviz, en mode clair et en mode sombre.
   Une couleur suit une entité, jamais un rang :
     - indicateurs (5 premiers emplacements catégoriels) : la même couleur
       sur toutes les pages ;
     - provinces (emplacements 6 à 8), toujours nommées en clair à côté ;
     - familles de compétences (emplacements 1 à 3) ;
     - niveaux d'études : rampe ordinale d'une seule teinte ;
     - variations : échelle divergente bleu (hausse) / rouge (baisse) autour
       d'un gris neutre.
   Les secteurs gardent les couleurs de l'app (SECTORS_DEF).
   ===================================================================== */
:root {
  --obs-c-offres: #3987e5; --obs-c-employeurs: #d95926; --obs-c-consultations: #199e70;
  --obs-c-attributions: #c98500; --obs-c-procedures: #d55181; --obs-c-actu: #9085e9;
  --obs-c-sud: #9085e9; --obs-c-nord: #008300; --obs-c-iles: #e66767;
  --obs-f-techniques: #3987e5; --obs-f-transversales: #d95926; --obs-f-langues: #199e70;
  --obs-ord-1: #184f95; --obs-ord-2: #2a78d6; --obs-ord-3: #6da7ec; --obs-ord-4: #b7d3f6;
  --obs-div-up: #3987e5; --obs-div-down: #e66767; --obs-div-mid: #383835;
  --obs-c-nickel: #4fb3bf;
}
:root[data-theme="light"] {
  --obs-c-offres: #2a78d6; --obs-c-employeurs: #eb6834; --obs-c-consultations: #1baf7a;
  --obs-c-attributions: #eda100; --obs-c-procedures: #e87ba4; --obs-c-actu: #4a3aa7;
  --obs-c-sud: #4a3aa7; --obs-c-nord: #008300; --obs-c-iles: #e34948; --obs-c-nickel: #0f7c88;
  --obs-f-techniques: #2a78d6; --obs-f-transversales: #eb6834; --obs-f-langues: #1baf7a;
  --obs-ord-1: #86b6ef; --obs-ord-2: #3987e5; --obs-ord-3: #1c5cab; --obs-ord-4: #0d366b;
  --obs-div-up: #2a78d6; --obs-div-down: #e34948; --obs-div-mid: #f0efec;
}

/* Petites courbes : couleur de l'indicateur (--spark), bleu par défaut. */
.obs-spark { --spark: var(--obs-c-offres); overflow: visible; }
.obs-spark-fill { fill: var(--spark); fill-opacity: 0.16; }
.obs-spark-line { stroke: var(--spark); }
.obs-spark-dot { fill: var(--spark); }
:root[data-theme="light"] .obs-spark-fill, :root[data-theme="light"] .obs-spark-dot { fill: var(--spark); }
:root[data-theme="light"] .obs-spark-line { stroke: var(--spark); }
.obs-spark-guide { stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0; }
.obs-spark-hover { fill: var(--spark); stroke: var(--card); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: 0; }
.obs-spark.is-hover .obs-spark-guide, .obs-spark.is-hover .obs-spark-hover { opacity: 1; }
.obs-spark[tabindex] { cursor: crosshair; border-radius: 6px; }
.obs-spark[tabindex]:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Infobulle (valeur d'abord, libellé ensuite). */
.obs-tip { position: absolute; z-index: 5; pointer-events: none; transform: translate(-50%, calc(-100% - 10px)); padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--card); font-size: 0.8rem; line-height: 1.25; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.obs-tip strong { display: block; font-size: 0.95rem; }
.obs-tip.is-floating { position: fixed; z-index: 60; white-space: normal; max-width: 260px; }
.obs-tile, .obs-chart, .bar-chart-wrap { position: relative; }

/* Tuile accentuée par la couleur de son entité (indicateur ou province). */
.obs-tile[style*="--accent"] { border-top: 3px solid var(--accent); }

/* Légende : pastille de la couleur, texte en encre. */
.obs-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 0.84rem; color: var(--muted); }
.obs-key li { display: inline-flex; align-items: center; gap: 7px; }
.obs-key i { width: 10px; height: 10px; border-radius: 3px; background: var(--key); flex: none; }
.obs-dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--key); vertical-align: 1px; }

/* Lecture croisée : cellules teintées sur l'échelle divergente. Le signe et la
   valeur restent écrits en encre (la couleur n'est jamais seule). */
.bar-table.obs-heat td.obs-heat-cell { position: relative; }
.bar-table.obs-heat td.obs-heat-cell > span { display: inline-block; min-width: 4.2em; padding: 3px 8px; border-radius: 6px; color: var(--ink); font-variant-numeric: tabular-nums; background: var(--heat, transparent); }
.obs-heat-cell[data-heat="u3"] { --heat: color-mix(in srgb, var(--obs-div-up) 62%, transparent); }
.obs-heat-cell[data-heat="u2"] { --heat: color-mix(in srgb, var(--obs-div-up) 38%, transparent); }
.obs-heat-cell[data-heat="u1"] { --heat: color-mix(in srgb, var(--obs-div-up) 18%, transparent); }
.obs-heat-cell[data-heat="z"] { --heat: var(--obs-div-mid); }
.obs-heat-cell[data-heat="d1"] { --heat: color-mix(in srgb, var(--obs-div-down) 18%, transparent); }
.obs-heat-cell[data-heat="d2"] { --heat: color-mix(in srgb, var(--obs-div-down) 38%, transparent); }
.obs-heat-cell[data-heat="d3"] { --heat: color-mix(in srgb, var(--obs-div-down) 62%, transparent); }
.obs-heat-scale { display: flex; align-items: center; gap: 4px; margin: 12px 0 0; font-size: 0.8rem; color: var(--muted); }
.obs-heat-scale i { width: 26px; height: 12px; border-radius: 3px; background: var(--heat); }

/* =====================================================================
   Animations : uniquement si « obs-motion » est posé (JS actif et pas de
   préférence « réduire les animations »). Sans elle, tout est affiché.
   ===================================================================== */
.obs-motion .bar-rank-bar i { transform: scaleX(0); transform-origin: left center; transition: transform 0.9s cubic-bezier(0.22, 0.7, 0.2, 1) calc(var(--i, 0) * 55ms); }
.obs-motion .is-in .bar-rank-bar i { transform: scaleX(1); }
.obs-motion .obs-spark-line, .obs-motion .obs-chart-line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s cubic-bezier(0.4, 0, 0.2, 1); }
.obs-motion .is-in .obs-spark-line, .obs-motion .is-in .obs-chart-line { stroke-dashoffset: 0; }
.obs-motion .obs-spark-fill, .obs-motion .obs-chart-area { opacity: 0; transition: opacity 0.8s ease 0.5s; }
.obs-motion .is-in .obs-spark-fill, .obs-motion .is-in .obs-chart-area { opacity: 1; }
.obs-motion .obs-spark-dot, .obs-motion .obs-chart-dot { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(0.2); transition: opacity 0.3s ease 1.1s, transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) 1.1s; }
.obs-motion .is-in .obs-spark-dot, .obs-motion .is-in .obs-chart-dot { opacity: 1; transform: scale(1); }
.obs-motion .obs-chart-label { opacity: 0; transition: opacity 0.5s ease 0.9s; }
.obs-motion .is-in .obs-chart-label { opacity: 1; }
.obs-motion .obs-heat-cell > span { opacity: 0; transform: scale(0.9); transition: opacity 0.4s ease calc(var(--i, 0) * 18ms), transform 0.4s ease calc(var(--i, 0) * 18ms); }
.obs-motion .is-in .obs-heat-cell > span { opacity: 1; transform: none; }
.obs-motion .obs-waffle i { opacity: 0; transform: scale(0.4); transition: opacity 0.3s ease calc(var(--i, 0) * 8ms), transform 0.35s ease calc(var(--i, 0) * 8ms); }
.obs-motion .is-in .obs-waffle i { opacity: 1; transform: none; }
/* Relance d'une courbe (changement d'indicateur) : état de départ sans transition. */
.obs-motion .obs-replay .obs-chart-line { transition: none; stroke-dashoffset: 1; }
.obs-motion .obs-replay .obs-chart-area, .obs-motion .obs-replay .obs-chart-dot, .obs-motion .obs-replay .obs-chart-label { transition: none; opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .obs-motion * { transition: none !important; }
}

/* =====================================================================
   Graphiques de l'observatoire (scripts/lib/observatoire/charts.js)
   ===================================================================== */
.obs-viz { margin: 14px 0 0; }
.obs-viz figcaption { margin-top: 8px; }
.obs-viz .bar-table-wrap { position: relative; } /* retient les .sr-only absolus dans la zone défilante */
.obs-viz svg { display: block; width: 100%; height: auto; overflow: visible; }
.obs-viz [data-tip] { cursor: default; outline: none; }
.obs-viz [data-tip]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Catégories de marché (emplacements 1 à 3) et « non classée » en gris. */
:root { --obs-cat-1: #3987e5; --obs-cat-2: #d95926; --obs-cat-3: #199e70; --obs-cat-na: #5a5955; }
:root[data-theme="light"] { --obs-cat-1: #2a78d6; --obs-cat-2: #eb6834; --obs-cat-3: #1baf7a; --obs-cat-na: #c3c2b7; }

/* Échelle séquentielle bleue (une teinte), plus foncé = plus en clair,
   plus clair = plus en sombre ; 0 = surface neutre. Texte en blanc ou en
   encre selon la luminance de la case. */
/* Échelle séquentielle : les petites valeurs restent proches du fond, seules
   les fortes ressortent (en sombre comme en clair, l'intensité croît avec la valeur). */
:root { --obs-seq-0: #232322; --obs-seq-1: #1c2a3d; --obs-seq-2: #1d416e; --obs-seq-3: #2464b4; --obs-seq-4: #3f8ae6; --obs-seq-5: #9cc6f7; }
:root[data-theme="light"] { --obs-seq-0: #f0efec; --obs-seq-1: #e2ecf8; --obs-seq-2: #bdd5f2; --obs-seq-3: #7cade9; --obs-seq-4: #2a78d6; --obs-seq-5: #0d4a91; }
.obs-seq-0 { --seq: var(--obs-seq-0); --seq-ink: var(--muted); }
.obs-seq-1 { --seq: var(--obs-seq-1); --seq-ink: var(--muted); } .obs-seq-2 { --seq: var(--obs-seq-2); --seq-ink: var(--ink); }
.obs-seq-3 { --seq: var(--obs-seq-3); --seq-ink: #fff; } .obs-seq-4 { --seq: var(--obs-seq-4); --seq-ink: #fff; } .obs-seq-5 { --seq: var(--obs-seq-5); --seq-ink: #0b0b0b; }
:root[data-theme="light"] .obs-seq-1, :root[data-theme="light"] .obs-seq-2, :root[data-theme="light"] .obs-seq-3 { --seq-ink: #0b0b0b; }
:root[data-theme="light"] .obs-seq-4, :root[data-theme="light"] .obs-seq-5 { --seq-ink: #fff; }
.obs-seq-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; margin: 10px 0 0; font-size: 0.78rem; color: var(--muted); }
.obs-seq-legend span { margin-right: 6px; }
.obs-seq-legend small { margin: 0 4px; font-size: 0.76rem; }
.obs-seq-legend i { width: 20px; height: 12px; border-radius: 3px; background: var(--seq); }

/* Carte hexagonale */
.obs-hexmap svg { max-width: 400px; margin: 0 auto; }
.obs-hex polygon { fill: var(--seq); stroke: var(--card); stroke-width: 2; transition: filter 0.15s; }
.obs-hex text { fill: var(--seq-ink); font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; pointer-events: none; }
.obs-hex:hover polygon, .obs-hex:focus polygon { filter: brightness(1.18); }

/* Barre segmentée 100 % */
.obs-segbar-track { display: flex; gap: 2px; height: 34px; border-radius: 8px; overflow: hidden; }
.obs-seg { position: relative; flex: 0 0 var(--w); background: var(--c); display: flex; align-items: center; justify-content: center; min-width: 4px; }
.obs-seg b { font-size: 0.8rem; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.obs-seg:first-child { border-radius: 8px 0 0 8px; } .obs-seg:last-child { border-radius: 0 8px 8px 0; }
.obs-segbar .obs-key strong { color: var(--ink); font-weight: 600; margin-left: 4px; }

/* Courbe de Lorenz */
.obs-lorenz svg { max-width: 360px; margin: 0 auto; }
.obs-lz-frame { fill: none; stroke: var(--hair); }
.obs-lz-equal { stroke: var(--muted); stroke-width: 1; stroke-opacity: 0.6; }
.obs-lz-area { fill: var(--chart); fill-opacity: 0.12; }
.obs-lz-line { fill: none; stroke: var(--chart); stroke-width: 2.4; stroke-linejoin: round; }
.obs-lz-guide { stroke: var(--chart); stroke-width: 1; stroke-opacity: 0.6; }
.obs-lz-dot { fill: var(--chart); stroke: var(--card); stroke-width: 2; }
.obs-lz-note { fill: var(--ink); font-size: 12px; font-weight: 700; }
.obs-lz-label, .obs-lz-axis { fill: var(--muted); font-size: 11px; }

/* Frise des 12 prochains mois */
.obs-cal-strip { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.obs-cal-month { display: grid; grid-template-rows: auto 1fr auto; gap: 6px; justify-items: center; padding: 8px 2px; border-radius: 10px; background: rgba(var(--w), 0.04); min-height: 92px; }
.obs-cal-month.has-items { background: color-mix(in srgb, var(--chart) 12%, transparent); }
.obs-cal-label { font-size: 0.74rem; font-weight: 700; color: var(--ink); text-align: center; line-height: 1.1; }
.obs-cal-label small { display: block; font-weight: 400; color: var(--muted); }
.obs-cal-dots { display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: center; gap: 4px; }
.obs-cal-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--chart); box-shadow: 0 0 0 2px var(--card); }
.obs-cal-count { font-size: 0.78rem; font-weight: 700; color: var(--ink); min-height: 1em; }
@media (max-width: 640px) {
  .obs-cal-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* Matrice de chaleur */
.obs-matrix-table { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 0.82rem; }
.obs-matrix-table th { font-weight: 600; color: var(--ink); text-align: left; }
.obs-matrix-table thead th { font-size: 0.74rem; font-weight: 600; color: var(--muted); vertical-align: bottom; padding: 0 2px 6px; }
.obs-matrix-table thead th span:last-child { display: inline-block; max-width: 9em; }
.obs-matrix-table tbody th { padding-right: 10px; white-space: nowrap; }
.obs-matrix-table td { height: 34px; min-width: 44px; text-align: center; border-radius: 6px; background: var(--seq); color: var(--seq-ink); font-variant-numeric: tabular-nums; font-weight: 600; }

/* Graphique de pente */
.obs-slope svg { max-width: 640px; }
.obs-viz svg.is-narrow { display: none; }
@media (max-width: 640px) {
  .obs-viz svg.is-wide { display: none; }
  .obs-viz svg.is-narrow { display: block; }
}
.obs-slope-head { fill: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.obs-slope-axis { stroke: var(--hair); stroke-width: 1; }
.obs-slope-item .obs-chart-line { stroke: var(--c); stroke-width: 2.4; stroke-linecap: round; }
.obs-slope-item .obs-chart-dot { fill: var(--c); stroke: var(--card); stroke-width: 2; }
.obs-slope-val { fill: var(--muted); font-size: 12px; }
.obs-slope-num { fill: var(--ink); font-weight: 700; }
.obs-slope-item:hover .obs-chart-line { stroke-width: 3.6; }

/* Frise à couloirs */
.obs-tl-month { fill: var(--muted); font-size: 11px; }
.obs-tl-lane { fill: var(--ink); font-size: 12px; font-weight: 600; }
.obs-tl-rail { stroke: var(--hair); stroke-width: 1; }
.obs-tl-mark { fill: var(--c); stroke: var(--c); stroke-width: 1.5; stroke-linejoin: round; }
.obs-tl-mark.is-ponctuel { fill: var(--card); stroke-width: 2; }
.obs-tl-mark.is-confirmer { fill-opacity: 0.35; }
.obs-key-tri { width: 0 !important; height: 0 !important; border-radius: 0 !important; background: none !important; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 10px solid var(--muted); }
.obs-key-tri.is-ponctuel { border-bottom-color: color-mix(in srgb, var(--muted) 45%, transparent); }
.obs-key-tri.is-confirmer { border-bottom-color: color-mix(in srgb, var(--muted) 30%, transparent); }

/* Matrice de points */
.obs-dm-table { border-collapse: separate; border-spacing: 0; font-size: 0.84rem; }
.obs-dm-table thead th { font-size: 0.72rem; font-weight: 700; color: var(--muted); text-align: center; padding: 0 6px 8px; vertical-align: bottom; max-width: 6.5em; line-height: 1.2; }
.obs-dm-table tbody th { text-align: left; font-weight: 600; color: var(--ink); padding: 6px 14px 6px 0; white-space: nowrap; }
.obs-dm-table tbody tr + tr th, .obs-dm-table tbody tr + tr td { border-top: 1px solid var(--hair); }
.obs-dm-cell { text-align: center; padding: 6px; }
.obs-dm-cell::before, .obs-key-dot { content: ""; display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; }
.obs-dm-cell.is-on.is-demande::before, .obs-key-dot.is-on.is-demande { background: var(--obs-c-offres); }
.obs-dm-cell.is-on.is-difficulte::before, .obs-key-dot.is-on.is-difficulte { background: var(--obs-c-employeurs); }
.obs-dm-cell.is-off::before, .obs-key-dot.is-off { box-shadow: inset 0 0 0 2px var(--hair); }
.obs-dm-cell.is-na::before, .obs-key-dot.is-na { width: 6px; height: 6px; background: var(--hair); }
.obs-key .obs-key-dot { width: 12px; height: 12px; border-radius: 50%; }
.obs-key .obs-key-dot.is-off { background: transparent; }
.obs-key .obs-key-dot.is-na { width: 6px; height: 6px; margin: 3px; }

/* Cercles proportionnels (tableau) */
.obs-bubble-cell { white-space: nowrap; }
.obs-bubble { display: inline-block; width: calc(var(--r) * 2); height: calc(var(--r) * 2); margin-right: 8px; border-radius: 50%; background: var(--c); vertical-align: middle; opacity: 0.9; }
@media (max-width: 640px) { .obs-bubble { width: calc(var(--r) * 1.4); height: calc(var(--r) * 1.4); margin-right: 5px; } }

/* Animations d'entrée des nouveaux graphiques */
.obs-motion .obs-hex polygon, .obs-motion .obs-hex text { opacity: 0; transition: opacity 0.5s ease calc(var(--i, 0) * 22ms); }
.obs-motion .is-in .obs-hex polygon, .obs-motion .is-in .obs-hex text { opacity: 1; }
.obs-daycal { margin-top: 4px; }
.obs-dc-panels { display: grid; gap: 22px; }
.obs-dc-panel .obs-family { margin: 0 0 8px; }
.obs-dc-panel .note { margin-top: 6px; }
.obs-daycal-fig svg { max-width: 760px; }
.obs-dc-cell { fill: var(--seq); }
.obs-dc-cell:hover, .obs-dc-cell:focus { stroke: var(--ink); stroke-width: 1.5; outline: none; }
.obs-dc-cell.is-gap { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 2; }
.obs-dc-cell.is-out { fill: var(--obs-seq-0); opacity: 0.35; }
.obs-dc-month, .obs-dc-wd { fill: var(--muted); font-size: 10.5px; }
.obs-dc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.obs-dc-legend .obs-seq-legend { margin-top: 8px; }
.obs-dc-key { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 0.78rem; color: var(--muted); }
.obs-dc-key i { width: 12px; height: 12px; border: 1px dashed var(--muted); border-radius: 2px; }
.bar-table.obs-sources-table th[scope="row"] { text-align: left; font-weight: 600; color: var(--ink); white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: 0.86rem; }
.obs-sources-table td.is-shift { box-shadow: inset 0 0 0 2px var(--obs-c-attributions); border-radius: 4px; font-weight: 700; }
.bar-table.obs-sources-table td.obs-num, .bar-table.obs-sources-table thead th.obs-num { padding-left: 8px; padding-right: 8px; }
.obs-cov-flag { align-self: center; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--obs-c-attributions); color: var(--ink); font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.obs-see { display: block; margin-top: 2px; font-size: 0.76rem; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.obs-see:hover { color: var(--ink); }
.obs-sm-table td { vertical-align: middle; }
.obs-sm-table .obs-sm-cell { min-width: 150px; }
.obs-sm-table .obs-sm-cell .obs-spark { display: block; width: 132px; height: 34px; }
.obs-sm-total { font-size: 0.86rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.obs-sm-unit { font-weight: 400; text-transform: none; letter-spacing: 0; }
.obs-sm-none { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 640px) {
  .bar-table.obs-sm-table tr { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
  .bar-table.obs-sm-table td.obs-cell-head { grid-column: 1 / -1; font-weight: 600; }
  .bar-table.obs-sm-table td.obs-sm-cell { min-width: 0; grid-column: auto; grid-row: auto; }
  .bar-table.obs-sm-table td.obs-sm-cell::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 0.72rem; color: var(--muted); line-height: 1.2; }
  .obs-sm-table .obs-sm-cell .obs-spark { width: 100%; height: 30px; }
}
.obs-bump svg { max-width: 760px; }
.obs-bump-month, .obs-bump-rank { fill: var(--muted); font-size: 11px; }
/* Le podium du dernier mois en couleur, les autres en gris : l'œil va d'abord
   aux trois premiers ; le survol remet n'importe quelle ligne en couleur. */
.obs-bump-line { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; opacity: 0.4; transition: opacity 0.15s, stroke-width 0.15s, stroke 0.15s; }
.obs-bump-dot { fill: var(--muted); stroke: var(--card); stroke-width: 1.5; opacity: 0.55; }
.obs-bump-item.is-top .obs-bump-line { stroke: var(--obs-c-offres); stroke-width: 2.6; opacity: 1; }
.obs-bump-item.is-top .obs-bump-dot { fill: var(--obs-c-offres); opacity: 1; }
.obs-bump-item:hover .obs-bump-line, .obs-bump-item:focus-within .obs-bump-line { stroke: var(--obs-c-offres); opacity: 1; stroke-width: 3.2; }
.obs-bump-item:hover .obs-bump-dot, .obs-bump-item:focus-within .obs-bump-dot { fill: var(--obs-c-offres); opacity: 1; }
.obs-bump-label { fill: var(--muted); font-size: 12px; }
.obs-bump-label a { fill: var(--ink); }
.obs-bump-item.is-top .obs-bump-label, .obs-bump-item:hover .obs-bump-label { font-weight: 600; fill: var(--ink); }
.obs-bump-num { fill: var(--ink); font-weight: 700; }
.obs-motion .obs-bump-line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s ease calc(var(--i, 0) * 60ms), opacity 0.15s; }
.obs-motion .is-in .obs-bump-line { stroke-dashoffset: 0; }
.obs-dv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.obs-dv-row { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 4.6rem; align-items: center; gap: 12px; min-height: 30px; }
.obs-dv-label { position: relative; padding-left: 17px; font-size: 0.9rem; line-height: 1.3; color: var(--ink); }
.obs-dv-label .obs-dot { position: absolute; left: 0; top: 0.42em; }
.obs-dv-track { position: relative; height: 18px; outline-offset: 2px; }
.obs-dv-track::before { content: ""; position: absolute; left: 50%; top: -6px; bottom: -6px; border-left: 1px solid var(--hair); }
.obs-dv-track i { position: absolute; top: 0; bottom: 0; width: var(--w); border-radius: 4px; }
.obs-dv-row.is-up .obs-dv-track i { left: 50%; background: var(--obs-div-up); transform-origin: left center; }
.obs-dv-row.is-down .obs-dv-track i { right: 50%; background: var(--obs-div-down); transform-origin: right center; }
.obs-dv-value { font-size: 0.9rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.obs-dv-label small { display: block; font-size: 0.76rem; color: var(--muted); }
.obs-dv-value { text-align: right; }
@media (max-width: 640px) {
  .obs-dv-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 4px 0; }
  .obs-dv-label { grid-column: 1; grid-row: 1; }
  .obs-dv-value { grid-column: 2; grid-row: 1; text-align: right; }
  .obs-dv-track { grid-column: 1 / -1; grid-row: 2; }
}
.obs-sharebars { display: grid; gap: 14px; }
.obs-sb-label { margin: 0 0 6px; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.obs-sb-label span { margin-left: 8px; font-weight: 400; font-size: 0.8rem; color: var(--muted); }
.obs-sharebars .obs-segbar-track { height: 28px; }
.obs-sharebars .obs-seg { overflow: hidden; }
.obs-sharebars .obs-seg b { white-space: nowrap; }
@media (max-width: 640px) { .obs-sharebars .obs-seg b { font-size: 0.72rem; } }
.obs-mirror svg { max-width: 720px; }
.obs-mr-axis { stroke: var(--muted); stroke-width: 1; }
.obs-mr-bar { fill: var(--c); }
.obs-mr-bar:hover, .obs-mr-bar:focus { filter: brightness(1.15); outline: none; }
.obs-mr-val { fill: var(--ink); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.obs-mr-period { fill: var(--muted); font-size: 11px; }
.obs-motion .obs-dv-track i { transform: scaleX(0); transition: transform 0.7s cubic-bezier(0.22, 0.7, 0.2, 1) calc(var(--i, 0) * 70ms); }
.obs-motion .is-in .obs-dv-track i { transform: none; }
.obs-motion .obs-mr-bar { transform-box: fill-box; transform: scaleY(0); transition: transform 0.6s cubic-bezier(0.22, 0.7, 0.2, 1) calc(var(--i, 0) * 80ms); }
.obs-motion .obs-mr-bar.is-up { transform-origin: center bottom; }
.obs-motion .obs-mr-bar.is-down { transform-origin: center top; }
.obs-motion .is-in .obs-mr-bar { transform: none; }
.obs-motion .obs-seg { transform: scaleX(0); transform-origin: left center; transition: transform 0.8s cubic-bezier(0.22, 0.7, 0.2, 1) calc(var(--i, 0) * 120ms); }
.obs-motion .is-in .obs-seg { transform: none; }
.obs-motion .obs-cal-month { opacity: 0; transform: translateY(6px); transition: opacity 0.45s ease calc(var(--i, 0) * 45ms), transform 0.45s ease calc(var(--i, 0) * 45ms); }
.obs-motion .is-in .obs-cal-month { opacity: 1; transform: none; }
.obs-motion .obs-matrix-table td, .obs-motion .obs-dm-cell::before { opacity: 0; transition: opacity 0.4s ease calc(var(--i, 0) * 12ms); }
.obs-motion .is-in .obs-matrix-table td, .obs-motion .is-in .obs-dm-cell::before { opacity: 1; }
.obs-motion .obs-tl-mark { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(0.3); transition: opacity 0.35s ease calc(0.3s + var(--i, 0) * 40ms), transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) calc(0.3s + var(--i, 0) * 40ms); }
.obs-motion .is-in .obs-tl-mark { opacity: 1; transform: none; }
.obs-motion .obs-bubble { transform: scale(0); transition: transform 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) 0.2s; }
.obs-motion .is-in .obs-bubble { transform: none; }

/* ---------- Liens discrets ----------
   Noms d'entreprises, de secteurs, de métiers ou d'organismes dans les
   classements, tableaux et listes : le lien garde la couleur du texte et ne se
   révèle qu'au survol ou au focus clavier (soulignement doré). Les liens
   d'action (« panel-more », navigation) gardent leur style. */
:is(.bar-table, .bar-rank, .obs-event-list, .obs-change-list, .obs-tension-card h3, .obs-dv-label, .obs-family, .obs-matrix-table, .obs-dm-table, .obs-sm-head, .obs-sc-legend) a:not(.panel-more):not(.obs-see) {
  color: inherit; border-bottom: 0; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
:is(.bar-table, .bar-rank, .obs-event-list, .obs-change-list, .obs-tension-card h3, .obs-dv-label, .obs-family, .obs-matrix-table, .obs-dm-table, .obs-sm-head, .obs-sc-legend) a:not(.panel-more):not(.obs-see):is(:hover, :focus-visible) {
  color: var(--ink); text-decoration-color: var(--gold);
}
:is(.bar-table, .bar-rank, .obs-event-list, .obs-change-list, .obs-tension-card h3, .obs-dv-label, .obs-family, .obs-matrix-table, .obs-dm-table, .obs-sm-head, .obs-sc-legend) a:not(.panel-more):not(.obs-see):focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 2px; }
.obs-bump-label a:is(:hover, :focus-visible) { text-decoration: underline; }
/* Mois antérieurs à la collecte suivie : listés, mais en retrait. */
.bar-table tr.is-uncovered td { color: var(--muted); }
.bar-table tr.is-uncovered small { font-size: 0.78rem; }
/* Mention « moins d'un an de collecte » dans les faits d'une tuile : discrète. */
.obs-tile-facts .obs-evo.is-na { font-size: 0.8rem; font-weight: 400; text-align: right; }

/* ---------- Accueil de l'observatoire ---------- */
.bar-hero.is-hub.obs-home-hero h1 { max-width: 24ch; }
.obs-home-hero .panel-copy { max-width: 62ch; font-size: 1rem; color: var(--muted); }

/* ---------- Boutons d'accès en tête de page ----------
   Invitations vers les autres pages de l'observatoire, en tête de chaque page :
   bouton à trait fin, arrondi au maximum, de la couleur du texte (blanc en
   sombre, noir en clair), avec une flèche ; la page courante est pleine. */
.obs-nav a { gap: 7px; border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); background: transparent; }
.obs-nav a svg { flex: none; transition: transform 0.15s ease; }
.obs-nav a:hover, .obs-nav a:focus-visible { border-color: var(--ink); background: rgba(var(--w), 0.08); }
.obs-nav a:hover svg, .obs-nav a:focus-visible svg { transform: translateX(2px); }
.obs-nav a[aria-current="page"] { background: var(--ink); color: var(--card); }

/* Sous-titre interne d'une section (liste secondaire sous un tableau). */
.obs-subhead { margin: 22px 0 6px; font-size: 0.95rem; font-weight: 600; color: var(--ink); }
@media (max-width: 640px) {
  .obs-hire-table td small { display: block; }
  .bar-table.obs-hire-table th { white-space: normal; letter-spacing: 0; }
}

/* Petits multiples alignés (nickel en contexte) : une échelle par série. */
.obs-paired { display: grid; gap: 18px; }
.obs-pl-title { margin: 0; font-size: 0.92rem; color: var(--ink); }
.obs-pl-title .obs-dot { margin-right: 6px; vertical-align: 1px; }
.obs-pl-title small { color: var(--muted); font-size: 0.8rem; }
.obs-pl-meta { margin: 2px 0 8px; font-size: 0.82rem; color: var(--muted); }
.obs-pl-meta strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.obs-pl-plot { position: relative; height: 96px; }
.obs-pl-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.obs-pl-line { fill: none; stroke: var(--c); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.obs-pl-dots { position: absolute; inset: 0; }
.obs-pl-dots i { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--c); }
.obs-pl-dots i.is-last { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.obs-pl-months { position: relative; height: 16px; margin: 4px 0 0; font-size: 11px; color: var(--muted); }
.obs-pl-months span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.obs-pl-months span:last-child { transform: translateX(-100%); }
.obs-pl-months span:first-child { transform: none; }

/* Carte à contours réels des communes (sièges, lieux d'exécution). */
.obs-choro svg { max-width: 640px; margin: 0 auto; }
.obs-choro path { fill: var(--seq); stroke: var(--card); stroke-width: 0.8; vector-effect: non-scaling-stroke; transition: fill 0.2s ease; }
.obs-choro path:hover, .obs-choro path:focus-visible { stroke: var(--gold); stroke-width: 2; outline: none; }
.obs-choro-frame { fill: var(--card); stroke: var(--hair); stroke-width: 1.5; }
.obs-choro-inset text { fill: var(--muted); font-size: 30px; }
.obs-maps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 8px; }
.obs-maps h3 { margin: 0 0 4px; font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.obs-maps .obs-map-sub { margin: 0; font-size: 0.82rem; color: var(--muted); }

/* Nuage sectoriel (page Entreprises) : points positionnés en HTML, numérotés,
   légende détaillée dessous. */
.obs-scatter { margin-top: 10px; }
.obs-sc-plot { position: relative; aspect-ratio: 16 / 9; margin: 6px 12px 24px 40px; border-left: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.obs-sc-grid { position: absolute; pointer-events: none; }
.obs-sc-grid.is-y { left: 0; right: 0; border-top: 1px dashed var(--hair); }
.obs-sc-grid.is-x { top: 0; bottom: 0; border-left: 1px dashed var(--hair); }
.obs-sc-grid b { position: absolute; font-size: 0.72rem; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.obs-sc-grid.is-y b { right: calc(100% + 6px); transform: translateY(-50%); }
.obs-sc-grid.is-x b { top: calc(100% + 4px); transform: translateX(-50%); }
.obs-sc-pt { position: absolute; display: grid; place-items: center; width: var(--d); height: var(--d); transform: translate(-50%, -50%); border-radius: 50%; background: color-mix(in srgb, var(--c) 70%, transparent); border: 1.5px solid var(--c); color: #fff; font-size: 0.72rem; font-weight: 700; text-shadow: 0 0 2px rgba(0, 0, 0, 0.7); cursor: default; }
.obs-sc-pt:hover { z-index: 50 !important; filter: brightness(1.15); }
.obs-sc-axis { margin: 0; font-size: 0.78rem; color: var(--muted); }
.obs-sc-axis.is-x { text-align: right; }
.obs-sc-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 18px; margin: 14px 0 0; padding: 0; list-style: none; counter-reset: sc; }
.obs-sc-legend li { display: flex; gap: 8px; align-items: baseline; font-size: 0.86rem; color: var(--ink); counter-increment: sc; }
.obs-sc-legend small { display: block; color: var(--muted); font-size: 0.76rem; }
.obs-sc-num { flex: 0 0 auto; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--c); color: #fff; font-size: 0.7rem; font-weight: 700; transform: translateY(4px); }
.obs-sc-num::before { content: counter(sc); }
@media (max-width: 640px) { .obs-sc-plot { aspect-ratio: 1 / 1; margin-left: 30px; } }

/* Réseau des cotraitants : un réseau par entreprise, centré sur elle. */
.obs-egos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 8px; }
.obs-egos h3 { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.obs-egos .obs-map-sub { margin: 2px 0 0; font-size: 0.8rem; color: var(--muted); }
.obs-ego svg { max-width: 360px; margin: 0 auto; overflow: visible; }
.obs-ego-edge { stroke: var(--obs-c-attributions); stroke-opacity: 0.55; stroke-linecap: round; }
.obs-ego-node circle { fill: var(--obs-c-attributions); stroke: var(--card); stroke-width: 2; }
.obs-ego-centre { fill: var(--ink); stroke: var(--obs-c-attributions); stroke-width: 3; }
.obs-ego-label { fill: var(--ink); font-size: 11.5px; }
.obs-ego a .obs-ego-label { text-decoration: none; }
.obs-ego a:hover .obs-ego-label, .obs-ego a:focus-visible .obs-ego-label { fill: var(--gold); text-decoration: underline; }

/* Attention × activité (conjoncture) : deux barres par secteur. */
.obs-att-table td:nth-child(2) { width: 52%; min-width: 160px; }
.obs-att-bar { display: grid; grid-template-columns: minmax(0, 1fr) 3.6em; align-items: center; gap: 8px; height: 16px; }
.obs-att-bar + .obs-att-bar { margin-top: 3px; }
.obs-att-bar i { display: block; height: 8px; border-radius: 4px; background: var(--c); min-width: 2px; }
.obs-att-bar.is-offres { --c: var(--obs-c-offres); } .obs-att-bar.is-clics { --c: var(--obs-c-actu); }
.obs-att-bar b { font-size: 0.78rem; font-weight: 500; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.obs-strip i.is-off, .obs-strip-key i { background: transparent; border: 1px dashed var(--muted); opacity: 0.6; }
.obs-strip-key { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 0.78rem; color: var(--muted); }
.obs-strip-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
