/* =============================================================
   NW HUB — habillage de la boutique SellAuth
   À coller dans : dash.sellauth.com/theme (au singulier) > ton thème
   actif > Code Editor > assets/custom.css. C'est le fichier servi sur
   /assets/279114/custom.css.

   Objectif : que la boutique soit la suite du site nw-hub, pas un
   thème SellAuth reconnaissable. Même palette, même trio
   typographique, même vocabulaire d'animation (opacité + flou +
   montée) que assets/css/styles.css.

   Le thème est en Tailwind avec des jetons de couleur en RGB
   (--cl-*). On repeint par les jetons quand c'est possible, par
   les classes utilitaires quand ça ne l'est pas.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@500;600&display=swap');

/* ── 1. Palette : les jetons du thème prennent les valeurs du site ──
   `html:root` et pas `:root` : le thème réécrit ces jetons dans un
   <style id="theme-styles"> placé APRÈS custom.css. À sélecteur égal
   il gagnerait ; un cran de spécificité en plus suffit. */
html:root {
  --cl-background: 5, 5, 6;       /* #050506 */
  --cl-card:       12, 12, 17;    /* #0c0c11 */
  --cl-accent:     124, 108, 255; /* #7c6cff */
  --cl-t-primary:  244, 244, 247;
  --cl-t-accent:   255, 255, 255;

  --nw-line:   #1f1f28;
  --nw-dim:    #a8a8b8;
  --nw-radius: 12px;
  --nw-out:    cubic-bezier(.16, 1, .3, 1);

  --nw-display: "Chakra Petch", Impact, "Arial Black", sans-serif;
  --nw-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --nw-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* ── 2. Typographie : Inter au texte, Chakra Petch au titrage ──
   Inter ne titre jamais, c'est la règle du site. */
html body,
html #app,
html input, html select, html textarea, html button {
  font-family: var(--nw-sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5,
nav.component a,
footer p[class*="font-semibold"],
a[class*="border-accent-500"],
a[class*="bg-accent-500"],
button[class*="border-accent-500"],
button[class*="bg-accent-500"] {
  font-family: var(--nw-display);
  letter-spacing: .01em;
}

h1, h2 { letter-spacing: -.015em; }

/* Les petites étiquettes en capitales passent en mono, comme sur
   le site : ça les distingue du texte courant sans les grossir. */
.announcement p,
.currency-selector,
footer a[class*="text-xs"] {
  font-family: var(--nw-mono);
  font-size: 12px;
  letter-spacing: .04em;
}

::selection { background: rgb(var(--cl-accent)); color: #fff; }

:focus-visible {
  outline: 2px solid rgb(var(--cl-accent));
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── 3. Fond : la lumière appartient au haut de page ──
   Le réseau de particules du thème est ramené à un bruit de fond
   et s'efface en descendant, au lieu de barrer tout l'écran. */
#particles-js {
  opacity: .16 !important;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 62%);
          mask-image: linear-gradient(to bottom, #000 0%, transparent 62%);
}

/* Le fond du <body> est pose en style inline par le theme
   (background-color: rgb(6,6,12)), donc seul !important le
   deplace. On le renvoie sur le jeton, pas sur une valeur en dur. */
html body {
  background-color: rgb(var(--cl-background)) !important;
}

html body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 780px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(124, 108, 255, .22), transparent 70%),
    radial-gradient(620px 320px at 88% 4%, rgba(42, 212, 255, .10), transparent 72%);
}

/* ── 4. Bandeau d'annonce : une ligne, pas une bannière ── */
.announcement > div {
  background: rgba(124, 108, 255, .10) !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(124, 108, 255, .22) !important;
  color: #cfc9ff !important;
  padding: 7px 12px !important;
  backdrop-filter: blur(8px);
}

/* ── 5. Barre de navigation ── */
nav.component > div {
  border-radius: var(--nw-radius);
  border-color: var(--nw-line) !important;
  background: rgba(8, 8, 11, .72) !important;
  backdrop-filter: blur(14px) saturate(140%);
}

nav.component a { transition: color .18s ease, opacity .18s ease; }

/* ── 6. Hero : moins de vide, une entrée qui n'est pas plate ── */
.components > section:first-child > div { padding-block: 3.5rem !important; }

.components > section:first-child h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.05;
  text-wrap: balance;
}

.components > section:first-child > div > div > div > p {
  color: var(--nw-dim) !important;
  max-width: 46ch;
  margin-inline: auto;
  text-wrap: pretty;
}

/* ── 7. Titres de section : le filet accent tient le rythme ── */
.components h2 + hr {
  border-color: rgb(var(--cl-accent)) !important;
  opacity: .9;
  width: 56px;
  margin-top: 10px !important;
}

/* ── 8. Boutons ──
   Le thème ne livre que des boutons à contour. Le premier bouton
   du hero devient plein : sur une page qui vend, l'action
   principale doit se voir en une seconde. */
/* La signature d'un bouton du theme est `px-6 py-2 font-semibold`,
   commune au style plein et au style contour : on vise ca plutot
   qu'une couleur, qui change d'une variante a l'autre. */
a[class*="px-6"][class*="py-2"][class*="font-semibold"],
button[class*="px-6"][class*="py-2"][class*="font-semibold"] {
  border-radius: 10px !important;
  transition: transform .25s var(--nw-out), background-color .18s ease,
              box-shadow .25s var(--nw-out), border-color .18s ease !important;
}

a[class*="px-6"][class*="py-2"][class*="font-semibold"]:hover,
button[class*="px-6"][class*="py-2"][class*="font-semibold"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(124, 108, 255, .22);
}

/* Le bouton plein du hero prend le degrade et le halo du site. */
.components > section:first-child a[class*="bg-accent-500"] {
  background: linear-gradient(180deg, #8b7bff, #6d5bf0) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 10px 26px rgba(124, 108, 255, .30);
}

.components > section:first-child a[class*="bg-accent-500"]:hover {
  box-shadow: 0 16px 38px rgba(124, 108, 255, .42);
}

/* ── 9. Cartes : produits, catégories, arguments, pied de page ── */
[class*="bg-card"] {
  border-radius: var(--nw-radius) !important;
  border-color: var(--nw-line) !important;
  transition: transform .3s var(--nw-out), border-color .25s ease,
              box-shadow .3s var(--nw-out);
}

.components [class*="bg-card"]:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 108, 255, .45) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
}

