/* ──────────────────────────────────────────────────────────────────────────
   Global stylesheet — C2BZ VIP (static rewrite)
   Inline styles on each element carry the pixel-level design; this file holds
   only what inline styles can't express: CSS variables / design tokens, resets,
   @keyframes, scrollbar hiding, and the phone/scroll/horizontal-row/marquee
   layout shells. Consolidated from src/index.css + src/theme/tokens.ts.
   ────────────────────────────────────────────────────────────────────────── */

:root {
  /* From index.css */
  --bg: #0c0a14;
  --panel: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.09);
  --text: #ece8f4;
  --dim: rgba(236, 232, 244, 0.55);
  --violet: oklch(0.72 0.13 312);
  --blue: oklch(0.74 0.11 252);

  /* Folded in from theme/tokens.ts (the `V` object) */
  --dim2: rgba(236, 232, 244, 0.36);
  --panel2: rgba(255, 255, 255, 0.03);
  --field: rgba(255, 255, 255, 0.04);
  --field-border: rgba(255, 255, 255, 0.12);
  --star: #ffc24b;
  --cta: linear-gradient(135deg, oklch(0.66 0.16 322), oklch(0.6 0.15 272));
  --cta-shadow: 0 12px 36px oklch(0.55 0.16 300 / 0.45);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  /* Désactive le pinch / double-tap zoom (en plus de la meta viewport). */
  touch-action: pan-x pan-y;
}

body {
  background: var(--bg);
  font-family: Manrope, sans-serif;
  color: var(--text);
}

/* Mobile mode: the phone fills the viewport and the inner .scroll handles
   scrolling, so the body itself stays fixed (no rubber-band / double scrollbar). */
body.vip-mobile {
  overflow: hidden;
}

/* Desktop mode: a normal, full-page scroll. */
body.vip-desktop {
  overflow-x: hidden;
  overflow-y: auto;
}

#root {
  width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ── Static layout helpers: ship BOTH layouts, toggle by viewport ───────────
   On masque le layout inactif avec !important pour battre le display:flex/block
   que .stage/.layout posent sur l'élément racine (même spécificité). Le layout
   actif garde son display naturel. */
@media (max-width: 767px) {
  .only-desktop {
    display: none !important;
  }
}
@media (min-width: 768px) {
  .only-mobile {
    display: none !important;
  }
}

/* Footer legal links. */
.legal-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--dim);
  text-decoration: underline;
  text-underline-offset: 2px;
  font: 500 12px Manrope, sans-serif;
  transition: color 0.15s;
}
.legal-link:hover {
  color: var(--text);
}

/* The dark, centered "stage" the phone frame sits on. */
.stage {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 60% at 50% 0%, #16101f, #050409);
}

/* The phone fills the real device viewport, edge to edge. */
.phone {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  overflow: hidden;
}

/* Vertically scrolling content area inside the phone. */
.scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
}

/* Horizontally scrollable rows (stories, media cards) with snap. */
.hrow {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 24px;
  padding: 0 24px 4px;
}
.hrow > * {
  scroll-snap-align: start;
}

/* Hide scrollbars on scrollable surfaces. */
.scroll::-webkit-scrollbar,
.hrow::-webkit-scrollbar {
  display: none;
}
.scroll,
.hrow {
  scrollbar-width: none;
}

/* Reviews marquee track. */
.mtrack {
  display: flex;
  gap: 12px;
  width: max-content;
  will-change: transform;
}

/* ── Desktop layout ──────────────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 28px;
  align-items: start;
}
@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr !important;
  }
  .side {
    position: static !important;
  }
}

/* Media grid: 3 columns, dropping to 2 on the narrowest desktop widths. */
.grid-media {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 720px) {
  .grid-media {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Hide a horizontal row's scrollbar without .hrow's snap/padding. */
.no-scrollbar {
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Styled page scrollbar — desktop mode only (mobile hides its scrollbars). */
body.vip-desktop::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
body.vip-desktop::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes fill {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}
@keyframes vIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes sheetUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes mLeft {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@keyframes mRight {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Aperçus de stories floutés dans les bulles du rail (effet teaser). Le filtre
   est porté par le slot → il floute le média injecté en dessous. Ne touche PAS
   le lecteur plein écran (hors [data-action="open-story"]), qui a son propre flou. */
[data-action="open-story"] [data-slot^="stories."] {
  filter: blur(5px);
}
