/* ============================================================
   sports-news – News Page CSS (mobile-first)
   ============================================================ */

/* ─── Sport color map ─────────────────────────────────────────── */
:root {
  --sport-football: #10B981;
  --sport-combat: #EF4444;
  --sport-basketball: #F59E0B;
  --sport-tennis: #84CC16;
  --sport-motorsport: #EC4899;
  --sport-rugby: #06B6D4;
  --sport-cyclisme: #F97316;
  --sport-athletisme: #8B5CF6;
}

/* ─── Layout ──────────────────────────────────────────────────── */
.news-page {
  min-height: 100vh;
  background: var(--bg-0);
  padding-bottom: 80px; /* space for bottom nav on mobile */
}

/* Three-column grid: sidebar | feed | trending */
.news-layout {
  display: flex;
  flex-direction: column;
  max-width: 1580px;
  margin: 0 auto;
  padding: 0;
}

/* ─── Top bar ─────────────────────────────────────────────────── */
.news-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 8, 8, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.topbar-logo .logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: #000;
}

.topbar-logo .logo-text {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-1);
}

.topbar-logo .logo-text span { color: var(--primary); }

.topbar-search {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.topbar-search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-1);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.topbar-search input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
  outline: none;
}

.topbar-search input::placeholder { color: var(--text-4); }

.topbar-search .search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-4);
  font-size: 15px;
  pointer-events: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.topbar-btn {
  width: 36px;
  height: 36px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  position: relative;
  color: var(--text-2);
}

.topbar-btn:hover {
  background: var(--bg-card);
  border-color: rgba(255,255,255,0.12);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-0);
}

/* ─── Filter tabs ─────────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(8,8,8,0.95);
  position: sticky;
  top: 57px;
  z-index: 40;
}

.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  color: var(--text-3);
  border: 1px solid var(--border);
  background: transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.filter-tab:hover {
  color: var(--text-1);
  border-color: rgba(255,255,255,0.15);
}

.filter-tab.active {
  border-color: var(--primary);
  color: white;
}

/* ─── Main content area ───────────────────────────────────────── */
.news-content {
  display: flex;
  gap: 0;
  flex: 1;
  min-height: calc(100vh - 120px);
}

/* ─── Sidebar (desktop only) ──────────────────────────────────── */
.news-sidebar {
  display: none;
  width: 250px;
  flex-shrink: 0;
  padding: 20px 16px;
  border-right: 1px solid var(--border-subtle);
  position: sticky;
  top: 110px;
  height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.news-sidebar::-webkit-scrollbar { width: 4px; }
.news-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Sidebar profile section */
.sidebar-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 0 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.sidebar-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid rgba(249, 115, 22, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-name {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 2px;
}

.sidebar-handle {
  font-size: 12px;
  color: var(--text-4);
  margin-bottom: 12px;
}

.sidebar-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.sidebar-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sidebar-stat-num {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
}

.sidebar-stat-label {
  font-size: 10px;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Sidebar nav */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  text-decoration: none;
  transition: all var(--transition);
}

.sidebar-nav a:hover {
  color: var(--text-1);
  background: var(--bg-card);
}

.sidebar-nav a.active {
  color: var(--primary);
  background: var(--primary-glow);
}

.sidebar-nav .nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.sidebar-compose {
  width: 100%;
  padding: 10px 16px;
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sidebar-compose:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--primary-glow-strong);
}

.sidebar-footer {
  font-size: 11px;
  color: var(--text-5);
  line-height: 1.6;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

/* ─── Main feed ───────────────────────────────────────────────── */
.news-feed {
  flex: 1;
  min-width: 0;
  padding: 16px;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

/* ─── Trending panel (desktop only) ──────────────────────────── */
.news-trending {
  display: none;
  width: 280px;
  flex-shrink: 0;
  padding: 20px 16px;
  border-left: 1px solid var(--border-subtle);
  position: sticky;
  top: 110px;
  height: calc(100vh - 110px);
  overflow-y: auto;
}

.trending-title {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trending-card {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: block;
}

.trending-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.1);
  transform: translateX(2px);
}

.trending-sport-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.trending-source {
  font-size: 11px;
  color: var(--text-4);
  margin-bottom: 4px;
}

.trending-card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Trending card masquée ───────────────────────────────────── */
.trending-card--masquer {
  position: relative;
  overflow: hidden;
}

.trending-card--masquer .trending-card-title {
  filter: blur(3px);
  opacity: 0.30;
  user-select: none;
}

.trending-card--masquer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(15,15,20,0.75) 100%);
  pointer-events: none;
}

.trending-masquer-badge {
  position: relative;
  z-index: 2;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── Article Cards ───────────────────────────────────────────── */
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}

.article-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* Card header */
.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 10px;
}

.sport-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.sport-tag.football  { background: rgba(16,185,129,0.15); color: var(--sport-football); }
.sport-tag.combat    { background: rgba(239,68,68,0.15);  color: var(--sport-combat); }
.sport-tag.basketball{ background: rgba(245,158,11,0.15); color: var(--sport-basketball); }
.sport-tag.tennis    { background: rgba(132,204,22,0.15); color: var(--sport-tennis); }
.sport-tag.motorsport{ background: rgba(236,72,153,0.15); color: var(--sport-motorsport); }
.sport-tag.rugby     { background: rgba(6,182,212,0.15);  color: var(--sport-rugby); }
.sport-tag.cyclisme  { background: rgba(249,115,22,0.15); color: var(--sport-cyclisme); }
.sport-tag.athletisme{ background: rgba(139,92,246,0.15); color: var(--sport-athletisme); }

.source-logo-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 12px;
}

.source-logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.source-name {
  font-size: 13px;
  color: var(--text-1);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-date {
  font-size: 12px;
  color: var(--text-2);
  flex-shrink: 0;
}

.sources-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  background: rgba(245,158,11,0.15);
  color: var(--warning);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}

/* Card body */
.card-body {
  padding: 0 18px 14px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.card-body-text {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.card-tag {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--bg-2);
  border-radius: var(--radius-full);
  color: var(--text-4);
  border: 1px solid var(--border);
}

.card-summary {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.layout-standard .card-summary {
  -webkit-line-clamp: 4;
}

.layout-standard .card-body {
  align-items: stretch;
}

.layout-standard .card-body-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-thumbnail {
  width: auto;
  height: auto;
  max-height: 250px;
  max-width: 42%;
  border-radius: var(--radius-md);
  object-fit: contain;
  flex-shrink: 0;
  background: var(--bg-2);
  align-self: center;
}

.card-thumbnail-placeholder {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}

/* ── Compact layout (no image) ─────────────────────────────── */
.layout-compact .card-body {
  align-items: center;
}

.layout-compact .card-title {
  -webkit-line-clamp: 2;
  font-size: 15px;
}

.card-sport-icon {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border: 1px solid var(--border-subtle);
}

/* ── Hero layout (big image below) ─────────────────────────── */
.card-body-hero {
  padding: 4px 18px 12px;
}

.layout-hero .card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.layout-hero .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.layout-hero .card-summary {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}

.card-hero-image-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-2);
}

.card-hero-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg);
}

.card-hero-fallback {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  border-radius: var(--radius-lg);
}

@media (min-width: 640px) {
  .card-hero-image,
  .card-hero-fallback {
    height: 240px;
  }
}

/* ── Below layout (image à droite sur desktop, en bas sur mobile) */
.card-body-below {
  padding: 4px 18px 12px;
  display: flex;
  gap: 14px;
  align-items: stretch;
}

.layout-below .card-body-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-below-image-wrap {
  flex-shrink: 0;
  max-width: 42%;
  max-height: 250px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.card-below-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 250px;
  object-fit: contain;
  display: block;
}


/* Card footer */
.card-footer {
  padding: 10px 18px 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-4);
  cursor: pointer;
  transition: all var(--transition);
  background: none;
  border: none;
  font-family: inherit;
}

.card-action:hover {
  color: var(--text-2);
  background: var(--bg-2);
}

.card-action.liked {
  color: var(--primary);
}

.card-action.liked .action-icon { color: var(--primary); }

.card-action.reposted {
  color: var(--success);
}

.card-action.commented {
  color: var(--success);
}

.card-action-count {
  font-weight: 600;
  font-size: 13px;
}

/* Card info actions (info originale + lang toggle) */
.card-info-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.card-info-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.card-info-btn:hover {
  color: var(--text-1);
  border-color: rgba(255,255,255,0.15);
}

/* ─── Source pagination in modal ──────────────────────────────── */
.source-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 16px;
}

.source-tab-btn {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-3);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.source-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.source-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 8px;
}

.source-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background var(--transition);
}

.source-dot.active {
  background: var(--primary);
  width: 18px;
  border-radius: 3px;
}

/* ═══════════════════════════════════════════════════════════════
   ARTICLE MODAL
   ═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.article-modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 1px solid var(--border);
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-modal::-webkit-scrollbar { width: 4px; }
.article-modal::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Drag handle ── */
.modal-drag-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
  position: relative;
  z-index: 6;
}

/* ── Close button ── */
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  z-index: 20;
  color: rgba(255,255,255,0.9);
  transition: all var(--transition);
}

.modal-close:hover {
  background: rgba(0,0,0,0.75);
  transform: scale(1.08);
}

/* ── Hero image ── */
.modal-hero {
  width: 100%;
  overflow: hidden;
  /* Hidden by default — JS sets display:'' only when image exists */
}

.modal-hero .modal-image {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
}

/* ── Source + sport row ── */
.modal-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 4px;
}

.modal-source-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.modal-source-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-2);
  border: 1px solid var(--border-subtle);
}

.modal-source-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.modal-source-name {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-source-time {
  font-size: 11px;
  color: var(--text-4);
}

.modal-sport-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: 999px;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

/* ── Source tabs (multi-source) ── */
.source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px 0;
}

.source-tab-btn {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: all var(--transition);
}

.source-tab-btn.active {
  background: var(--primary-glow);
  color: var(--primary);
  border-color: rgba(249,115,22,0.3);
}

.source-tab-btn:hover:not(.active) {
  background: var(--bg-2);
  color: var(--text-1);
}

/* ── Body ── */
.modal-body {
  padding: 10px 16px 28px;
}

.modal-title {
  font-family: 'Poppins', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.4;
  margin: 12px 0 12px;
}

/* ── Tags ── */
.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

/* ── Lang toggle ── */
.modal-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 6px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  background: transparent;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all var(--transition);
}

.modal-lang-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-glow);
}

/* ── Summary ── */
.modal-summary {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 12px;
}

/* ── Date ── */
.modal-date {
  font-size: 12px;
  color: var(--text-4);
  margin-bottom: 14px;
}

/* ── Actions ── */
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 18px;
  width: 100%;
  flex-wrap: nowrap;
}

