/*
 * NEXUS — Feuille de style unique
 * ---------------------------------------------------------------------------
 * Direction : outil clair et accueillant, à la manière des outils de création
 * grand public. Fond très clair légèrement violacé, cartes blanches arrondies,
 * une seule couleur d'action (violet) et un dégradé sarcelle → violet réservé
 * au logo. Les couleurs de niveau (faible, modéré, élevé, critique) restent à
 * part et ne servent qu'à dire le risque.
 * Thème clair par défaut ; sombre via prefers-color-scheme (si aucun choix
 * mémorisé) ou via [data-theme="dark"]. Mouvement réduit respecté.
 */

/* ── Jetons ────────────────────────────────────────────────────────────── */
:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --border: #e1e7ee;
  --border-strong: #cbd5e0;
  --text: #0f1d2e;
  --text-2: #52606f;
  --accent: #14406a;
  --accent-hover: #0f2b46;
  --accent-soft: #e7f0f7;
  --accent-2: #138f8c;
  --on-accent: #ffffff;
  --hero-a: #e8f6f5;
  --hero-b: #e9f0f8;
  --shadow: 0 1px 2px rgba(15, 43, 70, 0.05), 0 6px 20px rgba(15, 43, 70, 0.06);
  --shadow-lift: 0 2px 6px rgba(15, 43, 70, 0.08), 0 14px 34px rgba(15, 43, 70, 0.11);
  --focus: #1aa3a0;

  --low: #11805a;      --low-bg: #e3f6ed;
  --moderate: #966100; --moderate-bg: #fff2d4;
  --high: #c24c15;     --high-bg: #ffe8da;
  --critical: #c41f3c; --critical-bg: #fde4e9;
  --neutral: #6b7685;  --neutral-bg: #edf1f5;

  --sea: #e2ecf5;
  --map-land: #f4f6f9;
  --map-land-focus: #dbe8f3;
  --map-border: #d2dbe5;
  --map-border-focus: #14406a;
  --map-border-tracked: #ffffff;
  --map-low: #a8e2c7;
  --map-moderate: #ffd98a;
  --map-high: #ffb68a;
  --map-critical: #f497a9;
  --route: #1aa3a0;
  --route-soft: #a5dcda;
  --globe-sea: #edf3f9;
  --globe-sea-edge: #c2d3e4;
  --globe-glow: rgba(26, 163, 160, 0.12);
  --globe-grid: rgba(15, 43, 70, 0.08);

  --sc-vin: #b42a64; --sc-agro: #2f8f3a; --sc-agroalim: #d07a00;
  --sc-industrie: #3561d1; --sc-mines: #c99300; --sc-sante: #0a97a0;

  --font-display: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-num: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 18px;
  --radius-sm: 12px;
  /* Mise en page : une colonne de cartes sur mobile, deux colonnes (classement | carte) dès 960 px. */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a131e; --surface: #112033; --surface-2: #172a40; --border: #20354e; --border-strong: #2e4867;
    --text: #edf2f7; --text-2: #a7b5c6; --accent: #5ec8c5; --accent-hover: #80d8d5; --accent-soft: #11323a; --accent-2: #5ec8c5;
    --on-accent: #06191d; --hero-a: #0e2a30; --hero-b: #11233a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 20px rgba(0, 0, 0, 0.25);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.4), 0 14px 34px rgba(0, 0, 0, 0.35);
    --focus: #80d8d5;
    --low: #5fd5a2; --low-bg: #15302a; --moderate: #ffc95e; --moderate-bg: #33290f;
    --high: #ff9b68; --high-bg: #3a2116; --critical: #ff8299; --critical-bg: #3d1a25;
    --neutral: #9aa8b8; --neutral-bg: #1a2b40;
    --sea: #0b1828; --map-land: #1a2b41; --map-land-focus: #1d3f4d; --map-border: #29405b; --map-border-focus: #5ec8c5;
    --map-border-tracked: #112033;
    --map-low: #2c7859; --map-moderate: #8b6a1d; --map-high: #9b4e2a; --map-critical: #9c3349;
    --route: #5ec8c5; --route-soft: #1d5560;
    --globe-sea: #0f2238; --globe-sea-edge: #1c3553; --globe-glow: rgba(94, 200, 197, 0.14); --globe-grid: rgba(180, 210, 240, 0.07);
    --sc-vin: #f06d9f; --sc-agro: #6cd277; --sc-agroalim: #ffb247; --sc-industrie: #7ea2ff; --sc-mines: #ffd34d; --sc-sante: #3fd0d6;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a131e; --surface: #112033; --surface-2: #172a40; --border: #20354e; --border-strong: #2e4867;
  --text: #edf2f7; --text-2: #a7b5c6; --accent: #5ec8c5; --accent-hover: #80d8d5; --accent-soft: #11323a; --accent-2: #5ec8c5;
  --on-accent: #06191d; --hero-a: #0e2a30; --hero-b: #11233a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 20px rgba(0, 0, 0, 0.25);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.4), 0 14px 34px rgba(0, 0, 0, 0.35);
  --focus: #80d8d5;
  --low: #5fd5a2; --low-bg: #15302a; --moderate: #ffc95e; --moderate-bg: #33290f;
  --high: #ff9b68; --high-bg: #3a2116; --critical: #ff8299; --critical-bg: #3d1a25;
  --neutral: #9aa8b8; --neutral-bg: #1a2b40;
  --sea: #0b1828; --map-land: #1a2b41; --map-land-focus: #1d3f4d; --map-border: #29405b; --map-border-focus: #5ec8c5;
  --map-border-tracked: #112033;
  --map-low: #2c7859; --map-moderate: #8b6a1d; --map-high: #9b4e2a; --map-critical: #9c3349;
  --route: #5ec8c5; --route-soft: #1d5560;
  --globe-sea: #0f2238; --globe-sea-edge: #1c3553; --globe-glow: rgba(94, 200, 197, 0.14); --globe-grid: rgba(180, 210, 240, 0.07);
  --sc-vin: #f06d9f; --sc-agro: #6cd277; --sc-agroalim: #ffb247; --sc-industrie: #7ea2ff; --sc-mines: #ffd34d; --sc-sante: #3fd0d6;
}

/* ── Base ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg);
  color: var(--text);
  font: 400 15.5px/1.6 var(--font-sans);
  overflow-wrap: anywhere;
}
[x-cloak] { display: none !important; }
[hidden]:not([hidden=until-found i]) { display: none !important; }
img { max-width: 100%; }
p, h1, h2, h3, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.5; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { text-wrap: balance; }
.nx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nx-num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

.nx-app { min-height: 100vh; display: flex; flex-direction: column; }
.nx-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .nx-wrap { padding: 0 28px; } }
.nx-main { flex: 1; padding-top: 22px; padding-bottom: 48px; }
.nx-body { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

.nx-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.nx-h2 { font: 600 1.45rem/1.25 var(--font-display); margin-bottom: 4px; letter-spacing: -0.005em; }
.nx-h3 { font: 600 1.12rem/1.3 var(--font-display); margin-bottom: 2px; }
.nx-hint { color: var(--text-2); font-size: 0.86rem; }
.nx-empty { color: var(--text-2); padding: 12px 0; }
.nx-loading { color: var(--text-2); padding: 40px 0; text-align: center; }
.nx-error {
  border: 1px solid var(--critical);
  background: var(--critical-bg);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.nx-link { color: var(--accent); text-underline-offset: 2px; font-weight: 500; }
.nx-up { color: var(--high); }
.nx-down { color: var(--low); }

/* ── Boutons ───────────────────────────────────────────────────────────── */
.nx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px;
  padding: 7px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.88rem; font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 43, 70, 0.05);
}
.nx-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.nx-btn__icon { font-size: 1rem; line-height: 1; }
.nx-btn--ghost { background: var(--accent-soft); border-color: transparent; color: var(--accent); box-shadow: none; }
.nx-btn--ghost:hover:not(:disabled) { background: var(--accent); color: var(--on-accent); }
.nx-linkbtn {
  background: none; border: 0; padding: 4px 0;
  color: var(--accent); font-weight: 600; font-size: 0.9rem;
  text-align: left;
}
.nx-linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.nx-chip {
  min-height: 38px;
  padding: 6px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.88rem; font-weight: 600;
}
.nx-chip:hover { border-color: var(--accent); }
.nx-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ── En-tête ───────────────────────────────────────────────────────────── */
.nx-masthead {
  position: sticky; top: 0; z-index: 1100;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nx-masthead__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 24px;
  padding-top: 12px; padding-bottom: 12px;
}
.nx-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.nx-brand__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nx-logo { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; color: var(--text); flex: none; }
.nx-logo__mark { width: 40px; height: 40px; flex: none; }
.nx-logo__word { font: 700 1.45rem/1 var(--font-display); letter-spacing: 0.005em; }
.nx-logo:hover .nx-logo__mark { transform: rotate(-6deg); }
.nx-kicker { color: var(--text-2); font-size: 0.84rem; font-weight: 500; }
.nx-brand__title { display: none; }
.nx-brand__sub { color: var(--text); font-weight: 600; }
.nx-dateline { color: var(--text); font-size: 0.84rem; font-weight: 600; }
.nx-datemeta { display: flex; flex-wrap: wrap; gap: 0 12px; color: var(--text-2); font-size: 0.78rem; }
.nx-datemeta span + span::before { content: '·'; margin-right: 12px; color: var(--border-strong); }
@media (max-width: 720px) { .nx-masthead { position: static; } }
@media (max-width: 560px) {
  .nx-brand { gap: 10px; align-items: flex-start; }
  .nx-logo__word { font-size: 1.25rem; }
  .nx-logo__mark { width: 34px; height: 34px; }
  .nx-hero__title { font-size: 1.55rem; }
  .nx-kicker { display: none; }
  .nx-datemeta { flex-direction: column; }
  .nx-datemeta span + span::before { content: none; }
}
.nx-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nx-newbadge {
  border: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent-2) 16%, var(--surface)), var(--accent-soft));
  color: var(--accent);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.84rem; font-weight: 700;
  min-height: 40px;
}
.nx-copymsg { font-size: 0.84rem; color: var(--text-2); }
.nx-copymsg:empty { display: none; }
.nx-copymsg:not(:empty) { padding-bottom: 10px; }
@media (max-width: 560px) {
  .nx-actions .nx-btn span:not(.nx-btn__icon) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nx-actions .nx-btn { width: 40px; height: 40px; padding: 0; }
  .nx-newbadge { order: 5; flex-basis: 100%; text-align: left; }
}

