/* ==========================================================
   navslider.css — Slider horizontal de tuiles de navigation
   Destiny 2 Arsenal — toutes les classes préfixées "ns-"
   (aucune collision avec style.css)
   ========================================================== */

.ns-slider {
  position: relative;
  margin: 0 0 18px;
}

/* ---------- Piste scrollable ---------- */
.ns-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  /* espace pour le hover (translateY) et l'ombre de la tuile active */
  padding: 6px 4px 10px;
  scrollbar-width: none;            /* Firefox : scrollbar masquée */
  -ms-overflow-style: none;         /* Edge legacy */
}
.ns-track::-webkit-scrollbar {      /* Chrome/Safari : scrollbar masquée */
  display: none;
  width: 0;
  height: 0;
}

/* Fondu aux extrémités quand la piste déborde */
.ns-slider.ns-overflow .ns-track {
  -webkit-mask-image: linear-gradient(90deg,
      transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
  mask-image: linear-gradient(90deg,
      transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}

/* ---------- Tuiles ---------- */
.ns-tile {
  position: relative;
  flex: 0 0 auto;
  width: 200px;
  height: 110px;
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  background: linear-gradient(115deg, #1b2234 0%, var(--card) 55%, #101623 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.ns-tile:hover,
.ns-tile:focus-visible {
  transform: translateY(-2px);
  border-color: var(--cyan);
}
.ns-tile:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(87, 199, 227, .35);
}

/* Voile sombre à gauche pour garder le texte lisible sur l'icône */
.ns-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(95deg,
      rgba(11, 14, 20, .92) 18%,
      rgba(11, 14, 20, .55) 55%,
      rgba(11, 14, 20, .10) 100%);
}

/* Tuile active : bordure or + liseré lumineux en haut */
.ns-tile.ns-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold),
              0 8px 20px -8px rgba(240, 180, 41, .4);
}
.ns-tile.ns-active::after {
  content: '';
  position: absolute;
  z-index: 3;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Icône d'arme en fond : grande, à droite, semi-transparente, inclinée */
.ns-bg {
  position: absolute;
  z-index: 0;
  right: -24px;
  top: 50%;
  width: 126px;
  height: 126px;
  object-fit: contain;
  transform: translateY(-50%) rotate(-14deg);
  opacity: .35;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55));
}

/* Glyphe décoratif des tuiles spéciales (même emplacement que .ns-bg) */
.ns-glyph {
  position: absolute;
  z-index: 0;
  right: 10px;
  top: 44%;
  transform: translateY(-50%) rotate(-14deg);
  font-size: 86px;
  line-height: 1;
  opacity: .3;
  pointer-events: none;
  user-select: none;
  color: var(--muted);
}

/* ---------- Texte ---------- */
.ns-name {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .8px;
  text-transform: uppercase;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ns-count {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Tuiles spéciales ---------- */
/* "Tout" : neutre, léger accent cyan sur le glyphe */
.ns-sp-all .ns-glyph { color: var(--cyan); }

/* "Inventaire" : accent doré */
.ns-sp-inv {
  background: linear-gradient(115deg, #292311 0%, var(--card) 60%, #141019 100%);
}
.ns-sp-inv .ns-glyph { color: var(--gold); opacity: .32; }
.ns-sp-inv .ns-name  { color: var(--gold); }

/* "Exotiques" : doré aussi, mais libellé clair */
.ns-sp-exo {
  background: linear-gradient(115deg, #241f10 0%, var(--card) 60%, #141019 100%);
}
.ns-sp-exo .ns-glyph { color: var(--gold); opacity: .38; }
.ns-sp-exo .ns-name  { color: #f7f9ff; }

/* ---------- Flèches de défilement ---------- */
.ns-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 30px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 23, 38, .92);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--muted);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;             /* cachées tant qu'il n'y a pas débordement */
  transition: opacity .18s ease, color .15s ease, border-color .15s ease;
}
.ns-slider.ns-overflow .ns-arrow {
  opacity: .95;
  pointer-events: auto;
}
.ns-arrow:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(23, 29, 43, .95);
}
.ns-arrow.ns-off {                  /* extrémité atteinte : flèche masquée */
  opacity: 0 !important;
  pointer-events: none !important;
}
.ns-prev { left: 6px; }
.ns-next { right: 6px; }

/* ---------- Écrans étroits ---------- */
@media (max-width: 720px) {
  .ns-tile { width: 168px; height: 96px; }
  .ns-name { font-size: 16px; }
  .ns-glyph { font-size: 66px; }
  .ns-bg { width: 100px; height: 100px; right: -18px; }
}
