/* ==========================================================================
   MyPornRead — styles.css
   Refonte premium · mêmes couleurs · mêmes tokens · mêmes sélecteurs
   Thème sombre uniquement. Aucun autre fichier à modifier.

   Sommaire
   01. Tokens & base
   02. Header
   03. Composants communs (boutons, chips, sections, états vides)
   04. Hero
   05. Cartes & grille catalogue
   06. Catalogue (browse, filtres, pagination) + admin
   07. Fiche galerie
   08. Lecteur
   09. Footer
   10. Modales, sync, age gate, toast
   11. Skeleton & scrollbar
   12. Responsive général
   13. Branding lecteur, langues, votes, recherche
   14. Mode privé, library hors-ligne
   15. Pages d'index (entités)
   16. Admin takedown
   17. Emplacements pub (preview + slots)
   ========================================================================== */

/* -------------------------------------------------------------------------- */
/* 01. Tokens & base                                                          */
/* -------------------------------------------------------------------------- */

:root {
  --bg: #090b10;
  --bg-soft: #0d1016;
  --panel: #11151d;
  --panel-2: #161b25;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f1f4f9;
  --muted: #8d97a8;
  --muted-2: #626d80;
  --accent: #ff4d5a;
  --accent-2: #ff7d86;
  --accent-soft: rgba(255, 77, 90, 0.13);
  --gold: #f0b35b;
  --ok: #4ade80;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --display: "Segoe UI Variable Display", "Bahnschrift", "Segoe UI", system-ui, sans-serif;

  /* Ajouts (n'écrasent aucun token existant) */
  --line-soft: rgba(255, 255, 255, 0.05);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.34);
  --ring: 0 0 0 3px rgba(255, 77, 90, 0.26);
  --inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(255, 77, 90, 0.38);
  color: #fff;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 720px at 78% -18%, rgba(255, 77, 90, 0.1), transparent 62%),
    radial-gradient(900px 600px at -4% 6%, rgba(240, 179, 91, 0.045), transparent 56%),
    radial-gradient(800px 500px at 50% 120%, rgba(255, 77, 90, 0.04), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 14px/1.6 var(--font);
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-reading {
  overflow: hidden;
  background: #040506;
}

body.is-reading .site-header,
body.is-reading .site-footer {
  display: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 6px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* -------------------------------------------------------------------------- */
/* 02. Header                                                                 */
/* -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13, 16, 22, 0.9), rgba(9, 11, 16, 0.82));
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 4%, rgba(255, 77, 90, 0.5) 50%, transparent 96%);
  opacity: 0.55;
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(1440px, calc(100% - 48px));
  height: 74px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.logo-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(145deg, #ff6b76 0%, #ff4d5a 45%, #c81e2c 100%);
  color: #fff;
  font: 800 17px/1 var(--display);
  letter-spacing: -0.04em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -6px 12px rgba(120, 8, 20, 0.35),
    0 10px 26px rgba(255, 77, 90, 0.32);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.logo:hover .logo-mark {
  transform: rotate(-4deg) scale(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -6px 12px rgba(120, 8, 20, 0.35),
    0 14px 32px rgba(255, 77, 90, 0.42);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text strong {
  font: 800 20px/1 var(--display);
  letter-spacing: 0.01em;
}

.logo-text small {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.main-nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: color 0.18s, background 0.18s;
}

.main-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.main-nav a.is-active {
  color: #fff;
  background: var(--accent-soft);
}

.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 77, 90, 0.8);
  transform: translateX(-50%);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1 1 280px;
  max-width: 420px;
  height: 40px;
  margin-left: auto;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--inner-light);
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.header-search:hover {
  border-color: var(--line-strong);
}

.header-search:focus-within {
  border-color: rgba(255, 77, 90, 0.55);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--ring);
}

.header-search .icon {
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  transition: color 0.18s;
}

.header-search:focus-within .icon {
  color: var(--accent-2);
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.header-search input::placeholder {
  color: var(--muted-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.header-icon-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  transition: color 0.18s, background 0.18s, transform 0.18s var(--ease);
}

.header-icon-link:hover,
.header-icon-link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.header-icon-link:active {
  transform: scale(0.94);
}

.favorites-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 800 9px/13px var(--font);
  text-align: center;
  box-sizing: content-box;
}

.private-badge {
  display: inline-block;
  margin: 0 0 5px 4px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 77, 90, 0.5);
  border-radius: 999px;
  color: #ff9aa2;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.quality-select {
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}

.quality-select:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.quality-select:focus-visible {
  border-color: rgba(255, 77, 90, 0.55);
  box-shadow: var(--ring);
}

/* -------------------------------------------------------------------------- */
/* 03. Composants communs                                                     */
/* -------------------------------------------------------------------------- */

.app-shell {
  width: min(1440px, calc(100% - 48px));
  min-height: calc(100vh - 74px - 190px);
  margin: 0 auto;
  padding: 34px 0 90px;
}

.page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 50vh;
  color: var(--muted-2);
  font-size: 12px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fade-up {
  from {
    transform: translateY(10px);
  }
  to {
    transform: translateY(0);
  }
}

.fade-up {
  /* Pas d'opacité animée : le contenu reste visible même si le navigateur
     retarde l'animation (onglet en arrière-plan, thread occupé par les images). */
  animation: fade-up 0.35s var(--ease) both;
}

@media (prefers-reduced-motion: reduce) {
  .fade-up {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0.005em;
  white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(180deg, #ff6470 0%, #ff4d5a 48%, #e02b38 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 10px 26px rgba(255, 77, 90, 0.26);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #ff7680 0%, #ff5663 48%, #ec3542 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 14px 32px rgba(255, 77, 90, 0.36);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  box-shadow: var(--inner-light);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.07);
}

.btn.is-favorite {
  border-color: rgba(255, 77, 90, 0.45);
  background: rgba(255, 77, 90, 0.12);
  color: var(--accent-2);
}

.btn-small {
  height: 33px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 11.5px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  transition: border-color 0.18s, color 0.18s, background 0.18s, transform 0.18s var(--ease);
}

a.chip:hover {
  border-color: rgba(255, 77, 90, 0.45);
  background: rgba(255, 77, 90, 0.08);
  color: var(--accent-2);
  transform: translateY(-1px);
}

.tag-mini {
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.section {
  margin-top: 62px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2 {
  position: relative;
  margin: 0;
  padding-left: 16px;
  font: 750 23px/1.2 var(--display);
  letter-spacing: -0.035em;
}

.section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 14px rgba(255, 77, 90, 0.55);
  transform: translateY(-50%);
}

.section-head p {
  margin: 5px 0 0;
  padding-left: 16px;
  color: var(--muted-2);
  font-size: 12px;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 0.18s, background 0.18s;
}

.section-link:hover {
  background: var(--accent-soft);
  color: var(--accent-2);
}

.empty-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 280px;
  padding: 44px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(420px 220px at 50% 0%, rgba(255, 77, 90, 0.06), transparent 70%),
    rgba(255, 255, 255, 0.012);
  color: var(--muted-2);
  text-align: center;
}

.empty-state h2,
.error-state h2 {
  margin: 0;
  color: var(--text);
  font: 750 20px/1.2 var(--display);
  letter-spacing: -0.02em;
}

.empty-state p,
.error-state p {
  max-width: 460px;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
}

/* -------------------------------------------------------------------------- */
/* 04. Hero                                                                   */
/* -------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 490px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.hero.no-cover .hero-bg {
  background:
    radial-gradient(800px 500px at 70% 20%, rgba(255, 77, 90, 0.2), transparent 65%),
    radial-gradient(500px 360px at 10% 90%, rgba(240, 179, 91, 0.06), transparent 70%),
    linear-gradient(135deg, #1b1117, #0d1117 55%, #111721);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: #10141c;
  background-position: center 24%;
  background-size: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.99) 0%, rgba(7, 9, 13, 0.92) 28%, rgba(7, 9, 13, 0.42) 62%, rgba(7, 9, 13, 0.06) 100%),
    linear-gradient(0deg, rgba(7, 9, 13, 0.97) 0%, rgba(7, 9, 13, 0.4) 30%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(620px, 62%);
  padding: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  padding: 5px 11px 5px 9px;
  border: 1px solid rgba(255, 77, 90, 0.3);
  border-radius: 999px;
  background: rgba(255, 77, 90, 0.1);
  color: var(--accent-2);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.hero-title {
  margin: 0 0 18px;
  font: 800 clamp(34px, 4.4vw, 60px)/1.02 var(--display);
  letter-spacing: -0.048em;
  text-wrap: balance;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
}

.hero-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-2);
}

.hero-content .chips {
  margin-bottom: 26px;
}

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

.hero-side {
  position: absolute;
  right: 34px;
  bottom: 34px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.hero-cover-note {
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(5, 7, 10, 0.64);
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* -------------------------------------------------------------------------- */
/* 05. Cartes & grille catalogue                                              */
/* -------------------------------------------------------------------------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 22px 18px;
}

.card {
  position: relative;
  min-width: 0;
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, #171c26, #0c0f15);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.card:hover .card-cover {
  transform: translateY(-5px);
  border-color: rgba(255, 77, 90, 0.5);
  box-shadow:
    0 22px 44px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 77, 90, 0.22),
    0 10px 40px rgba(255, 77, 90, 0.18);
}

.card-cover img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), opacity 0.3s;
}

.card:hover .card-cover img {
  transform: scale(1.045);
}

.card-cover.is-broken img {
  display: none;
}

.card-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  background:
    radial-gradient(300px 240px at 50% 30%, rgba(255, 77, 90, 0.1), transparent 70%),
    linear-gradient(150deg, #171d27, #0b0e14);
  color: rgba(255, 255, 255, 0.16);
  font: 800 42px/1 var(--display);
  text-align: center;
}

.card-cover.is-broken .card-fallback {
  display: grid;
}

.card-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(0deg, rgba(4, 6, 9, 0.9) 0%, rgba(4, 6, 9, 0.3) 28%, transparent 52%);
  opacity: 0.85;
  transition: opacity 0.22s;
}

.card:hover .card-shade {
  opacity: 1;
}

.card-hover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  opacity: 0;
  background: rgba(5, 7, 10, 0.22);
  transition: opacity 0.22s;
}

.card:hover .card-hover {
  opacity: 1;
}

.card-play {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 77, 90, 0.88);
  color: #fff;
  box-shadow: 0 12px 30px rgba(255, 77, 90, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: scale(0.88);
  transition: transform 0.28s var(--ease);
}

.card:hover .card-play {
  transform: scale(1);
}

.card-play .icon {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}

.card-pages {
  position: absolute;
  left: 9px;
  bottom: 9px;
  z-index: 4;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(6, 8, 12, 0.78);
  color: rgba(255, 255, 255, 0.86);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.card-source {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 4;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.card-source.is-imh {
  background: rgba(255, 77, 90, 0.92);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 77, 90, 0.3);
}

.card-source.is-m34 {
  background: rgba(9, 11, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.72);
}

.card-meta {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s;
}

.card-meta a:hover {
  color: var(--accent-2);
}

.card-progress {
  position: absolute;
  right: 9px;
  bottom: 9px;
  z-index: 4;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(255, 77, 90, 0.92);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 77, 90, 0.3);
}

.card-fav {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(8, 10, 14, 0.66);
  color: rgba(255, 255, 255, 0.82);
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.18s, transform 0.18s var(--ease), background 0.18s, color 0.18s;
}

.card:hover .card-fav,
.card-fav.is-active {
  opacity: 1;
  transform: scale(1);
}

.card-fav:hover {
  background: rgba(255, 77, 90, 0.3);
  color: #fff;
}

.card-fav.is-active {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 77, 90, 0.4);
}

.card-fav .icon {
  width: 14px;
  height: 14px;
}

.card-body {
  padding: 11px 3px 0;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.38;
  letter-spacing: -0.012em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.18s;
}

.card-title:hover {
  color: var(--accent-2);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  overflow: hidden;
  max-height: 16px;
}

/* -------------------------------------------------------------------------- */
/* 06. Catalogue (browse, filtres, pagination) + panneaux admin               */
/* -------------------------------------------------------------------------- */

.browse-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.browse-head h1 {
  margin: 0;
  font: 800 clamp(28px, 3vw, 42px)/1.1 var(--display);
  letter-spacing: -0.045em;
}

.browse-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.browse-head p strong {
  color: var(--text);
}

.poc-banner {
  margin-bottom: 22px;
  padding: 15px 18px;
  border: 1px solid rgba(255, 77, 90, 0.3);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(255, 77, 90, 0.1), rgba(255, 77, 90, 0.04));
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.poc-banner strong {
  color: var(--accent-2);
}

.admin-steps {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.9;
}

.admin-steps a {
  color: var(--accent-2);
}

.admin-steps code {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

#admin-json {
  width: 100%;
  min-height: 180px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: rgba(0, 0, 0, 0.26);
  color: var(--text);
  font: 11.5px/1.65 Consolas, "SFMono-Regular", monospace;
  resize: vertical;
  transition: border-color 0.18s, box-shadow 0.18s;
}

#admin-json:focus {
  border-color: rgba(255, 77, 90, 0.55);
  box-shadow: var(--ring);
}

.admin-status {
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px dashed var(--line);
  border-radius: 11px;
  color: var(--muted);
  font-size: 12px;
  white-space: pre-wrap;
}

.admin-status.is-error {
  border-color: rgba(239, 68, 68, 0.4);
  color: #ff9b9b;
}

.admin-status.is-ok {
  border-color: rgba(34, 197, 94, 0.35);
  color: #8fe3ac;
}

.admin-field {
  margin-top: 16px;
}

.admin-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-field input[type="file"] {
  width: 100%;
  padding: 11px 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--muted);
  font-size: 12px;
}

.admin-field input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 6px 13px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.admin-field small {
  display: block;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 11px;
}

.admin-field small code {
  color: var(--text);
}

.index-card h2 {
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.index-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.index-head p {
  max-width: 70ch;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.index-badge {
  flex: 0 0 auto;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.index-badge[data-state="running"] {
  border-color: rgba(34, 197, 94, 0.45);
  color: #8fe3ac;
}

.index-badge[data-state="paused"],
.index-badge[data-state="stale"] {
  border-color: rgba(250, 204, 21, 0.4);
  color: #f3d27a;
}

.index-badge[data-state="done"] {
  border-color: rgba(255, 77, 90, 0.45);
  color: #ff9b9b;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.index-grid > div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: var(--inner-light);
}

.index-grid span {
  display: block;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.index-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.index-progress {
  height: 8px;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

#index-progress-bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(255, 77, 90, 0.5);
  transition: width 0.4s ease;
}

.index-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}

.index-target {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.index-target span {
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.index-target input {
  width: 140px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font: 13px/1.2 inherit;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.index-target input:focus {
  border-color: rgba(255, 77, 90, 0.55);
  box-shadow: var(--ring);
}

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  box-shadow: var(--inner-light), var(--shadow-sm);
}

.filters-bar form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 240px;
  min-width: 200px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.24);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.filters-bar form:focus-within {
  border-color: rgba(255, 77, 90, 0.55);
  box-shadow: var(--ring);
}

.filters-bar input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12.5px;
}

.filters-bar input::placeholder {
  color: var(--muted-2);
}

.filters-bar select {
  height: 38px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  transition: border-color 0.18s, color 0.18s;
}

.filters-bar select:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.filters-bar select:focus-visible {
  border-color: rgba(255, 77, 90, 0.55);
  box-shadow: var(--ring);
}

.filter-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 31px;
  padding: 0 6px 0 11px;
  border: 1px solid rgba(255, 77, 90, 0.32);
  border-radius: 999px;
  background: rgba(255, 77, 90, 0.1);
  color: var(--accent-2);
  font-size: 10.5px;
  font-weight: 700;
}

.filter-active button,
.filter-active a {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  color: inherit;
  font-size: 11px;
  line-height: 1;
  text-decoration: none;
  transition: background 0.15s;
}

.filter-active button:hover,
.filter-active a:hover {
  background: rgba(255, 255, 255, 0.18);
}

.quick-tags {
  margin-bottom: 24px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 44px;
}

.browse-sentinel {
  display: flex;
  justify-content: center;
  padding: 28px 0 0;
}

.browse-sentinel .btn {
  min-width: 180px;
}

.pagination a,
.pagination span {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  transition: border-color 0.18s, color 0.18s, background 0.18s, transform 0.15s var(--ease);
}

.pagination a:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  transform: translateY(-1px);
}

.pagination .is-current {
  border-color: rgba(255, 77, 90, 0.5);
  background: var(--accent-soft);
  color: var(--accent-2);
  box-shadow: 0 6px 16px rgba(255, 77, 90, 0.14);
}

.pagination .is-disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* -------------------------------------------------------------------------- */
/* 07. Fiche galerie                                                          */
/* -------------------------------------------------------------------------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  color: var(--muted-2);
  font-size: 11px;
}

.breadcrumb a {
  transition: color 0.18s;
}

.breadcrumb a:hover {
  color: var(--accent-2);
}

.breadcrumb .sep {
  opacity: 0.5;
}

.gallery-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.gallery-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow), 0 0 60px rgba(255, 77, 90, 0.07);
}

.gallery-cover img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-cover.is-broken img {
  display: none;
}

.gallery-info {
  padding-top: 8px;
}

.gallery-info h1 {
  margin: 0 0 16px;
  font: 800 clamp(30px, 3.5vw, 50px)/1.05 var(--display);
  letter-spacing: -0.048em;
  text-wrap: balance;
}

.gallery-source-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.gallery-source {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.gallery-source.is-imh {
  background: rgba(255, 77, 90, 0.92);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 77, 90, 0.28);
}

.gallery-source.is-m34 {
  border: 1px solid var(--line-strong);
  color: var(--muted);
}

.gallery-source-id {
  color: var(--muted-2);
  font-size: 9.5px;
}

.gallery-subtitle {
  margin: -8px 0 14px;
  color: var(--muted);
  font-size: 13.5px;
}

.gallery-entities {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0 0 22px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  box-shadow: var(--inner-light);
}

.gallery-entity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.gallery-entity > span {
  width: 82px;
  flex: 0 0 auto;
  padding-top: 5px;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-entity .chips {
  margin: 0;
}

.gallery-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.gallery-sources > span {
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-link {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.source-link:hover {
  border-color: rgba(255, 77, 90, 0.4);
  background: rgba(255, 77, 90, 0.07);
  color: var(--accent-2);
}

.gallery-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
}

.gallery-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-2);
}

.gallery-info .chips {
  margin-bottom: 26px;
}

.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.gallery-note {
  max-width: 650px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
}

.gallery-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.gallery-stat span {
  display: block;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gallery-stat strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  transition: border-color 0.18s, color 0.18s, background 0.18s, transform 0.15s var(--ease);
}

.tag-pill:hover {
  border-color: rgba(255, 77, 90, 0.42);
  background: rgba(255, 77, 90, 0.08);
  color: var(--text);
  transform: translateY(-1px);
}

.tag-pill .count {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 700;
  text-align: center;
}

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

.category-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    radial-gradient(240px 120px at 0% 0%, rgba(255, 77, 90, 0.07), transparent 70%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  box-shadow: var(--inner-light);
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 77, 90, 0.42);
  box-shadow: var(--shadow-sm), var(--inner-light);
}

.category-card strong {
  display: block;
  font-size: 13.5px;
  letter-spacing: -0.01em;
}

.category-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11px;
}

/* -------------------------------------------------------------------------- */
/* 08. Lecteur                                                                */
/* -------------------------------------------------------------------------- */

.reader {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(255, 255, 255, 0.05), transparent 60%),
    radial-gradient(700px 400px at 50% 110%, rgba(255, 77, 90, 0.04), transparent 65%),
    #040506;
}

.reader:fullscreen {
  background: #040506;
}

.reader-bar {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 62px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(5, 6, 8, 0.82);
  backdrop-filter: blur(14px);
  flex: 0 0 auto;
}

.reader-bar-left,
.reader-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.reader-bar-left {
  flex: 1;
}

.reader-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: linear-gradient(180deg, #ff6470, var(--accent));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 16px rgba(255, 77, 90, 0.22);
  transition: background 0.18s, transform 0.15s var(--ease);
}

.reader-back span {
  line-height: 1;
}

.reader-back:hover {
  background: linear-gradient(180deg, #ff8089, var(--accent-2));
  border-color: var(--accent-2);
  color: #fff;
  transform: translateY(-1px);
}

.reader-pager {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.reader-pager-btn {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}

.reader-pager-btn:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
}

.reader-pager .reader-counter {
  border: 0;
  padding: 0 7px;
}

.lecture-item {
  position: relative;
  min-width: 0;
}

.lecture-remove {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(8, 10, 14, 0.78);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}

.lecture-item:hover .lecture-remove,
.lecture-remove:focus-visible {
  opacity: 1;
}

.lecture-remove:hover {
  background: rgba(255, 77, 90, 0.92);
}

.reader-info {
  min-width: 0;
}

.reader-info strong {
  display: block;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-info span {
  display: block;
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
}

.reader-counter {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.reader-source {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  font-weight: 600;
  transition: color 0.18s, background 0.18s;
}

.reader-source:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.reader-quality {
  padding: 6px 11px;
  border: 1px solid rgba(255, 77, 90, 0.55);
  border-radius: 999px;
  background: rgba(255, 77, 90, 0.18);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s;
}

.reader-quality:hover {
  background: rgba(255, 77, 90, 0.32);
  border-color: rgba(255, 77, 90, 0.8);
  color: #fff;
}

.reader-quality-wrap {
  position: relative;
}

.reader-quality-prefix {
  margin-right: 4px;
  color: rgba(255, 255, 255, 0.58);
  font-weight: 500;
}

.reader-quality-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 170px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #0d1118;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.6);
}

.reader-quality-menu-label {
  display: block;
  padding: 7px 9px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reader-quality-menu button {
  display: block;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff !important;
  text-align: left;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.reader-quality-menu button:hover,
.reader-quality-menu button.is-current {
  background: rgba(255, 77, 90, 0.2);
  color: #fff;
}

/* Scène : l'image reste TOUJOURS centrée, les pubs vivent dans la gouttière */
.reader-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
  padding: 18px 78px;
  overflow: hidden;
}

.reader-image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.reader-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
  opacity: 0;
  transition: opacity 0.18s;
}

.reader-image.is-loaded {
  opacity: 1;
}

.reader-image.is-error {
  display: none;
}

.reader-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.reader-loader .spinner {
  width: 28px;
  height: 28px;
  border-top-color: rgba(255, 255, 255, 0.65);
}

.reader-error {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 36px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.reader-error.is-visible {
  display: flex;
}

.reader-nav {
  position: absolute;
  top: 50%;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 26px rgba(255, 77, 90, 0.3);
  transform: translateY(-50%);
  transition: background 0.18s, opacity 0.2s ease, transform 0.18s var(--ease), box-shadow 0.18s;
}

.reader-nav:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
  transform: translateY(-50%) scale(1.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 14px 32px rgba(255, 77, 90, 0.42);
}

.reader-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.reader-nav.is-prev {
  left: 18px;
}

.reader-nav.is-next {
  right: 18px;
}

.reader-nav:disabled {
  opacity: 0.2;
  pointer-events: none;
}

.reader-bottom {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  height: auto;
  padding: 10px 18px 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(5, 6, 8, 0.78);
  flex: 0 0 auto;
}

.reader-bottom .reader-pager {
  justify-content: center;
  align-self: center;
  padding: 3px;
}

.reader-progress {
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.reader-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff4d5a, #ff9a63);
  box-shadow: 0 0 10px rgba(255, 77, 90, 0.55);
  transition: width 0.2s ease;
}

.reader-bottom-text {
  display: none;
  color: rgba(255, 255, 255, 0.36);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}

.reader-end {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(4, 5, 7, 0.94);
  text-align: center;
}

.reader-end[hidden] {
  display: none;
}

.reader-end h2 {
  margin: 0;
  font: 800 32px/1.1 var(--display);
  letter-spacing: -0.045em;
}

.reader-end p {
  margin: 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 12.5px;
}

.reader-end-actions {
  display: flex;
  gap: 9px;
  margin-top: 6px;
}

.reader-bar,
.reader-bottom,
.reader-nav {
  transition-property: opacity, background, transform, box-shadow;
  transition-duration: 0.2s;
}

body.reader-ui-hidden .reader-bar,
body.reader-ui-hidden .reader-bottom,
body.reader-ui-hidden .reader-nav {
  opacity: 0;
  pointer-events: none;
}

/* Planches très hautes : largeur ajustée, défilement dans la scène */
.reader-stage.is-tall {
  align-items: flex-start;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.reader-stage.is-tall .reader-image-wrap {
  height: auto;
  min-height: 0;
  overflow: visible;
}

.reader-stage.is-tall .reader-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: none;
}

.reader-stage.is-tall .reader-nav {
  position: fixed;
  top: 45%;
}

/* -------------------------------------------------------------------------- */
/* 09. Footer                                                                 */
/* -------------------------------------------------------------------------- */

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(700px 240px at 15% 0%, rgba(255, 77, 90, 0.09), transparent 70%),
    #070a0f;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 40px;
}

.footer-inner strong {
  font: 800 13px/1 var(--display);
  letter-spacing: 0.12em;
}

.footer-inner p {
  max-width: 460px;
  margin: 8px 0 0;
  color: var(--muted-2);
  font-size: 11px;
}

.footer-links {
  margin-left: 10px;
}

.footer-links a {
  color: var(--muted-2);
  text-decoration: none;
  transition: color 0.18s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 330px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.6;
}

.age-dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 77, 90, 0.35);
  border-radius: 50%;
  color: var(--accent-2);
  font-size: 8px;
  font-weight: 800;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(140px, 1fr));
  gap: 36px;
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 52px 0 40px;
}

.footer-brand > strong {
  display: block;
  margin-bottom: 12px;
  font: 800 24px/1 var(--display);
  letter-spacing: -0.015em;
}

.footer-brand p {
  max-width: 38ch;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-col > strong {
  margin-bottom: 4px;
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-col a {
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: none;
  transition: color 0.18s, transform 0.18s var(--ease);
}

.footer-col a:hover {
  color: var(--accent-2);
  transform: translateX(2px);
}

.footer-age-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 77, 90, 0.5);
  border-radius: 50%;
  background: rgba(255, 77, 90, 0.08);
  color: #ff9aa2;
  font-size: 12px;
  font-weight: 800;
}

.footer-age p {
  margin: 0;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.7;
}

.footer-stats {
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.8;
  text-align: right;
}

.footer-stats strong {
  color: var(--muted);
  letter-spacing: 0;
}

.footer-brand .footer-stats {
  text-align: left;
}

.footer-bottom {
  padding: 18px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-align: center;
}

/* -------------------------------------------------------------------------- */
/* 10. Modales, sync, age gate, toast                                         */
/*     (fonds pleins : aucun blur plein écran)                                */
/* -------------------------------------------------------------------------- */

.modal[hidden],
.sync-overlay[hidden],
.age-gate[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 3, 5, 0.82);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background:
    radial-gradient(400px 160px at 0% 0%, rgba(255, 77, 90, 0.08), transparent 70%),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.modal-card h2 {
  margin: 0 0 8px;
  font: 800 22px/1.2 var(--display);
  letter-spacing: -0.035em;
}

.modal-text {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}

.modal-hint {
  margin: 16px 0 0;
  color: var(--muted-2);
  font-size: 10px;
}

.index-box {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.index-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.index-box-head strong {
  font-size: 13px;
}

.index-box-head span {
  color: var(--muted-2);
  font-size: 10px;
  text-align: right;
}

.index-box p {
  margin: 0 0 12px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.65;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.modal-close:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.sync-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.sync-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 13px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: border-color 0.18s, background 0.18s, color 0.18s, transform 0.15s var(--ease);
}

.sync-option:hover {
  border-color: rgba(255, 77, 90, 0.5);
  background: rgba(255, 77, 90, 0.09);
  color: var(--text);
  transform: translateY(-2px);
}

.sync-option strong {
  font: 800 20px/1 var(--display);
}

.sync-option span {
  font-size: 9.5px;
  font-weight: 600;
}

.sync-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(700px 400px at 50% 20%, rgba(255, 77, 90, 0.12), transparent 65%),
    rgba(4, 5, 7, 0.97);
}

.sync-panel {
  width: min(480px, 100%);
  text-align: center;
}

.sync-logo {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 22px;
  border-radius: 18px;
  background: linear-gradient(145deg, #ff6b76, #ff4d5a 45%, #c81e2c);
  font: 800 23px/1 var(--display);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 16px 40px rgba(255, 77, 90, 0.3);
}

.sync-panel h2 {
  margin: 0 0 8px;
  font: 800 26px/1.15 var(--display);
  letter-spacing: -0.045em;
}

.sync-panel > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12.5px;
}

.sync-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.sync-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff4d5a, #ff9a63);
  box-shadow: 0 0 12px rgba(255, 77, 90, 0.5);
  transition: width 0.3s ease;
}

