/* =========================================================
   AMH PLAYER V8 — CSS COMPLET
   Popup horizontal bleu pâle + égaliseur premium segmenté
   Compatible avec player.php utilisant les classes .amhp7
   ========================================================= */

:root{
  --amhp7-blue:#5ba8f5;
  --amhp7-blue-dark:#3f8fe0;
  --amhp7-blue-deep:#2f7fd6;
  --amhp7-bg:#f5faff;
  --amhp7-card:#ffffff;
  --amhp7-ink:#1f3e63;
  --amhp7-muted:#6e8eaf;
  --amhp7-line:#d7e9fa;
  --amhp7-eq-bg:#07111f;
}

.amhp7[hidden]{display:none!important}

.amhp7{
  position:fixed;
  inset:0;
  z-index:100000;
  display:grid;
  place-items:center;
  padding:20px;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  color:var(--amhp7-ink);
}

.amhp7-backdrop{
  position:absolute;
  inset:0;
  background:rgba(7,20,38,.38);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
}

.amhp7-panel{
  position:relative;
  width:min(720px,calc(100vw - 40px));
  max-height:calc(100dvh - 40px);
  overflow:auto;
  background:linear-gradient(145deg,rgba(255,255,255,.99),rgba(239,248,255,.99));
  border:1px solid var(--amhp7-line);
  border-radius:26px;
  box-shadow:0 30px 90px rgba(31,92,155,.30);
  animation:amhp7Open .22s ease-out;
  scrollbar-width:thin;
  scrollbar-color:rgba(91,168,245,.55) transparent;
}

@keyframes amhp7Open{
  from{opacity:0;transform:scale(.94) translateY(12px)}
  to{opacity:1;transform:none}
}

.amhp7-topbar{
  position:sticky;
  top:0;
  z-index:4;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:11px 15px;
  border-bottom:1px solid var(--amhp7-line);
  background:rgba(239,248,255,.96);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}

.amhp7-tabs{
  display:flex;
  gap:6px;
  overflow-x:auto;
  scrollbar-width:none;
}

.amhp7-tabs::-webkit-scrollbar{display:none}
.amhp7 button{font:inherit}

.amhp7-tabs button,
.amhp7-window-actions button,
.amhp7-controls button,
.amhp7-actions button,
.amhp7-drawer-head button{
  border:0;
  cursor:pointer;
}

.amhp7-tabs button{
  white-space:nowrap;
  background:transparent;
  color:var(--amhp7-ink);
  padding:8px 13px;
  border-radius:999px;
  font-size:12px;
  font-weight:850;
}

.amhp7-tabs button.is-active{
  background:var(--amhp7-blue);
  color:#fff;
}

.amhp7-window-actions{
  display:flex;
  gap:7px;
  flex:0 0 auto;
}

.amhp7-window-actions button{
  width:32px;
  height:32px;
  border-radius:50%;
  background:#fff;
  color:var(--amhp7-ink);
  font-size:19px;
  box-shadow:0 5px 16px rgba(45,105,160,.10);
}

.amhp7-content{
  display:grid;
  grid-template-columns:160px minmax(0,1fr);
  gap:22px;
  padding:22px;
}

.amhp7-cover-link{
  width:160px;
  height:160px;
  border-radius:20px;
  overflow:hidden;
  display:block;
  box-shadow:0 15px 34px rgba(63,143,224,.20);
}

.amhp7-cover-link img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.amhp7-main{min-width:0}

.amhp7-heading{
  display:flex;
  justify-content:space-between;
  gap:14px;
}

.amhp7-title,
.amhp7-artist{
  display:block;
  text-decoration:none;
}

.amhp7-title{
  font-size:clamp(25px,3vw,34px);
  font-weight:900;
  line-height:1.05;
  color:var(--amhp7-ink);
}

.amhp7-artist{
  font-size:17px;
  color:#5d7da4;
  margin-top:7px;
  font-weight:750;
}

.amhp7-meta{
  color:var(--amhp7-muted);
  margin-top:7px;
  font-size:13px;
}

