/* ═══════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-base:     #080808;
  --bg-surface:  #0f0f0f;
  --bg-elevated: #161616;
  --bg-hover:    #1e1e1e;
  --border:      rgba(255,255,255,0.06);
  --border-md:   rgba(255,255,255,0.10);
  --border-hi:   rgba(255,255,255,0.18);

  --text-1: #f0f0f0;
  --text-2: #888;
  --text-3: #3a3a3a;

  --violet:  #a78bfa;
  --violet-d:#7c3aed;
  --orange:  #f97316;
  --cyan:    #22d3ee;
  --green:   #4ade80;
  --amber:   #fbbf24;
  --red:     #f87171;

  --accent-film:   var(--orange);
  --accent-series: var(--cyan);
  --accent-livre:  var(--green);

  --sidebar-w: 228px;
  --radius:    14px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
}

html { font-size: 16px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-1);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient background glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 15% -10%,  rgba(167,139,250,.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85%  110%,  rgba(249,115, 22,.05) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 50%   50%,  rgba( 34,211,238,.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ═══════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 14px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  gap: 8px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 10px 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.logo-mark { width: 28px; height: 28px; flex-shrink: 0; }

.logo-text {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.6px;
  background: linear-gradient(135deg, #e2e2e2 30%, #666 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav list */
.nav-list { list-style: none; display: flex; flex-direction: column; gap: 2px; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
  user-select: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  text-decoration: none;
  position: relative;
}

.nav-item:hover { background: rgba(255,255,255,.04); color: var(--text-1); }

.nav-item.active {
  background: rgba(167,139,250,.1);
  color: var(--violet);
}

.nav-item.active .nav-icon svg { stroke: var(--violet); }

.nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.nav-icon svg { width: 18px; height: 18px; transition: stroke .15s; }

.nav-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  background: var(--bg-elevated);
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 22px;
  text-align: center;
  transition: color .2s, background .2s;
}

.nav-item.active .nav-count { background: rgba(167,139,250,.15); color: var(--violet); }

/* Section accentuation dynamique */
body.section-films   .nav-item.active .nav-count { background: rgba(249,115,22,.15); color: var(--orange); }
body.section-films   .nav-item.active { background: rgba(249,115,22,.08); color: var(--orange); }
body.section-films   .nav-item.active .nav-icon svg { stroke: var(--orange); }

body.section-series  .nav-item.active .nav-count { background: rgba(34,211,238,.15); color: var(--cyan); }
body.section-series  .nav-item.active { background: rgba(34,211,238,.08); color: var(--cyan); }
body.section-series  .nav-item.active .nav-icon svg { stroke: var(--cyan); }

body.section-livres  .nav-item.active .nav-count { background: rgba(74,222,128,.15); color: var(--green); }
body.section-livres  .nav-item.active { background: rgba(74,222,128,.08); color: var(--green); }
body.section-livres  .nav-item.active .nav-icon svg { stroke: var(--green); }

.sidebar-bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.nav-import { color: var(--text-2); }
.nav-import:hover { color: var(--text-1); }


/* ═══════════════════════════════════════════════
   MAIN
═══════════════════════════════════════════════ */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 44px 52px 60px;
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════
   PAGE HEADER
═══════════════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-title {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-1) 40%, var(--text-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.stat-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Search */
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  width: 220px;
  transition: border-color .2s, box-shadow .2s;
}

.search-wrap:focus-within {
  border-color: rgba(167,139,250,.35);
  box-shadow: 0 0 0 3px rgba(167,139,250,.07);
}

.search-icon { width: 15px; height: 15px; color: var(--text-3); flex-shrink: 0; }

.search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-1);
  font-size: 13.5px;
  font-family: inherit;
  width: 100%;
}

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

/* Primary button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #a78bfa, #818cf8);
  border: none;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity .2s, transform .15s var(--ease-spring), box-shadow .2s;
  box-shadow: 0 4px 20px rgba(139,92,246,.25);
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.btn-primary:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 6px 28px rgba(139,92,246,.35); }
.btn-primary:active { transform: translateY(0); }

/* Section-colored button */
body.section-films  .btn-primary { background: linear-gradient(135deg, #f97316, #fb923c); box-shadow: 0 4px 20px rgba(249,115,22,.25); }
body.section-films  .btn-primary:hover { box-shadow: 0 6px 28px rgba(249,115,22,.35); }

body.section-series .btn-primary { background: linear-gradient(135deg, #22d3ee, #38bdf8); box-shadow: 0 4px 20px rgba(34,211,238,.20); }
body.section-series .btn-primary:hover { box-shadow: 0 6px 28px rgba(34,211,238,.30); }

body.section-livres .btn-primary { background: linear-gradient(135deg, #4ade80, #22c55e); box-shadow: 0 4px 20px rgba(74,222,128,.20); }
body.section-livres .btn-primary:hover { box-shadow: 0 6px 28px rgba(74,222,128,.30); }

/* ═══════════════════════════════════════════════
   FILTERS BAR
═══════════════════════════════════════════════ */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.filter-btn:hover { border-color: var(--border-md); color: var(--text-1); }

.filter-btn.active {
  background: rgba(167,139,250,.12);
  border-color: rgba(167,139,250,.35);
  color: var(--violet);
}

body.section-films  .filter-btn.active { background: rgba(249,115,22,.10); border-color: rgba(249,115,22,.35); color: var(--orange); }
body.section-series .filter-btn.active { background: rgba(34,211,238,.10); border-color: rgba(34,211,238,.35); color: var(--cyan); }
body.section-livres .filter-btn.active { background: rgba(74,222,128,.10); border-color: rgba(74,222,128,.35); color: var(--green); }

.filters-sep { flex: 1; }

.sort-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12.5px;
  font-family: inherit;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
}

.sort-select:hover { border-color: var(--border-md); }

/* ═══════════════════════════════════════════════
   CARDS GRID
═══════════════════════════════════════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}

/* ═══════════════════════════════════════════════
   CARD
═══════════════════════════════════════════════ */
.card {
  position: relative;
  border-radius: var(--radius);
  overflow: visible;        /* doit être visible pour preserve-3d */
  background: transparent;
  border: none;
  cursor: pointer;
  aspect-ratio: 2/3;
  perspective: 900px;
  transition:
    transform .3s var(--ease-spring),
    box-shadow .3s var(--ease-out);
}

/* Conteneur 3D */
.card-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.4,.2,.2,1);
  border-radius: var(--radius);
}

.card.flipped .card-inner  { transform: rotateY(180deg); }
.card.flipped:hover        { transform: none; }

/* Faces commune */
.card-front,
.card-back {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.card-back {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, #0e0c1e 0%, #1a1136 55%, #0d1221 100%);
  display: flex;
  flex-direction: column;
  padding: 14px;
  gap: 8px;
}

/* ── Contenu verso ── */
.cb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
}

.cb-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cb-director {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #a78bfa;
}

.cb-director-icon { font-style: normal; font-size: 12px; }

.cb-synopsis {
  flex: 1;
  font-size: 10.5px;
  line-height: 1.65;
  color: rgba(255,255,255,.6);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}

.cb-synopsis::-webkit-scrollbar { width: 3px; }
.cb-synopsis::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.cb-no-data {
  color: rgba(255,255,255,.25);
  font-style: italic;
}

.cb-actions { margin-top: auto; padding-top: 6px; }

.cb-edit-btn {
  width: 100%;
  padding: 6px 10px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.7);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.cb-edit-btn:hover {
  background: rgba(255,255,255,.13);
  border-color: rgba(255,255,255,.2);
}

.card:hover {
  transform: translateY(-8px) scale(1.025);
  box-shadow:
    0 30px 80px rgba(0,0,0,.7),
    0 0 0 1px rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
  z-index: 10;
}

/* Poster placeholder — gradient unique par titre */
.card-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-bg-letter {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: -3px;
  opacity: .12;
  color: #fff;
  user-select: none;
  line-height: 1;
}

.card-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay gradient */
.card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.96) 0%,
    rgba(0,0,0,.7)  50%,
    transparent     100%
  );
  padding: 52px 12px 14px;
  transition: padding .25s;
}

