:root{
  --bg1:#07111f;
  --bg2:#020617;
  --bg3:#10192d;
  --text:#f8fafc;
  --muted:#a8b3c7;
  --card:rgba(255,255,255,.06);
  --border:rgba(255,255,255,.10);
  --pink:#ff2e88;
  --cyan:#2dd4bf;
  --shadow:0 18px 60px rgba(0,0,0,.35);
}

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

body{
  font-family:"Inter",sans-serif;
  color:var(--text);
  background:linear-gradient(135deg,var(--bg1),var(--bg2) 55%,var(--bg3));
}

/* ===== BACKGROUND ===== */

.page-bg{
  position:fixed;
  inset:0;
  z-index:-1;
  background:
    radial-gradient(circle at 14% 18%, rgba(255,46,136,.18), transparent 28%),
    radial-gradient(circle at 76% 20%, rgba(45,212,191,.16), transparent 24%);
  filter:blur(10px);
}

/* ===== LAYOUT ===== */

.app-shell{
  width:min(1400px,calc(100% - 30px));
  margin:auto;
  padding:30px 0 50px;
}

/* ===== HERO ===== */

.hero h1{
  font-size:clamp(2.5rem,5vw,4.5rem);
  line-height:1;
  margin:15px 0;
}

.hero-badge{
  display:inline-block;
  padding:10px 15px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid var(--border);
  font-weight:800;
}

.hero-text{
  color:var(--muted);
  max-width:700px;
}

.hero-actions{
  display:flex;
  gap:12px;
  margin-top:20px;
}

/* ===== BUTTONS ===== */

.ghost-btn{
  cursor:pointer;
  padding:12px 18px;
  border-radius:15px;
  background:rgba(255,255,255,.08);
  color:#fff;
  font-weight:700;
  text-decoration:none;
  border:none;
  transition:.2s;
}

.ghost-btn:hover{
  background:rgba(255,255,255,.15);
}

/* ✅ focus TV */
.ghost-btn:focus{
  outline:3px solid var(--cyan);
}

/* ===== NAVBAR ===== */

.top-nav{
  position:sticky;
  top:0;
  z-index:1000;

  display:flex;
  justify-content:space-between;
  align-items:center;

  padding:10px 20px;
  background:rgba(0,0,0,.85);
  backdrop-filter:blur(10px);
}

.top-nav button{
  background:transparent;
  border:none;
  color:white;
  font-size:14px;
  cursor:pointer;
  padding:8px 12px;
  border-radius:8px;
  transition:.2s;
}

.top-nav button:hover{
  background:rgba(255,255,255,.1);
}

.nav-center{
  display:flex;
  gap:10px;
}

/* ===== SEARCH ===== */

.input-wrap{
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 16px;
  height:52px;
  border-radius:16px;
  background:rgba(255,255,255,.05);
  border:1px solid var(--border);
  min-width:320px;
}

.input-wrap input{
  background:transparent;
  border:none;
  outline:none;
  color:#fff;
  width:100%;
}

/* ===== SECTIONS ===== */

.section-block{
  padding:20px;
  border-radius:28px;
  background:rgba(255,255,255,.05);
  border:1px solid var(--border);
}

.section-block h2{
  margin:10px 5px;
}

/* ===== NETFLIX ROW ===== */

.row{
  display:flex;
  gap:16px;
  overflow-x:auto;
  padding:10px 5px 20px;
  scroll-behavior:smooth;
}

.row::-webkit-scrollbar{
  height:8px;
}

.row::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.2);
  border-radius:999px;
}

/* ===== CARD ===== */

.row .video-card{
  width:180px;
  flex:0 0 auto;
  transition:.25s ease;
}

/* hover + focus (TV) */
.row .video-card:hover,
.video-card:focus{
  transform:scale(1.08);
  z-index:5;
  outline:3px solid var(--cyan);
}

.video-card{
  overflow:hidden;
  border-radius:18px;
  background:var(--card);
  border:1px solid rgba(255,255,255,.08);
}

