/* =====================================================================
   GlowUpLive — Layouts : header public, footer, shell dashboard,
   studio de live, expérience spectateur, hero d'accueil.
   ===================================================================== */

/* ------------------------- HEADER PUBLIC ----------------------------- */
.site-header { position: sticky; top: 0; z-index: var(--z-header); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); border-bottom: 1px solid var(--divider); }
.site-header .bar { display: flex; align-items: center; gap: var(--sp-5); height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: var(--fw-extra); font-size: 1.25rem; letter-spacing: -0.02em; }
.brand .brand-mark { width: 34px; height: 34px; }
.brand .brand-name .g { background: var(--gul-gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: var(--sp-2); margin-left: var(--sp-4); }
.nav-links a { padding: 0.5rem 0.85rem; border-radius: var(--r-pill); font-weight: var(--fw-medium); font-size: var(--fs-sm); color: var(--text-muted); }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--chip-bg); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: var(--sp-3); }
.icon-btn { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; color: var(--text-muted); background: var(--chip-bg); transition: all var(--t-fast); }
.icon-btn:hover { color: var(--text); background: var(--surface-hover); }
.menu-toggle { display: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-toggle { display: grid; }
}

/* ------------------------------ FOOTER ------------------------------- */
.site-footer { border-top: 1px solid var(--divider); background: var(--bg-2); margin-top: var(--sp-12); padding-block: var(--sp-10) var(--sp-8); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: var(--sp-7); }
.footer-grid h5 { font-family: var(--font-body); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-subtle); margin-bottom: var(--sp-4); font-weight: var(--fw-bold); }
.footer-grid a { display: block; padding: 0.3rem 0; color: var(--text-muted); font-size: var(--fs-sm); }
.footer-grid a:hover { color: var(--gul-sunset); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: var(--sp-8); padding-top: var(--sp-6); border-top: 1px solid var(--divider); color: var(--text-subtle); font-size: var(--fs-xs); flex-wrap: wrap; gap: var(--sp-3); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ----------------------------- HERO ---------------------------------- */
.hero { position: relative; padding-block: var(--sp-11) var(--sp-10); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--sp-9); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5vw, var(--fs-5xl)); line-height: 1.02; }
.hero .lead { max-width: 44ch; margin-top: var(--sp-5); }
.hero-cta { display: flex; gap: var(--sp-3); margin-top: var(--sp-7); flex-wrap: wrap; }
.hero-stats { display: flex; gap: var(--sp-8); margin-top: var(--sp-8); }
.hero-stats .n { font-family: var(--font-display); font-weight: var(--fw-extra); font-size: var(--fs-2xl); display: block; }
.hero-preview { position: relative; }
.hero-preview .video-frame { box-shadow: var(--shadow-lg); }
.hero-float { position: absolute; background: var(--glass); backdrop-filter: blur(16px); border: 1px solid var(--glass-border); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); box-shadow: var(--shadow-md); }
.hero-float.a { top: -18px; right: -10px; } .hero-float.b { bottom: 24px; left: -26px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-stats { gap: var(--sp-6); } }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: var(--sp-6); gap: var(--sp-4); flex-wrap: wrap; }
.section-head h2 { font-size: var(--fs-2xl); }
.section-head .link { color: var(--gul-sunset); font-weight: var(--fw-semibold); font-size: var(--fs-sm); }

/* ----------------------- CARTES SPÉCIFIQUES -------------------------- */
.live-card { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.live-card .thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.live-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.live-card:hover .thumb img { transform: scale(1.05); }
.live-card .thumb .top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; }
.live-card .meta { padding: var(--sp-4); display: flex; gap: var(--sp-3); }
.live-card .meta .t { font-weight: var(--fw-bold); font-size: var(--fs-sm); line-height: var(--lh-snug); }
.live-card .meta .sub { font-size: var(--fs-xs); color: var(--text-muted); }

