/* ============================================================
   Nexalys — Mon parcours (design v3)
   Scoped sous .nxp-root · lisible de 320 à 500 px, sans scroll horizontal.
   Briques communes (.nxk-* : cartes, carte forte, boutons) : lib/coach-kit.ts
   Tokens : theme.css
   ============================================================ */

.nxp-root {
  /* Amplitude du zigzag : réduite sur les volets très étroits. */
  --nxp-amp: 1;
  --nxp-trail: var(--nx-green-500);
  --nxp-dots: #a3b6aa;

  display: block;
  min-height: 100%;
  background: transparent;
  color: var(--nx-text-strong);
  font-family: var(--font-ui, "Geist", system-ui, -apple-system, "Segoe UI", sans-serif);
}

@media (max-width: 309px) {
  .nxp-root { --nxp-amp: .72; }
}

/* ───────── En-tête ───────── */

.nxp-head { display: flex; flex-direction: column; gap: 6px; }

.nxp-goal {
  display: flex; align-items: center; gap: 7px;
  margin: 0;
  font-size: 13px; color: var(--nx-text-soft);
}
.nxp-goal svg { flex: 0 0 auto; color: var(--nx-green-800); }
.nxp-goal b { font-weight: 700; color: var(--nx-ink); }

/* ───────── ② Mini-carte : une case par compétence ───────── */

.nxp-ov { padding: 14px 14px 10px; }

.nxp-ov-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.nxp-ov-count { font-size: 12.5px; color: var(--nx-text-soft); white-space: nowrap; }
.nxp-ov-count b { font-weight: 750; color: var(--nx-ink); }

.nxp-ov-strip { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; }

.nxp-ov-group {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-height: 44px; padding: 5px 0 0;
  border: 0; border-radius: 8px; background: transparent;
  cursor: pointer;
}
.nxp-ov-group:hover .nxp-ov-num { color: var(--nx-ink); }

.nxp-ov-cells { display: flex; justify-content: center; gap: 3px; width: 100%; }

.nxp-ov-cell {
  flex: 1 1 0; min-width: 4px; max-width: 15px; height: 20px;
  border-radius: 4px; box-sizing: border-box;
}
.nxp-ov-cell--done {
  position: relative;
  background: var(--nx-green-600);
}
/* Une compétence maîtrisée garde le vert, mais affiche aussi une vraie coche.
   Le tracé CSS reste lisible même quand une étape contient beaucoup de petites cases. */
.nxp-ov-cell--done::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 3.5px; height: 7px;
  border-right: 1.6px solid #fff;
  border-bottom: 1.6px solid #fff;
  transform: translate(-50%, -58%) rotate(45deg);
  pointer-events: none;
}

/* « Tu es ici » doit se distinguer visuellement de « maîtrisée » :
   le bleu/navy Nexalys remplace donc le vert dans la mini-carte. */
.nxp-ov-cell--current {
  position: relative;
  background: var(--nx-navy-700);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--nx-navy-900);
}
/* L’onde ne s’applique qu’à la vraie mini-carte, pas au carré de la légende.
   Elle est volontairement un peu plus ample que précédemment. */