/* ── Footer: report + CTA ── */
.modal-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-report-btn {
  background: none;
  border: none;
  color: var(--text-4);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  align-self: flex-end;
  transition: color var(--transition);
}

.modal-report-btn:hover { color: var(--error); }

.modal-source-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 20px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(249,115,22,0.35);
}

.modal-source-btn:hover {
  background: var(--primary-light);
  box-shadow: 0 6px 24px rgba(249,115,22,0.45);
  transform: translateY(-1px);
}

/* ─── Desktop ─── */
@media (min-width: 1024px) {
  .modal-overlay {
    align-items: center;
    padding: 24px;
  }
  .article-modal {
    border-radius: var(--radius-xl);
    max-width: 580px;
    max-height: 88vh;
  }
  .modal-drag-handle { display: none; }
  .modal-title { font-size: 20px; }
}

/* ─── Comments drawer ─────────────────────────────────────────── */
/* ─── Article comments modal (bottom-sheet) ──────────────────── */
@keyframes slideUpModal {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@keyframes fadeInBg {
  from { background: rgba(0,0,0,0); }
  to   { background: rgba(0,0,0,0.55); }
}

.article-comments-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  animation: fadeInBg 0.2s ease;
}

.article-comments-modal {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-top: 1px solid var(--border);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUpModal 0.28s cubic-bezier(0.32,0.72,0,1);
}

.article-comments-header {
  padding: 16px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.article-comments-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
}

.article-comments-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ─── Composer collé en bas du modal ─────────────────────────── */
.article-modal-composer {
  flex-shrink: 0;
  border-top: 1px solid var(--border-subtle);
  padding: 10px 12px 14px;
  background: var(--bg-card);
}

.modal-reply-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-3);
  background: var(--bg-2);
  border-left: 2px solid var(--primary);
  border-radius: 6px;
  padding: 5px 10px;
  margin-bottom: 8px;
}

.reply-chip-name {
  font-weight: 600;
  color: var(--primary);
}

.reply-chip-cancel {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-4);
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
  line-height: 1;
}

.modal-composer-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-comment-input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-1);
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
  font-family: inherit;
}

.modal-comment-input:focus { border-color: var(--primary); }
.modal-comment-input::placeholder { color: var(--text-4); }

.modal-comment-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.modal-comment-send:hover { opacity: 0.85; }

/* ─── Comment avatar (dans les modals) ───────────────────────── */
.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Compose FAB (mobile only) ───────────────────────────────── */
.compose-fab {
  position: fixed;
  bottom: 84px;
  right: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--primary-glow-strong);
  z-index: 30;
  transition: all var(--transition);
}

.compose-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px var(--primary-glow-strong);
}

/* ─── Bottom navigation (mobile only) ────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 64px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-4);
  font-size: 10px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  transition: color var(--transition);
  min-width: 52px;
}

.bottom-nav-item .nav-icon-big {
  font-size: 20px;
  line-height: 1;
}

.bottom-nav-item.active {
  color: var(--primary);
}

/* ─── Skeleton loader ─────────────────────────────────────────── */
@keyframes shimmer {
  0% { background-position: -300px 0; }
  100% { background-position: 300px 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 14px;
  margin-bottom: 12px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.skeleton-title { height: 18px; width: 85%; margin-bottom: 10px; }
.skeleton-short { width: 55%; }
.skeleton-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

/* ─── Bannière info premium ────────────────────────────────────── */
.feed-premium-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: rgba(249,115,22,0.07);
  border: 1px solid rgba(249,115,22,0.2);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-2);
}
.feed-premium-banner-icon { font-size: 15px; flex-shrink: 0; }
.feed-premium-banner-text { flex: 1; line-height: 1.4; }
.feed-premium-banner-text strong { color: var(--primary); }
.feed-premium-banner-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-4); font-size: 12px; padding: 2px 4px;
  transition: color var(--transition); flex-shrink: 0;
}
.feed-premium-banner-close:hover { color: var(--text-1); }

/* ─── Empty / error states ────────────────────────────────────── */
.feed-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-3);
}

.feed-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.feed-empty-title {
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 6px;
}

.feed-empty-sub {
  font-size: 13px;
  color: var(--text-4);
  line-height: 1.5;
}

/* ─── Load more button ────────────────────────────────────────── */
.load-more-btn {
  width: 100%;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-3);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 8px;
  font-family: inherit;
}

.load-more-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-1);
}

/* ─── Search results overlay ──────────────────────────────────── */
.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  z-index: 100;
  max-height: 360px;
  overflow-y: auto;
  display: none;
  box-shadow: var(--shadow-card);
}

.search-results.open { display: block; }

.search-result-item {
  padding: 10px 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border-subtle);
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-card-hover); }

.search-result-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.search-result-sport {
  font-size: 10px;
  color: var(--text-4);
  margin-top: 2px;
}

.search-result-user-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.search-result-meta {
  font-size: 12px;
  color: var(--text-3);
}

.search-result-sports {
  font-size: 11px;
  color: var(--text-4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-sub {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--primary-light, rgba(99,102,241,0.12));
  color: var(--primary);
  white-space: nowrap;
}

/* ─── Desktop layout (1024px+) ────────────────────────────────── */
@media (min-width: 1024px) {
  .news-page {
    padding-bottom: 0;
  }

  .news-layout {
    padding: 0;
  }

  .news-content {
    padding: 0;
  }

  .news-sidebar {
    display: flex;
    flex-direction: column;
  }

  .news-trending {
    display: block;
  }

  .news-feed {
    padding: 20px 24px;
    margin: 0;
    max-width: none;
  }

  .bottom-nav {
    display: none;
  }

  .compose-fab {
    display: none;
  }

  .article-modal {
    border-radius: var(--radius-xl);
    max-width: 600px;
    max-height: 85vh;
  }

  .modal-overlay {
    align-items: center;
  }

  .filter-tabs {
    top: 57px;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 0px;
  }

  .active-filters-bar {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ─── Tablet (640px–1023px) ───────────────────────────────────── */
@media (min-width: 640px) and (max-width: 1023px) {
  .news-feed {
    max-width: 600px;
  }
}

/* ─── Mobile: tighten topbar so search gets more space ────────── */
@media (max-width: 640px) {
  .topbar-logo .logo-text { display: none; }
  .topbar-logo .logo-icon { width: 28px; height: 28px; font-size: 14px; }
  .topbar-search input { font-size: 15px; padding: 10px 12px 10px 36px; }
  .topbar-search input::placeholder { font-size: 14px; }

  /* ─── Cards : taille originale en mobile ─── */
  .article-card { margin-bottom: 12px; }
  .card-header { gap: 8px; padding: 12px 14px 8px; }
  .sport-tag { padding: 3px 8px; font-size: 10px; }
  .source-logo-circle { width: 22px; height: 22px; font-size: 10px; }
  .source-name { font-size: 12px; }
  .card-date { font-size: 11px; }
  .card-body { padding: 0 14px 10px; gap: 12px; }
  .card-title { font-size: 15px; margin-bottom: 6px; }
  .card-tags { gap: 4px; margin-bottom: 6px; }
  .card-tag { font-size: 10px; padding: 2px 6px; }
  .card-summary { font-size: 13px; }
  .layout-standard .card-body,
  .layout-below .card-body-below { flex-direction: column; gap: 0; align-items: flex-start; }
  .layout-standard .card-body-text,
  .layout-below .card-body-text { justify-content: flex-start; }
  .layout-below .card-below-image-wrap {
    max-width: none;
    max-height: none;
    width: 100%;
    margin-top: 10px;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  }
  .layout-below .card-below-image {
    width: 100%;
    height: 200px;
    max-height: 200px;
    object-fit: cover;
  }
  .layout-standard .card-thumbnail {
    width: 100%;
    max-width: none;
    height: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    align-self: auto;
    margin-top: 10px;
  }
  .layout-standard .card-thumbnail-placeholder,
  .layout-below .card-thumbnail-placeholder,
  .layout-compact .card-sport-icon { display: none; }
  .card-thumbnail-placeholder { width: 80px; height: 80px; font-size: 28px; }
  .card-sport-icon { width: 56px; height: 56px; font-size: 26px; }
  .card-body-hero { padding: 4px 14px 10px; }
  .card-body-below { padding: 4px 14px 10px; }
  .layout-hero .card-title { font-size: 17px; margin-bottom: 6px; }
  .layout-hero .card-tags { gap: 4px; margin-bottom: 6px; }
  .layout-hero .card-summary { font-size: 13px; margin-bottom: 10px; }
  .card-footer { padding: 8px 14px 12px; }
  .card-action { padding: 6px 10px; font-size: 13px; }
  .card-action-count { font-size: 12px; }

  /* ── Modal actions : layout mobile ── */
  .modal-actions {
    justify-content: space-between;
    gap: 0;
    padding: 10px 0;
  }
  .modal-action-btn {
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    font-size: 12px;
  }
  .modal-action-btn .ma-icon { font-size: 18px; }
  .modal-action-btn .ma-count { font-size: 11px; font-weight: 700; }
  .modal-action-btn .ma-label { font-size: 10px; color: var(--text-3); }

  /* ── Modal footer: Signaler aligné à droite, bouton source en dessous ── */
  .modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .modal-report-btn {
    align-self: flex-end;
    padding: 4px 0;
    font-size: 11px;
  }
  .filter-tabs{
    zoom: 0.95;
  }
}

/* ─── Filter tag search ─────────────────────────────────────────── */
.filter-tag-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.filter-tag-search-icon {
  position: absolute;
  left: 10px;
  font-size: 13px;
  pointer-events: none;
  color: var(--text-4);
}

.filter-tag-search-wrap input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-1);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

.filter-tag-search-wrap input:focus {
  border-color: var(--border-focus);
}

.filter-tag-search-wrap input::placeholder { color: var(--text-4); }

.filter-tags-popular {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.filter-tags-more {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-4);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-tags-more:hover { color: var(--text-2); border-color: var(--text-3); }

.filter-tags-loading {
  font-size: 12px;
  color: var(--text-4);
  font-style: italic;
}

.filter-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  border: 1px solid var(--border);
  color: var(--text-3);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.filter-tag-chip:hover {
  border-color: rgba(255,255,255,0.15);
  color: var(--text-1);
}

.filter-tag-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.filter-tag-count {
  font-size: 10px;
  opacity: 0.6;
  font-weight: 400;
}

/* ─── Mobile search overlay ────────────────────────────────────── */
.mobile-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg-0);
  display: none;
  flex-direction: column;
  animation: slideDown 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-search-overlay.open { display: flex; }

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.mobile-search-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
}

.mobile-search-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.mobile-search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.mobile-search-icon {
  position: absolute;
  left: 12px;
  font-size: 16px;
  pointer-events: none;
  color: var(--text-4);
}

.mobile-search-input-wrap input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-1);
  font-size: 16px;
  font-family: inherit;
  outline: none;
}

