/* Pages : sections, grilles de pochettes, album, tableau des titres, étoiles. */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 12px; }
section:first-child > .section-head { margin-top: 0; }
.home-columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 28px; }
.loading { color: var(--text-dim); font-size: 28px; padding: 40px; text-align: center; }
.page-error { color: var(--danger); }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }

.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px 18px; }
.album-grid.small { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px 12px; }
.album-card { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 6px; margin: -6px; border-radius: 10px; }
.album-card:hover { background: var(--bg-hover); color: inherit; }
.album-card img.cover { width: 100%; height: auto; aspect-ratio: 1; margin-bottom: 6px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); }
.album-name, .album-artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-artist, .album-year { color: var(--text-soft); font-size: 13px; }
.album-meta { display: flex; align-items: center; gap: 8px; min-height: 18px; }
.comment-count { color: var(--text-dim); font-size: 12px; white-space: nowrap; }
.play-count { color: var(--text-dim); font-size: 12px; white-space: nowrap; }

.discussed { display: grid; gap: 4px; }
.discussed-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px; border-radius: 8px; }
.discussed-row:hover { background: var(--bg-hover); color: inherit; }
.discussed-row span { display: grid; min-width: 0; }
.discussed-row strong, .discussed-row .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--bg-hover); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }

/* album */
.album-head { display: flex; gap: 26px; align-items: flex-end; margin: -22px -28px 0; padding: 40px 28px 22px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--tint, transparent) 45%, transparent), transparent); }
.album-head img.cover { width: 220px; height: 220px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4); }
.cover-edit { position: relative; flex: none; }
.cover-pencil { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; padding: 0; display: grid; place-items: center;
  border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.6); color: #fff; cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.cover-edit:hover .cover-pencil, .cover-pencil:focus-visible { opacity: 1; }
.dialog.dialog-wide { width: min(760px, 100%); max-height: 90vh; overflow-y: auto; }
.cover-editor { display: grid; gap: 12px; }
.cover-row { display: flex; gap: 8px; align-items: center; }
.cover-row .dialog-input { flex: 1; min-width: 0; }
.cover-row.address span { color: var(--text-soft); white-space: nowrap; }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cover-choice { display: grid; gap: 6px; padding: 0 0 8px; text-align: left; background: var(--bg-hover); border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden; cursor: pointer; color: var(--text); }
.cover-choice:hover, .cover-choice:focus-visible { border-color: var(--accent); }
.cover-choice img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--bg-sunken); }
.cover-choice span { display: grid; padding: 0 8px; font-size: 13px; }
.cover-choice span .muted { font-size: 12px; }
.cover-credit { font-size: 12px; margin: 0; }
.album-info { display: grid; gap: 6px; min-width: 0; }
.album-info h1 { font-size: 34px; }
.kicker { text-transform: uppercase; font-size: 11px; letter-spacing: 0.12em; color: var(--text-dim); }
.album-artist-link { font-size: 16px; font-weight: 600; color: var(--text-soft); }
.album-rating { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.album-rating .label { color: var(--text-soft); }
.album-actions { display: flex; align-items: center; gap: 14px; margin: 6px 0 18px; }
.play-big { width: 56px; height: 56px; padding: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.play-big:hover { transform: scale(1.06); background: var(--accent-strong); }
.icon-button { background: none; border: none; padding: 6px; color: var(--text-soft); display: inline-grid; place-items: center; }
.icon-button:hover { color: var(--text); }
.album-more { position: relative; }
.album-menu { position: absolute; top: 100%; left: 0; z-index: 5; min-width: 230px; padding: 6px; display: grid;
  background: var(--bg-raised, var(--bg-hover)); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4); }
.album-menu[hidden] { display: none; }
.album-menu button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; text-align: left; border-radius: 6px; }
.album-menu button:hover { background: var(--bg-hover); }
tr.disc-row td { padding-top: 18px; color: var(--text-dim); font-weight: 600; border-bottom: 1px solid var(--line); }
.heart { background: none; border: none; font-size: 18px; color: var(--text-dim); padding: 0 4px; }
.heart.big { font-size: 26px; }
.heart.on { color: var(--danger); }

