/*
 * Application-level style overrides on top of Bootstrap.
 */

/* ── Display plein écran ────────────────────────────────────────── */

body.display-active {
  background: #080808;
  color: #f0ede6;
  overflow: hidden;
}

/* Masque navbar + session bar + FABs quand le display est actif */
body.display-active nav,
body.display-active [data-controller="session-bar"],
body.display-active .remote-access-fab,
body.display-active .launch-session-fab {
  display: none !important;
}

/* La stage se positionne en fixed pour couvrir tout le viewport,
   indépendamment du container parent */
.display-stage {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  padding: clamp(0.75rem, 2vw, 2rem);
  background: #080808;
  color: #f0ede6;
}

.display-stage__header {
  display: flex;
  align-items: center;
  gap: 0.75em;
  padding-bottom: clamp(0.5rem, 1.5vw, 1.25rem);
  border-bottom: 1px solid rgba(255,255,255,.12);
  margin-bottom: clamp(0.75rem, 2vw, 1.5rem);
  flex-shrink: 0;
}

.display-stage__controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75em;
  flex-shrink: 0;
}

.display-stage__artist {
  font-size: clamp(0.75rem, 1.5vw, 1.25rem);
  color: rgba(240,237,230,.5);
  font-style: italic;
}

.display-stage__title {
  font-size: clamp(0.9rem, 2vw, 1.75rem);
  font-weight: 600;
}

.display-stage__next {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.5em;
  max-width: 18vw;
  overflow: hidden;
}

/* Hide when the title span is empty */
.display-stage__next:has([data-live-session-display-target="nextSongTitle"]:empty) {
  display: none;
}

.display-stage__next-label {
  font-size: clamp(0.55rem, 0.8vw, 0.7rem);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(240,237,230,.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.display-stage__next [data-live-session-display-target="nextSongTitle"] {
  font-size: clamp(0.8rem, 1.4vw, 1.25rem);
  font-weight: 600;
  color: rgba(240,237,230,.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.display-stage__content {
  flex: 1 1 0;
  overflow-y: auto;
  overflow-x: hidden;
  line-height: 1.55;
  font-family: ui-monospace, "Cascadia Code", "Fira Mono", "Courier New", monospace;
  white-space: pre-wrap;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}

/* Force light text on all Action Text content in display */
.display-stage__content * {
  color: inherit !important;
  background: transparent !important;
}

.display-stage__content.trix-content pre {
  background: rgba(255,255,255,.08) !important;
  color: inherit;
}

.display-stage__content.trix-content blockquote {
  border-left-color: rgba(255,255,255,.3);
}

.display-stage__content.trix-content .attachment--file {
  color: inherit;
  border-color: rgba(255,255,255,.3);
}

/* Bouton retour accueil sur l'afficheur */
.display-home-btn {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  text-decoration: none;
  transition: background .2s, color .2s;
  z-index: 10000;
}

.display-home-btn:hover {
  background: rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .8);
}

/* Bouton "Lancer une session" — FAB fixe en bas à droite */
.launch-session-fab {
  position: fixed;
  bottom: 1.75rem;
  right: 1.5rem;
  background: #2563eb;
  color: #fff;
  border-radius: 9999px;
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37,99,235,.45);
  z-index: 1040;
  white-space: nowrap;
  transition: transform .15s, box-shadow .15s;
}

.launch-session-fab:hover {
  color: #fff;
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(37,99,235,.6);
}

.launch-session-fab:active {
  transform: scale(.96);
}

/* Bouton accès télécommande sur la page contrôleur */
.remote-access-fab {
  position: fixed;
  bottom: 1.75rem;
  right: 1.5rem;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37,99,235,.45);
  z-index: 1050;
  transition: transform .15s, box-shadow .15s;
}

.remote-access-fab:hover {
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37,99,235,.6);
}

.remote-access-fab:active {
  transform: scale(.93);
}

/* ── Mode télécommande (remote) ─────────────────────────────────── */

