/* ==========================================================================
   203 — World Map Flows
   Scènes carte du monde à plat en canvas (jour/nuit, trafic, pulse).
   Menu radio en pills ; le canvas remplit la scène, couleurs résolues
   depuis currentColor + --wmf-ink-2.
   ========================================================================== */

.wmf {
  --wmf-ink: var(--ml-accent, #7c8cff);
  --wmf-ink-2: var(--ml-accent-2, #2dd4bf);

  position: relative;
  width: min(100%, 340px);
  font-family: inherit;
  color: var(--ml-fg, #e8eaf2);
}

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

.wmf__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.wmf__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ml-muted, #8b91a3);
}

/* --- Menu de modes (pills radio) ------------------------------------------- */

.wmf__menu {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.wmf__opt input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.wmf__opt span {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid color-mix(in oklab, var(--ml-muted, #8b91a3) 30%, transparent);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 550;
  color: var(--ml-muted, #8b91a3);
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease,
              background-color 0.16s ease, transform 0.16s ease;
}

.wmf__opt:hover span {
  color: var(--ml-fg, #e8eaf2);
  border-color: var(--ml-muted, #8b91a3);
}

.wmf__opt input:checked + span {
  color: var(--ml-bg, #0d1017);
  background: var(--ml-accent, #7c8cff);
  border-color: var(--ml-accent, #7c8cff);
  transform: scale(1.04);
}

.wmf__opt input:focus-visible + span {
  outline: 2px solid var(--ml-accent, #7c8cff);
  outline-offset: 2px;
}

/* --- Scène ------------------------------------------------------------------ */

.wmf__stage {
  position: relative;
  aspect-ratio: 1000 / 435.1; /* ratio du viewBox de world-map.svg */
  color: var(--wmf-ink);       /* couleur primaire lue par le canvas */
}

.wmf__canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* --- Fallback ----------------------------------------------------------------- */

.wmf__fallback {
  display: grid;
  place-items: center;
  height: 100%;
  border: 1px dashed color-mix(in oklab, var(--ml-muted, #8b91a3) 40%, transparent);
  border-radius: 8px;
  color: var(--ml-muted, #8b91a3);
  font-size: 11px;
  text-align: center;
  padding: 12px;
}

/* --- Reduced motion ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .wmf__opt input:checked + span {
    transform: none;
  }
}