/* étoiles */
.rating { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stars { display: inline-flex; }
.star { background: none; border: none; padding: 0 1px; font-size: 26px; line-height: 1; color: var(--line); cursor: pointer; transition: transform 0.08s; }
.stars.readonly .star { cursor: default; }
.stars.small .star { font-size: 13px; }
.star.on { color: var(--star); }
.star.hover { color: var(--star); transform: scale(1.12); }
button.star:hover { border: none; }
.stars-summary { color: var(--text-dim); font-size: 13px; }

/* titres */
table.songs { width: 100%; border-collapse: collapse; margin-bottom: 30px; }
table.songs td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
body[data-density="compact"] table.songs td { padding: 4px 8px; }
tr.song:hover { background: var(--bg-hover); }
tr.song.playing { color: var(--accent-strong); }
td.num { width: 48px; color: var(--text-dim); text-align: right; }
.row-play { display: none; background: none; border: none; padding: 0; color: var(--text); }
tr.song:hover .row-play { display: inline; }
tr.song:hover .track-number { display: none; }
td.thumb { width: 36px; padding-right: 0; }
/* Playlist dont on est le créateur : on change l'ordre en glissant (poignée ⋮⋮) ou au clavier */
td.grip { width: 18px; padding-right: 0; color: var(--text-dim); text-align: center; letter-spacing: -2px; cursor: grab; }
tr.song.dragging { opacity: .4; }
tr.song.drop-before td { box-shadow: inset 0 2px 0 var(--accent); }
tr.song.drop-after td { box-shadow: inset 0 -2px 0 var(--accent); }
tr.song:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
td.thumb img.cover { width: 36px; height: 36px; border-radius: 3px; display: block; }
td.duration, td.format { width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
td.fav, td.more { width: 32px; text-align: center; }
td.more { width: 92px; white-space: nowrap; }
td.more .link-button { opacity: 0; font-size: 18px; color: var(--text-soft); }
tr.song:hover td.more .link-button, td.more .link-button:focus-visible { opacity: 1; }
td.album a { color: var(--text-soft); }

.comments { max-width: 860px; }

/* page Albums : onglets, « Afficher plus », pastilles de genres et de décennies */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 20px; }
.tab { padding: 6px 14px; border-radius: 999px; background: var(--bg-hover); color: var(--text); font-size: 14px; }
.tab:hover { filter: brightness(1.25); }
.tab.active { background: var(--accent); color: var(--bg); font-weight: 600; }
button.more { display: block; margin: 22px auto; }
.chips.big .chip { padding: 8px 16px; }
.chip-count { color: var(--text-dim); font-size: 12px; }

/* Recherche : musique d'ailleurs */
.ext-part { margin-bottom: 18px; }
.ext-part:empty { display: none; }
.ext-part h3 { font-size: 14px; color: var(--text-dim); margin: 6px 0; }
.ext-played { margin-left: 10px; font-size: 11px; color: var(--accent); white-space: nowrap; }
.ext-cover img { width: 40px; height: 40px; border-radius: 4px; display: block; }
.ext-source { font-size: 12px; white-space: nowrap; }
.ext-favorites { margin-top: 28px; }
.ext-link-form { display: flex; gap: 8px; margin: 12px 0 4px; max-width: 640px; }
.ext-link { flex: 1; min-width: 0; }
.ext-link-help { font-size: 12px; max-width: 640px; margin: 0 0 12px; }

/* Page artiste : radio, mix */
.artist-actions { display: flex; gap: 10px; margin: 4px 0 18px; }
.chip.toggle { cursor: pointer; }
.chip.toggle.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.chip.toggle.on .chip-count { color: inherit; opacity: .8; }
a.chip { color: inherit; text-decoration: none; }
a.chip:hover { border-color: var(--text-dim); }

/* Page Mix */
.mix-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.mix-card { display: flex; align-items: center; gap: 10px; padding: 18px 16px; font-weight: 600; font-size: 15px;
            border-radius: 12px; background: linear-gradient(135deg, var(--bg-hover), var(--bg-sunken)); }
.mix-card:hover { border-color: var(--accent); }
.mix-label { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); margin: 20px 0 8px; }
.mix-seed { display: grid; gap: 8px; max-width: 520px; }
.mix-seed-input { padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-sunken); }
.mix-flags { margin-top: 8px; }
.mix-actions { display: flex; gap: 12px; margin: 26px 0 40px; }
.mix-actions button { padding: 10px 18px; }
.dialog-ask { display: grid; gap: 14px; min-width: 320px; }
.dialog-input { padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-sunken); }