.card:hover .card-overlay { padding-bottom: 18px; }

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 5px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-sub {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.card-rating {
  color: var(--amber);
  font-weight: 600;
}

.card-dot { opacity: .4; }

/* Badge statut */
.card-badge {
  position: absolute;
  top: 10px; right: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.badge-vu    { background: rgba(74,222,128,.18); color: #4ade80; border: 1px solid rgba(74,222,128,.28); }
.badge-voir  { background: rgba(251,146,60,.18);  color: #fb923c; border: 1px solid rgba(251,146,60,.28); }
.badge-cours { background: rgba(34,211,238,.18);  color: #22d3ee; border: 1px solid rgba(34,211,238,.28); }
.badge-lu    { background: rgba(74,222,128,.18); color: #4ade80; border: 1px solid rgba(74,222,128,.28); }
.badge-lire  { background: rgba(251,146,60,.18);  color: #fb923c; border: 1px solid rgba(251,146,60,.28); }

/* Progress bar (séries) */
.card-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,.08);
}

.card-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #22d3ee, #818cf8);
  transition: width .4s var(--ease-out);
}

/* Bouton statut rond */
.card-status-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: transform .18s var(--ease-spring), opacity .18s;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.card-status-btn:hover { transform: scale(1.18); }

/* Vu / Lu — vert Spotify */
.card-status-btn.status-done {
  background: #1ed760;
  color: #000;
}

/* En cours — cyan */
.card-status-btn.status-progress {
  background: #22d3ee;
  color: #000;
}

/* À voir / À lire — cercle translucide */
.card-status-btn.status-todo {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.45);
  border: 1.5px solid rgba(255,255,255,.22);
}

/* ═══════════════════════════════════════════════
   SUGGESTIONS AUTOCOMPLETE
═══════════════════════════════════════════════ */
.suggest-wrap { position: relative; }

.suggest-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0; right: 0;
  background: #1c1c2e;
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
  z-index: 200;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,.7);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}

.suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover,
.suggest-item.active { background: rgba(255,255,255,.07); }

.suggest-thumb {
  width: 28px; height: 42px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  background: var(--bg-surface);
}
.suggest-thumb-empty {
  width: 28px; height: 42px;
  border-radius: 3px;
  flex-shrink: 0;
  background: var(--bg-surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--text-3);
}
.suggest-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.suggest-title { font-size: 12px; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-sub   { font-size: 10.5px; color: var(--text-3); }

.suggest-sep {
  padding: 6px 12px 4px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-2);
  background: rgba(255,255,255,.03);
}

.suggest-add-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--violet-d);
  color: #fff;
  font-size: 16px;
  line-height: 20px;
  text-align: center;
  font-weight: 700;
  opacity: .85;
}

/* ═══════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════ */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 12px;
  color: var(--text-2);
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  opacity: .3;
  margin-bottom: 8px;
}

.empty-title { font-size: 18px; font-weight: 700; color: var(--text-2); }
.empty-desc  { font-size: 14px; color: var(--text-3); max-width: 280px; line-height: 1.5; }

/* ═══════════════════════════════════════════════
   SETTINGS MODAL
═══════════════════════════════════════════════ */
.modal-settings {
  width: 520px;
  max-width: 96vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.settings-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-intro {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}

.settings-note {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.6;
  padding: 12px;
  background: rgba(251,146,60,.06);
  border: 1px solid rgba(251,146,60,.15);
  border-radius: var(--radius-sm);
}

/* Platform card */
.sync-platform-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  overflow: hidden;
  transition: border-color .2s;
}
.sync-platform-card.is-configured {
  border-color: rgba(74,222,128,.25);
}

.sync-plat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.sync-plat-badge {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  flex-shrink: 0;
}

.sync-plat-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sync-plat-name  { font-size: 13px; font-weight: 600; }
.sync-plat-scope { font-size: 11px; color: var(--text-2); }

.sync-plat-status {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
}
.sync-plat-status.configured { color: #4ade80; }

.sync-plat-fields {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sync-plat-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Bouton settings dans la sidebar */
.nav-settings { margin-top: 4px; }

/* Sync status dots sur le verso des cards */
.cb-sync-row {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}
.cb-sync-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--bg-hover);
  border: 1px solid rgba(255,255,255,.1);
  title: attr(title);
}
.cb-sync-dot.ok      { background: #4ade80; border-color: #4ade80; }
.cb-sync-dot.error   { background: #f87171; border-color: #f87171; }
.cb-sync-dot.pending { background: #fbbf24; border-color: #fbbf24; }

/* ═══════════════════════════════════════════════
   MODAL IMPORT
═══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-md);
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  padding: 28px 32px 32px;
  box-shadow: 0 40px 100px rgba(0,0,0,.8);
  transform: translateY(14px) scale(.97);
  transition: transform .35s var(--ease-spring);
}

.modal-overlay.open .modal { transform: translateY(0) scale(1); }

/* Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title    { font-size: 20px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 4px; }
.modal-subtitle { font-size: 13px; color: var(--text-2); line-height: 1.5; margin-bottom: 20px; }

.modal-close {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-2);
  width: 32px; height: 32px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-1); }
.modal-close svg { width: 16px; height: 16px; }

/* Steps indicator */
.modal-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.mstep { color: var(--text-3); transition: color .2s; }
.mstep.active { color: var(--violet); font-weight: 700; }
.mstep.done   { color: var(--green); }
.mstep-arrow  { color: var(--text-3); font-size: 14px; }

/* Import step visibility */
.import-step        { display: block; }
.import-step.hidden { display: none; }

/* ── Étape 0 : Drop zone ── */
.drop-zone {
  border: 1.5px dashed var(--border-md);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  margin-bottom: 20px;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: rgba(167,139,250,.5);
  background: rgba(167,139,250,.04);
}

.drop-icon { width: 36px; height: 36px; color: var(--text-3); margin: 0 auto 12px; display: block; }
.drop-label { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.drop-hint  { font-size: 12px; color: var(--text-3); margin-bottom: 16px; }

.btn-upload-main {
  display: inline-block;
  background: var(--bg-hover);
  border: 1px solid var(--border-md);
  color: var(--text-1);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 8px 18px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all .15s;
}
.btn-upload-main:hover { background: rgba(255,255,255,.07); border-color: var(--border-hi); }

/* Source chips */
.import-sources { display: flex; flex-direction: column; gap: 8px; }

.import-source-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.source-badge {
  width: 34px; height: 34px;
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 11px;
  flex-shrink: 0;
}

.source-chip-name { font-size: 13px; font-weight: 600; margin-bottom: 1px; }
.source-chip-hint { font-size: 11px; color: var(--text-2); }

/* ── Étape 1 : Aperçu ── */
.preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.preview-counts {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pcount {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
}

.pcount-film   { background: rgba(249,115,22,.1);  color: var(--orange); border-color: rgba(249,115,22,.25); }
.pcount-serie  { background: rgba(34,211,238,.1);  color: var(--cyan);   border-color: rgba(34,211,238,.25); }
.pcount-livre  { background: rgba(74,222,128,.1);  color: var(--green);  border-color: rgba(74,222,128,.25); }

.preview-table-wrap {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.preview-table th {
  position: sticky; top: 0;
  background: var(--bg-elevated);
  color: var(--text-2);
  font-weight: 600;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.preview-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
  vertical-align: middle;
}

.preview-table tr:last-child td { border-bottom: none; }
.preview-table tr:hover td { background: rgba(255,255,255,.02); }

.preview-table .td-title { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.preview-table .td-year  { color: var(--text-2); }
.preview-table .td-note  { color: var(--amber); font-weight: 600; }

.td-type-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .3px;
}
.tp-film  { background: rgba(249,115,22,.12); color: var(--orange); }
.tp-serie { background: rgba(34,211,238,.12); color: var(--cyan);   }
.tp-livre { background: rgba(74,222,128,.12); color: var(--green);  }

.preview-more {
  font-size: 12px;
  color: var(--text-2);
  text-align: center;
  padding: 4px;
}

.preview-warning {
  background: rgba(251,191,36,.07);
  border: 1px solid rgba(251,191,36,.2);
  border-radius: var(--radius-xs);
  color: var(--amber);
  font-size: 12px;
  padding: 9px 13px;
  margin-bottom: 16px;
  display: none;
}
.preview-warning.visible { display: block; }

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
}
.btn-ghost:hover { border-color: var(--border-md); color: var(--text-1); }

/* ── Étape 2 : Succès ── */
.success-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0 8px;
  gap: 10px;
}

.success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(74,222,128,.15);
  border: 1px solid rgba(74,222,128,.3);
  color: var(--green);
  font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}

.success-counts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 8px 0 16px;
}

.import-sources { display: flex; flex-direction: column; gap: 12px; }

.import-source {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .2s;
}

.import-source:hover { border-color: var(--border-md); }

.import-source-logo {
  width: 40px; height: 40px;
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
  flex-shrink: 0;
}

.import-source-info { flex: 1; }
.import-source-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.import-source-desc { font-size: 12px; color: var(--text-2); }

.btn-upload {
  background: var(--bg-hover);
  border: 1px solid var(--border-md);
  color: var(--text-1);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  padding: 7px 14px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.btn-upload:hover { background: rgba(255,255,255,.06); border-color: var(--border-hi); }

/* ═══════════════════════════════════════════════
   DETAIL PANEL
═══════════════════════════════════════════════ */
.detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  z-index: 290;
}
.detail-backdrop.open { opacity: 1; pointer-events: all; }

.detail-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 400px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-md);
  box-shadow: -24px 0 80px rgba(0,0,0,.5);
  transform: translateX(100%);
  transition: transform .38s var(--ease-out);
  z-index: 300;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.detail-panel.open { transform: translateX(0); }

/* Hero */
.detail-hero {
  position: relative;
  height: 200px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.detail-hero-letter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 120px;
  font-weight: 900;
  color: rgba(255,255,255,.07);
  letter-spacing: -6px;
  user-select: none;
  line-height: 1;
}

.detail-hero-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.3) 60%, transparent 100%);
}

