/* --- THÈMES DES STATIONS (PAGE ABOUT) --- */

.station-profile {
  /* On utilise une variable locale pour la couleur. Si elle n'est pas définie, on prend le thème global */
  border-left: 2px solid var(--station-color, var(--theme-color, white));
  padding-left: 15px;
  margin-bottom: 25px;
  transition: all 0.2s ease;
}

.station-profile:hover {
  /* Petit effet au survol pour rendre ça interactif */
  background: rgba(255, 255, 255, 0.05);
  border-left-width: 5px;
}

.station-profile h3 {
  /* Le titre prend la couleur de la station */
  color: var(--station-color, var(--theme-color, white));
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: lowercase;
}

.station-profile p {
  margin: 0;
  line-height: 1.5;
  opacity: 0.9;
}

/* --station-color is set per profile from stations.json (accent). */

/* --- SCHEDULE (ABOUT TAB) --- */
.schedule-status {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
}

.schedule-clock { opacity: 0.6; }

.schedule-on-air { color: var(--theme-color, white); font-weight: bold; }
.schedule-off-air { opacity: 0.5; font-weight: bold; }

.schedule-live-dot { display: inline-block; animation: blink 1s steps(1) infinite; }

.schedule-next-up { width: 100%; margin: 10px 0 12px; text-align: center; }

.schedule-next-up-badge {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  background: var(--theme-color, white);
  color: var(--bg-color, black);
  font-weight: bold;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  animation: schedule-next-pulse 1.6s ease-in-out infinite;
}
@keyframes schedule-next-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.schedule-day-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 18px 0 16px;
}

.schedule-day-nav button {
  position: relative;
  background: transparent;
  border: 1px solid var(--theme-color, white);
  color: var(--theme-color, white);
  font-family: monospace;
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.2s ease;
}

.schedule-day-nav button:hover { background: rgba(255, 255, 255, 0.1); }

.schedule-day-nav button.active {
  background: var(--theme-color, white);
  color: var(--bg-color, black);
  font-weight: bold;
}

.schedule-day-nav button.is-today::after {
  content: '^';
  position: absolute;
  left: 50%;
  bottom: -13px;
  transform: translateX(-50%);
  font-weight: bold;
  font-size: 12px;
  line-height: 1;
  animation: blink 1s steps(1) infinite;
}

.schedule-day-block { margin-top: 26px; }
.schedule-day-block:first-child { margin-top: 6px; }

.schedule-day-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 14px;
  display: inline-block;
  padding-right: 10px;
  border-bottom: 1px solid var(--theme-color, white);
}

.schedule-today-flag { opacity: 0.7; font-size: 10px; margin-left: 6px; }

.schedule-empty { font-size: 12px; font-style: italic; opacity: 0.4; margin-bottom: 8px; }

.schedule-show-row {
  display: flex;
  align-items: baseline;
  margin-bottom: 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, padding 0.2s ease, opacity 0.2s ease;
}

.schedule-show-row:hover {
  background: rgba(255, 255, 255, 0.05);
  padding-left: 5px;
  border-left: 2px solid var(--theme-color, white);
}

.schedule-show-row.is-live { padding-left: 5px; border-left: 2px solid var(--theme-color, white); }

.schedule-show-time { font-weight: bold; width: 68px; flex-shrink: 0; }

.schedule-show-dots {
  flex-grow: 1;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
  margin: 0 15px;
  position: relative;
  top: -4px;
}

.schedule-show-info { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }

.schedule-show-title { font-weight: bold; letter-spacing: 1px; text-transform: uppercase; }

.schedule-show-live-tag { color: var(--theme-color, white); font-size: 9px; letter-spacing: 1px; margin-top: 2px; animation: blink 1s steps(1) infinite; }

.schedule-show-type {
  font-size: 10px;
  text-transform: lowercase;
  margin-top: 3px;
  letter-spacing: 1px;
  color: var(--theme-color, white);
}

