/*
 * Notre histoire — carte topographique, trace parcourue, frise des versions.
 * Thème jour « carte papier » / nuit « vision de nuit », suit le système ; bascule mémorisée par la page.
 * Titres et chiffres : Barlow Condensed (même famille que les écrans du téléphone ATAK) ; texte : Inter.
 */

.nh {
  --nh-bg: #eef1e9;
  --nh-surface: #f6f8f1;
  --nh-raise: #ffffff;
  --nh-ink: #16201a;
  --nh-muted: #536058;
  --nh-line: #cdd5c8;
  --nh-grid: rgba(30, 60, 40, 0.07);
  --nh-contour: rgba(35, 80, 50, 0.17);
  --nh-route: #b8650b;
  --nh-signal: #0b7f55;
  --nh-atak: #0b7f55;
  --nh-link: #1d6caf;
  --nh-ow: #a4610a;
  --nh-sse: #b33a35;
  --nh-portal: #6447c6;
  --nh-sea: #13808a;
  --nh-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --nh-text: Inter, "Segoe UI", system-ui, sans-serif;
  --nh-top: 3.5rem;
  color-scheme: light;
  background: var(--nh-bg);
  color: var(--nh-ink);
  font-family: var(--nh-text);
  font-size: 1rem;
  line-height: 1.6;
  text-transform: none;
  letter-spacing: normal;
}

@media (prefers-color-scheme: dark) {
  .nh:not([data-theme="light"]) {
    --nh-bg: #0c120f;
    --nh-surface: #111915;
    --nh-raise: #17211c;
    --nh-ink: #e6ece4;
    --nh-muted: #97a49b;
    --nh-line: #26332c;
    --nh-grid: rgba(160, 200, 170, 0.05);
    --nh-contour: rgba(140, 195, 160, 0.17);
    --nh-route: #f2a93b;
    --nh-signal: #3ddc97;
    --nh-atak: #3ddc97;
    --nh-link: #6cb6ff;
    --nh-ow: #f0b44c;
    --nh-sse: #f07a72;
    --nh-portal: #b6a4ff;
    --nh-sea: #4cc6cf;
    color-scheme: dark;
  }
}

.nh[data-theme="dark"] {
  --nh-bg: #0c120f;
  --nh-surface: #111915;
  --nh-raise: #17211c;
  --nh-ink: #e6ece4;
  --nh-muted: #97a49b;
  --nh-line: #26332c;
  --nh-grid: rgba(160, 200, 170, 0.05);
  --nh-contour: rgba(140, 195, 160, 0.17);
  --nh-route: #f2a93b;
  --nh-signal: #3ddc97;
  --nh-atak: #3ddc97;
  --nh-link: #6cb6ff;
  --nh-ow: #f0b44c;
  --nh-sse: #f07a72;
  --nh-portal: #b6a4ff;
  --nh-sea: #4cc6cf;
  color-scheme: dark;
}

.nh *,
.nh *::before,
.nh *::after {
  box-sizing: border-box;
}

/* Remise à zéro sans poids de sélecteur : les classes de la page gardent la main. */
:where(.nh) :where(p, ol, ul, dl, dd, h1, h2, h3, h4) {
  margin: 0;
}

:where(.nh) :where(ol, ul) {
  padding: 0;
  list-style: none;
}

:where(.nh) a {
  color: inherit;
}

.nh [hidden] {
  display: none !important;
}

.nh :focus-visible {
  outline: 2px solid var(--nh-signal);
  outline-offset: 3px;
  border-radius: 3px;
}

.nh-wrap {
  width: 100%;
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

/* ---------- Hero : carte, trace, kilomètres ---------- */

.nh-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(3rem, 8vw, 6rem) 0 0;
  border-bottom: 1px solid var(--nh-line);
}

.nh-hero__map {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--nh-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--nh-grid) 1px, transparent 1px);
  background-size: 96px 96px;
  background-position: -1px -1px;
}

.nh-hero__map::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--nh-contour);
  -webkit-mask: var(--nh-topo) center / cover no-repeat;
  mask: var(--nh-topo) center / cover no-repeat;
}

.nh-hero__map::after {
  /* Fondu vers le bas : les chiffres restent lisibles sur la carte. */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, var(--nh-bg) 100%);
}

