/* ===== TGBROWSE — Dark Neon Telegram Theme ===== */
:root {
  --bg:        #080D14;
  --bg-card:   #0E1621;
  --bg-hover:  #131E2E;
  --border:    #1A2535;
  --text:      #E8EAF0;
  --text-muted:#8899AA;
  --tg:        #2AABEE;
  --tg-dark:   #1A8BC4;
  --tg-glow:   rgba(42,171,238,0.35);
  --green:     #00C853;
  --red:       #FF3D57;
  --gold:      #FFB800;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--tg); text-decoration: none; }
a:hover { color: #fff; }

/* HEADER */
.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--tg);
  text-shadow: 0 0 8px var(--tg), 0 0 20px var(--tg-glow);
  white-space: nowrap;
}
.logo span { color: #fff; }
.search-bar {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.search-bar input {
  width: 100% !important;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 14px 7px 36px;
  color: var(--text);
  font-size: 13px;
  transition: border-color .2s;
}
.search-bar input:focus {
  outline: none;
  border-color: var(--tg);
  box-shadow: 0 0 0 2px var(--tg-glow);
}
.search-bar .icon { position: absolute; left: 11px; top: 8px; color: var(--text-muted); }
.btn-submit {
  margin-left: auto;
  background: var(--tg);
  color: #fff;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 0 10px var(--tg-glow);
  transition: box-shadow .2s, background .2s;
}
.btn-submit:hover { background: #fff; color: var(--tg); box-shadow: 0 0 18px var(--tg-glow); }

/* LAYOUT */
.layout { display: flex; min-height: calc(100vh - 52px); align-items: flex-start; }

/* SIDEBAR */
.sidebar {
  width: 210px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 0 0 16px;
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow-y: auto;
}
.sidebar-section { margin-bottom: 8px; }
.sidebar-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  padding: 10px 16px 6px;
}
.cat-item { display: block; }
.cat-main {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: background .15s;
  user-select: none;
}
.cat-main:hover, .cat-main.active { background: var(--bg-hover); color: var(--tg); }
.cat-main .arrow { margin-left: auto; font-size: 10px; transition: transform .2s; }
.cat-main.open .arrow { transform: rotate(90deg); }
.cat-subs { display: none; }
.cat-subs.open { display: block; }
.cat-sub {
  display: block;
  padding: 5px 16px 5px 38px;
  color: var(--text-muted);
  font-size: 12px;
  transition: color .15s, background .15s;
}
.cat-sub:hover { color: var(--tg); background: var(--bg-hover); }
.sidebar-divider { border: none; border-top: 1px solid var(--border); margin: 10px 0; }
.sidebar-link {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 16px; font-size: 13px; color: var(--text-muted);
  transition: color .15s;
}
.sidebar-link:hover { color: var(--tg); }
.sidebar-contact { color: var(--tg) !important; font-weight: 600; }
.sidebar-contact:hover { opacity: 0.8; }
.sidebar-count {
  text-align: center;
  padding: 12px 16px 0;
  font-size: 11px;
  color: var(--text-muted);
}
.sidebar-count strong { display: block; font-size: 18px; color: var(--tg); font-weight: 800; }

/* MAIN CONTENT */
.main { flex: 1; padding: 20px; min-width: 0; }

/* TRENDING SECTION */
.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; } 50% { opacity: .3; }
}
.trending-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.trending-card {
  flex-shrink: 0;
  width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  position: relative;
}
.trending-card:hover {
  border-color: var(--tg);
  box-shadow: 0 0 14px var(--tg-glow);
  transform: translateY(-2px);
}
.featured-badge {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--tg);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  box-shadow: 0 0 8px var(--tg-glow);
}
.card-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 10px;
  overflow: hidden;
}
.card-avatar img { width: 100% !important; height: 100%; object-fit: cover; }
.card-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-members { font-size: 18px; font-weight: 800; color: var(--tg); text-shadow: 0 0 6px var(--tg-glow); }
.card-growth { font-size: 11px; color: var(--green); margin-top: 2px; }
.card-join {
  display: block;
  margin-top: 10px;
  background: var(--tg);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  text-align: center;
  padding: 5px;
  border-radius: 5px;
  transition: box-shadow .2s;
}
.card-join:hover { box-shadow: 0 0 10px var(--tg-glow); color: #fff; }

/* TABS */
.tabs { display: flex; gap: 4px; margin-bottom: 14px; }
.tab {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--bg-card); border-color: var(--tg); color: var(--tg); }