.schedule-show-host { font-size: 11px; opacity: 0.6; margin-top: 4px; }

/* Monthly shows: "↻ 1ST FRI OF THE MONTH · next: 2 OCT" */
.schedule-show-recur { font-size: 9px; letter-spacing: 1px; margin-top: 3px; opacity: 0.8; }
.schedule-show-recur strong { color: var(--theme-color, white); }

/* A monthly show listed under its weekday, but not airing this week. */
.schedule-show-row.is-off-week { opacity: 0.55; }
.schedule-show-row.is-off-week:hover { opacity: 1; }

.schedule-show-lang {
  font-size: 9px;
  text-transform: uppercase;
  opacity: 0.55;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0 4px;
  letter-spacing: 1px;
}

/* Modal (show detail) */
#schedule-modal {
  position: fixed; inset: 0; z-index: 100002;
  background: rgba(0, 0, 0, 0.6);
  display: flex; align-items: center; justify-content: center;
  visibility: hidden; opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 20px;
}
#schedule-modal.is-open { visibility: visible; opacity: 1; }

.schedule-modal-box {
  width: 100%;
  max-width: 440px;
  background: var(--bg-color, black);
  color: var(--theme-color, white);
  border: 1px solid var(--theme-color, white);
  padding: 18px;
  font-size: 12px;
}

.schedule-modal-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px double var(--theme-color, white);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.schedule-modal-top span { opacity: 0.6; font-size: 10px; }

.schedule-modal-close {
  background: transparent;
  border: 1px solid var(--theme-color, white);
  color: var(--theme-color, white);
  font-family: monospace;
  font-size: 10px;
  padding: 2px 6px;
  cursor: pointer;
  opacity: 1 !important;
}
.schedule-modal-close:hover { background: var(--theme-color, white); color: var(--bg-color, black); }

.schedule-modal-title { font-weight: bold; text-transform: uppercase; letter-spacing: 1px; font-size: 15px; margin-bottom: 4px; }