.detail-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: var(--radius-xs);
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.8);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
  z-index: 2;
  backdrop-filter: blur(6px);
}
.detail-close:hover { background: rgba(0,0,0,.6); color: #fff; }
.detail-close svg { width: 16px; height: 16px; }

.detail-hero-info {
  position: relative;
  z-index: 2;
  padding: 0 20px 18px;
  width: 100%;
}

.detail-type-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.tp-pill-film  { background: rgba(249,115,22,.2); color: var(--orange); border: 1px solid rgba(249,115,22,.3); }
.tp-pill-serie { background: rgba(34,211,238,.2);  color: var(--cyan);   border: 1px solid rgba(34,211,238,.3); }
.tp-pill-livre { background: rgba(74,222,128,.2);  color: var(--green);  border: 1px solid rgba(74,222,128,.3); }

.detail-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.6px;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 3px;
}

.detail-year {
  font-size: 13px;
  color: rgba(255,255,255,.5);
}

/* Body */
.detail-body {
  flex: 1;
  padding: 24px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-section { display: flex; flex-direction: column; gap: 10px; }

.detail-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-2);
}

/* Status pills */
.detail-status-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.status-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-md);
  background: none;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all .18s;
}
.status-pill:hover { border-color: var(--border-hi); color: var(--text-1); }
.status-pill.active-vu, .status-pill.active-lu, .status-pill.active-fini,
.status-pill.active-ecoute, .status-pill.active-joue {
  background: rgba(74,222,128,.12); border-color: rgba(74,222,128,.35); color: var(--green);
}
.status-pill.active-voir, .status-pill.active-lire, .status-pill.active-jouer,
.status-pill.active-ecouter, .status-pill.active-envie {
  background: rgba(251,146,60,.12); border-color: rgba(251,146,60,.35); color: var(--orange);
}
.status-pill.active-cours, .status-pill.active-possede {
  background: rgba(34,211,238,.12); border-color: rgba(34,211,238,.35); color: var(--cyan);
}

/* Star rating */
.star-row { display: flex; align-items: center; gap: 10px; }

.star-rating { display: flex; gap: 3px; }

.star {
  width: 26px; height: 26px;
  cursor: pointer;
  color: var(--text-3);
  transition: color .1s, transform .15s var(--ease-spring);
}
.star:hover, .star.filled { color: var(--amber); }
.star:hover { transform: scale(1.2); }
.star svg { width: 100%; height: 100%; }

.star-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-2);
  min-width: 32px;
}

/* Steppers */
.steppers-row {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.stepper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 12px;
}

.stepper-sep {
  width: 1px;
  align-self: stretch;
  background: var(--border);
}

.stepper-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text-2);
}

.stepper-controls { display: flex; align-items: center; gap: 10px; }

.stepper-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-md);
  background: var(--bg-hover);
  color: var(--text-1);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
  font-family: inherit;
}
.stepper-btn:hover { background: rgba(255,255,255,.08); border-color: var(--border-hi); }

.stepper-val {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-1);
  min-width: 36px;
  text-align: center;
}

/* Inputs */
.detail-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 13.5px;
  font-family: inherit;
  padding: 10px 14px;
  width: 100%;
  outline: none;
  transition: border-color .2s;
}
.detail-input:focus { border-color: rgba(167,139,250,.4); }
.detail-input::placeholder { color: var(--text-3); }

.detail-textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 13.5px;
  font-family: inherit;
  padding: 12px 14px;
  width: 100%;
  outline: none;
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
  transition: border-color .2s;
}
.detail-textarea:focus { border-color: rgba(167,139,250,.4); }
.detail-textarea::placeholder { color: var(--text-3); }

/* Actions */
.detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.btn-save { flex: 1; justify-content: center; }

.btn-danger {
  background: none;
  border: 1px solid rgba(248,113,113,.3);
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn-danger:hover { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.5); }

/* Hide/show type-specific sections */
.detail-serie-only, .detail-livre-only { display: none; }
.detail-panel.type-serie .detail-serie-only { display: flex; }
.detail-panel.type-livre .detail-livre-only { display: flex; }

/* Saved flash */
@keyframes saveFlash {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,.5); }
  100% { box-shadow: 0 0 0 12px rgba(74,222,128,0); }
}
.btn-save.saved { animation: saveFlash .5s ease-out; }

/* ═══════════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.18); }

/* ═══════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card { animation: fadeUp .35s var(--ease-out) both; }

@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

/* ═══════════════════════════════════════════════
   SUIVI ÉPISODES (façon TV Time)
   ═══════════════════════════════════════════════ */
.detail-panel .detail-section.hidden { display: none !important; }

.ep-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.ep-progress-label {
  font-size: 11px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.ep-progress-bar {
  height: 5px;
  border-radius: 3px;
  background: var(--bg-elevated);
  overflow: hidden;
  margin: 6px 0 2px;
}
.ep-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width .35s var(--ease-out);
}
.ep-next {
  font-size: 12px;
  color: var(--text-1);
  margin: 6px 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-next-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--cyan);
  border: 1px solid var(--cyan);
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 6px;
}
.ep-next-tag.done { color: var(--green); border-color: var(--green); }

.ep-loading {
  font-size: 12px;
  color: var(--text-2);
  padding: 10px 0;
}

.episodes-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 2px;
}

/* ── Saison ── */
.ep-season {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  overflow: hidden;
}
.ep-season-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  user-select: none;
}
.ep-season-header:hover { background: var(--bg-hover); }
.ep-chevron { color: var(--text-2); transition: transform .2s var(--ease-out); flex-shrink: 0; }
.ep-season.open .ep-chevron { transform: rotate(90deg); }
.ep-season-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-1);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-season-count {
  font-size: 11px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.ep-season-all {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg-elevated);
  border: 1px solid var(--border-md);
  border-radius: 5px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all .15s;
}
.ep-season-all:hover { color: var(--text-1); border-color: var(--border-hi); }
.ep-season-all.active {
  color: var(--green);
  border-color: rgba(74, 222, 128, .35);
  background: rgba(74, 222, 128, .08);
}

/* ── Épisode ── */
.ep-season-body { display: flex; flex-direction: column; }
.ep-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}
.ep-row:hover { background: var(--bg-hover); }
.ep-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-hi);
  background: transparent;
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s;
}
.ep-check:hover { border-color: var(--cyan); color: var(--cyan); }
.ep-row.vu .ep-check {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #062a30;
}
.ep-num {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.ep-title {
  flex: 1;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-row.vu .ep-title { color: var(--text-2); }
.ep-date { font-size: 10.5px; color: var(--text-2); flex-shrink: 0; }
.ep-upto {
  font-size: 12px;
  color: var(--text-2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0;
  transition: opacity .15s;
  flex-shrink: 0;
}
.ep-row:hover .ep-upto { opacity: 1; }
.ep-upto:hover { color: var(--cyan); }

/* ═══════════════════════════════════════════════
   SECTION BD & MANGA (accent rose)
   ═══════════════════════════════════════════════ */
:root { --pink: #f472b6; --accent-bd: var(--pink); }

body.section-bd .nav-item.active .nav-count { background: rgba(244,114,182,.15); color: var(--pink); }
body.section-bd .nav-item.active { background: rgba(244,114,182,.08); color: var(--pink); }
body.section-bd .nav-item.active .nav-icon svg { stroke: var(--pink); }

body.section-bd .btn-primary { background: linear-gradient(135deg, #f472b6, #fb7185); box-shadow: 0 4px 20px rgba(244,114,182,.20); }
body.section-bd .btn-primary:hover { box-shadow: 0 6px 28px rgba(244,114,182,.30); }

body.section-bd .filter-btn.active { background: rgba(244,114,182,.10); border-color: rgba(244,114,182,.35); color: var(--pink); }

.tp-bd      { background: rgba(244,114,182,.12); color: var(--pink); }
.tp-pill-bd { background: rgba(244,114,182,.2);  color: var(--pink); border: 1px solid rgba(244,114,182,.3); }

.detail-bd-only { display: none; }
.detail-panel.type-bd .detail-bd-only { display: flex; }

/* ═══════════════════════════════════════════════
   VUE « À SUIVRE » (accueil façon TV Time)
   ═══════════════════════════════════════════════ */
body.section-asuivre .nav-item.active .nav-count { background: rgba(167,139,250,.15); color: var(--violet); }
body.section-asuivre .nav-item.active { background: rgba(167,139,250,.08); color: var(--violet); }
body.section-asuivre .nav-item.active .nav-icon svg { stroke: var(--violet); }
body.section-asuivre #btn-add, body.section-asuivre .search-wrap { display: none; }

.nav-sep-after { margin-top: 10px; position: relative; }
.nav-sep-after::before {
  content: '';
  position: absolute;
  top: -6px; left: 12px; right: 12px;
  height: 1px;
  background: var(--border);
}

.watch-list {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 760px;
}
.wl-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-2);
  margin: 14px 0 2px;
}
.wl-group-label:first-child { margin-top: 0; }

.watch-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s, background .15s;
}
.watch-row:hover { background: var(--bg-elevated); border-color: var(--border-md); }

.wr-thumb {
  width: 46px;
  height: 66px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
}
.wr-thumb-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: rgba(255,255,255,.25);
}

.wr-info { flex: 1; min-width: 0; }
.wr-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.wr-title:hover { color: var(--violet); }
.wr-sub {
  font-size: 12px;
  color: var(--text-2);
  margin: 3px 0 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wr-next-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--cyan);
  border: 1px solid var(--cyan);
  border-radius: 4px;
  padding: 0 4px;
  margin-right: 5px;
  vertical-align: 1px;
}
.wr-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--bg-hover);
  overflow: hidden;
}
.wr-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width .35s var(--ease-out);
}

