:root {
  --v4-bg: #080806;
  --v4-bg2: #11100d;
  --v4-card: rgba(246, 238, 222, 0.07);
  --v4-card2: rgba(246, 238, 222, 0.11);
  --v4-text: #f4ecdf;
  --v4-muted: #b8ad9d;
  --v4-red: #ff3b22;
  --v4-orange: #ff8a00;
  --v4-line: rgba(244, 236, 223, 0.13);
  --v4-line2: rgba(255, 59, 34, 0.38);
}

/* RESET DA GALAXIE */
body.da-v4,
body {
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 59, 34, 0.12), transparent 26%),
    linear-gradient(135deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 12px),
    linear-gradient(180deg, var(--v4-bg) 0%, var(--v4-bg2) 58%, #050504 100%) !important;
  color: var(--v4-text);
}

#particles {
  display: none !important;
}

body::before {
  display: none !important;
}

.v4-noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.08;
  background-image: repeating-radial-gradient(circle at 30% 30%, #fff 0 1px, transparent 1px 4px);
  mix-blend-mode: overlay;
}

.v4-bg-lines {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(244,236,223,.055) 1px, transparent 1px),
    linear-gradient(rgba(244,236,223,.04) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: linear-gradient(180deg, black, transparent 88%);
}

.page-loader {
  background: #080806 !important;
}

.v4-topbar,
.topbar {
  background: rgba(8, 8, 6, 0.78) !important;
  border: 1px solid var(--v4-line) !important;
  box-shadow: 0 16px 70px rgba(0,0,0,.38) !important;
}

.brand-mark {
  background: var(--v4-text) !important;
  color: #080806 !important;
  box-shadow: none !important;
}

.live-pill,
.btn-primary {
  background: var(--v4-red) !important;
  color: white !important;
  box-shadow: 0 16px 45px rgba(255,59,34,.22) !important;
}

.live-pill span {
  background: white !important;
  box-shadow: 0 0 16px white !important;
}

.btn-secondary,
.btn-ghost {
  background: rgba(244,236,223,.08) !important;
  border: 1px solid var(--v4-line) !important;
}

.v4-main {
  width: min(1180px, calc(100% - 32px));
}

.v4-hero {
  min-height: 82vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  gap: 42px;
  align-items: center;
  padding: 70px 0 40px;
}

.v4-left h1 {
  font-size: clamp(72px, 13vw, 170px);
  line-height: 0.84;
  letter-spacing: -0.095em;
  color: var(--v4-text) !important;
  background: none !important;
  filter: none !important;
  text-transform: none;
}

.v4-subtitle {
  max-width: 720px;
  margin-top: 26px;
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.45;
  color: var(--v4-muted);
}

.v4-label-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.v4-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--v4-line);
  background: rgba(244,236,223,.07);
  color: var(--v4-text);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .08em;
}

.v4-label.danger {
  background: var(--v4-red);
  border-color: var(--v4-red);
  color: white;
}

.v4-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.v4-countdown {
  margin-top: 28px;
  width: min(450px, 100%);
  padding: 20px;
  border: 1px solid var(--v4-line);
  background: rgba(244,236,223,.07);
  border-radius: 24px;
}

.v4-countdown small {
  display: block;
  color: var(--v4-muted);
  font-weight: 900;
  margin-bottom: 6px;
}

.v4-countdown strong {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.06em;
}

.v4-portrait-card {
  position: relative;
  min-height: 550px;
  border-radius: 34px;
  border: 1px solid var(--v4-line);
  background:
    linear-gradient(180deg, rgba(244,236,223,.10), rgba(244,236,223,.045)),
    #0c0c09;
  overflow: hidden;
  padding: 24px;
  box-shadow: 0 30px 100px rgba(0,0,0,.35);
}

.v4-portrait-card::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(244,236,223,.08);
  border-radius: 26px;
  pointer-events: none;
}

.v4-portrait-card::after {
  content: "21H00";
  position: absolute;
  right: -36px;
  top: 150px;
  transform: rotate(90deg);
  color: rgba(244,236,223,.08);
  font-size: 70px;
  font-weight: 1000;
  letter-spacing: -0.08em;
}

.v4-card-top,
.v4-card-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.v4-card-top span {
  font-size: 12px;
  letter-spacing: .12em;
  font-weight: 1000;
  color: var(--v4-muted);
}

.hero-portrait {
  position: relative;
  z-index: 2;
  width: 230px;
  height: 230px;
  margin: 78px auto 0;
  border-radius: 50%;
  padding: 7px;
  background: linear-gradient(135deg, var(--v4-red), var(--v4-text));
  box-shadow: 0 0 0 14px rgba(255,59,34,.07);
}

.hero-portrait img,
.portrait-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #15130f;
  object-fit: cover;
  border: 6px solid #080806;
}

.portrait-fallback {
  display: none;
  place-items: center;
  font-size: 82px;
  font-weight: 1000;
  color: var(--v4-text);
}

.hero-portrait.no-photo img {
  display: none;
}

