/* ── Reset & variables ─────────────────────────────────────────────────────── */
:root {
  --primary:    #6366f1;
  --primary-dk: #4f46e5;
  --danger:     #ef4444;
  --success:    #22c55e;
  --warning:    #f59e0b;
  --bg:         #0f1117;
  --bg2:        #1a1d27;
  --bg3:        #252836;
  --border:     #2e3148;
  --text:       #e2e8f0;
  --text-muted: #94a3b8;
  --radius:     10px;
  --shadow:     0 4px 20px rgba(0,0,0,.4);

  /* Couleurs par type actif */
  --film-color:  #6366f1;
  --serie-color: #06b6d4;
  --livre-color: #10b981;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

body.type-film  { --accent: var(--film-color); }
body.type-serie { --accent: var(--serie-color); }
body.type-livre { --accent: var(--livre-color); }
body:not(.type-film):not(.type-serie):not(.type-livre) { --accent: var(--primary); }

a { color: var(--accent, var(--primary)); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.5rem;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text) !important;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: .25rem;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  padding: .45rem 1rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-weight: 500;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.nav-links a:hover     { background: var(--bg3); color: var(--text); }
.nav-links a.active    { background: var(--accent, var(--primary)); color: #fff; }

.nav-user {
  display: flex;
  align-items: center;
  gap: .6rem;
  white-space: nowrap;
}
.username { color: var(--text-muted); font-size: .9rem; }

/* ── Boutons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 500;
  transition: opacity .15s, transform .1s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { opacity: .85; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary   { background: var(--primary);   color: #fff; }
.btn-secondary { background: var(--bg3);        color: var(--text); border: 1px solid var(--border); }
.btn-ghost     { background: transparent;       color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg3); }
.btn-danger    { background: var(--danger);     color: #fff; }
.btn-admin     { background: var(--bg3);        color: var(--text-muted); border: 1px solid var(--border); font-size: .85rem; }
.btn-logout    { background: transparent;       color: var(--text-muted); font-size: .85rem; }
.btn-sm        { padding: .3rem .65rem; font-size: .8rem; }
.btn-block     { width: 100%; justify-content: center; }

/* ── Flash messages ────────────────────────────────────────────────────────── */
.flashes { margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.flash {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .9rem;
}
.flash-success { background: #14532d33; border: 1px solid #22c55e55; color: #4ade80; }
.flash-error   { background: #7f1d1d33; border: 1px solid #ef444455; color: #f87171; }
.flash p { margin: .15rem 0; }

/* ── Login page ────────────────────────────────────────────────────────────── */
body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at center, #1a1d27 0%, #0f1117 70%);
}
.login-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.login-box h1 { font-size: 1.8rem; margin-bottom: .25rem; }
.login-sub { color: var(--text-muted); margin-bottom: 1.75rem; font-size: .95rem; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; }
.form-group label { font-size: .875rem; font-weight: 500; color: var(--text-muted); }
.form-group input[type=text],
.form-group input[type=url],
.form-group input[type=number],
.form-group input[type=password],
.form-group input[type=email],
.form-group select,
.form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: .6rem .85rem;
  font-size: .95rem;
  transition: border-color .15s;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; }
.req { color: var(--danger); }

.form-row        { display: grid; grid-template-columns: 1fr 280px; gap: 1.5rem; }
.form-row-inner  { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 800px) {
  .form-row { grid-template-columns: 1fr; }
}

.radio-group  { display: flex; gap: 1rem; flex-wrap: wrap; }
.radio-label  { display: flex; align-items: center; gap: .4rem; cursor: pointer; font-size: .9rem; }
.radio-label input { width: auto; }

.form-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.5rem; }
.form-page h1 { margin-bottom: 1.5rem; }
.form-page    { max-width: 1000px; margin: 0 auto; }

/* Cover preview */
.form-col-cover { display: flex; flex-direction: column; }
.cover-preview img, #cover-preview-img {
  width: 200px;
  border-radius: var(--radius);
  margin-bottom: .75rem;
  border: 1px solid var(--border);
}
.cover-preview-empty { display: none; }
.checkbox-label { display: flex; align-items: center; gap: .4rem; font-size: .85rem; cursor: pointer; }

/* ── Stars ─────────────────────────────────────────────────────────────────── */
.stars-display .star.on  { color: var(--warning); font-size: 1.1rem; }
.stars-display .star.off { color: var(--border);  font-size: 1.1rem; }
.no-note { color: var(--text-muted); font-size: .85rem; font-style: italic; }

/* ── Saisie note numérique ──────────────────────────────────────────────────── */
.note-input {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.note-input input[type=number] {
  width: 70px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: .45rem .6rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}
.note-input input[type=number]:focus { outline: none; border-color: var(--warning); }
.note-input-star { color: var(--warning); font-size: 1.2rem; }

/* Affichage note : "4 ★" ou "3,5 ★" */
.stars-display { display: inline-flex; align-items: center; gap: .3rem; }
.stars-display .star.on { color: var(--warning); font-size: 1.1rem; }
.star-numeric {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* ── Filters bar ────────────────────────────────────────────────────────────── */
.list-header { margin-bottom: 1.5rem; }
.list-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.list-title h1 { font-size: 1.75rem; display: flex; align-items: center; gap: .5rem; }
.count {
  font-size: 1rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .1rem .6rem;
  color: var(--text-muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}
.filters input[type=text],
.filters select {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: .45rem .75rem;
  font-size: .875rem;
}
.filters input[type=text] { min-width: 180px; }

/* ── Media Grid ─────────────────────────────────────────────────────────────── */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.25rem;
}

.media-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
}
.media-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent, var(--primary));
}

.card-cover-link { position: relative; display: block; }
.card-cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--bg3);
}
.card-statut {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: .7rem;
  padding: .2rem .5rem;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}
.statut-a_voir .card-statut,
.statut-a_lire .card-statut { background: rgba(99,102,241,.8); }
.statut-vu .card-statut,
.statut-lu .card-statut     { background: rgba(34,197,94,.7); }

.card-body {
  padding: .75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
/* Note + titre sur la même ligne */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .4rem;
}
.card-title {
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.3;
  flex: 1;
}
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--accent, var(--primary)); }
.card-note { flex-shrink: 0; }
.card-year, .card-cat {
  font-size: .75rem;
  color: var(--text-muted);
}
.card-cat {
  background: var(--bg3);
  border-radius: 4px;
  padding: .1rem .4rem;
  width: fit-content;
}

