/* ═══════════════════════════════════════════════
   SPOILME — components.css
   Navbar · Buttons · Cards · Badges · Search
   Forms · Modal · Sidebar · Feed · Avatar
═══════════════════════════════════════════════ */

@import 'variables.css';

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1. NAVBAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.navbar {
  height: var(--navbar-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-creme);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.navbar__logo span { color: var(--color-mauve); }

.navbar__logo-icon {
  width: 36px;
  height: 36px;
  background: var(--color-bordeaux);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.navbar__search {
  flex: 1;
  max-width: 420px;
  margin: 0 var(--space-xl);
  position: relative;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.navbar__theme-toggle {
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.navbar__theme-toggle:hover {
  background: var(--color-bordeaux);
  color: var(--color-creme);
  border-color: var(--color-bordeaux);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   2. BUTTONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px var(--space-lg);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  font-family: var(--font-sans);
  transition: all var(--transition-spring);
  white-space: nowrap;
  cursor: pointer;
  border: 1.5px solid transparent;
  line-height: 1;
}

.btn-primary {
  background: var(--color-bordeaux);
  color: var(--color-creme);
  border-color: var(--color-bordeaux);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  border-color: var(--color-mauve);
  color: var(--color-creme);
  background: var(--bg-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  padding: 8px var(--space-md);
}
.btn-ghost:hover {
  color: var(--color-creme);
  background: var(--bg-hover);
}

.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: var(--radius-full); font-size: 16px; }
.btn-sm   { padding: 6px var(--space-md); font-size: var(--text-xs); }
.btn-lg   { padding: 14px var(--space-xl); font-size: var(--text-base); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   3. SEARCH BAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.search-bar { position: relative; width: 100%; }

.search-bar__input {
  width: 100%;
  height: 40px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0 var(--space-md) 0 42px;
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: all var(--transition-base);
}
.search-bar__input::placeholder { color: var(--text-muted); }
.search-bar__input:focus {
  border-color: var(--color-mauve);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(190, 129, 145, 0.15);
}

.search-bar__icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm);
  z-index: 200;
}

.search-suggestion {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.search-suggestion:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   4. AVATAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.avatar {
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-hover);
  border: 2px solid var(--border-color);
}
.avatar-xs  { width: 24px;  height: 24px; }
.avatar-sm  { width: 32px;  height: 32px; }
.avatar-md  { width: 40px;  height: 40px; }
.avatar-lg  { width: 56px;  height: 56px; }
.avatar-xl  { width: 80px;  height: 80px; }
.avatar-2xl { width: 112px; height: 112px; border-width: 3px; }
.avatar--bordeaux { border-color: var(--color-bordeaux); }
.avatar--mauve    { border-color: var(--color-mauve); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   5. BADGES & TAGS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  line-height: 1.4;
  white-space: nowrap;
}
.badge-film  { background: rgba(84,35,51,0.25);  color: #f0b8c8; border: 1px solid rgba(84,35,51,0.4); }
.badge-serie { background: rgba(190,129,145,0.2); color: #e8c8d0; border: 1px solid rgba(190,129,145,0.3); }
.badge-anime { background: rgba(215,170,169,0.2); color: #d7aaa9; border: 1px solid rgba(215,170,169,0.3); }
.badge-actu  { background: rgba(248,223,218,0.15);color: #f8dfda; border: 1px solid rgba(248,223,218,0.25); }
.badge-debat { background: rgba(84,35,51,0.5);   color: #f8dfda; border: 1px solid var(--color-bordeaux); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.tag:hover, .tag.active {
  background: var(--color-bordeaux);
  color: var(--color-creme);
  border-color: var(--color-bordeaux);
}

.karma-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-bordeaux), var(--color-mauve));
  color: var(--color-creme);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  box-shadow: var(--shadow-sm);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   6. CARD POST
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
}
.card:hover {
  border-color: rgba(190, 129, 145, 0.4);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__media         { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--bg-secondary); }
.card__media--poster { aspect-ratio: 2/3; max-height: 320px; }

.card__body   { padding: var(--space-md) var(--space-lg); }
.card__header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-md); }
.card__meta   { flex: 1; min-width: 0; }

.card__username {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card__time { font-size: var(--text-xs); color: var(--text-muted); }

.card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.card__tags   { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-bottom: var(--space-md); }

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   7. ACTION BAR (like / dislike / comment)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.action-bar { display: flex; align-items: center; gap: var(--space-sm); }

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}
.action-btn:hover   { background: var(--bg-hover); color: var(--text-primary); }
.action-btn.liked   { color: #f472b6; background: rgba(244,114,182,0.1); border-color: rgba(244,114,182,0.2); }
.action-btn.disliked{ color: var(--color-mauve); background: rgba(190,129,145,0.1); }
.action-btn__count  { font-weight: var(--font-semibold); font-size: var(--text-xs); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   8. FILTER TABS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  flex-shrink: 0;
  padding: 8px var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-spring);
}
.filter-tab:hover  { border-color: var(--color-mauve); color: var(--text-primary); }
.filter-tab.active { background: var(--color-bordeaux); border-color: var(--color-bordeaux); color: var(--color-creme); box-shadow: var(--shadow-sm); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   9. FAB BOUTON FLOTTANT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.fab {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 56px; height: 56px;
  border-radius: var(--radius-full);
  background: var(--color-bordeaux);
  color: var(--color-creme);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  border: none;
  z-index: 90;
  transition: all var(--transition-spring);
}
.fab:hover { background: var(--accent-hover); transform: scale(1.1) rotate(45deg); box-shadow: var(--shadow-glow); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   10. MODAL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 4, 7, 0.85);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-xl);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-spring);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal__header  { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-lg); }
.modal__title   { font-family: var(--font-display); font-size: var(--text-xl); color: var(--text-primary); }