.wr-check {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border-hi);
  background: transparent;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s var(--ease-spring);
}
.wr-check:hover {
  background: #1ed760;
  border-color: #1ed760;
  color: #000;
  transform: scale(1.1);
}
.wr-check:disabled { opacity: .4; pointer-events: none; }

/* ── Bouton +1 sur les cartes ── */
.card-next-btn {
  position: absolute;
  bottom: 10px;
  right: 46px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.45);
  color: rgba(255,255,255,.75);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  z-index: 20;
  opacity: 0;
  transition: all .18s var(--ease-spring);
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.card:hover .card-next-btn { opacity: 1; }
.card-next-btn:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #000;
  transform: scale(1.18);
}

/* Épisodes pas encore diffusés : grisés */
.ep-row.ep-future { opacity: .45; }
.ep-row.ep-future .ep-date { color: var(--amber); }

/* ═══════════════════════════════════════════════
   PANNEAU : PROGRESSION EN PREMIER (séries & BD)
   ═══════════════════════════════════════════════ */
/* .detail-body est une colonne flex : on remonte la progression et le statut */
.detail-panel.type-serie #detail-episodes-section,
.detail-panel.type-serie #detail-serie-section,
.detail-panel.type-bd    #detail-bd-tomes-section  { order: -3; }

.detail-panel.type-serie .detail-section:has(#detail-status-btns),
.detail-panel.type-bd    .detail-section:has(#detail-status-btns) { order: -2; }

.detail-panel.type-serie .detail-section:has(#star-rating),
.detail-panel.type-bd    .detail-section:has(#star-rating) { order: -1; }

/* Synopsis lecture seule dans le panneau */
.detail-synopsis {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0;
  max-height: 132px;
  overflow-y: auto;
}

/* ═══════════════════════════════════════════════
   PAGE STATS + PROMPT ÉPISODES PRÉCÉDENTS
   ═══════════════════════════════════════════════ */
body.section-stats #btn-add, body.section-stats .search-wrap { display: none; }
body.section-stats .nav-item.active .nav-count { background: rgba(251,191,36,.15); color: var(--amber); }
body.section-stats .nav-item.active { background: rgba(251,191,36,.08); color: var(--amber); }
body.section-stats .nav-item.active .nav-icon svg { stroke: var(--amber); }

.stats-board {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  max-width: 980px;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.stat-hero {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(167,139,250,.10), rgba(34,211,238,.06));
  border-color: rgba(167,139,250,.25);
}
.stat-hero-value {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-hero-label { font-size: 14px; color: var(--text-1); margin-top: 2px; }
.stat-approx {
  font-size: 10px;
  color: var(--text-2);
  border: 1px solid var(--border-md);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 8px;
  vertical-align: 2px;
}
.stat-hero-split { display: flex; gap: 22px; margin-top: 14px; font-size: 12.5px; color: var(--text-2); }
.stat-hero-note  { margin-top: 6px; font-size: 11px; color: var(--text-2); }

.stat-value { font-size: 30px; font-weight: 800; color: var(--text-1); }
.stat-label { font-size: 13px; color: var(--text-1); margin-top: 2px; }
.stat-sub   { font-size: 11.5px; color: var(--text-2); margin-top: 8px; }
.stat-card.accent-film   .stat-value { color: var(--orange); }
.stat-card.accent-series .stat-value { color: var(--cyan); }
.stat-card.accent-livre  .stat-value { color: var(--green); }
.stat-card.accent-bd     .stat-value { color: var(--pink); }

/* Prompt « marquer les précédents » */
.ep-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(34,211,238,.07);
  border-top: 1px solid rgba(34,211,238,.25);
  flex-wrap: wrap;
}
.ep-confirm-txt { font-size: 11.5px; color: var(--text-1); flex: 1; min-width: 120px; }
.ep-confirm-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 5px;
  border: 1px solid var(--border-hi);
  background: var(--bg-elevated);
  color: var(--text-1);
  cursor: pointer;
}
.ep-confirm-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.ep-confirm-btn.primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #062a30;
}
.ep-confirm-btn.primary:hover { filter: brightness(1.1); color: #062a30; }
.ep-confirm-btn.close { border: none; background: none; color: var(--text-2); padding: 4px; }

/* Séries à jour : rangées en attente, sans action */
.watch-row.wr-idle { opacity: .55; }
.watch-row.wr-idle:hover { opacity: .8; }
.wr-idle-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
  color: var(--green);
  border: 1.5px solid rgba(74,222,128,.3);
}

/* Sentinelle du rendu progressif de la grille */
.grid-sentinel { grid-column: 1 / -1; height: 2px; }

/* ═══════════════════════════════════════════════════════════
   REFONTE — Direction A « Continuité+ » (handoff Claude Design)
   ═══════════════════════════════════════════════════════════ */

/* Fond ambiant : deux radial-gradients très subtils */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 600px at 8% -5%, rgba(167,139,250,.07), transparent 60%),
    radial-gradient(900px 700px at 105% 105%, rgba(249,115,22,.05), transparent 60%);
}
.main { position: relative; z-index: 1; }

/* H1 d'écran : 40px/900, gradient texte */
.page-title {
  font-size: 40px !important;
  font-weight: 900 !important;
  letter-spacing: -2px !important;
  line-height: 1;
  background: linear-gradient(135deg, #f0f0f0 40%, #888 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Filtres : pills arrondies */
.filter-btn { border-radius: 20px !important; padding: 6px 16px !important; font-size: 13px !important; }

/* Entrée d'écran */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.screen-enter { animation: fadeUp .35s cubic-bezier(0.22,1,0.36,1) both; }

/* Toast de confirmation */
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 8px); }
  12%, 82% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}