.mobile-search-input-wrap input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.mobile-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.mobile-search-hint {
  padding: 24px 20px;
  text-align: center;
  color: var(--text-4);
  font-size: 14px;
  line-height: 1.5;
}

.mobile-search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
}

.mobile-search-result-item:hover,
.mobile-search-result-item:active {
  background: var(--bg-card);
}

.mobile-search-result-emoji {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.mobile-search-result-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.4;
  margin-bottom: 4px;
}

.mobile-search-result-meta {
  font-size: 12px;
  color: var(--text-4);
}

/* ─── Filter panel ──────────────────────────────────────────────── */
.filter-panel {
  background: var(--bg-1);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.algo-panel-drawer {
  border-top: 1px solid var(--border-subtle);
}

.filter-panel.open {
  max-height: 72vh;
  overflow-y: auto;
  overflow-x: visible;
  overscroll-behavior: contain;
}

@media (max-width: 767px) {
  /* Sur mobile, tenir compte de la barre de nav du bas (~65px) + barre d'adresse */
  .filter-panel.open {
    max-height: calc(100dvh - 175px);
  }
  /* Padding bas pour que le bouton Appliquer ne soit pas caché derrière la nav */
  .filter-actions {
    padding-bottom: max(14px, calc(14px + env(safe-area-inset-bottom, 0px)));
    margin-bottom: 0;
  }
}

/* Dropdowns de recherche — z-index élevé */
.algo-ms-suggestions {
  z-index: 200;
  max-height: 150px;
  overflow-y: visible !important;
}

.filter-panel-inner {
  padding: 12px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.filter-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.filter-panel-title {
  font-family: "Poppins", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
}

.filter-panel-subtitle {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.5;
  margin-top: 4px;
}

.view-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.view-option-chip {
  padding: 10px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  transition: all var(--transition);
}

.view-option-chip:hover {
  color: var(--text-1);
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
}

.view-option-chip.active {
  background: rgba(249,115,22,0.10);
  border-color: rgba(249,115,22,0.35);
  color: var(--primary-light);
}

/* view-explainer supprimé — remplacé par tooltips sur les chips */
.opts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.opts-grid .filter-section { margin: 0; }
.filter-chips--col { flex-direction: column; align-items: flex-start; gap: 6px; flex-direction: row; }

.filter-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}


/* Boutons Apply/Reset collés en bas du panneau */
.filter-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  padding: 12px 0 14px;
  margin: 0 -0px;
}

.filter-section { display: flex; flex-direction: column; gap: 8px; }

.filter-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-4);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  border: 1px solid var(--border);
  color: var(--text-3);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: rgba(255,255,255,0.18);
  color: var(--text-1);
  background: rgba(255,255,255,0.04);
}

.filter-chip.active {
  background: rgba(249,115,22,0.08);
  border-color: #f97316;
  color: var(--text-1);
  font-weight: 600;
}

.filter-chip.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.filter-chip-locked {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.6);
  position: relative;
}
.filter-chip-locked::after {
  content: '🔒';
  font-size: 9px;
  margin-left: 4px;
  vertical-align: middle;
  opacity: 0.7;
}

/* ─── Sport chips — mes sports / mon groupe / autres ───────── */
.filter-chip--my-sport {
  border-color: rgba(249,115,22,0.5);
  color: var(--text-2);
}
.filter-chip--my-sport:hover:not(.active) {
  border-color: rgba(249,115,22,0.75);
  background: rgba(249,115,22,0.06);
  color: var(--text-1);
}
.filter-chip--group {
  border-color: rgba(99,179,237,0.4);
  color: var(--text-3);
}
.filter-chip--group:hover:not(.active) {
  border-color: rgba(99,179,237,0.6);
  background: rgba(99,179,237,0.06);
  color: var(--text-2);
}

/* Dividers entre sections de sports */
.filter-sport-divider {
  width: 100%;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  padding: 8px 0 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.filter-sport-divider--group { color: rgba(99,179,237,0.85); }
.filter-sport-divider--other { color: var(--text-4); }

.filter-lock-hint {
  font-size: 9px;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 6px;
  color: var(--text-4);
  letter-spacing: 0;
  text-transform: none;
}

/* ─── Badge compteur d'articles sur les chips de sport ──────── */
.sport-source-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 17px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  line-height: 1;
  background: rgba(255,255,255,0.08);
  color: var(--text-3);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition);
  vertical-align: middle;
  letter-spacing: -0.2px;
}

/* Quand le chip est actif */
.filter-chip.active .sport-source-count {
  background: rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.18);
}

/* Quand hover */
.filter-chip:hover:not(.active) .sport-source-count {
  background: rgba(255,255,255,0.12);
  color: var(--text-1);
  border-color: rgba(255,255,255,0.12);
}

.filter-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.filter-toggle-row input[type="checkbox"] { display: none; }

.filter-toggle-track {
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
}

.filter-toggle-track::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-4);
  top: 2px;
  left: 2px;
  transition: transform var(--transition), background var(--transition);
}

.filter-toggle-row input:checked + .filter-toggle-track {
  background: var(--primary);
  border-color: var(--primary);
}

.filter-toggle-row input:checked + .filter-toggle-track::after {
  transform: translateX(16px);
  background: white;
}

.filter-toggle-label { font-size: 13px; color: var(--text-2); }

.filter-actions {
  display: flex;
  gap: 10px;
}

.filter-reset-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text-3);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-reset-btn:hover { color: var(--text-1); border-color: rgba(255,255,255,0.15); }

.filter-apply-btn {
  flex: 2;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: white;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-apply-btn:hover { background: var(--primary-light); }

/* ─── Active filters bar (sticky) ──────────────────────────────── */
.active-filters-bar {
  position: sticky;
  top: 107px; /* topbar(57) + filter-tabs(50) */
  z-index: 39;
  display: flex;
    display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(249, 115, 22, 0.12);
  border-bottom: 1px solid rgba(249, 115, 22, 0.3);
  font-size: 12px;
  flex-wrap: wrap;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: 1280px;
}

.active-filters-label {
  color: var(--text-4);
  font-weight: 600;
  white-space: nowrap;
}

.active-filters-tags {
  color: var(--primary);
  font-weight: 600;
  flex: 1;
}

.active-filters-clear {
  color: var(--text-4);
  font-size: 12px;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  font-family: inherit;
}

.active-filters-clear:hover { color: var(--error); background: var(--error-glow); }

/* ─── Twitter-style comments ────────────────────────────────────── */
.comments-empty {
  text-align: center;
  color: var(--text-4);
  font-size: 14px;
  padding: 32px 20px;
}

.comment-item {
  display: flex;
  gap: 0;
  position: relative;
  padding-bottom: 2px;
}

.comment-item.is-reply {
  margin-left: 40px;
  margin-top: 8px;
}

.comment-thread-line {
  position: absolute;
  left: 15px;
  top: 42px;
  bottom: 0;
  width: 2px;
  background: var(--border-subtle);
}

.comment-right {
  flex: 1;
  min-width: 0;
  padding-left: 10px;
}

.comment-bubble {
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.comment-header-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.comment-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
}

.comment-time {
  font-size: 11px;
  color: var(--text-4);
  flex: 1;
}

.comment-text {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 6px;
  word-break: break-word;
}

.comment-actions-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.comment-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-4);
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.comment-action-btn:hover { color: var(--text-2); background: var(--bg-2); }
.comment-action-btn.liked { color: #EF4444; }

.comment-more-wrap {
  position: relative;
  margin-left: auto;
}

.comment-more-btn {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-4);
  font-size: 16px;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  font-family: inherit;
  transition: all var(--transition);
}

.comment-more-btn:hover { background: var(--bg-2); color: var(--text-2); }

.comment-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  min-width: 150px;
  z-index: 50;
  display: none;
  overflow: hidden;
}

.comment-menu.open { display: block; }

.comment-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
  font-family: inherit;
}

.comment-menu button:hover { background: var(--bg-card-hover); }
.comment-menu button.danger { color: var(--error); }

.comment-replies {
  border-left: 2px solid var(--border-subtle);
  margin-left: 16px;
  margin-top: 0;
  padding-left: 8px;
}

/* ─── Level-3 sub-replies ───────────────────────────────────────── */
.sub-replies-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px 4px 2px;
  margin-top: 2px;
  margin-left: 40px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.sub-replies-toggle:hover { background: var(--bg-2); color: var(--primary-light); }
.sub-replies-toggle .toggle-arrow { display: inline-block; transition: transform 0.2s; font-size: 9px; }
.sub-replies-toggle.open .toggle-arrow { transform: rotate(90deg); }

.sub-replies-wrap {
  display: none;
  flex-direction: column;
  margin-left: 52px;
  padding-left: 14px;
  border-left: 2px solid var(--primary);
  opacity: 0.85;
  gap: 6px;
  margin-top: 4px;
}
.sub-replies-wrap.open { display: flex; }

.comment-item.level-3 { margin-left: 0; }

/* ─── Report article modal ──────────────────────────────────────── */
.report-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 250;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.report-overlay.open { display: flex; }

.report-modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 540px;
  padding: 20px 20px 32px;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.report-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.report-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  color: var(--text-2);
  transition: all var(--transition);
  flex-shrink: 0;
}

.report-close:hover { background: var(--bg-card-hover); }

.report-title {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
}

.report-subtitle {
  font-size: 13px;
  color: var(--text-4);
  margin-bottom: 16px;
  padding-left: 44px;
}

.report-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.report-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.report-option:hover {
  background: var(--bg-2);
  border-color: rgba(255,255,255,0.1);
}

.report-option input[type="radio"] { display: none; }

.report-option:has(input:checked) {
  background: var(--primary-glow);
  border-color: var(--border-focus);
}

.report-option-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }

.report-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.report-option-text strong { font-size: 13px; color: var(--text-1); font-weight: 600; }
.report-option-text small { font-size: 11px; color: var(--text-4); line-height: 1.4; }

.report-footer {
  display: flex;
  gap: 10px;
}

.report-cancel-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all var(--transition);
}

.report-cancel-btn:hover { border-color: rgba(255,255,255,0.15); color: var(--text-1); }