.nh-hero__route {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.nh-route {
  fill: none;
  stroke: var(--nh-route);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  vector-effect: non-scaling-stroke;
}

.nh-wp {
  fill: var(--nh-bg);
  stroke: var(--nh-route);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.nh-wp--end {
  fill: var(--nh-route);
}

@media (prefers-reduced-motion: no-preference) {
  .nh-route {
    stroke-dashoffset: 1;
    animation: nh-draw 2.6s cubic-bezier(0.45, 0.05, 0.25, 1) 0.2s forwards;
  }

  .nh-wp {
    opacity: 0;
    animation: nh-pop 0.4s ease-out forwards;
  }

  .nh-wp:nth-of-type(1) { animation-delay: 0.9s; }
  .nh-wp:nth-of-type(2) { animation-delay: 1.7s; }
}

@keyframes nh-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes nh-pop {
  to { opacity: 1; }
}

.nh-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.nh-theme {
  position: absolute;
  top: -1.5rem;
  right: clamp(1rem, 4vw, 2.5rem);
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--nh-line);
  border-radius: 999px;
  background: var(--nh-raise);
  color: var(--nh-ink);
  cursor: pointer;
}

.nh-theme svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.nh-theme__moon { fill: currentColor; stroke: none; }
.nh[data-theme="dark"] .nh-theme__moon,
.nh:not([data-theme="dark"]) .nh-theme__sun { display: none; }

.nh-hero__title {
  font-family: var(--nh-display);
  font-weight: 700;
  font-size: clamp(3.4rem, 9vw, 7.25rem);
  line-height: 0.88;
  letter-spacing: -0.01em;
  color: var(--nh-ink);
}

.nh-hero__lead {
  max-width: 36rem;
  margin-top: 1.25rem;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  color: var(--nh-muted);
}

.nh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.nh-btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border: 1px solid var(--nh-ink);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  color: var(--nh-ink);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nh .nh-btn--solid {
  background: var(--nh-ink);
  color: var(--nh-bg);
}

.nh-btn--ghost:hover {
  background: var(--nh-ink);
  color: var(--nh-bg);
}

.nh-btn--solid:hover {
  background: var(--nh-signal);
  border-color: var(--nh-signal);
}

.nh-km {
  position: relative;
  padding-left: 1.75rem;
  border-left: 3px solid var(--nh-route);
}

.nh-km::before {
  /* Repère de fin de trace : la valeur est l’étiquette du dernier point. */
  content: "";
  position: absolute;
  left: -0.6rem;
  top: 0.9rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: var(--nh-route);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--nh-route) 22%, transparent);
}

.nh-km__value {
  font-family: var(--nh-display);
  font-weight: 700;
  font-size: clamp(4.25rem, 12.5vw, 9.5rem);
  line-height: 0.9;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  color: var(--nh-ink);
  white-space: nowrap;
}

.nh-km__value.is-pending {
  color: var(--nh-muted);
}

.nh-km__unit {
  margin-left: 0.12em;
  font-size: 0.42em;
  font-weight: 600;
  color: var(--nh-route);
}

.nh-km__label {
  max-width: 26rem;
  margin-top: 0.75rem;
  color: var(--nh-muted);
}

.nh-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--nh-line);
}

.nh-fact {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.15rem;
  padding: 1.1rem 1rem 1.4rem 0;
}

.nh-fact + .nh-fact {
  padding-left: 1rem;
  border-left: 1px solid var(--nh-line);
}

.nh-fact dt {
  font-size: 0.875rem;
  color: var(--nh-muted);
}