.product-card .card-media .fav { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 999px; background: rgba(10,6,14,0.5); backdrop-filter: blur(8px); display: grid; place-items: center; color: #fff; }
.product-card .card-media .tag { position: absolute; top: 10px; left: 10px; }
.product-card .card-body .name { font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.product-card .card-body .brand-name { font-size: var(--fs-xs); color: var(--text-subtle); }

.creator-card { text-align: center; padding: var(--sp-5); }
.creator-card .name { font-weight: var(--fw-bold); margin-top: var(--sp-3); }
.creator-card .handle { color: var(--text-subtle); font-size: var(--fs-xs); }
.creator-card .st { display: flex; justify-content: center; gap: var(--sp-4); margin-top: var(--sp-3); font-size: var(--fs-xs); color: var(--text-muted); }

/* mission / campaign card */
.mission-card { display: flex; flex-direction: column; gap: var(--sp-3); }
.mission-card .head { display: flex; gap: var(--sp-3); align-items: center; }
.mission-card .pay { font-family: var(--font-display); font-weight: var(--fw-extra); font-size: var(--fs-xl); color: var(--gul-sunset); }
.mission-card .pay small { font-size: var(--fs-xs); color: var(--text-muted); font-weight: var(--fw-medium); }
.mission-card .facts { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); font-size: var(--fs-xs); color: var(--text-muted); }
.mission-card .facts span { display: inline-flex; align-items: center; gap: 0.35em; }

/* ----------------------- SHELL DASHBOARD ----------------------------- */
.app-shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg-2); border-right: 1px solid var(--divider); padding: var(--sp-5) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }
.sidebar .brand { padding: var(--sp-2) var(--sp-3) var(--sp-5); font-size: 1.15rem; }
.side-link { display: flex; align-items: center; gap: var(--sp-3); padding: 0.7rem 0.9rem; border-radius: var(--r-md); color: var(--text-muted); font-weight: var(--fw-medium); font-size: var(--fs-sm); transition: all var(--t-fast); }
.side-link svg { width: 20px; height: 20px; flex: none; }
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.active { background: rgba(255,122,89,0.14); color: var(--gul-sunset); font-weight: var(--fw-semibold); }
.side-link .count { margin-left: auto; background: var(--gul-live); color: #fff; font-size: var(--fs-3xs); font-weight: var(--fw-bold); padding: 0.15em 0.5em; border-radius: 999px; }
.side-section { font-size: var(--fs-3xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-subtle); padding: var(--sp-4) var(--sp-3) var(--sp-2); font-weight: var(--fw-bold); }
.side-card { margin-top: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-4); }

.app-main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: var(--z-sticky); height: 68px; display: flex; align-items: center; gap: var(--sp-4); padding-inline: var(--sp-6); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--divider); }
.topbar .search { flex: 1; max-width: 520px; }
.page { padding: var(--sp-6); }
.page-head { margin-bottom: var(--sp-6); }
.page-head h1 { font-size: var(--fs-2xl); }
.page-head p { margin-top: var(--sp-1); }

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: var(--z-overlay); width: 264px; transform: translateX(-100%); transition: transform var(--t-base) var(--ease-out); }
  .sidebar.open { transform: none; }
  .page { padding: var(--sp-4); }
}

/* --------------------------- STUDIO ---------------------------------- */
.studio { display: grid; grid-template-columns: 300px 1fr 340px; height: 100vh; background: var(--bg); }
.studio-col { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--divider); }
.studio-col:last-child { border-right: 0; border-left: 1px solid var(--divider); }
.studio-main { display: flex; flex-direction: column; min-height: 0; }
.studio-stage { flex: 1; padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); min-height: 0; }
.studio-video { flex: 1; min-height: 0; }
.studio-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-3); }
.studio-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); }
.studio-kpi .v { font-family: var(--font-display); font-weight: var(--fw-extra); font-size: var(--fs-lg); }
.studio-kpi .l { font-size: var(--fs-2xs); color: var(--text-muted); }
.studio-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); padding: var(--sp-4); border-top: 1px solid var(--divider); }
.studio-actions .btn { justify-content: flex-start; }
.pinned-product { display: flex; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid rgba(255,122,89,0.35); }
.pinned-product img { width: 64px; height: 64px; border-radius: var(--r-sm); object-fit: cover; }
.studio-catalog { flex: 1; overflow-y: auto; padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }
.studio-prod { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-2); border-radius: var(--r-md); transition: background var(--t-fast); cursor: pointer; }
.studio-prod:hover { background: var(--surface-2); }
.studio-prod img { width: 46px; height: 46px; border-radius: var(--r-sm); object-fit: cover; }

@media (max-width: 1100px) {
  .studio { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; }
  .studio-col { display: none; }
  .studio-actions { grid-template-columns: repeat(2, 1fr); }
}

