/* ============================================================
   ANARYX - Matrix digital rain background
   Pattern original : whoisyourdeadie (Uiverse.io), adapté en
   fond fixe plein écran derrière le contenu.
   ============================================================ */

.matrix-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

.matrix-column {
  position: absolute;
  top: -20%;
  width: 18px;
  font-size: 15px;
  line-height: 1.15;
  font-weight: bold;
  white-space: nowrap;
  color: #00ff41;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.55);
  animation: matrixFall linear infinite;
  will-change: transform, opacity;
}

.matrix-column span {
  display: block;
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 1px;
  background: linear-gradient(
    to bottom,
    #ffffff 0%,
    #ffffff 5%,
    #00ff41 10%,
    #00ff41 20%,
    #00dd33 30%,
    #00bb22 40%,
    #009911 50%,
    #007700 60%,
    #005500 70%,
    #003300 80%,
    rgba(0, 255, 65, 0.4) 90%,
    transparent 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.matrix-column .lead {
  color: #eaffe6;
  text-shadow: 0 0 14px #d4ffd4;
  -webkit-text-fill-color: currentColor;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7));
}

@keyframes matrixFall {
  0% {
    transform: translateY(-100%);
    opacity: 1;
  }
  100% {
    transform: translateY(130vh);
    opacity: 0;
  }
}

/* Respecte la préférence « mouvement réduit » : fond figé */
@media (prefers-reduced-motion: reduce) {
  .matrix-column {
    animation: none !important;
    opacity: 0.25 !important;
  }
}

/* Écrans étroits : moins de colonnes, texte plus petit */
@media (max-width: 768px) {
  .matrix-column {
    font-size: 13px;
    width: 15px;
  }
}
@media (max-width: 480px) {
  .matrix-column {
    font-size: 11px;
    width: 12px;
  }
}