/* ArtiBox Play — styles propres à l'appli d'écoute (le socle vient de /commun/artibox.css).
 * Téléphone d'abord : en-tête, contenu, mini-lecteur flottant au-dessus de la barre d'onglets.
 * Tablette (≥ 768 px) : mêmes repères, plus d'air. Ordinateur (≥ 1 080 px) : barre latérale à gauche,
 * barre de lecture sur toute la largeur en bas. Le grand lecteur reste sombre dans les deux thèmes. */

.play {
  --h-entete: 60px; --onglets: 64px; --mini: 64px; --bas: env(safe-area-inset-bottom, 0px);
  --haut: env(safe-area-inset-top, 0px);
  --lateral: 0px; --barre: 0px;
  --teinte: var(--ab-accent-2);
  --nuit-lecteur: #0c0908;
  --carte-l: 144px;
}
:where(.play) :where(button, a) svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
:where(.play) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:where(.play) a { color: inherit; text-decoration: none; }
.play img { background: var(--ab-fond-2); }
.play h2 { font-size: var(--ab-t-xl); font-weight: 800; letter-spacing: -.025em; }
.play h2.petit { font-size: var(--ab-t-s); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 1079.98px) { .ordi-seulement { display: none !important; } }

body.play { padding-bottom: calc(var(--onglets) + var(--bas) + 28px); overscroll-behavior-y: contain; overflow-x: clip; }
body.play.joue { padding-bottom: calc(var(--onglets) + var(--mini) + var(--bas) + 36px); }
body.play.lecteur-ouvert { overflow: hidden; }

/* --- En-tête -------------------------------------------------------------------------------- */
#entete {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 6px;
  height: calc(var(--h-entete) + var(--haut)); padding: var(--haut) calc(var(--ab-gouttiere) - 8px) 0 var(--ab-gouttiere);
  background: color-mix(in srgb, var(--ab-fond) 84%, transparent);
  backdrop-filter: saturate(1.5) blur(18px); -webkit-backdrop-filter: saturate(1.5) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--ab-bord) 60%, transparent);
  transition: background var(--ab-m-moyen), border-color var(--ab-m-moyen);
}
#entete h1 { flex: 1; min-width: 0; font-size: 1.125rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: opacity var(--ab-m-moyen); }
#retour { margin-left: -10px; }
.logo-entete { width: 30px; height: 30px; border-radius: 9px; margin-right: 4px; }
#retour:not([hidden]) + .logo-entete { display: none; }
#lien-compte[aria-current="page"], #lien-compte.actif { color: var(--ab-accent); }
/* Pages à grand en-tête : la barre devient transparente, le titre apparaît en défilant. */
body.page-detail:not(.defile) #entete { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.page-detail:not(.defile) #titre-page { opacity: 0; }
body.page-detail #retour { background: color-mix(in srgb, var(--ab-fond) 45%, transparent); }

#bandeau-reseau { display: flex; align-items: center; gap: 8px; padding: 10px var(--ab-gouttiere); font-size: var(--ab-t-s); font-weight: 600;
  background: var(--ab-alerte-fond); color: var(--ab-alerte); }
#page { display: block; min-height: 60vh; outline: none; padding: 0 var(--ab-gouttiere); max-width: 1480px; margin: 0 auto; }
.vue { animation: vue-entre var(--ab-m-lent) var(--ab-courbe) both; }
@keyframes vue-entre { from { opacity: 0; transform: translateY(10px); } }

/* --- Sections et rangées horizontales ------------------------------------------------------ */
.sec { margin-top: 28px; }
.sec-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-tete p { color: var(--ab-texte-2); font-size: var(--ab-t-s); margin-top: 4px; }
.defil { display: none; gap: 6px; flex: none; }
.defil button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ab-fond-2); color: var(--ab-texte);
  transition: background var(--ab-m-rapide), opacity var(--ab-m-rapide); }
.defil button:hover { background: var(--ab-bord); }
.defil button svg { width: 20px; height: 20px; }

.rangee { display: grid; grid-auto-flow: column; grid-auto-columns: var(--carte-l); gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  margin: 0 calc(-1 * var(--ab-gouttiere)); padding: 2px var(--ab-gouttiere) 10px; scroll-padding-inline: var(--ab-gouttiere);
  scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.rangee::-webkit-scrollbar { display: none; }
.rangee > * { scroll-snap-align: start; }

/* Cartes de pochette */
.carte { display: flex; flex-direction: column; gap: 4px; min-width: 0; border-radius: 16px; padding: 0; color: inherit;
  transition: background var(--ab-m-moyen), transform var(--ab-m-moyen) var(--ab-courbe); }
.carte img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 12px; margin-bottom: 8px;
  box-shadow: 0 10px 24px -12px rgb(0 0 0 / .55); transition: transform var(--ab-m-moyen) var(--ab-courbe), box-shadow var(--ab-m-moyen); }
