/* ═══════════════════════════════════════════════════════════════════
   netfilm.css — Style de Netfilm (clone visuel de Netflix, à l'identique).
   Thème sombre, accents rouges, rangées qui défilent, aperçu au survol.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --nf-red: #e50914;
  --nf-bg: #141414;
  --nf-text: #fff;
  --nf-gray: #b3b3b3;
  --nav-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Verrou anti-scroll horizontal : sur html ET body (iOS Safari ignore souvent
   overflow-x:hidden posé seulement sur body). La page ne peut donc pas être
   « baladée » de gauche à droite ; seules les rangées de films défilent. */
html, body { max-width: 100%; overflow-x: hidden; }
body {
  background: var(--nf-bg);
  color: var(--nf-text);
  font-family: "Netflix Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }
/* Un élément [hidden] doit TOUJOURS être caché, même s'il a display:flex/grid.
   (Sans ça, les vues d'auth s'empilaient au lieu de se remplacer.) */
[hidden] { display: none !important; }

/* ─────────────── BARRE DE NAVIGATION ─────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4%;
  background: linear-gradient(180deg, rgba(0,0,0,.75) 10%, transparent);
  transition: background-color .4s;
}
.nav.scrolled { background: var(--nf-bg); }

.nav-left { display: flex; align-items: center; gap: 26px; }
.nav-logo {
  color: var(--nf-red); font-weight: 800; font-size: 26px;
  letter-spacing: .5px; text-transform: uppercase; user-select: none;
}
.nav-links { display: flex; gap: 20px; }
.nav-links a {
  font-size: 14px; color: #e5e5e5; transition: color .3s;
  white-space: nowrap;
}
.nav-links a:hover { color: #b3b3b3; }
.nav-links a.active { color: #fff; font-weight: 600; cursor: default; }

.nav-right { display: flex; align-items: center; gap: 18px; position: relative; }
.nav-icon { color: #fff; display: flex; align-items: center; }
.nav-icon:hover { color: var(--nf-gray); }

/* Profil + caret */
.nav-profile {
  display: flex; align-items: center; gap: 6px; cursor: pointer; position: relative;
}
.np-name { font-size: 14px; color: #e5e5e5; }
.np-avatar {
  width: 32px; height: 32px; border-radius: 4px;
  background: linear-gradient(135deg, #f5515f, #9f041b);
  display: inline-block;
}
.np-caret { transition: transform .3s; }
.nav-profile.open .np-caret { transform: rotate(180deg); }

/* Menu déroulant profil */
.profile-menu {
  position: absolute; top: 46px; right: 0; width: 220px;
  background: rgba(0,0,0,.9); border: 1px solid rgba(255,255,255,.15);
  border-radius: 4px; padding: 8px 0; font-size: 13px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all .2s;
}
.nav-profile.open .profile-menu { opacity: 1; visibility: visible; transform: none; }
.profile-menu::before {
  content: ""; position: absolute; top: -14px; right: 24px;
  border: 7px solid transparent; border-bottom-color: rgba(255,255,255,.4);
}
.pm-profiles { display: flex; flex-direction: column; }
.pm-row, .pm-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; color: #e5e5e5; cursor: pointer;
}
.pm-row:hover, .pm-item:hover { text-decoration: underline; }
.pm-mini {
  width: 26px; height: 26px; border-radius: 4px; flex: 0 0 auto;
}
.pm-ico { width: 26px; text-align: center; opacity: .85; }
.pm-sep { height: 1px; background: rgba(255,255,255,.2); margin: 6px 0; }
.pm-logout { justify-content: center; font-size: 13px; }

/* ─────────────── GRAND BANDEAU (billboard) ─────────────── */
.billboard {
  position: relative; height: 82vh; min-height: 520px;
  color: #fff; display: flex; align-items: center;
}
.billboard-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center top;
  z-index: -2;
}
.billboard::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(77deg, rgba(0,0,0,.75) 0%, transparent 55%),
    linear-gradient(180deg, transparent 60%, rgba(20,20,20,.6) 85%, var(--nf-bg) 100%);
}
.billboard-info { padding: 0 4%; max-width: 42%; }
.bb-title {
  font-size: 3.2rem; font-weight: 800; line-height: 1.05;
  margin-bottom: 18px; text-shadow: 2px 2px 6px rgba(0,0,0,.45);
}
.bb-meta { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin-bottom: 14px; color: #ddd; }
.bb-meta .dot { opacity: .6; }
.bb-badge {
  border: 1px solid rgba(255,255,255,.4); padding: 1px 7px; font-size: .8rem; border-radius: 3px;
}
.bb-synopsis {
  font-size: 1.15rem; line-height: 1.4; max-width: 90%;
  text-shadow: 1px 1px 4px rgba(0,0,0,.45); margin-bottom: 22px;
}
.bb-actions { display: flex; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 26px; border-radius: 5px; font-size: 1.1rem; font-weight: 600;
  transition: opacity .2s, background-color .2s;
}
.btn svg { width: 22px; height: 22px; }
.btn-play { background: #fff; color: #000; }
.btn-play:hover { background: rgba(255,255,255,.75); }
.btn-more { background: rgba(109,109,110,.7); color: #fff; }
.btn-more:hover { background: rgba(109,109,110,.5); }

/* Étiquettes en bas à droite du bandeau (Ajout récent, humeur…) */
.bb-tags { position: absolute; right: 0; bottom: 22%; display: flex; align-items: stretch; }
.bb-maturity {
  background: rgba(51,51,51,.6); border-left: 3px solid #dcdcdc;
  padding: 6px 40px 6px 12px; font-size: .95rem;
}
.bb-tag-recent {
  background: rgba(0,0,0,.4); display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; font-size: .9rem; margin-right: 10px; border-radius: 2px;
}
.bb-tag-recent .r { color: var(--nf-red); }

/* ─────────────── RANGÉES ─────────────── */
.rows { margin-top: -8vh; position: relative; z-index: 5; padding-bottom: 40px; }
.row { margin: 0 0 3vw; }
.row-title {
  font-size: 1.4rem; font-weight: 700; color: #e5e5e5;
  margin: 0 4% 8px; display: inline-block;
}
.row-slider { position: relative; }
.row-track {
  display: flex; gap: 6px; padding: 0 4%;
  overflow-x: auto; scroll-behavior: smooth;
  scrollbar-width: none;
}
.row-track::-webkit-scrollbar { display: none; }

/* Flèches de défilement (apparaissent au survol de la rangée) */
.row-handle {
  position: absolute; top: 0; bottom: 0; width: 4%; z-index: 20;
  background: rgba(0,0,0,.5); color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s; font-size: 2.4rem;
}
.row-slider:hover .row-handle { opacity: 1; }
.row-handle:hover { background: rgba(0,0,0,.75); }
.row-handle svg { width: 34px; height: 34px; }
.row-handle.left { left: 0; }
.row-handle.right { right: 0; }

/* Carte (vignette paysage) */
.card {
  position: relative; flex: 0 0 auto;
  width: calc((100% - 8% - 6*6px) / 6); /* ~6 cartes visibles */
  min-width: 200px; aspect-ratio: 16/9;
  border-radius: 5px; overflow: hidden; cursor: pointer;
  transition: transform .2s;
}
.card-art {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  display: flex; align-items: flex-end; padding: 10px;
}
.card-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.6));
}
.card-name {
  position: relative; z-index: 2; font-weight: 700; font-size: .95rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,.6); line-height: 1.1;
}
.card-badge {
  position: absolute; top: 8px; left: 0; z-index: 3;
  background: var(--nf-red); color: #fff; font-size: .68rem; font-weight: 700;
  padding: 2px 6px; border-radius: 0 3px 3px 0;
}
.card-top10 {
  position: absolute; top: 6px; left: 6px; z-index: 3;
  background: var(--nf-red); color: #fff; font-size: .6rem; font-weight: 800;
  padding: 2px 4px; border-radius: 3px; line-height: 1.1; text-align: center;
}
/* Barre de progression (reprendre) */
.card-progress { position: absolute; left: 8px; right: 8px; bottom: 6px; height: 3px; background: rgba(255,255,255,.3); z-index: 3; }
.card-progress > i { display: block; height: 100%; background: var(--nf-red); }

