/*
 * Fond « nid d'abeille » vivant du SSO Nexus — portage statique du composant
 * Angular nexus-ui `nx-hex-backdrop`. Maillage flat-top servant de masque ;
 * petits foyers bleu clair de tailles variées qui errent sur tout le fond et
 * scintillent (teinte légèrement décalée) ; mini-halos très faibles révélant le
 * quadrillage ailleurs. Posé en fond fixe derrière tout le contenu.
 */

.nx-hex-backdrop {
  /* Masque : tuile flat-top à la période exacte du réseau → pavage continu. */
  --nx-hex-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22225%22%20height%3D%22129.904%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%221.4%22%3E%3Cpath%20d%3D%22M75%200L37.5%2064.952L-37.5%2064.952L-75%200L-37.5%20-64.952L37.5%20-64.952Z%22%2F%3E%3Cpath%20d%3D%22M75%20129.904L37.5%20194.856L-37.5%20194.856L-75%20129.904L-37.5%2064.952L37.5%2064.952Z%22%2F%3E%3Cpath%20d%3D%22M187.5%2064.952L150%20129.904L75%20129.904L37.5%2064.952L75%200L150%200Z%22%2F%3E%3Cpath%20d%3D%22M300%200L262.5%2064.952L187.5%2064.952L150%200L187.5%20-64.952L262.5%20-64.952Z%22%2F%3E%3Cpath%20d%3D%22M300%20129.904L262.5%20194.856L187.5%20194.856L150%20129.904L187.5%2064.952L262.5%2064.952Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --_nx-tile-w: calc(225px * var(--nx-hex-scale, 1));
  --_nx-tile-h: calc(129.904px * var(--nx-hex-scale, 1));

  /* Configuration (équivalent des inputs du composant). */
  --nx-hex-base: #4a72ab;
  /* Variantes de BLEU pour les foyers (du périanthe au cyan). */
  --nx-hex-c1: #617bfb;
  --nx-hex-c2: #2f80d6;
  --nx-hex-c3: #38b0e6;
  --nx-hex-scale: 1;
  --nx-hex-speed: 1.25; /* lent, légèrement accéléré */
  --nx-hex-glow: 1;

  /* Fond fixe plein écran, derrière tout le contenu (au-dessus du dégradé body). */
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
  opacity: 0.7;
}

/* Calques masqués par le maillage : seules les LIGNES laissent voir la couleur. */
.nx-hex-backdrop__mesh,
.nx-hex-backdrop__glow {
  position: absolute;
  inset: 0;
  -webkit-mask-image: var(--nx-hex-mask);
  mask-image: var(--nx-hex-mask);
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  -webkit-mask-size: var(--_nx-tile-w) var(--_nx-tile-h);
  mask-size: var(--_nx-tile-w) var(--_nx-tile-h);
}

/* Fond noir ailleurs : le quadrillage n'est suggéré que par les mini-halos. */
.nx-hex-backdrop__mesh {
  background: none;
}