/* html doit avoir une hauteur pour que 100dvh fonctionne dans les enfants */
html:has(body.remote-mode) {
  height: 100dvh;
  overflow: hidden;
}

body.remote-mode {
  height: 100dvh;
  overflow: hidden;
  background: #111;
  color: #f0ede6;
}

.remote-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.remote-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  padding-top: calc(0.75rem + env(safe-area-inset-top));
  background: #1a1a1a;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.remote-body {
  flex: 1 1 0;
  overflow-y: auto;
  padding: 1.25rem 1rem calc(6rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.remote-now-playing {
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 1.25rem;
}

.remote-np-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(240,237,230,.4);
  margin-bottom: 0.75rem;
}

.remote-np-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: #f0ede6;
  line-height: 1.2;
}

.remote-np-artist {
  font-size: 1rem;
  color: rgba(240,237,230,.6);
  margin-bottom: 0;
}

.remote-np-since {
  margin-bottom: 0;
}

.remote-prev-section {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 0.65rem 1rem;
  display: none;
  opacity: 0.65;
}

/* Show only when the title has content */
.remote-prev-section:has(.remote-prev-title:not(:empty)) {
  display: block;
}

.remote-prev-title {
  font-size: 0.95rem;
  color: rgba(240,237,230,.5);
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dot indicateur de connexion */
.remote-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: inline-block;
  flex-shrink: 0;
  transition: background .3s;
}