.nxp-ov-cells .nxp-ov-cell--current {
  z-index: 1;
}
.nxp-ov-cells .nxp-ov-cell--current::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 2px solid var(--nx-navy-600);
  border-radius: 8px;
  pointer-events: none;
  animation: nxp-ov-pulse 2.4s ease-in-out infinite;
}
@keyframes nxp-ov-pulse {
  0%, 100% { transform: scale(1); opacity: .78; }
  50%      { transform: scale(1.22); opacity: 0; }
}
.nxp-ov-cell--ahead   { background: var(--nx-green-200); border: 1px solid #9fd0b1; }
.nxp-ov-cell--todo    { background: #fff; border: 1px solid #c3d0c8; }
.nxp-ov-cell--control {
  flex: 0 0 13px; max-width: 13px; height: 13px; margin: 3.5px 1px;
  border-radius: 3px; background: #fff; border: 1.5px solid #8ea0b9;
  transform: rotate(45deg);
}

.nxp-ov-num { font-size: 11px; font-weight: 600; color: var(--nx-muted); font-variant-numeric: tabular-nums; }
.nxp-ov-group.is-current .nxp-ov-num { font-weight: 800; color: var(--nx-navy-900); }

.nxp-ov-goal {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding-top: 5px;
  color: var(--nx-gold-dark);
  font-size: 11px; font-weight: 650;
}
.nxp-ov-goal span { color: var(--nx-gold-ink); }

.nxp-ov-legend {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--nx-divider);
  font-size: 11.5px; color: var(--nx-text-soft);
}
.nxp-ov-legend span { display: inline-flex; align-items: center; gap: 5px; }
.nxp-ov-legend .nxp-ov-cell { flex: 0 0 9px; width: 9px; height: 12px; border-radius: 2px; }
.nxp-ov-legend .nxp-ov-cell--current { box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px var(--nx-navy-900); }

/* ───────── ③ La feuille ───────── */

.nxp-sheet {
  /* Pleine largeur : la feuille déborde du padding de la page. */
  margin: 0 -14px;
  border-top: 1px solid #d3ddd6;
  border-bottom: 1px solid #d3ddd6;
  background-color: var(--nx-page);
}

/* Quadrillage de cellules Excel (64 × 22 px, comme la grille par défaut). */
.nxp-sheet--grid {
  background-color: #f6f9f7;
  background-image:
    linear-gradient(#e2e9e4 1px, transparent 1px),
    linear-gradient(90deg, #e2e9e4 1px, transparent 1px);
  background-size: 64px 22px;
  background-position: -1px -1px;
}

.nxp-cols {
  display: flex; height: 22px; overflow: hidden;
  background: #e6ede8;
  border-bottom: 1px solid #d3ddd6;
}
.nxp-cols span {
  flex: 0 0 64px;
  display: flex; align-items: center; justify-content: center;
  border-right: 1px solid #d3ddd6;
  font-size: 10.5px; font-weight: 600; color: #6b7785;
}

.nxp-sheet-body { padding: 18px 14px 30px; }

.nxp-start { display: flex; justify-content: center; }
.nxp-start-pill {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 30px; padding: 0 12px;
  border-radius: 999px; background: #fff; border: 1px solid #d3ddd6;
  box-shadow: 0 1px 2px rgba(11, 31, 59, .05);
  font-size: 12px; font-weight: 650; color: var(--nx-text-soft);
}
.nxp-start-pill svg { color: var(--nx-green-800); }

/* Liaisons verticales : trait plein = déjà parcouru, pointillé = à venir. */
.nxp-conn { width: 6px; height: 26px; margin: 0 auto; }
.nxp-conn--short { height: 22px; }
.nxp-conn--done { width: 5px; border-radius: 3px; background: var(--nxp-trail); }
.nxp-conn--todo {
  background-image: radial-gradient(circle, var(--nxp-dots) 2.2px, transparent 2.7px);
  background-size: 6px 9px;
  background-position: center 2px;
}
.nxp-conn--gold {
  height: 30px;
  background-image: radial-gradient(circle, #d9b566 2.2px, transparent 2.7px);
  background-size: 6px 9px;
  background-position: center 2px;
}
.nxp-conn--gold-done { height: 30px; width: 5px; border-radius: 3px; background: var(--nx-gold); }

/* ───────── En-tête d'étape (repliable) ───────── */

.nxp-stage {
  display: flex; align-items: center; gap: 11px;
  width: 100%; min-height: 66px;
  padding: 10px 12px 10px 10px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--nx-line);
  box-shadow: 0 1px 2px rgba(11, 31, 59, .05), 0 6px 16px rgba(11, 31, 59, .05);
  color: inherit; font: inherit; text-align: left;
  cursor: pointer;
  transition: border-color .15s;
}
.nxp-stage:hover { border-color: var(--nx-border-strong); }
.nxp-stage--current { border-color: #9fd0b1; }

.nxp-stage-tile {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 13px;
  background: #eef3f0; color: var(--nx-text-soft);
}
.nxp-stage--done .nxp-stage-tile,
.nxp-stage--mastered .nxp-stage-tile { background: var(--nx-green-100); color: var(--nx-green-800); }
.nxp-stage--current .nxp-stage-tile { background: var(--nx-green-900); color: #fff; }

.nxp-stage-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nxp-stage-k { font-size: 11.5px; font-weight: 650; color: var(--nx-muted); }
.nxp-stage-name { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; color: var(--nx-ink); }
.nxp-stage-sub { font-size: 12px; line-height: 1.35; color: var(--nx-muted); }

.nxp-stage-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.nxp-stage-pill {
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
  background: #eef3f0; color: var(--nx-text-soft);
}
.nxp-stage-pill--done { background: var(--nx-green-100); color: var(--nx-green-800); }
.nxp-stage-pill--current { background: var(--nx-green-200); color: var(--nx-green-900); }

.nxp-stage-chev { display: inline-flex; color: var(--nx-muted); transition: transform .18s; }
.nxp-stage[aria-expanded="true"] .nxp-stage-chev { transform: rotate(180deg); }

/* ───────── Nœuds et chemin ───────── */

.nxp-link {
  display: block;
  width: calc(180px * var(--nxp-amp)); height: auto;
  margin: 0 auto;
  overflow: visible;
}
.nxp-link path {
  fill: none;
  stroke: var(--nxp-dots); stroke-width: 4.4; stroke-linecap: round;
  stroke-dasharray: .1 9;
}
.nxp-link--done path { stroke: var(--nxp-trail); stroke-width: 5; stroke-dasharray: none; }

.nxp-stop {
  display: flex; justify-content: center;
  transform: translateX(calc(var(--dx, 0) * var(--nxp-amp) * 1px));
}

.nxp-node {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 160px; padding: 0;
  border: 0; border-radius: 14px; background: transparent;
  color: inherit; font: inherit;
  cursor: pointer;
}

.nxp-node-wrap {
  position: relative;
  width: 84px; height: 84px;
  display: flex; align-items: center; justify-content: center;
}

.nxp-disc {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: transform .12s;
}
.nxp-node:hover .nxp-disc:not(.nxp-disc--control) { transform: translateY(-2px); }
.nxp-node:active .nxp-disc:not(.nxp-disc--control) { transform: translateY(1px); }

.nxp-disc--done {
  width: 62px; height: 62px;
  background: var(--nx-green-200); color: var(--nx-green-900);
  box-shadow: 0 4px 0 #afd5be;
}
.nxp-disc--todo {
  width: 62px; height: 62px; box-sizing: border-box;
  background: #fff; border: 2px solid #c9d5cd; color: var(--nx-text-soft);
  box-shadow: 0 4px 0 #d8e1db;
  font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums;
}
.nxp-disc--here {
  position: relative;
  width: 72px; height: 72px;
  background: var(--nx-hero); color: #fff;
  box-shadow: 0 5px 0 #083d25, 0 12px 24px rgba(15, 81, 50, .3);
}
.nxp-disc--control {
  width: 54px; height: 54px; box-sizing: border-box;
  border-radius: 15px;
  background: #fff; border: 2px solid #b8c6d9; color: var(--nx-navy-700);
  box-shadow: 0 4px 0 #d3dcea;
  transform: rotate(45deg);
}
.nxp-disc--control > svg { transform: rotate(-45deg); }

/* Pulsation lente du nœud « Tu es ici » : le seul mouvement de la page. */
.nxp-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 3px solid var(--nx-green-500);
  animation: nxp-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes nxp-pulse {
  0%, 100% { transform: scale(1); opacity: .75; }
  50%      { transform: scale(1.16); opacity: 0; }
}

/* Nœud sélectionné (hors « Tu es ici »). */
.nxp-sel {
  position: absolute; inset: 4px;
  border-radius: 50%;
  border: 2.5px solid var(--nx-green-700);
  pointer-events: none;
}

.nxp-node-label {
  max-width: 160px;
  font-size: 13px; font-weight: 650; line-height: 1.3;
  text-align: center; color: var(--nx-ink);
  overflow-wrap: anywhere;
}
.nxp-node--todo .nxp-node-label { color: var(--nx-text-soft); }

.nxp-tag {
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 650; white-space: nowrap;
  background: #eef3f0; border: 1px solid var(--nx-line); color: var(--nx-text-soft);
}
.nxp-tag--mastered { background: var(--nx-green-100); border-color: var(--nx-green-300); color: var(--nx-green-800); }
.nxp-tag--ahead { background: var(--nx-navy-50); border-color: var(--nx-navy-100); color: var(--nx-navy-700); }

/* ───────── Fiche du nœud sélectionné ───────── */

.nxp-card { position: relative; margin: 18px 0 4px; text-align: left; }

.nxp-card-caret {
  position: absolute; top: -7px;
  left: calc(50% + var(--dx, 0) * var(--nxp-amp) * 1px);
  width: 14px; height: 14px; margin-left: -7px;
  border-radius: 3px;
  transform: rotate(45deg);
}

.nxp-card-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.nxp-card-title { margin: 12px 0 0; font-size: 19px; font-weight: 750; letter-spacing: -.025em; line-height: 1.25; }

/* Autre nœud : fiche blanche. */
.nxp-card--info {
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--nx-green-300);
  box-shadow: 0 1px 2px rgba(11, 31, 59, .05), 0 10px 24px rgba(11, 31, 59, .08);
}
.nxp-card--info .nxp-card-caret {
  top: -8px; box-sizing: border-box;
  background: #fff;
  border-top: 1px solid var(--nx-green-300);
  border-left: 1px solid var(--nx-green-300);
}
.nxp-card--info .nxp-card-title { margin-top: 10px; font-size: 16px; color: var(--nx-ink); }
.nxp-card--info > .nxk-btn { margin-top: 12px; }

.nxp-card-status { padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.nxp-card-status--done { background: var(--nx-green-100); color: var(--nx-green-800); }
.nxp-card-status--todo { background: #eef3f0; color: var(--nx-text-soft); }
.nxp-card-status--ahead,
.nxp-card-status--control { background: var(--nx-navy-50); color: var(--nx-navy-700); }

.nxp-card-meta { font-size: 12px; font-weight: 600; color: var(--nx-muted); }
.nxp-card-text { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--nx-text-strong); }
.nxp-card-sheet { display: block; margin: 4px auto -4px; }

/* ───────── Objectif final ───────── */

.nxp-finale {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding-top: 4px; text-align: center;
}
.nxp-finale-disc {
  width: 80px; height: 80px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--nx-gold-soft); border: 2px solid var(--nx-gold-border); color: var(--nx-gold-dark);
  box-shadow: 0 5px 0 #e8d198, 0 0 0 10px rgba(201, 150, 43, .09);
}
.nxp-finale.is-reached .nxp-finale-disc { background: var(--nx-gold); border-color: var(--nx-gold-dark); color: #fff; }
.nxp-finale-k { margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--nx-gold-ink); }
.nxp-finale-name { font-size: 15.5px; font-weight: 750; letter-spacing: -.015em; color: var(--nx-ink); }
.nxp-finale-text { max-width: 250px; font-size: 12.5px; line-height: 1.45; color: var(--nx-muted); }

/* ───────── ④ Déjà acquis ───────── */

.nxp-acq-head {
  display: flex; align-items: center; gap: 11px;
  width: 100%; min-height: 56px;
  padding: 10px 14px;
  border: 0; background: transparent;
  color: inherit; font: inherit; text-align: left;
  cursor: pointer;
}
.nxp-acq-head:hover { background: var(--nx-surface-2); }
.nxp-acq-check {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--nx-green-600); color: #fff;
}
.nxp-acq-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nxp-acq-text b { font-size: 13.5px; font-weight: 700; color: var(--nx-ink); }
.nxp-acq-text span { font-size: 12px; color: var(--nx-muted); }
.nxp-acq-chev { flex: 0 0 auto; display: inline-flex; color: var(--nx-muted); transition: transform .18s; }
.nxp-acq-head[aria-expanded="true"] .nxp-acq-chev { transform: rotate(180deg); }

.nxp-acq-body ul { list-style: none; margin: 0; padding: 0 14px; }
.nxp-acq-body li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 0; border-top: 1px solid var(--nx-divider);
  font-size: 13px; color: var(--nx-text-strong);
}
.nxp-acq-body li b { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--nx-green-800); }
.nxp-acq-body p { margin: 0; padding: 2px 14px 14px; font-size: 12px; color: var(--nx-muted); }

/* ───────── ⑤ Lien vers Progression ───────── */

.nxp-summary {
  flex-direction: row; align-items: center; gap: 11px;
  width: 100%; min-height: 58px;
  padding: 10px 12px 10px 14px;
  color: inherit; font: inherit; text-align: left;
  cursor: pointer;
  transition: border-color .15s;
}
.nxp-summary:hover { border-color: var(--nx-border-strong); }
.nxp-summary-ico { width: 32px; height: 32px; border-radius: 9px; }
.nxp-summary-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nxp-summary-text b { font-size: 13.5px; font-weight: 700; color: var(--nx-ink); }
.nxp-summary-text span { font-size: 12px; color: var(--nx-muted); }
.nxp-summary-chev { flex: 0 0 auto; display: inline-flex; color: var(--nx-muted); }

/* ───────── Toast provisoire ───────── */

.nxp-toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 100080;
  transform: translateX(-50%) translateY(8px);
  max-width: calc(100vw - 32px);
  padding: 9px 15px; border-radius: 999px;
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 12.5px; font-weight: 650; color: #fff;
  background: rgba(11, 31, 59, .94);
  box-shadow: 0 8px 22px rgba(11, 31, 59, .3);
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.nxp-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ───────── Volets étroits ───────── */

@media (max-width: 340px) {
  .nxp-stage-sub { display: none; }
  .nxp-stage-tile { width: 38px; height: 38px; border-radius: 11px; }
  .nxp-ov-legend { gap: 4px 10px; }
}

/* ───────── Mouvement réduit ───────── */

@media (prefers-reduced-motion: reduce) {
  .nxp-ring,

  .nxp-ov-cells .nxp-ov-cell--current::after { animation: none; opacity: .6; }
  .nxp-disc, .nxp-stage, .nxp-stage-chev, .nxp-acq-chev, .nxp-summary, .nxp-toast { transition: none; }
  .nxp-node:hover .nxp-disc:not(.nxp-disc--control) { transform: none; }
}
/* ============================================================
   Mondes : chaque étape a sa palette, son motif et son filigrane.
   Les couleurs arrivent en variables inline (--w-*) depuis parcours-page.ts.
   ============================================================ */

.nxp-world {
  --nxp-trail: var(--w-accent);          /* chemin parcouru aux couleurs du monde */
  position: relative;
  isolation: isolate;
  padding: 6px;
  border-radius: 22px;
  border: 1px solid var(--w-line);
  background: linear-gradient(180deg, var(--w-soft) 0%, rgba(255, 255, 255, .55) 100%);
}
.nxp-world.is-open { padding: 6px 6px 18px; }
/* La zone qui contient « Tu es ici » passe au-dessus des suivantes (carte au survol). */
.nxp-world.has-here { z-index: 2; }

/* Couche de motif, fondue vers le bas */
.nxp-world::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: .7;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .3) 100%);
          mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .3) 100%);
}
.nxp-world--grid::before     { background-image: linear-gradient(var(--w-line) 1px, transparent 1px), linear-gradient(90deg, var(--w-line) 1px, transparent 1px); background-size: 18px 18px; }
.nxp-world--dots::before     { background-image: radial-gradient(circle, var(--w-line) 1.7px, transparent 2.2px); background-size: 16px 16px; }
.nxp-world--stripes::before  { background-image: repeating-linear-gradient(135deg, var(--w-line) 0 2px, transparent 2px 14px); }
.nxp-world--checks::before   { background-image: conic-gradient(var(--w-line) 0 25%, transparent 0 50%, var(--w-line) 0 75%, transparent 0); background-size: 28px 28px; opacity: .4; }
.nxp-world--hatch::before    { background-image: repeating-linear-gradient(45deg, var(--w-line) 0 1px, transparent 1px 12px), repeating-linear-gradient(135deg, var(--w-line) 0 1px, transparent 1px 12px); }
.nxp-world--calendar::before { background-image: linear-gradient(var(--w-line) 2px, transparent 2px), linear-gradient(90deg, var(--w-line) 2px, transparent 2px); background-size: 30px 26px; }
.nxp-world--stars::before    { background-image: radial-gradient(circle, var(--w-accent) 1.2px, transparent 1.7px), radial-gradient(circle, var(--w-line) 2px, transparent 2.6px); background-size: 34px 34px, 22px 22px; background-position: 0 0, 11px 7px; }
.nxp-world--shelves::before  { background-image: repeating-linear-gradient(180deg, transparent 0 20px, var(--w-line) 20px 23px); }
.nxp-world--bars::before     { background-image: linear-gradient(90deg, var(--w-line) 0 5px, transparent 5px 11px, var(--w-line) 11px 16px, transparent 16px); background-size: 32px 100%; opacity: .5; }
.nxp-world--waves::before    { background-image: repeating-radial-gradient(circle at 0 0, transparent 0 12px, var(--w-line) 12px 14px); background-size: 40px 40px; }
.nxp-world--bubbles::before  { background-image: radial-gradient(circle, var(--w-line) 4px, transparent 4.6px), radial-gradient(circle, var(--w-line) 2px, transparent 2.6px); background-size: 44px 44px, 26px 26px; background-position: 6px 6px, 20px 16px; }