/* ── Couleurs de niveau (badges, pastilles) ───────────────────────────── */
.is-low { --lv: var(--low); --lv-bg: var(--low-bg); }
.is-moderate { --lv: var(--moderate); --lv-bg: var(--moderate-bg); }
.is-high { --lv: var(--high); --lv-bg: var(--high-bg); }
.is-critical { --lv: var(--critical); --lv-bg: var(--critical-bg); }
.is-none { --lv: var(--neutral); --lv-bg: var(--neutral-bg); }

.nx-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--lv, var(--neutral)); flex: none; }
.nx-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--lv-bg);
  color: var(--lv);
  font-weight: 700; font-size: 0.86rem;
  white-space: nowrap;
}
.nx-badge--sm { font-size: 0.76rem; padding: 3px 9px; }

/* ── Sélecteur de secteurs ─────────────────────────────────────────────── */
.nx-sectorbar { display: flex; flex-direction: column; gap: 8px; }
.nx-sectorbar__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .nx-sectorbar__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .nx-sectorbar__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.nx-sector {
  --sc: var(--accent);
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
  min-width: 0;
  padding: 12px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: left;
  box-shadow: var(--shadow);
}
.nx-sector:hover { border-color: color-mix(in srgb, var(--sc) 55%, var(--border)); transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.nx-sector.is-active, .nx-sector[aria-checked="true"] { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 7%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 18%, transparent), var(--shadow); }
.nx-sector__top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nx-sector__icon {
  flex: none; width: 34px; height: 34px; border-radius: 11px;
  background: color-mix(in srgb, var(--sc) 14%, var(--surface));
  display: inline-flex; align-items: center; justify-content: center;
}
.nx-sector__icon::before {
  content: ''; width: 20px; height: 20px; background: var(--sc);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: contain; mask-size: contain;
}
.nx-sector__name { font-weight: 700; font-size: 0.9rem; line-height: 1.25; overflow-wrap: normal; word-break: normal; hyphens: manual; -webkit-hyphens: manual; min-width: 0; }
/* Icône au-dessus du nom sur téléphone et grand écran : le nom a toute la largeur, sans mot coupé */
@media (min-width: 1100px), (max-width: 759px) { .nx-sector__top { flex-direction: column; align-items: flex-start; gap: 8px; } }
@media (max-width: 759px) { .nx-sector { padding: 11px 12px; } .nx-sector__icon { width: 30px; height: 30px; border-radius: 10px; } .nx-sector__icon::before { width: 18px; height: 18px; } }
@media (max-width: 359px) { .nx-sector__name { font-size: 0.82rem; } }
.nx-sector__row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 0.86rem; padding-left: 2px; }
.nx-sector__row .nx-num { font-size: 1.05rem; font-weight: 700; }
.nx-sector__lvl { color: var(--lv); font-weight: 700; font-size: 0.8rem; }
.nx-sector__desc { display: none !important; }

.nx-compare { margin-top: 4px; }
.nx-table tr.is-current { background: var(--accent-soft); }