/* CHANNEL LIST */
.channel-list { display: flex; flex-direction: column; gap: 2px; }
.channel-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  transition: border-color .15s, background .15s;
  cursor: pointer;
}
.channel-row:hover { border-color: var(--tg); background: var(--bg-hover); }
.row-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}
.row-avatar img { width: 100% !important; height: 100%; object-fit: cover; }
.row-info { flex: 1; min-width: 0; }
.row-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.verified-badge { color: var(--tg); font-size: 13px; }
.featured-star { color: var(--gold); font-size: 12px; }
.row-desc { color: var(--text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.row-cat { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
.row-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.row-members { font-size: 16px; font-weight: 800; color: var(--tg); }
.row-growth { font-size: 11px; color: var(--green); }
.row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.btn-view {
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all .15s;
}
.btn-view:hover { border-color: var(--tg); color: var(--tg); }
.btn-join {
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  background: var(--tg);
  color: #fff;
  box-shadow: 0 0 8px var(--tg-glow);
  transition: box-shadow .15s;
}
.btn-join:hover { box-shadow: 0 0 16px var(--tg-glow); color: #fff; }

/* FOOTER STATS BAR */
.stats-bar {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 8px 20px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 20px;
  align-items: center;
}
.stats-bar strong { color: var(--tg); }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { padding: 12px; }
}

/* Section header: title + tabs row */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.section-header .section-title {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tabs {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* Stats bar — fixed bottom */
.stats-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 7px 20px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 20px;
  align-items: center;
  backdrop-filter: blur(8px);
}
.stats-bar strong { color: var(--tg); }

/* Push content above fixed footer */
body { padding-bottom: 36px; }

/* ===== RESPONSIVE FIX ===== */
html, body { overflow-x: hidden; max-width: 100% !important; }
/* overflow-x removed — was breaking position:sticky on sidebar */
.main { overflow-x: hidden; min-width: 0; }
.channel-row { min-width: 0; }
.row-info { min-width: 0; overflow: hidden; }
.row-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100% !important; }
.row-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-bar { overflow: hidden; }

/* ===== GRID / TABLE TOGGLE ===== */
.view-toggle { display: flex; gap: 4px; }
.view-btn {
  padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); color: var(--text-muted); cursor: pointer;
  transition: all .15s; background: transparent;
}
.view-btn.active { border-color: var(--tg); color: var(--tg); background: rgba(42,171,238,.08); }
.view-btn:hover { border-color: var(--tg); color: var(--tg); }

/* ===== GRID VIEW ===== */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.grid-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  display: flex;
  flex-direction: column;
}
.grid-card:hover {
  border-color: var(--tg);
  box-shadow: 0 0 16px var(--tg-glow);
  transform: translateY(-3px);
}
.grid-card-img {
  width: 100% !important; aspect-ratio: 1/1;
  background: var(--bg-hover);
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  overflow: hidden;
  position: relative;
}
.grid-card-img img {
  width: 100% !important; height: 100%; object-fit: cover;
}
.grid-card-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--tg); color: #fff;
  font-size: 9px; font-weight: 800;
  padding: 2px 7px; border-radius: 4px;
  text-transform: uppercase;
  box-shadow: 0 0 8px var(--tg-glow);
}
.grid-card-body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.grid-card-title {
  font-weight: 700; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.grid-card-desc {
  font-size: 11px; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.4; flex: 1;
}
.grid-card-members {
  font-size: 18px; font-weight: 800;
  color: var(--tg);
  text-shadow: 0 0 6px var(--tg-glow);
  margin-top: 4px;
}
.grid-card-growth { font-size: 11px; color: var(--green); }
.grid-card-join {
  display: block; margin-top: 10px;
  background: var(--tg); color: #fff;
  font-weight: 700; font-size: 11px;
  text-align: center; padding: 6px;
  border-radius: 6px;
  transition: box-shadow .2s;
}
.grid-card-join:hover { box-shadow: 0 0 12px var(--tg-glow); color: #fff; }

/* Hide/show modes */
.channel-list.hidden, .channel-grid.hidden { display: none; }

/* ── LIST VIEW RESPONSIVE FIX ───────────────────────────────────────────── */
/* Force rows to stay inside their container */
.channel-list  { width: 100% !important; max-width: 100% !important; overflow: hidden; }
.channel-row   { width: 100% !important; max-width: 100% !important; box-sizing: border-box; flex-wrap: nowrap !important; }

/* On screens narrower than 700px: hide stats column + VIEW button */
@media (max-width: 700px) {
  .row-stats          { display: none; }
  .btn-view           { display: none; }
  .channel-row        { gap: 10px; padding: 10px 12px; }
}

/* Section header right side (tabs + toggle): allow wrapping */
.section-header > div { flex-wrap: wrap; gap: 8px; }

/* ── ROW DESC / TITLE OVERFLOW FIX (final) ──────────────────────────────── */
/* Replace nowrap+overflow approach with line-clamp — works in all flex contexts */
.row-desc {
  display: -webkit-box !important;
  -webkit-line-clamp: 1 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  white-space: normal !important;
  text-overflow: unset !important;
  max-width: 100% !important;
}
/* row-title: block (not flex) so text-overflow works on text nodes */
.row-title {
  display: block !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}
/* row-info must clip its children */
.row-info {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  max-width: calc(100% - 280px);
}
/* row itself must not overflow its container */
.channel-row { overflow: hidden !important; }

/* ── CHANNEL ABOUT (SEO description) ────────────────────────────────────── */
.channel-about {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 20px;
  color: var(--text);
  line-height: 1.75;
}
.channel-about h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--tg);
  margin: 0 0 12px 0;
}
.channel-about h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 18px 0 8px 0;
}
.channel-about h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 16px 0 8px 0;
}
.channel-about p {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.channel-about p:last-child { margin-bottom: 0; }
.channel-about a { color: var(--tg); text-decoration: underline; }
.channel-about a:hover { opacity: .8; }
.section-h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px 0;
}