/* Grande icône de l'étape en filigrane */
.nxp-world-mark {
  position: absolute; right: 10px; bottom: 10px; z-index: -1;
  color: var(--w-accent);
  opacity: .13;
  pointer-events: none;
}
.nxp-world-mark svg { width: 96px; height: 96px; }

/* En-tête d'étape aux couleurs du monde */
.nxp-world .nxp-stage { border-color: var(--w-line); }
.nxp-world .nxp-stage:hover { border-color: var(--w-accent); }
.nxp-world .nxp-stage--current { border-color: var(--w-accent); }
.nxp-world .nxp-stage-tile { background: var(--w-tile); color: var(--w-deep); }
.nxp-world .nxp-stage--current .nxp-stage-tile { background: var(--w-deep); color: #fff; }
.nxp-world .nxp-stage-k { color: var(--w-deep); }
.nxp-world .nxp-stage-pill--current { background: var(--w-tile); color: var(--w-deep); }

/* Nœuds aux couleurs du monde */
.nxp-world .nxp-disc--done { background: var(--w-done); color: var(--w-deep); box-shadow: 0 4px 0 var(--w-shadow); }
.nxp-world .nxp-disc--todo { border-color: var(--w-line); box-shadow: 0 4px 0 var(--w-tile); }
.nxp-world .nxp-disc--here { background: var(--w-deep); box-shadow: 0 5px 0 var(--w-dark), 0 12px 24px rgba(11, 31, 59, .22); }
.nxp-world .nxp-ring { border-color: var(--w-accent); }
.nxp-world .nxp-sel { border-color: var(--w-deep); }
.nxp-world .nxp-node--here .nxp-node-label { color: var(--w-deep); font-weight: 750; }
.nxp-world .nxp-link:not(.nxp-link--done) path { stroke: var(--w-accent); stroke-opacity: .4; }
.nxp-world .nxp-card--info { border-color: var(--w-line); }

/* Mini-carte : numéro d'étape à la couleur de son monde */
.nxp-ov-group .nxp-ov-num {
  min-width: 18px; padding: 1px 5px;
  border-radius: 999px;
  text-align: center;
  background: var(--w-tile, transparent);
  color: var(--w-deep, var(--nx-muted));
}
/* L’étape courante reste navy dans la mini-carte, quelle que soit la palette du monde. */
.nxp-ov-group.is-current .nxp-ov-num { background: var(--nx-navy-700); color: #fff; }

/* ============================================================
   « Tu es ici » : petite carte flottante, visible au survol seulement
   ============================================================ */

.nxp-stop.has-pop { position: relative; z-index: 5; }

.nxp-pop {
  position: absolute; top: 100%; left: 50%; z-index: 10;
  width: min(250px, 100%);
  padding-top: 10px;                 /* pont invisible : la souris peut aller du nœud à la carte */
  transform: translateX(calc(-50% - var(--dx, 0) * var(--nxp-amp) * 1px)) translateY(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
}
.nxp-node.is-current:hover + .nxp-pop,
.nxp-node.is-current:focus-visible + .nxp-pop,
.nxp-pop:hover,
.nxp-pop:focus-within,
.nxp-stop.is-pinned > .nxp-pop {
  opacity: 1;
  visibility: visible;
  transform: translateX(calc(-50% - var(--dx, 0) * var(--nxp-amp) * 1px)) translateY(0);
  transition-delay: 0s;
}

.nxp-pop-card {
  position: relative;
  display: flex; flex-direction: column; gap: 5px;
  padding: 11px 12px 6px;
  border-radius: 14px;
  background: var(--w-deep, var(--nx-hero));
  color: #fff;
  text-align: left;
  box-shadow: 0 10px 26px rgba(11, 31, 59, .28);
}
.nxp-pop-caret {
  position: absolute; top: -6px;
  left: calc(50% + var(--dx, 0) * var(--nxp-amp) * 1px);
  width: 12px; height: 12px; margin-left: -6px;
  border-radius: 2px;
  background: inherit;
  transform: rotate(45deg);
}
.nxp-pop-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.nxp-pop .nxk-hero-pill { height: 22px; padding: 0 9px 0 8px; font-size: 11px; }
.nxp-pop .nxk-hero-meta { font-size: 11px; color: rgba(255, 255, 255, .78); }
.nxp-pop-title { margin: 2px 0 0; font-size: 14.5px; font-weight: 750; letter-spacing: -.015em; line-height: 1.3; color: #fff; }
.nxp-pop-pos { margin: 0; font-size: 11.5px; color: rgba(255, 255, 255, .72); }
.nxp-pop-why {
  margin: 0;
  font-size: 12px; line-height: 1.45; color: rgba(255, 255, 255, .88);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nxp-pop .nxk-btn { min-height: 36px; margin-top: 4px; border-radius: 10px; font-size: 13px; color: var(--w-deep, var(--nx-green-900)); }
.nxp-pop .nxk-hero-link { min-height: 30px; font-size: 12px; color: rgba(255, 255, 255, .85); }
.nxp-pop :focus-visible { outline-color: #fff !important; }

@media (prefers-reduced-motion: reduce) {
  .nxp-pop { transition: none; }
}
