*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:#091a33;color:#e9f1ff}

/* topbar */
.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 14px;
  background:linear-gradient(180deg,rgba(7,12,24,.95),rgba(7,12,24,.6));
  border-bottom:1px solid rgba(255,255,255,.06);
  backdrop-filter:blur(10px);
}
.home{
  text-decoration:none; color:#e9eeff; opacity:.95;
  background:rgba(255,255,255,.06);
  padding:6px 10px; border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
}
.top-title{font-weight:900; letter-spacing:.4px; display:flex; align-items:center; gap:8px}
.dot{color:#ff4c65}
.list-btn{
  width:42px;height:42px;border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:#fff; cursor:pointer;
}
.list-ico{font-size:20px;font-weight:900}

/* background stage */
.stage-bg{position:fixed;inset:0;background:radial-gradient(1200px 800px at 50% 20%, rgba(30,90,180,.35), rgba(9,26,51,.8)), #091a33;z-index:-1}
.stage-bg::after{content:"";position:absolute;inset:0;background-size:cover;background-position:center;filter:blur(28px) saturate(120%) opacity(.35);transform:scale(1.12)}

/* layout desktop */
.layout{
  min-height:calc(100vh - 56px);
  display:grid;
  grid-template-columns:minmax(240px,420px) minmax(320px,1fr) minmax(240px,420px);
  gap:40px;
  align-items:center;
  padding:32px 22px;
}

/* side squares */
.side{
  position:relative;
  height:420px;
  border-radius:26px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  backdrop-filter:blur(8px);
  box-shadow:0 16px 44px rgba(0,0,0,.25);
  padding:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

/* big logo card (NO TITLE) */
.big-card{
  width:100%;
  height:100%;
  border-radius:22px;
  border:0;
  padding:0;
  cursor:pointer;
  overflow:hidden;
  background:rgba(0,0,0,.18);
}
.big-card img{
  width:100%;
  height:100%;
  object-fit:cover;
  transform:scale(1.02);
  transition:transform .25s ease, filter .25s ease;
}
.big-card:hover img{ transform:scale(1.06); filter:saturate(1.12); }

/* arrows (force visible) */
.nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:46px;height:46px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.20);
  background:rgba(0,0,0,.35);
  color:#fff;
  cursor:pointer;
  font-size:30px;
  line-height:1;
  display:flex;align-items:center;justify-content:center;
  z-index:5;
}
.nav-left{ left:12px; }
.nav-right{ right:12px; }
.nav:hover{ background:rgba(255,255,255,.14); }

/* center player */
.center-player{
  text-align:center;
  color:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.cover-wrap{ position:relative; width:300px; height:300px; }
.cover{
  width:100%; height:100%;
  border-radius:26px;
  object-fit:cover;
  box-shadow:0 22px 60px rgba(0,0,0,.30);
}
.badge{
  display:inline-block;
  padding:6px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.14);
  font-weight:700;
  font-size:13px;
}
.station{font-size:30px;font-weight:950; line-height:1.1}
.nowline{
  font-size:14px;opacity:.85;
  max-width:560px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.swipe-text{
  font-size:12px;
  opacity:.75;
  max-width:520px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.18);
}
.play{
  width:84px;height:84px;
  border-radius:50%;
  border:none;
  cursor:pointer;
  background:#fff;
  color:#0a2a58;
  box-shadow:0 14px 34px rgba(0,0,0,.35);
  display:flex; align-items:center; justify-content:center;
  margin-top:6px;
}
.play svg{width:28px;height:28px;fill:currentColor}
.play:active{transform:scale(.98)}

/* drawer */
.drawer{position:fixed;inset:0;background:rgba(0,0,0,.45);backdrop-filter:blur(6px);display:none;z-index:30}
.drawer.open{display:block}
.drawer-panel{
  position:absolute; top:0; right:0;
  width:min(420px, 92vw); height:100%;
  background:rgba(10,20,40,.92);
  border-left:1px solid rgba(255,255,255,.10);
  box-shadow:-20px 0 60px rgba(0,0,0,.45);
  display:flex; flex-direction:column;
}
.drawer-head{padding:14px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.08)}
.drawer-title{font-weight:900}
.close{width:38px;height:38px;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:#fff;cursor:pointer}
.drawer-list{padding:12px;overflow:auto;display:grid;grid-template-columns:1fr;gap:10px}
.drawer-item{display:flex;gap:12px;align-items:center;padding:10px;border-radius:16px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.06);cursor:pointer}
.drawer-item:hover{background:rgba(255,255,255,.10)}
.drawer-item.active{outline:2px solid rgba(255,255,255,.55)}
.drawer-item img{width:54px;height:54px;border-radius:14px;object-fit:cover}
.drawer-item .t{font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.drawer-item .s{font-size:12px;opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* responsive */
@media(max-width:1100px){
  .layout{grid-template-columns:1fr;gap:20px;padding:18px;align-items:start}
  .side{display:none}
  .cover-wrap{width:280px;height:280px}
  .station{font-size:24px}
  .swipe-text{display:block}
  /* drawer becomes bottom sheet */
  .drawer-panel{
    right:0; left:0; top:auto; bottom:0;
    width:100%;
    height:min(70vh, 560px);
    border-left:0;
    border-top:1px solid rgba(255,255,255,.10);
    border-radius:22px 22px 0 0;
  }
}

/* desktop volume controls (PC only) */
.desk-ctrls{margin-top:10px;display:flex;align-items:center;justify-content:center;gap:12px}
.mini-btn{width:46px;height:46px;border-radius:999px;border:1px solid rgba(255,255,255,.18);background:rgba(0,0,0,.25);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center}
.mini-btn svg{width:22px;height:22px;fill:currentColor}
#volDesk{width:260px;max-width:40vw}
@media(max-width:1100px){ .desk-ctrls{display:none} }

/* Side card label (station name) */
.card-label{
  position:absolute;
  left:16px; right:16px; bottom:16px;
  padding:10px 12px;
  border-radius:999px;
  background:rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.14);
  backdrop-filter:blur(8px);
  color:#fff;
  font-weight:900;
  letter-spacing:.5px;
  text-align:center;
  text-transform:uppercase;
  font-size:14px;
  pointer-events:none;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.big-card{position:relative}

/* PC: scrolling message (marquee) */
@media (min-width: 1101px){
  .swipe-text{
    width:520px;
    overflow:hidden;
    white-space:nowrap;
    text-transform:uppercase;
    font-weight:900;
    letter-spacing:1.2px;
    opacity:.85;
    padding:8px 0;
  }
  .swipe-text.marquee{
    animation: swipe-marquee 14s linear infinite;
  }
  @keyframes swipe-marquee{
    0%{ text-indent:100%; }
    100%{ text-indent:-120%; }
  }
}
/* Mobile: hide helper text (you wanted arrows text) */
@media (max-width: 1100px){
  .swipe-text{ display:none; }
}

/* smoother cover swap */
.cover, .big-card img, .drawer-item img{transition:opacity .18s ease}

@media (min-width:1101px){
  .swipe-text{
    margin-top:10px;width:520px;overflow:hidden;
    border:1px solid rgba(255,255,255,.12);
    background:rgba(0,0,0,.18);
    border-radius:999px;padding:8px 0;
    text-transform:uppercase;font-weight:900;letter-spacing:1.2px;opacity:.85;
  }
  .swipe-text span{
    display:inline-block;
    padding-left:100%;
    will-change:transform;
    animation: swipe-marquee-x 12s linear infinite;
  }
  @keyframes swipe-marquee-x{
    0%{ transform:translateX(0); }
    100%{ transform:translateX(-100%); }
  }
}
@media (max-width:1100px){ .swipe-text{ display:none; } }

/* Mobile arrows row (between play and message) */
.mobile-arrows{display:none; gap:14px; align-items:center; justify-content:center; margin-top:14px;}
.mobile-arrows .m-arrow{
  width:54px;height:54px;border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.22);
  color:#fff;font-size:34px;line-height:1;
  display:flex;align-items:center;justify-content:center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mobile-arrows .m-arrow:active{transform:scale(.97);}

/* Mobile: show message under play and remove side navigation overlays */
@media (max-width:1100px){
  .mobile-arrows{display:flex;}
  /* hide big side cards arrows (keep swipe by gesture but visual cleaner) */
  .side-card .nav, .side-card .nav-btn, .side-card .arrow, .side-card .arrow-btn{display:none !important;}
  /* show swipe-text on mobile and make it marquee */
  .swipe-text{display:block !important; margin:14px auto 0; width:min(92vw, 520px); overflow:hidden;
    border:1px solid rgba(255,255,255,.12);
    background:rgba(0,0,0,.18);
    border-radius:999px;
    padding:10px 0;
    text-transform:uppercase;
    font-weight:900;
    letter-spacing:1.1px;
    opacity:.9;
  }
  .swipe-text span{
    display:inline-block;
    padding-left:100%;
    will-change:transform;
    animation: swipe-marquee-x 10s linear infinite;
  }
  @keyframes swipe-marquee-x{
    0%{ transform:translateX(0); }
    100%{ transform:translateX(-100%); }
  }
}

/* Mobile marquee: force single line, responsive */
@media (max-width:1100px){
  .swipe-text{
    white-space: nowrap;
    max-width: 92vw;
  }
  .swipe-text span{
    white-space: nowrap;
    padding-left: 100%;
    display: inline-block;
    animation: swipe-marquee-x 9s linear infinite;
  }
}

/* V26: titrage sous les carrés gauche/droite (PC uniquement) */
.side-track{ display:none; }

@media (min-width: 1101px){
  .side-track{
    display:block;
    margin: 12px auto 0;
    width: min(360px, 86%);
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(255,255,255,.95);
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events:none;
  }
  /* éviter toute coupe */
  aside, .side-card, .side-wrap, .stage, .stage-inner { overflow: visible !important; }
}

/* V26.1: Mobile - empêcher les titres longs de casser la mise en page */
@media (max-width:1100px){
  /* ligne titrage (artiste — titre) */
  #songLine, .song-line, .now-song, .meta-line {
    max-width: 92vw !important;
    width: 92vw !important;
    margin-left: auto !important;
    margin-right: auto !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }
  /* nom de la radio */
  #stationName, .station-name, .now-station {
    max-width: 92vw !important;
    width: 92vw !important;
    margin-left: auto !important;
    margin-right: auto !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  /* réserver une hauteur stable pour éviter les sauts */
  #songLine, .song-line, .now-song, .meta-line {
    line-height: 1.2 !important;
    height: 1.2em !important;
  }
}
