/* ============================================================
   NIVEAU SUPÉRIEUR — typographie distinctive + profondeur
   Space Grotesk (display) + JetBrains Mono (chiffres)
   ============================================================ */

/* ---------- Chiffres en mono : style terminal trading ---------- */
.wx-stat .v, .wr-stat-num, .wx-proof-num, .wx-count {
  font-family: var(--font-mono) !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---------- Titres : Space Grotesk plus affirmé ---------- */
.wx-hero h1 {
  font-weight: 700;
  letter-spacing: -0.045em;
}
.wx-h2, .wr-h2 {
  letter-spacing: -0.03em;
}

/* ---------- Profondeur : cartes avec vraie matière ---------- */
.wx-sys-card, .wr-stat, .wx-proof-grid > div {
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 40%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow:
    0 1px 0 rgba(255,255,255,.06) inset,
    0 20px 50px rgba(0, 0, 0, .4);
  border: 1px solid rgba(255,255,255,.07);
}
.wx-sys-card:hover, .wr-stat:hover {
  box-shadow:
    0 1px 0 rgba(255,255,255,.08) inset,
    0 24px 60px rgba(0, 0, 0, .5),
    0 0 40px rgba(0, 208, 132, .06);
  border-color: rgba(0, 208, 132, .25);
}

/* ---------- Hero : halo de fond plus riche ---------- */
.wx-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(800px 400px at 50% -100px, rgba(0, 208, 132, .09), transparent 70%),
    radial-gradient(600px 300px at 85% 30%, rgba(41, 98, 255, .05), transparent 70%),
    radial-gradient(600px 300px at 15% 40%, rgba(0, 208, 132, .04), transparent 70%);
}

/* ---------- Machine : bordure lumineuse ---------- */
.wx-machine {
  border: 1px solid rgba(0, 208, 132, .14);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .5),
    0 -20px 80px rgba(0, 208, 132, .08),
    0 30px 80px rgba(0, 0, 0, .55),
    0 0 120px rgba(0, 208, 132, .04);
}

/* ---------- Labels de stats : mono aussi ---------- */
.wr-stat-label, .wx-stat .k, .wx-eyebrow {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
}

/* ---------- Prix : impact maximal ---------- */
.wx-price, .tarif-prix {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* ---------- Scrollbar : finition premium ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: #1E2532; border-radius: 8px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #2A3446; }

/* ---------- Détails : dividers subtils ---------- */
.wx-section {
  position: relative;
}
.wx-section + .wx-section::before {
  content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
}
/* ---------- Nav membre : indicateur de scroll ---------- */
.member-nav {
  position: relative;
  /* Fade à droite pour indiquer qu'on peut scroller */
  mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent 100%);
  /* S'assurer que le scroll est fluide */
  scroll-behavior: smooth;
  /* Padding à droite pour que le dernier bouton soit accessible */
  padding-right: 1rem;
}
/* Quand on arrive à la fin du scroll, enlever le fade */
.member-nav.scrolled-end {
  mask-image: none;
  -webkit-mask-image: none;
}

/* ---------- Nav membre : grille sur mobile, tout visible ---------- */
@media (max-width: 768px) {
  .member-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    overflow-x: visible;
    mask-image: none;
    -webkit-mask-image: none;
    padding-right: 0;
    padding-bottom: 0;
  }
  .member-nav a {
    padding: .65rem .3rem;
    font-size: .78rem;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }
}
/* Très petits écrans : 2 colonnes */
@media (max-width: 380px) {
  .member-nav {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Nav membre : grille partout, tout visible ---------- */
.member-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  overflow-x: visible;
  mask-image: none;
  -webkit-mask-image: none;
  padding-right: 0;
}
.member-nav a {
  flex: 0 1 auto;
}

/* ---------- Nav membre : version propre ---------- */
.member-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: center;
  background: rgba(18, 22, 31, .6);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  padding: .6rem;
  margin-bottom: 1.75rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.member-nav a {
  padding: .5rem .9rem;
  font-size: .82rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  flex: 0 1 auto;
}
.member-nav a:hover {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.08);
}
.member-nav a.active {
  background: rgba(0, 208, 132, .12);
  border-color: rgba(0, 208, 132, .35);
  color: var(--text);
  box-shadow: 0 0 16px rgba(0, 208, 132, .1);
}
/* Mobile : grille 3 colonnes dans le conteneur */
@media (max-width: 768px) {
  .member-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .4rem;
  }
  .member-nav a {
    text-align: center;
    padding: .65rem .3rem;
    font-size: .78rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
@media (max-width: 380px) {
  .member-nav { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   SIDEBAR MEMBRE — menu vertical à gauche
   ============================================================ */

/* Bouton hamburger (mobile uniquement) */
.sidebar-toggle {
  display: none;
  position: fixed; top: 1rem; left: 1rem; z-index: 60;
  width: 44px; height: 44px;
  background: rgba(18, 22, 31, .9);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  backdrop-filter: blur(12px);
}
.sidebar-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
body.sidebar-open .sidebar-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.sidebar-open .sidebar-toggle span:nth-child(2) { opacity: 0; }
body.sidebar-open .sidebar-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 55;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(2px);
}

/* Sidebar */
.member-sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 58;
  width: 240px;
  background: rgba(14, 17, 24, .95);
  border-right: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 5.5rem 1rem 1.5rem;
  overflow-y: auto;
  transition: transform .28s cubic-bezier(.2,.9,.3,1);
}

.sidebar-nav { display: flex; flex-direction: column; gap: .15rem; }

.sidebar-sep {
  font-family: var(--font-mono);
  font-size: .65rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-dim);
  padding: 1.1rem .8rem .4rem;
}
.sidebar-sep:first-child { padding-top: 0; }