.report-submit-btn {
  flex: 2;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--error);
  color: white;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.report-submit-btn:hover { background: #DC2626; }

/* ─── Modal secondary actions ───────────────────────────────────── */
.modal-secondary-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.modal-report-btn {
  font-size: 12px;
  color: var(--text-4);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  font-family: inherit;
}

.modal-report-btn:hover { color: var(--error); background: var(--error-glow); }

/* ─── Desktop: report modal as centered dialog ──────────────────── */
@media (min-width: 640px) {
  .report-overlay { align-items: center; }
  .report-modal {
    border-radius: var(--radius-xl);
    max-height: 85vh;
    overflow-y: auto;
  }
}

/* ─── Toast ─────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.toast {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: white;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  animation: toastIn 0.25s ease, toastOut 0.3s ease 2.9s forwards;
  white-space: nowrap;
  pointer-events: auto;
}

.toast.success { background: var(--success); border-color: var(--success); }
.toast.error   { background: var(--error);   border-color: var(--error);   }
.toast.info    { background: var(--accent);   border-color: var(--accent);  }

@keyframes toastIn  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-8px); } }

/* ─── Slide up animation ────────────────────────────────────────── */
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ─── Top comment preview in feed cards ─────────────────────────── */
/* ─── Top comment preview (redesign) ─────────────────────────── */
.card-top-comment {
  --tc-color: var(--primary);
  display: flex;
  align-items: stretch;
  gap: 0;
  cursor: pointer;
  transition: background var(--transition);
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.022);
  text-decoration: none;
  overflow: hidden;
}

.card-top-comment:hover {
  background: rgba(255,255,255,0.05);
}

.tc-bar {
  width: 3px;
  flex-shrink: 0;
  background: var(--tc-color);
  opacity: 0.85;
  border-radius: 0 2px 2px 0;
}

.tc-inner {
  flex: 1;
  min-width: 0;
  padding: 8px 12px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tc-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--tc-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.tc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.tc-author {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.tc-dot {
  font-size: 11px;
  color: var(--text-4);
  flex-shrink: 0;
}

.tc-time {
  font-size: 11px;
  color: var(--text-4);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

.tc-text {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tc-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 1px;
}

.tc-stat {
  font-size: 11px;
  color: var(--text-4);
  display: flex;
  align-items: center;
  gap: 3px;
}

.tc-stat b {
  color: var(--text-3);
  font-weight: 600;
}

/* Legacy selectors kept for compat */
.top-comment-avatar { display: none; }
.top-comment-body   { display: none; }
.top-comment-author { display: none; }
.top-comment-likes  { display: none; }

/* ─── View modes ──────────────────────────────────────────────── */

/* ── Mode Compact : liste dense sans images ─────────────────── */
#articles-container.view-compact .card-hero-image-wrap,
#articles-container.view-compact .card-thumbnail,
#articles-container.view-compact .card-thumbnail-placeholder,
#articles-container.view-compact .card-sport-icon,
#articles-container.view-compact .card-summary,
#articles-container.view-compact .card-tags,
#articles-container.view-compact .card-top-comment {
  display: none !important;
}
#articles-container.view-compact .article-card {
  margin-bottom: 6px;
}
#articles-container.view-compact .card-header {
  padding-bottom: 2px;
}
#articles-container.view-compact .card-body,
#articles-container.view-compact .card-body-hero {
  padding: 2px 14px 6px;
}
#articles-container.view-compact .card-title {
  font-size: 14px !important;
  font-weight: 600;
  -webkit-line-clamp: 2;
  margin-bottom: 0;
}
#articles-container.view-compact .card-footer {
  padding: 4px 14px 8px;
}

/* Mode Compact : posts suivis */
#feed-container.view-compact .post-gallery,
#feed-container.view-compact .post-tags,
#feed-container.view-compact .social-proof,
#feed-container.view-compact .card-top-comment {
  display: none !important;
}
#feed-container.view-compact .post-card {
  padding: 10px 14px;
}
#feed-container.view-compact .post-content {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
}
#feed-container.view-compact .card-summary {
  -webkit-line-clamp: 1;
}
#feed-container.view-compact .card-thumbnail,
#feed-container.view-compact .card-thumbnail-placeholder,
#feed-container.view-compact .card-top-comment {
  display: none !important;
}

/* ── Mode Grille : 2 colonnes ───────────────────────────────── */
@media (min-width: 640px) {
  #articles-container.view-grille {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  #articles-container.view-grille .article-card,
  #articles-container.view-grille .post-card {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
  }
  #articles-container.view-grille .card-body,
  #articles-container.view-grille .post-body {
    flex-grow: 1;
  }
  #articles-container.view-grille .card-footer,
  #articles-container.view-grille .post-footer {
    margin-top: auto;
  }
  #articles-container.view-grille .layout-hero {
    grid-column: 1 / -1;
  }
  #articles-container.view-grille .card-summary {
    -webkit-line-clamp: 2;
  }
  #articles-container.view-grille .card-tags,
  #articles-container.view-grille .card-top-comment {
    display: none;
  }

  #feed-container.view-grille {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  #feed-container.view-grille .post-card,
  #feed-container.view-grille .article-card {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
  }
  #feed-container.view-grille .post-body,
  #feed-container.view-grille .card-body {
    flex-grow: 1;
  }
  #feed-container.view-grille .post-footer,
  #feed-container.view-grille .card-footer {
    margin-top: auto;
  }
  #feed-container.view-grille .card-top-comment,
  #feed-container.view-grille .social-proof {
    display: none;
  }
  #feed-container.view-grille .post-gallery {
    max-height: 160px;
    overflow: hidden;
  }
  #feed-container.view-grille .post-gallery img:not(:first-child) {
    display: none;
  }
  #feed-container.view-grille .post-content {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}


/* ─── Sponsor / pub card ─────────────────────────────────────── */
/* ─── Google AdSense card ──────────────────────────────────────── */
.google-ad-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(var(--border-rgb, 200,200,200), .25);
  background: var(--bg-card, #fff);
  min-height: 80px;
  margin: 4px 0;
}
.google-ad-label {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted, #999);
  letter-spacing: .04em;
  z-index: 1;
  pointer-events: none;
}

.sponsor-card {
  display: block;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(249,115,22,.18);
  background: var(--bg-card);
  margin-bottom: 12px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative;
}
.sponsor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(249,115,22,.15);
  border-color: rgba(249,115,22,.4);
}
.sponsor-card-inner {
  display: flex;
  flex-direction: column;
}
.sponsor-img-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
}
.sponsor-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.sponsor-card:hover .sponsor-img-wrap img {
  transform: scale(1.03);
}
.sponsor-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sponsor-body-noimg {
  padding: 20px;
}
.sponsor-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.sponsor-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  background: rgba(249,115,22,.1);
  border: 1px solid rgba(249,115,22,.25);
  padding: 2px 8px;
  border-radius: 99px;
}
.sponsor-sport-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-4);
  letter-spacing: .5px;
}
.sponsor-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-1);
  font-family: 'Poppins', sans-serif;
  line-height: 1.2;
}
.sponsor-tagline {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.4;
  margin-top: 2px;
}
.sponsor-cta {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.sponsor-cta span {
  transition: transform .2s ease;
}
.sponsor-card:hover .sponsor-cta span {
  transform: translateX(4px);
}

/* ============================================================
   VISIBILITY LEVELS – rendu visuel du score algo
   Traduit le niveau de pertinence en signal visuel élégant,
   sans bouton "Voir" ni friction artificielle.
   ============================================================ */

/* full / standard → rendu normal, aucune classe ajoutée */

/* dimmed : article pertinent mais secondaire — légèrement atténué */
.article-card.visibility-dimmed {
  opacity: .72;
  transition: opacity .15s ease;
}
.article-card.visibility-dimmed:hover {
  opacity: 1;
}
.article-card.visibility-dimmed .card-title {
  font-size: .93em;
}
.article-card.visibility-dimmed .card-summary {
  display: none; /* résumé masqué pour gagner de la place */
}

/* secondary : article peu pertinent — compact + nettement atténué */
.article-card.visibility-secondary {
  opacity: .45;
  border-left: 2px solid var(--border);
  transition: opacity .15s ease;
}
.article-card.visibility-secondary:hover {
  opacity: .8;
}
.article-card.visibility-secondary .card-title {
  font-size: .88em;
  color: var(--text-3);
}
.article-card.visibility-secondary .card-summary,
.article-card.visibility-secondary .card-tags,
.article-card.visibility-secondary .card-top-comment {
  display: none;
}
.article-card.visibility-secondary .card-footer {
  opacity: .6;
}


/* ============================================================
   ALGO PANEL – contrôle du feed (filtre panel > #algo-section)
   ============================================================ */

/* ── Badge Premium dans le label section ── */
.algo-premium-badge {
  display: inline-block;
  margin-left: 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #F59E0B;
  background: rgba(245,158,11,.12);
  border: 1px solid rgba(245,158,11,.3);
  padding: 2px 7px;
  border-radius: 99px;
  vertical-align: middle;
}

/* ── Conteneur commun ── */
.algo-panel {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-1);
}

/* ================================================================
   PANEL GRATUIT
   ================================================================ */
.algo-panel-free {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.algo-free-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.algo-free-mode {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-1);
}
.algo-free-mode-icon { font-size: 16px; }
.algo-free-mode-label { font-size: 13px; }

.algo-upgrade-cta {
  font-size: 11px;
  font-weight: 700;
  color: #F59E0B;
  background: rgba(245,158,11,.12);
  border: 1px solid rgba(245,158,11,.3);
  padding: 4px 10px;
  border-radius: 99px;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.algo-upgrade-cta:hover {
  background: rgba(245,158,11,.22);
  border-color: rgba(245,158,11,.5);
}

.algo-free-context {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
}
.algo-context-sport { font-weight: 600; }
.algo-free-sep { color: var(--text-4); }
.algo-context-group { color: var(--text-3); }

/* Mini weight bars (gratuit) */
.algo-weights-mini {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.algo-wmini-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.algo-wmini-lbl {
  width: 72px;
  flex-shrink: 0;
  color: var(--text-3);
  font-size: 11px;
}
.algo-wmini-track {
  flex: 1;
  display: flex;
  height: 4px;
  background: var(--bg-2);
  border-radius: 99px;
  overflow: hidden;
}
.algo-wmini-bar {
  height: 100%;
  border-radius: 99px;
  transition: width .4s ease;
}
.algo-wmini-pct {
  width: 28px;
  text-align: right;
  color: var(--text-4);
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}

.algo-free-upsell {
  font-size: 11px;
  color: var(--text-4);
  margin: 0;
  line-height: 1.5;
  border-top: 1px solid var(--border-subtle, var(--border));
  padding-top: 10px;
}
.algo-free-upsell strong { color: var(--text-3); }


/* ================================================================
   PANEL PREMIUM
   ================================================================ */
.algo-panel-premium {
  display: flex;
  flex-direction: column;
}

/* ── Mode tabs ── */
.algo-mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}

.algo-mode-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
  text-align: center;
  line-height: 1.2;
}
.algo-mode-tab:hover {
  color: var(--text-1);
  background: var(--bg-2);
}
.algo-mode-tab.active {
  color: var(--text-1);
  border-bottom-color: var(--primary, #F97316);
  background: rgba(249,115,22,.06);
}
.algo-tab-icon { font-size: 18px; line-height: 1; }
.algo-tab-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.algo-mode-tabs--5 { grid-template-columns: repeat(5, 1fr); }
.algo-mode-tabs--6 { grid-template-columns: repeat(6, 1fr); }
.algo-mode-tab--blocked {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}
/* Onglets bloqués en mode invité : visibles mais cliquables → gate connexion */
.algo-mode-tab--guest-blocked {
  opacity: 0.35;
  cursor: pointer;
}
.algo-mode-tab--locked {
  opacity: 0.45;
  filter: grayscale(0.4);
}
.algo-mode-tab--locked:hover {
  opacity: 0.65;
  filter: grayscale(0.2);
}
.algo-mode-tab--locked.active {
  opacity: 1;
  filter: none;
}
.algo-tab-lock { font-size: 9px; line-height: 1; margin-top: -1px; }
.algo-free-locked-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 10px 0 4px;
}
.algo-free-locked-detail .algo-locked-icon { font-size: 28px; }
.algo-free-locked-detail .algo-locked-title { font-size: 13px; font-weight: 700; color: var(--text-1); margin: 0; }
.algo-free-locked-detail .algo-locked-desc { font-size: 11px; color: var(--text-3); margin: 0; line-height: 1.5; }
.algo-free-locked-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
}
.algo-weights-locked { opacity: 0.38; pointer-events: none; filter: grayscale(0.3); }
.algo-trial-active-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Mode detail (below tabs) ── */
.algo-mode-detail {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.algo-mode-desc {
  font-size: 12px;
  color: var(--text-3);
  margin: 0;
  line-height: 1.5;
  font-style: italic;
}

/* ── Multi-sport zone (algo panel premium) ── */
.algo-ms-zone { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px; }
.algo-ms-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-4);
}
.algo-ms-chips { display: flex; flex-wrap: wrap; gap: 5px; min-height: 22px; }
.algo-ms-empty { font-size: 11px; color: var(--text-4); font-style: italic; }