.toast {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 300;
  padding: 8px 16px;
  border-radius: 20px;
  background: #0d1a11;
  border: 1px solid rgba(74,222,128,.35);
  color: #4ade80;
  font-size: 12.5px;
  font-weight: 600;
  pointer-events: none;
  animation: floatUp 1.8s cubic-bezier(0.22,1,0.36,1) both;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Burst sur le ✓ héros */
@keyframes burst { from { opacity: 1; transform: scale(.35); } to { opacity: 0; transform: scale(1.7); } }
.nu-burst {
  position: absolute;
  top: 0; left: 50%;
  margin-left: -26px;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid #1ed760;
  animation: burst .55s ease-out both;
  pointer-events: none;
  z-index: 2;
}

/* ✓ verts au hover (À suivre + héros) */
.wr-check, .nu-check {
  transition: all .18s cubic-bezier(0.34,1.56,0.64,1);
}
.wr-check:hover, .nu-check:hover {
  background: #1ed760 !important;
  border-color: #1ed760 !important;
  color: #000 !important;
  transform: scale(1.1);
}

/* ── À SUIVRE : layout 2 colonnes ── */
.asuivre-wrap { display: flex; flex-wrap: wrap; gap: 38px; max-width: 1090px; align-items: flex-start; }
.asuivre-main { flex: 1 1 480px; min-width: 0; }
.cal-aside {
  flex: 0 1 300px;
  min-width: 260px;
  position: sticky;
  top: 44px;
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 20px 22px;
}
.cal-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--amber); margin-bottom: 10px; }
.cal-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.cal-item:last-of-type { border-bottom: none; }
.cal-date { flex-shrink: 0; width: 42px; text-align: center; background: var(--bg-elevated); border: 1px solid rgba(255,255,255,.07); border-radius: 8px; padding: 5px 0; }
.cal-day { font-size: 15px; font-weight: 800; line-height: 1.1; color: var(--text-1); font-variant-numeric: tabular-nums; }
.cal-day.proche { color: var(--cyan); }
.cal-month { font-size: 9px; text-transform: uppercase; letter-spacing: .5px; color: #666; }
.cal-info { flex: 1; min-width: 0; padding-top: 2px; }
.cal-serie { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-1); }
.cal-what { font-size: 11px; color: #777; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-tag { flex-shrink: 0; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 2px 6px; border-radius: 4px; margin-top: 4px; background: rgba(34,211,238,.12); color: var(--cyan); }
.cal-note { font-size: 10.5px; color: #555; margin-top: 14px; line-height: 1.5; }
.cal-empty { font-size: 12px; color: var(--text-2); padding: 8px 0; }

/* Hero « Prochain visionnage » */
.nu-hero { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); margin-bottom: 28px; background: var(--bg-surface); }
.nu-bg { position: absolute; inset: 0; background-position: center 20%; background-size: cover; filter: blur(28px) saturate(1.3); opacity: .35; transform: scale(1.3); }
.nu-veil { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8,8,8,.92) 30%, rgba(8,8,8,.55) 100%); }
.nu-body { position: relative; display: flex; align-items: center; gap: 22px; padding: 20px 24px; }
.nu-poster { width: 92px; height: 136px; border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.6); flex-shrink: 0; background-position: center; background-size: cover; cursor: pointer; }
.nu-info { flex: 1; min-width: 0; }
.nu-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--cyan); margin-bottom: 7px; }
.nu-title { font-size: 24px; font-weight: 800; letter-spacing: -.6px; margin-bottom: 3px; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nu-sub { font-size: 13.5px; color: #aaa; margin-bottom: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nu-progress-row { display: flex; align-items: center; gap: 10px; }
.nu-progress { flex: 1; max-width: 220px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.nu-progress-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--cyan), var(--violet)); transition: width .4s cubic-bezier(0.22,1,0.36,1); }
.nu-count { font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.nu-actions { display: flex; flex-direction: column; gap: 8px; align-items: center; position: relative; flex-shrink: 0; }
.nu-check { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); color: var(--text-1); cursor: pointer; font-size: 20px; backdrop-filter: blur(6px); }
.nu-details { background: none; border: none; color: var(--text-2); font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; }
.nu-details:hover { color: var(--text-1); }

/* Lignes À suivre restylées */
.watch-list { max-width: none; }
.watch-row {
  padding: 10px 14px 10px 10px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,.06);
  transition: border-color .15s, background .15s, opacity .15s;
}
.watch-row:hover { background: var(--bg-elevated); border-color: rgba(255,255,255,.1); }
.wr-thumb { width: 46px; height: 66px; border-radius: 6px; }
.wr-title { font-size: 14px; font-weight: 600; }
.wr-title:hover { color: var(--violet); }
.wr-type-tag {
  display: inline-block; font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; border-radius: 4px; padding: 0 4px; margin-right: 5px;
  vertical-align: 1px; border: 1px solid currentColor;
}
.wr-type-tag.serie { color: var(--cyan); }
.wr-type-tag.bd    { color: var(--pink); }
.wr-progress { height: 4px; background: var(--bg-hover); }
.wr-progress-fill { background: linear-gradient(90deg, var(--cyan), var(--violet)); transition: width .35s cubic-bezier(0.22,1,0.36,1); }
.watch-row .wr-progress-fill.bd { background: linear-gradient(90deg, var(--pink), var(--violet)); }
.wr-check { width: 40px; height: 40px; border: 1.5px solid rgba(255,255,255,.18); background: transparent; color: var(--text-2); }

