/* ==========================================================================
   WEEBUD — Application mobile (PWA)
   Palette et typographies reprises à l'identique du site weebud.fr
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&family=IM+Fell+English:ital@0;1&display=swap');

:root {
  /* Fonds */
  --bg-void: #0d1f13;
  --bg-dark: #152b18;
  --bg-surface: #1c3824;
  --bg-card: #22422c;
  --hdr-top: rgba(13, 31, 19, .75);
  --hdr-scrolled: rgba(13, 31, 19, .97);

  /* Accent émeraude (couleur de marque / theme-color) */
  --em: #10b981;
  --em-bright: #6ee7b7;
  --em-dark: #059669;
  --em-glow: rgba(16, 185, 129, .45);

  /* Accent violet (Grow Shop, graines) */
  --pu: #8b5cf6;
  --pu-bright: #c4b5fd;
  --pu-dark: #6d28d9;
  --pu-glow: rgba(139, 92, 246, .45);

  /* Accent or (CTA, prix, étoiles) */
  --yl: #fbbf24;
  --yl-bright: #fde68a;
  --yl-dark: #d97706;

  /* Texte */
  --text-primary: #f0fdf4;
  --text-cream: #f0fdf4;
  --text-sub: #c4cad2;
  --text-muted: #86efac;
  --text-dim: #a1a9b0;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: 'Lato', system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

body {
  padding-bottom: calc(64px + var(--safe-bottom));
  min-height: 100vh;
}

h1, h2, h3 { margin: 0; font-weight: 900; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.script {
  font-family: 'IM Fell English', serif;
  font-style: italic;
}

.container { padding: 0 18px; }

/* ---------- Écran de démarrage (splash) ---------- */
#splash {
  position: fixed; inset: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, #14301c 0%, var(--bg-void) 70%);
  transition: opacity .5s ease;
}
#splash img { width: 42vw; max-width: 220px; }
#splash.hide { opacity: 0; pointer-events: none; }

/* ---------- Vérification d'âge ---------- */
#age-gate {
  position: fixed; inset: 0; z-index: 998;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 30%, #14301c 0%, var(--bg-void) 75%);
  padding: 24px;
}
/* Un sélecteur ID/classe avec `display` explicite prime sur la règle UA
   `[hidden]{display:none}` : sans cette ligne, l'attribut `hidden` seul
   ne suffit pas à masquer la popup (bug détecté en test). */
#age-gate[hidden] { display: none; }
#age-gate .card {
  width: 100%; max-width: 360px;
  background: var(--bg-surface);
  border: 1px solid rgba(16,185,129,.25);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
}
#age-gate img.logo-mark { width: 96px; margin: 0 auto 18px; }
#age-gate h2 { font-size: 1.5rem; color: var(--em-bright); margin-bottom: 10px; }
#age-gate p { color: var(--text-sub); font-size: .95rem; line-height: 1.5; margin-bottom: 24px; }
.btn {
  display: block; width: 100%; border: none; border-radius: 12px;
  padding: 15px; font-weight: 700; font-size: 1rem; text-align: center;
}
.btn-gold {
  background: linear-gradient(135deg, var(--yl-bright), var(--yl) 55%, var(--yl-dark));
  color: #1a1206;
  box-shadow: 0 6px 18px rgba(251,191,36,.35);
}
.btn-dark {
  background: rgba(0,0,0,.35);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,.08);
  margin-top: 10px;
}
.btn-outline {
  background: transparent;
  color: var(--em-bright);
  border: 1px solid var(--em);
}

/* ---------- Bandeau promo ---------- */
.promo-bar {
  background: linear-gradient(90deg, #059669, #10b981);
  color: #06210f;
  font-size: .72rem;
  font-weight: 700;
  text-align: center;
  padding: 6px 40px;
  letter-spacing: .02em;
}

/* ---------- Header ---------- */
header.app-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--hdr-scrolled);
  backdrop-filter: blur(10px);
  padding-top: var(--safe-top);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand img { width: 28px; height: 28px; }
.brand span { font-weight: 900; letter-spacing: .05em; color: var(--em-bright); font-size: 1.05rem; }
.header-actions { display: flex; align-items: center; gap: 14px; font-size: 1.15rem; color: var(--text-sub); }
.header-actions .cart { position: relative; background: var(--em); color: #06210f; width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.header-actions .badge {
  position: absolute; top: -6px; right: -6px; background: var(--yl);
  color: #1a1206; font-size: .62rem; font-weight: 800; border-radius: 50%;
  width: 16px; height: 16px; display: flex; align-items: center; justify-content: center;
}