/* ── L'essentiel du jour ──────────────────────────────────────────────── */
.nx-essentiel {
  position: relative;
  background:
    radial-gradient(90% 120% at 0% 0%, color-mix(in srgb, var(--lv-bg) 85%, transparent) 0%, transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px 22px;
}
@media (min-width: 720px) { .nx-essentiel { padding: 26px 30px 28px; } }
.nx-essentiel__title { font: 700 1.6rem/1.2 var(--font-display); margin-bottom: 14px; }
.nx-essentiel__sub { color: var(--text-2); font-size: 0.88rem; margin: -8px 0 18px; }
.nx-essentiel__grid { display: grid; gap: 22px; }
@media (min-width: 900px) { .nx-essentiel__grid { grid-template-columns: 5fr 6fr; gap: 34px; } }
.nx-scorecol { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.nx-score { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.nx-score__value { font: 700 3.2rem/1 var(--font-display); color: var(--lv, var(--text)); letter-spacing: -0.02em; }
.nx-score__value .nx-num { font-family: var(--font-display); font-weight: 700; }
.nx-score__max { font: 600 1.05rem/1 var(--font-sans); color: var(--text-2); letter-spacing: 0; }
.nx-score .nx-badge { font-size: 0.95rem; padding: 6px 14px; }

.nx-scale { padding-bottom: 20px; position: relative; }
.nx-scale__track { position: relative; display: flex; height: 12px; border-radius: 999px; gap: 3px; }
.nx-scale__zone { height: 100%; }
.nx-scale__zone.is-low { flex: 20; background: var(--map-low); border-radius: 999px 3px 3px 999px; }
.nx-scale__zone.is-moderate { flex: 15; background: var(--map-moderate); border-radius: 3px; }
.nx-scale__zone.is-high { flex: 20; background: var(--map-high); border-radius: 3px; }
.nx-scale__zone.is-critical { flex: 45; background: var(--map-critical); border-radius: 3px 999px 999px 3px; }
.nx-scale__marker {
  position: absolute; top: 50%;
  width: 22px; height: 22px; margin-left: -11px; margin-top: -11px;
  background: var(--surface);
  border: 4px solid var(--text);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.nx-scale__ticks { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; }
.nx-scale__ticks span { position: absolute; transform: translateX(-50%); font: 600 0.72rem/1 var(--font-num); color: var(--text-2); }

.nx-explain { font-size: 1rem; line-height: 1.6; }
.nx-spark { display: flex; flex-direction: column; gap: 6px; max-width: 360px; }
.nx-spark__title { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.nx-spark__title span { font-weight: 500; color: var(--text-2); }
.nx-spark__plot { position: relative; height: 64px; padding-left: 28px; }
.nx-spark__axis { position: absolute; left: 0; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-between; font: 600 10.5px/1 var(--font-num); color: var(--text-2); padding: 2px 0; }
.nx-spark svg { width: 100%; height: 100%; overflow: visible; display: block; }
.nx-spark__grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 4; }
.nx-spark__line { fill: none; stroke: var(--accent); stroke-width: 2.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.nx-spark__dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--surface); }
.nx-spark__area { position: relative; width: 100%; height: 100%; }
.nx-spark__ends { display: flex; justify-content: space-between; padding-left: 28px; font-size: 0.78rem; color: var(--text-2); }
.nx-spark__ends span:last-child { color: var(--text); font-weight: 700; }

.nx-retenir {
  display: flex; flex-direction: column; gap: 14px;
  min-width: 0;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.nx-retenir__title { font: 600 1.1rem/1.3 var(--font-display); }
.nx-retenir__lead { font-weight: 600; font-size: 1.04rem; line-height: 1.55; }
.nx-retenir__alert, .nx-retenir__advice {
  display: flex; flex-direction: column; gap: 3px; font-size: 0.95rem;
  padding: 10px 12px; border-radius: 10px; background: var(--surface-2);
}
.nx-retenir__advice { background: var(--accent-soft); }
.nx-retenir__kind { font-size: 0.76rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.nx-retenir__advice .nx-retenir__kind { color: var(--accent); }
.nx-retenir__alert.is-unfav { background: var(--high-bg); }
.nx-retenir__alert.is-unfav .nx-retenir__kind { color: var(--high); }
.nx-retenir__alert.is-fav { background: var(--low-bg); }
.nx-retenir__alert.is-fav .nx-retenir__kind { color: var(--low); }

/* ── Onglets (contrôle segmenté) ───────────────────────────────────────── */
.nx-tabs {
  display: flex; gap: 4px;
  padding: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
  width: fit-content; max-width: 100%;
}
.nx-tabs::-webkit-scrollbar { display: none; }
.nx-tab {
  flex: none;
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px;
  padding: 7px 18px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text-2);
  font-weight: 600; font-size: 0.92rem;
  white-space: nowrap;
}
.nx-tab:hover { color: var(--text); }
.nx-tab[aria-selected="true"] { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(15, 43, 70, 0.12); }
.nx-tab__count { font-size: 0.74rem; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.nx-tab[aria-selected="true"] .nx-tab__count { background: var(--accent-soft); color: var(--accent); }
.nx-tab__new { font-size: 0.72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
@media (max-width: 560px) {
  .nx-tabs { border-radius: 16px; width: 100%; }
  .nx-tab { padding: 7px 12px; font-size: 0.86rem; }
}

.nx-panel { display: flex; flex-direction: column; gap: 16px; padding-top: 4px; min-width: 0; }
.nx-panel:focus-visible { outline-offset: 6px; }

/* ── Indicateurs ───────────────────────────────────────────────────────── */
.nx-indgrid { display: grid; gap: 14px; }
@media (min-width: 720px) { .nx-indgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .nx-indgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.nx-ind { display: flex; flex-direction: column; gap: 7px; padding: 18px; min-width: 0; }
.nx-ind__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.nx-ind__label { font-size: 0.95rem; font-weight: 700; }
.nx-ind__value { font: 700 1.9rem/1.1 var(--font-display); }
.nx-ind__meta { font-size: 0.8rem; color: var(--text-2); }
.nx-ind__pts { font-size: 0.84rem; color: var(--text-2); }
.nx-ind__pts .nx-num { color: var(--text); font-weight: 700; }
.nx-ind__note { font-size: 0.86rem; color: var(--text-2); }
.nx-trend { font-size: 0.82rem; font-weight: 600; }
.nx-trend.is-unfav { color: var(--high); }
.nx-trend.is-fav { color: var(--low); }
.nx-trend.is-flat { color: var(--text-2); }
.nx-bar { display: block; height: 7px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.nx-bar__fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.nx-why { margin-top: 4px; padding: 11px 13px; background: var(--accent-soft); border-radius: 12px; font-size: 0.9rem; }
.nx-why__title { font-weight: 700; font-size: 0.78rem; color: var(--accent); margin-bottom: 2px; }

/* ── Glossaire en infobulles ───────────────────────────────────────────── */
.nx-terms { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.nx-term { position: relative; display: inline-block; }
.nx-term__btn {
  min-height: 28px;
  padding: 2px 9px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.76rem; font-weight: 600; color: var(--text-2);
}
.nx-term__btn:hover, .nx-term__btn[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent); }
.nx-term__pop {
  position: absolute; right: 0; top: calc(100% + 6px);
  z-index: 50;
  width: min(300px, 78vw);
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lift);
  font-size: 0.86rem; line-height: 1.5; color: var(--text);
  text-align: left;
}

/* ── Carte + dernières alertes ─────────────────────────────────────────── */
.nx-today { display: grid; gap: 14px; }
@media (min-width: 900px) { .nx-today { grid-template-columns: 3fr 2fr; } }
.nx-mapcard, .nx-latest { padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.nx-maphead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.nx-maptools { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.nx-mapbox { position: relative; }
.nx-map { height: 380px; border-radius: var(--radius-sm); background: var(--sea); overflow: hidden; }
@media (max-width: 560px) { .nx-map { height: 320px; } }
.nx-map-status {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 1000;
  padding: 7px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); font-size: 0.82rem; color: var(--text-2);
}
.nx-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.8rem; color: var(--text-2); }
.nx-legend li { display: inline-flex; align-items: center; gap: 6px; }
.nx-legend__route { width: 22px; height: 0; border-top: 2.5px dashed var(--route); }
.nx-legend__choke { width: 9px; height: 9px; transform: rotate(45deg); border: 2px solid var(--route); background: var(--surface); }

/* Interrupteurs */
.nx-switch { display: inline-flex; align-items: center; gap: 9px; min-height: 32px; font-size: 0.86rem; font-weight: 600; cursor: pointer; user-select: none; }
.nx-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.nx-switch__ui { position: relative; flex: none; width: 36px; height: 21px; border-radius: 999px; background: var(--border-strong); transition: background-color 0.15s ease; }
.nx-switch__ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s ease; }
.nx-switch input:checked + .nx-switch__ui { background: var(--accent); }
.nx-switch input:checked + .nx-switch__ui::after { transform: translateX(15px); }
.nx-switch input:focus-visible + .nx-switch__ui { outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 2px; }

.leaflet-container { background: var(--sea); font-family: var(--font-sans); }
.leaflet-bar { border: 0 !important; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lift) !important; }
.leaflet-bar a { width: 34px; height: 34px; line-height: 34px; background: var(--surface); color: var(--text); font-weight: 600; }
.leaflet-bar a + a { border-top: 1px solid var(--border); }
.leaflet-bar a:hover { background: var(--surface-2); }
.leaflet-bar a.leaflet-disabled { color: var(--text-2); opacity: 0.5; cursor: default; }
.leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--text-2); font-size: 10px; padding: 1px 6px; border-radius: 6px; }
.leaflet-control-attribution a { color: var(--text-2); }
.nx-tip {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 6px 10px; font-size: 12.5px; line-height: 1.4;
  box-shadow: var(--shadow-lift);
}
.nx-tip strong { font-weight: 700; }
.nx-tip--wide { max-width: 260px; white-space: normal; }
.nx-tip--wide p { margin-top: 3px; color: var(--text-2); }
.leaflet-tooltip.nx-tip::before { display: none; }

/* Repères : pastilles rondes, nom du pays dessous */
.nx-pin { background: none; border: 0; }
.nx-pin.is-critical { --lv: var(--critical); }
.nx-pin.is-high { --lv: var(--high); }
.nx-pin.is-moderate { --lv: var(--moderate); }
.nx-pin.is-low { --lv: var(--low); }
.nx-pin.is-none { --lv: var(--neutral); }
.nx-pin__dot {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--lv);
  border: 2.5px solid var(--surface);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.nx-pin.is-empty .nx-pin__dot { background: var(--surface); border: 2.5px solid var(--neutral); box-shadow: none; }
.nx-pin__count { font: 700 11.5px/1 var(--font-num); color: #ffffff; }
:root[data-theme="dark"] .nx-pin__count { color: #15111f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nx-pin__count { color: #15111f; } }
.nx-pin.is-selected .nx-pin__dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent); }
.nx-pin__name {
  position: absolute; left: 50%; top: calc(100% + 3px);
  transform: translateX(-50%);
  z-index: -1;
  white-space: nowrap;
  font: 700 12px/1 var(--font-sans); color: var(--text);
  text-shadow: 0 0 3px var(--surface), 0 0 3px var(--surface), 0 0 6px var(--surface);
  pointer-events: none;
}

.nx-pin.pos-left .nx-pin__name { left: auto; right: calc(100% + 5px); top: 50%; transform: translateY(-50%); }
.nx-pin.pos-right .nx-pin__name { left: calc(100% + 5px); top: 50%; transform: translateY(-50%); }
.nx-pin.pos-above .nx-pin__name { top: auto; bottom: calc(100% + 3px); }
.nx-pin__name.is-hidden, .nx-label__txt.is-hidden { visibility: hidden; }

/* Noms des pays (non suivis) : densité selon le zoom */
.nx-label { width: 0 !important; height: 0 !important; background: none; border: 0; }
.nx-label__txt {
  position: absolute; transform: translate(-50%, -50%);
  white-space: nowrap;
  font: 500 10.5px/1 var(--font-sans); color: var(--text-2);
  text-shadow: 0 0 3px var(--map-land), 0 0 3px var(--map-land);
  opacity: 0.9;
}
.nx-label.is-xl .nx-label__txt { font-size: 12px; font-weight: 600; }
.nx-z-1 .nx-label.is-l, .nx-z-1 .nx-label.is-m, .nx-z-1 .nx-label.is-s,
.nx-z-2 .nx-label.is-m, .nx-z-2 .nx-label.is-s,
.nx-z-3 .nx-label.is-s { display: none; }
@media (max-width: 560px) {
  .nx-z-1 .nx-label, .nx-z-2 .nx-label.is-l { display: none; }
  .nx-pin__name { font-size: 10.5px; }
  /* Noms masqués faute de place : invite à zoomer. */
  .nx-names-cut:not(.nx-nolabels)::after {
    content: 'Zoomez pour voir tous les noms';
    position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 800;
    padding: 4px 10px; border-radius: 999px;
    background: var(--surface); color: var(--text-2); box-shadow: var(--shadow);
    font: 600 11px/1.2 var(--font-sans); white-space: nowrap; pointer-events: none;
  }
}

/* Routes maritimes et passages sensibles */
.nx-route.is-animated { animation: nx-dash 1.4s linear infinite; }
@keyframes nx-dash { to { stroke-dashoffset: -13; } }
.nx-choke { background: none; border: 0; display: flex; align-items: center; justify-content: center; }
.nx-choke__mark { width: 10px; height: 10px; transform: rotate(45deg); background: var(--surface); border: 2.5px solid var(--route); border-radius: 2px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); }

/* Globe 3D */
.nx-globe {
  position: relative; height: 520px; border-radius: var(--radius-sm); overflow: hidden;
  background: radial-gradient(70% 70% at 50% 45%, color-mix(in srgb, var(--accent-soft) 70%, transparent), transparent 75%), var(--surface-2);
  touch-action: none;
}
@media (max-width: 560px) { .nx-globe { height: 340px; } }
.nx-globe__canvas { display: block; cursor: grab; }
.nx-globe__canvas:focus-visible { outline-offset: -3px; }
.nx-globe__tip { position: absolute; z-index: 5; pointer-events: none; white-space: nowrap; }
.nx-globe__tip.nx-tip--wide { white-space: normal; width: max-content; max-width: 260px; }
.nx-globe__tip.is-pinned { pointer-events: auto; }
.nx-globe__ctrl { position: absolute; right: 10px; bottom: 10px; z-index: 5; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lift); }
.nx-globe__ctrl button { width: 34px; height: 34px; border: 0; background: var(--surface); color: var(--text); font-size: 1.05rem; font-weight: 600; }
.nx-globe__ctrl button + button { border-top: 1px solid var(--border); }
.nx-globe__ctrl button:hover { background: var(--surface-2); }

/* Fiche d'acheminement (vue pays) */
.nx-route-card { margin-top: 4px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.nx-route-card__title { font-weight: 700; font-size: 0.92rem; }
.nx-route-card__path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 700; font-size: 0.92rem; }
.nx-route-card__path > * + *::before { content: '→'; margin-right: 8px; color: var(--accent); font-weight: 700; }
.nx-route-card__via { color: var(--text-2); font-weight: 600; }
.nx-route-card__nums { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 700 1.05rem/1.3 var(--font-display); }
.nx-route-card__notes { display: flex; flex-direction: column; gap: 4px; font-size: 0.86rem; color: var(--text-2); }
.nx-route-card__notes b { color: var(--text); }

.nx-filterchip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px;
  padding: 8px 12px; border-radius: 12px;
  background: var(--accent-soft); font-size: 0.84rem;
}