.sync-stats {
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 10.5px;
  text-align: center;
}

.sync-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.sync-overlay.is-error .sync-logo {
  background: linear-gradient(145deg, #6b7280, #374151);
  box-shadow: none;
}

.sync-index {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
}

.sync-index .btn {
  flex: none;
}

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(700px 420px at 50% 10%, rgba(255, 77, 90, 0.1), transparent 65%),
    rgba(3, 4, 7, 0.97);
}

.age-card {
  width: min(480px, 100%);
  padding: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background:
    radial-gradient(420px 180px at 50% 0%, rgba(255, 77, 90, 0.09), transparent 70%),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
}

.age-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 22px;
  border: 1px solid rgba(255, 77, 90, 0.45);
  border-radius: 50%;
  background: rgba(255, 77, 90, 0.1);
  color: var(--accent-2);
  font: 800 15px/1 var(--display);
  box-shadow: 0 0 30px rgba(255, 77, 90, 0.18);
}

.age-card h2 {
  margin: 0 0 10px;
  font: 800 27px/1.15 var(--display);
  letter-spacing: -0.045em;
}

.age-card p {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
}

.age-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.age-card small {
  color: var(--muted-2);
  font-size: 9.5px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 110;
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(17, 21, 29, 0.97);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s, transform 0.2s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* -------------------------------------------------------------------------- */
/* 11. Skeleton & scrollbar                                                   */
/* -------------------------------------------------------------------------- */

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 22px 18px;
}