/* ---------- Navigation par catégories (chips scrollables) ---------- */
.chip-nav {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px 12px;
  scrollbar-width: none;
}
.chip-nav::-webkit-scrollbar { display: none; }
.chip-nav a {
  flex: 0 0 auto; font-size: .78rem; font-weight: 700; white-space: nowrap;
  padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1);
  color: var(--text-sub);
}
.chip-nav a.gold { color: var(--yl-bright); border-color: rgba(251,191,36,.3); }
.chip-nav a.violet { color: var(--pu-bright); border-color: rgba(139,92,246,.3); }
.chip-nav a.mint { color: var(--em-bright); border-color: rgba(16,185,129,.3); }

/* ---------- Sections génériques ---------- */
.section { padding: 34px 0; }
.section-title {
  font-size: 1.6rem;
  text-align: center;
  color: var(--em-bright);
  text-shadow: 0 0 24px var(--em-glow);
  margin-bottom: 6px;
}
.section-sub {
  text-align: center; color: var(--text-dim); font-size: .85rem; margin-bottom: 22px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 46px 20px 40px;
  text-align: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(139,92,246,.55), transparent 55%),
    radial-gradient(circle at 75% 15%, rgba(251,191,36,.35), transparent 50%),
    radial-gradient(circle at 50% 75%, rgba(16,185,129,.4), transparent 55%),
    linear-gradient(160deg, #2a1240, #3b1240 30%, #7a2e3a 55%, #4a5a2e 80%, var(--bg-void));
  overflow: hidden;
}
.hero .ring {
  width: 150px; height: 150px; margin: 0 auto 18px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(255,255,255,.06), transparent 70%);
}
.hero .ring img { width: 78px; }
.hero h1 {
  font-size: 2.6rem;
  letter-spacing: .03em;
  background: linear-gradient(135deg, #fca5a5, #fcd34d 50%, #fca5a5);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 8px;
}
.hero .tag {
  color: var(--em-bright); font-size: .95rem; margin-bottom: 16px;
}
.hero .desc {
  color: var(--text-sub); font-size: .95rem; line-height: 1.6;
  max-width: 320px; margin: 0 auto 26px;
}
.hero .cta-row { display: flex; flex-direction: column; gap: 10px; max-width: 280px; margin: 0 auto; }

/* ---------- Grille catégories ---------- */
.cat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  padding: 0 18px;
}
.cat-card {
  position: relative; border-radius: var(--radius-md); overflow: hidden;
  aspect-ratio: 3/4; border: 1px solid rgba(255,255,255,.08);
  background: var(--bg-surface);
}
.cat-card img { width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.cat-card .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(13,31,19,.92));
  display: flex; align-items: flex-end; padding: 12px;
}
.cat-card .overlay strong { font-size: 1rem; display: block; }
.cat-card .overlay small { color: var(--text-dim); font-size: .72rem; }
.cat-card.em .overlay strong { color: var(--em-bright); }
.cat-card.pu .overlay strong { color: var(--pu-bright); }
.cat-card.yl .overlay strong { color: var(--yl-bright); }

/* ---------- Cartes produits (scroll horizontal) ---------- */
.product-scroll {
  display: flex; gap: 12px; overflow-x: auto; padding: 4px 18px 10px;
  scrollbar-width: none;
}
.product-scroll::-webkit-scrollbar { display: none; }
.product-card {
  flex: 0 0 150px; background: var(--bg-card); border-radius: var(--radius-md);
  padding: 10px; border: 1px solid rgba(255,255,255,.06);
}
.product-card .ph {
  width: 100%; aspect-ratio: 1; border-radius: 10px; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-dark));
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.product-card strong { font-size: .82rem; display: block; line-height: 1.25; }
.product-card small { color: var(--text-dim); font-size: .68rem; }
.product-card .price { color: var(--yl-bright); font-weight: 800; margin-top: 6px; font-size: .88rem; }

/* ---------- Valeurs ---------- */
.value-card {
  background: var(--bg-surface); border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-md); padding: 18px; margin: 0 18px 12px;
}
.value-card .icon {
  width: 42px; height: 42px; border-radius: 12px; background: rgba(16,185,129,.15);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 12px;
}
.value-card h3 { font-size: 1rem; margin-bottom: 6px; }
.value-card p { color: var(--text-sub); font-size: .85rem; line-height: 1.5; }