.nh-fact dd {
  font-family: var(--nh-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.nh-fact__pending {
  font-size: 0.6em;
  color: var(--nh-muted);
}

/* ---------- Navigation de page ---------- */

.nh-nav {
  position: sticky;
  top: var(--nh-top);
  z-index: 20;
  background: color-mix(in srgb, var(--nh-bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--nh-line);
}

.nh-nav__inner {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.nh-nav__inner::-webkit-scrollbar { display: none; }

.nh-nav a {
  flex: 0 0 auto;
  padding: 0.85rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--nh-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nh-nav a:hover,
.nh-nav a[aria-current="true"] {
  color: var(--nh-ink);
  border-bottom-color: var(--nh-route);
}

/* ---------- Sections ---------- */

.nh-section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  scroll-margin-top: calc(var(--nh-top) + 3rem);
}

.nh-section--band {
  background: var(--nh-surface);
  border-top: 1px solid var(--nh-line);
  border-bottom: 1px solid var(--nh-line);
}

.nh-h2 {
  font-family: var(--nh-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.005em;
  color: var(--nh-ink);
}

.nh-h3 {
  margin: 2.5rem 0 1rem;
  font-family: var(--nh-text);
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--nh-ink);
}

.nh-lead {
  max-width: 44rem;
  margin-top: 0.9rem;
  color: var(--nh-muted);
}

.nh-empty {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px dashed var(--nh-line);
  border-radius: 6px;
  color: var(--nh-muted);
}

/* Origine */

.nh-origin {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 5rem);
}

.nh-origin__story p {
  max-width: 62ch;
  margin-top: 1rem;
  font-size: 1.05rem;
}

.nh-origin__story p:first-of-type {
  margin-top: 1.5rem;
}

.nh-origin__firsts .nh-h3 {
  margin-top: 0.4rem;
}

.nh-firsts {
  position: relative;
  padding-left: 1.4rem;
}

.nh-firsts::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: var(--nh-line);
}

.nh-firsts li {
  position: relative;
  display: grid;
  gap: 0.1rem;
  padding-bottom: 1.15rem;
}

.nh-firsts li::before {
  content: "";
  position: absolute;
  left: -1.4rem;
  top: 0.4rem;
  width: 0.65rem;
  height: 0.65rem;
  border: 2px solid var(--nh-route);
  border-radius: 50%;
  background: var(--nh-bg);
}

.nh-firsts time {
  font-size: 0.85rem;
  color: var(--nh-muted);
}

.nh-firsts strong {
  font-weight: 600;
}

.nh-firsts span {
  font-size: 0.9rem;
  color: var(--nh-muted);
}

/* Chiffres */

.nh-distance {
  margin-top: 2.5rem;
}

.nh-distance .nh-h3 {
  margin-top: 0;
}

.nh-distance__bar {
  display: flex;
  gap: 3px;
  height: 0.9rem;
}

.nh-distance__bar span {
  flex-basis: 0;
  min-width: 6px;
  border-radius: 3px;
}

.nh-distance__legend {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.75rem 1.5rem;
  margin-top: 1rem;
}

.nh-distance__legend li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.5rem;
  align-items: center;
}

.nh-distance__k {
  font-size: 0.9rem;
  color: var(--nh-muted);
}

.nh-distance__v {
  grid-column: 2;
  font-family: var(--nh-display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.nh-swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
}

.nh-mode--foot { background: var(--nh-atak); }
.nh-mode--land { background: var(--nh-ow); }
.nh-mode--air { background: var(--nh-link); }
.nh-mode--sea { background: var(--nh-sea); }
.nh-mode--halo { background: var(--nh-portal); }

.nh-figures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 2rem 1.75rem;
  margin-top: 2.75rem;
}

.nh-figure {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 0.85rem;
  border-top: 2px solid var(--nh-ink);
}

.nh-figure dt {
  order: 2;
  font-size: 0.95rem;
  font-weight: 600;
}

.nh-figure__v {
  order: 1;
  font-family: var(--nh-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 4vw, 3rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.nh-figure__h {
  order: 3;
  font-size: 0.85rem;
  color: var(--nh-muted);
}

.nh-figure.is-pending {
  border-top-color: var(--nh-line);
}

.nh-figure.is-pending .nh-figure__v {
  font-size: 1.6rem;
  color: var(--nh-muted);
}

/* Année par année */

.nh-years {
  margin-top: 2.5rem;
}

.nh-year {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--nh-line);
}

.nh-year:last-child {
  border-bottom: 1px solid var(--nh-line);
}

.nh-year__y {
  font-family: var(--nh-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 0.9;
  color: var(--nh-route);
}

.nh-year__metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem 1.5rem;
}

.nh-metric dt {
  font-size: 0.85rem;
  color: var(--nh-muted);
}

.nh-metric dd strong {
  display: block;
  font-family: var(--nh-display);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.nh-metric__bar {
  display: block;
  height: 4px;
  margin-top: 0.35rem;
  border-radius: 2px;
  background: var(--nh-line);
  overflow: hidden;
}

.nh-metric__bar span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--nh-ink);
}

.nh-metric--operations .nh-metric__bar span { background: var(--nh-atak); }
.nh-metric--members .nh-metric__bar span { background: var(--nh-portal); }
.nh-metric--flight_hours .nh-metric__bar span { background: var(--nh-link); }
.nh-metric--distance_km .nh-metric__bar span { background: var(--nh-route); }

.nh-year__events {
  display: grid;
  gap: 0.4rem;
  margin-top: 1.25rem;
  font-size: 0.92rem;
}

.nh-year__events li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.75rem;
}

