/* NekoVault V28.0.3.5 — Passe design & UX 1
   Accueil, hiérarchie, cohérence visuelle, responsive et finitions premium. */

:root {
  --nv-page-max: 1380px;
  --nv-surface: #101119;
  --nv-surface-2: #141621;
  --nv-border: rgba(255,255,255,.09);
  --nv-border-strong: rgba(255,255,255,.15);
  --nv-text-soft: #c8c5d0;
  --nv-radius-lg: 24px;
  --nv-radius-md: 16px;
}

.page {
  width: min(var(--nv-page-max), calc(100% - 44px)) !important;
  padding-top: 24px !important;
}

/* ---------- Nouveau hero de marque ---------- */
.nv-brand-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
  gap: 28px;
  align-items: center;
  min-height: 360px;
  margin: 0 0 26px;
  padding: clamp(28px, 4vw, 58px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 30px;
  background:
    radial-gradient(circle at 78% 14%, rgba(245,53,167,.24), transparent 28%),
    radial-gradient(circle at 12% 105%, rgba(137,89,255,.22), transparent 38%),
    linear-gradient(145deg, #12131d 0%, #0d0e16 58%, #11101a 100%);
  box-shadow: 0 30px 90px rgba(0,0,0,.34);
}

.nv-brand-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(255,255,255,.035), transparent 35%);
}

.nv-brand-copy,
.nv-graph-card {
  position: relative;
  z-index: 1;
}

.nv-brand-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #ff9dd4;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.nv-brand-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 99px;
  background: var(--gradient);
}

.nv-brand-hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(2.55rem, 5.2vw, 5.35rem);
  line-height: .94;
  letter-spacing: -.055em;
}

.nv-brand-hero p {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--nv-text-soft);
  font-size: clamp(.98rem, 1.3vw, 1.15rem);
  line-height: 1.7;
}

.nv-brand-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.nv-brand-actions .primary-button,
.nv-brand-actions .secondary-button {
  min-height: 48px !important;
  padding-inline: 20px !important;
}

.nv-graph-card {
  padding: 22px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 22px;
  background: rgba(7,8,14,.64);
  backdrop-filter: blur(18px);
}

.nv-graph-card > span {
  color: #ff8dcb;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.nv-graph-card h2 {
  margin: 7px 0 4px;
  font-size: 1.45rem;
}

.nv-graph-card p {
  margin: 0 0 18px;
  font-size: .83rem;
  line-height: 1.55;
}

.nv-graph-flow {
  display: grid;
  gap: 9px;
}

.nv-graph-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--nv-border);
  border-radius: 14px;
  color: #f4f1f8;
  background: rgba(255,255,255,.035);
  font-weight: 800;
}

.nv-graph-node::before {
  content: "";
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 0 5px rgba(245,53,167,.08);
}

.nv-graph-node + .nv-graph-node::after {
  content: "";
  position: absolute;
  left: 17px;
  top: -10px;
  width: 1px;
  height: 10px;
  background: rgba(255,255,255,.18);
}

/* ---------- Hiérarchie de l'accueil ---------- */
.originals-showcase {
  margin-top: 0 !important;
  padding: clamp(18px, 2vw, 26px) !important;
  border-radius: 26px !important;
  background:
    radial-gradient(circle at 88% 10%, rgba(245,53,167,.12), transparent 30%),
    radial-gradient(circle at 12% 100%, rgba(137,89,255,.09), transparent 36%),
    var(--nv-surface) !important;
}

.originals-heading h1,
.home-content-switcher h2,
.section-head h2,
.known-characters-head h2 {
  letter-spacing: -.035em;
}

.originals-heading p,
.section-head p,
.known-characters-head p,
.home-content-switcher p {
  color: var(--muted);
  line-height: 1.55;
}

.home-content-switcher {
  margin-top: 28px !important;
  padding: 0 0 14px !important;
}