.components [class*="bg-card"] h4 {
  letter-spacing: .02em;
  font-size: 15px;
}

/* Le pied de page ne bouge pas au survol, ce n'est pas une carte. */
footer[class*="bg-card"]:hover { transform: none; box-shadow: none; }

/* Les liens légaux passent à la ligne au lieu d'élargir la page. */
footer .flex.gap-3 { flex-wrap: wrap; }

/* ── 10. Champs de saisie et sélecteurs ── */
input, select, textarea,
.choices__inner {
  border-radius: 10px !important;
  background: rgba(18, 18, 24, .8) !important;
  border-color: var(--nw-line) !important;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(124, 108, 255, .55) !important;
}

/* ── 11. Compteurs à zéro : masqués tant qu'ils sont vides ──
   Zéro vendu, zéro avis et 0.00 étoile en page d'accueil coûtent
   des ventes. À retirer plutôt dans l'éditeur de thème (composant
   Statistics) ; cette règle sert de garde-fou. */
.components > section:has(div[class*="border-b-2"] > p[class*="text-accent-500"][class*="font-bold"]) {
  display: none;
}

/* Meme logique pour une section dont la rangee de cartes est
   vide : la rubrique « Browse Categories » sans categorie n'est
   qu'un titre suivi d'un trou. Elle revient toute seule des
   qu'une categorie existe. */
/* Un :has() imbrique dans un :not() imbrique dans un :has()
   est rejete par le navigateur et emporterait la regle : on
   garde les deux pseudo-classes au meme niveau. */
.components > section:has(> div > div[class*="flex-wrap"]):not(:has(> div > div[class*="flex-wrap"] > *)) {
  display: none;
}

/* ── 12. Entrée des sections : opacité + flou + montée ──
   C'est la signature du site ; sans le flou, une apparition paraît
   plate. Désactivée si la machine demande moins de mouvement. */
@keyframes nwRise {
  from { opacity: 0; filter: blur(8px); transform: translateY(18px); }
  to   { opacity: 1; filter: blur(0);   transform: none; }
}

.components > section {
  animation: nwRise .7s var(--nw-out) both;
}

.components > section:nth-child(2) { animation-delay: .06s; }
.components > section:nth-child(3) { animation-delay: .12s; }
.components > section:nth-child(4) { animation-delay: .18s; }
.components > section:nth-child(n+5) { animation-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .components > section { animation: none; }
  .components [class*="bg-card"]:hover,
  a[class*="px-6"][class*="py-2"][class*="font-semibold"]:hover { transform: none; }
}

/* ── 13. Petits écrans : le hero respire moins, la nav se resserre ── */
@media (max-width: 640px) {
  .components > section:first-child > div { padding-block: 2.25rem !important; }
  nav.component > div { border-radius: 10px; }
  html body::before { height: 520px; }
}

/* ── 14. Couche Aizen : GIFs teintés à l'accent ──
   Les URL vivent dans settings.json (side_gif, banner_gif,
   ambient_gif, card_gif, card_gif_lifetime), pas ici : on les
   change dans le Visual Editor sans toucher au CSS.
   Chaque GIF passe par la même recette pour tenir la palette :
   un peu de gris, une teinte violette en mode `color`, des lignes
   de balayage. Au survol, la couleur d'origine revient. */
@property --nw-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes nwSpin  { to { --nw-angle: 360deg; } }
@keyframes nwFloat { 50% { transform: translateY(-10px); } }
@keyframes nwFlick {
  0%, 92%, 100% { opacity: 1; }
  93% { opacity: .55; }
  95% { opacity: .9; }
  97% { opacity: .6; }
}

.nw-gif-frame,
.nw-banner,
.nw-card-gif {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: rgb(var(--cl-card));
}

.nw-gif-frame img,
.nw-banner-gif,
.nw-card-gif img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(.35) contrast(1.08) brightness(.88);
  transition: filter .5s ease, transform .9s var(--nw-out);
}