/* ── Alertes ───────────────────────────────────────────────────────────── */
.nx-alerts { display: flex; flex-direction: column; gap: 12px; }
.nx-alert { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; }
.nx-alert.is-unfav { --cat: var(--high); --cat-bg: var(--high-bg); }
.nx-alert.is-fav { --cat: var(--low); --cat-bg: var(--low-bg); }
.nx-alert.is-info { --cat: var(--neutral); --cat-bg: var(--neutral-bg); }
.nx-alerts > .nx-card.nx-alert::before { content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: var(--cat, var(--neutral)); }
.nx-alerts--compact { gap: 0; }
.nx-alerts--compact .nx-alert { padding: 11px 0; border-bottom: 1px solid var(--border); }
.nx-alerts--compact .nx-alert:last-child { border-bottom: 0; }
.nx-alert__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 0.79rem; color: var(--text-2); }
.nx-cat { font-weight: 700; color: var(--cat); background: var(--cat-bg, transparent); padding: 1px 8px; border-radius: 999px; }
.nx-impact { font-size: 0.78rem; font-weight: 600; }
.nx-new { font-size: 0.72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }
.nx-alert__title { font: 600 1rem/1.45 var(--font-sans); }
.nx-alerts--compact .nx-alert__title { font-weight: 600; font-size: 0.92rem; }
.nx-alert__summary { font-size: 0.93rem; color: var(--text); }
.nx-alert__plain { font-size: 0.93rem; line-height: 1.45; color: var(--text); margin-top: 2px; }
.nx-alert__plain::before { content: 'En clair : '; font-weight: 600; color: var(--accent); }
.nx-alert__plain + .nx-alert__summary { color: var(--text-2); font-size: 0.88rem; }
.nx-alert__source { font-size: 0.82rem; }

.nx-filters { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.nx-filters__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; }
.nx-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.nx-seg__btn {
  min-height: 36px; padding: 5px 14px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); font-size: 0.86rem; font-weight: 600;
}
.nx-seg__btn:hover { border-color: var(--accent); }
.nx-seg__btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.nx-seg--tight { gap: 0; padding: 4px; background: var(--surface-2); border-radius: 999px; }
.nx-seg--tight .nx-seg__btn { border: 0; background: none; min-height: 32px; padding: 4px 14px; }
.nx-seg--tight .nx-seg__btn[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(15, 43, 70, 0.14); }
.nx-seg__n { font-size: 0.76rem; opacity: 0.8; }
.nx-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; font-weight: 600; color: var(--text-2); min-width: 0; }
.nx-field--grow { flex: 1 1 200px; }
.nx-field select, .nx-field input {
  min-height: 42px; width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--border-strong); border-radius: 12px;
  background: var(--surface); color: var(--text); font-size: 0.92rem; font-weight: 500;
}
.nx-field select:focus, .nx-field input:focus { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--accent) 22%, transparent); outline-offset: 0; }
.nx-check { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; font-size: 0.88rem; font-weight: 500; }
.nx-check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ── Agenda ────────────────────────────────────────────────────────────── */
.nx-agenda { display: flex; flex-direction: column; gap: 12px; }
.nx-agenda__item { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 16px 18px; }
.nx-agenda__when { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.nx-agenda__when > .nx-num { font: 700 0.95rem/1.2 var(--font-display); color: var(--accent); background: var(--accent-soft); padding: 5px 10px; border-radius: 10px; }
.nx-agenda__rel { font-size: 0.76rem; color: var(--text-2); padding-left: 2px; }
.nx-agenda__title { font-weight: 700; }
.nx-agenda__note { font-size: 0.9rem; color: var(--text-2); margin-top: 2px; }

/* ── Simulateur ────────────────────────────────────────────────────────── */
.nx-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.nx-simcompare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.nx-simcard { padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; min-width: 0; }
.nx-simcard.is-changed { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent), var(--shadow); }
.nx-simcard__label { font-size: 0.8rem; color: var(--text-2); font-weight: 600; }
.nx-simcard__value { font: 700 2rem/1.1 var(--font-display); }
@media (max-width: 480px) {
  .nx-simcard { padding: 10px; }
  .nx-simcard__value { font-size: 1.4rem; }
  .nx-simcard .nx-badge { white-space: normal; }
}
.nx-sliders { display: grid; gap: 12px; }
@media (min-width: 720px) { .nx-sliders { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nx-slide { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nx-slide__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.nx-slide__label { font-weight: 700; font-size: 0.92rem; }
.nx-slide__value { font-size: 1rem; font-weight: 600; }
.nx-slide__value.is-changed { color: var(--accent); font-weight: 700; }
.nx-slide__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: 0.8rem; color: var(--text-2); }
.nx-slider { position: relative; height: 30px; display: flex; align-items: center; }
.nx-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 8px; margin: 0;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent) var(--fill, 0%), var(--surface-2) var(--fill, 0%));
}
.nx-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); cursor: pointer; position: relative; z-index: 2; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18); }
.nx-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); cursor: pointer; }
.nx-slider__ref { position: absolute; top: 6px; bottom: 6px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--text-2); pointer-events: none; z-index: 1; }