/* ── Fix JOIN button alignment ── */
.row-stats   { width: 58px; min-width: 58px; text-align: right; }
.row-actions { width: 110px; min-width: 110px; justify-content: flex-end; }

/* ── JOIN button no-wrap fix ── */
.btn-join, .btn-view { white-space: nowrap; }
.row-actions { width: auto; min-width: 0; }

/* ── SIDEBAR COLLAPSE TOGGLE ─────────────────────────────────────────────── */
.sidebar { transition: width .25s ease, padding .25s ease, border .25s ease; }
.layout.no-sidebar .sidebar {
  width: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-right: none !important;
  min-width: 0 !important;
}
#sidebar-toggle {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 10;
  width: 20px;
  height: 20px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color .15s, border-color .15s, background .15s;
  line-height: 1;
}
#sidebar-toggle:hover { color: var(--tg); border-color: var(--tg); }
.layout.no-sidebar #sidebar-toggle {
  position: fixed;
  top: 60px;
  left: 0;
  width: 14px;
  height: 32px;
  border-radius: 0 4px 4px 0;
  border-left: none;
  background: var(--bg-card);
  font-size: 8px;
}
@media (max-width: 768px) { #sidebar-toggle { display: none; } }

/* ── GRID COLONNES FIXES ──────────────────────────────────────────────────── */
.channel-grid { grid-template-columns: repeat(5, 1fr) !important; }
@media (max-width: 1100px) { .channel-grid { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 700px)  { .channel-grid { grid-template-columns: repeat(2, 1fr) !important; } }

/* ── ROW DESC — 2 lignes max (descriptions courtes SEO) ─────────────────── */
.row-desc { -webkit-line-clamp: 2 !important; }

/* ── MAIN ELEMENT — flex:1 pour remplir toute la largeur ─────────────────── */
main { flex: 1; min-width: 0; }

/* ── HERO BANNER ──────────────────────────────────────────────────────────── */
.hero-banner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  align-items: center;
  gap: 0 !important;
  width: 100% !important;
  box-sizing: border-box;
  background: linear-gradient(135deg, #0e1e30 0%, #0a1622 60%, var(--bg-card) 100%);
  border: 1px solid rgba(42,171,238,.18);
  border-radius: 16px;
  padding: 36px 40px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute;
  top: 0; right: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(42,171,238,.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero-visual {
  display: grid;
  grid-template-columns: repeat(4, 56px);
  grid-template-rows: repeat(2, 56px);
  gap: 10px;
  justify-content: center;
  align-content: center;
}
.hero-icon {
  width: 56px; height: 56px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  transition: background .2s, border-color .2s, transform .2s;
}
.hero-icon:hover {
  background: rgba(42,171,238,.12);
  border-color: rgba(42,171,238,.4);
  transform: scale(1.08);
}
.hero-content { padding-left: 36px; border-left: 1px solid rgba(255,255,255,.07); }
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  color: var(--tg); letter-spacing: .06em;
  margin-bottom: 12px;
}
.hero-title {
  font-size: 26px; font-weight: 800; line-height: 1.25;
  color: var(--text); margin: 0 0 10px 0;
}
.hero-sub {
  font-size: 14px; color: var(--text-muted); line-height: 1.6;
  margin: 0 0 18px 0;
}
.hero-stats { display: flex; gap: 28px; margin-bottom: 22px; }
.hero-stat strong { display: block; font-size: 22px; font-weight: 800; color: var(--tg); }
.hero-stat span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-btn-primary {
  background: var(--tg); color: #fff;
  padding: 10px 22px; border-radius: 8px;
  font-size: 13px; font-weight: 700; text-decoration: none;
  transition: opacity .15s;
}
.hero-btn-primary:hover { opacity: .85; color: #fff; }
.hero-btn-secondary {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text); padding: 10px 22px; border-radius: 8px;
  font-size: 13px; font-weight: 700; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.hero-btn-secondary:hover { background: rgba(255,255,255,.12); color: #fff; }
@media (max-width: 900px) {
  .hero-banner { grid-template-columns: 1fr; padding: 24px; }
  .hero-visual { grid-template-columns: repeat(8, 44px); grid-template-rows: 44px; justify-content: start; }
  .hero-content { padding-left: 0; border-left: none; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.07); }
  .hero-title { font-size: 20px; }
}



/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE & TABLET (≤768px)
   Desktop inchangé. Ces règles ne s'appliquent qu'en ≤768px.
═══════════════════════════════════════════════════════════════ */

/* ── Mobile category nav (visible seulement sur mobile) ─────── */
.mobile-cat-nav { display: none; }

@media (max-width: 768px) {

  /* ─ Header ─ */
  .header { padding: 0 10px; gap: 8px; }
  .logo { font-size: 15px; }
  .btn-submit { padding: 6px 10px; font-size: 12px; white-space: nowrap; }
  .search-bar { max-width: none; flex: 1; min-width: 0; }
  .search-bar input { font-size: 12px; }

  /* ─ Mobile category nav ─ */
  .mobile-cat-nav {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 8px 12px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-cat-nav::-webkit-scrollbar { display: none; }
  .mobile-cat-scroll-hint {
    flex-shrink: 0;
    align-self: center;
    font-size: 18px;
    color: var(--text-muted);
    margin-left: 2px;
    pointer-events: none;
  }
  .mobile-cat-link {
    flex-shrink: 0;
    padding: 5px 11px;
    border-radius: 20px;
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    text-decoration: none;
    transition: border-color .15s, color .15s;
  }
  .mobile-cat-link:hover,
  .mobile-cat-link.active { border-color: var(--tg); color: var(--tg); }

  /* ─ Main ─ */
  .main { padding: 12px; }

  /* ─ Hero banner — sans emojis, centré ─ */
  .hero-banner {
    display: block !important;
    padding: 24px 20px;
    margin-bottom: 16px;
    text-align: center;
  }
  .hero-visual { display: none !important; }
  .hero-content {
    padding-left: 0 !important;
    padding-top: 0 !important;
    border-left: none !important;
    border-top: none !important;
  }
  .hero-tag { justify-content: center; }
  .hero-title { font-size: 20px; }
  .hero-sub { font-size: 13px; }
  .hero-stats { justify-content: center; gap: 20px; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .hero-btn-primary,
  .hero-btn-secondary { text-align: center; }

  /* ─ Section header — titre + tabs en colonne ─ */
  .section-header { flex-direction: column; align-items: flex-start; gap: 6px; }
  .section-header > div {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
  }
  .section-header .section-title {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    flex: none;
    width: 100% !important;
  }
  .tabs { margin-bottom: 0; }

  /* ─ Row list view — fix largeur info ─ */
  .row-info { max-width: calc(100% - 155px) !important; }

  /* ─ Stats bar — 1 seule ligne compacte ─ */
  .stats-bar {
    flex-wrap: nowrap !important;
    padding: 5px 10px;
    font-size: 10px;
    gap: 6px;
    overflow: hidden;
  }
  .stats-bar > span:nth-child(2) { display: none; }
  .stats-bar > span[style*="margin-left"] { margin-left: auto !important; white-space: nowrap; }
}

/* ── Small phones (≤480px) ───────────────────────────────────── */
@media (max-width: 480px) {

  .main { padding: 8px; }
  .hero-banner { padding: 20px 14px; }
  .hero-title { font-size: 18px !important; }
  .hero-stats { gap: 14px; }
  .hero-stat strong { font-size: 18px; }
  .channel-grid { gap: 8px; }
  .row-info { max-width: calc(100% - 120px) !important; }

}

/* ── Channel stats grid — 3 cols desktop, pyramide mobile ── */
.ch-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.ch-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}
@media (max-width: 768px) {
  .ch-stats-grid { grid-template-columns: 1fr 1fr; }
  .ch-stat-box:last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 5px);
    margin: 0 auto;
    width: 100% !important;
  }
}

/* ===== TRUST SCORE BOX — SVG gauge ===== */
.trust-score-box { text-align: center; flex-shrink: 0; }
.trust-score-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-top: -2px;
}
.trust-score-count { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* ===== LOAD MORE BUTTON ===== */
.load-more-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 9px 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.load-more-btn:hover { border-color: var(--tg); color: var(--tg); }

/* ===== REVIEW CARDS ===== */
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.review-author { font-size: 14px; font-weight: 700; }
.review-date   { font-size: 11px; color: var(--text-muted); margin-left: 8px; }
.review-stars  { font-size: 17px; white-space: nowrap; }
.s-full  { color: var(--gold, #f5c518); }
.s-empty { color: var(--border); }
.review-comment { color: var(--text-muted); font-size: 13px; line-height: 1.55; }

/* ===== REVIEW SUCCESS BANNER ===== */
.review-success {
  background: rgba(16,163,74,0.13);
  border: 1px solid rgba(16,163,74,0.4);
  border-radius: 8px;
  padding: 12px 16px;
  color: #10a34a;
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 14px;
}

/* ===== REVIEW FORM ===== */
.review-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}
.review-form-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 14px;
}
.star-select-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.star-select-label { font-size: 13px; color: var(--text-muted); flex-shrink: 0; }
/* CSS-only star rating — reversed order trick */
.star-select {
  display: flex;
  flex-direction: row-reverse;
  gap: 1px;
}
.star-select input { display: none; }
.star-select label {
  font-size: 30px;
  color: var(--border);
  cursor: pointer;
  transition: color 0.1s;
  line-height: 1;
}
.star-select label:hover,
.star-select label:hover ~ label,
.star-select input:checked ~ label {
  color: var(--gold, #f5c518);
}
.review-input, .review-textarea {
  width: 100% !important;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 10px;
  box-sizing: border-box;
  font-family: inherit;
}
.review-textarea { resize: vertical; min-height: 80px; }
.review-input:focus, .review-textarea:focus {
  outline: none;
  border-color: var(--tg);
}
.review-submit-btn {
  background: var(--tg);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.review-submit-btn:hover { opacity: 0.85; }

/* ===== TRUST SCORE ON LISTING CARDS ===== */
.grid-card-rating {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold, #f5c518);
  margin: 3px 0 2px;
}
.grid-card-rating span { color: var(--text-muted); font-weight: 400; font-size: 11px; }

.row-trust {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold, #f5c518);
}

/* ===== ROW RATING (similar channels) ===== */
.row-rating {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold, #f5c518);
  margin-top: 3px;
}
/* ===== CHANNEL HEADER — desktop base ===== */
.ch-members-block { text-align: center; }
.ch-members-value { font-size: 32px; font-weight: 800; color: var(--tg); text-shadow: 0 0 8px var(--tg-glow); }
.ch-members-label { color: var(--text-muted); font-size: 12px; }

/* Desktop: separators hidden */
.stats-sep { display: none; }

/* ===== CHANNEL HEADER — mobile/tablet ===== */
@media (max-width: 768px) {
  .ch-header-wrap { padding: 16px !important; gap: 12px !important; }

  /* Stats bar: full width, equal columns, same height */
  .ch-header-stats {
    width: 100% !important;
    flex-wrap: nowrap !important;
    justify-content: stretch !important;
    align-items: stretch !important;
    border-top: 1px solid var(--border);
    padding-top: 14px !important;
    gap: 0 !important;
  }

  /* All 3 blocks take equal width, content centered */
  .trust-score-box, .ch-members-block {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 4px !important;
    min-width: 0 !important;
  }

  /* vote-cell = equal 1/3 column; vote-btn stays compact rectangle inside */
  .vote-cell {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
  }
  .vote-btn {
    flex: 0 0 auto !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }
  .vote-btn .v-arrow { font-size: 15px !important; }
  .vote-btn .v-count { font-size: 13px !important; }

  /* Separator: thin vertical line, breathing room each side */
  .stats-sep {
    display: block !important;
    width: 1px !important;
    background: var(--border) !important;
    align-self: stretch !important;
    flex-shrink: 0 !important;
    margin: 0 6px !important;
  }

  /* Gauge smaller */
  .trust-score-box svg {
    width: 96px !important;
    height: 58px !important;
  }

  .ch-members-value { font-size: 26px; }

  /* Join button full width */
  .ch-join-btn {
    display: block !important;
    text-align: center;
    width: 100% !important;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .ch-header-wrap { padding: 14px !important; }
  .trust-score-box svg { width: 80px !important; height: 48px !important; }
  .ch-members-value { font-size: 20px !important; }
  .vote-btn .v-count { font-size: 12px !important; }
}


/* ===== MOBILE NAV SCROLL HINT — fade gradient right edge ===== */
.mobile-cat-outer { display: none; }
@media (max-width: 768px) {
  .mobile-cat-outer {
    display: block;
    position: relative;
  }
  /* Fade gradient — tells users there's more to scroll */
  .mobile-cat-outer::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 52px;
    background: linear-gradient(to right, transparent, var(--bg-card));
    pointer-events: none;
    z-index: 2;
  }
  /* Hide when scrolled to end via JS class */
  .mobile-cat-outer.at-end::after { display: none; }
}

/* ===== MOBILE NAV — pulsing arrow hint ===== */
@media (max-width: 768px) {
  .mobile-cat-outer::before {
    content: '›';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-muted);
    z-index: 3;
    pointer-events: none;
    animation: scroll-hint 1.4s ease-in-out infinite;
  }
  .mobile-cat-outer.at-end::before { display: none; }
}
@keyframes scroll-hint {
  0%, 100% { opacity: 0.35; transform: translateY(-50%) translateX(0); }
  50%       { opacity: 1;    transform: translateY(-50%) translateX(4px); }
}

/* VOTE BUTTON - Product Hunt style */
.vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,255,136,.07);
  border: 1.5px solid #00ff88;
  border-radius: 12px;
  color: #00ff88;
  cursor: pointer;
  padding: 10px 14px;
  min-width: 56px;
  gap: 3px;
  transition: background .15s, box-shadow .15s;
  font-family: inherit;
  flex-shrink: 0;
  user-select: none;
}
.vote-btn:hover { background: rgba(0,255,136,.15); box-shadow: 0 0 10px rgba(0,255,136,.35); }
.vote-btn.voted { background: rgba(0,255,136,.22); box-shadow: 0 0 14px rgba(0,255,136,.5); }
.vote-btn.loading { opacity: .55; pointer-events: none; }
.vote-btn .v-arrow { font-size: 18px; line-height: 1; }
.vote-btn .v-count { font-size: 14px; font-weight: 800; line-height: 1; }
.vote-btn .v-label { font-size: 9px; text-transform: uppercase; letter-spacing: .5px; margin-top: 1px; opacity: .7; }
.vote-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,255,136,.07);
  border: 1px solid #00ff88;
  border-radius: 6px;
  color: #00ff88;
  cursor: pointer;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  transition: background .15s, box-shadow .15s;
  white-space: nowrap;
  user-select: none;
  vertical-align: middle;
}
.vote-mini:hover { background: rgba(0,255,136,.15); box-shadow: 0 0 8px rgba(0,255,136,.3); }
.vote-mini.voted { background: rgba(0,255,136,.22); box-shadow: 0 0 10px rgba(0,255,136,.45); }
.vote-mini .mini-arrow { font-size: 9px; }
.grid-card-votes { margin-top: 2px; }