.nh-year__events time {
  color: var(--nh-muted);
}

/* Versions */

.nh-current .nh-h3 {
  margin-top: 2.25rem;
}

.nh-current__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.75rem;
}

.nh-current__list li {
  display: grid;
  padding: 0.75rem 0.9rem;
  background: var(--nh-raise);
  border: 1px solid var(--nh-line);
  border-top: 3px solid var(--nh-pc, var(--nh-ink));
  border-radius: 6px;
}

.nh-current__name {
  font-size: 0.85rem;
  color: var(--nh-muted);
}

.nh-current__v {
  font-family: var(--nh-display);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.nh-current__list time {
  font-size: 0.8rem;
  color: var(--nh-muted);
}

.nh-p--atak { --nh-pc: var(--nh-atak); }
.nh-p--link { --nh-pc: var(--nh-link); }
.nh-p--overwatch { --nh-pc: var(--nh-ow); }
.nh-p--sse { --nh-pc: var(--nh-sse); }
.nh-p--portal { --nh-pc: var(--nh-portal); }

.nh-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.25rem;
}

.nh-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid var(--nh-line);
  border-radius: 999px;
  background: var(--nh-raise);
  color: var(--nh-ink);
  font: 500 0.9rem/1 var(--nh-text);
  cursor: pointer;
}

.nh-chip[class*="nh-p--"]::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--nh-pc);
}

.nh-chip span {
  color: var(--nh-muted);
  font-variant-numeric: tabular-nums;
}

.nh-chip[aria-pressed="true"] {
  background: var(--nh-ink);
  border-color: var(--nh-ink);
  color: var(--nh-bg);
}

.nh-chip[aria-pressed="true"] span {
  color: inherit;
  opacity: 0.75;
}

.nh-filters__status {
  min-height: 1.5rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--nh-muted);
}

.nh-months {
  margin-top: 1rem;
}

.nh-month + .nh-month {
  margin-top: 2.5rem;
}

.nh-month__title {
  margin-bottom: 1rem;
  font-family: var(--nh-display);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--nh-ink);
}

.nh-releases {
  position: relative;
  display: grid;
  gap: 0.85rem;
}

.nh-releases::before {
  content: "";
  position: absolute;
  left: 4.6rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: var(--nh-line);
}

.nh-release {
  position: relative;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1.25rem;
}

.nh-release::after {
  content: "";
  position: absolute;
  left: calc(4.6rem - 4px);
  top: 1.15rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--nh-pc, var(--nh-ink));
  box-shadow: 0 0 0 3px var(--nh-surface);
}

.nh-release__date {
  padding-top: 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--nh-muted);
  text-align: right;
  white-space: nowrap;
}

.nh-release__date[title] {
  font-style: italic;
  font-weight: 500;
}

.nh-release__card {
  margin-left: 0.6rem;
  padding: 0.95rem 1.2rem 1.05rem;
  background: var(--nh-raise);
  border: 1px solid var(--nh-line);
  border-radius: 6px;
}

.nh-release__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.nh-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.55rem;
  border: 1px solid var(--nh-line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--nh-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nh-tag--main {
  border-color: color-mix(in srgb, var(--nh-pc) 55%, transparent);
  background: color-mix(in srgb, var(--nh-pc) 12%, transparent);
  color: var(--nh-ink);
  font-weight: 650;
}

.nh-tag--code {
  font-style: italic;
}

.nh-type {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--nh-muted);
}