/* ===== THUMB ===== */

.video-thumb{
  position:relative;
}

.video-thumb img{
  width:100%;
  height:100px;
  object-fit:cover;
  display:block;
  border-radius:12px;
}

/* ===== BADGES ===== */

.badge{
  position:absolute;
  top:8px;
  left:8px;
  padding:5px 8px;
  border-radius:999px;
  font-size:.7rem;
  font-weight:800;
}

.badge.type-simple { background:#2dd4bf; color:#000; }
.badge.type-double { background:#60a5fa; }
.badge.type-long { background:#f59e0b; }

.duration-badge{
  position:absolute;
  bottom:8px;
  right:8px;
  background:rgba(0,0,0,.8);
  padding:4px 7px;
  border-radius:8px;
  font-size:.7rem;
  font-weight:700;
}

/* ===== CONTENT ===== */

.video-content{
  padding:10px;
}

.video-title{
  margin-bottom:6px;
  font-size:.9rem;
  font-weight:800;
}

.video-desc{
  color:var(--muted);
  font-size:.8rem;
  min-height:40px;
}

/* ===== WATCH BUTTON ===== */

.watch-btn{
  display:inline-block;
  margin-top:10px;
  padding:8px 10px;
  border-radius:10px;
  background:var(--cyan);
  color:#000;
  font-weight:800;
  text-decoration:none;
  font-size:.8rem;
}

/* ✅ focus télécommande */
.watch-btn:focus{
  outline:3px solid #fff;
}

/* ===== POPUP ===== */

.popup-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.75);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
  padding:20px;
  backdrop-filter:blur(6px);
}

.popup-box{
  width:min(1100px,95vw);
  aspect-ratio:16/9;
  position:relative;
  background:#000;
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 25px 80px rgba(0,0,0,.5);
}

.popup-box iframe{
  width:100%;
  height:100%;
}

.close-popup{
  position:absolute;
  top:14px;
  right:14px;
  width:42px;
  height:42px;
  border:none;
  border-radius:999px;
  cursor:pointer;
  background:rgba(0,0,0,.7);
  color:#fff;
}

/* controls */

.popup-controls{
  position:absolute;
  top:10px;
  right:50px;
  display:flex;
  gap:10px;
  z-index:10;
}

.nav-btn, .fullscreen-btn{
  background:rgba(0,0,0,0.6);
  color:white;
  border:none;
  padding:8px 12px;
  cursor:pointer;
  font-size:18px;
}

.prev{
  position:absolute;
  left:10px;
  top:50%;
  transform:translateY(-50%);
}

.next{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
}

/* ===== RESPONSIVE ===== */

@media (max-width:768px){
  .row .video-card{
    width:140px;
  }

  .video-thumb img{
    height:80px;
  }
}

/* ===== ROW WRAPPER ===== */

.row-wrapper{
  position:relative;
  display:flex;
  align-items:center;
}

/* ===== FLÈCHES TV ===== */

.row-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:20;

  width:52px;
  height:52px;

  border:none;
  border-radius:999px;

  background:rgba(0,0,0,.7);
  color:white;

  font-size:28px;
  font-weight:900;

  cursor:pointer;

  transition:.2s;
}

.row-arrow:hover,
.row-arrow:focus{
  background:var(--cyan);
  color:black;
  transform:translateY(-50%) scale(1.1);
  outline:none;
}

.row-arrow.left{
  left:-10px;
}

.row-arrow.right{
  right:-10px;
}

/* cache léger sur mobile */

@media (max-width:768px){
  .row-arrow{
    width:42px;
    height:42px;
    font-size:22px;
  }
}

.video-card:focus{
  transform:scale(1.12);
  z-index:20;

  outline:4px solid white;
  box-shadow:
    0 0 0 4px var(--cyan),
    0 0 40px rgba(45,212,191,.8);

  border-color:var(--cyan);
}

.row{
  scroll-snap-type:x mandatory;
}

.video-card{
  scroll-snap-align:start;
}