/* playlists */
.community-chip { font-size: 12px; padding: 2px 10px; color: var(--accent-strong); }
.community-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; color: var(--text-soft); }
td.added-by { white-space: nowrap; font-size: 13px; }
td.more .song-remove { color: var(--danger); }
.playlist-pick { display: grid; gap: 6px; min-width: 320px; max-height: 60vh; overflow-y: auto; }
.pick-row { display: flex; justify-content: space-between; gap: 12px; text-align: left; }
tr.song[draggable="true"], .album-card[draggable="true"] { cursor: grab; }

/* envoi de fichiers */
.upload-zone { display: grid; gap: 4px; justify-items: center; padding: 36px 16px; margin: 14px 0; border: 2px dashed var(--line); border-radius: 12px; cursor: pointer; text-align: center; }
.upload-zone:hover, .upload-zone:focus-visible, .upload-zone.drop-over { border-color: var(--accent); background: var(--bg-hover); }
.upload-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.upload-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px minmax(0, 1.4fr); gap: 12px; align-items: center; padding: 4px 0; }
.upload-total { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; margin: 0 0 14px; }
.upload-total[hidden] { display: none; }
.upload-total progress { width: 100%; }
.upload-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-state { font-size: 13px; color: var(--text-dim); }
.upload-row.done .upload-state { color: var(--accent-strong); }
.upload-row.failed .upload-state { color: var(--danger); }
.upload-row progress { width: 100%; }

/* Actualité (#/news) et « Dans la presse » d'un artiste */
.news-add { display: flex; gap: 8px; margin: 12px 0; max-width: 640px; }
.news-address { flex: 1; min-width: 0; }
.news-feeds { margin-bottom: 16px; }
.news-feed a { color: inherit; text-decoration: none; }
.news-feed-error { color: var(--danger); }
.chip.toggle.on .news-feed-error { color: inherit; }
.news-remove { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 0 0 6px; opacity: .6; }
.news-remove:hover { opacity: 1; }
.news-list { list-style: none; margin: 0; padding: 0; max-width: 820px; }
.news-article { padding: 12px 0; border-bottom: 1px solid var(--line); }
.news-title { color: var(--text); font-weight: 600; text-decoration: none; }
.news-title:hover { text-decoration: underline; }
.news-meta { font-size: 13px; margin-top: 2px; }
.news-summary { margin: 6px 0 0; color: var(--text-dim); font-size: 14px; }
.news-list.compact .news-article { padding: 8px 0; }
.news-list.compact .news-summary { display: none; }
.news-more { margin-top: 12px; }
.news-show { margin: 0 6px 0 0; vertical-align: middle; cursor: pointer; }
.news-hidden a { opacity: .5; text-decoration: line-through; }

/* Nouveautés : ce que le site fait en plus de Subsonic (page pour les utilisateurs) */
.whatsnew-idea { max-width: 780px; padding: 18px 22px; margin: 8px 0 28px; border-radius: var(--radius);
                 background: var(--bg-raised); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.whatsnew-idea h2 { margin: 0 0 8px; font-size: 18px; }
.whatsnew-idea p { margin: 8px 0; line-height: 1.55; color: var(--text-soft); }
.whatsnew-part { margin-bottom: 30px; }
.whatsnew-part-title { display: flex; align-items: center; gap: 10px; font-size: 19px; margin: 0 0 12px; }
.whatsnew-part-title .icon { color: var(--accent); }
.whatsnew-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.whatsnew-card { display: flex; flex-direction: column; padding: 14px 16px; border-radius: var(--radius);
                 background: var(--bg-raised); border: 1px solid var(--line); }
.whatsnew-card h3 { margin: 0 0 6px; font-size: 15px; }
.whatsnew-card p { margin: 0; line-height: 1.5; color: var(--text-soft); font-size: 14px; flex: 1; }
.whatsnew-link { margin-top: 10px; color: var(--accent); font-size: 13px; font-weight: 600; }
.whatsnew-link:hover { text-decoration: underline; }
.whatsnew-footer { margin: 8px 0 24px; }
.whatsnew-versions { display: inline-block; margin: 0 0 18px; }
.version-intro { max-width: 780px; margin: 0 0 24px; line-height: 1.5; }
.version { max-width: 780px; padding: 14px 18px; margin-bottom: 14px; border-radius: var(--radius);
           background: var(--bg-raised); border: 1px solid var(--line); }
.version.fresh { border-color: var(--accent); }
.version-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 4px; font-size: 18px; }
.version-date { font-size: 14px; font-weight: 400; }
.version-title { margin: 0 0 8px; font-weight: 600; }
.version-changes { margin: 0; padding-left: 20px; line-height: 1.55; color: var(--text-soft); }
.version-changes li + li { margin-top: 4px; }