/* ── Tableaux & méthode ────────────────────────────────────────────────── */
.nx-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow); }
.nx-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.nx-table th, .nx-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.nx-table thead th { font-size: 0.78rem; font-weight: 700; color: var(--text-2); background: var(--surface-2); white-space: nowrap; }
.nx-table tbody th { font-weight: 700; }
.nx-table tr:last-child th, .nx-table tr:last-child td { border-bottom: 0; }
.nx-table .num { text-align: right; white-space: nowrap; }
.nx-method > p { max-width: 70ch; }
.nx-steps { list-style: decimal; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; max-width: 75ch; }
.nx-levels { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; }
.nx-levels li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.nx-glossary { display: grid; gap: 12px; }
@media (min-width: 720px) { .nx-glossary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nx-glossary__item { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.nx-glossary dt { font-weight: 700; margin-bottom: 2px; }
.nx-glossary dd { font-size: 0.9rem; color: var(--text-2); }

/* ── Navigation & vue monde ────────────────────────────────────────────── */
.nx-brand__home { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.nx-error--soft { border-color: var(--moderate); background: var(--moderate-bg); }
.nx-view { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.nx-hero {
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px 22px 20px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--hero-a), var(--hero-b));
  border: 1px solid var(--border);
}
@media (min-width: 720px) { .nx-hero { padding: 28px 30px 24px; } }
.nx-hero__title { font: 700 1.9rem/1.15 var(--font-display); letter-spacing: -0.01em; }
.nx-hero__lede { color: var(--text-2); max-width: 70ch; font-size: 1rem; }
.nx-hero__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.nx-hero .nx-seg__btn { background: color-mix(in srgb, var(--surface) 80%, transparent); border-color: transparent; }
.nx-hero .nx-seg__btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.nx-levelcount { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.84rem; }
.nx-levelcount li { display: inline-flex; align-items: center; gap: 6px; color: var(--lv); font-weight: 700; background: var(--surface); padding: 4px 11px; border-radius: 999px; }
.nx-world { display: flex; flex-direction: column; gap: 14px; }
.nx-world > .nx-mapcard { order: -1; }
.nx-ranking { padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.nx-ranklist { display: grid; gap: 2px; }
.nx-rank + .nx-rank .nx-rank__btn { border-top-color: var(--border); }
.nx-rank__btn {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) 104px 92px; gap: 14px; align-items: center;
  width: 100%; padding: 11px 12px; background: var(--surface); border: 1px solid transparent; text-align: left;
  border-radius: var(--radius-sm);
}
.nx-rank__btn:hover { background: var(--surface-2); border-color: var(--border); }
.nx-rank__pos { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--lv-bg); color: var(--lv); font-size: 0.85rem; font-weight: 700; }
.nx-rank__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nx-rank__name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; font-size: 1rem; }
.nx-rank__meta { font-size: 0.8rem; color: var(--text-2); }
.nx-rank__last { font-size: 0.82rem; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.nx-rank__score { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.nx-rank__spark { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; color: var(--lv); }
.nx-rank__spark svg { display: block; overflow: visible; }
@media (max-width: 560px) {
  .nx-rank__btn { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 10px 8px; }
  .nx-rank__spark { grid-column: 3; grid-row: 1; }
  .nx-rank__spark svg { width: 64px; height: 20px; }
  .nx-rank__score { grid-column: 2 / -1; grid-row: 2; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
  .nx-rank__num { font-size: 1.05rem; }
  .nx-rank__meta { display: none; }
}
.nx-rank__num { font: 700 1.35rem/1.1 var(--font-display); color: var(--lv); }
.nx-rank__trend { font-size: 0.74rem; color: var(--text-2); font-weight: 600; }
.nx-map--world { height: 520px; }
@media (max-width: 560px) { .nx-map--world { height: 340px; } }
.nx-howto { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.nx-howto p { max-width: 80ch; }
.nx-linkbtn--sm { font-size: 0.8rem; padding: 0; }

/* ── Vue pays ──────────────────────────────────────────────────────────── */
.nx-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.nx-field--inline { flex-direction: row; align-items: center; gap: 8px; }
.nx-field--inline select { width: auto; min-width: 170px; }
.nx-countrybody { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.nx-panels { display: contents; }
.nx-ind__detail { font-size: 0.82rem; color: var(--text-2); font-weight: 600; }
.nx-ind.is-missing .nx-ind__value { color: var(--text-2); }
.nx-ind__more { font-size: 0.84rem; color: var(--text-2); }
.nx-ind__more summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.nx-ind__more p { margin-top: 4px; }

/* ── Pied de page ──────────────────────────────────────────────────────── */
.nx-footer { border-top: 1px solid var(--border); padding: 18px 0 26px; font-size: 0.82rem; color: var(--text-2); background: var(--surface); }

/* ── Icônes des secteurs (masques SVG) ─────────────────────────────────── */
.nx-sector[data-sector="vin"] { --sc: var(--sc-vin); }
.nx-sector[data-sector="vin"] .nx-sector__icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%203h8l-.4%205.2a3.6%203.6%200%200%201-7.2%200L8%203z%22/%3E%3Cpath%20d%3D%22M12%2012.4V20M8.5%2020.5h7%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M8%203h8l-.4%205.2a3.6%203.6%200%200%201-7.2%200L8%203z%22/%3E%3Cpath%20d%3D%22M12%2012.4V20M8.5%2020.5h7%22/%3E%3C/svg%3E"); }
.nx-sector[data-sector="agro"] { --sc: var(--sc-agro); }
.nx-sector[data-sector="agro"] .nx-sector__icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2020.5v-8%22/%3E%3Cpath%20d%3D%22M12%2012.5c0-4.2%203-6.5%207.5-6.5%200%204.3-3.1%206.5-7.5%206.5z%22/%3E%3Cpath%20d%3D%22M12%2014.5c0-3.2-2.6-5.5-6.5-5.5%200%203.3%202.7%205.5%206.5%205.5z%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2020.5v-8%22/%3E%3Cpath%20d%3D%22M12%2012.5c0-4.2%203-6.5%207.5-6.5%200%204.3-3.1%206.5-7.5%206.5z%22/%3E%3Cpath%20d%3D%22M12%2014.5c0-3.2-2.6-5.5-6.5-5.5%200%203.3%202.7%205.5%206.5%205.5z%22/%3E%3C/svg%3E"); }
.nx-sector[data-sector="agroalim"] { --sc: var(--sc-agroalim); }
.nx-sector[data-sector="agroalim"] .nx-sector__icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%209.5h16l-1.6%2010h-12.8L4%209.5z%22/%3E%3Cpath%20d%3D%22M8.5%209.5%2012%204.5l3.5%205M9.5%2013.5v2.5M14.5%2013.5v2.5%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%209.5h16l-1.6%2010h-12.8L4%209.5z%22/%3E%3Cpath%20d%3D%22M8.5%209.5%2012%204.5l3.5%205M9.5%2013.5v2.5M14.5%2013.5v2.5%22/%3E%3C/svg%3E"); }
.nx-sector[data-sector="industrie"] { --sc: var(--sc-industrie); }
.nx-sector[data-sector="industrie"] .nx-sector__icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2020.5h18%22/%3E%3Cpath%20d%3D%22M4%2020.5v-9l5%203v-3l5%203V5h4v15.5%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%2020.5h18%22/%3E%3Cpath%20d%3D%22M4%2020.5v-9l5%203v-3l5%203V5h4v15.5%22/%3E%3C/svg%3E"); }
.nx-sector[data-sector="mines"] { --sc: var(--sc-mines); }
.nx-sector[data-sector="mines"] .nx-sector__icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M13.5%203%205.5%2013.5h6L10.5%2021l8-10.5h-6l1-7.5z%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M13.5%203%205.5%2013.5h6L10.5%2021l8-10.5h-6l1-7.5z%22/%3E%3C/svg%3E"); }
.nx-sector[data-sector="sante"] { --sc: var(--sc-sante); }
.nx-sector[data-sector="sante"] .nx-sector__icon::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9.5%204h5v5.5H20v5h-5.5V20h-5v-5.5H4v-5h5.5V4z%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9.5%204h5v5.5H20v5h-5.5V20h-5v-5.5H4v-5h5.5V4z%22/%3E%3C/svg%3E"); }

/* ── Impression (version imprimée masquée à l'écran) ─────────────────── */
.nx-print { display: none; }

/* ── Mouvement ─────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .nx-btn, .nx-chip, .nx-sector, .nx-tab, .nx-seg__btn, .nx-term__btn, .nx-rank__btn, .nx-logo__mark {
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease, box-shadow 0.18s ease, transform 0.18s ease;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ── Note imprimée A4 ──────────────────────────────────────────────────── */
@media print {
  @page { size: A4; margin: 14mm 14mm 12mm; }
  :root, :root[data-theme="dark"] {
    color-scheme: light;
    --bg: #ffffff; --surface: #ffffff; --surface-2: #f4f3f8; --border: #dddbe6; --border-strong: #cfcbdc;
    --text: #1d1b2e; --text-2: #4d4a61; --accent: #14406a; --accent-soft: #e7f0f7; --shadow: none; --shadow-lift: none;
    --low: #11805a; --low-bg: #e3f6ed; --moderate: #966100; --moderate-bg: #fff2d4;
    --high: #c24c15; --high-bg: #ffe8da; --critical: #c41f3c; --critical-bg: #fde4e9;
    --map-low: #a8e2c7; --map-moderate: #ffd98a; --map-high: #ffb68a; --map-critical: #f497a9;
    --hero-a: #ffffff; --hero-b: #ffffff;
  }
  body { font-size: 10pt; line-height: 1.4; background: #fff; padding: 0; }
  .nx-masthead { position: static; backdrop-filter: none; background: #fff; }
  .nx-actions, .nx-copymsg, .nx-sectorbar, .nx-tabs, .nx-panel, .nx-footer, .nx-spark, .nx-loading, .nx-crumbs, .nx-compare, .nx-mapcard, .nx-seg, .nx-howto, .nx-splash { display: none !important; }
  .nx-world { grid-template-columns: 1fr; }
  .nx-hero { padding: 0; border: 0; }
  .nx-rank__btn { padding: 4pt 4pt; }
  .nx-wrap { max-width: none; padding: 0; }
  .nx-masthead__inner { padding: 0 0 6pt; }
  .nx-logo__mark { width: 24pt; height: 24pt; }
  .nx-main { padding: 8pt 0 0; }
  .nx-body { gap: 8pt; }
  .nx-essentiel { box-shadow: none; padding: 8pt 10pt; break-inside: avoid; background: #fff; }
  .nx-essentiel__title { font-size: 13pt; margin-bottom: 6pt; }
  .nx-essentiel__grid { grid-template-columns: 5fr 6fr; gap: 12pt; }
  .nx-score__value { font-size: 22pt; }
  .nx-explain, .nx-retenir__alert, .nx-retenir__advice { font-size: 9.5pt; }
  .nx-retenir { padding: 6pt 8pt; gap: 5pt; box-shadow: none; }
  .nx-retenir__lead { font-size: 10pt; }
  .nx-print { display: block; }
  .nx-print .nx-h3 { font-size: 11pt; margin: 6pt 0 3pt; }
  .nx-print__ind, .nx-print__alert { padding: 3pt 0; border-bottom: 1px solid #e6e4ee; break-inside: avoid; font-size: 9pt; }
  .nx-print__why { color: #4d4a61; }
  .nx-print__foot { margin-top: 6pt; font-size: 8pt; color: #4d4a61; }
  a { color: inherit; text-decoration: none; }
}

/* ── Alertes (fenêtre « Recevoir les alertes ») ─────────────────────────── */
.nx-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.nx-btn--primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.nx-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.nx-btn--on .nx-btn__icon { color: var(--accent); }
.nx-dialog {
  width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  padding: 0; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lift);
}
.nx-dialog::backdrop { background: rgba(20, 16, 40, 0.45); backdrop-filter: blur(2px); }
.nx-dialog__body { display: flex; flex-direction: column; gap: 16px; padding: 22px 24px 20px; }
.nx-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nx-dialog__title { font: 600 1.35rem/1.2 var(--font-display); }
.nx-dialog__close { width: 36px; height: 36px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 0.95rem; }
.nx-dialog__close:hover { color: var(--accent); }
.nx-dialog__lead { color: var(--text-2); }
.nx-dialog__note { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--moderate-bg); font-size: 0.9rem; }
.nx-dialog__group { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.nx-dialog__group legend { font-weight: 700; font-size: 0.92rem; padding: 0; margin-bottom: 8px; }
.nx-dialog__links { font-weight: 500; color: var(--text-2); margin-left: 6px; }
.nx-dialog__links button { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; }
.nx-dialog__links button:hover { text-decoration: underline; }
.nx-dialog__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nx-dialog__chips .nx-chip { min-height: 34px; padding: 5px 13px; font-size: 0.85rem; }
.nx-dialog__check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.nx-dialog__check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.nx-dialog__check span { display: flex; flex-direction: column; }
.nx-dialog__check small { color: var(--text-2); font-size: 0.82rem; }
.nx-dialog__msg { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); font-size: 0.9rem; }
.nx-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.nx-dialog__fine { color: var(--text-2); font-size: 0.78rem; }
@media (max-width: 560px) {
  .nx-dialog__body { padding: 18px 16px 16px; }
  .nx-dialog__actions .nx-btn { flex: 1 1 100%; }
}
@media print { .nx-dialog { display: none !important; } }

/* ── Fiches indicateurs allégées ─────────────────────────────────────────── */
.nx-ind__value.is-text { font-size: 1.15rem; line-height: 1.25; }
.nx-ind__foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.nx-ind__more summary { list-style: none; }
.nx-ind__more summary::-webkit-details-marker { display: none; }
.nx-ind__more summary::before { content: '+ '; }
.nx-ind__more[open] summary::before { content: '− '; }
.nx-ind__more[open] { padding: 10px 12px; margin-top: 2px; border-radius: 12px; background: var(--accent-soft); color: var(--text); }
.nx-why__lead { font-size: 0.88rem; }
.nx-ind__term { font-size: 0.82rem; color: var(--text-2); }
@media print { .nx-ind__more { display: block; } .nx-ind__more summary { display: none; } }

/* Onglets sur téléphone : sur deux lignes plutôt que coupés au bord de l'écran. */
@media (max-width: 560px) {
  .nx-tabs { flex-wrap: wrap; justify-content: center; border-radius: 22px; width: 100%; overflow: visible; }
  .nx-tab { padding: 7px 13px; }
}

/* Carte d'un pays : noms des pays voisins visibles quel que soit le zoom
   (les noms qui touchent un repère sont masqués automatiquement). */
.nx-map--country:not(.nx-nolabels) .nx-label { display: block !important; }
.nx-map--country .nx-label.is-s { display: none !important; }

/* ── « Ce qui a changé » (fiche pays) ──────────────────────────────────── */
.nx-changes { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.nx-changes__title { font: 600 1.05rem/1.3 var(--font-display); margin-bottom: 10px; }
.nx-changes__title span { font: 500 0.9rem var(--font-sans); color: var(--text-2); }
.nx-changes__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.nx-chg { padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.nx-chg__kind { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); }
.nx-chg__main { font-weight: 700; }
.nx-chg__main.is-up { color: var(--high); }
.nx-chg__main.is-down { color: var(--low); }
.nx-chg__sub, .nx-chg__none { font-size: 0.84rem; color: var(--text-2); }
.nx-chg__line { font-size: 0.86rem; line-height: 1.35; }
.nx-chg__line.is-unfav::before { content: '▲ '; color: var(--high); }
.nx-chg__line.is-fav::before { content: '▼ '; color: var(--low); }
.nx-chg__line.is-info::before { content: '• '; color: var(--text-2); }
.nx-chg__more { align-self: flex-start; font-size: 0.82rem; }
@media (max-width: 980px) { .nx-changes__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .nx-changes__grid { grid-template-columns: 1fr; } }

/* ── Mon entreprise (sélection gardée dans le navigateur) ─────────────── */
.nx-mine { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 2px 0 4px; font-size: 0.9rem; font-weight: 600; color: var(--text); }
.nx-mine__icon { color: var(--accent); }
.nx-mine--invite { font-weight: 500; color: var(--text-2); }
.nx-seg__btn--mine { font-weight: 700; }
.nx-sectorbar__more { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; font-size: 0.84rem; color: var(--text-2); }
.nx-dialog__name input { font: inherit; font-weight: 500; color: var(--text); }
.nx-dialog__hint { font-size: 0.84rem; color: var(--text-2); margin-top: -6px; }
.nx-ico { width: 1.05em; height: 1.05em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.15em; }
.nx-btn__icon .nx-ico { display: block; width: 18px; height: 18px; }
.nx-mine__icon { display: inline-flex; }
.nx-seg__btn--mine { display: inline-flex; align-items: center; gap: 6px; }

/* ── Pages légales (mentions-legales.html, confidentialite.html) ───────── */
.nx-legal { max-width: 780px; padding-top: 28px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 22px; }
.nx-legal__title { font: 700 2rem/1.15 var(--font-display); letter-spacing: -0.01em; }
.nx-legal__date { margin-top: -14px; color: var(--text-2); font-size: 0.88rem; }
.nx-legal__lead { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--accent-soft); font-weight: 500; }
.nx-legal section { display: flex; flex-direction: column; gap: 8px; }
.nx-legal p, .nx-legal li { line-height: 1.6; }
.nx-legal__list { display: flex; flex-direction: column; gap: 6px; padding-left: 1.3em; list-style: disc; }
.nx-legal__list li { display: list-item; }
.nx-legal__todo { font-style: italic; color: var(--text-2); }
.nx-legal__home { text-decoration: none; color: inherit; display: inline-flex; align-items: center; gap: 10px; }
.nx-masthead__inner:has(.nx-legal__home) { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
a.nx-btn { text-decoration: none; }
.nx-footer__links { margin-top: 6px; }
@media (max-width: 560px) { .nx-legal__title { font-size: 1.6rem; } }

/* Logo bleu nuit : léger contour en mode sombre pour qu'il se détache de l'en-tête */
:root[data-theme="dark"] .nx-logo__mark { border-radius: 30%; box-shadow: 0 0 0 1px #2e4867; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nx-logo__mark { border-radius: 30%; box-shadow: 0 0 0 1px #2e4867; } }

/* ── Que faire : exposition en euros et pistes d'action ─────────────────── */
.nx-retenir__act { justify-self: start; margin-top: 2px; font-weight: 700; }
.nx-expo, .nx-todo { display: flex; flex-direction: column; gap: 14px; padding: 22px; min-width: 0; }
.nx-expo__lead { color: var(--text-2); margin-top: -6px; }
.nx-expo__form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 16px; align-items: end; }
.nx-expo__money { position: relative; display: block; }
.nx-expo__money input { width: 100%; padding-right: 30px; font: 600 1rem var(--font-num); color: var(--text); }
.nx-expo__money span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-2); font-weight: 600; }
.nx-expo__ccy { gap: 4px; }
.nx-expo__ccy .nx-seg__btn { flex: 1 1 auto; justify-content: center; }
.nx-expo__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.nx-expo__box { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); }
.nx-expo__kind { font-size: 0.8rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.nx-expo__amount { font: 700 1.7rem/1.1 var(--font-display); color: var(--text); }
.nx-expo__amount.is-bad { color: var(--high); }
.nx-expo__note { font-size: 0.88rem; line-height: 1.5; color: var(--text-2); }
.nx-expo__note--warn { color: var(--text); font-weight: 500; }
.nx-expo__fine { font-size: 0.8rem; color: var(--text-2); }
.nx-todo__lvl { font: 600 1rem var(--font-sans); color: var(--text-2); }
.nx-todo.is-low .nx-todo__lvl { color: var(--low); }
.nx-todo.is-moderate .nx-todo__lvl { color: var(--moderate); }
.nx-todo.is-high .nx-todo__lvl { color: var(--high); }
.nx-todo.is-critical .nx-todo__lvl { color: var(--critical); }
.nx-todo__sub { font: 700 0.95rem var(--font-sans); margin: 4px 0 8px; }
.nx-todo__list { display: flex; flex-direction: column; gap: 8px; list-style: none; padding: 0; margin: 0; }
.nx-todo__item { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: baseline; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); line-height: 1.5; }
.nx-todo__item.is-signal { background: var(--high-bg); }
.nx-todo__tag { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); }
.nx-todo__item.is-signal .nx-todo__tag { color: var(--high); }
.nx-todo__help { font-size: 0.9rem; }
@media (max-width: 560px) {
  .nx-expo, .nx-todo { padding: 16px; }
  .nx-todo__lvl { display: block; margin-top: 4px; font-size: 0.95rem; }
  .nx-todo__item { grid-template-columns: 1fr; gap: 2px; }
  .nx-expo__amount { font-size: 1.5rem; }
}

/* ── Où vendre ? (vue monde) et accès au marché (vue pays) ──────────────── */
.nx-where { display: flex; flex-direction: column; gap: 16px; padding: 22px; min-width: 0; }
.nx-where__head { display: flex; flex-direction: column; gap: 6px; }
.nx-where__sub { font: 600 1rem var(--font-sans); color: var(--text-2); }
.nx-where__lead { color: var(--text-2); max-width: 70ch; }
.nx-where__body { display: grid; gap: 18px; }
.nx-where__chart { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nx-where__chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.nx-where__zone { fill: var(--low-bg); opacity: 0.7; }
.nx-where__grid { stroke: var(--border); stroke-width: 1; }
.nx-where__split { stroke: var(--border-strong); stroke-width: 1.2; stroke-dasharray: 4 4; }
.nx-where__tick { font: 500 11px var(--font-num); fill: var(--text-2); }
.nx-where__axis { font: 600 11px var(--font-sans); fill: var(--text-2); }
.nx-where__pt { cursor: pointer; outline: none; }
.nx-where__pt circle { stroke: var(--surface); stroke-width: 2; fill: var(--neutral); transition: r 0.15s; }
.nx-where__pt.is-good circle { fill: var(--low); }
.nx-where__pt.is-risky circle { fill: var(--high); }
.nx-where__pt.is-narrow circle { fill: var(--neutral); }
.nx-where__pt text { font: 600 12px var(--font-sans); fill: var(--text); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.nx-where__pt:hover circle, .nx-where__pt:focus-visible circle { r: 9; }
.nx-where__pt:focus-visible text { text-decoration: underline; }
.nx-where__fine { font-size: 0.8rem; color: var(--text-2); }
.nx-where__groups { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.nx-where__group { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border-left: 4px solid var(--neutral); }
.nx-where__group.is-good { border-left-color: var(--low); }
.nx-where__group.is-risky { border-left-color: var(--high); }
.nx-where__gtitle { font: 700 0.98rem var(--font-sans); }
.nx-where__ghint { font-size: 0.82rem; color: var(--text-2); margin-top: -4px; }
.nx-where__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nx-where__row { width: 100%; display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 7px 6px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.nx-where__row:hover { background: var(--surface); }
.nx-where__row:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.nx-where__name { display: flex; flex-direction: column; font-weight: 600; min-width: 0; }
.nx-where__why { font-size: 0.78rem; font-weight: 500; color: var(--text-2); }
.nx-where__fig { display: flex; flex-direction: column; align-items: flex-end; font-weight: 600; }
.nx-where__fr { font-size: 0.75rem; font-weight: 500; color: var(--text-2); white-space: nowrap; }

.nx-access { display: flex; flex-direction: column; gap: 12px; padding: 22px; min-width: 0; }
.nx-access__status { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.nx-access__pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; background: var(--neutral-bg); color: var(--neutral); }
.nx-access.is-open .nx-access__pill { background: var(--low-bg); color: var(--low); }
.nx-access.is-taxed .nx-access__pill, .nx-access.is-restricted .nx-access__pill { background: var(--high-bg); color: var(--high); }
.nx-access.is-closed .nx-access__pill { background: var(--critical-bg); color: var(--critical); }
.nx-access__note { color: var(--text-2); font-size: 0.92rem; }
.nx-access__facts { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.nx-access__facts > div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); line-height: 1.5; }
.nx-access__facts dt { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); padding-top: 2px; }
.nx-access__facts dd { margin: 0; }
.nx-access__src { font-size: 0.85rem; line-height: 1.6; }
@media (max-width: 560px) {
  .nx-where, .nx-access { padding: 16px; }
  .nx-access__facts > div { grid-template-columns: 1fr; gap: 2px; }
  .nx-access__facts dt:empty { display: none; }
  .nx-where__row { grid-template-columns: 1fr auto; grid-template-areas: "name badge" "fig fig"; row-gap: 2px; }
  .nx-where__name { grid-area: name; }
  .nx-where__row > .nx-badge { grid-area: badge; }
  .nx-where__fig { grid-area: fig; flex-direction: row; align-items: baseline; gap: 8px; }
}
.nx-where__svg svg { width: 100%; height: auto; display: block; overflow: visible; }
.nx-where__axis--good { fill: var(--low); }
.nx-where__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 0; padding: 0; font-size: 0.82rem; color: var(--text-2); }
.nx-where__legend li { display: inline-flex; align-items: center; gap: 6px; }
.nx-where__legend li::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--neutral); }
.nx-where__legend .is-good::before { background: var(--low); }
.nx-where__legend .is-risky::before { background: var(--high); }
@media (min-width: 1000px) { .nx-where__groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; } }

/* ── Compte (connexion par lien e-mail) ─────────────────────────────────── */
.nx-dialog--narrow { width: min(480px, calc(100vw - 24px)); }
.nx-account__form, .nx-account__sent, .nx-account__in { display: flex; flex-direction: column; gap: 14px; }
.nx-account__form .nx-field input { width: 100%; font-size: 1rem; }
.nx-dialog__ok { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--low-bg); color: var(--text); font-size: 0.9rem; font-weight: 500; }
.nx-account__danger { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 10px; border-top: 1px solid var(--border); }
.nx-account__del { color: var(--critical); }
.nx-account__dev { font-size: 0.85rem; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--moderate-bg); }
.nx-dialog__fine .nx-linkbtn { font-size: inherit; padding: 0; vertical-align: baseline; }

/* ── Accroche de la page d'accueil (visiteurs sans sélection) ───────────── */
.nx-intro {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 24px 22px 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--accent-2);
  box-shadow: var(--shadow);
}
@media (min-width: 720px) { .nx-intro { padding: 30px 32px 26px; } }
.nx-intro__close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text-2); font-size: 0.95rem; cursor: pointer; }
.nx-intro__close:hover { color: var(--text); }
.nx-intro__close:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.nx-intro__eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-2); padding-right: 40px; }
.nx-intro__title { font: 700 clamp(1.45rem, 3.2vw, 2.1rem)/1.2 var(--font-display); letter-spacing: -0.01em; max-width: 30ch; }
.nx-intro__points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px 22px; }
@media (min-width: 900px) { .nx-intro__points { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.nx-intro__points li { position: relative; padding-left: 22px; color: var(--text-2); line-height: 1.5; }
.nx-intro__points li::before { content: ''; position: absolute; left: 2px; top: 0.55em; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-2); }
.nx-intro__points b { color: var(--text); }
.nx-intro__example { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); line-height: 1.55; max-width: 92ch; }
.nx-intro__tag { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.nx-intro__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 560px) { .nx-intro__actions .nx-btn { flex: 1 1 100%; justify-content: center; } }
.nx-legal__list--num { list-style: decimal; }
.nx-methodpage .nx-levels { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 4px 0 0; }
.nx-methodpage .nx-table th[scope="row"] { white-space: nowrap; }
@media (max-width: 560px) { .nx-methodpage .nx-table th[scope="row"] { white-space: normal; } }
.nx-methodpage .nx-table th, .nx-methodpage .nx-table td { word-break: normal; overflow-wrap: normal; hyphens: none; }
@media (max-width: 600px) {
  .nx-table--stack thead { display: none; }
  .nx-table--stack, .nx-table--stack tbody { display: block; }
  .nx-table--stack tr { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 14px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .nx-table--stack tr:last-child { border-bottom: 0; }
  .nx-table--stack th, .nx-table--stack td { display: block; padding: 0; border: 0; background: none; }
  .nx-table--stack td.num::before { content: attr(data-l); color: var(--text-2); font-weight: 500; }
  .nx-table--stack td:last-child { grid-column: 1 / -1; color: var(--text-2); }
  .nx-methodpage .nx-table th[scope="row"] { white-space: normal; }
}
.nx-intro__more { font-size: 0.92rem; color: var(--text-2); }
.nx-intro__more .nx-linkbtn { font-size: inherit; }
.nx-alert__summary.is-clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.nx-alert__more { align-self: flex-start; }
@media print { .nx-alert__summary.is-clamped { display: block; -webkit-line-clamp: unset; } .nx-alert__more { display: none; } }
.nx-why-card { padding: 18px 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent-2); }
.nx-why-card p { font-size: 1.02rem; }
.nx-why-card__sign { font-size: 0.9rem !important; color: var(--text-2); }
.nx-intro__by { font-size: 0.85rem; color: var(--text-2); }
.nx-why-card__head { display: flex; align-items: center; gap: 16px; }
.nx-why-card__photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--accent-2); flex: none; }
.nx-intro__by { display: flex; align-items: center; gap: 8px; }
.nx-intro__avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
#pourquoi { scroll-margin-top: 90px; }