.hero-portrait.no-photo .portrait-fallback {
  display: grid;
}

.v4-live-stamp {
  position: relative;
  z-index: 4;
  width: fit-content;
  margin: -18px auto 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--v4-red);
  color: white;
  font-size: 14px;
  font-weight: 1000;
  box-shadow: 0 12px 34px rgba(255,59,34,.25);
}

.v4-card-bottom {
  margin-top: 76px;
  padding-top: 20px;
  border-top: 1px solid var(--v4-line);
}

.v4-card-bottom small {
  color: var(--v4-muted);
  display: block;
  margin-bottom: 4px;
}

.v4-card-bottom strong {
  font-size: 23px;
}

.v4-card-bottom a {
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--v4-text);
  color: #080806;
  font-weight: 1000;
}

.v4-live-section {
  padding: 56px 0;
}

.v4-section-title {
  display: flex;
  align-items: end;
  gap: 18px;
  margin-bottom: 24px;
}

.v4-section-title span {
  color: var(--v4-red);
  font-weight: 1000;
  font-size: 18px;
}

.v4-section-title h2 {
  color: var(--v4-text) !important;
  background: none !important;
  filter: none !important;
  font-size: clamp(38px, 6vw, 74px);
}

.v4-bento {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 16px;
}

.v4-bento-main,
.v4-bento-card {
  min-height: 220px;
  border: 1px solid var(--v4-line);
  border-radius: 28px;
  background: rgba(244,236,223,.07);
  padding: 24px;
  text-decoration: none;
  transition: .22s ease;
}

.v4-bento-main {
  grid-row: span 2;
  background:
    radial-gradient(circle at 80% 15%, rgba(255,59,34,.18), transparent 28%),
    rgba(244,236,223,.08);
}

.v4-bento-main:hover,
.v4-bento-card:hover,
.v4-feature-row article:hover,
.v4-logo-wall a:hover {
  transform: translateY(-6px);
  border-color: var(--v4-line2);
}

.v4-mini-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--v4-red);
  margin-bottom: 28px;
}

.v4-mini-logo img {
  width: 30px;
  filter: invert(1);
}

.v4-bento-main h3 {
  font-size: clamp(34px, 5vw, 62px);
  letter-spacing: -0.07em;
  margin-bottom: 14px;
}

.v4-bento-main p,
.v4-bento-card span,
.v4-feature-row p {
  color: var(--v4-muted);
  line-height: 1.55;
}

.v4-bento-main span,
.v4-bento-card strong {
  display: block;
  margin-top: 20px;
  color: var(--v4-text);
  font-weight: 1000;
}

.v4-feature-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.v4-feature-row article {
  min-height: 230px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--v4-line);
  background: rgba(244,236,223,.07);
  transition: .22s ease;
}

.v4-feature-row article span {
  display: block;
  font-size: 32px;
  margin-bottom: 22px;
}

.v4-logo-wall {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.v4-logo-wall a {
  min-height: 130px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--v4-line);
  background: rgba(244,236,223,.07);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-weight: 1000;
  transition: .22s ease;
}

.v4-logo-wall img {
  width: 34px;
  height: 34px;
  filter: invert(1);
}

.video-card,
.skeleton-card,
.manual-card,
.network-card,
.feature-card,
.api-card {
  background: rgba(244,236,223,.07) !important;
  border-color: var(--v4-line) !important;
}

h1,
h2 {
  color: var(--v4-text) !important;
  background: none !important;
  filter: none !important;
}

.badge,
.live-badge {
  background: rgba(244,236,223,.08) !important;
  border-color: var(--v4-line) !important;
  color: var(--v4-text) !important;
  box-shadow: none !important;
}

.profile-ring,
.premium-avatar,
.status-ring {
  display: none !important;
}

/* Corrige définitivement le faux bouton pause / double avatar */
.profile-fallback {
  display: none !important;
}

@media (max-width: 1000px) {
  .v4-hero {
    grid-template-columns: 1fr;
  }

  .v4-right {
    order: -1;
  }

  .v4-portrait-card {
    min-height: 430px;
  }

  .hero-portrait {
    width: 180px;
    height: 180px;
    margin-top: 48px;
  }

  .v4-card-bottom {
    margin-top: 44px;
  }

  .v4-bento {
    grid-template-columns: 1fr;
  }

  .v4-bento-main {
    grid-row: auto;
  }

  .v4-feature-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .v4-logo-wall {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 650px) {
  .v4-main {
    width: min(100% - 22px, 1180px);
  }

  .v4-hero {
    padding-top: 34px;
    gap: 26px;
  }

  .v4-left h1 {
    font-size: clamp(64px, 21vw, 100px);
  }

  .v4-actions {
    flex-direction: column;
  }

  .v4-feature-row,
  .v4-logo-wall {
    grid-template-columns: 1fr;
  }

  .v4-portrait-card {
    min-height: 390px;
  }

  .hero-portrait {
    width: 150px;
    height: 150px;
  }
}