/* Mon compte */
.account-intro { margin: 4px 0 20px; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.account-part { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: grid; gap: 10px; }
.account-part h2 { font-size: 17px; margin: 0; }
.account-part h3 { font-size: 14px; margin: 6px 0 0; }
.account-part > .muted { margin: 0; }
.account-part .setting.rights { border-top: none; padding-top: 0; }
.account-part .setting.rights h3 { font-size: 17px; margin-bottom: 10px; }
.account-part .ext-link-form { margin: 0; }
.account-photo { display: flex; align-items: center; gap: 18px; }
.account-photo .avatar { margin: 0; }
.account-photo-side { display: grid; gap: 8px; }
.account-photo-side p { margin: 0; }
.account-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.account-gravatar { display: flex; flex-wrap: wrap; gap: 8px; }
.account-email { flex: 1 1 220px; min-width: 0; }

/* biographie de l'artiste */
.artist-bio .bio-body { display: flex; gap: 18px; align-items: flex-start; }
.bio-photo { width: 140px; height: 140px; object-fit: cover; border-radius: 10px; flex: none; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); }
.bio-text { max-width: 75ch; max-height: 7.5em; overflow: hidden; line-height: 1.5; color: var(--text-soft);
            -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.bio-text p { margin: 0 0 .6em; }
.artist-bio.open .bio-text { max-height: none; -webkit-mask-image: none; mask-image: none; }
.bio-foot { display: flex; align-items: baseline; gap: 14px; margin-top: 6px; }
.bio-more { padding-left: 0; }
.bio-source { color: var(--text-dim); font-size: 12px; }
@media (max-width: 700px) { .artist-bio .bio-body { flex-direction: column; } .bio-photo { width: 110px; height: 110px; } }

/* Importer une playlist (#/import) */
.import-sources { display: grid; gap: 14px; max-width: 760px; }
.import-part { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: grid; gap: 8px; justify-items: start; }
.import-part h2 { font-size: 17px; margin: 0; }
.import-part p { margin: 0; }
.import-line { display: flex; gap: 8px; width: 100%; }
.import-link { flex: 1; min-width: 0; }
.import-name-label { display: grid; gap: 4px; max-width: 480px; margin: 8px 0; }
.import-progress { color: var(--text-dim); min-height: 1.2em; margin: 4px 0; }
.import-summary { font-weight: 600; margin: 4px 0 10px; }
.import-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.import-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 6px 8px; border-radius: var(--radius); }
.import-row:hover { background: var(--bg-hover); }
.import-wanted { display: grid; min-width: 0; }
.import-wanted strong, .import-wanted .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-choice { grid-column: 2; min-width: 0; width: 100%; max-width: 640px; }
.import-status { font-size: 12px; text-align: center; padding: 2px 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-dim); }
.import-found { border-color: var(--accent); color: var(--accent); }
.import-doubt { border-color: var(--star); color: var(--star); }
.import-youtube { border-color: var(--text-soft); color: var(--text-soft); }
.import-missing { border-color: var(--danger); color: var(--danger); }
.import-actions { display: flex; gap: 8px; margin: 14px 0; }
.import-choose { max-width: 760px; }
.import-playlists { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; width: 100%; }
.import-playlists button { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; }
/* Labels, éditions et collaborations : longues listes lisibles au clavier et sur une petite fenêtre. */
.album-exploration { margin: 24px 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); }
.explore-body h3 { margin: 20px 0 10px; font-size: 15px; }
.explore-picker { display: flex; flex-direction: column; gap: 8px; }
.explore-edition { width: 100%; max-width: 100%; }
.explore-people, .explore-works { padding: 0; list-style: none; }
.explore-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.explore-people li { display: flex; flex-direction: column; gap: 3px; overflow-wrap: anywhere; }
.explore-link { color: var(--accent-strong); font-weight: 600; }
.explore-source { color: var(--text-soft); text-decoration: underline; }
.explore-work { padding: 14px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.explore-work strong, .explore-work span, .explore-local a { display: block; }
.explore-work-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.explore-local { display: grid; gap: 6px; margin-top: 8px; }
.explore-connections { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.explore-member-card { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-sunken); }
.explore-member-projects { align-self: flex-start; margin-top: 8px; text-align: left; }
.explore-member-links { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.explore-member-links .explore-people { grid-template-columns: minmax(0, 1fr); }