.algo-ms-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px 5px 12px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 500; cursor: default;
  /* Même style border-only que les filter-chip gratuit */
  background: transparent;
  border: 1px solid rgba(249,115,22,0.5);
  color: var(--text-2);
  transition: border-color var(--transition), background var(--transition);
}
.algo-ms-chip:hover {
  border-color: rgba(249,115,22,0.75);
  background: rgba(249,115,22,0.06);
}
.algo-ms-chip--group {
  border-color: rgba(99,179,237,0.45);
  color: var(--text-3);
}
.algo-ms-chip--group:hover {
  border-color: rgba(99,179,237,0.7);
  background: rgba(99,179,237,0.06);
}
.algo-ms-chip-rm {
  background: none; border: none; cursor: pointer; color: var(--text-4);
  font-size: 10px; padding: 0; line-height: 1; transition: color var(--transition);
  margin-left: 1px;
}
.algo-ms-chip-rm:hover { color: var(--text-1); }

.algo-ms-search-wrap { position: relative; }
.algo-ms-search-wrap.algo-ms--maxed .algo-ms-search { opacity: 0.5; }
.algo-ms-search {
  width: 100%; padding: 7px 12px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-full); color: var(--text-1);
  font-size: 12px; font-family: 'Poppins', sans-serif;
  outline: none; transition: border-color var(--transition);
}
.algo-ms-search:focus { border-color: var(--primary); }
.algo-ms-suggestions {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  overflow: hidden;
}
.algo-ms-suggestion {
  padding: 8px 12px; cursor: pointer; font-size: 13px; font-weight: 500;
  color: var(--text-2); transition: background var(--transition);
  border-left: 3px solid var(--sport-c, transparent);
  display: flex; align-items: center; gap: 6px;
}
.algo-ms-suggestion:hover { background: var(--bg-2); color: var(--text-1); }
.algo-ms-suggestion--group { border-left-color: #6366f1; }
.algo-ms-sugg-sep {
  padding: 3px 12px; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-4); background: var(--bg-1);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  user-select: none;
}
.algo-ms-sugg-badge {
  font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 99px;
  background: rgba(99,102,241,0.18); color: #818cf8; margin-left: auto;
}
.algo-ms-sugg-empty { cursor: default; color: var(--text-4); font-size: 12px; }
.algo-ms-hint {
  font-size: 10px; color: var(--text-4); margin: 2px 0 0;
  font-style: italic;
}
.algo-ms-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--text-4); margin-top: 4px;
}
.algo-ms-upgrade { color: #a855f7; font-weight: 600; text-decoration: none; }
.algo-ms-upgrade:hover { color: #c084fc; }

/* ── Filter sport add zone (filter panel) ── */
.filter-sport-add-zone { display: flex; flex-direction: column; gap: 4px; }
.filter-sport-add-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── Input de recherche unique sport/groupe ──────────────────── */
.filter-sport-search-wrap { position: relative; flex: 1; min-width: 150px; }
.filter-sport-search-input {
  width: 100%; padding: 6px 12px;
  background: var(--bg-2); border: 1px dashed rgba(255,255,255,0.18);
  border-radius: var(--radius-full); color: var(--text-2);
  font-size: 12px; font-family: 'Poppins', sans-serif;
  outline: none; box-sizing: border-box; transition: border-color var(--transition);
}
.filter-sport-search-input:focus {
  border-color: rgba(255,255,255,0.35); color: var(--text-1);
}
.filter-sport-search-input:disabled { opacity: 0.45; cursor: not-allowed; }
.filter-sport-search-input::placeholder { color: var(--text-4); }

/* Dropdown résultats */
.filter-sport-search-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 200;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: 0 8px 28px rgba(0,0,0,0.5);
  overflow: hidden; max-height: 220px; overflow-y: auto;
}
.filter-sport-search-list[hidden] { display: none; }
.filter-sport-sugg-item {
  padding: 7px 12px; cursor: pointer; font-size: 12px; font-weight: 500;
  color: var(--text-2); transition: background var(--transition);
  border-left: 3px solid var(--sc, transparent);
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.filter-sport-sugg-item:hover { background: var(--bg-2); color: var(--text-1); }
.filter-sport-sugg-count {
  font-size: 10px; font-weight: 700; color: var(--text-4);
  background: rgba(255,255,255,0.07); border-radius: 99px;
  padding: 1px 6px; flex-shrink: 0;
}
.filter-sport-sugg-empty {
  padding: 10px 12px; font-size: 12px; color: var(--text-4); text-align: center;
}
.filter-sport-sugg-sep {
  padding: 4px 12px; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-4); background: var(--bg-1);
  border-top: 1px solid var(--border-1); border-bottom: 1px solid var(--border-1);
  user-select: none;
}
.filter-sport-sugg-item--group {
  border-left-color: #6366f1;
}
.filter-sport-sugg-item--group .filter-sport-sugg-count {
  background: rgba(99,102,241,0.15); color: #818cf8;
}
.filter-sport-add-counter {
  font-size: 11px; font-weight: 700; color: var(--text-4);
  white-space: nowrap; min-width: 28px; text-align: right;
}
.filter-sport-upsell-mini {
  font-size: 11px; color: var(--text-4); margin: 0;
}
.filter-sport-upsell-mini a { color: #a855f7; text-decoration: none; font-weight: 600; }
.filter-sport-upsell-mini a:hover { text-decoration: underline; }
.filter-sport-gratuit-upsell {
  font-size: 11px; color: var(--text-4); padding: 6px 0 2px;
}
.filter-sport-gratuit-upsell a { color: var(--primary); text-decoration: none; font-weight: 600; }
.filter-sport-gratuit-upsell a:hover { text-decoration: underline; }
.filter-chip--extra {
  border-color: rgba(34,197,94,0.45); color: var(--text-2);
}
.filter-chip--extra.active {
  background: rgba(34,197,94,0.08); border-color: #22c55e;
}
.filter-chip--extra:hover:not(.active) {
  border-color: rgba(34,197,94,0.7); background: rgba(34,197,94,0.06);
}

/* ── Features preview section (fonctionnalités premium) ── */
.fp-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
  margin-bottom: 10px;
}
.fp-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: var(--radius-md);
  cursor: default; transition: opacity var(--transition);
  background: rgba(255,255,255,.02);
}
.fp-row--compact { padding: 6px 8px; }
.fp-row--locked { opacity: 0.38; filter: grayscale(0.4); }
.fp-row--active { background: rgba(255,255,255,.04); }
.fp-icon { font-size: 14px; flex-shrink: 0; }
.fp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fp-label { font-size: 11px; font-weight: 600; color: var(--text-2); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-desc  { font-size: 10px; color: var(--text-4); }
.fp-lock  { font-size: 11px; flex-shrink: 0; }
.fp-tier-dot { font-size: 9px; flex-shrink: 0; opacity: 0.6; }
.fp-tier-dot--plus { opacity: 0.8; }
.fp-tier-badge {
  display: inline-flex; align-items: center;
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
  padding: 2px 7px; border-radius: 99px;
  color: #F59E0B; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3);
}
.fp-tier--plus {
  color: #a855f7; background: rgba(168,85,247,.12); border-color: rgba(168,85,247,.3);
}
.fp-ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
.fp-cta {
  display: block; padding: 7px 10px;
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25);
  color: #F59E0B; font-size: 11px; font-weight: 700;
  text-align: center; text-decoration: none; border-radius: var(--radius-md);
  transition: all var(--transition);
}
.fp-cta:hover { background: rgba(245,158,11,.16); border-color: rgba(245,158,11,.45); }
.fp-cta--plus { background: rgba(168,85,247,.08); border-color: rgba(168,85,247,.25); color: #a855f7; }
.fp-cta--plus:hover { background: rgba(168,85,247,.16); border-color: rgba(168,85,247,.45); }

/* ── Weight bars ── */
.algo-weights-visual {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.algo-weight-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.algo-weight-label {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 150px;
  flex-shrink: 0;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 500;
}
.algo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.algo-weight-track {
  flex: 1;
  height: 5px;
  background: var(--bg-2);
  border-radius: 99px;
  overflow: hidden;
}
.algo-weight-bar {
  height: 100%;
  border-radius: 99px;
  transition: width .4s cubic-bezier(.4,0,.2,1);
  min-width: 2px;
}
.algo-bar-viral {
  background: #F97316 !important;
  opacity: .7;
}
.algo-viral-row .algo-weight-label {
  color: var(--text-3);
  font-style: italic;
}
.algo-weight-pct {
  width: 32px;
  text-align: right;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Responsive : sur mobile les tabs passent en 2×2 ── */
@media (max-width: 480px) {
  .algo-mode-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
  .algo-weight-label { width: 120px; }
}

/* ─── Premium Teaser (cartes secondaires buzzantes pour gratuits) ─── */
.teaser-blur-light .card-body-text,
.teaser-blur-light .card-header {
  filter: blur(0.5px);
  user-select: none;
}
.teaser-blur-light .teaser-summary {
  filter: blur(1px);
}

.teaser-blur-strong .card-body-text,
.teaser-blur-strong .card-header {
  filter: blur(2px);
  user-select: none;
}
.teaser-blur-strong .teaser-summary {
  filter: blur(0.5px);
}

.teaser-blur-light,
.teaser-blur-strong {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.premium-teaser-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(1px);
  border-radius: inherit;
  z-index: 5;
  padding: 16px;
  cursor: pointer;
}

.teaser-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #F97316, #EF4444);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.teaser-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.teaser-lock-icon {
  font-size: 28px;
}

.teaser-lock-label {
  font-size: 13px;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.teaser-cta-btn {
  background: linear-gradient(135deg, #F97316, #EF4444);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 12px rgba(249,115,22,0.4);
}

.teaser-cta-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(249,115,22,0.5);
}

/* ─── Premium Modal ──────────────────────────────────────────────── */
.premium-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.premium-modal-overlay.active {
  display: flex;
}

.premium-modal-container {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl, 20px);
  width: 100%;
  max-width: 400px;
  position: relative;
  padding: 0;
  overflow: hidden;
}

.premium-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 36px 28px 28px;
  text-align: center;
}

.premium-modal-icon {
  font-size: 48px;
  line-height: 1;
}

.premium-modal-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-0);
  margin: 0;
}