.skeleton-card {
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.035) 30%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.035) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  border: 2px solid var(--bg);
  border-radius: 999px;
  background: #2a3241;
}

::-webkit-scrollbar-thumb:hover {
  background: #3a4458;
}

::-webkit-scrollbar-track {
  background: transparent;
}

* {
  scrollbar-color: #2a3241 transparent;
}

/* -------------------------------------------------------------------------- */
/* 12. Responsive général                                                     */
/* -------------------------------------------------------------------------- */

@media (max-width: 1360px) {
  .header-inner {
    gap: 14px;
  }

  .main-nav a {
    padding: 8px 9px;
    font-size: 12px;
  }

  .header-search {
    flex-basis: 160px;
  }
}

@media (min-width: 901px) and (max-width: 1320px) {
  .main-nav a {
    padding: 8px 8px;
    font-size: 11.5px;
  }

  .header-search {
    max-width: 340px;
  }
}

@media (max-width: 1180px) {
  .header-inner {
    gap: 16px;
  }

  .header-search {
    max-width: 320px;
  }

  .hero-content {
    width: min(640px, 72%);
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    gap: 12px;
    padding: 12px 0;
  }

  .logo {
    order: 1;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
  }

  .header-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    margin-left: 0;
  }

  .main-nav {
    order: 4;
    display: flex;
    flex: 1 1 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .app-shell,
  .footer-inner,
  .footer-main {
    width: calc(100% - 32px);
  }

  .hero {
    min-height: 440px;
  }

  .hero-content {
    width: 100%;
    padding: 34px 26px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(7, 9, 13, 0.99) 0%, rgba(7, 9, 13, 0.8) 48%, rgba(7, 9, 13, 0.25) 100%);
  }

  .hero-side {
    display: none;
  }

  .gallery-hero {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 26px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 18px;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    padding: 36px 0 30px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-stats {
    text-align: left;
  }

  .entity-columns {
    columns: 3 190px;
  }
}