/* ── CARTES v2 ── */
.cards-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)) !important; gap: 18px !important; max-width: 940px; }
.card { aspect-ratio: 2/3; perspective: 900px; animation: fadeUp .35s cubic-bezier(0.22,1,0.36,1) both; }
.card-inner { transition: transform .55s cubic-bezier(.4,.2,.2,1); border-radius: 14px; }
.card:not(.flipped):hover .card-inner { transform: translateY(-6px); }
.card:not(.flipped):hover .card-front { box-shadow: 0 26px 70px rgba(0,0,0,.7); }
.card-front { border-radius: 14px; border: 1px solid rgba(255,255,255,.06); background: var(--bg-elevated); transition: box-shadow .3s; }
.card-badge2 {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  padding: 3px 8px; border-radius: 6px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.card-badge2.b-vu    { background: rgba(74,222,128,.18);  color: var(--green);  border: 1px solid rgba(74,222,128,.28); }
.card-badge2.b-cours { background: rgba(34,211,238,.18);  color: var(--cyan);   border: 1px solid rgba(34,211,238,.28); }
.card-badge2.b-voir  { background: rgba(251,146,60,.18);  color: #fb923c;       border: 1px solid rgba(251,146,60,.28); }
.card-scrim {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  background: linear-gradient(to top, rgba(0,0,0,.96) 0%, rgba(0,0,0,.7) 50%, transparent 100%);
  padding: 52px 12px 14px;
}
.card-title2 {
  font-size: 13px; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 5px;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.card-meta { font-size: 11px; color: rgba(255,255,255,.45); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.card-meta .note { color: var(--amber); font-weight: 600; }
.card-meta .dot { opacity: .4; }
.card-progress2 { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(255,255,255,.08); z-index: 3; }
.card-progress2-fill { height: 100%; background: linear-gradient(90deg, var(--cyan), #818cf8); }
.section-bd .card-progress2-fill { background: linear-gradient(90deg, var(--pink), var(--violet)); }
.card-letter2 { font-size: 64px; font-weight: 900; letter-spacing: -3px; opacity: .12; color: #fff; user-select: none; line-height: 1; }
.card-back {
  border-radius: 14px;
  background: linear-gradient(160deg, #0e0c1e 0%, #1a1136 55%, #0d1221 100%) !important;
  border: 1px solid rgba(255,255,255,.1);
  display: flex; flex-direction: column; padding: 14px; gap: 8px;
}
.cb2-top { display: flex; justify-content: space-between; font-size: 9.5px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: rgba(255,255,255,.3); }
.cb2-title { font-size: 13px; font-weight: 800; color: #fff; line-height: 1.3; }
.cb2-author { font-size: 11px; font-weight: 600; color: var(--violet); }
.cb2-syn { flex: 1; font-size: 10.5px; line-height: 1.65; color: rgba(255,255,255,.6); overflow-y: auto; }
.cb2-open {
  width: 100%; padding: 7px 10px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.75); font-size: 11px; font-weight: 600; font-family: inherit;
  border-radius: 6px; cursor: pointer;
}
.cb2-open:hover { background: rgba(255,255,255,.13); }

/* ── PANNEAU v2 ── */
.ep-nextup {
  display: flex; align-items: center; gap: 12px;
  background: rgba(34,211,238,.06); border: 1px solid rgba(34,211,238,.22);
  border-radius: 10px; padding: 10px 12px; margin: 8px 0 10px;
}
.ep-nextup-info { flex: 1; min-width: 0; }
.ep-nextup-label { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--cyan); margin-bottom: 2px; }
.ep-nextup-title { font-size: 12.5px; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-nextup-btn {
  flex-shrink: 0; background: var(--cyan); border: none; color: #062a30;
  font-size: 11.5px; font-weight: 700; font-family: inherit;
  padding: 7px 13px; border-radius: 7px; cursor: pointer;
  transition: all .18s cubic-bezier(0.34,1.56,0.64,1);
}
.ep-nextup-btn:hover { background: #1ed760; color: #000; transform: scale(1.05); }
.season-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.season-tab {
  border: 1px solid var(--border-md); background: var(--bg-elevated); color: var(--text-2);
  font-size: 11px; font-weight: 600; font-family: inherit;
  padding: 4px 11px; border-radius: 14px; cursor: pointer; transition: all .15s;
  display: inline-flex; align-items: center; gap: 5px;
}
.season-tab:hover { color: var(--text-1); border-color: var(--border-hi); }
.season-tab.active { color: var(--cyan); border-color: rgba(34,211,238,.4); background: rgba(34,211,238,.08); }
.season-tab .full { color: var(--green); }
.ep-list { display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-surface); }
.ep-row.future { opacity: .45; }
.ep-row.future .ep-check { cursor: not-allowed; }
.ep-row.future .ep-date { color: var(--amber); }
.detail-cast { display: flex; flex-wrap: wrap; gap: 6px; }
.cast-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg-elevated); border-radius: 18px; padding: 3px 10px 3px 3px;
  font-size: 11.5px; color: #ccc;
}
.cast-avatar {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff;
}
.detail-providers { display: flex; flex-wrap: wrap; gap: 6px; }
.provider-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: #141414; border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 13px; font-size: 12px; font-weight: 600; color: var(--text-1);
}
.provider-dot { width: 7px; height: 7px; border-radius: 50%; background: #888; }
.detail-actions .btn-primary { background: linear-gradient(135deg, var(--violet), #818cf8); box-shadow: 0 4px 20px rgba(167,139,250,.25); }

/* ── STATS v2 ── */
.heat-wrap { grid-column: 1 / -1; }
.heat-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.heat-label { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--text-2); }
.heat-count { font-size: 11.5px; color: var(--text-2); }
.heat-grid { display: grid; grid-template-rows: repeat(7, 10px); grid-auto-flow: column; grid-auto-columns: 10px; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat-cell { width: 10px; height: 10px; border-radius: 2.5px; background: #161616; }
.heat-legend { display: flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 10px; color: #555; }
.heat-legend span.c { width: 10px; height: 10px; border-radius: 2.5px; display: inline-block; }
.years-wrap { grid-column: span 2; }
.years-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin-top: 14px; }
.year-bar { flex: 1; min-width: 4px; background: linear-gradient(to top, rgba(249,115,22,.5), var(--orange)); border-radius: 5px 5px 2px 2px; cursor: pointer; transition: opacity .15s; }
.year-bar:hover { opacity: .8; }
.years-bars.has-sel .year-bar:not(.sel) { opacity: .35; }
.year-bar.sel { background: var(--amber); }
.years-axis { display: flex; justify-content: space-between; font-size: 10px; color: #555; margin-top: 6px; }
.year-detail {
  margin-top: 12px; background: rgba(249,115,22,.06);
  border: 1px solid rgba(249,115,22,.2); border-radius: 10px; padding: 12px 14px;
  font-size: 12px; color: var(--text-1);
}
.year-detail b { color: var(--orange); }
.records-wrap { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.record-title { font-size: 12.5px; font-weight: 700; color: var(--amber); margin-bottom: 4px; }
.record-desc { font-size: 11.5px; color: var(--text-2); line-height: 1.5; }

/* Robustesse aux largeurs étroites */
.wr-info { flex: 1 1 auto; min-width: 0; }
.nu-title, .nu-sub { min-width: 0; }

/* Les blocs pleine largeur dans la grille de cartes */
.asuivre-wrap, .ep-loading { grid-column: 1 / -1; }

/* Indicateur diffusion dans les lignes À suivre */
.wr-hint {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  padding: 0 5px;
  margin-left: 6px;
  vertical-align: 1px;
}
.wr-hint.fin  { color: var(--green); background: rgba(74,222,128,.1); }
.wr-hint.next { color: var(--amber); background: rgba(251,191,36,.1); }

/* Carte retournée : le recto caché ne doit pas intercepter les clics */
.card.flipped .card-front { pointer-events: none; }

/* ═══════════════════════════════════════════════
   QUOI CE SOIR ?
   ═══════════════════════════════════════════════ */
body.section-soir #btn-add, body.section-soir .search-wrap { display: none; }
body.section-soir .nav-item.active .nav-count { background: rgba(167,139,250,.15); color: var(--violet); }
body.section-soir .nav-item.active { background: rgba(167,139,250,.08); color: var(--violet); }
body.section-soir .nav-item.active .nav-icon svg { stroke: var(--violet); }

.soir-wrap { grid-column: 1 / -1; max-width: 760px; }
.soir-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 22px;
}
.soir-filtre { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.soir-filtre-label {
  width: 72px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-2);
}
.soir-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.soir-chip {
  border: 1px solid var(--border-md);
  background: var(--bg-elevated);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .15s;
}
.soir-chip:hover { color: var(--text-1); border-color: var(--border-hi); }
.soir-chip.active {
  color: var(--violet);
  border-color: rgba(167,139,250,.4);
  background: rgba(167,139,250,.1);
}
.soir-go { align-self: flex-start; margin-top: 4px; }

.soir-resultats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.soir-carte {
  display: flex;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .2s var(--ease-out);
  animation: fadeUp .35s cubic-bezier(0.22,1,0.36,1) both;
}
.soir-carte:hover { background: var(--bg-elevated); border-color: var(--border-hi); transform: translateY(-3px); }
.soir-poster {
  width: 64px; height: 94px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
}
.soir-poster-vide { display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: rgba(255,255,255,.3); }
.soir-carte-info { min-width: 0; display: flex; flex-direction: column; gap: 5px; justify-content: center; }
.soir-tag {
  align-self: flex-start;
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  border: 1px solid currentColor; border-radius: 4px; padding: 0 5px;
}
.soir-tag.film { color: var(--orange); } .soir-tag.serie { color: var(--cyan); }
.soir-tag.livre { color: var(--green); } .soir-tag.bd { color: var(--pink); }
.soir-titre { font-size: 15px; font-weight: 700; color: var(--text-1); }
.soir-raison { font-size: 12px; color: var(--violet); font-weight: 500; }
.soir-encore {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hi);
  color: var(--text-1);
  font-size: 13px; font-weight: 600; font-family: inherit;
  padding: 9px 22px; border-radius: 20px; cursor: pointer;
  transition: all .15s;
}
.soir-encore:hover { border-color: var(--violet); color: var(--violet); }

/* ── ADN culturel ── */
.adn-titre {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.3px;
  color: var(--text-1);
  margin-bottom: 4px;
}
.adn-ligne { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.adn-nom {
  width: 92px; flex-shrink: 0;
  font-size: 11.5px; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adn-nom.large { width: auto; flex: 1; min-width: 0; }
.adn-barre { flex: 1; height: 5px; border-radius: 3px; background: var(--bg-hover); overflow: hidden; }
.adn-barre-fill { height: 100%; border-radius: 3px; }
.adn-n { font-size: 10.5px; color: var(--text-2); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.adn-rang {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-elevated); border: 1px solid var(--border-md);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 700; color: var(--text-2);
}
.adn-vide { font-size: 11.5px; color: var(--text-2); padding: 6px 0; }
.adn-decs { display: flex; align-items: flex-end; gap: 5px; height: 74px; margin-top: 8px; }
.adn-dec { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.adn-dec-barre { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.adn-dec-barre > div { width: 100%; border-radius: 4px 4px 2px 2px; background: linear-gradient(to top, rgba(167,139,250,.5), var(--violet)); }
.adn-dec span { font-size: 9px; color: #666; }
.adn-note { margin-top: 8px; font-size: 11.5px; color: var(--violet); font-weight: 600; }

/* ═══════════════════════════════════════════════
   WRAPPED ANNUEL
   ═══════════════════════════════════════════════ */
.wrap-cta {
  grid-column: 1 / -1;
  border: 1px solid rgba(167,139,250,.35);
  background: linear-gradient(100deg, rgba(167,139,250,.15), rgba(34,211,238,.08));
  color: var(--text-1);
  font-size: 14px; font-weight: 700; font-family: inherit;
  padding: 14px 20px; border-radius: 14px; cursor: pointer;
  transition: all .2s var(--ease-out);
}
.wrap-cta:hover { border-color: var(--violet); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(167,139,250,.2); }

.wrap-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(5,5,8,.92);
  backdrop-filter: blur(8px);
  overflow-y: auto;
  display: flex; justify-content: center;
  animation: fadeUp .3s cubic-bezier(0.22,1,0.36,1) both;
}
.wrap-scroll {
  width: min(560px, 94vw);
  padding: 40px 0 60px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
}
.wrap-close {
  position: fixed; top: 20px; right: 24px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  color: var(--text-1); font-size: 15px; cursor: pointer; z-index: 2;
}
.wrap-close:hover { background: rgba(255,255,255,.15); }
.wrap-nav { display: flex; justify-content: space-between; }
.wrap-annee-btn {
  background: none; border: none; color: var(--text-2);
  font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.wrap-annee-btn:hover { color: var(--violet); }

.wrap-hero {
  text-align: center;
  padding: 34px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(167,139,250,.22), rgba(34,211,238,.12)), #0d0d14;
  border: 1px solid rgba(167,139,250,.3);
}
.wrap-eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--violet); }
.wrap-annee {
  font-size: 84px; font-weight: 900; letter-spacing: -4px; line-height: 1.05;
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wrap-temps { font-size: 30px; font-weight: 800; color: var(--text-1); margin-top: 8px; }
.wrap-temps-sub { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }

.wrap-carte {
  background: #0d0d14;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  padding: 22px 24px;
}
.wrap-carte-titre { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-2); margin-bottom: 10px; }
.wrap-gros { font-size: 38px; font-weight: 900; letter-spacing: -1px; color: var(--text-1); }
.wrap-gros small { font-size: 15px; font-weight: 600; color: var(--text-2); }
.wrap-sub { font-size: 12.5px; color: #aaa; margin: 6px 0 12px; line-height: 1.5; }
.wrap-sub b { color: var(--text-1); }

.wrap-rang { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.wrap-num { width: 20px; font-size: 13px; font-weight: 800; color: var(--violet); text-align: center; }
.wrap-mini { width: 34px; height: 50px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }
.wrap-mini-vide { display: inline-flex; align-items: center; justify-content: center; background: var(--bg-elevated); color: var(--text-2); font-weight: 800; }
.wrap-rang-titre { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wrap-rang-n { font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }

.wrap-affiches { display: flex; gap: 12px; }
.wrap-affiche { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.wrap-affiche img, .wrap-affiche-vide { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 9px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.wrap-affiche-vide { display: flex; align-items: center; justify-content: center; background: var(--bg-elevated); font-size: 26px; font-weight: 800; color: var(--text-2); }
.wrap-affiche span { font-size: 11px; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wrap-affiche b { font-size: 10.5px; color: var(--amber); }

.wrap-footer { text-align: center; font-size: 11px; color: #555; margin-top: 8px; }

/* ═══════════════════════════════════════════════
   SECTION JEUX VIDÉO (accent rouge)
   ═══════════════════════════════════════════════ */
:root { --accent-jeu: var(--red); }

body.section-jeux .nav-item.active .nav-count { background: rgba(248,113,113,.15); color: var(--red); }
body.section-jeux .nav-item.active { background: rgba(248,113,113,.08); color: var(--red); }
body.section-jeux .nav-item.active .nav-icon svg { stroke: var(--red); }

body.section-jeux .btn-primary { background: linear-gradient(135deg, #f87171, #fb923c); box-shadow: 0 4px 20px rgba(248,113,113,.20); }
body.section-jeux .btn-primary:hover { box-shadow: 0 6px 28px rgba(248,113,113,.30); }

body.section-jeux .filter-btn.active { background: rgba(248,113,113,.10); border-color: rgba(248,113,113,.35); color: var(--red); }

.tp-jeu      { background: rgba(248,113,113,.12); color: var(--red); }
.tp-pill-jeu { background: rgba(248,113,113,.2);  color: var(--red); border: 1px solid rgba(248,113,113,.3); }

.detail-jeu-only { display: none; }
.detail-panel.type-jeu .detail-jeu-only { display: flex; }

.soir-tag.jeu { color: var(--red); }
.stat-card.accent-jeu .stat-value { color: var(--red); }
.section-jeux .card-progress2-fill { background: linear-gradient(90deg, var(--red), var(--orange)); }

/* ═══════════════════════════════════════════════
   NOUVEAUTÉS (ciné + séries)
   ═══════════════════════════════════════════════ */
body.section-sorties #btn-add, body.section-sorties .search-wrap { display: none; }
body.section-sorties .nav-item.active .nav-count { background: rgba(251,191,36,.15); color: var(--amber); }
body.section-sorties .nav-item.active { background: rgba(251,191,36,.08); color: var(--amber); }
body.section-sorties .nav-item.active .nav-icon svg { stroke: var(--amber); }

.sorties-wrap { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 30px; }
.sortie-groupe-tete { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.sortie-groupe-titre { font-size: 18px; font-weight: 800; letter-spacing: -.4px; color: var(--text-1); }
.sortie-groupe-sous { font-size: 12px; color: var(--text-2); }
.sortie-rail {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px;
  scroll-snap-type: x proximity;
}
.sortie-rail::-webkit-scrollbar { height: 8px; }
.sortie-rail::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 4px; }
.sortie-carte {
  flex: 0 0 150px; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 6px;
  animation: fadeUp .35s cubic-bezier(0.22,1,0.36,1) both;
}
.sortie-visuel { position: relative; }
.sortie-poster {
  width: 100%; aspect-ratio: 2/3; object-fit: cover;
  border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.5);
  border: 1px solid var(--border);
}
.sortie-poster-vide {
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; font-weight: 800; color: rgba(255,255,255,.3);
}
.sortie-note {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,.7); backdrop-filter: blur(6px);
  color: var(--amber); font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 6px;
}
.sortie-titre {
  font-size: 13px; font-weight: 600; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sortie-date { font-size: 11px; color: var(--text-2); margin-top: -3px; }
.sortie-add {
  margin-top: 2px;
  background: var(--bg-elevated); border: 1px solid var(--border-hi);
  color: var(--text-1); font-size: 12px; font-weight: 600; font-family: inherit;
  padding: 6px 0; border-radius: 8px; cursor: pointer; transition: all .15s;
}
.sortie-add:hover { border-color: var(--amber); color: var(--amber); }
.sortie-badge-deja {
  margin-top: 2px; text-align: center;
  font-size: 11.5px; font-weight: 600; color: var(--green);
  padding: 6px 0; border-radius: 8px;
  background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.25);
}

/* ═══════════════════════════════════════════════
   SECTION MUSIQUE (accent indigo) + JEUX DE SOCIÉTÉ (accent teal)
   ═══════════════════════════════════════════════ */
:root { --indigo: #818cf8; --teal: #2dd4bf; }

/* Musique */
body.section-musique .nav-item.active .nav-count { background: rgba(129,140,248,.15); color: var(--indigo); }
body.section-musique .nav-item.active { background: rgba(129,140,248,.08); color: var(--indigo); }
body.section-musique .nav-item.active .nav-icon svg { stroke: var(--indigo); }
body.section-musique .btn-primary { background: linear-gradient(135deg, #818cf8, #a78bfa); box-shadow: 0 4px 20px rgba(129,140,248,.20); }
body.section-musique .filter-btn.active { background: rgba(129,140,248,.10); border-color: rgba(129,140,248,.35); color: var(--indigo); }
.tp-pill-musique { background: rgba(129,140,248,.2); color: var(--indigo); border: 1px solid rgba(129,140,248,.3); }
.detail-musique-only { display: none; }
.detail-panel.type-musique .detail-musique-only { display: flex; }
.soir-tag.musique { color: var(--indigo); }
.stat-card.accent-musique .stat-value { color: var(--indigo); }

/* Jeux de société */
body.section-jds .nav-item.active .nav-count { background: rgba(45,212,191,.15); color: var(--teal); }
body.section-jds .nav-item.active { background: rgba(45,212,191,.08); color: var(--teal); }
body.section-jds .nav-item.active .nav-icon svg { stroke: var(--teal); }
body.section-jds .btn-primary { background: linear-gradient(135deg, #2dd4bf, #22d3ee); box-shadow: 0 4px 20px rgba(45,212,191,.20); }
body.section-jds .filter-btn.active { background: rgba(45,212,191,.10); border-color: rgba(45,212,191,.35); color: var(--teal); }
.tp-pill-jds { background: rgba(45,212,191,.2); color: var(--teal); border: 1px solid rgba(45,212,191,.3); }
.detail-jds-only { display: none; }
.detail-panel.type-jds .detail-jds-only { display: flex; }
.soir-tag.jds { color: var(--teal); }
.stat-card.accent-jds .stat-value { color: var(--teal); }

/* Champ double (joueurs min / max) */
.detail-duo { display: flex; gap: 10px; }
.detail-duo .detail-input { width: 50%; }

/* ═══════════════════════════════════════════════
   AUTHENTIFICATION
   ═══════════════════════════════════════════════ */
.auth-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: #060608;
  display: flex; align-items: center; justify-content: center;
  background-image:
    radial-gradient(900px 600px at 15% 0%, rgba(167,139,250,.12), transparent 60%),
    radial-gradient(900px 700px at 100% 100%, rgba(249,115,22,.08), transparent 60%);
}
.auth-card {
  width: min(380px, 92vw);
  background: var(--bg-surface);
  border: 1px solid var(--border-md);
  border-radius: 18px;
  padding: 34px 32px;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.auth-logo { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; color: var(--text-1); margin-bottom: 22px; }
.auth-title { font-size: 22px; font-weight: 800; color: var(--text-1); }
.auth-sub { font-size: 13px; color: var(--text-2); margin: 4px 0 22px; line-height: 1.5; }
.auth-input {
  width: 100%; box-sizing: border-box;
  background: var(--bg-elevated); border: 1px solid var(--border-md);
  border-radius: 9px; padding: 12px 14px; margin-bottom: 12px;
  color: var(--text-1); font-size: 14px; font-family: inherit; outline: none;
}
.auth-input:focus { border-color: var(--violet); }
.auth-error { color: var(--red); font-size: 12.5px; min-height: 18px; margin-bottom: 6px; }
.auth-submit {
  width: 100%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--violet), #818cf8);
  color: #fff; font-size: 14.5px; font-weight: 700; font-family: inherit;
  padding: 12px; border-radius: 9px;
  box-shadow: 0 4px 20px rgba(167,139,250,.28); transition: all .15s;
}
.auth-submit:hover { transform: translateY(-1px); }
.auth-submit:disabled { opacity: .5; cursor: default; transform: none; }
.auth-switch { text-align: center; font-size: 12.5px; color: var(--text-2); margin-top: 18px; }
.auth-switch button { background: none; border: none; color: var(--violet); font-weight: 600; cursor: pointer; font-family: inherit; font-size: 12.5px; }

/* Chip utilisateur (sidebar) */
.nav-user { align-items: center; gap: 8px; padding: 10px 12px; margin-top: 4px; border-top: 1px solid var(--border); }
.nav-user-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--violet), #818cf8);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
}
.nav-user-name { flex: 1; min-width: 0; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-user-logout { background: none; border: none; color: var(--text-3); cursor: pointer; padding: 4px; display: flex; }
.nav-user-logout:hover { color: var(--red); }

/* Modale invitation */
.invite-box {
  width: min(400px, 92vw);
  background: var(--bg-surface); border: 1px solid var(--border-md);
  border-radius: 16px; padding: 28px;
}
.invite-title { font-size: 17px; font-weight: 800; color: var(--text-1); }
.invite-desc { font-size: 12.5px; color: var(--text-2); margin: 8px 0 18px; line-height: 1.55; }
.invite-code {
  font-family: ui-monospace, monospace; font-size: 22px; font-weight: 700;
  letter-spacing: 1px; text-align: center; color: var(--violet);
  background: var(--bg-elevated); border: 1px dashed rgba(167,139,250,.4);
  border-radius: 10px; padding: 16px; user-select: all;
}
.invite-actions { display: flex; gap: 10px; margin-top: 18px; align-items: center; }

/* ═══════════════════════════════════════════════
   RESPONSIVE MOBILE (≤ 820px)
   ═══════════════════════════════════════════════ */
.mobile-topbar { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 820px) {
  /* Barre du haut fixe */
  .mobile-topbar {
    display: flex; align-items: center; gap: 12px;
    position: fixed; top: 0; left: 0; right: 0; height: 54px;
    padding: 0 14px; z-index: 250;
    background: rgba(15,15,15,.92);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
  }
  .mobile-burger { background: none; border: none; color: var(--text-1); padding: 4px; cursor: pointer; display: flex; }
  .mobile-topbar-title { font-size: 16px; font-weight: 800; color: var(--text-1); letter-spacing: -.3px; }

  /* Sidebar → tiroir coulissant */
  .sidebar {
    transform: translateX(-100%);
    transition: transform .3s var(--ease-out);
    width: 264px; z-index: 320; box-shadow: 12px 0 44px rgba(0,0,0,.6);
    overflow-y: auto;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 310;
    background: rgba(0,0,0,.55); opacity: 0; pointer-events: none;
    transition: opacity .3s;
  }
  .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }

  /* Contenu : pleine largeur, sous la barre du haut */
  .main { margin-left: 0; padding: 68px 16px 44px; }

  /* En-tête d'écran compact + empilé */
  .page-title { font-size: 27px !important; letter-spacing: -1px !important; }
  .page-header { flex-direction: column; align-items: stretch; gap: 12px; }
  .header-right { flex-wrap: wrap; }
  .search-wrap { flex: 1 1 auto; }

  /* Grille cartes : plus dense sur petit écran */
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)) !important; gap: 12px !important; max-width: none !important; }

  /* Panneau détail plein écran */
  .detail-panel { width: 100%; max-width: 100%; }

  /* Layouts qui empilent */
  .asuivre-wrap { flex-direction: column; gap: 22px; }
  .cal-aside { position: static; width: auto; flex: none; }
  .nu-body { flex-wrap: wrap; }
  .soir-filtre { align-items: flex-start; }
  .soir-resultats { grid-template-columns: 1fr; }
  .years-wrap { grid-column: 1 / -1; }
  .records-wrap { grid-template-columns: 1fr; }
  .adn-titre, .stat-hero, .heat-wrap { grid-column: 1 / -1; }

  /* Stats / Wrapped : chiffres géants réduits */
  .stat-hero-value { font-size: 34px; }
  .wrap-annee { font-size: 62px; }
  .wrap-scroll { padding: 30px 0 50px; }

  /* Modales adaptées */
  .modal { max-width: 100%; border-radius: 16px; padding: 22px 18px 26px; }
  .invite-box, .auth-card { width: min(92vw, 400px); }

  /* Nouveautés : rails un peu plus serrés */
  .sortie-carte { flex-basis: 132px; }
}

/* ═══════════════════════════════════════════════
   BANDE SUGGESTIONS "AJOUTER" (recherche)
   ═══════════════════════════════════════════════ */
.search-suggest { margin-bottom: 28px; }
.search-suggest:empty { display: none; }

.ss-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ss-head-label { font-size: 15px; font-weight: 800; color: var(--text-1); letter-spacing: -.2px; }
.ss-head-count { font-size: 12.5px; color: var(--text-2); }

.ss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 14px; }

.ss-card {
  position: relative; text-align: left; padding: 0;
  border: 1px solid var(--border); background: var(--bg-surface);
  border-radius: 12px; overflow: hidden; cursor: pointer;
  transition: transform .18s var(--ease-out), border-color .18s, box-shadow .18s;
  animation: fadeUp .3s var(--ease-out) both;
}
.ss-card:hover { transform: translateY(-4px); border-color: var(--accent, var(--violet)); box-shadow: 0 16px 40px rgba(0,0,0,.5); }

.ss-poster { width: 100%; aspect-ratio: 2/3; background-size: cover; background-position: center; background-color: var(--bg-elevated); }
.ss-poster-empty { display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--bg-elevated), #0d0d0d); }
.ss-poster-empty span { font-size: 40px; font-weight: 800; color: var(--accent, var(--violet)); opacity: .45; }

.ss-plus {
  position: absolute; top: 8px; right: 8px; width: 27px; height: 27px; border-radius: 50%;
  background: var(--accent, var(--violet)); color: #0a0a0a; font-size: 20px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.55);
  opacity: 0; transform: scale(.6); transition: .2s var(--ease-spring);
}
.ss-card:hover .ss-plus { opacity: 1; transform: scale(1); }

.ss-meta { padding: 8px 10px 11px; display: flex; flex-direction: column; gap: 2px; }
.ss-titre {
  font-size: 12.5px; font-weight: 600; color: var(--text-1); line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ss-year { font-size: 11px; color: var(--text-2); }

/* Accent par catégorie (piloté par body.section-*) */
body.section-films   { --accent: #f97316; }
body.section-series  { --accent: #22d3ee; }
body.section-livres  { --accent: #4ade80; }
body.section-bd      { --accent: #f472b6; }
body.section-jeux    { --accent: #f87171; }
body.section-musique { --accent: #818cf8; }
body.section-jds     { --accent: #2dd4bf; }

/* Sur mobile : cartes un peu plus petites */
@media (max-width: 820px) {
  .ss-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
}

/* ═══════════════════════════════════════════════
   QUOI CE SOIR — toggle de mode + sous-sections Jouer
   ═══════════════════════════════════════════════ */
.soir-mode {
  display: flex; gap: 8px; margin-bottom: 18px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 6px;
}
.soir-mode-btn {
  flex: 1; padding: 11px 14px; border: none; border-radius: 10px;
  background: transparent; color: var(--text-2);
  font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: all .18s var(--ease-out);
}
.soir-mode-btn:hover { color: var(--text-1); }
.soir-mode-btn.active {
  background: rgba(167,139,250,.14); color: var(--violet);
  box-shadow: inset 0 0 0 1px rgba(167,139,250,.3);
}

/* En mode Jouer : deux sous-sections empilées, chacune avec sa grille */
.soir-resultats--jeux { display: block; }
.soir-sous-titre { font-size: 15px; font-weight: 800; color: var(--text-1); margin: 0 0 12px; letter-spacing: -.2px; }
.soir-sous-titre:not(:first-child) { margin-top: 28px; }
.soir-grille {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px;
}

@media (max-width: 820px) {
  .soir-mode { flex-direction: column; }
  .soir-grille { grid-template-columns: 1fr; }
}
