/* =========================
   ACCUEIL HSX STORIES MODULE
========================= */

.hsx-wrap{
  max-width:980px;
  margin:30px auto;
}

.hsx-title{
  color:#ff2aa8;
  text-align:center;
  margin-bottom:14px;
}

.hsx-row{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding:10px;
  border-radius:12px;
  background:#0f0f0f;
}

.hsx-chip{
  flex:0 0 110px;
  border:none;
  background:#111;
  border-radius:12px;
  overflow:hidden;
  cursor:pointer;
  padding:0;
}

.hsx-chip img{
  width:110px;
  height:195px;
  object-fit:cover;
  display:block;
}

.hsx-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.88);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:999999;
}

.hsx-overlay.hsx-show{
  display:flex;
}

.hsx-player{
  position:relative;
  width:min(420px,90vw);
  aspect-ratio:9/16;
  background:#000;
  border-radius:20px;
  overflow:hidden;
  border:1px solid rgba(255,42,168,.4);
  box-shadow:
    0 0 40px rgba(255,42,168,.15),
    0 20px 60px rgba(0,0,0,.7);
}

.hsx-video{
  width:100%;
  height:100%;
  object-fit:contain;
  background:#000;
}

.hsx-close{
  position:absolute;
  top:-10px;
  right:15px;
  border:none;
  background:none;
  color:#ff2aa8;
  font-size:28px;
  font-weight:bold;
  cursor:pointer;
  z-index:5;
}

.hsx-close:hover{
  color:#ff2aa8;
  background:none;
  opacity:0.7;
}

/* =========================
   PAGE STORIES
========================= */

.wrap{
  max-width:1100px;
  margin:32px auto 70px;
  padding:0 20px;
}

.wrap h1{
  margin:0 0 6px;
  text-align:center;
  color:#fff;
  font-size:2.3rem;
  font-weight:800;
}

.stories-subtitle{
  margin:0 0 30px;
  text-align:center;
  color:#8d8d8d;
  font-size:.95rem;
}

.stories-layout{
  display:grid;
  grid-template-columns:minmax(300px,420px) minmax(320px,1fr);
  gap:30px;
  align-items:start;
  justify-content:center;
}

.stories-main{
  position:sticky;
  top:90px;
}

.story-date{
  margin:0 0 12px;
  text-align:center;
  color:#fff;
  font-size:.9rem;
  font-weight:700;
  text-transform:capitalize;
}

.player{
  width:100%;
  aspect-ratio:9/16;
  margin:0;
  background:#000;
  overflow:hidden;
  border-radius:22px;
  border:1px solid rgba(255,42,168,.35);
  box-shadow:0 18px 55px rgba(0,0,0,.65),0 0 35px rgba(255,42,168,.08);
}

.player video{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  background:#000;
}

.stories-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:760px;
  overflow-y:auto;
  padding-right:6px;
}

.story-item{
  width:100%;
  display:grid;
  grid-template-columns:74px 1fr;
  gap:14px;
  align-items:center;
  padding:8px;
  border:1px solid #222;
  border-radius:14px;
  background:#111;
  color:#fff;
  cursor:pointer;
  text-align:left;
  transition:border-color .2s ease, background .2s ease, transform .2s ease;
}

.story-item:hover{
  border-color:#ff2aa8;
  background:#151015;
}

.story-item.active{
  border-color:#ff2aa8;
  background:rgba(255,42,168,.09);
  box-shadow:0 0 18px rgba(255,42,168,.10);
}

.story-item img{
  width:74px;
  height:118px;
  object-fit:cover;
  border-radius:10px;
  display:block;
}

.story-item-info{
  min-width:0;
}

.story-item-info strong{
  display:block;
  margin-bottom:7px;
  color:#eee;
  font-size:.95rem;
  line-height:1.3;
}

.story-item-date{
  display:block;
  color:#888;
  font-size:.8rem;
  text-transform:capitalize;
}

.stories-list::-webkit-scrollbar{
  width:6px;
}

.stories-list::-webkit-scrollbar-thumb{
  background:#3a1730;
  border-radius:10px;
}

.empty{
  max-width:500px;
  margin:50px auto;
  padding:30px;
  text-align:center;
  border-radius:18px;
  background:#111;
  border:1px solid #222;
  color:#bbb;
}

@media (max-width:800px){

  .wrap{
    margin-top:22px;
    padding:0 12px;
  }

  .wrap h1{
    font-size:2rem;
  }

  .stories-layout{
    display:block;
  }

  .stories-main{
    position:static;
    max-width:430px;
    margin:0 auto;
  }

  .stories-list{
    flex-direction:row;
    max-height:none;
    overflow-x:auto;
    overflow-y:hidden;
    gap:10px;
    margin-top:18px;
    padding:0 0 10px;
  }

  .story-item{
    flex:0 0 110px;
    display:block;
    padding:5px;
    border-radius:13px;
  }

  .story-item img{
    width:100%;
    height:auto;
    aspect-ratio:9/16;
    border-radius:9px;
  }

  .story-item-info{
    padding:7px 3px 4px;
    text-align:center;
  }

  .story-item-info strong{
    display:none;
  }

  .story-item-date{
    font-size:.72rem;
  }
}

/* FALLBACK */

@supports not (aspect-ratio:1/1){

  .player{
    width:100%;
    max-width:430px;
  }

  .player::before{
    content:"";
    display:block;
    padding-top:177.78%;
  }

  .player video{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
  }
}