@media (max-width: 760px) {
  .index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding-top: 20px;
  }

  .cards-grid,
  .skeleton-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px 14px;
  }

  .section {
    margin-top: 46px;
  }

  .hero {
    min-height: 410px;
    border-radius: 18px;
  }

  .hero-title {
    font-size: 34px;
  }

  .gallery-hero {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .gallery-cover {
    max-width: 280px;
  }

  .browse-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .filters-bar {
    align-items: stretch;
  }

  .filters-bar form {
    flex-basis: 100%;
  }

  .reader-stage {
    padding: 10px 12px;
  }

  .reader-nav {
    width: 38px;
    height: 38px;
  }

  .reader-nav.is-prev {
    left: 6px;
  }

  .reader-nav.is-next {
    right: 6px;
  }

  .reader-source span {
    display: none;
  }

  .reader-bar {
    padding: 0 12px;
  }

  .reader-bottom {
    padding: 9px 14px 12px;
  }

  .age-card {
    padding: 26px;
  }

  .sync-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .footer-main {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) {
  .card-fav {
    opacity: 1;
    transform: none;
  }

  .card-hover {
    display: none;
  }

  .card:hover .card-cover {
    transform: none;
  }
}

/* -------------------------------------------------------------------------- */
/* 13. Branding lecteur mobile, langues, votes, recherche                     */
/* -------------------------------------------------------------------------- */

@media (max-width: 760px) {
  .reader-nav {
    display: grid;
    width: 42px;
    height: 42px;
  }

  .reader-nav.is-prev {
    left: 8px;
  }

  .reader-nav.is-next {
    right: 8px;
  }

  .reader-bottom {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .reader-info {
    display: none;
  }

  .reader-bar {
    gap: 8px;
  }

  .reader-bar-left {
    flex: 0 0 auto;
  }

  .reader-bar-right {
    margin-left: auto;
  }

  .reader-quality-prefix {
    display: inline;
    font-size: 9px;
  }

  .reader-image {
    max-height: 100%;
  }
}

.language-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 6px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 77, 90, 0.38);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 77, 90, 0.12), rgba(255, 255, 255, 0.02));
  box-shadow: var(--inner-light);
  animation: language-in 0.35s var(--ease) both;
}