.remote-status-dot--connected { background: #22c55e; }
.remote-status-dot--off       { background: #ef4444; }

/* FAB — lifted above queue nav bar on remote page */
body.remote-mode .remote-fab {
  bottom: calc(5.25rem + env(safe-area-inset-bottom));
}

/* FAB */
.remote-fab {
  position: fixed;
  bottom: calc(1.75rem + env(safe-area-inset-bottom));
  right: 1.5rem;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  border: none;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(37,99,235,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1050;
  transition: transform .15s, box-shadow .15s;
}

.remote-fab:active {
  transform: scale(.93);
  box-shadow: 0 2px 10px rgba(37,99,235,.4);
}

/* Modal dark dans remote mode */
body.remote-mode .modal-content {
  background: #1e1e1e;
  color: #f0ede6;
  border: 1px solid rgba(255,255,255,.1);
}

body.remote-mode .modal-header {
  border-bottom-color: rgba(255,255,255,.1);
}

body.remote-mode .btn-close {
  filter: invert(1);
}

body.remote-mode .list-group-item {
  background: transparent;
  color: #f0ede6;
  border-color: rgba(255,255,255,.08);
}

body.remote-mode .list-group-item:hover,
body.remote-mode .list-group-item:focus {
  background: rgba(255,255,255,.06);
  color: #fff;
}

body.remote-mode .text-muted { color: rgba(240,237,230,.5) !important; }

body.remote-mode .form-control {
  background: #2a2a2a;
  border-color: rgba(255,255,255,.15);
  color: #f0ede6;
}

body.remote-mode .form-control:focus {
  background: #2a2a2a;
  border-color: #2563eb;
  color: #f0ede6;
  box-shadow: 0 0 0 .25rem rgba(37,99,235,.25);
}

body.remote-mode .form-control::placeholder { color: rgba(240,237,230,.35); }

/* ── File d'attente / navigation ───────────────────────────────── */

.remote-queue-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  z-index: 100;
  background: #111;
  border-top: 1px solid rgba(255,255,255,.12);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.625rem 1rem calc(0.625rem + env(safe-area-inset-bottom));
}

.remote-nav-btn {
  height: 3.5rem;
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  color: #f0ede6;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}

.remote-nav-btn:not(:disabled):active {
  background: #2a2a2a;
}

.remote-nav-btn:disabled {
  opacity: .3;
  cursor: default;
}

.remote-queue-section {
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 1.25rem;
}

/* Carte individuelle pour chaque son en attente */
.remote-queue-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

.remote-queue-card:last-child {
  margin-bottom: 0;
}

/* Icône play verte devant le titre en cours */
.remote-play-icon {
  color: #22c55e;
  font-size: 0.9rem;
  flex-shrink: 0;
  line-height: 1;
}

.remote-queue-remove {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  color: rgba(240,237,230,.5);
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.remote-queue-remove:hover {
  background: rgba(255,255,255,.1);
  color: #f0ede6;
}

/* Modal items — info + 3 action buttons */
.remote-modal-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.5rem;
}

.remote-modal-actions {
  display: flex;
  gap: 0.375rem;
  flex-shrink: 0;
}

.remote-modal-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .15s;
}

.remote-modal-btn:active { opacity: .7; }

.remote-modal-btn--queue { background: rgba(255,255,255,.1); color: #f0ede6; }
.remote-modal-btn--next  { background: rgba(37,99,235,.25);  color: #93c5fd; }
.remote-modal-btn--play  { background: #16a34a;              color: #fff;    }

/* ── Sélecteur d'instrument sur l'afficheur ─────────────────────── */

.display-instrument-select {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #f0ede6;
  border-radius: 8px;
  font-size: clamp(0.8rem, 1.3vw, 1.1rem);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  flex-shrink: 0;
}

.display-instrument-select:focus {
  outline: none;
  border-color: rgba(255,255,255,.3);
  box-shadow: none;
}

.display-instrument-select option {
  background: #1a1a1a;
  color: #f0ede6;
}

.display-instrument-select option.has-content {
  font-weight: 700;
}

/* ── Onglets instrument dans l'éditeur de song ──────────────────── */

.instrument-nav-tabs .nav-item {
  border-bottom: none;
}

/* ── Setlists ───────────────────────────────────────────────────── */

.setlist-song-item {
  user-select: none;
}

.setlist-song-item.sortable-ghost {
  opacity: .4;
}

.drag-handle:active {
  cursor: grabbing;
}

.setlist-catalog-list {
  max-height: 240px;
  overflow-y: auto;
}

.setlist-catalog-item {
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.setlist-catalog-item:last-child {
  border-bottom: none;
}

/* ── Trix / Action Text ─────────────────────────────────────────── */

/* Boutons personnalisés Trix */
.trix-button--custom {
  font-family: Georgia, serif;
  font-style: normal;
  padding: 0 0.5em;
}

.trix-font-size-control {
  display: inline-flex;
  align-items: center;
  border-left: 1px solid #ccc;
  margin-left: 2px;
  padding-left: 2px;
}

.trix-font-size-btn {
  padding: 0 0.4em;
  font-size: 1rem;
  line-height: 1;
}

.trix-font-size-label {
  min-width: 3em;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #444;
  pointer-events: none;
  user-select: none;
}

trix-editor {
  min-height: 260px;
  font-size: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
}

trix-editor:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

trix-toolbar .trix-button-group {
  margin-bottom: 0.25rem;
}

/* ── Télécommande overlay sur l'afficheur ───────────────────────── */

.display-remote-toggle {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 10002;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.85);
  color: rgba(255, 255, 255, .85);
  border: 1px solid rgba(255, 255, 255, .25);
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.display-remote-toggle:hover {
  background: rgba(40, 40, 40, 0.9);
}

.display-remote-panel {
  position: fixed;
  bottom: 5rem;
  right: 1rem;
  width: 320px;
  height: 65vh;
  z-index: 10001;
  background: #111;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  overflow: hidden;
  display: none;
  flex-direction: column;
  color: #f0ede6;
}

/* Inline catalogue inside the remote panel */

.display-remote-panel__catalog {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.display-remote-panel__catalog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.875rem 0.25rem;
  flex-shrink: 0;
}

.display-remote-catalog-close {
  background: transparent;
  border: none;
  color: rgba(240, 237, 230, .5);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  transition: color .15s;
}

.display-remote-catalog-close:hover {
  color: #f0ede6;
}

.display-remote-panel__catalog-search {
  padding: 0 0.875rem 0.5rem;
  flex-shrink: 0;
}

.display-remote-panel__catalog-search .form-control {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .15);
  color: #f0ede6;
}

.display-remote-panel__catalog-search .form-control:focus {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .3);
  color: #f0ede6;
  box-shadow: none;
}

.display-remote-panel__catalog-search .form-control::placeholder {
  color: rgba(240, 237, 230, .35);
}

.display-remote-panel__catalog-list {
  flex: 1 1 0;
  overflow-y: auto;
}

.display-remote-panel__catalog-list .list-group-item {
  background: transparent;
  color: #f0ede6;
  border-color: rgba(255, 255, 255, .08);
}

.display-remote-panel__catalog-list .list-group-item:hover,
.display-remote-panel__catalog-list .list-group-item:focus {
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.display-remote-panel--open {
  display: flex;
}

.display-remote-panel__header {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  flex-shrink: 0;
}

.display-remote-panel__body {
  flex: 1 1 0;
  overflow-y: auto;
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.display-remote-panel__footer {
  padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.display-remote-pick-btn {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.display-remote-pick-btn:hover {
  background: #1d4ed8;
}

/* ── Bouton toggle thème ────────────────────────────────────────── */

.theme-switch {
  width: 2.5rem;
  height: 1.375rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .22);
  border: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background .2s;
  padding: 0;
}

.theme-switch::after {
  content: "☾\FE0E";
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: #333;
  font-size: 0.6rem;
  line-height: 1.125rem;
  text-align: center;
  transition: transform .25s;
}

/* Variant plus discrète dans le header de l'afficheur */
.theme-switch--display {
  background: rgba(255, 255, 255, .15);
  align-self: center;
}

html[data-theme="light"] .theme-switch {
  background: rgba(0, 0, 0, .15);
}

html[data-theme="light"] .theme-switch--display {
  background: rgba(0, 0, 0, .12);
}

html[data-theme="light"] .theme-switch::after {
  content: "☀\FE0E";
  transform: translateX(1.125rem);
  background: rgba(255, 255, 255, .95);
  color: #b45309;
}

/* ── Mode clair — afficheur ─────────────────────────────────────── */

html[data-theme="light"] body.display-active {
  background: #f5f5f0;
  color: #1a1a1a;
}

html[data-theme="light"] .display-stage {
  background: #f5f5f0;
  color: #1a1a1a;
}

html[data-theme="light"] .display-stage__header {
  border-bottom-color: rgba(0, 0, 0, .1);
}

html[data-theme="light"] .display-stage__artist {
  color: rgba(0, 0, 0, .65);
}

html[data-theme="light"] .display-stage__next-label {
  color: rgba(0, 0, 0, .45);
}

html[data-theme="light"] .display-stage__next [data-live-session-display-target="nextSongTitle"] {
  color: rgba(0, 0, 0, .7);
}

html[data-theme="light"] .display-stage__content {
  scrollbar-color: rgba(0, 0, 0, .2) transparent;
}

html[data-theme="light"] .display-stage__content.trix-content pre {
  background: rgba(0, 0, 0, .06) !important;
}

html[data-theme="light"] .display-stage__content.trix-content blockquote {
  border-left-color: rgba(0, 0, 0, .25);
}

html[data-theme="light"] .display-instrument-select {
  background: rgba(0, 0, 0, .07);
  border-color: rgba(0, 0, 0, .15);
  color: #1a1a1a;
}

html[data-theme="light"] .display-instrument-select option {
  background: #f5f5f0;
  color: #1a1a1a;
}

/* ── Mode clair — télécommande ──────────────────────────────────── */

html[data-theme="light"] body.remote-mode {
  background: #f0f0ec;
  color: #1a1a1a;
}

html[data-theme="light"] .remote-header {
  background: #e8e8e4;
  border-bottom-color: rgba(0, 0, 0, .08);
}

html[data-theme="light"] .remote-header .text-white,
html[data-theme="light"] .remote-header .text-white-50 {
  color: #1a1a1a !important;
}

html[data-theme="light"] .remote-header a {
  color: rgba(0, 0, 0, .75) !important;
}

html[data-theme="light"] .remote-now-playing {
  background: #fff;
  border-color: rgba(0, 0, 0, .1);
}

html[data-theme="light"] .remote-np-label {
  color: rgba(0, 0, 0, .55);
}

html[data-theme="light"] .remote-np-title {
  color: #1a1a1a;
}

html[data-theme="light"] .remote-np-artist {
  color: rgba(0, 0, 0, .75);
}

html[data-theme="light"] .remote-prev-section {
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .06);
}

html[data-theme="light"] .remote-prev-title {
  color: rgba(0, 0, 0, .5);
}

html[data-theme="light"] body.remote-mode .list-group-item {
  background: transparent;
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, .08);
}

html[data-theme="light"] body.remote-mode .list-group-item:hover,
html[data-theme="light"] body.remote-mode .list-group-item:focus {
  background: rgba(0, 0, 0, .04);
  color: #1a1a1a;
}

html[data-theme="light"] .remote-queue-card {
  background: #fff;
  border-color: rgba(0, 0, 0, .1);
}

html[data-theme="light"] .remote-queue-card .text-white-50 {
  color: rgba(0, 0, 0, .55) !important;
}

html[data-theme="light"] .remote-queue-remove {
  border-color: rgba(0, 0, 0, .15);
  color: rgba(0, 0, 0, .45);
}

html[data-theme="light"] .remote-queue-remove:hover {
  background: rgba(0, 0, 0, .07);
  color: #1a1a1a;
}

html[data-theme="light"] .remote-queue-nav {
  background: rgba(235, 235, 230, .97);
  border-top-color: rgba(0, 0, 0, .08);
}

html[data-theme="light"] .remote-nav-btn {
  background: #fff;
  border-color: rgba(0, 0, 0, .12);
  color: #1a1a1a;
}

html[data-theme="light"] .remote-nav-btn:not(:disabled):active {
  background: #ebebeb;
}

html[data-theme="light"] .remote-modal-btn--queue {
  background: rgba(0, 0, 0, .08);
  color: #1a1a1a;
}

html[data-theme="light"] body.remote-mode .modal-content {
  background: #fff;
  color: #1a1a1a;
}

html[data-theme="light"] body.remote-mode .modal .text-muted {
  color: rgba(0, 0, 0, .55) !important;
}

html[data-theme="light"] .remote-np-since {
  color: rgba(0, 0, 0, .5) !important;
}

html[data-theme="light"] .remote-body .text-white-50,
html[data-theme="light"] .display-remote-panel .text-white-50 {
  color: rgba(0, 0, 0, .5) !important;
}

html[data-theme="light"] body.remote-mode .form-control {
  background: #fff;
  border-color: rgba(0, 0, 0, .2);
  color: #1a1a1a;
}

html[data-theme="light"] body.remote-mode .form-control:focus {
  background: #fff;
  color: #1a1a1a;
}

html[data-theme="light"] body.remote-mode .form-control::placeholder {
  color: rgba(0, 0, 0, .35);
}

html[data-theme="light"] body.remote-mode .modal-header {
  border-bottom-color: rgba(0, 0, 0, .1);
}

html[data-theme="light"] body.remote-mode .btn-close {
  filter: none;
}

/* ── Mode clair — panneau télécommande sur l'afficheur ──────────── */

html[data-theme="light"] .display-remote-toggle {
  background: rgba(220, 220, 215, .9);
  color: rgba(0, 0, 0, .65);
  border-color: rgba(0, 0, 0, .15);
}

html[data-theme="light"] .display-remote-toggle:hover {
  background: rgba(200, 200, 195, .95);
}

html[data-theme="light"] .display-remote-panel {
  background: #f0f0ec;
  border-color: rgba(0, 0, 0, .1);
  color: #1a1a1a;
}

html[data-theme="light"] .display-remote-panel__header,
html[data-theme="light"] .display-remote-panel__footer {
  border-color: rgba(0, 0, 0, .08);
}

html[data-theme="light"] .display-remote-panel .remote-now-playing {
  background: #fff;
  border-color: rgba(0, 0, 0, .1);
}

html[data-theme="light"] .display-remote-panel .remote-prev-section {
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .06);
}

html[data-theme="light"] .display-remote-panel .remote-prev-title {
  color: rgba(0, 0, 0, .5);
}

html[data-theme="light"] .display-remote-panel .remote-queue-card {
  background: #fff;
  border-color: rgba(0, 0, 0, .1);
}

html[data-theme="light"] .display-remote-panel .remote-queue-card .text-white-50 {
  color: rgba(0, 0, 0, .55) !important;
}

html[data-theme="light"] .display-remote-panel .remote-queue-remove {
  border-color: rgba(0, 0, 0, .15);
  color: rgba(0, 0, 0, .45);
}

html[data-theme="light"] .display-remote-panel .remote-nav-btn {
  background: #fff;
  border-color: rgba(0, 0, 0, .12);
  color: #1a1a1a;
}

html[data-theme="light"] .display-remote-panel .text-white {
  color: #1a1a1a !important;
}

html[data-theme="light"] .display-remote-panel .text-white-50 {
  color: rgba(0, 0, 0, .55) !important;
}

html[data-theme="light"] .display-remote-panel__catalog-bar span {
  color: rgba(0, 0, 0, .5);
}

html[data-theme="light"] .display-remote-catalog-close {
  color: rgba(0, 0, 0, .4);
}

html[data-theme="light"] .display-remote-catalog-close:hover {
  color: #1a1a1a;
}

html[data-theme="light"] .display-remote-panel__catalog-search .form-control {
  background: rgba(0, 0, 0, .06);
  border-color: rgba(0, 0, 0, .15);
  color: #1a1a1a;
}

html[data-theme="light"] .display-remote-panel__catalog-search .form-control::placeholder {
  color: rgba(0, 0, 0, .35);
}

html[data-theme="light"] .display-remote-panel__catalog-list .list-group-item {
  background: transparent;
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, .08);
}

html[data-theme="light"] .display-remote-panel__catalog-list .list-group-item:hover {
  background: rgba(0, 0, 0, .04);
}

html[data-theme="light"] .display-remote-panel__catalog-list .text-white-50 {
  color: rgba(0, 0, 0, .55) !important;
}

/* ── Transpose widget ──────────────────────────────────────────── */
.transpose-toggle {
  position: fixed;
  bottom: 5.5rem;
  right: 1rem;
  z-index: 10002;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.85);
  color: rgba(255, 255, 255, .85);
  border: 1px solid rgba(255, 255, 255, .25);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  transition: background .2s;
}

.transpose-toggle:hover {
  background: rgba(40, 40, 40, 0.9);
}

.transpose-toggle__val {
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
}

.transpose-popup {
  position: fixed;
  bottom: 9.5rem;
  right: 1rem;
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 0.5rem;
  padding: 0.4rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 10005;
  white-space: nowrap;
}

.transpose-popup__btn {
  background: rgba(255, 255, 255, .15);
  border: none;
  border-radius: 0.25rem;
  color: #fff;
  font-size: 1.1rem;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.transpose-popup__btn:hover {
  background: rgba(255, 255, 255, .3);
}

.transpose-popup__semitones {
  color: #fff;
  font-family: monospace;
  font-size: 0.9rem;
  min-width: 2.5rem;
  text-align: center;
}

html[data-theme="light"] .transpose-toggle {
  background: rgba(255, 255, 255, 0.9);
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, .2);
}

html[data-theme="light"] .transpose-toggle:hover {
  background: rgba(255, 255, 255, 1);
}

html[data-theme="light"] .transpose-popup {
  background: #fff;
  border-color: rgba(0, 0, 0, .15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

html[data-theme="light"] .transpose-popup__btn {
  background: rgba(0, 0, 0, .08);
  color: #333;
}

html[data-theme="light"] .transpose-popup__btn:hover {
  background: rgba(0, 0, 0, .15);
}

html[data-theme="light"] .transpose-popup__semitones {
  color: #333;
}