/* --------------------- EXPÉRIENCE SPECTATEUR ------------------------- */
/* Desktop : vidéo + chat + produits */
.watch { display: grid; grid-template-columns: 1fr 360px; gap: var(--sp-5); align-items: start; }
.watch-main { display: flex; flex-direction: column; gap: var(--sp-4); }
.watch-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: var(--sp-4); }
.watch-chat { height: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
@media (max-width: 900px) { .watch { grid-template-columns: 1fr; } .watch-side { position: static; } }

/* Mobile plein écran (page /live/{id}) */
.live-mobile { position: relative; height: 100dvh; background: #000; overflow: hidden; max-width: 480px; margin-inline: auto; }
.live-mobile .bgvid { position: absolute; inset: 0; }
.live-mobile .bgvid img, .live-mobile .bgvid video { width: 100%; height: 100%; object-fit: cover; }
.live-mobile .overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: var(--sp-4); background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 22%, transparent 55%, rgba(0,0,0,0.85) 100%); }
.live-mobile .top-row { display: flex; align-items: center; gap: var(--sp-3); }
.live-chat-overlay { position: absolute; left: var(--sp-4); bottom: 210px; width: 68%; display: flex; flex-direction: column; gap: var(--sp-2); }
.live-chat-overlay .chat-msg .txt { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.7); }
.live-product-dock { background: var(--glass); backdrop-filter: blur(20px); border: 1px solid var(--glass-border); border-radius: var(--r-lg); padding: var(--sp-3); box-shadow: var(--shadow-lg); }
.live-product-dock .row { align-items: center; }
.live-product-dock img { width: 74px; height: 74px; border-radius: var(--r-md); object-fit: cover; }
.live-buybar { display: grid; grid-template-columns: 1fr 1.3fr; gap: var(--sp-2); margin-top: var(--sp-3); }
.live-tabbar { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-around; padding: var(--sp-3) var(--sp-2); background: rgba(10,6,14,0.7); backdrop-filter: blur(16px); border-top: 1px solid rgba(255,255,255,0.08); }
.live-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: rgba(255,255,255,0.7); font-size: var(--fs-3xs); }
.live-tabbar a.active { color: var(--gul-pink); }
.live-side-actions { position: absolute; right: var(--sp-4); bottom: 240px; display: flex; flex-direction: column; gap: var(--sp-4); align-items: center; }
.live-side-actions .act { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; }
.live-side-actions .act .ic { width: 48px; height: 48px; border-radius: 999px; background: rgba(255,255,255,0.14); backdrop-filter: blur(8px); display: grid; place-items: center; }
.live-side-actions .act .n { font-size: var(--fs-3xs); font-weight: var(--fw-semibold); }

/* Bandeau code promo */
.promo-banner { display: flex; align-items: center; gap: var(--sp-3); background: var(--gul-gradient-dusk); color: #fff; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); }
.promo-banner .code { font-family: var(--font-mono); font-weight: var(--fw-bold); background: rgba(255,255,255,0.2); padding: 0.2em 0.6em; border-radius: var(--r-xs); }
.countdown { font-family: var(--font-mono); font-weight: var(--fw-bold); background: rgba(0,0,0,0.25); padding: 0.3em 0.6em; border-radius: var(--r-sm); }

/* Objectif communautaire */
.goal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-4); }
.goal .g-head { display: flex; justify-content: space-between; font-size: var(--fs-sm); margin-bottom: var(--sp-2); }
.goal .g-reward { font-size: var(--fs-xs); color: var(--gul-amber); font-weight: var(--fw-semibold); }

/* Panier tiroir */
.cart-drawer { position: fixed; top: 0; right: 0; height: 100dvh; width: min(420px, 100%); background: var(--surface); border-left: 1px solid var(--border); z-index: var(--z-modal); transform: translateX(100%); transition: transform var(--t-base) var(--ease-out); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.cart-drawer.open { transform: none; }
.cart-item { display: flex; gap: var(--sp-3); padding: var(--sp-4); border-bottom: 1px solid var(--divider); }
.cart-item img { width: 64px; height: 64px; border-radius: var(--r-sm); object-fit: cover; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--r-pill); }
.qty button { width: 30px; height: 30px; display: grid; place-items: center; color: var(--text-muted); }
.qty span { min-width: 28px; text-align: center; font-weight: var(--fw-semibold); font-size: var(--fs-sm); }

/* Timeline replay */
.replay-timeline { display: flex; gap: var(--sp-3); overflow-x: auto; padding-bottom: var(--sp-2); }
.replay-chapter { flex: none; width: 132px; }
.replay-chapter .thumb { position: relative; aspect-ratio: 3/4; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); }
.replay-chapter .thumb img { width: 100%; height: 100%; object-fit: cover; }
.replay-chapter .ts { position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,0.7); color: #fff; font-size: var(--fs-3xs); padding: 0.15em 0.45em; border-radius: var(--r-xs); font-family: var(--font-mono); }
.replay-chapter .lbl { font-size: var(--fs-xs); margin-top: var(--sp-2); font-weight: var(--fw-medium); }