.language-picker > span {
  margin-right: 4px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.language-picker .chip {
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 650;
  text-decoration: none;
  transition: transform 0.15s var(--ease), background 0.15s ease, border-color 0.15s ease;
}

.language-picker .chip:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 77, 90, 0.6);
}

.language-picker .chip.is-current {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 77, 90, 0.38);
}

@keyframes language-in {
  from {
    transform: translateY(-6px);
  }
  to {
    transform: translateY(0);
  }
}

.vote-row {
  display: flex;
  gap: 8px;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 17px;
  border: 1px solid rgba(255, 77, 90, 0.48);
  border-radius: 11px;
  background: rgba(255, 77, 90, 0.1);
  color: #ff9aa2;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.15s var(--ease), box-shadow 0.18s;
}

.vote-btn:hover,
.vote-btn.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 77, 90, 0.28);
}

.vote-btn:hover {
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  .gallery-actions .vote-row {
    width: 100%;
  }

  .gallery-actions .vote-row .vote-btn {
    flex: 1;
  }
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 420px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #0d1118;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.6);
}

.suggestion-group-label {
  padding: 8px 10px 4px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--text);
  font-size: 12.5px;
  text-decoration: none;
  transition: background 0.12s;
}

.suggestion-item:hover,
.suggestion-item.is-active {
  background: rgba(255, 77, 90, 0.17);
}