.carte strong, .carte small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carte strong { font-size: var(--ab-t-s); font-weight: 700; }
.carte small { color: var(--ab-texte-2); font-size: var(--ab-t-xs); }
.carte.ronde { text-align: center; }
.carte.ronde img { border-radius: 50%; }
.carte:active img { transform: scale(.97); }
@media (hover: hover) {
  .carte:hover img { transform: translateY(-3px); box-shadow: 0 18px 34px -14px rgb(0 0 0 / .6); }
}
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 18px 14px; }

/* Raccourcis de l'accueil (tuiles compactes) */
.raccourcis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.raccourci { display: flex; align-items: center; gap: 10px; min-height: 56px; overflow: hidden; border-radius: 10px;
  background: color-mix(in srgb, var(--ab-texte) 7%, var(--ab-fond)); color: var(--ab-texte); font-size: var(--ab-t-xs); font-weight: 700; line-height: 1.25;
  transition: background var(--ab-m-rapide); }
.raccourci:hover { background: color-mix(in srgb, var(--ab-texte) 12%, var(--ab-fond)); }
.raccourci img { width: 56px; height: 56px; flex: none; object-fit: cover; }
.raccourci span { padding-right: 8px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.salut { padding-top: 18px; }
.salut h2 { font-size: var(--ab-t-2xl); font-weight: 850; letter-spacing: -.035em; }
.salut p { color: var(--ab-texte-2); margin-top: 4px; font-size: var(--ab-t-s); }

/* Radios : grandes cartes dégradées, en direct */
.radio-carte { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  min-height: 168px; padding: 16px; border-radius: 20px; text-align: left; color: #fff;
  background: linear-gradient(140deg, color-mix(in srgb, var(--c1, #8e3b9e) 66%, #000) 0%, var(--c2, #2b1a4a) 100%); text-shadow: 0 1px 2px rgb(0 0 0 / .25); box-shadow: 0 14px 30px -18px rgb(0 0 0 / .7);
  transition: transform var(--ab-m-moyen) var(--ab-courbe), box-shadow var(--ab-m-moyen); }
.radio-carte::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .14; background-image: var(--ab-motif-tissage); background-size: 40px 40px;
  -webkit-mask-image: linear-gradient(200deg, #000, transparent 75%); mask-image: linear-gradient(200deg, #000, transparent 75%); }
.radio-carte:active { transform: scale(.98); }
@media (hover: hover) { .radio-carte:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -18px rgb(0 0 0 / .75); } }
.radio-carte .radio-nom { display: block; font: 850 1.5rem/1.05 var(--ab-police-titre); letter-spacing: -.03em; }
.radio-carte .radio-maintenant { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px; border-radius: 12px;
  background: rgb(0 0 0 / .24); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.radio-carte .radio-maintenant img { width: 40px; height: 40px; border-radius: 8px; flex: none; object-fit: cover; }
.radio-carte .radio-maintenant span { min-width: 0; display: flex; flex-direction: column; }
.radio-carte .radio-maintenant b, .radio-carte .radio-maintenant small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-carte .radio-maintenant b { font-size: var(--ab-t-s); }
.radio-carte .radio-maintenant small { font-size: var(--ab-t-xs); color: rgb(255 255 255 / .82); }
.radio-carte .radio-lire { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #15100d; box-shadow: 0 6px 16px rgb(0 0 0 / .35); }
.radio-carte .radio-lire svg { width: 22px; height: 22px; }
.rangee.radios { grid-auto-columns: min(78vw, 280px); }
.grille.radios { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.en-direct { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 4px 10px; border-radius: var(--ab-r-rond);
  background: rgb(0 0 0 / .28); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.en-direct::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 0 0 rgb(255 77 77 / .7);
  animation: direct 1.6s infinite; }
@keyframes direct { 70% { box-shadow: 0 0 0 7px rgb(255 77 77 / 0); } 100% { box-shadow: 0 0 0 0 rgb(255 77 77 / 0); } }

/* --- Listes de titres ------------------------------------------------------------------------ */
.liste { list-style: none; margin: 0 -8px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.titre { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px; border-radius: 12px; width: 100%;
  text-align: left; transition: background var(--ab-m-rapide); }
.titre:hover { background: color-mix(in srgb, var(--ab-texte) 6%, transparent); }
.titre:active { background: color-mix(in srgb, var(--ab-texte) 10%, transparent); }
.titre .rang { width: 26px; flex: none; text-align: center; font: 800 var(--ab-t-m)/1 var(--ab-police-titre); color: var(--ab-texte-3); font-variant-numeric: tabular-nums; }
.titre .rang.podium { color: var(--ab-accent); }
.titre img { width: 48px; height: 48px; border-radius: 8px; flex: none; object-fit: cover; }
.titre .textes { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: 2px; min-height: 44px; justify-content: center; }
/* Toute la ligne lance la lecture (le bouton s'étend sous la ligne ; « ⋮ » reste au-dessus). */
.liste .titre .textes::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.liste .titre .textes:focus-visible { outline: none; }
.liste .titre .textes:focus-visible::after { outline: 3px solid var(--ab-accent); outline-offset: -2px; }
.titre .textes strong, .titre .textes small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titre .textes strong { font-weight: 650; font-size: var(--ab-t-m); }
.titre .textes small { color: var(--ab-texte-2); font-size: var(--ab-t-s); }
.titre .duree { display: none; flex: none; color: var(--ab-texte-3); font-size: var(--ab-t-s); font-variant-numeric: tabular-nums; }
.titre [data-plus] { position: relative; z-index: 1; color: var(--ab-texte-2); }
.titre.actif .textes strong { color: var(--ab-accent); }
.titre .hl { display: inline-flex; vertical-align: -3px; margin-right: 4px; color: var(--ab-succes); }
.titre .hl svg { width: 16px; height: 16px; }
.titre .num { width: 26px; flex: none; text-align: center; color: var(--ab-texte-3); font-variant-numeric: tabular-nums; font-weight: 600; }
.titre.actif .num, .titre.actif .rang { color: var(--ab-accent); }

/* Égaliseur animé devant le titre en cours */
.eq { display: none; gap: 2px; align-items: flex-end; width: 14px; height: 12px; margin-right: 6px; vertical-align: 0; }
.eq i { display: block; width: 3px; height: 100%; border-radius: 1px; background: var(--ab-accent); transform-origin: bottom; animation: eq 0.9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.titre.actif .eq { display: inline-flex; }
body.en-pause .eq i { animation-play-state: paused; }

/* Classement en deux colonnes sur grand écran */
.carte-classement { padding: 8px 12px; border-radius: 20px; background: var(--ab-surface); border: 1px solid var(--ab-bord); }
.carte-classement .liste { margin: 0 -4px; }
@media (max-width: 639px) { .carte-classement { padding: 4px; } .carte-classement .titre { gap: 10px; } }

/* --- Grand en-tête (album, artiste, playlist) ------------------------------------------------- */
.entete-page { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px;
  margin: calc(-1 * (var(--h-entete) + var(--haut))) calc(-1 * var(--ab-gouttiere)) 0;
  padding: calc(var(--h-entete) + var(--haut) + 8px) var(--ab-gouttiere) 22px;
  --t-haut: color-mix(in srgb, var(--teinte) 58%, var(--ab-fond)); --t-bas: color-mix(in srgb, var(--teinte) 22%, var(--ab-fond));
  background: linear-gradient(180deg, var(--t-haut) 0%, var(--t-bas) 70%, var(--ab-fond) 100%); }
[data-theme="clair"] .entete-page { --t-haut: color-mix(in srgb, var(--teinte) 42%, var(--ab-fond)); --t-bas: color-mix(in srgb, var(--teinte) 14%, var(--ab-fond)); }
.entete-page::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--teinte) 50%, transparent), transparent 70%); }
.entete-page img { width: min(58vw, 232px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 14px; flex: none;
  box-shadow: 0 28px 60px -18px rgb(0 0 0 / .65), 0 6px 16px -6px rgb(0 0 0 / .35); }
.entete-page.ronde img { border-radius: 50%; }
.entete-texte { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 100%; }
.entete-page .surtitre { font-size: var(--ab-t-xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ab-texte-2); }
.entete-page h2 { font-size: clamp(1.75rem, 1.1rem + 3.6vw, 4.25rem); font-weight: 850; letter-spacing: -.045em; line-height: 1.02; overflow-wrap: anywhere; }
.entete-page p { margin: 0; color: var(--ab-texte-2); font-size: var(--ab-t-s); }
.entete-page .meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; color: var(--ab-texte-2); font-size: var(--ab-t-s); }
.entete-page .meta a { color: var(--ab-texte); font-weight: 750; }
.entete-page .meta a:hover { text-decoration: underline; }
.entete-page .meta .sep::before { content: "•"; opacity: .6; }
.entete-page .description { max-width: 60ch; }

.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 0 8px; }
.actions .doux { color: var(--ab-texte-2); font-size: var(--ab-t-s); }
.rond { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--ab-accent); color: var(--ab-sur-accent); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--ab-accent) 80%, #000);
  transition: transform var(--ab-m-rapide) var(--ab-courbe), filter var(--ab-m-rapide); }
.rond:hover { transform: scale(1.05); filter: brightness(1.06); }
.rond:active { transform: scale(.95); }
.rond svg { width: 28px; height: 28px; }

/* --- Blocs d'information --------------------------------------------------------------------- */
.bloc { position: relative; overflow: hidden; margin: 16px 0; padding: 18px; border-radius: 20px; background: var(--ab-surface); border: 1px solid var(--ab-bord); }
.bloc > strong:first-child { display: block; font: 800 var(--ab-t-l)/1.2 var(--ab-police-titre); letter-spacing: -.02em; margin-bottom: 6px; }
.bloc p { margin: 6px 0; }
.bloc .ab-btn { margin-top: 12px; }
.bloc.lieu { color: #fff; border: 0; background: linear-gradient(135deg, #0e6b52, #12312a); }
.bloc.lieu::after { content: ""; position: absolute; inset: 0; opacity: .12; background-image: var(--ab-motif-tissage); background-size: 40px 40px; pointer-events: none; }
.bloc.lieu :where(p, strong, .doux) { color: #fff; } .bloc.lieu .doux { color: rgb(255 255 255 / .85); }
.bloc.offre { color: #fff; border: 0; background: linear-gradient(135deg, #a8470f 0%, #e2572b 60%, #f3a632 140%); }
[data-theme="sombre"] .bloc.offre { background: linear-gradient(135deg, #5a250a 0%, #8f3315 60%, #a8670f 140%); }
.bloc.offre::after { content: ""; position: absolute; inset: 0; opacity: .14; background-image: var(--ab-motif-tissage); background-size: 44px 44px; pointer-events: none; }
.bloc.offre :where(p, strong) { color: #fff; } .bloc.offre .doux { color: rgb(255 255 255 / .88); }
.bloc.offre .ab-btn { --b-fond: #fff; --b-texte: #4a1c06; position: relative; z-index: 1; }
.doux { color: var(--ab-texte-2); }
.petit-texte { font-size: var(--ab-t-xs); }
.vide { color: var(--ab-texte-2); padding: 28px 16px; text-align: center; border: 1.5px dashed var(--ab-bord-fort); border-radius: 18px; }
.liste .vide { margin: 4px 8px; }
.stats-perso { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.stats-perso .ab-stat-valeur { font-size: 1.75rem; }

/* --- Recherche -------------------------------------------------------------------------------- */
.titre-grand { padding-top: 18px; font-size: var(--ab-t-3xl) !important; font-weight: 850 !important; letter-spacing: -.04em !important; }
.champ-recherche { position: sticky; top: calc(var(--h-entete) + var(--haut)); z-index: 20; margin: 0 calc(-1 * var(--ab-gouttiere));
  padding: 12px var(--ab-gouttiere) 12px; background: var(--ab-fond); }
.champ-recherche label { position: relative; display: block; }
.champ-recherche svg { position: absolute; left: 14px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); fill: var(--ab-texte-3); pointer-events: none; }
.champ-recherche input { width: 100%; min-height: 52px; padding: 0 16px 0 48px; border-radius: 14px; border: 1.5px solid transparent;
  background: var(--ab-surface); color: var(--ab-texte); font: 600 var(--ab-t-m)/1 var(--ab-police); box-shadow: var(--ab-ombre-1);
  -webkit-appearance: none; appearance: none; transition: border-color var(--ab-m-rapide), box-shadow var(--ab-m-rapide); }
[data-theme="clair"] .champ-recherche input { border-color: var(--ab-bord); }
.champ-recherche input::placeholder { color: var(--ab-texte-3); font-weight: 500; }
.champ-recherche input:focus { outline: none; border-color: var(--ab-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ab-accent) 22%, transparent); }
.puces { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--ab-gouttiere)); padding: 2px var(--ab-gouttiere) 4px; }
.puces::-webkit-scrollbar { display: none; }
.puce { flex: none; min-height: 40px; padding: 0 16px; border-radius: var(--ab-r-rond); border: 1px solid var(--ab-bord-fort); background: var(--ab-surface);
  font-size: var(--ab-t-s); font-weight: 650; transition: background var(--ab-m-rapide), border-color var(--ab-m-rapide); }
.puce:hover { border-color: var(--ab-texte-3); }
.tuiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tuile { position: relative; overflow: hidden; isolation: isolate; min-height: 104px; padding: 14px; border-radius: 16px; text-align: left; color: #fff;
  font: 850 1.25rem/1.1 var(--ab-police-titre); letter-spacing: -.02em;
  background: linear-gradient(140deg, color-mix(in srgb, var(--c1) 66%, #000) 0%, var(--c2) 100%); text-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform var(--ab-m-moyen) var(--ab-courbe); }
.tuile::after { content: ""; position: absolute; right: -18px; bottom: -18px; width: 86px; height: 86px; z-index: -1; border-radius: 18px;
  transform: rotate(24deg); background: rgb(255 255 255 / .16); box-shadow: -16px -10px 0 rgb(0 0 0 / .12); }
.tuile:active { transform: scale(.97); }
@media (hover: hover) { .tuile:hover { transform: translateY(-2px); } }

/* --- Formulaires (compte, feuilles) ------------------------------------------------------------ */
.compte-carte { display: flex; align-items: center; gap: 16px; }
.compte-carte .ab-avatar { width: 64px; height: 64px; font-size: 1.375rem; }
.compte-carte strong { display: block; font: 800 var(--ab-t-xl)/1.15 var(--ab-police-titre); letter-spacing: -.02em; }
.compte-carte p { margin: 2px 0 0; overflow-wrap: anywhere; }
.reglages-ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qualites { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.qualites .ab-choix-carte strong { display: block; }
.qualites .ab-choix-carte:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.connexion { max-width: 460px; margin: 24px auto 0; }
.connexion-marque { text-align: center; margin-bottom: 18px; }
.connexion-marque .ab-logo { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; }
.connexion-marque .ab-logo svg { width: 32px; height: 32px; }
.connexion-marque h2 { font-size: var(--ab-t-2xl); }
.connexion-marque p { color: var(--ab-texte-2); margin-top: 6px; }
.connexion .ab-segments { margin-bottom: 18px; }
.note-bas { color: var(--ab-texte-3); font-size: var(--ab-t-xs); margin: 18px 0 0; }
.erreur { color: var(--ab-danger); font-size: var(--ab-t-s); font-weight: 600; min-height: 1em; }

/* --- Mini-lecteur (téléphone) -------------------------------------------------------------- */
#mini { position: fixed; left: 8px; right: 8px; bottom: calc(var(--onglets) + var(--bas) + 6px); z-index: 35; height: var(--mini);
  display: flex; align-items: center; gap: 2px; padding: 0 4px 0 8px; border-radius: 14px; overflow: hidden; color: #fff;
  background: color-mix(in srgb, var(--teinte) 40%, #17110e); box-shadow: 0 14px 30px -10px rgb(0 0 0 / .6), 0 0 0 1px rgb(255 255 255 / .06) inset;
  transition: background var(--ab-m-lent); animation: mini-entre var(--ab-m-lent) var(--ab-courbe-ressort) both; }
@keyframes mini-entre { from { opacity: 0; transform: translateY(24px) scale(.96); } }
#mini-barre { position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 1px; background: rgb(255 255 255 / .22); }
#mini-avance { height: 100%; width: 0; border-radius: inherit; background: #fff; }
.mini-infos { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 10px; text-align: left; border-radius: 10px; }
.mini-infos img { width: 46px; height: 46px; flex: none; border-radius: 8px; object-fit: cover; box-shadow: 0 4px 10px rgb(0 0 0 / .35); }
.mini-textes { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mini-textes strong, .mini-textes small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-textes strong { font-size: var(--ab-t-s); font-weight: 700; }
.mini-textes small { font-size: var(--ab-t-xs); color: rgb(255 255 255 / .78); }
.mini-commandes { display: flex; align-items: center; flex: none; }
#mini .ab-btn-icone { color: inherit; }
#mini .ab-btn-icone:hover { background: rgb(255 255 255 / .1); }
#mini .mini-lecture svg { width: 30px; height: 30px; }
#mini :focus-visible { outline-color: #fff; }

/* --- Onglets (barre du bas sur téléphone) -------------------------------------------------- */
#onglets { position: fixed; inset: auto 0 0 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--onglets) + var(--bas)); padding: 0 6px var(--bas);
  background: linear-gradient(to top, var(--ab-fond) 62%, color-mix(in srgb, var(--ab-fond) 80%, transparent));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
#onglets a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: var(--ab-cible); font-size: 11px; font-weight: 650; color: var(--ab-texte-3); transition: color var(--ab-m-rapide); }
#onglets a svg { width: 25px; height: 25px; transition: transform var(--ab-m-moyen) var(--ab-courbe-ressort); }
#onglets a.actif { color: var(--ab-texte); }
#onglets a.actif svg { color: var(--ab-accent); transform: translateY(-1px) scale(1.08); }
.nav-marque, .nav-encart { display: none; }

/* --- Grand lecteur (toujours sombre et teinté par la pochette) ----------------------------- */
#lecteur { position: fixed; inset: 0; z-index: 60; overflow-y: auto; overscroll-behavior: contain; color: #fff; color-scheme: dark;
  background: linear-gradient(180deg, color-mix(in srgb, var(--teinte) 62%, #000) 0%, color-mix(in srgb, var(--teinte) 26%, var(--nuit-lecteur)) 52%, var(--nuit-lecteur) 100%);
  animation: lecteur-entre .44s var(--ab-courbe) both; }
#lecteur.sortie { animation: lecteur-sort .26s cubic-bezier(.4, 0, 1, 1) both; }
@keyframes lecteur-entre { from { transform: translateY(100%); } }
@keyframes lecteur-sort { to { transform: translateY(100%); } }
.lecteur-cadre { max-width: 1240px; margin: 0 auto; padding: var(--haut) 20px calc(28px + var(--bas)); }
.lecteur-haut { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 60px; }
#lecteur .ab-btn-icone { color: #fff; }
#lecteur .ab-btn-icone:hover { background: rgb(255 255 255 / .1); }
#lecteur :focus-visible { outline-color: #fff; }
.lecteur-contexte-bloc { min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.lecteur-contexte-bloc small { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgb(255 255 255 / .7); }
#lecteur-contexte { max-width: 60vw; font-size: var(--ab-t-s); font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lecteur-corps { display: flex; flex-direction: column; gap: 28px; }
.lecteur-principal { display: flex; flex-direction: column; width: 100%; max-width: 520px; margin: 0 auto; }
.lecteur-pochette-cadre { display: grid; place-items: center; margin: 14px 0 26px; }
#lecteur-pochette { display: block; width: min(84vw, 420px, 52vh); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 16px;
  box-shadow: 0 34px 70px -20px rgb(0 0 0 / .8), 0 8px 20px -8px rgb(0 0 0 / .5);
  transition: transform .5s var(--ab-courbe-ressort), box-shadow .5s; }
body.en-pause #lecteur-pochette { transform: scale(.9); box-shadow: 0 20px 40px -20px rgb(0 0 0 / .7); }
.lecteur-titres { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lecteur-titres div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#lecteur-titre { display: block; font: 850 1.5rem/1.15 var(--ab-police-titre); letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lecteur-artiste { color: rgb(255 255 255 / .74); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lecteur-artiste:hover { color: #fff; text-decoration: underline; }
#lecteur-favori svg { width: 26px; height: 26px; }
#lecteur-favori.oui { color: var(--ab-or); }
#lecteur-favori.oui svg { animation: bat .4s var(--ab-courbe-ressort); }
@keyframes bat { 50% { transform: scale(1.25); } }

/* Curseur de position : piste remplie selon --p (posé par l'appli) */
#lecteur-position { --p: 0%; width: 100%; height: 28px; margin: 18px 0 2px; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
#lecteur-position::-webkit-slider-runnable-track { height: 5px; border-radius: 3px; background: linear-gradient(90deg, #fff var(--p), rgb(255 255 255 / .24) var(--p)); }
#lecteur-position::-moz-range-track { height: 5px; border-radius: 3px; background: rgb(255 255 255 / .24); }
#lecteur-position::-moz-range-progress { height: 5px; border-radius: 3px; background: #fff; }
#lecteur-position::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; margin-top: -5px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgb(0 0 0 / .4); transition: transform var(--ab-m-rapide); }
#lecteur-position::-moz-range-thumb { width: 15px; height: 15px; border: 0; border-radius: 50%; background: #fff; }
#lecteur-position:hover::-webkit-slider-thumb, #lecteur-position:focus-visible::-webkit-slider-thumb { transform: scale(1.25); }
#lecteur-position:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }
#lecteur-position:disabled { opacity: .45; cursor: default; }
.lecteur-temps { display: flex; justify-content: space-between; gap: 8px; font-size: var(--ab-t-xs); font-weight: 600; color: rgb(255 255 255 / .72); font-variant-numeric: tabular-nums; }
#lecteur-compte { color: #7ee2a8; text-align: center; }
.lecteur-commandes { display: flex; justify-content: center; align-items: center; gap: 30px; margin: 12px 0 8px; }
.lecteur-commandes .ab-btn-icone { width: 56px; height: 56px; }
.lecteur-commandes .ab-btn-icone svg { width: 34px; height: 34px; }
.lecteur-commandes .rond { width: 76px; height: 76px; background: #fff; color: #15100d; box-shadow: 0 14px 30px -12px rgb(0 0 0 / .7); }
.lecteur-commandes .rond svg { width: 36px; height: 36px; }
.lecteur-commandes button[disabled] { opacity: .3; cursor: default; }
#lecteur-qualite { text-align: center; font-size: var(--ab-t-xs); color: rgb(255 255 255 / .62); margin: 6px 0 0; }
.lecteur-file-bloc { width: 100%; max-width: 520px; margin: 0 auto; padding: 16px 12px 10px; border-radius: 20px; background: rgb(255 255 255 / .07); }
.lecteur-file-bloc h2.petit { color: rgb(255 255 255 / .72); margin: 0 6px 8px; }
#lecteur-file { list-style: none; padding: 0; margin: 0; }
#lecteur-file:empty::after { content: "La file est vide."; display: block; padding: 8px 6px; color: rgb(255 255 255 / .6); font-size: var(--ab-t-s); }
#lecteur-file li.doux { padding: 8px 6px; color: rgb(255 255 255 / .72); font-size: var(--ab-t-s); }
#lecteur-file .titre { color: #fff; min-height: 60px; }
#lecteur-file .titre:hover { background: rgb(255 255 255 / .08); }
#lecteur-file .titre .textes small, #lecteur-file .titre .duree { color: rgb(255 255 255 / .66); }
#lecteur-file .titre.actif { background: rgb(255 255 255 / .1); }
#lecteur-file .titre.actif .textes strong { color: var(--ab-or); }
#lecteur-file .titre.actif .eq i { background: var(--ab-or); }

/* --- Feuille d'actions --------------------------------------------------------------------- */
#feuille { position: fixed; inset: 0; z-index: 80; }
.feuille-fond { position: absolute; inset: 0; background: var(--ab-voile); animation: ab-apparait var(--ab-m-moyen) both; }
.feuille-contenu { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 10px calc(18px + var(--bas)); border-radius: 24px 24px 0 0; background: var(--ab-surface-haute); color: var(--ab-texte);
  box-shadow: var(--ab-ombre-3); animation: ab-glisse var(--ab-m-lent) var(--ab-courbe) both; }
.feuille-contenu:focus { outline: none; }
.feuille-contenu::before { content: ""; display: block; width: 40px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: var(--ab-bord-fort); }
.feuille-contenu h3 { margin: 4px 12px 14px; font-size: var(--ab-t-l); }
.feuille-contenu > p { padding: 0 12px; margin: 0 0 10px; }
.feuille-contenu > button, .feuille-contenu .ligne { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 52px; padding: 0 12px;
  text-align: left; border-radius: 12px; font-weight: 600; }
.feuille-contenu > button:hover { background: var(--ab-fond-2); }
.feuille-contenu > button:active { background: var(--ab-bord); }
.feuille-contenu > button svg { width: 22px; height: 22px; color: var(--ab-texte-2); }
.feuille-contenu > button small { font-weight: 500; }
.feuille-contenu .ligne { gap: 14px; min-height: 72px; margin-bottom: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--ab-bord); border-radius: 0; }
.feuille-contenu .ligne img { width: 56px; height: 56px; flex: none; border-radius: 10px; object-fit: cover; box-shadow: var(--ab-ombre-1); }
.feuille-contenu .ligne span { min-width: 0; }
.feuille-contenu .ligne strong { display: block; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feuille-contenu form { padding: 0 12px 12px; margin-bottom: 8px; border-bottom: 1px solid var(--ab-bord); }
.feuille-contenu form:last-child { border-bottom: 0; }
.feuille-contenu .ab-btn { width: 100%; }
.feuille-contenu .choix-tel { display: grid; gap: 10px; padding: 4px 12px 8px; }

/* --- Annonce (message court) --------------------------------------------------------------- */
#annonce { position: fixed; left: 50%; bottom: calc(var(--onglets) + var(--bas) + 14px); z-index: 90; width: max-content; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 14px; background: var(--ab-texte); color: var(--ab-fond); box-shadow: var(--ab-ombre-3);
  font-size: var(--ab-t-s); font-weight: 650; text-align: center; pointer-events: none;
  opacity: 0; transform: translate(-50%, 16px) scale(.98); transition: opacity var(--ab-m-moyen), transform var(--ab-m-moyen) var(--ab-courbe); }
body.joue #annonce { bottom: calc(var(--onglets) + var(--mini) + var(--bas) + 16px); }
#annonce.vu { opacity: 1; transform: translate(-50%, 0) scale(1); }
#annonce:empty { display: none; }

/* --- Tablette ---------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .titre .duree { display: block; }
  .raccourcis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tuiles { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (min-width: 768px) {
  .play { --carte-l: 168px; }
  .defil { display: flex; }
  .sec { margin-top: 36px; }
  .entete-page { flex-direction: row; align-items: flex-end; text-align: left; gap: 28px; padding-bottom: 30px; padding-top: calc(var(--h-entete) + var(--haut) + 24px); }
  .entete-page img { width: 220px; }
  .entete-page .meta { justify-content: flex-start; }
  .entete-texte { padding-bottom: 6px; }
  #mini { left: 50%; right: auto; width: min(720px, calc(100vw - 32px)); transform: translateX(-50%); }
  @keyframes mini-entre { from { opacity: 0; transform: translate(-50%, 24px) scale(.96); } }
  .raccourci { min-height: 64px; font-size: var(--ab-t-s); }
  .raccourci img { width: 64px; height: 64px; }
  .feuille-contenu { left: 50%; top: 50%; bottom: auto; width: min(460px, 92vw); max-height: 80vh; border-radius: 24px;
    transform: translate(-50%, -50%); animation-name: feuille-centre; padding-bottom: 14px; }
  .feuille-contenu:focus { outline: none; }
.feuille-contenu::before { display: none; }
  @keyframes feuille-centre { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } }
  .stats-perso { grid-template-columns: repeat(2, minmax(0, 220px)); }
}
@media (min-width: 900px) {
  .lecteur-corps { flex-direction: row; align-items: center; gap: 56px; min-height: calc(100vh - 60px - var(--haut) - 40px); }
  .lecteur-principal { flex: 1 1 0; }
  .lecteur-file-bloc { flex: 1 1 0; align-self: center; max-height: min(640px, 76vh); overflow-y: auto; }
  #lecteur-pochette { width: min(42vw, 440px, 54vh); }
  .carte-classement .liste > li { min-width: 0; }
  .carte-classement .liste { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-flow: column; grid-template-rows: repeat(5, auto); column-gap: 18px; }
}

/* --- Ordinateur : barre latérale et barre de lecture ------------------------------------ */
@media (min-width: 1080px) {
  .play { --lateral: 256px; --barre: 88px; --carte-l: 184px; }
  body.play { padding-left: var(--lateral); padding-bottom: 48px; }
  body.play.joue { padding-bottom: calc(var(--barre) + 48px); }
  #entete { padding-right: calc(var(--ab-gouttiere) - 8px); }
  .logo-entete { display: none; }
  #lien-compte { display: none; }
  body:not(.page-detail) #titre-page { visibility: hidden; }
  body:not(.page-detail):not(.defile) #entete { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .entete-page img { width: 232px; }

  #onglets { inset: 0 auto 0 0; width: var(--lateral); height: auto; display: flex; flex-direction: column; gap: 4px; padding: calc(18px + var(--haut)) 14px 18px;
    background: var(--ab-fond-2); border-right: 1px solid var(--ab-bord); backdrop-filter: none; -webkit-backdrop-filter: none; }
  body.joue #onglets { bottom: var(--barre); }
  .nav-marque { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; font: 850 1.2rem/1 var(--ab-police-titre); letter-spacing: -.02em; }
  .nav-marque .ab-logo { width: 34px; height: 34px; border-radius: 10px; }
  #onglets a { flex-direction: row; justify-content: flex-start; gap: 14px; min-height: 48px; padding: 0 14px; border-radius: 12px;
    font-size: var(--ab-t-m); font-weight: 650; color: var(--ab-texte-2); }
  #onglets a:hover { background: color-mix(in srgb, var(--ab-texte) 6%, transparent); color: var(--ab-texte); }
  #onglets a.actif { background: var(--ab-accent-doux); color: var(--ab-texte); }
  #onglets a.actif svg { transform: none; }
  #onglets a svg { width: 24px; height: 24px; }
  .nav-encart { display: block !important; margin-top: auto; padding: 16px; border-radius: 18px; color: #fff; position: relative; overflow: hidden;
    background: linear-gradient(140deg, #a8470f, #e2572b 70%, #f3a632 150%); }
  [data-theme="sombre"] .nav-encart { background: linear-gradient(140deg, #4a1e08, #8f3315 70%, #a8670f 150%); }
  .nav-encart strong { display: block; font: 800 var(--ab-t-m)/1.2 var(--ab-police-titre); }
  .nav-encart p { margin-top: 6px; font-size: var(--ab-t-xs); color: rgb(255 255 255 / .88); }

  /* Barre de lecture */
  #mini { left: 0; right: 0; bottom: 0; width: auto; transform: none; height: var(--barre); border-radius: 0; z-index: 45;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 560px) minmax(0, 1fr); grid-template-rows: 1fr auto; column-gap: 24px;
    padding: 10px 20px 12px; color: var(--ab-texte); box-shadow: 0 -10px 30px -18px rgb(0 0 0 / .45);
    background: color-mix(in srgb, var(--teinte) 10%, var(--ab-surface)); border-top: 1px solid var(--ab-bord); }
  @keyframes mini-entre { from { opacity: 0; transform: translateY(100%); } }
  .mini-infos { grid-column: 1; grid-row: 1 / 3; align-self: center; height: 64px; padding: 0 8px 0 0; }
  .mini-infos:hover strong { text-decoration: underline; }
  .mini-infos img { width: 60px; height: 60px; border-radius: 8px; }
  .mini-textes strong { font-size: var(--ab-t-m); }
  .mini-textes small { color: var(--ab-texte-2); font-size: var(--ab-t-s); }
  .mini-commandes { grid-column: 2; grid-row: 1; justify-self: center; align-self: center; gap: 14px; }
  #mini .ab-btn-icone:hover { background: var(--ab-fond-2); }
  #mini .mini-lecture { width: 44px; height: 44px; background: var(--ab-texte); color: var(--ab-fond); }
  #mini .mini-lecture:hover { background: var(--ab-texte); transform: scale(1.06); }
  #mini .mini-lecture svg { width: 24px; height: 24px; }
  #mini :focus-visible { outline-color: var(--ab-accent); }
  .mini-temps { grid-column: 2; grid-row: 2; display: flex !important; justify-content: space-between; align-items: center; font-size: 11.5px;
    color: var(--ab-texte-3); font-variant-numeric: tabular-nums; font-weight: 600; }
  #mini-barre { grid-column: 2; grid-row: 2; position: static; align-self: center; height: 4px; margin: 0 46px; border-radius: 2px; background: var(--ab-bord-fort); }
  #mini-avance { background: var(--ab-texte); }
  #mini-file { grid-column: 3; grid-row: 1 / 3; justify-self: end; align-self: center; }
  #annonce, body.joue #annonce { left: calc(50% + var(--lateral) / 2); bottom: calc(var(--barre) + 18px); }
  body:not(.joue) #annonce { bottom: 28px; }
  .raccourcis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rangee { margin: 0; padding-inline: 0; scroll-padding-inline: 0; }
  .champ-recherche input { max-width: 560px; }
  .champ-recherche svg { left: 14px; }
}
@media (min-width: 1440px) { .play { --carte-l: 196px; } .raccourcis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) {
  .eq i { animation: none; transform: scaleY(.7); }
  body.en-pause #lecteur-pochette { transform: none; }
  .rangee { scroll-behavior: auto; }
}