.amhp7-live{
  display:inline-block;
  margin-top:10px;
  background:#d70f35;
  color:#fff;
  padding:6px 11px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
}

.amhp7-actions{
  display:flex;
  gap:6px;
  align-items:flex-start;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.amhp7-actions button,
.amhp7-actions a{
  border:1px solid var(--amhp7-line);
  background:#fff;
  color:var(--amhp7-blue-deep);
  padding:8px 10px;
  border-radius:10px;
  text-decoration:none;
  font-size:11px;
  font-weight:850;
  white-space:nowrap;
}

.amhp7-actions a[hidden]{display:none!important}

/* ÉGALISEUR V8 — canvas segmenté multicolore */
.amhp7-equalizer{
  height:96px;
  margin-top:14px;
  overflow:hidden;
  border-radius:14px;
  position:relative;
  isolation:isolate;
  background:
    radial-gradient(circle at 50% 95%,rgba(34,211,238,.14),transparent 58%),
    linear-gradient(180deg,#091423 0%,var(--amhp7-eq-bg) 100%);
  border:1px solid rgba(91,168,245,.20);
  box-shadow:
    inset 0 0 30px rgba(34,211,238,.07),
    0 8px 22px rgba(7,20,38,.12);
}

.amhp7-equalizer::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:repeating-linear-gradient(
    0deg,
    rgba(255,255,255,.018) 0,
    rgba(255,255,255,.018) 1px,
    transparent 1px,
    transparent 6px
  );
}

.amhp7-equalizer::after{
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  bottom:6px;
  height:1px;
  z-index:2;
  background:rgba(103,232,249,.24);
  box-shadow:0 0 10px rgba(34,211,238,.28);
  pointer-events:none;
}

.amhp7-equalizer canvas{
  position:relative;
  z-index:1;
  display:block;
  width:100%;
  height:100%;
}

.amhp7-progress-row{
  display:grid;
  grid-template-columns:44px 1fr 44px;
  gap:9px;
  align-items:center;
  color:var(--amhp7-muted);
  font-size:12px;
}

.amhp7 input[type=range]{
  width:100%;
  accent-color:var(--amhp7-blue);
}

.amhp7-controls{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:13px;
  gap:12px;
}

.amhp7-control-group,
.amhp7-volume{
  display:flex;
  align-items:center;
  gap:8px;
}

.amhp7-controls button{
  width:39px;
  height:39px;
  border-radius:50%;
  background:#e8f4ff;
  color:var(--amhp7-ink);
  font-size:16px;
}

.amhp7-controls button.is-active{
  background:var(--amhp7-blue);
  color:#fff;
}

.amhp7-play{
  width:54px!important;
  height:54px!important;
  background:linear-gradient(135deg,var(--amhp7-blue),var(--amhp7-blue-dark))!important;
  color:#fff!important;
  font-size:21px!important;
  box-shadow:0 10px 24px rgba(63,143,224,.34);
}

.amhp7-volume input{width:100px}
.amhp7-volume span{font-size:12px;color:var(--amhp7-muted)}

.amhp7-drawer{
  border-top:1px solid var(--amhp7-line);
  padding:14px 22px 18px;
  background:#f4faff;
}

.amhp7-drawer-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.amhp7-drawer-head button{
  background:var(--amhp7-blue);
  color:#fff;
  padding:8px 12px;
  border-radius:9px;
  font-weight:850;
}

.amhp7-list{
  max-height:180px;
  overflow:auto;
  margin-top:9px;
}

.amhp7-list-item{
  display:grid;
  grid-template-columns:42px 1fr auto;
  gap:9px;
  align-items:center;
  padding:7px;
  border-bottom:1px solid var(--amhp7-line);
}

.amhp7-list-item img{
  width:42px;
  height:42px;
  border-radius:8px;
  object-fit:cover;
}

.amhp7-list-item button{
  border:0;
  background:transparent;
  cursor:pointer;
}

.amhp7-mini{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:100001;
  display:none;
  width:390px;
  max-width:calc(100vw - 24px);
  border:1px solid var(--amhp7-line);
  border-radius:18px;
  background:#f8fcff;
  box-shadow:0 16px 48px rgba(31,92,155,.26);
  padding:9px;
  align-items:center;
  gap:11px;
  color:var(--amhp7-ink);
  text-align:left;
}

.amhp7-mini img{
  width:50px;
  height:50px;
  border-radius:11px;
  object-fit:cover;
}

.amhp7-mini>span{
  display:flex;
  flex-direction:column;
  min-width:0;
  flex:1;
}

.amhp7-mini strong,
.amhp7-mini small{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.amhp7-mini small{
  color:var(--amhp7-muted);
  margin-top:3px;
}

.amhp7-mini b{
  width:39px;
  height:39px;
  border-radius:50%;
  background:var(--amhp7-blue);
  color:#fff;
  display:grid;
  place-items:center;
}

.amhp7-mini i{font-style:normal}
.amhp7.is-minimized{display:block;pointer-events:none}
.amhp7.is-minimized .amhp7-backdrop,
.amhp7.is-minimized .amhp7-panel{display:none}
.amhp7.is-minimized .amhp7-mini{display:flex;pointer-events:auto}

/* Player déplaçable sur ordinateur */
@media(min-width:761px){
  .amhp7-topbar{
    cursor:move;
    user-select:none;
    touch-action:none;
  }
  .amhp7-topbar button,
  .amhp7-topbar a{cursor:pointer}
  .amhp7.is-dragging .amhp7-panel{transition:none!important}
  .amhp7.is-dragging .amhp7-topbar{cursor:grabbing}
}

@media(max-width:760px){
  .amhp7{padding:12px}
  .amhp7-panel{
    width:min(620px,calc(100vw - 24px));
    max-height:calc(100dvh - 24px);
  }
  .amhp7-content{
    grid-template-columns:120px minmax(0,1fr);
    gap:16px;
    padding:18px;
  }
  .amhp7-cover-link{
    width:120px;
    height:120px;
    border-radius:17px;
  }
  .amhp7-actions{display:none}
  .amhp7-title{font-size:25px}
  .amhp7-equalizer{height:82px}
  .amhp7-volume input{width:85px}
}

@media(max-width:560px){
  .amhp7{
    padding:0;
    place-items:end center;
  }

  .amhp7-panel{
    width:100%;
    max-height:92dvh;
    border-radius:22px 22px 0 0;
    border-bottom:0;
  }

  .amhp7-topbar{padding:9px 10px}
  .amhp7-tabs button{font-size:10px;padding:7px 9px}
  .amhp7-window-actions button{width:30px;height:30px}

  .amhp7-content{
    grid-template-columns:92px minmax(0,1fr);
    gap:12px;
    padding:14px;
  }

  .amhp7-cover-link{
    width:92px;
    height:92px;
    border-radius:14px;
  }

  .amhp7-heading{display:block}
  .amhp7-title{font-size:20px}
  .amhp7-artist{font-size:13px;margin-top:4px}
  .amhp7-meta{font-size:11px;margin-top:5px}
  .amhp7-live{font-size:9px;padding:5px 8px;margin-top:7px}

  .amhp7-equalizer{
    grid-column:1/-1;
    height:74px;
    margin-top:4px;
    border-radius:12px;
  }

  .amhp7-progress-row{
    grid-column:1/-1;
    grid-template-columns:38px 1fr 38px;
    font-size:11px;
  }

  .amhp7-controls{
    grid-column:1/-1;
    flex-direction:column;
    margin-top:8px;
    gap:10px;
  }

  .amhp7-control-group{
    width:100%;
    justify-content:center;
    gap:6px;
  }

  .amhp7-controls button{
    width:36px;
    height:36px;
    font-size:15px;
  }

  .amhp7-play{
    width:48px!important;
    height:48px!important;
  }

  .amhp7-volume{
    width:100%;
    justify-content:center;
  }

  .amhp7-volume input{width:min(170px,52vw)}
  .amhp7-drawer{padding:11px 14px 14px}
  .amhp7-list{max-height:145px}
  .amhp7-mini{
    right:8px;
    bottom:8px;
    width:calc(100vw - 16px);
  }
}