.content-filter-pills button,
.filter-chip,
.trend-mode,
.tag {
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.content-filter-pills button:hover,
.filter-chip:hover,
.trend-mode:hover,
.tag:hover {
  transform: translateY(-1px);
}

/* ---------- Cartes et surfaces cohérentes ---------- */
.original-portrait-card,
.known-character-card,
.trend-card,
.trend-lora-mini,
.home-category-card,
.artist-card,
.meta-card,
.similar,
.lora-card {
  border-color: var(--nv-border) !important;
  background-color: var(--nv-surface) !important;
}

.original-portrait-card,
.known-character-card,
.trend-card,
.trend-lora-mini,
.home-category-card,
.lora-card {
  box-shadow: 0 14px 38px rgba(0,0,0,.18);
}

.original-portrait-card:hover,
.known-character-card:hover,
.trend-card:hover,
.trend-lora-mini:hover,
.home-category-card:hover,
.lora-card:hover {
  border-color: rgba(245,53,167,.4) !important;
  box-shadow: 0 18px 48px rgba(0,0,0,.25);
}

.original-card-copy h2,
.known-character-info h3,
.trend-content h3,
.lora-card-body h3 {
  letter-spacing: -.025em;
}

/* ---------- Hero éditorial existant ---------- */
.feature-grid {
  gap: clamp(22px, 2.3vw, 34px) !important;
  align-items: start !important;
}

.hero-card {
  border-radius: 26px !important;
  box-shadow: 0 32px 88px rgba(0,0,0,.35) !important;
}

.detail-panel {
  padding-top: 10px !important;
}

.detail-panel > h1 {
  margin-top: 14px !important;
  font-size: clamp(2.55rem, 4vw, 4.55rem) !important;
  line-height: .96 !important;
  letter-spacing: -.055em !important;
}

.detail-panel .description {
  max-width: 620px;
  color: var(--nv-text-soft) !important;
  line-height: 1.65 !important;
}

.main-actions {
  gap: 10px !important;
}

.main-actions .primary-button {
  flex: 1 1 220px;
}

.artist-card,
.similar,
.metadata {
  margin-top: 12px !important;
}

/* ---------- Sections ---------- */
.section-head,
.known-characters-head,
.trend-extended-head {
  gap: 18px !important;
}

#trends,
#gallery,
#homeCategories,
#knownCharactersStrip {
  margin-top: 42px !important;
}

.trend-mode-bar,
.gallery-toolbar,
.content-filter-pills {
  gap: 8px !important;
}

.home-category-grid {
  gap: 14px !important;
}

.home-category-card {
  min-height: 150px;
  padding: 20px !important;
}

.home-category-card strong {
  margin-top: 16px !important;
}

/* ---------- Navigation premium ---------- */
.sidebar {
  background: rgba(7,8,14,.95) !important;
  border-right-color: rgba(255,255,255,.07) !important;
}

.nav-button {
  border: 1px solid transparent !important;
}

.nav-button:hover {
  border-color: rgba(255,255,255,.06) !important;
}

.nav-button.active {
  border-color: rgba(245,53,167,.18) !important;
  background: linear-gradient(145deg, rgba(245,53,167,.12), rgba(137,89,255,.08)) !important;
}

.topbar {
  border-bottom-color: rgba(255,255,255,.07) !important;
  background: rgba(8,9,16,.92) !important;
}

.search input {
  border-color: rgba(255,255,255,.1) !important;
  background: rgba(255,255,255,.032) !important;
}

/* ---------- Footer propre ---------- */
#siteFooter {
  margin-top: 56px !important;
  padding: 28px 0 34px !important;
}

.nv-production-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: .72rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nv-brand-hero {
    grid-template-columns: 1fr;
  }

  .nv-graph-card {
    max-width: 760px;
  }

  .nv-graph-flow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .nv-graph-node + .nv-graph-node::after {
    left: -10px;
    top: 50%;
    width: 10px;
    height: 1px;
  }
}

@media (max-width: 900px) {
  .page {
    width: min(100% - 26px, var(--nv-page-max)) !important;
  }

  .nv-brand-hero {
    min-height: 0;
    padding: 30px 24px;
    border-radius: 24px;
  }

  .nv-brand-hero h1 {
    font-size: clamp(2.3rem, 9vw, 4rem);
  }

  .nv-graph-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nv-graph-node:nth-child(3)::after {
    display: none;
  }

  .feature-grid {
    grid-template-columns: 1fr !important;
  }

  .detail-panel > h1 {
    font-size: clamp(2.35rem, 8vw, 3.6rem) !important;
  }
}

@media (max-width: 620px) {
  .page {
    width: calc(100% - 18px) !important;
  }

  .nv-brand-hero {
    padding: 24px 18px;
    border-radius: 20px;
  }

  .nv-brand-hero h1 {
    font-size: 2.45rem;
  }

  .nv-brand-actions {
    display: grid;
  }

  .nv-brand-actions > * {
    width: 100%;
  }

  .nv-graph-flow {
    grid-template-columns: 1fr;
  }

  .nv-graph-node + .nv-graph-node::after {
    left: 17px;
    top: -10px;
    width: 1px;
    height: 10px;
  }

  .nv-graph-node:nth-child(3)::after {
    display: block;
  }

  .originals-showcase {
    padding: 14px !important;
  }

  .home-content-switcher,
  .section-head,
  .known-characters-head,
  .trend-extended-head {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  .content-filter-pills,
  .trend-mode-bar,
  .gallery-toolbar {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 5px;
    scrollbar-width: none;
  }

  .content-filter-pills::-webkit-scrollbar,
  .trend-mode-bar::-webkit-scrollbar,
  .gallery-toolbar::-webkit-scrollbar {
    display: none;
  }
}