.modal__close {
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}
.modal__close:hover { background: var(--color-bordeaux); color: var(--color-creme); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   11. FORM ELEMENTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.form-group   { display: flex; flex-direction: column; gap: var(--space-xs); margin-bottom: var(--space-md); }
.form-label   { font-size: var(--text-sm); font-weight: var(--font-medium); color: var(--text-secondary); }

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px var(--space-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--color-mauve);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(190, 129, 145, 0.12);
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-select   { appearance: none; cursor: pointer; }

.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.upload-zone:hover {
  border-color: var(--color-mauve);
  background: rgba(190, 129, 145, 0.05);
  color: var(--text-primary);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   12. SIDEBAR WIDGETS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}
.widget__title {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}

.trend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.trend-item:last-child { border-bottom: none; }
.trend-item:hover .trend-item__name { color: var(--color-creme); }
.trend-item__rank  { font-size: var(--text-xs); font-weight: var(--font-bold); color: var(--color-bordeaux); width: 20px; }
.trend-item__name  { flex: 1; font-size: var(--text-sm); color: var(--text-secondary); margin-left: var(--space-sm); transition: color var(--transition-fast); }
.trend-item__count { font-size: var(--text-xs); color: var(--text-muted); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   13. NOTIFICATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.notif-wrapper { position: relative; display: inline-flex; }
.notif-dot {
  position: absolute; top: -2px; right: -2px;
  width: 10px; height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-mauve);
  border: 2px solid var(--bg-secondary);
}
.notif-count {
  position: absolute; top: -6px; right: -8px;
  min-width: 18px; height: 18px;
  border-radius: var(--radius-full);
  background: var(--color-bordeaux);
  color: var(--color-creme);
  font-size: 10px;
  font-weight: var(--font-bold);
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-secondary);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   14. BOTTOM NAV MOBILE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  z-index: 90;
  padding: 0 var(--space-md);
}

@media (max-width: 768px) {
  .navbar         { padding: 0 var(--space-md); }
  .navbar__search { display: none; }
  .fab            { bottom: 80px; right: var(--space-md); }
  .modal          { padding: var(--space-lg); }
  .card__body     { padding: var(--space-md); }
  .bottom-nav     { display: flex; align-items: center; justify-content: space-around; }
}