.premium-modal-desc {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.6;
  margin: 0;
}

.premium-modal-perks {
  list-style: none;
  margin: 4px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  width: 100%;
}

.premium-modal-perks li {
  font-size: 13px;
  color: var(--text-2);
}

.premium-modal-cta {
  margin-top: 4px;
  text-decoration: none;
  display: block;
  text-align: center;
}

.premium-modal-skip {
  background: none;
  border: none;
  color: var(--text-4);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.premium-modal-skip:hover {
  color: var(--text-2);
}

/* ─── Modal Article Restreint (autre sport, compte gratuit) ───── */
/* ── Gate connexion invité ──────────────────────────────────── */
#guest-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 env(safe-area-inset-bottom, 0);
  animation: fadeIn .25s ease;
}
@media (min-width: 640px) {
  #guest-gate-overlay { align-items: center; }
}
.guest-gate-box {
  background: var(--bg-2);
  border-radius: 24px 24px 0 0;
  padding: 32px 24px 28px;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
@media (min-width: 640px) {
  .guest-gate-box { border-radius: 24px; padding: 40px 32px 36px; }
}
.guest-gate-icon { font-size: 40px; line-height: 1; }
.guest-gate-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-1);
  margin: 0;
}
.guest-gate-sub {
  font-size: 14px;
  color: var(--text-3);
  margin: 0;
  line-height: 1.5;
}
.guest-gate-btn-primary {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  margin-top: 4px;
  transition: opacity .15s;
}
.guest-gate-btn-primary:hover { opacity: .88; }
.guest-gate-btn-secondary {
  display: block;
  width: 100%;
  padding: 13px 20px;
  background: var(--bg-3);
  color: var(--text-1);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background .15s;
}
.guest-gate-btn-secondary:hover { background: var(--bg-4, var(--bg-3)); }
.guest-gate-skip {
  background: none;
  border: none;
  color: var(--text-4);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  font-family: inherit;
  margin-top: 4px;
}
.guest-gate-skip:hover { color: var(--text-2); }

.restricted-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.80);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.restricted-modal-overlay.active {
  display: flex;
}

.restricted-modal-container {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl, 20px);
  width: 100%;
  max-width: 420px;
  position: relative;
  overflow: hidden;
}

.restricted-modal-img-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.restricted-modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.restricted-modal-img-placeholder {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.restricted-modal-body {
  padding: 20px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.restricted-sport-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  align-self: flex-start;
}

.restricted-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-0);
  margin: 0;
  line-height: 1.4;
}

.restricted-modal-summary {
  font-size: 13px;
  color: var(--text-3);
  margin: 0;
  line-height: 1.5;
}

