/* settings.css : réglages, égaliseur, accès (admin), téléchargements */

/* Réglages */
.settings-view { max-width: 640px; margin: 0 auto; padding: calc(64px + var(--safe-top) + var(--sp-2)) var(--sp-4) var(--sp-5); }
.settings-view .page-head { flex-direction: row; align-items: center; padding: 0; margin-bottom: var(--sp-4); }
.settings-view .section, .settings-view .list + .list { margin-top: var(--sp-4); }
@media (max-width: 767px) { .settings-view .page-head .btn-icon { display: none; } }  /* sous la barre du haut (64px, collante) */
.settings-card { padding: var(--sp-4); background: var(--surface); border-radius: var(--radius-l); }
.settings-card .select { width: 100%; height: 44px; border-color: var(--line-strong); background-color: var(--surface-1); text-align: left; }
.settings-card .select-label { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-eq { display: flex; gap: 2px; margin: var(--sp-4) 0; padding-bottom: var(--sp-2); justify-content: space-between; }
.settings-eq > label { display: flex; flex: 1 1 0; min-width: 0; flex-direction: column; align-items: center; gap: var(--sp-2); }
.settings-eq .row-sub { font-size: var(--fs-caption); }
.settings-eq .range-v { height: 140px; }

/* Accès (admin) */
.admin-page { max-width: 820px; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.person { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--sp-4); border-radius: var(--radius); background: var(--surface); }
.person-text { flex: 1; min-width: 0; }
.person-text strong { display: block; }
.person-id { padding: 0; border: 0; background: none; color: var(--text-3); font-size: var(--fs-caption); }
.person-id:hover { color: var(--text-1); text-decoration: underline; }
.person-meta { color: var(--text-3); font-size: var(--fs-caption); overflow-wrap: anywhere; }
.person-providers { display: inline-flex; gap: var(--sp-1); margin-left: var(--sp-2); vertical-align: middle; }
.person-provider svg { width: 16px; height: 16px; display: block; }
.person-provider[aria-label="Discord"] { color: #5865f2; }
.admin-page .input { margin-bottom: var(--sp-3); }
@media (max-width: 600px) { .person { flex-wrap: wrap; } .person-actions { flex-basis: 100%; justify-content: flex-start; } }
.person-text small { color: var(--text-3); font-size: var(--fs-caption); }
.person-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; justify-content: flex-end; }
.count-badge:not(:empty) { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 var(--sp-2); margin-left: var(--sp-2); border-radius: var(--r-md); background: var(--accent); color: var(--accent-ink); font-size: var(--fs-caption); vertical-align: middle; }
/* Téléchargements (écoute hors connexion) */
.dl-btn { color: var(--text-2); }
.dl-btn[data-state="done"] { color: var(--accent); --dl-arrow: var(--surface-1); }
.dl-btn[data-state="pending"] { color: var(--accent); }
.dl-ring { display: grid; place-items: center; }
.dl-ring svg { transform: rotate(-90deg); }
.dl-ring-track { fill: none; stroke: var(--line-strong); stroke-width: 2; }
.dl-ring-bar { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; transition: stroke-dashoffset 0.4s var(--ease); }
.dl-ring-stop { fill: var(--text-2); transform: rotate(90deg); transform-origin: 12px 12px; }
.dl-status { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.dl-summary { font-weight: 650; }
.dl-line { display: flex; align-items: center; gap: var(--sp-3); color: var(--text-2); font-size: var(--fs-caption); flex-wrap: wrap; }
.dl-line .spinner { width: 14px; height: 14px; }
.dl-failed { color: var(--danger); }
.dl-settings { max-width: 720px; }
.dl-setting { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); cursor: default; }
.dl-setting > div:first-child { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.dl-setting small { color: var(--text-2); font-size: var(--fs-caption); }
.dl-meter { flex: none; width: 140px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.dl-meter span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
label.dl-setting { cursor: pointer; }
@media (max-width: 767px) {
  .dl-meter { width: 90px; }
}
.settings-view .row-sub { white-space: normal; }
@media (min-width: 768px) { .settings-view .list { background: var(--surface-2); } }  /* carte visible sur fond blanc */
/* Apparence */
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
@media (min-width: 768px) { .theme-grid { grid-template-columns: repeat(3, 1fr); } }
.theme-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-2); padding: var(--sp-2); border: 2px solid var(--line-strong); border-radius: var(--radius-l); background: var(--surface); color: var(--text-1); text-align: left; cursor: pointer; }
.theme-card[aria-checked="true"] { border-color: var(--accent); }
.theme-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-label { font-weight: 650; padding: 0 var(--sp-1); }
.theme-card .row-sub { padding: 0 var(--sp-1); }
.theme-swatch { display: flex; align-items: flex-end; width: 100%; aspect-ratio: 16 / 9; padding: 10%; border-radius: var(--radius); overflow: hidden; box-sizing: border-box; border: 1px solid var(--line); }
.theme-surface { display: flex; flex-direction: column; justify-content: space-between; width: 100%; height: 100%; padding: 8%; border-radius: 6px; box-sizing: border-box; }
.theme-bar { display: block; width: 60%; height: 5px; border-radius: 3px; }
.theme-pill { display: block; width: 32%; height: 8px; border-radius: 4px; }
.theme-auto { padding: 0; gap: 0; }
.theme-half { display: block; flex: 1; height: 100%; }
.theme-half .theme-swatch { height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; }
.theme-note { margin-top: var(--sp-3); }

.custom-panel, .bd-section { margin-top: var(--sp-5); }
.color-fields { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-bottom: var(--sp-2); }
.color-field { display: flex; align-items: center; gap: var(--sp-3); }
.color-field input[type="color"] { width: 48px; height: 36px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.bd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin: var(--sp-3) 0; }
.bd-thumb { width: 96px; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface) center / cover no-repeat; }
.bd-slider { margin-bottom: var(--sp-3); max-width: 420px; }
.bd-slider-head { display: flex; justify-content: space-between; gap: var(--sp-3); }

/* Photo de profil : l'avatar est un bouton avec une pastille d'édition */
.avatar-edit { position: relative; display: inline-flex; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; color: inherit; }
.avatar-edit-badge { position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-elevated, #333); border: 2px solid var(--bg, #121212); }