/* ─────────────── APERÇU AU SURVOL (popup) ─────────────── */
.preview {
  position: absolute; z-index: 120; width: 340px;
  background: #181818; border-radius: 6px; overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,.75);
  opacity: 0; transform: scale(.85); transform-origin: center bottom;
  transition: opacity .18s, transform .18s; pointer-events: none;
}
.preview.show { opacity: 1; transform: scale(1); pointer-events: auto; }
.pv-art { height: 190px; background-size: cover; background-position: center; position: relative; display: flex; align-items: flex-end; padding: 12px; }
.pv-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, #181818); }
.pv-arttitle { position: relative; z-index: 2; font-weight: 800; font-size: 1.2rem; text-shadow: 1px 1px 3px #000; }
.pv-body { padding: 14px; }
.pv-controls { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.pv-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center; background: rgba(42,42,42,.6);
  transition: border-color .2s, background .2s;
}
.pv-btn:hover { border-color: #fff; background: rgba(60,60,60,.9); }
.pv-btn svg { width: 20px; height: 20px; fill: #fff; }
.pv-btn.play { background: #fff; border-color: #fff; }
.pv-btn.play svg { fill: #000; }
.pv-btn.expand { margin-left: auto; }
.pv-meta { display: flex; align-items: center; gap: 8px; font-size: .85rem; margin-bottom: 10px; }
.pv-match { color: #46d369; font-weight: 700; }
.pv-agebox { border: 1px solid rgba(255,255,255,.4); padding: 0 6px; font-size: .78rem; }
.pv-hd { border: 1px solid rgba(255,255,255,.4); padding: 0 4px; font-size: .62rem; border-radius: 3px; }
.pv-genres { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: #ddd; }
.pv-genres .g:not(:last-child)::after { content: "•"; margin-left: 6px; opacity: .5; }
.pv-progress { margin-top: 8px; }
.pv-progline { height: 4px; background: rgba(255,255,255,.3); border-radius: 2px; }
.pv-progline > i { display: block; height: 100%; background: var(--nf-red); border-radius: 2px; }
.pv-progtxt { font-size: .78rem; color: #ddd; margin-top: 4px; }

/* ─────────────── FICHE DÉTAILLÉE (modal) ─────────────── */
.dm-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.75); overflow-y: auto; display: flex; justify-content: center; align-items: flex-start; padding: 40px 0; }
.dm { width: 900px; max-width: 92%; background: #181818; border-radius: 8px; overflow: hidden; position: relative; box-shadow: 0 12px 40px rgba(0,0,0,.7); }
.dm-close { position: absolute; top: 16px; right: 16px; z-index: 5; width: 38px; height: 38px; border-radius: 50%; background: #181818; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.dm-close:hover { background: #333; }
.dm-hero { height: 460px; max-height: 52vh; position: relative; display: flex; align-items: flex-end; background-size: cover; background-position: center; }
.dm-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, #181818); }
.dm-hero-in { position: relative; z-index: 2; padding: 0 48px 28px; width: 100%; }
.dm-title { font-size: 2.6rem; font-weight: 800; text-shadow: 1px 1px 5px #000; margin-bottom: 18px; }
.dm-hero-btns { display: flex; align-items: center; gap: 12px; }
.dm-body { padding: 8px 48px 44px; }
.dm-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; }
.dm-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; font-size: .95rem; }
.dm-syn { line-height: 1.5; }
.dm-side { font-size: .88rem; line-height: 1.5; }
.dm-side .lab { color: #777; }
.dm-side .v { color: #ddd; }
.dm-section-t { font-size: 1.4rem; font-weight: 700; }
.dm-eptop { display: flex; align-items: center; justify-content: space-between; margin: 30px 0 8px; }
.dm-ep { display: flex; gap: 16px; padding: 16px 4px; border-bottom: 1px solid #333; align-items: center; }
.dm-ep-thumb { position: relative; width: 130px; height: 74px; border-radius: 4px; background: #333; background-size: cover; background-position: center; flex: 0 0 auto; overflow: hidden; cursor: pointer; }
.dm-ep-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .15s; }
.dm-ep-thumb:hover .dm-ep-play { opacity: 1; }
.dm-ep-play svg { width: 30px; height: 30px; fill: #fff; }
.dm-ep-info { flex: 1; }
.dm-ep-head { display: flex; justify-content: space-between; gap: 10px; }
.dm-ep-name { font-weight: 600; }
.dm-ep-ov { color: #aaa; font-size: .85rem; margin-top: 6px; }
.dm-sim { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dm-simcard { background: #2a2a2a; border-radius: 6px; overflow: hidden; }
.dm-simcard .art { height: 130px; background: #333; background-size: cover; background-position: center; }
.dm-simcard .info { padding: 12px; }
.dm-simcard .ov { color: #aaa; font-size: .82rem; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 700px) { .dm-cols { grid-template-columns: 1fr; } .dm-sim { grid-template-columns: 1fr 1fr; } .dm-hero-in, .dm-body { padding-left: 24px; padding-right: 24px; } .dm-title { font-size: 1.8rem; } }

/* ─────────────── EN-TÊTE PAGE (Séries / Films) ─────────────── */
.cat-head { padding: calc(var(--nav-h) + 24px) 4% 0; display: flex; align-items: center; gap: 18px; }
.cat-title { font-size: 2.2rem; font-weight: 700; }
.genres-dd { position: relative; }
.genres-btn {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid #aaa; background: rgba(0,0,0,.4);
  padding: 5px 12px; font-size: 1rem; color: #fff;
}
.genres-list {
  position: absolute; top: 40px; left: 0; z-index: 60;
  background: rgba(0,0,0,.9); border: 1px solid rgba(255,255,255,.2);
  columns: 2; column-gap: 0; width: min(420px, calc(100vw - 32px)); padding: 6px 0;
  max-height: 60vh; overflow: auto;
  opacity: 0; visibility: hidden; transition: opacity .15s;
}
.genres-dd.open .genres-list { opacity: 1; visibility: visible; }
.genres-list a { display: block; padding: 6px 16px; font-size: .95rem; color: #e5e5e5; break-inside: avoid; }
.genres-list a:hover { color: #fff; }
.genres-list a.on { font-weight: 700; }

/* ─────────────── PAGE GESTION PROFILS (thème clair) ─────────────── */
/* Thème SOMBRE (noir/rouge Netflix) */
.profiles-page { min-height: 100vh; background: #141414; color: #fff; }
.pp-top { background: #141414; display: flex; align-items: center; justify-content: space-between; padding: 14px 4%; border-bottom: 1px solid #262626; }
.pp-logo { color: var(--nf-red); font-weight: 800; font-size: 24px; letter-spacing: .5px; }
.pp-body { max-width: 780px; margin: 0 auto; padding: calc(var(--nav-h) + 30px) 20px 80px; }
.pp-back { display: inline-flex; align-items: center; gap: 8px; color: #b3b3b3; margin-bottom: 24px; cursor: pointer; }
.pp-back:hover { color: #fff; }
.pp-h1 { font-size: 2.2rem; font-weight: 800; }
.pp-sub { color: #b3b3b3; margin: 6px 0 24px; }
.pp-card { background: #1b1b1b; border: 1px solid #2a2a2a; border-radius: 10px; overflow: hidden; margin-bottom: 30px; }
.pp-line { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid #2a2a2a; cursor: pointer; }
.pp-line:last-child { border-bottom: none; }
.pp-line:hover { background: #242424; }
.pp-lico { width: 34px; height: 34px; color: #cfcfcf; display: flex; align-items: center; justify-content: center; }
.pp-ltxt { flex: 1; }
.pp-ltitle { font-weight: 700; }
.pp-lsub { color: #999; font-size: .9rem; }
.pp-chev { color: #777; }
.pp-mini { width: 40px; height: 40px; border-radius: 6px; }
.pp-badge-live { background: rgba(229,9,20,.18); color: #ff6b6b; font-size: .8rem; padding: 3px 8px; border-radius: 4px; }
.pp-section-t { color: #b3b3b3; font-weight: 700; margin: 0 4px 10px; }
.pp-add { text-align: center; padding: 18px; color: #fff; font-weight: 700; background: #2a2a2a; }
.pp-add:hover { background: #333; }
.pp-note { text-align: center; color: #888; padding: 14px; font-size: .9rem; }

/* ── Admin : boutons de ligne + messagerie ── */
.adm-msg, .adm-del { background: #2a2a2a; border-radius: 6px; padding: 7px 12px; margin-left: 8px; font-size: .85rem; color: #eee; }
.adm-msg:hover, .adm-del:hover { background: #383838; }
.chat { width: 460px; max-width: 94%; background: #181818; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; max-height: 80vh; box-shadow: 0 12px 40px rgba(0,0,0,.7); }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #2a2a2a; font-weight: 600; }
.chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 260px; }
.chat-msg { max-width: 78%; padding: 9px 13px; border-radius: 14px; font-size: .92rem; line-height: 1.35; word-wrap: break-word; }
.chat-msg.from-me { align-self: flex-end; background: var(--nf-red); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.from-them { align-self: flex-start; background: #333; color: #eee; border-bottom-left-radius: 4px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #2a2a2a; }
.chat-form input { flex: 1; padding: 10px 14px; border-radius: 20px; border: none; background: #333; color: #fff; font-size: .95rem; }
.chat-form input:focus { outline: none; background: #3d3d3d; }

/* ─────────────── LECTEUR VIDÉO ─────────────── */
.player-overlay { position: fixed; inset: 0; z-index: 900; background: #000; display: flex; align-items: center; justify-content: center; }
.player-video { width: 100%; height: 100%; background: #000; }
.player-close { position: absolute; top: 20px; right: 24px; z-index: 5; width: 42px; height: 42px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 1.3rem; }
.player-close:hover { background: rgba(0,0,0,.85); }
.player-msg { position: absolute; color: #fff; font-size: 1rem; background: rgba(0,0,0,.6); padding: 12px 20px; border-radius: 8px; }

/* Toast (petites notifications) */
.nf-toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px); background: #333; color: #fff; padding: 12px 22px; border-radius: 6px; z-index: 700; opacity: 0; transition: all .3s; box-shadow: 0 6px 20px rgba(0,0,0,.5); font-size: .95rem; }
.nf-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─────────────── ÉCRAN "QUI REGARDE ?" ─────────────── */
.who-screen {
  position: fixed; inset: 0; z-index: 500; background: #141414;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px;
}
.who-title { font-size: 3.2vw; font-weight: 500; color: #fff; }
.who-list { display: flex; gap: 2vw; flex-wrap: wrap; justify-content: center; }
.who-item { display: flex; flex-direction: column; align-items: center; gap: 12px; cursor: pointer; }
.who-av { width: 10vw; height: 10vw; max-width: 150px; max-height: 150px; min-width: 84px; min-height: 84px; border-radius: 6px; border: 3px solid transparent; transition: border-color .2s; }
.who-item:hover .who-av { border-color: #fff; }
.who-item:hover .who-nm { color: #fff; }
.who-nm { color: #808080; font-size: 1.3vw; }
.who-manage { border: 1px solid #808080; color: #808080; padding: 10px 24px; font-size: 1.1rem; letter-spacing: 2px; }
.who-manage:hover { border-color: #fff; color: #fff; }

/* ─────────────── ÉCRANS D'AUTHENTIFICATION ─────────────── */
.auth { position: fixed; inset: 0; z-index: 600; overflow-y: auto; background: #000; }
.auth[hidden] { display: none; }
.auth-mosaic {
  position: absolute; inset: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; padding: 6px;
  filter: brightness(.5); overflow: hidden; align-content: start;
}
.auth-mosaic .tile { aspect-ratio: 2/3; border-radius: 6px; background-size: cover; background-position: center; }
.auth-overlay { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 25%, rgba(0,0,0,.45), rgba(0,0,0,.88)); }
.auth[data-mode="signin"] .auth-mosaic,
.auth[data-mode="signup"] .auth-mosaic { display: none; }
.auth[data-mode="signin"] .auth-overlay,
.auth[data-mode="signup"] .auth-overlay { background: radial-gradient(circle at 50% -10%, #3a0d0d, #0a0505 55%, #000); }

.auth-promo { position: relative; z-index: 3; text-align: center; padding: 12px; color: #fff; font-size: 1.02rem; background: linear-gradient(90deg, #7b2ff7, #e50914); }
.auth[data-mode="signin"] .auth-promo,
.auth[data-mode="signup"] .auth-promo { display: none; }

.auth-topbar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 18px 3.5%; }
.auth-top-right { display: flex; align-items: center; gap: 14px; }
.auth-lang { border: 1px solid rgba(255,255,255,.5); color: #fff; padding: 6px 12px; border-radius: 4px; background: rgba(0,0,0,.35); font-size: .9rem; }
.auth-signin-btn { background: var(--nf-red); color: #fff; padding: 7px 17px; border-radius: 4px; font-weight: 600; }
.auth-signin-btn:hover { background: #f6121d; }

.auth-view { position: relative; z-index: 2; }
.auth-hero { max-width: 660px; margin: 0 auto; text-align: center; padding: 9vh 20px 12vh; color: #fff; }
.auth-hero h1 { font-size: 3rem; font-weight: 800; line-height: 1.1; margin-bottom: 16px; }
.auth-sub { font-size: 1.3rem; margin-bottom: 22px; }
.auth-cta-label { font-size: 1.05rem; color: #eee; margin-bottom: 14px; }
.auth-inline { display: flex; gap: 8px; max-width: 580px; margin: 0 auto; }
.auth-inline input { flex: 1; padding: 14px 16px; border-radius: 4px; border: 1px solid #8c8c8c; background: rgba(0,0,0,.5); color: #fff; font-size: 1rem; }
.auth-inline input:focus { outline: none; border-color: #fff; }
.auth-red-btn { background: var(--nf-red); color: #fff; padding: 14px; border-radius: 4px; font-size: 1.05rem; font-weight: 700; width: 100%; transition: background .2s; }
.auth-red-btn:hover { background: #f6121d; }
.auth-red-btn.big { width: auto; white-space: nowrap; padding: 14px 24px; font-size: 1.15rem; }

.auth-card-wrap { display: flex; justify-content: center; padding: 5vh 20px 10vh; }
.auth-card { width: 440px; max-width: 100%; color: #fff; }
.auth-card h2 { font-size: 2rem; font-weight: 800; margin-bottom: 6px; }
.auth-card-sub { color: #b3b3b3; margin-bottom: 24px; }
.auth-field { position: relative; margin-bottom: 16px; }
.auth-field input { width: 100%; padding: 24px 16px 8px; background: #333; border: none; border-radius: 4px; color: #fff; font-size: 1rem; }
.auth-field input:focus { outline: none; background: #454545; }
.auth-field label { position: absolute; left: 16px; top: 17px; color: #8c8c8c; transition: .15s; pointer-events: none; }
.auth-field input:focus + label,
.auth-field input:not(:placeholder-shown) + label { top: 8px; font-size: .72rem; }
/* Jauge de force du mot de passe */
.pw-strength { margin: -8px 0 14px; }
.pw-bar { height: 6px; background: #444; border-radius: 3px; overflow: hidden; }
.pw-bar > i { display: block; height: 100%; width: 0; border-radius: 3px; transition: width .2s, background .2s; }
.pw-hint { font-size: .8rem; margin-top: 5px; }
/* Message « les mots de passe correspondent / pas » (temps réel) */
.pw-match { font-size: .82rem; min-height: 18px; margin: -8px 0 12px; }

.auth-error { color: #e87c03; font-size: .9rem; min-height: 20px; margin-bottom: 6px; }
.auth-switch { color: #b3b3b3; margin-top: 18px; }
.auth-switch a { color: #fff; cursor: pointer; }
.auth-switch a:hover { text-decoration: underline; }
.auth-help { color: #b3b3b3; margin-top: 16px; cursor: pointer; }
.auth-recaptcha { color: #8c8c8c; font-size: .8rem; margin-top: 22px; }

/* Bouton hamburger : caché sur grand écran (la barre de liens suffit). */
.nav-burger { display: none; background: none; border: 0; color: #fff; cursor: pointer; padding: 4px; align-items: center; }

@media (max-width: 900px) {
  .auth-hero h1 { font-size: 2.1rem; }
  .auth-inline { flex-direction: column; }
  .auth-red-btn.big { width: 100%; }
  /* Bandeau : plus court, contenu collé EN BAS (au-dessus des rangées) pour ne
     pas chevaucher la barre du haut ; synopsis limité à 3 lignes ; étiquettes
     de droite (maturité) masquées (elles débordaient). */
  .billboard { height: 58vh; min-height: 360px; align-items: flex-end; }
  .billboard-info { max-width: 100%; padding: 0 4% 6vh; }
  .bb-title { font-size: 2rem; margin-bottom: 12px; }
  .bb-synopsis { font-size: .95rem; max-width: 100%; margin-bottom: 16px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .bb-tags { display: none; }
  .card { min-width: 150px; }

  /* Rangées : plus de "remontée" négative sous le bandeau (ça faisait chevaucher
     les titres) + titres/en-têtes redimensionnés. */
  .rows { margin-top: 0; }
  .row-title { font-size: 1.15rem; }
  .cat-head { padding: calc(var(--nav-h) + 14px) 4% 0; gap: 12px; }
  .cat-title { font-size: 1.7rem; }

  /* Sur mobile : le bouton hamburger remplace la barre de liens.
     Les liens deviennent un panneau déroulant sous la barre. */
  .nav-burger { display: inline-flex; }
  .nav-links {
    display: none;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(0,0,0,.96); border-top: 1px solid #222;
    padding: 8px 0; z-index: 60;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 22px; font-size: 1.05rem; border-bottom: 1px solid #1a1a1a; }
}

/* ═══════════════ BOUTON « Tout le catalogue » (nav) ═══════════════ */
.nav-browse {
  color: #fff !important; font-weight: 600;
  background: var(--nf-red); padding: 6px 14px; border-radius: 4px;
}
.nav-browse:hover { background: #f6121d; color: #fff !important; }

/* ═══════════════ VUE TOUT LE CATALOGUE (grandes vignettes) ═══════════════ */
.browse-head { padding: calc(var(--nav-h) + 24px) 4% 0; }
.browse-head .cat-title { margin-bottom: 16px; }
.browse-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
#browseInput {
  flex: 1 1 320px; max-width: 560px; min-width: 0;
  background: #161616; border: 1px solid #444; color: #fff;
  border-radius: 6px; padding: 12px 16px; font-size: 1.05rem;
}
.browse-chips { display: flex; gap: 8px; }
.bchip {
  background: #222; color: #ccc; border: 1px solid #3a3a3a;
  padding: 9px 16px; border-radius: 20px; font-size: .95rem; font-weight: 600;
}
.bchip.on { background: #fff; color: #000; border-color: #fff; }
.browse-count { color: #999; font-size: .9rem; margin: 12px 0 0; }
.browse-grid {
  display: grid; gap: 14px; padding: 14px 4% 60px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.browse-grid .card { aspect-ratio: 16/9; }
.browse-empty { color: #999; padding: 20px 0 60px; margin-left: 4%; }

/* ── Mobile : menu genres en 1 colonne (ne déborde plus), grille + compacte,
   et le bouton catalogue devient un texte rouge dans le panneau burger. ── */
@media (max-width: 900px) {
  .genres-list { columns: 1; width: min(280px, calc(100vw - 32px)); }
  .browse-head { padding: calc(var(--nav-h) + 14px) 4% 0; }
  .browse-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .nav-browse { background: transparent; color: var(--nf-red) !important; font-weight: 700; }
}

/* ═══════════════ ESSAI GRATUIT 15 min (lecteur) ═══════════════ */
.trial-badge {
  position: absolute; top: 20px; left: 24px; z-index: 6;
  background: rgba(0,0,0,.7); color: #fff; font-size: .9rem; font-weight: 600;
  padding: 8px 14px; border-radius: 20px; border: 1px solid rgba(255,255,255,.2);
}
.trial-block {
  position: absolute; inset: 0; z-index: 8; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px; gap: 6px;
  background: radial-gradient(circle at center, #1a0000 0%, #000 70%);
}
.trial-block .tb-ico { font-size: 3rem; margin-bottom: 6px; }
.trial-block h2 { font-size: 1.7rem; font-weight: 800; max-width: 640px; }
.trial-block p { color: #cfcfcf; font-size: 1.05rem; line-height: 1.5; max-width: 520px; margin: 8px 0 18px; }
.trial-block .tb-contact {
  background: var(--nf-red); color: #fff; font-size: 1.1rem; font-weight: 700;
  padding: 14px 28px; border-radius: 6px; transition: background .2s;
}
.trial-block .tb-contact:hover { background: #f6121d; }
@media (max-width: 600px) {
  .trial-block h2 { font-size: 1.3rem; }
  .trial-block p { font-size: .98rem; }
  .trial-badge { font-size: .8rem; top: 14px; left: 14px; padding: 6px 11px; }
}