.restricted-overlay-content {
  margin-top: 8px;
  padding: 16px;
  background: var(--bg-2);
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.restricted-lock-icon {
  font-size: 32px;
}

.restricted-lock-text {
  font-size: 14px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.5;
}

.restricted-cta {
  width: 100%;
  text-decoration: none;
  display: block;
  text-align: center;
}

.restricted-skip {
  background: none;
  border: none;
  color: var(--text-4);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.restricted-skip:hover { color: var(--text-2); }

/* ─── Algo Builder – Premium+ ─────────────────────────────────── */
.algo-panel-premiumplus {
  background: linear-gradient(135deg, rgba(168,85,247,0.06), transparent);
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: var(--radius-lg, 14px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ppb-preset-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ppb-preset-name {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text-0);
  outline: none;
}

.ppb-preset-name:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 2px rgba(168,85,247,0.15);
}

.ppb-save-btn {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.ppb-save-btn:hover { opacity: 0.85; }

.ppb-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ── PPB new item-row layout ─────────────────────────────────── */
.ppb-items-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.ppb-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg-2, #1e1e2e);
  border: 1px solid var(--border, #2a2a3e);
  border-radius: 8px;
  min-height: 36px;
}

.ppb-item-icon {
  font-size: 16px;
  flex-shrink: 0;
  min-width: 20px;
  text-align: center;
}

.ppb-item-label {
  flex: 1;
  font-size: 13px;
  color: var(--text-1, #e2e8f0);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppb-weight-input {
  width: 52px;
  padding: 3px 6px;
  background: var(--bg-3, #252535);
  border: 1px solid var(--border, #2a2a3e);
  border-radius: 6px;
  color: var(--text-1, #e2e8f0);
  font-size: 12px;
  text-align: center;
  flex-shrink: 0;
}

.ppb-weight-input:focus {
  outline: none;
  border-color: #a855f7;
}

.ppb-weight-input::-webkit-outer-spin-button,
.ppb-weight-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.ppb-weight-unit {
  font-size: 11px;
  color: var(--text-4, #64748b);
  flex-shrink: 0;
}

.ppb-item-rm {
  background: none;
  border: none;
  color: var(--text-4, #64748b);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}

.ppb-item-rm:hover {
  color: #ef4444;
}

.ppb-sub-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2, #94a3b8);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.ppb-sub-hint {
  font-weight: 400;
  color: var(--text-4, #64748b);
  font-size: 11px;
}

.ppb-saved-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ppb-saved-meta {
  font-size: 10px;
  color: var(--text-4, #64748b);
}

.ppb-sport-sliders {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ppb-sport-row {
  display: grid;
  grid-template-columns: 110px 1fr 36px 24px;
  align-items: center;
  gap: 8px;
}

.ppb-sport-label {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ppb-slider {
  width: 100%;
  height: 4px;
  cursor: pointer;
  border-radius: 4px;
}

.ppb-slider-val {
  font-size: 11px;
  color: var(--text-3);
  text-align: right;
  min-width: 32px;
}

.ppb-remove-btn {
  background: none;
  border: none;
  color: var(--text-4);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
}

.ppb-remove-btn:hover {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
}

.ppb-empty {
  font-size: 12px;
  color: var(--text-4);
  margin: 0;
  font-style: italic;
}

.ppb-add-row {
  display: flex;
}

.ppb-add-select {
  flex: 1;
  background: var(--bg-2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  outline: none;
}

.ppb-add-select:hover {
  border-color: #a855f7;
}

.ppb-divider {
  height: 1px;
  background: var(--border-subtle);
}

.ppb-discovery-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
}

.ppb-discovery-label {
  font-size: 12px;
  color: var(--text-2);
}

.ppb-discovery-hint {
  font-size: 11px;
  color: var(--text-4);
  margin: -8px 0 0;
  line-height: 1.4;
}

/* ── Slider dans les lignes items ────────────────────────────── */
.ppb-item-row .ppb-slider {
  flex: 2;
  min-width: 60px;
  height: 4px;
  cursor: pointer;
  border-radius: 4px;
  background: transparent;
}

.ppb-slider-num {
  width: 44px;
  padding: 3px 5px;
  background: var(--bg-3, #252535);
  border: 1px solid var(--border, #2a2a3e);
  border-radius: 6px;
  color: var(--text-1, #e2e8f0);
  font-size: 12px;
  text-align: center;
  flex-shrink: 0;
  -moz-appearance: textfield;
}
.ppb-slider-num:focus {
  outline: none;
  border-color: #a855f7;
}
.ppb-slider-num::-webkit-outer-spin-button,
.ppb-slider-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* ── Découverte block (slider + num) ─────────────────────────── */
.ppb-disc-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.ppb-disc-header .ppb-discovery-hint {
  margin: 0;
}
.ppb-disc-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ppb-disc-controls .ppb-slider {
  flex: 1;
  height: 4px;
  cursor: pointer;
  border-radius: 4px;
  background: transparent;
}

/* Toggle switch */
.ppb-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.ppb-toggle-label {
  font-size: 13px;
  color: var(--text-2);
  flex: 1;
}

.ppb-toggle {
  display: none;
}

.ppb-toggle-track {
  width: 36px;
  height: 20px;
  background: var(--border);
  border-radius: 999px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.ppb-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.ppb-toggle:checked + .ppb-toggle-track {
  background: #ef4444;
}

.ppb-toggle:checked + .ppb-toggle-track::after {
  transform: translateX(16px);
}

/* Aperçu de l'algo */
.ppb-preview {
  background: var(--bg-2);
  border-radius: 10px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
}

.ppb-preview-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.ppb-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Input unifié ────────────────────────────────────────────── */
.ppb-unified-wrap {
  position: relative;
  margin-bottom: 10px;
}

.ppb-unified-input {
  width: 100%;
}

/* ── Panneau répartition ─────────────────────────────────────── */
.ppb-repartition {
  background: var(--bg-2);
  border-radius: 10px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 10px;
}

.ppb-repartition-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* ── Lignes de barre interactives ────────────────────────────── */
.ppb-bar-row {
  display: grid;
  grid-template-columns: 88px 1fr 42px 16px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ppb-bar-rm-ph {
  display: block;
  width: 16px;
  height: 1px;
}

.ppb-bar-label {
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-1);
}

.ppb-bar-row--tag .ppb-bar-label {
  color: #ec4899;
}

.ppb-bar-row--discovery .ppb-bar-label {
  color: var(--text-3);
  font-weight: 500;
}

/* ── Slider barre glissable ──────────────────────────────────── */
.ppb-bar-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--bar-color) var(--bar-pct),
    rgba(255,255,255,0.08) var(--bar-pct)
  );
  cursor: pointer;
  outline: none;
  transition: background 0.2s ease;
}

.ppb-bar-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--bar-color);
  cursor: grab;
  box-shadow: 0 1px 6px rgba(0,0,0,0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ppb-bar-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  box-shadow: 0 2px 10px rgba(0,0,0,0.55), 0 0 0 5px color-mix(in srgb, var(--bar-color) 18%, transparent);
}

.ppb-bar-slider:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.1);
}

.ppb-bar-slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.ppb-bar-slider::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--bar-color);
}

.ppb-bar-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--bar-color);
  cursor: grab;
  box-shadow: 0 1px 6px rgba(0,0,0,0.45);
}

/* ── Groupe % (chiffre + symbole) ────────────────────────────── */
.ppb-bar-pct-group {
  display: flex;
  align-items: baseline;
  gap: 0;
  justify-content: flex-end;
}

.ppb-bar-weight {
  width: 22px;
  background: transparent;
  border: none;
  color: var(--text-1);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  padding: 0;
  -moz-appearance: textfield;
}

.ppb-bar-weight::-webkit-outer-spin-button,
.ppb-bar-weight::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.ppb-bar-weight:focus {
  outline: none;
  color: var(--bar-color, #a855f7);
}

.ppb-bar-pct-unit {
  font-size: 10px;
  color: var(--text-4);
  font-weight: 500;
}

.ppb-bar-rm {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-4);
  font-size: 10px;
  padding: 0;
  line-height: 1;
  justify-self: end;
  transition: color 0.15s;
}

.ppb-bar-rm:hover {
  color: #ef4444;
}

/* ── Séparateur dans suggestions unifiées ────────────────────── */
.ppb-sugg-divider {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px 2px;
  pointer-events: none;
}

.ppb-preview-empty {
  font-size: 12px;
  color: var(--text-4);
  margin: 0;
  font-style: italic;
  text-align: center;
  padding: 8px 0;
}

/* Responsive PPB */
@media (max-width: 480px) {
  .ppb-sport-row {
    grid-template-columns: 90px 1fr 32px 20px;
    gap: 6px;
  }
  .ppb-bar-row {
    grid-template-columns: 70px 1fr 40px 14px;
    gap: 6px;
  }
}

/* ── Premium+ Builder — nouveaux éléments ───────────────────── */

/* Header "Algo Builder" avec bouton activer */
.ppb-builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.ppb-builder-activate {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.ppb-builder-activate:hover {
  background: var(--bg-3);
  border-color: var(--text-4);
}

.ppb-builder-activate.active {
  background: rgba(249, 115, 22, 0.10);
  border-color: #f97316;
  color: #f97316;
}

/* Grille répartition % */
.ppb-pct-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.ppb-pct-row {
  display: grid;
  grid-template-columns: 1fr 56px 20px;
  align-items: center;
  gap: 6px;
}

.ppb-pct-label {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}

.ppb-pct-input {
  width: 100%;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  -moz-appearance: textfield;
}

.ppb-pct-input::-webkit-outer-spin-button,
.ppb-pct-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ppb-pct-input:focus {
  outline: none;
  border-color: #f97316;
}

.ppb-pct-unit {
  font-size: 12px;
  color: var(--text-4);
}

/* Ligne d'actions (nom + save + apply) */
.ppb-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ppb-actions-row .ppb-preset-name {
  flex: 1;
  min-width: 80px;
}

.ppb-apply-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  background: #f97316;
  color: white;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.ppb-apply-btn:hover {
  opacity: 0.88;
}

.ppb-apply-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Liste des algos sauvegardés */
.ppb-saved-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.ppb-saved-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: var(--bg-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.ppb-saved-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppb-saved-apply {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #f97316;
  background: transparent;
  color: #f97316;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.ppb-saved-apply:hover {
  background: #f97316;
  color: white;
}

.ppb-saved-delete {
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-4);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.ppb-saved-delete:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.ppb-saved-empty {
  font-size: 12px;
  color: var(--text-4);
  font-style: italic;
  text-align: center;
  padding: 6px 0;
  margin: 0;
}

/* Chip tag (algo builder) */
.algo-ms-chip--tag {
  background: rgba(99, 102, 241, 0.10);
  border-color: rgba(99, 102, 241, 0.35);
  color: #818cf8;
}

.algo-ms-chip--tag .algo-ms-chip-rm {
  color: #818cf8;
  opacity: 0.7;
}

.algo-ms-chip--tag .algo-ms-chip-rm:hover {
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════════
   ALGO BUILDER — Système de blocs (nouveau)
   ══════════════════════════════════════════════════════════════ */

/* Variables locales (--bg-3 n'est pas défini globalement) */
.ppb-bloc-card,
.ppb-blocs-list,
.ppb-slots-counter,
.ppb-actions-row,
.ppb-saved-list {
  --bg-3: #242424;
}

/* ── Compteur de slots ───────────────────────────────────────── */
.ppb-slots-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}
.ppb-slots-ok {
  background: rgba(34,197,94,.08);
  border-color: rgba(34,197,94,.25);
  color: #22c55e;
}
.ppb-slots-warn {
  background: rgba(249,115,22,.08);
  border-color: rgba(249,115,22,.25);
  color: #f97316;
}
.ppb-slots-counter strong {
  font-weight: 700;
  font-size: 13px;
}
.ppb-slots-hint {
  font-size: 11px;
  opacity: .75;
}

/* ── Liste de blocs ──────────────────────────────────────────── */
.ppb-blocs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

/* ── Carte de bloc ───────────────────────────────────────────── */
.ppb-bloc-card {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ppb-bloc-card:focus-within {
  border-color: rgba(249,115,22,.45);
  box-shadow: 0 2px 12px rgba(249,115,22,0.12);
}

.ppb-bloc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-wrap: wrap;
}
.ppb-bloc-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  min-width: 42px;
}

/* ── Boutons type (Chrono / Populaire / Découverte) ──────────── */
.ppb-type-btns {
  display: flex;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
}
.ppb-type-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text-3);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ppb-type-btn:hover {
  border-color: rgba(255,255,255,0.22);
  color: var(--text-1);
  background: rgba(255,255,255,0.07);
}
.ppb-type-btn.active {
  font-weight: 700;
  /* couleur définie via style inline dans le JS */
}

/* ── Bouton suppression de bloc ──────────────────────────────── */
.ppb-bloc-rm {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-4);
  cursor: pointer;
  margin-left: auto;
  transition: color 0.15s, border-color 0.15s;
}
.ppb-bloc-rm:hover {
  color: #ef4444;
  border-color: rgba(239,68,68,.35);
}

/* ── Corps du bloc ───────────────────────────────────────────── */
.ppb-bloc-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 10px;
}

/* ── Champs génériques ───────────────────────────────────────── */
.ppb-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ppb-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 4px;
}
.ppb-field-hint {
  font-weight: 400;
  color: var(--text-4);
  font-size: 10px;
}
.ppb-field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}

/* ── Chips de sports dans un bloc ────────────────────────────── */
.ppb-sport-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 0;
}
.ppb-sport-chips-wrap:empty {
  display: none;
}
.ppb-sport-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px 2px 7px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--sport-c, #6366f1) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--sport-c, #6366f1) 35%, transparent);
  color: var(--sport-c, #6366f1);
  white-space: nowrap;
}
.ppb-sport-chip-rm {
  font-size: 10px;
  background: none;
  border: none;
  color: inherit;
  opacity: .6;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: opacity 0.15s;
}
.ppb-sport-chip-rm:hover { opacity: 1; }

/* ── Input recherche sport par bloc ──────────────────────────── */
.ppb-sport-search {
  width: 100%;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--text-1);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}
.ppb-sport-search:focus {
  border-color: rgba(249,115,22,.5);
  background: rgba(255,255,255,0.07);
}
.ppb-sport-search::placeholder { color: var(--text-4); }

/* ── Suggestions sport par bloc ──────────────────────────────── */
.ppb-sport-sugg {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  z-index: 120;
  overflow: hidden;
  max-height: 200px;
  overflow-y: auto;
}
.ppb-sport-sugg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 7px 10px;
  cursor: pointer;
  color: var(--text-1);
  border-left: 2px solid color-mix(in srgb, var(--sport-c, #6366f1) 50%, transparent);
  transition: background 0.1s;
}
.ppb-sport-sugg-item:hover {
  background: rgba(255,255,255,0.06);
}

/* ── Slider slots ────────────────────────────────────────────── */
.ppb-field--slots .ppb-field-label {
  flex-direction: row;
  align-items: center;
}
.ppb-slot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 5px;
  padding: 0 5px;
  min-width: 22px;
  margin-left: 4px;
}
.ppb-slots-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ppb-slots-range {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 99px;
  background: rgba(255,255,255,0.14);
  accent-color: var(--bar-color, #6366f1);
  outline: none;
  cursor: pointer;
}
.ppb-slots-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
  cursor: pointer;
  transition: transform 0.15s;
}
.ppb-slots-range::-webkit-slider-thumb:hover { transform: scale(1.25); }
.ppb-slots-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
  cursor: pointer;
}
.ppb-slot-dec,
.ppb-slot-inc {
  font-size: 14px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--text-2);
  cursor: pointer;
  line-height: 1;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.ppb-slot-dec:hover { border-color: #ef4444; color: #ef4444; }
.ppb-slot-inc:hover { border-color: #22c55e; color: #22c55e; }

/* ── Boutons de diversité ─────────────────────────────────────── */
.ppb-field--diversity { flex: 1; }
.ppb-div-btns {
  display: flex;
  gap: 4px;
}
.ppb-div-btn {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 4px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text-2);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ppb-div-btn:hover {
  border-color: rgba(255,255,255,0.22);
  color: var(--text-1);
  background: rgba(255,255,255,0.08);
}
.ppb-div-btn.active {
  background: rgba(249,115,22,.18);
  border-color: rgba(249,115,22,.55);
  color: #fb923c;
  font-weight: 700;
}

/* ── Max par sport ────────────────────────────────────────────── */
.ppb-field--maxsport {
  width: 72px;
  flex-shrink: 0;
}
.ppb-maxsport {
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 6px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--text-1);
  outline: none;
  text-align: center;
  transition: border-color 0.15s;
}
.ppb-maxsport:focus { border-color: rgba(249,115,22,.5); }

/* ── Bouton ajouter un bloc ──────────────────────────────────── */
.ppb-add-bloc-btn {
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 0;
  border-radius: 8px;
  border: 1.5px dashed rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.02);
  color: var(--text-2);
  cursor: pointer;
  text-align: center;
  margin-bottom: 4px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.ppb-add-bloc-btn:hover {
  border-color: rgba(249,115,22,.55);
  color: #fb923c;
  background: rgba(249,115,22,.06);
}
.ppb-pool-section {
  margin-top: 6px;
  margin-bottom: 4px;
}
.ppb-pool-mode-btns {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.ppb-pool-mode-btn {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text-2);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ppb-pool-mode-btn.active {
  background: rgba(249,115,22,.18);
  border-color: rgba(249,115,22,.55);
  color: #fb923c;
}
.ppb-pool-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 24px;
  padding: 4px 0;
}

/* ── Section title (algos sauvegardés) ───────────────────────── */
.ppb-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* ── Responsive builder blocs ────────────────────────────────── */
@media (max-width: 480px) {
  .ppb-type-btns { gap: 3px; }
  .ppb-type-btn { padding: 3px 6px; font-size: 10px; }
  .ppb-field-row { grid-template-columns: 1fr; }
  .ppb-field--maxsport { width: 100%; }
  .ppb-div-btn { font-size: 9px; }
}

/* Active chip count — border-only active state */
.filter-chip.active .sport-source-count {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
}

/* ── Card masqué (autre sport, 1/3 lottery, gratuit) ─────────── */
.article-card--masquer {
  position: relative;
  overflow: hidden;
}

/* Blur l'image miniature */
.article-card--masquer .card-thumbnail,
.article-card--masquer .card-hero-image,
.article-card--masquer .card-below-image {
  filter: blur(5px);
  transform: scale(1.04); /* cache les bords flous */
}

/* Blur + estompe le résumé */
.article-card--masquer .card-summary {
  filter: blur(4px);
  opacity: 0.35;
  user-select: none;
}

/* Dégradé léger du bas pour laisser respirer le badge */
.article-card--masquer::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 72px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(15, 15, 20, 0.82) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Badge "Sport masqué" en bas */
.card-masquer-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 10px 16px 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.card-masquer-inner {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 20px;
  padding: 5px 13px 5px 10px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s;
}

.card-masquer-overlay:hover .card-masquer-inner {
  background: rgba(255,255,255,0.13);
}

.card-masquer-lock {
  font-size: 12px;
  line-height: 1;
}

.card-masquer-label {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.02em;
}

.card-masquer-hint {
  font-size: 10.5px;
  color: rgba(255,255,255,0.5);
  margin-left: 1px;
}

/* ── Boutons grisés sur card masquée ─────────────────────────── */
.card-info-btn--locked {
  opacity: 0.30;
  cursor: pointer;
  pointer-events: auto;
  text-decoration: none;
  color: inherit;
}
.card-info-btn--locked:hover {
  opacity: 0.50;
}

/* ── Image floue dans le modal restreint ─────────────────────── */
.restricted-modal-img-wrap img {
  filter: blur(8px);
  transform: scale(1.06);
  transition: none;
}

/* ─── Modal partager en MP (news + suivis) ───────────────────── */
.share-mp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999999;
  align-items: center;
  justify-content: center;
}