.suggestion-item small {
  margin-left: auto;
  color: var(--muted-2);
}

/* -------------------------------------------------------------------------- */
/* 14. Mode privé & library hors-ligne                                        */
/* -------------------------------------------------------------------------- */

.private-card {
  max-width: 420px;
  text-align: left;
}

.private-lock {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 77, 90, 0.48);
  border-radius: 14px;
  background: rgba(255, 77, 90, 0.12);
  font-size: 20px;
  box-shadow: 0 0 24px rgba(255, 77, 90, 0.16);
}

.private-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.private-form input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: none;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font: inherit;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.private-form input:focus {
  border-color: rgba(255, 77, 90, 0.65);
  box-shadow: var(--ring);
}

.private-error {
  margin-top: 10px;
  color: #ff9b9b;
  font-size: 12px;
}

.private-panel {
  margin: 18px 0 22px;
  padding: 18px;
  border: 1px solid rgba(255, 77, 90, 0.4);
  border-radius: 18px;
  background:
    radial-gradient(500px 180px at 10% 0%, rgba(255, 77, 90, 0.18), transparent 65%),
    rgba(10, 13, 19, 0.88);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.private-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.private-panel h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.private-panel p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.private-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.private-export {
  position: relative;
}

.private-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: 240px;
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #0d1118;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.6);
}

.private-menu-label {
  display: block;
  margin: 4px 0 5px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.segmented {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}

.segmented button {
  flex: 1;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.segmented button.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 77, 90, 0.3);
}

.private-menu .btn {
  width: 100%;
  margin-top: 4px;
}

.private-progress {
  height: 6px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.private-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px rgba(255, 77, 90, 0.5);
  transition: width 0.25s ease;
}

.private-status {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11.5px;
}

.private-status.is-ok {
  color: #8fe3ac;
}

.private-status.is-error {
  color: #ff9b9b;
}

#export-toggle.is-highlight {
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 77, 90, 0.18);
}

@media (max-width: 640px) {
  .private-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .private-actions #offline-save {
    grid-column: 1 / -1;
  }

  .private-actions #offline-clear {
    grid-column: 1;
  }

  .private-actions .private-export {
    grid-column: 2;
  }

  .private-actions:has(#offline-clear[hidden]) .private-export {
    grid-column: 1 / -1;
  }

  .private-export #export-toggle {
    width: 100%;
  }

  .private-menu {
    left: auto;
    right: 0;
    width: min(280px, calc(100vw - 48px));
  }
}

/* Header privé : visible uniquement si #private-nav n'est pas [hidden] */
.private-nav {
  position: relative;
  display: inline-flex;
}

.private-nav[hidden] {
  display: none !important;
}

.private-nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(255, 77, 90, 0.5);
  border-radius: 9px;
  background: rgba(255, 77, 90, 0.1);
  color: var(--accent-2);
  font: 700 11px/1 var(--font);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.private-nav-toggle:hover {
  background: rgba(255, 77, 90, 0.2);
  color: #fff;
}

.private-nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 9px var(--accent);
}

.private-nav-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 90;
  display: grid;
  min-width: 220px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #10141c;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.6);
}

.private-nav-menu[hidden] {
  display: none;
}

.private-nav-menu a,
.private-nav-menu button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--text);
  font: 500 12.5px/1.3 var(--font);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s;
}

.private-nav-menu a:hover,
.private-nav-menu button:hover {
  background: rgba(255, 255, 255, 0.07);
}

.private-nav-menu .is-danger {
  color: #ff7a7a;
}

.private-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  max-width: min(90vw, 420px);
  padding: 11px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #10141c;
  color: var(--text);
  font: 500 12.5px/1.4 var(--font);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s var(--ease);
}

.private-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 720px) {
  .private-nav-toggle {
    padding: 0 9px;
    font-size: 10px;
  }
}

/* Library hors-ligne */
.offline-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.offline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.offline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.offline-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  box-shadow: var(--inner-light), 0 6px 18px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}