/* ── Detail page ────────────────────────────────────────────────────────────── */
.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
}
@media (max-width: 700px) {
  .detail-layout { grid-template-columns: 1fr; }
}
.detail-cover img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.detail-meta-top { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.badge {
  font-size: .75rem;
  padding: .2rem .6rem;
  border-radius: 20px;
  font-weight: 500;
}
.badge-type   { background: var(--bg3); color: var(--text-muted); border: 1px solid var(--border); }
.badge-cat    { background: var(--bg3); color: var(--text-muted); border: 1px solid var(--border); }
.badge-statut { background: var(--bg3); }
.statut-vu .badge-statut, .statut-lu .badge-statut     { background: #14532d33; color: #4ade80; border: 1px solid #22c55e44; }
.statut-a_voir .badge-statut, .statut-a_lire .badge-statut { background: #1e1b4b33; color: #a5b4fc; border: 1px solid #6366f144; }

.detail-title { font-size: 2rem; line-height: 1.2; margin-bottom: .5rem; }
.detail-year  { font-size: 1.2rem; font-weight: 400; color: var(--text-muted); }
.detail-note  { margin: .75rem 0 1rem; }
.detail-synopsis h2 { font-size: 1rem; color: var(--text-muted); margin-bottom: .5rem; }
.detail-synopsis p  { font-size: .95rem; line-height: 1.7; }
.detail-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.detail-dates   { font-size: .78rem; color: var(--text-muted); margin-top: 1rem; }

/* ── Empty state ────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state p { margin-bottom: 1rem; font-size: 1.1rem; }

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  color: var(--text-muted);
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: .8rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
.footer-baseline {
  font-style: italic;
  color: var(--text-muted);
  font-size: .85rem;
  margin-bottom: .25rem;
  opacity: .7;
}

/* ── Admin ──────────────────────────────────────────────────────────────────── */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.stat-icon   { font-size: 2rem; margin-bottom: .5rem; }
.stat-label  { font-size: .875rem; color: var(--text-muted); }
.stat-value  { font-size: 2.5rem; font-weight: 700; line-height: 1; margin: .25rem 0; }
.stat-detail { font-size: .78rem; color: var(--text-muted); }

.admin-shortcuts { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.admin-page-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.admin-page-header h1 { margin: 0; }
.admin-two-col {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 750px) {
  .admin-two-col { grid-template-columns: 1fr; }
}
.admin-two-col h2 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--text-muted); }

.inline-form { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }

/* ── Table ──────────────────────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.data-table th,
.data-table td {
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.data-table th { color: var(--text-muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.data-table tr:hover td { background: var(--bg3); }
.row-disabled td { opacity: .5; }
.actions-cell { display: flex; gap: .4rem; align-items: flex-start; flex-wrap: wrap; }

.badge-ok  { background: #14532d33; color: #4ade80; border: 1px solid #22c55e44; }
.badge-off { background: #3f3f4633; color: #94a3b8; border: 1px solid #ffffff15; }

.reset-form { margin-top: .5rem; }
.reset-form form { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.reset-form input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: .35rem .6rem;
  font-size: .8rem;
  width: 130px;
}

.text-muted { color: var(--text-muted); }

/* ── Hamburger ───────────────────────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  border-radius: 6px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    padding: .6rem 1rem;
    gap: .5rem;
    position: relative;
  }
  .hamburger { display: flex; order: 1; margin-left: 0; }
  .brand { order: 2; }
  .nav-user { order: 3; margin-left: auto; }
  .nav-links {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    gap: .15rem;
    padding: .5rem 0;
    border-top: 1px solid var(--border);
    margin-top: .25rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: .6rem .85rem;
    font-size: .9rem;
    border-radius: 8px;
  }
  .username { display: none; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .form-row-inner { grid-template-columns: 1fr; }
}

/* ── TMDB Search Block ──────────────────────────────────────────────────────── */
.tmdb-block {
  background: linear-gradient(135deg, #0d1117 0%, #1a1d2e 100%);
  border: 1px solid #2e3760;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}

.tmdb-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: .95rem;
}

.tmdb-powered {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 400;
}
.tmdb-powered strong { color: #01b4e4; }

.tmdb-search-row {
  display: flex;
  gap: .6rem;
}
.tmdb-search-row input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: .6rem .9rem;
  font-size: .95rem;
}
.tmdb-search-row input:focus {
  outline: none;
  border-color: #01b4e4;
}

/* Status */
.tmdb-status {
  margin-top: .75rem;
  padding: .6rem .9rem;
  border-radius: 8px;
  font-size: .875rem;
}
.tmdb-info    { background: #0c2340; border: 1px solid #01b4e440; color: #7dd3fc; }
.tmdb-warn    { background: #2d1f00; border: 1px solid #f59e0b44; color: #fbbf24; }
.tmdb-error   { background: #2d0a0a; border: 1px solid #ef444444; color: #f87171; }
.tmdb-success { background: #052e16; border: 1px solid #22c55e44; color: #4ade80; }

/* Grille résultats */
.tmdb-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: .75rem;
  margin-top: 1rem;
  max-height: 360px;
  overflow-y: auto;
  padding-right: .25rem;
}

.tmdb-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.tmdb-card:hover {
  border-color: #01b4e4;
  transform: translateY(-2px);
}
.tmdb-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--bg3);
}
.tmdb-card-info {
  padding: .45rem .5rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.tmdb-card-info strong { font-size: .78rem; line-height: 1.25; }
.tmdb-year            { font-size: .72rem; color: var(--text-muted); }
.tmdb-orig-small      { font-size: .7rem;  color: var(--text-muted); font-style: italic; }

/* Aperçu détail */
.tmdb-preview {
  margin-top: 1.25rem;
  background: var(--bg2);
  border: 1px solid #01b4e430;
  border-radius: var(--radius);
  overflow: hidden;
}
.tmdb-preview-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.25rem;
  padding: 1.25rem;
}
@media (max-width: 600px) {
  .tmdb-preview-grid { grid-template-columns: 1fr; }
}
.tmdb-preview-grid img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.tmdb-preview-meta h3   { font-size: 1.15rem; margin-bottom: .35rem; }
.tmdb-preview-meta p    { font-size: .875rem; margin-bottom: .3rem; color: var(--text-muted); }
.tmdb-preview-meta a    { color: #01b4e4; }
.tmdb-orig              { font-style: italic; }
.tmdb-preview-synopsis  { font-size: .875rem; color: var(--text); line-height: 1.65;
                          max-height: 120px; overflow-y: auto; margin-top: .5rem;
                          padding-right: .25rem; }

.tmdb-preview-footer {
  display: flex;
  gap: .75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* Badge TMDB sur l'affiche */
.cover-wrap {
  position: relative;
  width: 200px;
}
.cover-wrap img {
  width: 200px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.cover-placeholder {
  width: 200px;
  height: 300px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .85rem;
  gap: .5rem;
}
.tmdb-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #01b4e4;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: .15rem .4rem;
  border-radius: 4px;
  letter-spacing: .05em;
}

/* Ajustement form-page header */
.form-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.form-page-header h1 { margin: 0; }

/* ── Badges statut série ────────────────────────────────────────────────────── */
.badge-serie-en_cours  { background: #052e1633; color: #4ade80; border: 1px solid #22c55e44; }
.badge-serie-terminee  { background: #1e1b4b33; color: #a5b4fc; border: 1px solid #6366f144; }
.badge-serie-annulee   { background: #7f1d1d33; color: #f87171; border: 1px solid #ef444444; }
.badge-serie-en_pause  { background: #451a0333; color: #fbbf24; border: 1px solid #f59e0b44; }

.serie-info {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  margin: .5rem 0;
  font-size: .875rem;
}
.serie-saisons {
  color: var(--text-muted);
  font-size: .875rem;
}

/* ── Détail : extras (durée, réalisateur) ───────────────────────────────────── */
.detail-extra {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: .4rem 0 .75rem;
}
.detail-meta-item {
  font-size: .875rem;
  color: var(--text-muted);
}

/* ── Casting ────────────────────────────────────────────────────────────────── */
.detail-casting {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin: .75rem 0;
}
.casting-label {
  font-size: .8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-right: .2rem;
}
.casting-pill {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .2rem .65rem;
  font-size: .78rem;
  color: var(--text);
}

/* ── Trailer button ─────────────────────────────────────────────────────────── */
.btn-trailer {
  background: #cc0000;
  color: #fff;
  margin-top: .5rem;
  display: inline-flex;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity .15s;
}
.btn-trailer:hover { opacity: .85; text-decoration: none; }

/* ── Badges réseau + prochain épisode ───────────────────────────────────────── */
.badge-reseau   { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.badge-next-ep  { background: #1e3a5f33; color: #7dd3fc; border: 1px solid #38bdf844; }

/* ── Barre refresh TMDB (mode édition) ──────────────────────────────────────── */
.tmdb-refresh-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0d1117 0%, #1a1d2e 100%);
  border: 1px solid #2e3760;
  border-radius: var(--radius);
  padding: .85rem 1.25rem;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.tmdb-refresh-info {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .9rem;
  font-weight: 500;
}

/* ── Suivi saisons (formulaire) ─────────────────────────────────────────────── */
.saisons-vues-block { margin-top: .5rem; }
.saison-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .4rem 0;
  border-bottom: 1px solid var(--border);
}
.saison-row:last-child { border-bottom: none; }
.saison-num {
  width: 75px;
  font-size: .875rem;
  font-weight: 500;
  flex-shrink: 0;
}
.saison-date-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: .35rem .6rem;
  font-size: .85rem;
  flex: 1;
  max-width: 180px;
}
.saison-status { font-size: .75rem; }

/* ── Suivi saisons (détail) ─────────────────────────────────────────────────── */
.saisons-detail {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: .75rem 0;
}
.saisons-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
}
.saisons-title { font-weight: 600; font-size: .9rem; }
.saisons-count { font-size: .8rem; color: var(--text-muted); }
.saisons-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.saison-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .4rem .65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  min-width: 60px;
}
.saison-vue     { background: #052e1633; border-color: #22c55e44; }
.saison-non-vue { background: var(--bg3); }
.saison-pill-num  { font-weight: 700; font-size: .8rem; }
.saison-pill-date { font-size: .7rem; color: var(--text-muted); margin-top: .15rem; }
.saison-vue .saison-pill-date { color: #4ade80; }

/* ── Alerte nouvelle saison ─────────────────────────────────────────────────── */
.nouvelle-saison-alert {
  margin-top: .75rem;
  padding: .5rem .85rem;
  background: #451a0333;
  border: 1px solid #f59e0b55;
  border-radius: 8px;
  color: #fbbf24;
  font-size: .85rem;
}
.card-nouvelle-saison {
  font-size: .72rem;
  color: #fbbf24;
  background: #451a0333;
  border: 1px solid #f59e0b44;
  border-radius: 6px;
  padding: .2rem .5rem;
  margin-top: .3rem;
  width: fit-content;
}

/* ── Statut calculé automatiquement ─────────────────────────────────────────── */
.statut-auto-info {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .4rem 0;
}
.statut-badge {
  font-size: .8rem;
  padding: .25rem .7rem;
  border-radius: 20px;
  font-weight: 600;
}
.statut-vu       { background: #14532d33; color: #4ade80; border: 1px solid #22c55e44; }
.statut-a_voir   { background: var(--bg3); color: var(--text-muted); border: 1px solid var(--border); }
.statut-en_cours { background: #1e3a5f33; color: #7dd3fc; border: 1px solid #38bdf844; }
.statut-auto-hint { font-size: .75rem; color: var(--text-muted); font-style: italic; }

/* badge en_cours dans les cards */
.statut-en_cours .card-statut { background: rgba(56,189,248,.7); }

/* ── Profil ──────────────────────────────────────────────────────────────────── */
/* ── Page profil ─────────────────────────────────────────────────────────────── */
.profil-page { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.5rem; }

/* Hero : avatar + identité + stats */
.profil-hero {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.profil-hero-left { display: flex; align-items: center; gap: 1.25rem; }
.profil-identity { display: flex; flex-direction: column; gap: .2rem; }
.profil-name { font-size: 1.4rem; font-weight: 700; margin: 0; }
.profil-login { font-size: .85rem; color: var(--text-muted); }
.profil-since { font-size: .78rem; color: var(--text-muted); }

.profil-stats { display: flex; gap: .75rem; flex-wrap: wrap; }
.profil-stat {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: .6rem 1rem;
  text-decoration: none; color: var(--text);
  transition: border-color .15s;
  min-width: 70px;
}
.profil-stat:hover { border-color: var(--primary); }
.profil-stat-icon { font-size: 1.2rem; }
.profil-stat-nb   { font-size: 1.3rem; font-weight: 700; }
.profil-stat-label { font-size: .7rem; color: var(--text-muted); }

/* Corps : 2 colonnes */
.profil-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

/* Sections préférences */
.profil-prefs, .profil-social { display: flex; flex-direction: column; gap: 1rem; }
.pref-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.pref-section h3 {
  font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); margin-bottom: .75rem;
}
.pref-form { display: flex; flex-direction: column; gap: .5rem; }
.pref-row  { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pref-label { font-size: .82rem; color: var(--text-muted); margin-bottom: .2rem; display: block; }
.pref-grid { display: grid; grid-template-columns: auto 1fr; gap: .4rem .75rem; align-items: center; margin-bottom: .5rem; }
.pref-check { display: flex; align-items: center; gap: .4rem; font-size: .82rem; cursor: pointer; }

/* Amis */
.amis-list { display: flex; flex-direction: column; gap: .5rem; }
.ami-card {
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
}
.ami-avatar-wrap { flex-shrink: 0; }
.ami-avatar, .ami-avatar-img {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff; font-size: .8rem; font-weight: 700;
}
.ami-info { flex: 1; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.ami-name { font-size: .875rem; font-weight: 600; color: var(--text); text-decoration: none; }
.ami-name:hover { color: var(--primary); }
.ami-links { display: flex; gap: .4rem; font-size: .85rem; }
.ami-links a { text-decoration: none; opacity: .8; }
.ami-links a:hover { opacity: 1; }
.btn-close-sm {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.1rem; cursor: pointer; padding: .2rem .4rem;
  border-radius: 4px; line-height: 1;
}
.btn-close-sm:hover { background: var(--bg3); color: var(--text); }

.demande-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: .4rem .5rem; border-radius: 6px;
  background: var(--bg3); border: 1px solid var(--border);
  font-size: .85rem; margin-bottom: .4rem;
}

/* Badges section */
.profil-badges-section {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.profil-badges-section h2 { font-size: 1rem; margin-bottom: 1rem; }
.badges-all { display: flex; flex-direction: column; gap: .75rem; }

/* Mobile */
@media (max-width: 700px) {
  .profil-hero { flex-direction: column; align-items: flex-start; }
  .profil-body { grid-template-columns: 1fr; }
  .profil-stats { gap: .5rem; }
  .profil-stat { min-width: 60px; padding: .5rem .75rem; }
}

.profil-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.profil-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profil-name  { font-size: 1.4rem; font-weight: 700; }
.profil-login { color: var(--text-muted); font-size: .875rem; }
.profil-since { color: var(--text-muted); font-size: .8rem; }

.profil-stats {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}
.profil-stat {
  flex: 1;
  min-width: 70px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .6rem .5rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s;
}
.profil-stat:hover { border-color: var(--accent, var(--primary)); text-decoration: none; }
.profil-stat-icon { font-size: 1.2rem; display: block; }
.profil-stat-val  { font-size: 1.3rem; font-weight: 700; display: block; }
.profil-stat-label{ font-size: .7rem; color: var(--text-muted); display: block; }

.profil-actions { display: flex; flex-direction: column; gap: .6rem; }
.profil-name-form .form-group { margin-bottom: 0; }

.profil-section { margin-bottom: 1.75rem; }
.profil-section h2 { font-size: 1rem; margin-bottom: 1rem; color: var(--text-muted); }

/* Demandes */
.demandes-list { display: flex; flex-direction: column; gap: .6rem; }
.demande-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .6rem .85rem;
  flex-wrap: wrap;
}
.demande-name  { font-weight: 600; flex: 1; text-decoration: none; color: var(--text); }
.demande-name:hover { color: var(--accent, var(--primary)); }
.demande-date  { font-size: .78rem; color: var(--text-muted); }
.demande-actions { display: flex; gap: .4rem; }

/* Amis */
.amis-grid { display: flex; flex-direction: column; gap: .5rem; }
.ami-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .6rem .85rem;
}
.ami-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
}
.ami-info { flex: 1; }
.ami-name { font-weight: 600; text-decoration: none; color: var(--text); display: block; }
.ami-name:hover { color: var(--accent, var(--primary)); }
.ami-links { display: flex; gap: .5rem; margin-top: .2rem; font-size: 1rem; }
.ami-links a { text-decoration: none; opacity: .7; transition: opacity .15s; }
.ami-links a:hover { opacity: 1; }
.ami-catalogue-links { display: flex; gap: .4rem; flex-wrap: wrap; }

/* Recherche membres */
.membre-search { position: relative; }
.membre-search input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: .6rem .85rem;
  font-size: .9rem;
}
.membre-results {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 50;
  box-shadow: var(--shadow);
  max-height: 300px;
  overflow-y: auto;
}
.membre-result-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .85rem;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.membre-result-item:last-child { border-bottom: none; }
.membre-result-item:hover { background: var(--bg3); }
.membre-result-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.membre-result-login { color: var(--text-muted); font-size: .8rem; margin-left: auto; }

/* Nav profil */
.nav-profil {
  position: relative;
  color: var(--text-muted);
  font-size: .9rem;
  text-decoration: none;
  padding: .35rem .6rem;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
}
.nav-profil:hover { color: var(--text); text-decoration: none; }
.badge-notif {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--danger);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bandeau ami */
.ami-catalogue-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: .9rem;
}

/* ── Profil public ──────────────────────────────────────────────────────────── */
.public-catalogue-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1.25rem;
  margin-bottom: 1.5rem;
}
.public-catalogue-who { font-size: .95rem; }
.public-type-nav { display: flex; gap: .25rem; }
.public-type-nav a {
  padding: .4rem .85rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.public-type-nav a:hover  { background: var(--bg3); color: var(--text); }
.public-type-nav a.active { background: var(--accent, var(--primary)); color: #fff; }

/* Toggle + URL publique */
.profil-public-toggle { padding: .75rem 0; border-bottom: 1px solid var(--border); }
.public-url-box {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: .5rem;
  padding: .5rem .75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 100%;
}
.public-url-label { font-size: .78rem; color: var(--text-muted); white-space: nowrap; }
.public-url-link {
  font-size: .8rem;
  color: var(--accent, var(--primary));
  word-break: break-all;
  overflow-wrap: anywhere;
  flex: 1;
  min-width: 0;
}
.public-url-box {
  min-width: 0;
  overflow: hidden;
}

/* ── Dashboard admin ────────────────────────────────────────────────────────── */
.admin-dashboard h1 { margin-bottom: 1.5rem; }
.admin-section { margin-top: 2rem; }
.admin-section h2 { font-size: 1rem; color: var(--text-muted); margin-bottom: 1rem; }
.nav-username { font-size: .85rem; color: var(--text-muted); }

/* ── Pills méta (fiche détail) ──────────────────────────────────────────────── */
.detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 1rem 0 1.25rem;
}
.detail-pill {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .6rem 1rem;
  min-width: 90px;
}
.detail-pill .pill-label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}
.detail-pill .pill-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

/* Couleurs par type */
.pill-vu              { background: #052e1655; border-color: #22c55e55; }
.pill-vu .pill-label  { color: #22c55e; }
.pill-vu .pill-value  { color: #4ade80; }

.pill-a-voir              { background: var(--bg3); border-color: var(--border); }
.pill-a-voir .pill-value  { color: var(--text-muted); }

.pill-duree              { background: #1e1b4b55; border-color: #6366f155; }
.pill-duree .pill-label  { color: #818cf8; }
.pill-duree .pill-value  { color: #a5b4fc; }

.pill-real { background: var(--bg3); border-color: var(--border); }

.pill-next-ep              { background: #1e3a5f55; border-color: #38bdf855; }
.pill-next-ep .pill-label  { color: #38bdf8; }
.pill-next-ep .pill-value  { color: #7dd3fc; }

.pill-reseau   { background: var(--bg3); border-color: var(--border); }
.pill-saisons  { background: var(--bg3); border-color: var(--border); }
.pill-serie-statut { background: var(--bg3); border-color: var(--border); }

/* ── Pill réalisateur cliquable — discret, sans surlignage ─────────────────── */
a.detail-pill {
  text-decoration: none;
  cursor: pointer;
}
a.detail-pill:hover { text-decoration: none; }

/* ── Casting pills cliquables — discret ────────────────────────────────────── */
.casting-pill-link {
  text-decoration: none;
  color: var(--text);
}
.casting-pill-link:hover { text-decoration: none; color: var(--text); }

/* ── Bandeau filmographie ───────────────────────────────────────────────────── */
.real-filter-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #1e1b4b33;
  border: 1px solid #6366f144;
  border-radius: var(--radius);
  padding: .75rem 1.25rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.real-filter-count {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .1rem .6rem;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Note par saison ────────────────────────────────────────────────────────── */
.saison-note-input { margin-left: auto; }
.saison-note-input input { width: 55px; padding: .3rem .4rem; font-size: .85rem; }
.saison-hint { font-size: .65rem; color: var(--text-muted); font-weight: 400; }
.saison-pill-note {
  font-size: .7rem;
  font-weight: 700;
  color: var(--warning);
  margin-top: .2rem;
}

.note-moyenne-label {
  font-size: .72rem;
  color: var(--text-muted);
  margin-left: .4rem;
  font-style: italic;
}

/* ── Bouton copie date saison précédente ────────────────────────────────────── */
.copy-prev-date {
  font-size: .72rem;
  padding: .25rem .5rem;
  white-space: nowrap;
  opacity: .7;
}
.copy-prev-date:hover { opacity: 1; }

/* ── Commentaire fiche détail ───────────────────────────────────────────────── */
.detail-commentaire {
  background: var(--bg2);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  padding: .85rem 1rem;
  margin: .75rem 0;
}
.detail-commentaire h2 {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--primary);
  margin-bottom: .4rem;
}
.detail-commentaire p { font-size: .9rem; line-height: 1.6; }

/* ── Commentaire par saison ─────────────────────────────────────────────────── */
.saison-pill-comment {
  font-size: .72rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: .2rem;
  display: block;
}
.saison-commentaire {
  width: 100%;
  margin-top: .4rem;
  resize: vertical;
  min-height: 2.5rem;
  font-size: .82rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: .35rem .5rem;
}
.saison-commentaire:focus { outline: none; border-color: var(--primary); }

/* ── Toggles rubriques profil ───────────────────────────────────────────────── */
.rubriques-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .35rem;
}
.rubrique-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .4rem .75rem;
  font-size: .875rem;
  cursor: pointer;
  transition: border-color .15s;
}
.rubrique-item:has(input:checked) { border-color: var(--primary); }
.rubrique-fixed { opacity: .6; cursor: default; }
.rubrique-item input[type=checkbox] { cursor: pointer; }

/* ── Avatar ─────────────────────────────────────────────────────────────────── */
.profil-avatar-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
}
.profil-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profil-avatar-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.avatar-upload-form {
  position: absolute;
  bottom: 0;
  right: 0;
}
.avatar-upload-btn {
  width: 26px;
  height: 26px;
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .75rem;
  transition: background .15s;
}
.avatar-upload-btn:hover { background: var(--primary); }

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.profil-badges {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.profil-badges h3 {
  font-size: .875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}
.badges-group { margin-bottom: 1rem; }
.badges-cat-label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  display: block;
  margin-bottom: .4rem;
}
.badges-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: .6rem;
}
.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  padding: .5rem .6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg3);
  cursor: default;
  min-width: 64px;
  text-align: center;
  transition: transform .15s;
}
.badge-item:hover { transform: translateY(-2px); }
.badge-icon { font-size: 1.5rem; line-height: 1; }
.badge-label { font-size: .62rem; color: var(--text-muted); line-height: 1.2; }

.badge-earned {
  border-color: var(--warning);
  background: #1a1500;
}
.badge-earned .badge-label { color: var(--warning); font-weight: 600; }

.badge-locked {
  opacity: .3;
  filter: grayscale(1);
}

/* ── Fil d'actualité ────────────────────────────────────────────────────────── */
.actus-page { padding: 0 1rem 3rem; max-width: 1400px; margin: 0 auto; }
.actus-header { margin-bottom: 1.5rem; }
.actus-header h1 { font-size: 1.5rem; margin-bottom: .25rem; }
.actus-subtitle { color: var(--text-muted); font-size: .875rem; }

.actus-feed { display: flex; flex-direction: column; gap: 1rem; }

.actu-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  transition: border-color .15s;
}
.actu-card:hover { border-color: var(--accent, var(--primary)); }

/* Affiche à gauche */
.actu-cover-link {
  display: block;
  flex-shrink: 0;
  text-decoration: none;
}
.actu-cover {
  width: 200px;
  height: 300px;
  object-fit: cover;
  display: block;
  background: var(--bg3);
}

/* Contenu à droite — tout aligné à droite */
.actu-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  gap: .6rem;
  min-width: 0;
  align-items: flex-end;
  text-align: right;
}

/* Membre en haut */
.actu-who {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: .5rem;
}
.actu-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.actu-avatar-initiale {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.actu-who-info { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; flex-direction: row-reverse; }
.actu-who-name {
  font-weight: 600;
  font-size: .82rem;
  color: var(--text);
  text-decoration: none;
}
.actu-who-name:hover { color: var(--primary); }
.actu-date { font-size: .7rem; color: var(--text-muted); }

/* Infos média */
.actu-media-info {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  text-decoration: none;
  color: var(--text);
  align-items: flex-end;
  width: 100%;
}
.actu-media-info:hover { text-decoration: none; }
.actu-type { font-size: .7rem; color: var(--text-muted); }
.actu-titre { font-weight: 700; font-size: 1.05rem; line-height: 1.25; }
.actu-annee { font-weight: 400; color: var(--text-muted); font-size: .85rem; }
.actu-statut {
  font-size: .72rem;
  padding: .15rem .5rem;
  border-radius: 20px;
  width: fit-content;
  font-weight: 500;
  margin-left: auto;
}
.statut-vu .actu-statut,
.statut-lu .actu-statut       { background: #052e1633; color: #4ade80; border: 1px solid #22c55e44; }
.statut-a_voir .actu-statut,
.statut-a_lire .actu-statut   { background: #1e1b4b33; color: #a5b4fc; border: 1px solid #6366f144; }
.statut-en_cours .actu-statut { background: #1e3a5f33; color: #7dd3fc; border: 1px solid #38bdf844; }

/* Note grande */
.actu-note {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--warning);
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: .25rem;
}
.actu-note-val { font-size: 1.3rem; }
.actu-note-star { font-size: 1.1rem; }

.actu-commentaire {
  font-size: .82rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
  border-left: 2px solid var(--border);
  padding-left: .5rem;
}

.actu-add-btn {
  margin-top: .5rem;
  font-size: .75rem;
  padding: .35rem .75rem;
  white-space: nowrap;
}

.actus-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Tags suggestions ───────────────────────────────────────────────────────── */
.suggestion-tag {
  font-size: .72rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 20px;
  width: fit-content;
}
.suggestion-tag-amis  { background: #1e3a5f55; color: #7dd3fc; border: 1px solid #38bdf844; }
.suggestion-tag-gouts { background: #1e1b4b55; color: #a5b4fc; border: 1px solid #6366f144; }
.suggestion-tag-new   { background: #052e1655; color: #4ade80; border: 1px solid #22c55e44; }
.suggestion-ami { font-weight: 400; opacity: .85; }

.suggestion-cat { color: var(--text-muted); font-weight: 400; }

/* ── Filtres suggestions ────────────────────────────────────────────────────── */
.suggestion-filtres {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: .75rem;
}
.suggestion-filtre-btn {
  padding: .35rem .85rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 500;
  text-decoration: none;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all .15s;
}
.suggestion-filtre-btn:hover { color: var(--text); border-color: var(--text-muted); }
.suggestion-filtre-btn.active { color: var(--text); border-color: var(--text); background: var(--bg2); }
.suggestion-filtre-amis.active  { background: #1e3a5f55; color: #7dd3fc; border-color: #38bdf844; }
.suggestion-filtre-gouts.active { background: #1e1b4b55; color: #a5b4fc; border-color: #6366f144; }
.suggestion-filtre-new.active   { background: #052e1655; color: #4ade80; border-color: #22c55e44; }

.suggestion-filtre-refresh {
  margin-left: auto;
  color: var(--text-muted);
}
.suggestion-filtre-refresh:hover { color: var(--text); }
.suggestion-tag-real { background: #1a0f0055; color: #fbbf24; border: 1px solid #f59e0b44; }

.suggestion-genres {
  margin-top: .4rem;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
}
.suggestion-genres .suggestion-filtre-btn {
  font-size: .75rem;
  padding: .25rem .65rem;
}

.tmdb-loading {
  display: flex; align-items: center; gap: .75rem;
  color: var(--text-muted); font-size: .875rem; padding: .5rem;
}
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  animation: spin .7s linear infinite;
  display: inline-block; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Genre pills dans cards actus/suggestions ────────────────────────────────── */
.actu-genres {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .1rem;
}
.actu-genre-pill {
  font-size: .68rem;
  padding: .15rem .5rem;
  border-radius: 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Avatar navbar ───────────────────────────────────────────────────────────── */
.nav-avatar-img {
  width: 28px; height: 28px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.nav-avatar-initiale {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff; font-size: .8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-profil {
  display: flex; align-items: center; gap: .5rem;
  text-decoration: none; color: var(--text);
  font-size: .875rem; font-weight: 500;
}
.nav-profil:hover { color: var(--primary); }
@media (max-width: 768px) { .nav-username-text { display: none; } }

/* ── Badge progression ───────────────────────────────────────────────────────── */
.badge-progress {
  width: 100%; height: 3px;
  background: var(--border);
  border-radius: 2px; overflow: hidden;
  margin-top: .25rem;
}
.badge-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width .4s ease;
}
.badge-progress-txt {
  font-size: .6rem; color: var(--text-muted);
  margin-top: .1rem; display: block;
}
.badge-item { min-height: 80px; justify-content: space-between; }

/* ── Toast badge débloqué ────────────────────────────────────────────────────── */
.badge-toast {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  background: var(--bg2);
  border: 1px solid var(--warning);
  border-radius: 12px;
  padding: .875rem 1.1rem;
  display: flex; align-items: center; gap: .875rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  z-index: 9999;
  transform: translateY(120%);
  opacity: 0;
  transition: transform .4s cubic-bezier(.175,.885,.32,1.275), opacity .3s;
  max-width: 320px;
}
.badge-toast.show { transform: translateY(0); opacity: 1; }
.badge-toast-icon { font-size: 2.2rem; flex-shrink: 0; }
.badge-toast-body { display: flex; flex-direction: column; gap: .15rem; }
.badge-toast-title { font-size: .7rem; font-weight: 700; color: var(--warning); text-transform: uppercase; letter-spacing: .05em; }
.badge-toast-name  { font-size: .95rem; font-weight: 700; color: var(--text); }
.badge-toast-desc  { font-size: .78rem; color: var(--text-muted); }

/* ── Badges v2 ───────────────────────────────────────────────────────────────── */
.badges-all { display: flex; flex-direction: column; gap: 1.25rem; }

.badge-item2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: 1rem .75rem .875rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg2);
  position: relative;
  text-align: center;
  min-width: 0;
  transition: transform .2s, box-shadow .2s;
  cursor: default;
}
.badge-item2:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.badge-earned2 { box-shadow: 0 0 0 1.5px currentColor; }
.badge-locked2 { opacity: .35; filter: grayscale(.3); }

.badge-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-bottom: .1rem;
}
.badge-circle i { transition: transform .2s; }
.badge-item2:hover .badge-circle i { transform: scale(1.15); }

.badge-label2 {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.badge-earned2 .badge-label2 { color: var(--text); }

.badge-earned-label {
  font-size: .68rem;
  font-weight: 600;
  line-height: 1.2;
}

.badge-prog-txt {
  font-size: .68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.badge-progress {
  width: 100%;
  height: 5px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
  margin-top: .1rem;
}
.badge-progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width .6s ease;
}

.badge-check {
  position: absolute;
  top: 7px; right: 7px;
  font-size: .65rem;
  color: #fff;
  border-radius: 4px;
  padding: 2px 5px;
  font-weight: 800;
  line-height: 1.3;
}

/* Toast badges v2 */
.badge-toast {
  background: var(--bg2);
  border-width: 1.5px;
}
.badge-toast-icon-wrap {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.badge-svg-wrap {
  display: block;
  transition: transform .2s;
}
.badge-item2:hover .badge-svg-wrap { transform: scale(1.08) translateY(-2px); }
.badge-locked2 .badge-svg-wrap { filter: grayscale(.6); opacity: .5; }

#filtres-type { margin-bottom: .1rem; }
#filtres-type .suggestion-filtre-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Section demandes d'ami ──────────────────────────────────────────────────── */
.demandes-section {
  border: 1px solid var(--warning);
  border-radius: 10px;
  background: color-mix(in srgb, var(--warning) 5%, var(--bg2));
}
.demande-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
}
.demande-card:last-child { border-bottom: none; }
.demande-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.demande-info { display: flex; flex-direction: column; gap: .1rem; }
.demande-nom  { font-size: .88rem; font-weight: 600; color: var(--text); }
.demande-login { font-size: .75rem; color: var(--text-muted); }

/* ══ Suggestions v2 ══════════════════════════════════════════════════════════ */
.sugg-page { padding: 0 1rem 3rem; max-width: 1400px; margin: 0 auto; }

.sugg-filters-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0 1.25rem;
  flex-wrap: wrap;
}
.sugg-filters-left { flex-shrink: 0; }
.sugg-title { font-size: 1.35rem; font-weight: 700; margin: 0; }
.sugg-filters-controls {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
}
.sugg-select {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: .4rem .75rem;
  font-size: .82rem;
  cursor: pointer;
  transition: border-color .15s;
}
.sugg-select:focus { outline: none; border-color: var(--primary); }
.sugg-btn-refresh {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: .4rem .6rem;
  cursor: pointer;
  display: flex; align-items: center;
  transition: background .15s;
}
.sugg-btn-refresh:hover { background: var(--bg3); }

/* Grille */
.sugg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* Card */
.sugg-card {
  border-radius: 10px;
  background: var(--bg2);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.sugg-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.4); }

.sugg-card-poster {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--bg3);
}
.sugg-card-poster img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.sugg-card:hover .sugg-card-poster img { transform: scale(1.04); }

.sugg-card-tag {
  position: absolute;
  top: 10px; left: 10px;
  font-size: .85rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 7px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .05em;
  line-height: 1.3;
  max-width: calc(100% - 55px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.tag-amis  { background: #1D9E75; }
.tag-gouts { background: #7F77DD; }
.tag-new   { background: #378ADD; }
.tag-real  { background: #BA7517; }

.sugg-card-add {
  position: absolute;
  bottom: 6px; right: 6px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  opacity: 0;
  transition: opacity .2s;
  text-decoration: none;
}
.sugg-card:hover .sugg-card-add { opacity: 1; }

.sugg-card-note {
  position: absolute;
  bottom: 10px; left: 10px;
  background: rgba(0,0,0,.88);
  color: #EF9F27;
  font-size: 1.35rem;
  font-weight: 900;
  padding: 5px 12px;
  border-radius: 8px;
  letter-spacing: .02em;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

.sugg-card-body { padding: .65rem .75rem .75rem; }

/* Ligne 1 : genres à gauche + année à droite */
.sugg-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  margin-bottom: .4rem;
}
.sugg-card-genres {
  display: flex; flex-wrap: wrap; gap: .25rem;
  flex: 1; min-width: 0;
}
.sugg-card-genre {
  font-size: .75rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  color: var(--text-muted);
  white-space: nowrap;
}
.sugg-card-year {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Ligne 2 : titre en gras */
.sugg-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
.sugg-card-title:hover { color: var(--primary); }

/* Charger plus */
.sugg-more-wrap {
  display: flex;
  justify-content: center;
  padding: 2rem 0 1rem;
}
.sugg-more-btn { min-width: 180px; }

/* Loading / empty */
.sugg-loading { grid-column: 1/-1; text-align: center; padding: 3rem; color: var(--text-muted); }
.sugg-empty   { grid-column: 1/-1; text-align: center; padding: 3rem; color: var(--text-muted); }

@media (max-width: 1100px) {
  .sugg-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .sugg-filters-controls { width: 100%; }
  .sugg-select { flex: 1; min-width: 0; font-size: .82rem; }
  .sugg-grid { grid-template-columns: repeat(2, 1fr); gap: .875rem; }
}
@media (max-width: 480px) {
  .sugg-grid { grid-template-columns: 1fr; }
}

.sugg-card-poster-link { display: block; width: 100%; height: 100%; }
.sugg-card-actions {
  position: absolute;
  bottom: 6px; right: 6px;
  display: flex; gap: 5px;
  opacity: 0;
  transition: opacity .2s;
}
.sugg-card:hover .sugg-card-actions { opacity: 1; }
.sugg-card-add, .sugg-card-trailer {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  text-decoration: none;
  transition: transform .15s;
}
.sugg-card-add:hover, .sugg-card-trailer:hover { transform: scale(1.1); }
.sugg-card-add     { background: var(--primary); color: #fff; }
.sugg-card-trailer { background: #e53e3e; color: #fff; }

/* ══ Actus v2 — grille style suggestions ═════════════════════════════════════ */
.actus-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.actu-card2 {
  border-radius: 10px;
  background: var(--bg2);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.actu-card2:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.4); }

/* Poster */
.actu-card2-poster {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--bg3);
}
.actu-card2-poster-link { display: block; width: 100%; height: 100%; }
.actu-card2-poster img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform .3s;
}
.actu-card2:hover .actu-card2-poster img { transform: scale(1.04); }

/* Overlay qui + date */
.actu-card2-who {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: .4rem;
  padding: .5rem .6rem;
  background: linear-gradient(to bottom, rgba(0,0,0,.75) 0%, transparent 100%);
}
.actu-card2-avatar {
  width: 24px; height: 24px; min-width: 24px; max-width: 24px;
  border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,.4);
  display: block;
}
.actu-card2-initial {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: .65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.actu-card2-who-name {
  font-size: .72rem; font-weight: 700; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.actu-card2-date {
  font-size: .65rem; color: rgba(255,255,255,.65);
  margin-left: auto; flex-shrink: 0;
  white-space: nowrap;
}

/* Note */
.actu-card2-note {
  position: absolute;
  bottom: 10px; left: 10px;
  background: rgba(0,0,0,.88);
  color: #EF9F27;
  font-size: 1.1rem; font-weight: 900;
  padding: 4px 10px; border-radius: 7px;
}

/* Statut */
.actu-card2-statut {
  position: absolute;
  bottom: 10px; right: 10px;
  font-size: .65rem; font-weight: 700;
  padding: 3px 7px; border-radius: 5px;
  color: #fff; background: rgba(0,0,0,.6);
}

/* Actions au survol */
.actu-card2-actions {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  opacity: 0; transition: opacity .2s;
}
.actu-card2:hover .actu-card2-actions { opacity: 1; }
.actu-card2-btn-add {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  transition: transform .15s;
}
.actu-card2-btn-add:hover { transform: scale(1.1); }

/* Corps */
.actu-card2-body { padding: .65rem .75rem .75rem; }
.actu-card2-meta {
  display: flex; align-items: center;
  justify-content: space-between; gap: .4rem;
  margin-bottom: .4rem;
}
.actu-card2-genres { display: flex; flex-wrap: wrap; gap: .25rem; flex: 1; min-width: 0; }
.actu-card2-genre {
  font-size: .72rem; background: var(--bg3);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 6px; color: var(--text-muted); white-space: nowrap;
}
.actu-card2-year {
  font-size: .78rem; color: var(--text-muted);
  font-weight: 600; white-space: nowrap; flex-shrink: 0;
}
.actu-card2-title {
  font-size: 1rem; font-weight: 700; color: var(--text);
  text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4;
}
.actu-card2-title:hover { color: var(--primary); }
.actu-card2-comment {
  font-size: .75rem; color: var(--text-muted);
  font-style: italic; margin-top: .3rem;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

@media (max-width: 1100px) { .actus-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .actus-grid { grid-template-columns: repeat(2, 1fr); gap: .875rem; } }
@media (max-width: 480px)  { .actus-grid { grid-template-columns: 1fr; } }

/* ══ Media Grid v2 (Films/Séries/Livres/Jeux) ════════════════════════════════ */
.media-grid2 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding: 1rem 0;
}

.media-card2 {
  border-radius: 10px;
  background: var(--bg2);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.media-card2:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.4); }

.media-card2-poster {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--bg3);
}
.media-card2-poster-link { display: block; width: 100%; height: 100%; }
.media-card2-poster img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform .3s;
}
.media-card2:hover .media-card2-poster img { transform: scale(1.04); }

.media-card2-note {
  position: absolute;
  bottom: 10px; left: 10px;
  background: rgba(0,0,0,.88);
  color: #EF9F27;
  font-size: 1.35rem; font-weight: 900;
  padding: 5px 12px; border-radius: 8px;
  letter-spacing: .02em; line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

.media-card2-statut {
  position: absolute;
  bottom: 10px; right: 10px;
  font-size: .8rem; font-weight: 700;
  padding: 4px 9px; border-radius: 6px;
  color: #fff; background: rgba(0,0,0,.7);
}

.media-card2-actions {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  opacity: 0; transition: opacity .2s;
}
.media-card2:hover .media-card2-actions { opacity: 1; }
.media-card2-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  transition: transform .15s;
}
.media-card2-btn:hover { transform: scale(1.1); }

.media-card2-new-season {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: linear-gradient(135deg, #e53e3e, #c0392b);
  color: #fff;
  font-size: .82rem; font-weight: 800;
  padding: 6px 10px;
  text-align: center;
  letter-spacing: .03em;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
  z-index: 2;
  animation: pulse-season 2s ease-in-out infinite;
}
@keyframes pulse-season {
  0%, 100% { opacity: 1; }
  50%       { opacity: .8; }
}

.media-card2-body { padding: .65rem .75rem .75rem; }
.media-card2-meta {
  display: flex; align-items: center;
  justify-content: space-between; gap: .4rem;
  margin-bottom: .4rem;
}
.media-card2-genres { display: flex; flex-wrap: wrap; gap: .25rem; flex: 1; min-width: 0; }
.media-card2-genre {
  font-size: .75rem; background: var(--bg3);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 7px; color: var(--text-muted); white-space: nowrap;
}
.media-card2-year {
  font-size: .82rem; color: var(--text-muted);
  font-weight: 600; white-space: nowrap; flex-shrink: 0;
}
.media-card2-title {
  font-size: 1rem; font-weight: 700; color: var(--text);
  text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4;
}
.media-card2-title:hover { color: var(--primary); }
.media-card2-serie {
  display: flex; gap: .4rem; align-items: center;
  margin-top: .3rem; font-size: .75rem; color: var(--text-muted);
}

@media (max-width: 1100px) { .media-grid2 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .media-grid2 { grid-template-columns: repeat(2, 1fr); gap: .875rem; } }
@media (max-width: 480px)  { .media-grid2 { grid-template-columns: 1fr; } }

/* Badge Film/Série sur les cards */
.actu-card2-type {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: .75rem; font-weight: 700;
  padding: 3px 8px; border-radius: 5px;
  backdrop-filter: blur(4px);
}
.sugg-card-type {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: .82rem;
  padding: 4px 7px; border-radius: 5px;
  backdrop-filter: blur(4px);
}

.actu-card2-btn-owned {
  width: 40px; height: 40px; border-radius: 50%;
  background: #1D9E75; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  cursor: default;
}

/* ══ Social : Likes et commentaires ════════════════════════════════════════ */
.actu-social { border-top: 1px solid var(--border); }

.actu-social-bar {
  display: flex; gap: .5rem;
  padding: .5rem .75rem;
}
.actu-like-btn, .actu-comment-toggle {
  display: flex; align-items: center; gap: .35rem;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: .82rem;
  padding: .3rem .6rem; border-radius: 6px;
  transition: background .15s, color .15s;
}
.actu-like-btn:hover, .actu-comment-toggle:hover { background: var(--bg3); color: var(--text); }
.actu-like-btn.liked { color: #e53e3e; }
.actu-like-btn.liked i { color: #e53e3e; }
.actu-like-btn i, .actu-comment-toggle i { font-size: 1rem; }

.actu-comments-block {
  border-top: 1px solid var(--border);
  padding: .75rem;
}
.actu-comments-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .75rem; }
.no-comments { font-size: .8rem; color: var(--text-muted); margin: 0; }

.actu-comment {
  display: flex; gap: .6rem; align-items: flex-start;
}
.actu-comment-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.actu-comment-body { flex: 1; min-width: 0; }
.actu-comment-who { font-size: .78rem; font-weight: 700; color: var(--text); margin-right: .4rem; }
.actu-comment-date { font-size: .7rem; color: var(--text-muted); }
.actu-comment-text { font-size: .82rem; color: var(--text); margin: .2rem 0 0; }
.actu-comment-del {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: .75rem;
  padding: 2px 5px; border-radius: 4px; flex-shrink: 0;
  opacity: 0; transition: opacity .15s;
}
.actu-comment:hover .actu-comment-del { opacity: 1; }
.actu-comment-del:hover { background: var(--bg3); color: #e53e3e; }

.actu-comment-form {
  display: flex; gap: .5rem; align-items: center;
}
.actu-comment-input {
  flex: 1; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; padding: .4rem .875rem;
  font-size: .82rem; color: var(--text);
}
.actu-comment-input:focus { outline: none; border-color: var(--primary); }

/* ── Social sur fiche detail ────────────────────────────────────────────── */
.detail-social {
  max-width: 800px;
  margin: 1.5rem auto 0;
  background: var(--bg2);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
}
.detail-social-bar {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}
.detail-comments-list {
  display: flex; flex-direction: column; gap: .75rem;
  margin-bottom: .75rem;
}

/* Like sur commentaire */
.comment-like-btn {
  display: inline-flex; align-items: center; gap: .25rem;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: .75rem;
  padding: 2px 5px; border-radius: 4px;
  transition: color .15s;
  margin-top: .25rem;
}
.comment-like-btn:hover { color: #e53e3e; }
.comment-like-btn.liked { color: #e53e3e; }
.comment-like-btn i { font-size: .85rem; }
.actu-comment-body-footer { margin-top: .15rem; }

/* ══ Stats page ════════════════════════════════════════════════════════════ */
.stats-page { max-width: 1400px; margin: 0 auto; padding: 0 1rem 3rem; }
.stats-header { padding: 1.5rem 0 1rem; }
.stats-header h1 { font-size: 1.6rem; font-weight: 800; margin: 0 0 .25rem; }
.stats-subtitle { color: var(--text-muted); font-size: .88rem; margin: 0; }

.stats-hero {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stats-hero-card {
  background: var(--bg2);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: transform .2s;
}
.stats-hero-card:hover { transform: translateY(-2px); }
.stats-hero-icon { font-size: 1.75rem; margin-bottom: .5rem; }
.stats-hero-val  { font-size: 2rem; font-weight: 900; color: var(--primary); line-height: 1; }
.stats-hero-label{ font-size: .82rem; font-weight: 600; color: var(--text); margin: .25rem 0 .2rem; }
.stats-hero-sub  { font-size: .72rem; color: var(--text-muted); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.stats-card {
  background: var(--bg2);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 1.25rem;
}
.stats-card h3 { font-size: 1rem; font-weight: 700; margin: 0 0 1rem; }
.stats-card-wide { grid-column: 1 / -1; }

.stats-top-list { display: flex; flex-direction: column; gap: .5rem; }
.stats-top-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .4rem .5rem; border-radius: 8px;
  background: var(--bg3);
}
.stats-top-rank  { font-size: .75rem; font-weight: 800; color: var(--text-muted); min-width: 18px; }
.stats-top-name  { flex: 1; font-size: .85rem; font-weight: 500; color: var(--text); }
.stats-top-count { font-size: .75rem; color: var(--text-muted); }
.stats-top-note  { font-size: .75rem; color: #EF9F27; font-weight: 700; }

@media (max-width: 1100px) { .stats-hero { grid-template-columns: repeat(3, 1fr); } .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .stats-hero { grid-template-columns: repeat(2, 1fr); } .stats-grid { grid-template-columns: 1fr; } }

.stats-top-link {
  text-decoration: none;
  transition: background .15s, transform .15s;
  cursor: pointer;
}
.stats-top-link:hover { background: var(--primary); transform: translateX(3px); }
.stats-top-link:hover .stats-top-name,
.stats-top-link:hover .stats-top-count,
.stats-top-link:hover .stats-top-rank { color: #fff; }

/* Curseur pointer sur les graphiques cliquables */
#chart-genres, #chart-notes, #chart-decades { cursor: pointer; }