.bottom-nav__item {
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  padding: var(--space-sm);
  color: var(--text-muted);
  font-size: 10px;
  cursor: pointer;
  transition: color var(--transition-fast);
  border: none; background: none;
  font-family: var(--font-sans);
}
.bottom-nav__item.active,
.bottom-nav__item:hover { color: var(--color-creme); }
.bottom-nav__item span:first-child { font-size: 22px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   WATCH PROVIDERS — Où regarder ?
   Module streaming légal avec liens affiliés
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Section conteneur */
.watch-providers-section {
  margin-bottom: 28px;
}

/* Catégorie (Abonnement / Louer / Acheter) */
.wp-category {
  margin-bottom: var(--space-lg);
}

.wp-cat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: var(--space-sm);
}
.wp-cat-label--stream { color: #4ade80; }
.wp-cat-label--rent   { color: var(--color-mauve); }
.wp-cat-label--buy    { color: #facc15; }

/* Rangée de chips */
.wp-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Chip individuelle (plateforme) */
.wp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.wp-chip:hover {
  border-color: var(--color-mauve);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(190, 129, 145, 0.2);
  color: var(--color-creme);
}

/* Chip affilié — bordure dorée */
.wp-chip--aff {
  border-color: rgba(250, 204, 21, 0.25);
}
.wp-chip--aff:hover {
  border-color: rgba(250, 204, 21, 0.55);
  box-shadow: 0 4px 16px rgba(250, 204, 21, 0.12);
}

/* Logo plateforme */
.wp-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.wp-logo-fallback {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

/* Nom de la plateforme */
.wp-chip-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badge "Affilié" */
.wp-aff-badge {
  font-size: 8px;
  font-weight: 700;
  background: rgba(250, 204, 21, 0.18);
  color: #facc15;
  border-radius: 4px;
  padding: 1px 6px;
  letter-spacing: .04em;
  flex-shrink: 0;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

/* Attribution JustWatch + TMDB (obligatoire) */
.wp-attribution {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-color);
}
.wp-jw-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.wp-jw-link:hover { color: var(--color-mauve); }
.wp-tmdb-attr {
  font-size: 10px;
  color: var(--text-muted);
  opacity: .6;
}

/* État vide */
.wp-empty {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px dashed var(--border-color);
  line-height: 1.7;
}

/* Skeleton loader */
.wp-skeleton {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.wp-sk-chip {
  width: 120px;
  height: 50px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  animation: wp-pulse 1.5s ease-in-out infinite;
}
.wp-sk-chip--wide { width: 160px; }
.wp-sk-chip:nth-child(2) { animation-delay: .15s; }
.wp-sk-chip:nth-child(3) { animation-delay: .30s; }
.wp-sk-chip:nth-child(4) { animation-delay: .45s; }

@keyframes wp-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* Responsive mobile */
@media (max-width: 768px) {
  .wp-chips-row { gap: 8px; }
  .wp-chip {
    padding: 6px 11px;
    font-size: var(--text-xs);
    gap: 6px;
  }
  .wp-logo-img,
  .wp-logo-fallback { width: 26px; height: 26px; }
  .wp-chip-name { max-width: 100px; }
  .wp-aff-badge { display: none; } /* Caché sur mobile pour économiser l'espace */
}
@media (max-width: 480px) {
  .wp-chip-name { max-width: 80px; }
  .wp-chip { padding: 5px 9px; gap: 5px; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STABILISATION BARRE DE RECHERCHE + NAVBAR
   Avec la global-sidebar (logo masqué), on donne
   plus de place à la barre de recherche.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
body.has-sidebar .navbar {
  /* Offset du côté gauche (logo caché, sidebar brand à gauche) */
  padding-left: var(--space-xl);
}

body.has-sidebar .navbar__search {
  /* Plus de place puisque le logo est masqué */
  max-width: 580px;
}

/* S'assure que la search-bar prend bien la largeur dispo */
body.has-sidebar .navbar__search .search-bar {
  width: 100%;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GLOBAL SIDEBAR (injectée par header.js
   sur toutes les pages app)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.global-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 0 var(--space-md) var(--space-lg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 90;
  transition: transform var(--transition-base);
}

body.has-sidebar {
  padding-left: var(--sidebar-width);
}

/* Le logo sidebar remplace le logo navbar — évite la double affichage */
body.has-sidebar .navbar__logo {
  display: none;
}

/* Zone brand : même hauteur que la navbar, aligne visuellement
   la sidebar avec le header à droite */
.global-sidebar__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  height: var(--navbar-height);
  padding: 0 var(--space-md);
  margin-bottom: var(--space-sm);
  font-size: var(--text-lg);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.global-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.global-sidebar__footer {
  margin-top: auto;
  padding-top: var(--space-sm);
}

.global-sidebar__sep {
  height: 1px;
  background: var(--border-color);
  margin: var(--space-sm) 0;
}

/* ── Nav items (partagés : feed .left-sidebar + .global-sidebar + mobile drawer) ── */
.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 10px var(--space-md);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: none;
  border: none;
  font-family: var(--font-sans);
  width: 100%;
  text-align: left;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(84, 35, 51, 0.2);
  color: var(--color-creme);
  font-weight: 600;
}

[data-theme="ocean"] .nav-item.active {
  background: rgba(81, 101, 135, 0.25);
}

.nav-item--logout { color: #f87272 !important; }
.nav-item--logout:hover { background: rgba(248, 114, 114, 0.1) !important; }

.nav-item__icon {
  font-size: 18px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

/* Badges numérotés (ex: Débats "3") */
.nav-badge {
  margin-left: auto;
  background: var(--color-bordeaux);
  color: var(--color-creme);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
}

/* Badge LIVE */
.nav-live {
  margin-left: auto;
  background: #4ade80;
  color: #0d0d0d;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  animation: nav-live-pulse 2s ease-in-out infinite;
}

@keyframes nav-live-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ── Masquer la sidebar globale sur mobile/tablette ── */
@media (max-width: 992px) {
  .global-sidebar { display: none !important; }
  body.has-sidebar { padding-left: 0 !important; }
  /* Restaurer la navbar padding et search sur mobile */
  body.has-sidebar .navbar { padding-left: var(--space-md); }
  body.has-sidebar .navbar__search { max-width: 420px; }
}