/* ── Fenêtres d'information des routes (ports, départs, détroits) ───────── */
.nx-popup .leaflet-popup-content-wrapper { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lift); }
.nx-popup .leaflet-popup-content { margin: 12px 30px 12px 14px; font: 13px/1.45 var(--font-sans, inherit); }
.nx-popup .leaflet-popup-content strong { display: block; font-weight: 700; margin-bottom: 3px; }
.nx-popup .leaflet-popup-content p { margin: 2px 0 0; color: var(--text-2); }
.nx-popup .leaflet-popup-tip { background: var(--surface); border: 1px solid var(--border); box-shadow: none; }
.nx-popup .leaflet-popup-content-wrapper, .nx-popup .leaflet-popup-tip { color: var(--text); }
.leaflet-container .nx-popup a.leaflet-popup-close-button { color: var(--text-2); width: 28px; height: 28px; font: 18px/28px sans-serif; top: 4px; right: 4px; }
.nx-popup__btn { margin-top: 8px; padding: 6px 10px; border: 0; border-radius: 8px; background: var(--accent); color: var(--on-accent); font: 600 12.5px var(--font-sans, inherit); cursor: pointer; }
.nx-popup__btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.nx-routehit { cursor: pointer; }
.nx-tip--wide strong { display: block; }
.nx-routehit:focus { outline: none; }
.nx-routehit:focus-visible { outline: none; stroke: var(--focus); stroke-width: 3px; stroke-opacity: 1; }
.nx-stale { color: var(--high); font-weight: 600; }
.nx-stale::before { content: "⚠ "; }