/* ===== SUBMIT PAGE ===== */
.submit-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}
.submit-header { margin-bottom: 28px; }
.submit-header h1 { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.submit-header p { color: var(--text-muted); font-size: 15px; }

.submit-success {
  text-align: center;
  padding: 60px 20px;
}
.success-icon { font-size: 56px; margin-bottom: 20px; }
.submit-success h1 { font-size: 26px; margin-bottom: 12px; }
.submit-success p { color: var(--text-muted); font-size: 15px; margin-bottom: 10px; }
.btn-back {
  display: inline-block; margin-top: 24px;
  padding: 10px 24px; background: var(--tg);
  color: #fff; border-radius: 8px; font-weight: 600; font-size: 14px;
  transition: opacity .15s;
}
.btn-back:hover { opacity: .85; }

.submit-errors {
  background: rgba(220,60,60,.12);
  border: 1px solid rgba(220,60,60,.4);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 20px;
}
.submit-errors p { color: #e06060; font-size: 13px; margin: 4px 0; }

.submit-form { display: flex; flex-direction: column; gap: 20px; }

.form-section-title {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border); padding-bottom: 8px;
  margin-bottom: -4px;
}

.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-group small { font-size: 11px; color: var(--text-muted); }
.req { color: var(--tg); }
.optional { color: var(--text-muted); font-weight: 400; font-size: 12px; }

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--tg); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select { appearance: none; cursor: pointer; }