.schedule-modal-meta {
  opacity: 0.7;
  font-size: 11px;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.schedule-modal-meta .schedule-show-type,
.schedule-modal-meta .schedule-show-live-tag { margin: 0; }

/* Same enlarge-on-click logic as #cover-container: a small inline thumbnail
   that pops into a big centered overlay on click, and shrinks back on a
   second click. */
.schedule-modal-image {
  margin-bottom: 12px;
  cursor: pointer;
  text-align: center;
}
.schedule-modal-image img {
  width: 100%;
  max-height: 220px;
  object-fit: contain; /* montre l'image en entier, quel que soit son ratio, plutôt que de la rogner */
  display: inline-block;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}
@media (hover: hover) { .schedule-modal-image:not(.expanded):hover img { opacity: 1; } }

/* Contrairement à #cover-container (toujours ancrée dans un coin fixe, donc
   qui grandit *depuis* ce coin), cette image démarre dans le flux normal du
   modal : pas de coin fixe dont partir. On centre donc l'agrandissement à
   l'écran avec un pop/fade plutôt que d'essayer d'animer une transition
   depuis sa position d'origine dans le texte. */
.schedule-modal-image.expanded {
  position: fixed;
  inset: 0;
  z-index: 100003;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: schedule-image-pop 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes schedule-image-pop {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
.schedule-modal-image.expanded img {
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 90vh;
  opacity: 1;
  box-shadow: 0 0 100px rgba(0, 0, 0, 0.9);
}

.schedule-modal-desc {
  border-top: 1px dashed rgba(255, 255, 255, 0.3);
  padding-top: 12px;
  line-height: 1.6;
  opacity: 0.9;
  white-space: pre-line;
}
.schedule-modal-desc::before { content: '> '; opacity: 0.5; }

.manifesto-blur {
  filter: blur(1.2px); /* Règle la force du flou ici (1px ou 2px) */
  opacity: 0.8; /* Rend le texte légèrement diaphane */
  transition: all 0.4s ease; /* Prépare une animation douce */
  cursor: default;
}

/* Dev Menu */
#dev-menu {
  display: none; position: fixed; top: 10px; right: 10px; width: 300px;
  background: rgba(0, 0, 0, 0.95); border: 1px solid var(--theme-color); color: #fff;
  z-index: 9999; padding: 15px; font-size: 12px; max-height: 90vh; overflow-y: auto;
}
.dev-section { margin-bottom: 15px; }

/* --- SETTINGS MENU --- */
.settings-group {
  margin-top: 20px;
  border-top: 1px dashed var(--theme-color, white);
  padding-top: 15px;
}

.settings-group h4 {
  margin: 0 0 15px 0;
  color: var(--theme-color, white);
  font-size: 13px;
  opacity: 0.8;
}

/* --- LIGNES DE REGLAGES --- */
.setting-row {
  display: flex;
  justify-content: space-between; /* Écarte le texte et le bouton */
  align-items: center;
  margin-bottom: 15px;
  font-size: 13px;
  cursor: pointer;
  width: 100%;
}

.setting-name {
  opacity: 0.9;
}

.setting-row input[type="text"],
.setting-row input[type="number"] {
  background: transparent;
  border: 1px solid var(--theme-color, white);
  color: var(--theme-color, white);
  font-family: monospace;
  padding: 4px 8px;
  width: 130px;
  outline: none;
  text-align: center; /* Centre le texte dans la boîte */
}

/* --- LE TOGGLE RÉTRO --- */
/* 1. On cache complètement la checkbox moche */
.retro-checkbox {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  opacity: 0 !important;
  z-index: -1 !important;
}

/* 2. Le style de base du faux bouton texte */
.retro-toggle-label {
  font-family: monospace;
  font-weight: bold;
  color: var(--theme-color, white);
  transition: all 0.2s ease;
  user-select: none;
}

/* 3. L'état par défaut (quand ce n'est pas coché) : on lit 'data-off' */
.retro-toggle-label::after {
  content: attr(data-off);
  opacity: 0.4; /* Grisé pour montrer que c'est inactif */
}

/* 4. L'état actif (quand la checkbox cachée est cochée) : on lit 'data-on' */
.retro-checkbox:checked + .retro-toggle-label::after {
  content: attr(data-on);
  opacity: 1;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.4); /* Petit effet néon quand c'est allumé ! */
}

/* Effet au survol pour montrer que c'est cliquable */
.setting-row:hover .retro-toggle-label {
  opacity: 1;
}

/* --- LOGIQUE DE CACHE DES PANNEAUX (VITAL POUR LES SETTINGS) --- */
body.hide-visualizer #canvas,
body.hide-visualizer #ascii {
  display: none !important;
}

body.hide-history #history-container {
  display: none !important;
}

body.hide-chat #chat-container {
  display: none !important;
}

body.hide-hearts #hearts-container {
  display: none !important;
}

body.hide-cover #cover-container {
  display: none !important;
}
/* --- BOUTON DANGER (RESET) --- */
.danger-btn {
  width: 100%;
  background: transparent;
  color: #ff3366; /* Un beau rouge/rose d'alerte */
  border: 1px solid #ff3366;
  padding: 10px;
  cursor: pointer;
  font-family: monospace;
  font-weight: bold;
  transition: all 0.2s ease;
  outline: none;
}

.danger-btn:hover {
  background: #ff3366;
  color: var(--bg-color, black);
  box-shadow: 0 0 10px rgba(255, 51, 102, 0.4);
}

.export-btn {
  background: transparent;
  color: var(--theme-color, white);
  border: 1px solid var(--theme-color, white);
  font-family: monospace;
  font-weight: bold;
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.export-btn:hover {
  background: var(--theme-color, white);
  color: var(--bg-color, black);
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