.offline-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 77, 90, 0.42);
  box-shadow: var(--inner-light), 0 20px 40px rgba(0, 0, 0, 0.42);
}

.offline-cover {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(145deg, #171c26, #0c0f15);
  color: var(--accent);
  font: 800 38px/1 var(--display);
}

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

.offline-card-body {
  padding: 13px 14px 15px;
}

.offline-card-body h2 {
  margin: 0 0 5px;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.offline-card-body h2 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.18s;
}

.offline-card-body h2 a:hover {
  color: var(--accent-2);
}

.offline-card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
}

.offline-card-body .offline-date {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 9.5px;
}

.offline-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.offline-card-actions .btn {
  flex: 1;
}

@media (max-width: 640px) {
  .offline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .offline-head {
    align-items: flex-start;
  }
}

/* -------------------------------------------------------------------------- */
/* 15. Pages d'index (entités)                                                */
/* -------------------------------------------------------------------------- */

.entity-index {
  padding-top: 8px;
}

.entity-alphabet {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 20px 0 28px;
}

.entity-letter {
  display: grid;
  place-items: center;
  min-width: 27px;
  height: 30px;
  padding: 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s var(--ease);
}

.entity-letter:hover {
  border-color: rgba(255, 77, 90, 0.5);
  color: var(--text);
  transform: translateY(-1px);
}

.entity-letter.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 77, 90, 0.3);
}

.entity-letter.is-disabled {
  opacity: 0.3;
  cursor: default;
}

.entity-columns {
  columns: 6 180px;
  column-gap: 8px;
}

.entity-letter-head {
  break-inside: avoid;
  margin: 0 0 10px;
  padding: 0 3px 8px;
  border-bottom: 2px solid var(--accent);
  color: var(--accent);
  font: 800 21px/1 var(--display);
}

.entity-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  break-inside: avoid;
  margin: 0 0 6px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 12.5px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s var(--ease);
}

.entity-entry:hover {
  border-color: rgba(255, 77, 90, 0.42);
  background: rgba(255, 77, 90, 0.11);
  transform: translateX(2px);
}

.entity-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-count {
  flex: none;
  color: var(--muted-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.entity-empty {
  padding: 20px 0;
  color: var(--muted);
}

@media (max-width: 640px) {
  .entity-alphabet {
    gap: 4px;
  }

  .entity-letter {
    min-width: 27px;
    height: 27px;
    font-size: 10.5px;
  }

  .entity-columns {
    columns: 1;
  }
}

/* -------------------------------------------------------------------------- */
/* 16. Admin takedown                                                         */
/* -------------------------------------------------------------------------- */

.td-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.td-empty {
  padding: 24px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.td-item {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  box-shadow: var(--inner-light);
  transition: border-color 0.18s;
}

.td-item:hover {
  border-color: var(--line-strong);
}

.td-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.td-id,
.td-date {
  color: var(--muted-2);
  font-size: 10px;
}

.td-badge {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.td-badge.is-pending {
  background: rgba(255, 170, 60, 0.16);
  color: #ffc46b;
}

.td-badge.is-approved {
  background: rgba(255, 77, 90, 0.16);
  color: #ff9aa2;
}

.td-badge.is-rejected {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.td-badge.is-restored {
  background: rgba(80, 220, 140, 0.14);
  color: #8fe3ac;
}

.td-target {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 650;
}

.td-target a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.18s;
}

.td-target a:hover {
  color: var(--accent-2);
}

.td-slug {
  color: var(--muted-2);
  font-size: 10px;
}

.td-hidden {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 77, 90, 0.14);
  color: #ff9aa2;
  font-size: 9px;
  font-weight: 700;
}

.td-missing {
  color: #ff9aa2;
}

.td-reason {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.td-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 10px;
  word-break: break-all;
}

.td-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

#td-search {
  min-width: 240px;
  flex: 1 1 240px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  background: rgba(0, 0, 0, 0.26);
  color: var(--text);
  transition: border-color 0.18s, box-shadow 0.18s;
}

#td-search:focus {
  border-color: rgba(255, 77, 90, 0.55);
  box-shadow: var(--ring);
}

#td-filter {
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #0b0f15;
  color: var(--text);
}

/* -------------------------------------------------------------------------- */
/* 17. Emplacements pub                                                       */
/*     Tailles RÉSERVÉES (ne pas rendre fluides : CLS) :                      */
/*     728×90 · 300×250 · 160×600 · 320×50 · natif = taille d'une carte       */
/*     Jamais de pub sur l'image du lecteur.                                  */
/* -------------------------------------------------------------------------- */

/* --- Slots réels ---------------------------------------------------------- */

.ad-slot {
  position: relative;
  display: grid;
  place-items: center;
  gap: 4px;
  overflow: hidden;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.025),
    rgba(255, 255, 255, 0.025) 10px,
    rgba(255, 255, 255, 0.05) 10px,
    rgba(255, 255, 255, 0.05) 20px
  );
  color: var(--muted-2);
  font: 600 9px/1 var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
}

.ad-slot-tag {
  position: absolute;
  top: 5px;
  left: 7px;
  color: var(--muted-2);
  font: 600 7px/1 var(--font);
  letter-spacing: 0.12em;
}

.ad-slot--leader {
  width: min(728px, 100%);
  height: 90px;
  margin: 16px auto;
}

.ad-slot--square {
  width: 300px;
  max-width: 100%;
  height: 250px;
  margin: 16px auto;
}

.ad-slot--native {
  min-height: 0;
  border-radius: 14px;
}

.ad-slot-body {
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: none;
}

.ad-slot--rail {
  position: fixed;
  top: 82px;
  right: 18px;
  z-index: 55;
  width: 160px;
  height: min(600px, calc(100vh - 120px));
  margin: 0;
}

.ad-slot--video {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  width: 300px;
  height: 250px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.ad-slot-close {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--text);
  font: 600 14px/1 var(--font);
  cursor: pointer;
  transition: background 0.15s;
}

.ad-slot-close:hover {
  background: rgba(255, 77, 90, 0.85);
}

.ad-slot--mobile {
  width: min(320px, 100%);
  height: 50px;
  margin: 8px auto;
}

@media (max-width: 720px) {
  .ad-slot--leader {
    width: min(320px, 100%);
    height: 50px;
  }

  .ad-slot--square {
    width: min(300px, 100%);
  }

  .ad-slot--video,
  .ad-slot--rail {
    display: none;
  }
}

/* --- Preview (mode ?ads=measure, aucune requête réseau) -------------------- */

.ad-preview {
  display: grid;
  place-items: center;
  gap: 4px;
  border: 2px dashed rgba(255, 77, 90, 0.6);
  border-radius: 9px;
  background: repeating-linear-gradient(135deg, rgba(255, 77, 90, 0.07) 0 10px, rgba(255, 255, 255, 0.02) 10px 20px);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}