.sidebar-nav a {
  display: block;
  padding: .65rem .8rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: .9rem; font-weight: 500;
  border: 1px solid transparent;
  transition: all .15s ease;
  white-space: nowrap;
}
.sidebar-nav a:hover {
  color: var(--text); text-decoration: none;
  background: rgba(255,255,255,.04);
}
.sidebar-nav a.active {
  color: var(--text);
  background: rgba(0, 208, 132, .1);
  border-color: rgba(0, 208, 132, .25);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--green);
}

/* Contenu décalé */
body.has-sidebar main .container,
body.has-sidebar .container {
  margin-left: 240px;
  max-width: calc(1080px + 240px);
}

/* Cacher l'ancienne nav horizontale */
.member-nav { display: none !important; }

/* ---------- Mobile : drawer ---------- */
@media (max-width: 900px) {
  .sidebar-toggle { display: flex; }
  .member-sidebar {
    transform: translateX(-100%);
    box-shadow: 20px 0 60px rgba(0,0,0,.5);
  }
  body.sidebar-open .member-sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-overlay { display: block; }
  body.has-sidebar main .container,
  body.has-sidebar .container {
    margin-left: auto;
    max-width: 1080px;
  }
}

/* ---------- Sélecteur de profil (inscription) ---------- */
.field-label {
  display: block; font-weight: 600; margin-bottom: .6rem; font-size: .95rem;
}
.profil-picker {
  display: grid; grid-template-columns: 1fr 1fr; gap: .7rem;
}
.profil-card {
  position: relative; cursor: pointer;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface);
  padding: 1rem .9rem;
  display: flex; flex-direction: column; gap: .3rem;
  transition: border-color .18s ease, box-shadow .18s ease, transform .15s ease;
}
.profil-card:hover {
  border-color: var(--muted-dim);
  transform: translateY(-1px);
}
.profil-card input[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none;
}
.profil-card:has(input:checked) {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green), 0 0 24px rgba(0, 208, 132, .15);
}
.profil-card:has(input:focus-visible) {
  outline: 2px solid var(--green); outline-offset: 2px;
}
.profil-title { font-weight: 700; font-size: 1rem; color: var(--text); }
.profil-desc { font-size: .82rem; color: var(--muted); line-height: 1.45; }
.profil-card:has(input:checked) .profil-title { color: var(--green); }
@media (max-width: 480px) {
  .profil-picker { grid-template-columns: 1fr; }
}

/* ---------- Toggle version simplifiée / détaillée ---------- */
.version-toggle {
  display: inline-flex; gap: .3rem;
  background: rgba(18, 22, 31, .7);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px; padding: .3rem;
  margin: 1rem 0 0;
}
.version-toggle a {
  padding: .5rem 1.1rem; border-radius: 999px;
  font-size: .85rem; font-weight: 600; color: var(--muted);
  transition: all .15s ease; white-space: nowrap;
}
.version-toggle a:hover { color: var(--text); text-decoration: none; }
.version-toggle a.active {
  background: rgba(0, 208, 132, .14);
  color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(0, 208, 132, .3);
}

.sidebar-home {
  display: block;
  text-align: center;
  padding: .6rem;
  margin-bottom: .8rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;
  transition: all .15s ease;
}
.sidebar-home:hover {
  color: var(--text);
  border-color: rgba(0, 208, 132, .4);
  background: rgba(0, 208, 132, .06);
  text-decoration: none;
}

/* ---------- Badges admin utilisateurs ---------- */
.badge.badge-paid { color: var(--green); border-color: rgba(0, 208, 132, .5); background: rgba(0, 208, 132, .08); }
.badge.badge-trial { color: var(--amber); border-color: rgba(232, 180, 74, .5); background: rgba(232, 180, 74, .08); }
.badge.badge-free { color: var(--muted); border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.04); }

.badge-coach {
  background: rgba(255, 170, 0, .12);
  border: 1px solid rgba(255, 170, 0, .4);
  color: #ffaa00;
  padding: .2rem .6rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