/* ── En-tête : alertes en avant, menu « Plus » ─────────────────────────── */
.nx-btn--alerts { font-weight: 700; }
.nx-more { position: relative; }
.nx-more__menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 1200; min-width: 210px;
  display: flex; flex-direction: column; padding: 6px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.nx-more__menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; color: var(--text); font: inherit; font-size: 0.9rem; text-align: left; border-radius: 8px; cursor: pointer; }
.nx-more__menu button:hover, .nx-more__menu button:focus-visible { background: var(--surface-2); }
.nx-more__menu button > span:first-child { width: 18px; text-align: center; color: var(--text-2); }
.nx-dateline__short, .nx-stale--short { display: none; }
@media (max-width: 560px) {
  .nx-actions .nx-btn--alerts { width: auto; padding: 0 14px; flex: 1 1 auto; justify-content: center; }
  .nx-actions .nx-btn--alerts span:not(.nx-btn__icon) { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .nx-actions { flex-wrap: nowrap; width: 100%; }
  .nx-dateline__long, .nx-stale--long { display: none; }
  .nx-dateline__short { display: inline; }
  .nx-stale--short:not([style*="display: none"]) { display: block; }
  .nx-masthead__inner { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .nx-brand { align-items: center; }
}

/* ── Accroche : colonne « Ce matin », version courte sur mobile ─────────── */
.nx-intro__main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.nx-intro__short { display: none; color: var(--text-2); line-height: 1.5; }
.nx-intro__today { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); align-self: start; }
.nx-today__sub { font-size: 0.82rem; color: var(--text-2); margin-top: -4px; }
.nx-today__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.nx-today__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-left: 4px solid var(--lv); border-radius: 10px; background: var(--surface); text-align: left; cursor: pointer; }
.nx-today__row:hover { border-color: var(--border-strong); }
.nx-today__name { font-weight: 700; }
.nx-today__delta { font-weight: 700; font-size: 0.9rem; }
.nx-today__delta.is-up { color: var(--critical); }
.nx-today__delta.is-down { color: var(--low); }
.nx-today__row .nx-badge { justify-self: start; }
.nx-today__why { grid-column: 1 / -1; font-size: 0.8rem; font-weight: 600; color: var(--lv); }
.nx-today__calm { font-size: 0.88rem; color: var(--text-2); }
@media (min-width: 1000px) {
  .nx-intro { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
  .nx-intro__points { grid-template-columns: 1fr !important; gap: 6px; }
  .nx-intro__today { margin-top: 30px; }
}
@media (max-width: 999px) { .nx-intro__today { display: none; } }
@media (max-width: 560px) {
  .nx-intro { padding: 20px 18px 18px; gap: 12px; }
  .nx-intro__main { gap: 12px; }
  .nx-intro__eyebrow { font-size: 0.72rem; }
  .nx-intro__title { font-size: 1.35rem; }
  .nx-intro__points, .nx-intro__example, .nx-intro__more, .nx-intro__actions .nx-btn--ghost { display: none !important; }
  .nx-intro__short { display: block; }
  .nx-intro__actions { gap: 8px; }
}

/* ── Cette semaine ─────────────────────────────────────────────────────── */
.nx-week { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.nx-week__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.nx-week__sub { font-size: 0.84rem; color: var(--text-2); }
.nx-week__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 720px) { .nx-week__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .nx-week__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.nx-week__item { display: flex; flex-direction: column; gap: 8px; width: 100%; height: 100%; padding: 14px; border: 1px solid var(--border); border-top: 4px solid var(--lv); border-radius: var(--radius-sm); background: var(--surface); text-align: left; cursor: pointer; }
.nx-week__item:hover { background: var(--surface-2); }
.nx-week__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.nx-week__name { font: 700 1.08rem/1.2 var(--font-display); }
.nx-week__delta { font-weight: 700; font-size: 0.9rem; white-space: nowrap; }
.nx-week__item.is-worse .nx-week__delta { color: var(--critical); }
.nx-week__item.is-better .nx-week__delta { color: var(--low); }
.nx-week__levels { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.nx-week__levels > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.nx-week__arrow { color: var(--text-2); font-weight: 700; }
.nx-week__same { font-size: 0.78rem; color: var(--text-2); }
.nx-week__score { font-size: 0.8rem; color: var(--text-2); }
.nx-week__why { font-size: 0.84rem; color: var(--text-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nx-week__more { align-self: flex-start; }

/* ── Faits marquants : force de l'effet ────────────────────────────────── */
.nx-strength { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--text-2); }
.nx-strength__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.nx-strength__bars i { width: 3px; border-radius: 1px; background: var(--border-strong); }
.nx-strength__bars i:nth-child(1) { height: 5px; }
.nx-strength__bars i:nth-child(2) { height: 8px; }
.nx-strength__bars i:nth-child(3) { height: 11px; }
.nx-alert.is-unfav .nx-strength.is-s1 i:nth-child(-n+1), .nx-alert.is-unfav .nx-strength.is-s2 i:nth-child(-n+2), .nx-alert.is-unfav .nx-strength.is-s3 i { background: var(--cat); }
.nx-alert.is-fav .nx-strength.is-s1 i:nth-child(-n+1), .nx-alert.is-fav .nx-strength.is-s2 i:nth-child(-n+2), .nx-alert.is-fav .nx-strength.is-s3 i { background: var(--cat); }
.nx-alert.is-unfav .nx-strength.is-s3 { color: var(--cat); }
.nx-feedfoot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
@media print { .nx-week, .nx-intro__today, .nx-rank__spark, .nx-more, .nx-feedfoot { display: none !important; } }
.nx-only-narrow { display: none; }
@media (max-width: 560px) {
  .nx-only-wide { display: none; }
  .nx-only-narrow { display: inline; }
  .nx-rank__last { display: none; }
  .nx-week__why { -webkit-line-clamp: 2; }
  .nx-week__item { padding: 12px; gap: 6px; }
}
.nx-week__head2 { font-weight: 700; font-size: 0.92rem; line-height: 1.35; }
.nx-week__todo { font-size: 0.84rem; line-height: 1.45; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); color: var(--text); }
.nx-week__todo b { color: var(--lv); }
.nx-week__why { -webkit-line-clamp: 2; color: var(--text); }
.nx-today__why { color: var(--text-2); font-weight: 500; }
.nx-rank__btn { padding-top: 7px; padding-bottom: 7px; }
.nx-rank__main { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }

/* ── Fiche d'un port ou d'un détroit (panneau en bas de la carte) ───────── */
.nx-mapinfo {
  position: absolute; left: 12px; bottom: 12px; z-index: 1001; width: min(340px, calc(100% - 24px));
  padding: 12px 38px 12px 14px; border-radius: 12px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--shadow-lift); font: 13px/1.45 var(--font-sans, inherit); cursor: auto;
}
.nx-mapinfo[hidden] { display: none; }
.nx-mapinfo strong { display: block; font-weight: 700; margin-bottom: 3px; font-size: 13.5px; }
.nx-mapinfo p { margin: 2px 0 0; color: var(--text-2); }
.nx-mapinfo__close { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text-2); font-size: 13px; cursor: pointer; }
.nx-mapinfo__close:hover { color: var(--text); }
.nx-pickring { stroke: var(--accent); filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.35)); }
@media (max-width: 560px) {
  .nx-mapinfo { left: 8px; right: 8px; bottom: 8px; width: auto; }
}