.share-mp-overlay.open { display: flex; }

.share-mp-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  width: 340px;
  max-width: 94vw;
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  
}

.share-mp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-1);
  flex-shrink: 0;
}

.share-mp-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-3);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.share-mp-close:hover { background: var(--bg-2); }

.share-mp-search-wrap {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.share-mp-search {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-1);
  outline: none;
}

.share-mp-search:focus { border-color: var(--primary); }

.share-mp-list {
  overflow-y: auto;
  flex: 1;
  padding: 6px 0;
}

.share-mp-loading,
.share-mp-empty {
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  padding: 24px 16px;
}

.share-mp-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-3);
  padding: 8px 16px 4px;
}

.share-mp-conv-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}

.share-mp-conv-btn:hover { background: var(--bg-2); }

.share-mp-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.share-mp-avatar img { width: 100%; height: 100%; object-fit: cover; }

.share-mp-user-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.share-mp-conv-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-mp-pseudo {
  font-size: 12px;
  color: var(--text-3);
}

/* ─── Article card MP (→ voir messages.css) ─────────────────── */

/* ─── Trial algo — P1/P2/P3/P4 ──────────────────────────────── */

/* Cards modes dans le panel gratuit */
.algo-mode-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 8px;
}
.algo-mode-card--locked { opacity: 0.75; }
.algo-mode-card--trial {
  border-color: #f97316;
  background: rgba(249,115,22,0.07);
}
.algo-mode-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.algo-mode-card-icon { font-size: 15px; }
.algo-mode-card-label { font-size: 13px; font-weight: 700; color: var(--text-1); flex: 1; }
.algo-mode-card-lock  { font-size: 12px; opacity: 0.6; }
.algo-mode-card-action { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.algo-mode-card-desc  { font-size: 11px; color: var(--text-3); margin-bottom: 6px; }
.algo-mode-card-bars  { margin-top: 4px; }

/* Badges / boutons trial */
.trial-mode-active-badge {
  font-size: 11px; font-weight: 700;
  color: #f97316;
  background: rgba(249,115,22,0.15);
  border: 1px solid rgba(249,115,22,0.35);
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}
.trial-mode-current-badge {
  font-size: 11px; font-weight: 700; color: #22c55e;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 20px; padding: 2px 8px;
}
.trial-cooldown-badge {
  font-size: 10px; color: var(--text-4);
  white-space: nowrap;
}
/* ── Mots-clés tags surlignés dans le résumé ─────────────────── */
.tag-highlight {
  color: var(--text-1);
  font-weight: 800;
  font-style: normal;
}

.trial-unlock-btn {
  display: block;
  margin-top: 4px;
  font-size: 11px; font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: opacity .15s;
}
.trial-unlock-btn:hover { opacity: .75; }
.trial-upgrade-link {
  font-size: 11px; color: var(--primary); text-decoration: none; font-weight: 600;
}
.trial-try-btn {
  font-size: 11px; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  border: none; border-radius: 20px; padding: 3px 10px;
  cursor: pointer; font-family: inherit;
  transition: opacity 0.15s;
}
.trial-try-btn:hover { opacity: 0.85; }
.algo-trial-hint {
  font-size: 11px; color: var(--text-4);
  margin: 4px 0 0; text-align: center;
}

/* P3 — Badge pulsant dans l'onglet Filtres */
.trial-nav-badge {
  display: inline-block;
  margin-left: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #f97316;
  background: rgba(249,115,22,0.15);
  border: 1px solid rgba(249,115,22,0.35);
  border-radius: 12px;
  padding: 1px 6px;
  animation: trial-pulse 1.5s ease-in-out infinite;
}
@keyframes trial-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* P4 — Banner builder trial dans panel premium */
.algo-builder-trial-banner {
  font-size: 12px;
  color: var(--text-2);
  background: rgba(168,85,247,0.08);
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.algo-builder-trial-banner--active {
  background: rgba(168,85,247,0.14);
  border-color: rgba(168,85,247,0.45);
  color: #c084fc;
  font-weight: 600;
}
.algo-builder-trial-banner--cooldown {
  opacity: 0.7;
}

/* ── Engagers modal (likes / reposts / commentaires / partage) ── */
.engagers-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.55); backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.engagers-overlay.open { opacity: 1; pointer-events: all; }
.engagers-sheet {
  width: 100%; max-width: 540px;
  background: var(--bg-2); border-radius: 18px 18px 0 0;
  max-height: 70vh; display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.engagers-overlay.open .engagers-sheet { transform: translateY(0); }
.engagers-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px; border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.engagers-sheet-title { font-weight: 700; font-size: 15px; color: var(--text-1); }
.engagers-sheet-close {
  background: none; border: none; color: var(--text-3); font-size: 18px;
  cursor: pointer; padding: 4px 8px; border-radius: 8px; line-height: 1;
}
.engagers-sheet-close:hover { background: var(--bg-3); }
.engagers-list {
  overflow-y: auto; flex: 1; padding: 8px 0;
}
.engager-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; cursor: pointer; transition: background .15s;
}
.engager-row:hover { background: var(--bg-3); }
.engager-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-3); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--text-2); flex-shrink: 0; overflow: hidden;
}
.engager-avatar img { width: 100%; height: 100%; object-fit: cover; }
.engager-name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.engager-pseudo { font-size: 12px; color: var(--text-3); }
.engagers-empty { padding: 32px 18px; text-align: center; color: var(--text-3); font-size: 14px; }
.engagers-loading { padding: 32px 18px; text-align: center; color: var(--text-3); font-size: 14px; }

/* ── Modal actions avec labels texte ── */
.modal-action-btn {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  color: var(--text-2); font-size: 13px; padding: 7px 10px;
  border-radius: 10px; transition: background .15s, color .15s;
}
.modal-action-btn:hover { background: var(--bg-3); color: var(--text-1); }
.modal-action-btn.liked { color: #ef4444; }
.modal-action-btn.reposted { color: #10b981; }
.modal-action-btn.commented { color: #10b981; }
.modal-action-btn .ma-icon { font-size: 16px; }
.modal-action-btn .ma-count { font-weight: 700; }
.modal-action-btn .ma-label { color: var(--text-3); font-size: 12px; }

/* ─── YouTube media ──────────────────────────────────────────── */
.yt-thumb-wrap {
  position: relative;
  display: inline-block;
  line-height: 0;
}
.yt-thumb-wrap.card-thumbnail-wrap {
  max-width: 42%;
  flex-shrink: 0;
  align-self: center;
}
.yt-thumb-wrap.card-thumbnail-wrap .card-thumbnail {
  max-width: 100%;
}
.yt-thumb-wrap.card-hero-image-wrap {
  width: 100%;
}
.yt-thumb-wrap.card-hero-image-wrap .card-hero-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.yt-thumb-wrap.card-below-image-wrap {
  width: 100%;
}
.yt-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(0,0,0,.15);
}
/* Modal YouTube iframe */
.yt-modal-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}
.yt-modal-iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* ─── Layout vidéo (YouTube inline, Twitter-style) ──────────── */
.layout-video {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.card-body-video {
  padding: 10px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.layout-video .card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-1);
  margin-bottom: 2px;
}
.layout-video .card-summary {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* ── Inline player ── */
.yt-inline-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
  overflow: hidden;
  margin-top: 8px;
  border-radius: 0;
}
.yt-inline-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .2s;
}
.yt-inline-player:hover .yt-inline-thumb {
  opacity: .85;
}
.yt-inline-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform .15s;
}
.yt-inline-player:hover .yt-inline-play {
  transform: scale(1.08);
}
.yt-inline-player.yt-playing .yt-inline-play { display: none; }
.yt-inline-iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* Vidéo inline : max-width sur desktop */
@media (min-width: 640px) {
  .yt-inline-player {
    max-width: 480px;
  }
}

@media (min-width: 640px) {
  .yt-inline-player {
    margin-left: auto;
    margin-right: auto;
  }
}

/* MP4 inline : la balise video comme thumbnail */
.mp4-inline-player .yt-inline-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Card interactions (long press elevation + heart burst) ─────── */
.article-card,
.post-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.article-card.card-pressed,
.post-card.card-pressed {
  transform: scale(1.025) translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  z-index: 5;
  position: relative;
}

/* Heart burst animation on double-click */
@keyframes heartBurst {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
  50%  { opacity: 1; transform: translate(-50%, -80%) scale(1.4); }
  100% { opacity: 0; transform: translate(-50%, -130%) scale(1); }
}

.heart-burst {
  position: fixed;
  font-size: 2.2rem;
  pointer-events: none;
  z-index: 9999;
  animation: heartBurst 0.6s ease forwards;
  user-select: none;
}