/* Mini-halos : très faibles (≤5 %), larges et flous, dérive TRÈS lente. */
.nx-hex-backdrop__halo {
  position: absolute;
  inline-size: 52%;
  block-size: 48%;
  border-radius: 50%;
  opacity: 0.05;
  filter: blur(12px);
  will-change: transform;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, var(--nx-hex-base, #4a72ab) 0%, transparent 72%);
}
.nx-hex-backdrop__halo--1 { inset: -8% auto auto -6%; }
.nx-hex-backdrop__halo--2 { inset: 4% auto auto 58%;  inline-size: 46%; block-size: 52%; }
.nx-hex-backdrop__halo--3 { inset: 50% auto auto 24%; inline-size: 56%; block-size: 46%; }
.nx-hex-backdrop__halo--4 { inset: 56% auto auto 62%; }
.nx-hex-backdrop__halo--5 { inset: 28% auto auto 30%; inline-size: 44%; block-size: 44%; }

.nx-hex-backdrop--animated .nx-hex-backdrop__halo--1 { animation: nx-hex-halo-a calc(120s / var(--nx-hex-speed, 1)) ease-in-out infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__halo--2 { animation: nx-hex-halo-b calc(150s / var(--nx-hex-speed, 1)) ease-in-out -40s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__halo--3 { animation: nx-hex-halo-c calc(135s / var(--nx-hex-speed, 1)) ease-in-out -70s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__halo--4 { animation: nx-hex-halo-a calc(165s / var(--nx-hex-speed, 1)) ease-in-out -25s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__halo--5 { animation: nx-hex-halo-b calc(140s / var(--nx-hex-speed, 1)) ease-in-out -95s infinite; }

@keyframes nx-hex-halo-a {
  0%   { transform: translate(0, 0)      scale(1); }
  50%  { transform: translate(55%, 38%)  scale(1.12); }
  100% { transform: translate(0, 0)      scale(1); }
}
@keyframes nx-hex-halo-b {
  0%   { transform: translate(0, 0)      scale(1.08); }
  50%  { transform: translate(-48%, 44%) scale(0.92); }
  100% { transform: translate(0, 0)      scale(1.08); }
}
@keyframes nx-hex-halo-c {
  0%   { transform: translate(0, 0)      scale(0.95); }
  50%  { transform: translate(42%, -50%) scale(1.15); }
  100% { transform: translate(0, 0)      scale(0.95); }
}

/* Foyers : isolés pour se mélanger entre eux (blend additif). */
.nx-hex-backdrop__glow {
  isolation: isolate;
  filter: brightness(var(--nx-hex-glow, 1));
}

/* CLUSTER : un foyer = plusieurs sous-zones de tailles et opacités différentes. */
.nx-hex-backdrop__blob {
  position: absolute;
  mix-blend-mode: screen;
  will-change: transform, opacity;
  opacity: var(--_nx-op, 0.5);
  filter: blur(4px);
  background:
    radial-gradient(ellipse 30% 26% at 42% 40%, color-mix(in srgb, var(--_nx-blob-color, #9fc6f5) 92%, transparent) 0%, transparent 68%),
    radial-gradient(ellipse 24% 30% at 57% 30%, color-mix(in srgb, var(--_nx-blob-color, #9fc6f5) 58%, transparent) 0%, transparent 70%),
    radial-gradient(ellipse 19% 16% at 67% 56%, color-mix(in srgb, var(--_nx-blob-color, #9fc6f5) 74%, transparent) 0%, transparent 70%),
    radial-gradient(ellipse 13% 12% at 31% 64%, color-mix(in srgb, var(--_nx-blob-color, #9fc6f5) 84%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 16% 14% at 73% 74%, color-mix(in srgb, var(--_nx-blob-color, #9fc6f5) 48%, transparent) 0%, transparent 72%),
    radial-gradient(ellipse 10% 11% at 48% 78%, color-mix(in srgb, var(--_nx-blob-color, #9fc6f5) 66%, transparent) 0%, transparent 74%);
}

/* Halo arrière : nappe douce plus grande que le foyer (derrière le cluster),
   faible → révèle le quadrillage à ~5 % autour du foyer, et suit ses mouvements. */
.nx-hex-backdrop__blob::before {
  content: "";
  position: absolute;
  inset: -48%;
  z-index: -1;
  border-radius: 50%;
  opacity: 0.18;
  background: radial-gradient(
    ellipse 50% 50% at 50% 50%,
    var(--_nx-blob-color, #9fc6f5) 0%,
    color-mix(in srgb, var(--_nx-blob-color, #9fc6f5) 40%, transparent) 42%,
    transparent 74%
  );
}

/* 21 foyers répartis ; tailles variées ; vecteur --_nx-dx/dy orienté vers
   l'EXTÉRIEUR (espace ouvert) → dérive favorisée vers les zones vides. */
.nx-hex-backdrop__blob--1{ inset:8% auto auto 10%; inline-size:11%; block-size:10%; --_nx-blob-color:var(--nx-hex-c1, #9fc6f5); --_nx-rot:-22deg; --_nx-op:0.40; --_nx-dx:-89.7%; --_nx-dy:-94.1%; }
.nx-hex-backdrop__blob--2{ inset:8% auto auto 30%; inline-size:18%; block-size:16%; --_nx-blob-color:var(--nx-hex-c2, #7fb0ee); --_nx-rot:28deg; --_nx-op:0.47; --_nx-dx:-63.6%; --_nx-dy:-133.6%; }
.nx-hex-backdrop__blob--3{ inset:8% auto auto 50%; inline-size:14%; block-size:11%; --_nx-blob-color:var(--nx-hex-c3, #c4ddff); --_nx-rot:10deg; --_nx-op:0.43; --_nx-dx:0%; --_nx-dy:-166%; }
.nx-hex-backdrop__blob--4{ inset:8% auto auto 70%; inline-size:10%; block-size:9%; --_nx-blob-color:var(--nx-hex-c1, #9fc6f5); --_nx-rot:-14deg; --_nx-op:0.50; --_nx-dx:79.1%; --_nx-dy:-166.1%; }
.nx-hex-backdrop__blob--5{ inset:8% auto auto 90%; inline-size:20%; block-size:18%; --_nx-blob-color:var(--nx-hex-c2, #7fb0ee); --_nx-rot:18deg; --_nx-op:0.46; --_nx-dx:89.7%; --_nx-dy:-94.1%; }
.nx-hex-backdrop__blob--6{ inset:27% auto auto 20%; inline-size:13%; block-size:10%; --_nx-blob-color:var(--nx-hex-c3, #c4ddff); --_nx-rot:-8deg; --_nx-op:0.42; --_nx-dx:-117.5%; --_nx-dy:-90%; }
.nx-hex-backdrop__blob--7{ inset:27% auto auto 40%; inline-size:12%; block-size:11%; --_nx-blob-color:var(--nx-hex-c1, #9fc6f5); --_nx-rot:34deg; --_nx-op:0.49; --_nx-dx:-66.2%; --_nx-dy:-152.2%; }
.nx-hex-backdrop__blob--8{ inset:27% auto auto 60%; inline-size:16%; block-size:14%; --_nx-blob-color:var(--nx-hex-c2, #7fb0ee); --_nx-rot:24deg; --_nx-op:0.45; --_nx-dx:73.4%; --_nx-dy:-168.7%; }
.nx-hex-backdrop__blob--9{ inset:27% auto auto 80%; inline-size:27%; block-size:24%; --_nx-blob-color:var(--nx-hex-c3, #c4ddff); --_nx-rot:-30deg; --_nx-op:0.41; --_nx-dx:103.2%; --_nx-dy:-79.1%; }
.nx-hex-backdrop__blob--10{ inset:46% auto auto 8%; inline-size:12%; block-size:11%; --_nx-blob-color:var(--nx-hex-c1, #9fc6f5); --_nx-rot:6deg; --_nx-op:0.48; --_nx-dx:-147.3%; --_nx-dy:-14%; }
.nx-hex-backdrop__blob--11{ inset:46% auto auto 28%; inline-size:15%; block-size:13%; --_nx-blob-color:var(--nx-hex-c2, #7fb0ee); --_nx-rot:-16deg; --_nx-op:0.44; --_nx-dx:-163.3%; --_nx-dy:-29.7%; }
.nx-hex-backdrop__blob--12{ inset:46% auto auto 50%; inline-size:19%; block-size:16%; --_nx-blob-color:var(--nx-hex-c3, #c4ddff); --_nx-rot:22deg; --_nx-op:0.40; --_nx-dx:0%; --_nx-dy:-184%; }
.nx-hex-backdrop__blob--13{ inset:46% auto auto 72%; inline-size:11%; block-size:10%; --_nx-blob-color:var(--nx-hex-c1, #9fc6f5); --_nx-rot:-10deg; --_nx-op:0.47; --_nx-dx:127.9%; --_nx-dy:-23.3%; }
.nx-hex-backdrop__blob--14{ inset:46% auto auto 92%; inline-size:17%; block-size:15%; --_nx-blob-color:var(--nx-hex-c2, #7fb0ee); --_nx-rot:30deg; --_nx-op:0.43; --_nx-dx:147.3%; --_nx-dy:-14%; }
.nx-hex-backdrop__blob--15{ inset:65% auto auto 18%; inline-size:13%; block-size:10%; --_nx-blob-color:var(--nx-hex-c3, #c4ddff); --_nx-rot:-26deg; --_nx-op:0.50; --_nx-dx:-150.3%; --_nx-dy:70.5%; }
.nx-hex-backdrop__blob--16{ inset:65% auto auto 42%; inline-size:22%; block-size:21%; --_nx-blob-color:var(--nx-hex-c1, #9fc6f5); --_nx-rot:14deg; --_nx-op:0.46; --_nx-dx:-86.6%; --_nx-dy:162.4%; }
.nx-hex-backdrop__blob--17{ inset:65% auto auto 62%; inline-size:10%; block-size:9%; --_nx-blob-color:var(--nx-hex-c2, #7fb0ee); --_nx-rot:-6deg; --_nx-op:0.42; --_nx-dx:81.2%; --_nx-dy:101.5%; }
.nx-hex-backdrop__blob--18{ inset:65% auto auto 84%; inline-size:16%; block-size:13%; --_nx-blob-color:var(--nx-hex-c3, #c4ddff); --_nx-rot:20deg; --_nx-op:0.49; --_nx-dx:135.4%; --_nx-dy:59.7%; }
.nx-hex-backdrop__blob--19{ inset:84% auto auto 24%; inline-size:14%; block-size:13%; --_nx-blob-color:var(--nx-hex-c1, #9fc6f5); --_nx-rot:-32deg; --_nx-op:0.45; --_nx-dx:-100.8%; --_nx-dy:131.9%; }
.nx-hex-backdrop__blob--20{ inset:84% auto auto 50%; inline-size:18%; block-size:16%; --_nx-blob-color:var(--nx-hex-c2, #7fb0ee); --_nx-rot:8deg; --_nx-op:0.41; --_nx-dx:0%; --_nx-dy:184%; }
.nx-hex-backdrop__blob--21{ inset:84% auto auto 78%; inline-size:12%; block-size:9%; --_nx-blob-color:var(--nx-hex-c3, #c4ddff); --_nx-rot:-18deg; --_nx-op:0.48; --_nx-dx:82.6%; --_nx-dy:100.4%; }

/* Mouvement chaotique (durées non harmoniques + phases décalées). */
.nx-hex-backdrop--animated .nx-hex-backdrop__blob {
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--1 { animation: nx-hex-drift-a calc(64s / var(--nx-hex-speed, 1)) ease-in-out -7s infinite, nx-hex-twinkle calc(6.7s / var(--nx-hex-speed, 1)) ease-in-out -0.2s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--2 { animation: nx-hex-drift-b calc(86s / var(--nx-hex-speed, 1)) ease-in-out -12s infinite, nx-hex-twinkle calc(5.3s / var(--nx-hex-speed, 1)) ease-in-out -1.5s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--3 { animation: nx-hex-drift-c calc(103s / var(--nx-hex-speed, 1)) ease-in-out -17s infinite, nx-hex-twinkle calc(7.9s / var(--nx-hex-speed, 1)) ease-in-out -2.8s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--4 { animation: nx-hex-drift-d calc(80s / var(--nx-hex-speed, 1)) ease-in-out -22s infinite, nx-hex-twinkle calc(5.7s / var(--nx-hex-speed, 1)) ease-in-out -4.1s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--5 { animation: nx-hex-drift-a calc(114s / var(--nx-hex-speed, 1)) ease-in-out -27s infinite, nx-hex-twinkle calc(7.2s / var(--nx-hex-speed, 1)) ease-in-out -0.4s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--6 { animation: nx-hex-drift-b calc(74s / var(--nx-hex-speed, 1)) ease-in-out -32s infinite, nx-hex-twinkle calc(4.9s / var(--nx-hex-speed, 1)) ease-in-out -1.7s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--7 { animation: nx-hex-drift-c calc(92s / var(--nx-hex-speed, 1)) ease-in-out -37s infinite, nx-hex-twinkle calc(8.3s / var(--nx-hex-speed, 1)) ease-in-out -3s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--8 { animation: nx-hex-drift-d calc(58s / var(--nx-hex-speed, 1)) ease-in-out -42s infinite, nx-hex-twinkle calc(6.1s / var(--nx-hex-speed, 1)) ease-in-out -4.3s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--9 { animation: nx-hex-drift-a calc(108s / var(--nx-hex-speed, 1)) ease-in-out -47s infinite, nx-hex-twinkle calc(7.6s / var(--nx-hex-speed, 1)) ease-in-out -0.6s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--10 { animation: nx-hex-drift-b calc(70s / var(--nx-hex-speed, 1)) ease-in-out -52s infinite, nx-hex-twinkle calc(5.9s / var(--nx-hex-speed, 1)) ease-in-out -1.9s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--11 { animation: nx-hex-drift-c calc(96s / var(--nx-hex-speed, 1)) ease-in-out -57s infinite, nx-hex-twinkle calc(6.4s / var(--nx-hex-speed, 1)) ease-in-out -3.2s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--12 { animation: nx-hex-drift-d calc(82s / var(--nx-hex-speed, 1)) ease-in-out -62s infinite, nx-hex-twinkle calc(7.1s / var(--nx-hex-speed, 1)) ease-in-out -4.5s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--13 { animation: nx-hex-drift-a calc(110s / var(--nx-hex-speed, 1)) ease-in-out -7s infinite, nx-hex-twinkle calc(5.5s / var(--nx-hex-speed, 1)) ease-in-out -0.8s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--14 { animation: nx-hex-drift-b calc(68s / var(--nx-hex-speed, 1)) ease-in-out -12s infinite, nx-hex-twinkle calc(8s / var(--nx-hex-speed, 1)) ease-in-out -2.1s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--15 { animation: nx-hex-drift-c calc(99s / var(--nx-hex-speed, 1)) ease-in-out -17s infinite, nx-hex-twinkle calc(6.8s / var(--nx-hex-speed, 1)) ease-in-out -3.4s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--16 { animation: nx-hex-drift-d calc(77s / var(--nx-hex-speed, 1)) ease-in-out -22s infinite, nx-hex-twinkle calc(5.1s / var(--nx-hex-speed, 1)) ease-in-out -4.7s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--17 { animation: nx-hex-drift-a calc(90s / var(--nx-hex-speed, 1)) ease-in-out -27s infinite, nx-hex-twinkle calc(7.4s / var(--nx-hex-speed, 1)) ease-in-out -1s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--18 { animation: nx-hex-drift-b calc(61s / var(--nx-hex-speed, 1)) ease-in-out -32s infinite, nx-hex-twinkle calc(6s / var(--nx-hex-speed, 1)) ease-in-out -2.3s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--19 { animation: nx-hex-drift-c calc(105s / var(--nx-hex-speed, 1)) ease-in-out -37s infinite, nx-hex-twinkle calc(8.1s / var(--nx-hex-speed, 1)) ease-in-out -3.6s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--20 { animation: nx-hex-drift-d calc(84s / var(--nx-hex-speed, 1)) ease-in-out -42s infinite, nx-hex-twinkle calc(5.6s / var(--nx-hex-speed, 1)) ease-in-out -4.9s infinite; }
.nx-hex-backdrop--animated .nx-hex-backdrop__blob--21 { animation: nx-hex-drift-a calc(72s / var(--nx-hex-speed, 1)) ease-in-out -47s infinite, nx-hex-twinkle calc(7s / var(--nx-hex-speed, 1)) ease-in-out -1.2s infinite; }

/* Dérive directionnelle : éloignement vers le vecteur sortant --_nx-dx/dy
   (vers l'espace ouvert) avec ondulations irrégulières, puis retour. */
@keyframes nx-hex-drift-a {
  0%   { transform: translate(0, 0) rotate(var(--_nx-rot, 0deg)) scale(1); }
  27%  { transform: translate(calc(var(--_nx-dx, 0%) * 0.5), calc(var(--_nx-dy, 0%) * 0.55)) rotate(calc(var(--_nx-rot, 0deg) + 5deg)) scale(1.1); }
  53%  { transform: translate(var(--_nx-dx, 0%), var(--_nx-dy, 0%)) rotate(calc(var(--_nx-rot, 0deg) - 3deg)) scale(0.93); }
  78%  { transform: translate(calc(var(--_nx-dx, 0%) * 0.55), calc(var(--_nx-dy, 0%) * 1.1)) rotate(calc(var(--_nx-rot, 0deg) + 7deg)) scale(1.05); }
  100% { transform: translate(0, 0) rotate(var(--_nx-rot, 0deg)) scale(1); }
}
@keyframes nx-hex-drift-b {
  0%   { transform: translate(0, 0) rotate(var(--_nx-rot, 0deg)) scale(1.04); }
  24%  { transform: translate(calc(var(--_nx-dx, 0%) * 0.75), calc(var(--_nx-dy, 0%) * 0.35)) rotate(calc(var(--_nx-rot, 0deg) + 6deg)) scale(0.92); }
  50%  { transform: translate(calc(var(--_nx-dx, 0%) * 0.95), var(--_nx-dy, 0%)) rotate(calc(var(--_nx-rot, 0deg) - 2deg)) scale(1.12); }
  74%  { transform: translate(calc(var(--_nx-dx, 0%) * 0.4), calc(var(--_nx-dy, 0%) * 0.85)) rotate(calc(var(--_nx-rot, 0deg) + 5deg)) scale(0.98); }
  100% { transform: translate(0, 0) rotate(var(--_nx-rot, 0deg)) scale(1.04); }
}
@keyframes nx-hex-drift-c {
  0%   { transform: translate(0, 0) rotate(var(--_nx-rot, 0deg)) scale(0.95); }
  22%  { transform: translate(calc(var(--_nx-dx, 0%) * 0.6), calc(var(--_nx-dy, 0%) * 0.5)) rotate(calc(var(--_nx-rot, 0deg) + 5deg)) scale(1.1); }
  48%  { transform: translate(var(--_nx-dx, 0%), calc(var(--_nx-dy, 0%) * 0.9)) rotate(calc(var(--_nx-rot, 0deg) + 1deg)) scale(0.9); }
  73%  { transform: translate(calc(var(--_nx-dx, 0%) * 0.7), calc(var(--_nx-dy, 0%) * 1.15)) rotate(calc(var(--_nx-rot, 0deg) - 6deg)) scale(1.12); }
  100% { transform: translate(0, 0) rotate(var(--_nx-rot, 0deg)) scale(0.95); }
}
@keyframes nx-hex-drift-d {
  0%   { transform: translate(0, 0) rotate(var(--_nx-rot, 0deg)) scale(1.02); }
  26%  { transform: translate(calc(var(--_nx-dx, 0%) * 0.45), calc(var(--_nx-dy, 0%) * 0.7)) rotate(calc(var(--_nx-rot, 0deg) - 5deg)) scale(0.94); }
  53%  { transform: translate(calc(var(--_nx-dx, 0%) * 1.05), calc(var(--_nx-dy, 0%) * 0.85)) rotate(calc(var(--_nx-rot, 0deg) + 4deg)) scale(1.1); }
  81%  { transform: translate(calc(var(--_nx-dx, 0%) * 0.6), calc(var(--_nx-dy, 0%) * 1.05)) rotate(calc(var(--_nx-rot, 0deg) + 8deg)) scale(0.96); }
  100% { transform: translate(0, 0) rotate(var(--_nx-rot, 0deg)) scale(1.02); }
}

/* Scintillement : opacité + léger décalage de teinte (hue-rotate + saturation). */
@keyframes nx-hex-twinkle {
  0%   { opacity: var(--_nx-op, 0.5);              filter: blur(4px) hue-rotate(0deg); }
  24%  { opacity: calc(var(--_nx-op, 0.5) * 0.5);  filter: blur(4px) hue-rotate(-12deg) saturate(0.9); }
  47%  { opacity: calc(var(--_nx-op, 0.5) * 1.3);  filter: blur(4px) hue-rotate(10deg) saturate(1.18); }
  61%  { opacity: calc(var(--_nx-op, 0.5) * 0.7);  filter: blur(4px) hue-rotate(-6deg); }
  83%  { opacity: calc(var(--_nx-op, 0.5) * 1.12); filter: blur(4px) hue-rotate(7deg) saturate(1.08); }
  100% { opacity: var(--_nx-op, 0.5);              filter: blur(4px) hue-rotate(0deg); }
}

/* Accessibilité : pas de mouvement si l'utilisateur le demande. */
@media (prefers-reduced-motion: reduce) {
  .nx-hex-backdrop__blob,
  .nx-hex-backdrop__halo {
    animation: none !important;
  }
}