/* ---------- Témoignages ---------- */
.rating-row {
  display: flex; justify-content: center; gap: 26px; margin-bottom: 22px;
}
.rating-row .stat { text-align: center; }
.rating-row .stat b { display: block; font-size: 1.4rem; color: var(--yl-bright); }
.rating-row .stat span { font-size: .68rem; color: var(--text-dim); }
.testi-scroll {
  display: flex; gap: 12px; overflow-x: auto; padding: 4px 18px 10px;
  scrollbar-width: none;
}
.testi-scroll::-webkit-scrollbar { display: none; }
.testi-card {
  flex: 0 0 240px; background: var(--bg-surface); border-radius: var(--radius-md);
  padding: 16px; border: 1px solid rgba(255,255,255,.06);
}
.testi-card .who { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.testi-card .avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--em);
  color: #06210f; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.testi-card .who strong { font-size: .85rem; display: block; }
.testi-card .who small { color: var(--text-dim); font-size: .68rem; }
.testi-card p { font-size: .8rem; color: var(--text-sub); line-height: 1.5; }

/* ---------- Magasins ---------- */
.store-card {
  background: var(--bg-surface); border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-md); padding: 18px; margin: 0 18px 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.store-card div strong { display: block; color: var(--em-bright); font-size: 1rem; margin-bottom: 4px; }
.store-card div span { color: var(--text-sub); font-size: .82rem; }
.store-card a.map-btn {
  flex-shrink: 0; background: rgba(16,185,129,.15); color: var(--em-bright);
  border: 1px solid rgba(16,185,129,.3); border-radius: 10px; padding: 8px 12px; font-size: .78rem; font-weight: 700;
}

/* ---------- Footer ---------- */
footer {
  background: #060f08; padding: 30px 18px 20px; margin-top: 20px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.footer-brand img { width: 26px; }
.footer-brand span { font-weight: 900; color: var(--em-bright); }
footer > .desc { color: var(--text-dim); font-size: .82rem; margin-bottom: 16px; line-height: 1.5; }
.social-row { display: flex; gap: 10px; margin-bottom: 26px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.footer-col { margin-bottom: 22px; }
.footer-col h4 { color: var(--em-bright); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.footer-col a { display: block; color: var(--text-sub); font-size: .86rem; padding: 6px 0; }
.footer-legal { color: var(--text-dim); font-size: .7rem; line-height: 1.6; border-top: 1px solid rgba(255,255,255,.06); padding-top: 16px; }

/* ---------- Bouton "installer l'app" ---------- */
#install-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom));
  z-index: 60; background: var(--bg-card); border: 1px solid rgba(16,185,129,.3);
  border-radius: var(--radius-md); padding: 12px 14px; display: none;
  align-items: center; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
#install-banner.show { display: flex; }
#install-banner img { width: 34px; height: 34px; border-radius: 9px; }
#install-banner .txt { flex: 1; }
#install-banner .txt strong { font-size: .82rem; display: block; }
#install-banner .txt span { font-size: .7rem; color: var(--text-dim); }
#install-banner button.install-yes {
  background: var(--em); color: #06210f; border: none; border-radius: 8px;
  padding: 8px 12px; font-weight: 800; font-size: .75rem;
}
#install-banner button.install-no {
  background: transparent; border: none; color: var(--text-dim); font-size: 1.1rem; padding: 0 4px;
}

/* ---------- Bottom nav (app-like) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  display: flex; background: var(--hdr-scrolled); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,.07);
  padding-bottom: var(--safe-bottom);
}
.bottom-nav a {
  flex: 1; text-align: center; padding: 9px 0 7px; font-size: .62rem;
  color: var(--text-dim); font-weight: 700;
}
.bottom-nav a .ic { font-size: 1.15rem; display: block; margin-bottom: 2px; }
.bottom-nav a.active { color: var(--em-bright); }

/* ---------- Offline banner ---------- */
#offline-banner {
  display: none; background: var(--yl-dark); color: #1a1206; font-size: .72rem;
  font-weight: 700; text-align: center; padding: 6px;
}
#offline-banner.show { display: block; }

@media (min-width: 640px) {
  .container, .hero, .cat-grid { max-width: 480px; margin: 0 auto; }
  body { max-width: 480px; margin: 0 auto; box-shadow: 0 0 60px rgba(0,0,0,.5); }
  header.app-header, .bottom-nav, #install-banner { max-width: 480px; margin: 0 auto; left: 50%; transform: translateX(-50%); }
  #install-banner { width: calc(480px - 24px); }
}
