/* ======================================================
   OBSYNIAVERSE — SERIE PAGE (CLEAN / PRO)
   Compatible 100% avec ton PHP actuel
   ====================================================== */

*{
  box-sizing:border-box;
}

body{
  margin:0;
  background:#0b0714;
  color:#e5e7eb;
  font-family:Inter, Arial, sans-serif;
}

/* ======================================================
   BANNIÈRE
   ====================================================== */

.serie-banner{
  position:relative;
  width:100vw;
  height:420px;
  margin-left:calc(50% - 50vw);
  overflow:hidden;
}

.serie-banner img,
.serie-banner .fallback{
  width:100%;
  height:100%;
  object-fit:cover;
}

.serie-banner .fallback{
  background:linear-gradient(135deg,#1a142b,#0b0714);
}

/* overlay sombre */
.serie-banner::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(
    to right,
    rgba(0,0,0,.85) 0%,
    rgba(0,0,0,.6) 40%,
    rgba(0,0,0,.25) 70%,
    transparent
  );
}

/* ======================================================
   LAYOUT
   ====================================================== */

.layout{
  max-width:1400px;
  margin:0 auto;
  padding:0 20px 60px;
  position:relative;
}

/* ======================================================
   TEXTE SUR BANNIÈRE
   ====================================================== */

.serie-page > h1,
.serie-page > p,
.serie-page > .serie-meta,
.serie-page > .actions,
.serie-page > .badges{
  position:relative;
  top:-300px;
  z-index:5;
  max-width:720px;
}

/* TITRE */
.serie-page > h1{
  font-size:42px;
  font-weight:800;
  margin:0 0 14px;
  color:#fff;
}

/* DESCRIPTION */
.serie-page > p{
  font-size:15px;
  line-height:1.6;
  color:#d1d5db;
  margin-bottom:16px;
}

/* META */
.serie-meta{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  font-size:14px;
  color:#c7c7d1;
  margin-bottom:18px;
}

/* ======================================================
   ACTIONS
   ====================================================== */

.actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:16px;
}

.btn{
  height:42px;
  padding:0 16px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(31,41,55,.9);
  color:#e5e7eb;
  font-size:14px;
  font-weight:600;
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  text-decoration:none;
  transition:.2s ease;
}

.btn:hover{
  background:#374151;
  transform:translateY(-1px);
}

.btn.like{color:#fb7185}
.btn.fav{color:#facc15}

/* ======================================================
   BADGES
   ====================================================== */

.badges{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:40px;
}

.badge{
  padding:6px 14px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
  background:#111827;
}

.badge.top1{background:#f59e0b;color:#000}
.badge.top3{background:#fde68a;color:#000}
.badge.trend{background:#ef4444}
.badge.new{background:#7c3aed}

/* ======================================================
   CHAPITRES
   ====================================================== */

.serie-page h2{
  margin-top:-220px;
  margin-bottom:14px;
  font-size:22px;
}

.chapter{
  display:grid;
  grid-template-columns:70px 1fr auto;
  gap:18px;
  align-items:center;
  padding:14px 0;
  border-bottom:1px solid rgba(255,255,255,.06);
  text-decoration:none;
  color:inherit;
}

.chapter:hover{
  background:rgba(255,255,255,.04);
}

.chapter.read{
  opacity:.6;
}

/* COVER */
.chapter-cover{
  width:70px;
  height:70px;
  object-fit:cover;
  border-radius:8px;
}

/* CONTENU */
.chapter-main{
  display:grid;
  grid-template-rows:auto 1fr;
  height:100%;
}

/* TITRE */
.chapter-title{
  font-size:15px;
  font-weight:600;
  color:#fff;
}

/* DESCRIPTION (FIN centré) */
.chapter-desc{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-size:13px;
  font-weight:700;
  color:#d1d5db;
  min-height:100%;
}

/* DATE */
.chapter-date{
  font-size:13px;
  color:#9ca3af;
  white-space:nowrap;
  text-align:right;
}

/* ======================================================
   NOTATION
   ====================================================== */

.rating-form{
  display:flex;
  gap:6px;
}

.rate-btn{
  width:38px;
  height:38px;
  border-radius:8px;
  background:#1f2937;
  border:1px solid rgba(255,255,255,.08);
  color:#9ca3af;
  font-weight:700;
  cursor:pointer;
  transition:.2s;
}

.rate-btn:hover{
  background:#374151;
  color:#facc15;
}

.rate-btn.active{
  background:#facc15;
  color:#000;
  border-color:#facc15;
}

/* ======================================================
   MOBILE
   ====================================================== */

@media(max-width:768px){

  .serie-banner{
    height:260px;
  }

  .serie-page > h1,
  .serie-page > p,
  .serie-page > .serie-meta,
  .serie-page > .actions,
  .serie-page > .badges{
    top:-200px;
    max-width:100%;
  }

  .serie-page > h1{
    font-size:26px;
  }

  .serie-page h2{
    margin-top:-170px;
  }

  .chapter{
    grid-template-columns:60px 1fr;
  }

  .chapter-date{
    display:none;
  }

  .chapter-desc{
    justify-content:flex-start;
    text-align:left;
  }
}
