/* Habillage cohérent avec Radio Istres : bleu nuit, bleu radio et touches dorées. */
body{background:linear-gradient(135deg,rgba(2,20,42,.96),rgba(9,49,76,.9)),url('../img/bakapp/app-background.png') center/cover fixed;background-blend-mode:normal}
.track-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.track-card{background:rgba(16,42,64,.94);border-color:#28516a}
.track-body{padding:13px}
.track-card h3{font-size:15px}
.track-artist{font-size:12px}
.account-divider{display:flex;align-items:center;gap:10px;margin:18px 0 5px;color:#8eaabd;font-size:12px}.account-divider::before,.account-divider::after{content:"";height:1px;flex:1;background:#39566c}.account-divider span{padding:0 4px}
.modal form+.account-divider{margin-top:20px}
@media(max-width:700px){.track-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}
.modal{overflow:hidden;padding:24px}.modal-view[hidden]{display:none}.account-choice{display:grid;gap:12px;margin:26px 0 12px}.choice-button{width:100%;min-height:52px;font-size:14px}.modal-back{display:block;margin:13px auto 0}.modal form{gap:5px}.modal form>label{margin-top:3px}.modal form>input{padding:9px}.modal form>.button{margin-top:7px}.modal .fine-print{margin-top:10px}
.now-playing-modal{width:min(390px,calc(100vw - 32px));border:1px solid #3e6177;border-radius:18px;background:#102c44;color:var(--text);padding:26px;text-align:center;box-shadow:0 24px 90px #0009}.now-playing-modal::backdrop{background:#020c19cf;backdrop-filter:blur(6px)}.now-playing-modal .modal-close{top:12px;right:12px}.player-modal-cover{display:block;width:220px;height:180px;object-fit:cover;border-radius:12px;margin:2px auto 16px;background:#193650}.now-playing-modal h2{font-size:20px;margin:0 0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.now-playing-modal>p:not(.eyebrow){margin:0 0 18px;color:var(--muted);font-size:13px}.player-spectrum{height:64px;display:flex;align-items:end;justify-content:center;gap:3px;padding:8px 10px;border:1px solid #4c5f70;border-radius:7px;background:#081d31;margin-bottom:20px}.player-spectrum i{display:block;width:5px;height:20%;border-radius:2px 2px 0 0;background:#29cf91;box-shadow:0 0 5px #29cf9166}.player-spectrum.playing i{animation:spectrumPulse .72s ease-in-out infinite alternate}.player-spectrum i:nth-child(2n){animation-delay:-.18s}.player-spectrum i:nth-child(3n){animation-delay:-.4s}.player-spectrum i:nth-child(4n){animation-delay:-.55s}@keyframes spectrumPulse{from{height:18%;background:#29cf91}to{height:92%;background:#f1bf4b}}.player-modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.player-modal-actions .button{width:100%;min-height:45px}
.demo-strip{display:none!important}
.member-card { display:none !important; }
.playlist-greeting{margin:0;color:#c9dce8;font-size:13px;line-height:1.4;text-align:center}.playlist-greeting strong{color:#fff}
@media(max-width:700px){.playlist-greeting{display:none!important}}

/* Reprise exacte du spectre du lecteur radio (index.html) : 36 colonnes, 10 cellules, mêmes couleurs. */
.player-spectrum{
  height:44px!important;width:100%;display:flex;align-items:end;justify-content:stretch;gap:3px;
  margin-bottom:20px;padding:5px 6px!important;overflow:hidden;box-sizing:border-box;
  border-radius:3px!important;background:rgba(32,7,13,.92)!important;
  border:1px solid rgba(255,76,46,.58)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.04)!important;
}
.player-spectrum .spectrum-bar{
  flex:1 1 4px;min-width:3px;max-width:10px;height:38px;display:grid;
  grid-template-rows:repeat(10,1fr);gap:2px;align-items:stretch;
}
.player-spectrum .spectrum-cell{
  display:block;min-height:2px;border-radius:1px;
  background:rgba(7,63,120,.16);box-shadow:inset 0 0 0 1px rgba(255,255,255,.18);
  transition:background-color 80ms linear,box-shadow 80ms linear,opacity 80ms linear;
}
.player-spectrum .spectrum-cell.is-on{background:#19c37d;box-shadow:0 0 6px rgba(25,195,125,.42)}
.player-spectrum .spectrum-cell.is-warm{background:#f6b400;box-shadow:0 0 6px rgba(246,180,0,.42)}
.player-spectrum .spectrum-cell.is-hot{background:#ef4444;box-shadow:0 0 6px rgba(239,68,68,.42)}
.player-spectrum.playlist-player-spectrum{height:44px!important;margin:0;padding:5px 6px!important}
.hero{padding:16px 0 14px;gap:28px;align-items:start}
.hero-copy h1{font-size:clamp(32px,3vw,38px);line-height:1.04;letter-spacing:-.9px;margin-bottom:10px}
.hero-copy .hero-description{font-size:14px;line-height:1.35;margin-bottom:11px}
.hero-copy .hero-details{font-size:10px;gap:8px 18px}
@media(max-width:700px){.hero{padding:18px 0 16px}.hero-copy h1{font-size:32px}}

/* Spectre playlist aligné sur celui de la radio : barres segmentées vert/jaune. */
.player-spectrum{height:70px;align-items:stretch;justify-content:center;gap:4px;padding:9px 12px;background:#081d31;border:1px solid #4c5f70;border-radius:7px;overflow:hidden}
.player-spectrum i{align-self:end;width:6px;height:100%;transform:scaleY(.22);transform-origin:bottom;border-radius:2px 2px 0 0;background:repeating-linear-gradient(to top,#29cf91 0 5px,#081d31 5px 8px);box-shadow:0 0 5px #29cf9166;animation:none}
.player-spectrum i:nth-child(2n){transform:scaleY(.58);background:repeating-linear-gradient(to top,#f1bf4b 0 5px,#081d31 5px 8px)}
.player-spectrum i:nth-child(3n){transform:scaleY(.38)}
.player-spectrum i:nth-child(4n){transform:scaleY(.78);background:repeating-linear-gradient(to top,#f1bf4b 0 5px,#081d31 5px 8px)}
.player-spectrum.playing i{animation:playlistSpectrumPulse .72s ease-in-out infinite alternate}
.player-spectrum.playing i:nth-child(2n){animation-delay:-.18s}
.player-spectrum.playing i:nth-child(3n){animation-delay:-.4s}
.player-spectrum.playing i:nth-child(4n){animation-delay:-.55s}
@keyframes playlistSpectrumPulse{from{transform:scaleY(.18)}to{transform:scaleY(1)}}
@media(prefers-reduced-motion:reduce){.player-spectrum.playing i{animation:none}}
.forgot-password{justify-self:end;padding:2px 0;font-size:12px;text-decoration:underline}
/* Same segmented matrix as the live radio spectrum. */
.player-spectrum{display:flex;align-items:flex-end;justify-content:center;gap:3px;padding:8px 10px;overflow:hidden}
.playlist-spectrum-bar{display:flex;flex:1 1 0;max-width:7px;height:100%;flex-direction:column-reverse;gap:2px;min-width:2px}
.playlist-spectrum-cell{display:block;flex:1 1 0;min-height:2px;border-radius:1px;background:#362630;opacity:.82}
.player-spectrum .playlist-spectrum-bar{display:flex;flex:1 1 0;max-width:7px;height:100%;flex-direction:column-reverse;gap:2px;min-width:2px}
.player-spectrum .playlist-spectrum-cell{align-self:stretch;width:auto;height:auto;min-height:2px;transform:none;border-radius:1px;background:#362630;opacity:.82;box-shadow:none}
.player-spectrum .playlist-spectrum-bar .playlist-spectrum-cell:nth-child(n){align-self:stretch;width:auto;height:auto;transform:none;background:#362630;box-shadow:none}
.player-spectrum .playlist-spectrum-bar .playlist-spectrum-cell.is-on:nth-child(n){background:#20d493;box-shadow:0 0 4px #20d49355}
.player-spectrum .playlist-spectrum-bar .playlist-spectrum-cell.is-warm:nth-child(n){background:#f4c341;box-shadow:0 0 4px #f4c34155}
.player-spectrum .spectrum-bar{flex:1 1 4px;min-width:3px;max-width:10px;height:38px;display:grid;grid-template-rows:repeat(10,1fr);gap:2px;align-items:stretch}
.player-spectrum .spectrum-cell{display:block;min-height:2px;border-radius:1px;background:rgba(7,63,120,.16);box-shadow:inset 0 0 0 1px rgba(255,255,255,.18);transition:background-color 80ms linear,box-shadow 80ms linear,opacity 80ms linear}
.player-spectrum .spectrum-cell.is-on{background:#19c37d;box-shadow:0 0 6px rgba(25,195,125,.42)}
.player-spectrum .spectrum-cell.is-warm{background:#f6b400;box-shadow:0 0 6px rgba(246,180,0,.42)}
.player-spectrum .spectrum-cell.is-hot{background:#ef4444;box-shadow:0 0 6px rgba(239,68,68,.42)}
.playlist-spectrum-cell.is-on{background:#20d493;box-shadow:0 0 4px #20d49355}
.playlist-spectrum-cell.is-warm{background:#f4c341;box-shadow:0 0 4px #f4c34155}
.player-spectrum.playing .playlist-spectrum-cell.is-on,.player-spectrum.playing .playlist-spectrum-cell.is-warm{animation:playlistCellPulse .72s ease-in-out infinite alternate;animation-delay:var(--delay)}
@keyframes playlistCellPulse{from{opacity:.48;transform:scaleX(.7)}to{opacity:1;transform:scaleX(1)}}
.player-spectrum.playing .playlist-spectrum-cell{animation:none!important;transform:none}

.button-my-playlist{background:linear-gradient(110deg,#0758c7,#a91cba,#e35a76,#0758c7);background-size:260% 100%;color:#fff;border:1px solid #f19cff;animation:myPlaylistHeaderGlow 5s ease-in-out infinite;padding-inline:13px}
.button-my-playlist span{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#fff;color:#193b68;font-size:11px}
@keyframes myPlaylistHeaderGlow{0%,100%{background-position:0 50%;box-shadow:0 0 8px #b82dca55}50%{background-position:100% 50%;box-shadow:0 0 16px #e35a7688}}
.track-actions{grid-template-columns:1fr 1fr 34px}
.track-actions .add-playlist{padding:7px 4px;font-size:20px;line-height:1;color:#fff;background:#17658e;border-color:#3aaee0}
.track-actions .add-playlist.is-added{background:#29a873;border-color:#72e2ae}
.my-playlist-dialog{width:min(520px,calc(100vw - 28px))}
.playlist-empty{padding:22px 10px;text-align:center;color:var(--muted);font-size:13px}
.my-playlist-list{display:grid;gap:9px;max-height:55vh;overflow:auto}
.my-playlist-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px 12px;border:1px solid #35566d;border-radius:9px;background:#0c263c}
.my-playlist-item strong,.my-playlist-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.my-playlist-item strong{font-size:14px}.my-playlist-item span{margin-top:3px;color:var(--muted);font-size:12px}
.remove-playlist{border:0;border-radius:7px;background:#632b3f;color:#ffd7df;font-size:18px;min-width:38px;min-height:36px;cursor:pointer}.remove-playlist:hover{background:#8d3450}
.playlist-player{display:grid;grid-template-columns:58px minmax(0,1fr);gap:10px 12px;align-items:center;margin:18px 0;padding:12px;border:1px solid #3b6279;border-radius:11px;background:#0a2237}.playlist-player>img{width:58px;height:58px;object-fit:cover;border-radius:7px;background:#193650}.playlist-player-info{min-width:0}.playlist-player-info strong,.playlist-player-info span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.playlist-player-info strong{font-size:14px}.playlist-player-info span{font-size:12px;color:var(--muted);margin-top:4px}.playlist-player-spectrum{grid-column:1/-1;width:100%;margin:0;height:48px;padding:6px 10px}.playlist-player-controls{grid-column:1/-1;display:grid;grid-template-columns:44px 1fr 44px;gap:8px}.playlist-player-controls .button{min-height:40px;padding:7px;font-size:13px}.my-playlist-item{grid-template-columns:minmax(0,1fr) auto auto}.my-playlist-item>div{cursor:pointer}.listen-playlist{border:1px solid #3aaee0;border-radius:7px;background:#17658e;color:#fff;min-width:38px;min-height:36px;cursor:pointer}.listen-playlist:hover{background:#2180ad}
@media(max-width:700px){nav{gap:6px}.button-my-playlist{padding:8px 9px;font-size:10px}.track-actions{grid-template-columns:1fr 1fr 34px}.my-playlist-list{max-height:48vh}}

/* Titre aligné sur une ligne lorsque la largeur le permet. */
.hero:has(#supportCard[hidden]){grid-template-columns:1fr}
.hero-copy h1{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 .22em;line-height:1.15}
.hero-copy h1 .title-main{color:inherit}
.hero-copy h1>span{white-space:nowrap}
.hero-copy .hero-description{max-width:760px}
@media(max-width:700px){.hero-copy h1{font-size:clamp(24px,6.5vw,32px)}}
.my-playlist-heading{display:flex;align-items:center;gap:12px;margin:0 0 8px}.my-playlist-heading h2{margin:0;min-width:0}.my-playlist-member{font-size:.52em;font-weight:600;color:#65c6ed;white-space:nowrap}.my-playlist-download{margin-left:auto;flex:0 0 auto;min-height:36px;padding:7px 11px;font-size:12px}
.my-playlist-item{grid-template-columns:minmax(0,1fr) auto auto auto}.listen-playlist,.download-playlist{border:1px solid #3aaee0;border-radius:7px;background:#17658e;color:#fff;min-width:38px;min-height:36px;cursor:pointer}.listen-playlist:hover,.download-playlist:hover{background:#2180ad}.download-playlist{font-size:18px}
@media(max-width:700px){.my-playlist-heading{align-items:flex-start;flex-wrap:wrap}.my-playlist-download{margin-left:0}.my-playlist-member{font-size:.48em}}
/* Mobile cards: give the playlist action its own complete row. */
.add-playlist-label{display:none}
@media(max-width:700px){
  .track-body{padding:10px}
  .track-actions{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:6px}
  .track-actions .button{min-width:0;min-height:44px;padding:8px 3px;font-size:10px;gap:3px}
  .track-actions .add-playlist{grid-column:1/-1;width:100%;font-size:18px;gap:7px}
  .track-actions .add-playlist-label{display:inline;font-size:12px}
}
@media(max-width:380px){
  .track-actions{grid-template-columns:minmax(0,1fr)}
}

.library-play-heading{display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px}
.library-play-heading #shuffleAll{white-space:nowrap;min-height:44px;gap:8px}
.random-playback-controls{margin:0 0 12px}
.random-playback-controls p{font-size:12px;color:var(--muted);margin:0 0 10px}
.random-playback-controls>div{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.random-playback-controls .button{min-width:0;padding:8px 6px;font-size:12px;min-height:44px}
.now-playing-modal{max-height:calc(100dvh - 24px);overflow:auto}
@media(max-width:700px){.library-play-heading{gap:12px}.library-play-heading #shuffleAll{font-size:12px}}

/* Keep catalogue title, count and shuffle action on one mobile row. */
@media(max-width:700px){
  .library>.section-heading,.library>.section-heading>div{width:100%;min-width:0}
  .library .library-play-heading{display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:6px;width:100%;min-width:0}
  .library .library-play-heading h2{display:flex;align-items:center;gap:5px;white-space:nowrap;font-size:16px;letter-spacing:-.4px;min-width:0}
  .library .library-play-heading #catalogCount{flex:none;margin-left:0;padding:4px 5px;font-size:9px;letter-spacing:0}
  .library .library-play-heading #shuffleAll{flex:none;min-height:44px;padding:7px 8px;font-size:10px;gap:4px;letter-spacing:0}
}
@media(max-width:360px){
  .library .library-play-heading{gap:4px}
  .library .library-play-heading h2{font-size:13px;gap:3px}
  .library .library-play-heading #catalogCount{font-size:8px;padding:3px}
  .library .library-play-heading #shuffleAll{padding:6px;font-size:9px;gap:3px}
}

/* Keep catalogue title, count and shuffle action on one mobile row. */
.library .library-play-heading #catalogCount{display:inline-block;border:1px solid #ccc;box-sizing:border-box;text-align:center;white-space:nowrap}
@media(max-width:700px){
  .library>.section-heading,.library>.section-heading>div{width:100%;min-width:0}
  .library .library-play-heading{display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:6px;width:100%;min-width:0}
  .library .library-play-heading h2{display:flex;align-items:center;gap:5px;white-space:nowrap;font-size:16px;letter-spacing:-.4px;min-width:0}
  .library .library-play-heading #catalogCount{flex:none;width:auto;margin-left:0;padding:4px 3px;font-size:9px;letter-spacing:0}
  .library .library-play-heading #shuffleAll{flex:none;min-height:44px;padding:7px 8px;font-size:10px;gap:4px;letter-spacing:0}
}
@media(max-width:360px){
  .library .library-play-heading{gap:4px}
  .library .library-play-heading h2{font-size:13px;gap:3px}
  .library .library-play-heading #catalogCount{width:auto;font-size:8px;padding:3px}
  .library .library-play-heading #shuffleAll{padding:6px;font-size:9px;gap:3px}
}

/* Temporary download pause: controls keep their size and remain clickable for help. */
.download-unavailable{opacity:.5;cursor:not-allowed!important}
.download-notice-modal h2{padding-right:0}
.download-notice-modal .modal-copy{margin-bottom:24px}

.download-preparation{max-width:min(460px,calc(100vw - 32px));text-align:center;border:1px solid #39647a;border-radius:18px;background:#09283b;color:#edf7ff;padding:28px}
.download-preparation::backdrop{background:rgba(0,12,24,.76)}
.download-preparation-track{overflow-wrap:anywhere;color:#b8d5e7}
.download-preparation progress{display:block;width:100%;height:16px;margin:22px 0 10px;accent-color:#f5cb62;border:0;border-radius:10px;overflow:hidden;background:#173c52}
.download-preparation progress::-webkit-progress-bar{background:#173c52;border-radius:10px}
.download-preparation progress::-webkit-progress-value{background:#f5cb62;border-radius:10px}
.download-preparation progress::-moz-progress-bar{background:#f5cb62}
.download-preparation-spinner{width:38px;height:38px;margin:0 auto 18px;border:4px solid #315467;border-top-color:#f5cb62;border-radius:50%;animation:download-preparation-spin .9s linear infinite}
@keyframes download-preparation-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.download-preparation-spinner{animation:none}}

/* Keep the personal playlist within the viewport and scroll all its tracks. */
.my-playlist-dialog[open]{display:flex;flex-direction:column;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overflow-y:auto}
.my-playlist-dialog> :not(.my-playlist-list){flex-shrink:0}
.my-playlist-dialog .my-playlist-list{flex:0 1 auto;min-height:100px;max-height:55vh;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.my-playlist-dialog .my-playlist-item{min-width:0}
/* Compact covers alongside titles, without reducing the action buttons. */
.my-playlist-track-info{display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:9px;align-items:center;min-width:0}
.my-playlist-thumbnail{grid-row:1/3;width:40px;height:40px;object-fit:cover;border-radius:5px;background:#193650}
.my-playlist-track-info strong,.my-playlist-track-info span{grid-column:2;min-width:0}
@media(max-width:420px){.my-playlist-item{gap:6px;padding:9px 8px}.my-playlist-track-info{grid-template-columns:32px minmax(0,1fr);column-gap:6px}.my-playlist-thumbnail{width:32px;height:32px}}
/* Personal playlist playback order switch. */
.playlist-player-controls{grid-template-columns:36px minmax(0,1fr) 132px 36px}
.playlist-order-switch{position:relative;display:grid;grid-template-columns:1fr 1fr;align-items:center;isolation:isolate;border:1px solid #4b687e;border-radius:20px;background:#082239;color:#c4d4df;padding:3px;font-size:11px;font-weight:700;min-height:40px}
.playlist-order-switch::before{content:"";position:absolute;z-index:-1;left:3px;top:3px;bottom:3px;width:calc(50% - 3px);border-radius:16px;background:#f5cb62;transition:transform .2s}
.playlist-order-switch[aria-checked="true"]::before{transform:translateX(100%)}
.playlist-order-switch[aria-checked="false"] span:first-child,.playlist-order-switch[aria-checked="true"] span:last-child{color:#102c44}
@media(max-width:520px){.playlist-player-controls{grid-template-columns:36px minmax(0,1fr) 36px}.playlist-order-switch{grid-row:2;grid-column:2}.playlist-player-controls #myPlaylistNext{grid-row:1;grid-column:3}}
@media(prefers-reduced-motion:reduce){.playlist-order-switch::before{transition:none}}