.ad-preview-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.ad-preview-hint {
  display: block;
  color: rgba(255, 255, 255, 0.38);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad-preview-header {
  width: min(728px, calc(100% - 32px));
  height: 90px;
  margin: 14px auto;
}

.ad-preview-inline {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.ad-preview-square {
  width: 300px;
  height: 250px;
}

.ad-preview-gallery-stack,
.ad-preview-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(1200px, calc(100% - 32px));
  margin: 18px auto;
}

.ad-preview-bottom-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.ad-preview-gallery-banner,
.ad-preview-footer-banner {
  width: min(728px, 100%);
  height: 90px;
}

.ad-preview-rail {
  position: fixed;
  top: 82px;
  right: 18px;
  z-index: 55;
  width: 160px;
  height: min(600px, calc(100vh - 120px));
}

/* L'image du lecteur reste centrée : la pub vit dans la gouttière droite */
body.ads-preview-reading .reader-stage {
  padding-right: 78px;
}

.ad-preview-video {
  position: fixed;
  right: 18px;
  bottom: 74px;
  z-index: 56;
  width: 300px;
  height: 250px;
}

.ad-preview-video .ad-preview {
  width: 100%;
  height: 100%;
}

.ad-preview-close {
  position: absolute;
  top: -12px;
  right: -12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: #0b0f15;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}

/* Bannière mobile : sous la barre du lecteur, au-dessus de l'image */
.ad-preview-reader-mobile {
  display: none;
}

.ad-preview-interstitial {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 5, 8, 0.94);
}

.ad-preview-interstitial-card {
  position: relative;
  width: min(420px, 100%);
  padding: 20px;
  border: 1px solid rgba(255, 77, 90, 0.42);
  border-radius: 16px;
  background: #0b0f15;
  text-align: center;
}

.ad-preview-interstitial-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.ad-preview-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ad-preview-interstitial-ad {
  width: 100%;
  height: 250px;
}

.ad-preview-popunder {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 190;
  width: min(290px, calc(100vw - 36px));
  padding: 14px;
  border: 1px solid rgba(255, 77, 90, 0.42);
  border-radius: 14px;
  background: rgba(11, 15, 21, 0.98);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
}

.ad-preview-popunder strong {
  display: block;
  font-size: 12px;
}

.ad-preview-popunder p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

/* Carte native dans le catalogue : exactement la taille d'une .card */
.ad-preview-native {
  display: block;
  grid-column: auto;
  width: 100%;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  pointer-events: none;
}

.ad-preview-native-cover {
  position: relative;
  display: grid;
  place-items: center;
  gap: 5px;
  aspect-ratio: 3 / 4;
  border: 2px dashed rgba(255, 77, 90, 0.6);
  border-radius: 14px;
  background: repeating-linear-gradient(135deg, rgba(255, 77, 90, 0.07) 0 10px, rgba(255, 255, 255, 0.02) 10px 20px);
}

.ad-preview-native-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 77, 90, 0.92);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ad-preview-native-size {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
}

.ad-preview-native-body {
  padding: 11px 3px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.ad-preview-native-body strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.ad-preview-native-body span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
}

.ad-preview-controls {
  position: fixed;
  left: 18px;
  bottom: 72px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 77, 90, 0.38);
  border-radius: 10px;
  background: rgba(11, 15, 21, 0.96);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.ad-preview-controls span {
  margin-right: 3px;
  color: var(--accent);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ad-preview-controls button {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ad-preview-controls button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

@media (max-width: 760px) {
  .ad-preview-header {
    width: min(320px, calc(100% - 24px));
    height: 50px;
    margin: 10px auto;
  }

  .ad-preview-native {
    height: auto;
  }

  .ad-preview-square {
    width: min(300px, calc(100vw - 48px));
    height: 250px;
  }

  .ad-preview-rail,
  .ad-preview-video {
    display: none;
  }

  .ad-preview-reader-mobile {
    display: grid;
    width: min(320px, calc(100vw - 24px));
    height: 50px;
    margin: 8px auto;
  }

  .ad-preview-gallery-banner,
  .ad-preview-footer-banner {
    width: min(320px, 100%);
    height: 50px;
  }

  .ad-preview-interstitial-ad {
    height: 480px;
  }

  body.ads-preview-reading .reader-stage {
    padding-right: 12px;
  }
}


/* Design switcher (private menu only) */
.private-nav-sep {
  display: block;
  height: 1px;
  margin: 5px 4px;
  background: var(--line);
}

.private-nav-label {
  display: block;
  padding: 4px 10px 2px;
  color: var(--muted-2);
  font: 600 9px/1 var(--font);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.private-nav-menu button.is-active {
  background: rgba(255, 77, 90, 0.14);
  color: var(--accent);
}


/* Fixes: native slot matches card height, header fits on one row */
@media (max-width: 480px) {
  .header-inner {
    gap: 10px;
  }
}


/* Emprunts au nouveau design : titres de cartes + halo au survol */
.card-title {
  font-size: 13.5px;
}

.card:hover .card-cover {
  border-color: rgba(255, 77, 90, 0.58);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(255, 77, 90, 0.24),
    0 12px 44px rgba(255, 77, 90, 0.2);
}


/* Reader: zoom, resume prompt, last-page dialog */
.reader-stage.zoom-mode .reader-image {
  cursor: zoom-in;
}

.reader-stage.zoom-mode .reader-image.is-zoomed {
  cursor: zoom-out;
  transform: scale(2);
  transition: transform 0.18s ease;
}

.reader-resume {
  position: fixed;
  left: 50%;
  top: 76px;
  transform: translateX(-50%);
  z-index: 85;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 24px);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 13, 18, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  color: var(--text);
  font-size: 12px;
}

.reader-resume[hidden] {
  display: none;
}

.reader-end {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 6, 9, 0.72);
}

.reader-end[hidden] {
  display: none;
}

.reader-end-card {
  width: min(360px, 100%);
  display: grid;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0f131a;
  text-align: center;
}

.reader-end-card strong {
  font-size: 16px;
}

.reader-end-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.reader-end-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}


/* Reader: zoom slider + pan + full-width click zones */
.reader-zoom-control {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
}

.reader-zoom-control[hidden] {
  display: none;
}

.reader-zoom-control input[type="range"] {
  width: 90px;
  accent-color: var(--accent);
  cursor: pointer;
}

.reader-image {
  transition: transform 0.15s ease;
  will-change: transform;
}

.reader-image.is-zoomed {
  cursor: grab;
  touch-action: none;
}

.reader-image.is-zoomed:active {
  cursor: grabbing;
}

.reader-stage {
  cursor: pointer;
}

@media (max-width: 720px) {
  .reader-zoom-control input[type="range"] {
    width: 64px;
  }
}