.input-prefix-wrap { position: relative; display: flex; align-items: center; }
.input-prefix {
  position: absolute; left: 14px;
  font-size: 14px; color: var(--tg); font-weight: 700; pointer-events: none;
}
.input-prefix-wrap input { padding-left: 28px; }

.form-notice {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tg);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.form-notice strong { color: var(--text); }
.form-notice a { color: var(--tg); }

.btn-submit-form {
  align-self: flex-start;
  background: var(--tg);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, box-shadow .15s;
}
.btn-submit-form:hover { opacity: .88; box-shadow: 0 0 16px var(--tg-glow); }

@media (max-width: 600px) {
  .form-row.two-col { grid-template-columns: 1fr; }
  .submit-page { padding: 20px 14px 60px; }
  .btn-submit-form { width: 100%; text-align: center; }
}

/* Responsive text helpers — stats-bar Submit link */
.show-sm { display: none; }
@media (max-width: 768px) {
  .hide-sm { display: none; }
  .show-sm { display: inline; }
}

/* ===== ADVERTISE PAGE ===== */
.adv-page { max-width: 860px; margin: 0 auto; padding: 36px 20px 60px; }

.adv-hero { text-align: center; margin-bottom: 40px; }
.adv-hero h1 { font-size: 28px; font-weight: 700; margin-bottom: 10px; }
.adv-hero p { color: var(--text-muted); font-size: 16px; max-width: 520px; margin: 0 auto; line-height: 1.6; }