.nw-gif-tint,
.nw-gif-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.nw-gif-tint {
  background: linear-gradient(160deg, rgba(124, 108, 255, .7), rgba(40, 20, 110, .25) 55%, rgba(42, 212, 255, .35));
  mix-blend-mode: color;
  transition: opacity .5s ease;
}

.nw-gif-scan {
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  opacity: .6;
}

.nw-gif-frame:hover img,
.nw-banner:hover .nw-banner-gif,
a:hover .nw-card-gif img {
  filter: grayscale(0) contrast(1.05) brightness(1);
  transform: scale(1.04);
}

.nw-gif-frame:hover .nw-gif-tint,
.nw-banner:hover .nw-gif-tint,
a:hover .nw-card-gif .nw-gif-tint { opacity: .35; }

/* Hero : le GIF flotte dans un cadre dont le liseré tourne. */
.components > section:first-child:has(.nw-hero-gif) > div > div {
  justify-content: space-between;
}

.components > section:first-child:has(.nw-hero-gif) > div > div > div > p {
  margin-inline: 0;
}

.components > section:first-child h1 .text-accent-500 {
  text-shadow: 0 0 28px rgba(124, 108, 255, .55);
}

.nw-hero-gif {
  position: relative;
  flex-shrink: 0;
  width: min(100%, 400px);
  padding: 1px;
  border-radius: 18px;
  animation: nwFloat 7s ease-in-out infinite;
  box-shadow: 0 30px 90px rgba(124, 108, 255, .28);
}

.nw-hero-gif::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    conic-gradient(from var(--nw-angle), rgba(124, 108, 255, .15) 0 55%, #7c6cff 72%, #2ad4ff 82%, rgba(124, 108, 255, .15) 100%);
  animation: nwSpin 6s linear infinite;
}

.nw-hero-gif .nw-gif-frame {
  aspect-ratio: 5 / 6;
  border-radius: 17px;
}

/* Le GIF déborde vers le bas : son filigrane sort du cadre. */
.nw-hero-gif .nw-gif-frame img {
  height: 122%;
  object-position: 50% 0;
}

/* Le bas du GIF porte un filigrane : il se fond dans le fond. */
.nw-hero-gif .nw-gif-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to top, rgb(var(--cl-card)) 18%, transparent);
  pointer-events: none;
}

.nw-gif-caption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 1;
  margin: 0;
  font-family: var(--nw-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: #cfc9ff;
  animation: nwFlick 5s steps(1) infinite;
}

.nw-gif-caption::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: rgb(var(--cl-accent));
  box-shadow: 0 0 10px rgb(var(--cl-accent));
  vertical-align: 1px;
}

/* Bannière des arguments : le texte sur le GIF, lisible à gauche. */
.nw-banner {
  display: flex;
  align-items: center;
  min-height: 300px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--nw-line);
  border-radius: 14px;
}

.nw-banner-gif {
  position: absolute;
  inset: 0;
  object-position: 50% 30%;
}

.nw-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 5, 6, .94) 0%, rgba(5, 5, 6, .72) 45%, rgba(5, 5, 6, .1) 100%);
  pointer-events: none;
}

.nw-banner-copy {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  padding: 2.5rem;
  text-align: left;
}

.nw-banner-copy h2 {
  margin: 0 0 .75rem;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.08;
  font-weight: 700;
  text-wrap: balance;
}

.nw-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 .9rem;
  font-family: var(--nw-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #b3a9ff;
}

.nw-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: rgb(var(--cl-accent));
}

.nw-banner-text {
  margin: 0;
  color: var(--nw-dim);
  max-width: 40ch;
  text-wrap: pretty;
}

/* Cartes produit sans image. */
.nw-card-gif { border-radius: 8px; }

/* Même recadrage que le héros : les filigranes sont en bas. */
.nw-card-gif img {
  height: 120%;
  object-position: 50% 0;
}

/* Ambiance : l'œil, très atténué, derrière le haut de page. */
.nw-ambient {
  position: absolute;
  inset: 0 0 auto 0;
  height: 900px;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: .16;
  -webkit-mask-image: radial-gradient(60% 55% at 22% 18%, #000, transparent 78%);
          mask-image: radial-gradient(60% 55% at 22% 18%, #000, transparent 78%);
}

.nw-ambient img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) grayscale(.5) sepia(.2) hue-rotate(200deg) saturate(2);
}

@media (max-width: 767px) {
  .nw-hero-gif { width: min(100%, 340px); margin-inline: auto; }
  .nw-banner { min-height: 260px; }
  .nw-banner::after { background: linear-gradient(0deg, rgba(5, 5, 6, .95) 20%, rgba(5, 5, 6, .55)); }
  .nw-banner-copy { padding: 1.5rem; }
  .nw-ambient { height: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  .nw-hero-gif,
  .nw-hero-gif::before,
  .nw-gif-caption { animation: none; }
  .nw-gif-frame:hover img,
  .nw-banner:hover .nw-banner-gif,
  a:hover .nw-card-gif img { transform: none; }
}