.nh-type::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 1px;
  background: var(--nh-muted);
  transform: rotate(45deg);
}

.nh-type--new::before { background: var(--nh-atak); }
.nh-type--improvement::before { background: var(--nh-link); }
.nh-type--fix::before { background: var(--nh-sse); }
.nh-type--performance::before { background: var(--nh-route); }

.nh-release__title {
  margin-top: 0.55rem;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.35;
  color: var(--nh-ink);
}

.nh-release__summary {
  max-width: 68ch;
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: var(--nh-muted);
}

.nh-release__points {
  display: grid;
  gap: 0.25rem;
  max-width: 70ch;
  margin-top: 0.6rem;
  font-size: 0.92rem;
}

.nh-release__points li {
  position: relative;
  padding-left: 1rem;
}

.nh-release__points li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.62em;
  width: 0.35rem;
  height: 1px;
  background: var(--nh-muted);
}

.nh-release__link {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--nh-signal);
  text-underline-offset: 3px;
}

.nh .nh-release__link {
  color: var(--nh-signal);
}

.nh-more {
  display: grid;
  justify-items: start;
  gap: 1rem;
  margin-top: 2rem;
}

.nh-more__note {
  font-size: 0.9rem;
  color: var(--nh-muted);
}

.nh-more__note a {
  font-weight: 600;
  color: var(--nh-ink);
  text-underline-offset: 3px;
}

/* Communautés */

.nh-comm-km {
  margin-top: 2rem;
}

.nh-comm-km__v {
  font-family: var(--nh-display);
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.nh-comm-km__k {
  margin-top: 0.4rem;
  color: var(--nh-muted);
}

.nh-moments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.75rem;
}

.nh-moment {
  display: grid;
  gap: 0.3rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--nh-line);
  border-radius: 6px;
  background: var(--nh-raise);
}

.nh-moment__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--nh-muted);
}

.nh-moment strong {
  font-weight: 600;
  line-height: 1.35;
}

.nh-moment__value {
  font-size: 0.85rem;
  color: var(--nh-signal);
}

.nh-comm-public {
  max-width: 46rem;
}

.nh-comm-public p + p {
  margin-top: 0.75rem;
}

.nh-end {
  padding-top: 3rem;
  border-top: 1px solid var(--nh-line);
}

.nh-note {
  max-width: 62ch;
  font-size: 0.9rem;
  color: var(--nh-muted);
}

/* Le compteur garde la largeur de sa valeur finale : pas de saut de mise en page. */
[data-nh-count] {
  font-variant-numeric: tabular-nums;
}

/* ---------- Écrans étroits ---------- */

@media (max-width: 900px) {
  .nh-hero__route {
    display: none;
  }

  .nh-hero__inner,
  .nh-origin {
    grid-template-columns: minmax(0, 1fr);
  }

  .nh-hero__inner {
    gap: 2.5rem;
  }

  .nh-theme {
    top: -2rem;
  }

  .nh-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nh-fact:nth-child(4) {
    padding-left: 0;
    border-left: 0;
  }

  .nh-fact:nth-child(n + 4) {
    border-top: 1px solid var(--nh-line);
  }

  .nh-year {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .nh-year__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .nh-figures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 1rem;
  }

  .nh-distance__legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nh-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nh-fact,
  .nh-fact + .nh-fact {
    padding-left: 0;
    border-left: 0;
  }

  .nh-fact:nth-child(even) {
    padding-left: 1rem;
    border-left: 1px solid var(--nh-line);
  }

  .nh-fact:nth-child(n + 3) {
    border-top: 1px solid var(--nh-line);
  }

  .nh-releases::before,
  .nh-release::after {
    display: none;
  }

  .nh-release {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
  }

  .nh-release__date {
    padding-top: 0;
    text-align: left;
  }

  .nh-release__card {
    margin-left: 0;
    border-left: 3px solid var(--nh-pc, var(--nh-line));
  }
}

@media (prefers-reduced-motion: reduce) {
  .nh *,
  .nh *::before,
  .nh *::after {
    transition: none !important;
    animation: none !important;
  }
}