.adv-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.adv-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px;
  transition: border-color .15s;
}
.adv-card:hover { border-color: var(--tg); }
.adv-icon { font-size: 28px; margin-bottom: 12px; }
.adv-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.adv-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 0; }

.adv-cta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--tg);
  border-radius: 12px;
  padding: 32px 28px;
  text-align: center;
}
.adv-cta h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.adv-cta p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.adv-btn {
  display: inline-block;
  background: var(--tg);
  color: #fff;
  padding: 13px 28px;
  border-radius: 8px;
  font-size: 15px;
  transition: opacity .15s, box-shadow .15s;
}
.adv-btn:hover { opacity: .88; box-shadow: 0 0 18px var(--tg-glow); }

@media (max-width: 600px) {
  .adv-options { grid-template-columns: 1fr; }
  .adv-card { text-align: center; }
  
  .adv-page { padding: 20px 14px 60px; }
  .adv-hero h1 { font-size: 22px; }
}

/* Advertise btn responsive text */
.adv-btn-short { display: none; }
@media (max-width: 600px) {
  .adv-btn-full  { display: none; }
  .adv-btn-short { display: inline; }
}

/* ===== 404 PAGE ===== */
.notfound-page {
  max-width: 500px;
  margin: 0 auto;
  padding: 80px 20px 60px;
  text-align: center;
}
.notfound-code {
  font-size: 120px;
  font-weight: 900;
  line-height: 1;
  color: var(--tg);
  opacity: 0.15;
  letter-spacing: -4px;
  margin-bottom: -20px;
}
.notfound-page h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
}
.notfound-page p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 32px;
}
.notfound-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.notfound-btn {
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: opacity .15s;
}
.notfound-btn.primary {
  background: var(--tg);
  color: #fff;
}
.notfound-btn.secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
}
.notfound-btn:hover { opacity: .8; }

/* ===== SEO INTRO — top dans le HTML, bas visuellement ===== */
.main { display: flex; flex-direction: column; align-items: stretch; }
.seo-intro {
  order: 999;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.8;
}
.seo-intro p { margin: 0; }

/* ===== FEED WRAPPER — fade + load more ===== */
.feed-wrapper { position: relative; }
.feed-fade {
  height: 110px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  margin-top: -110px;
  position: relative;
  pointer-events: none;
  z-index: 2;
}
.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 18px 0 10px;
  position: relative;
  z-index: 3;
}
