/* SPDX-License-Identifier: AGPL-3.0-or-later */
/*
 * rcp-web 0.7.7
 *
 * Theme values are taken from the current lodlp.net page:
 *   background   #0b0d10
 *   foreground   #f4f7f5
 *   green        #8be9b4
 *   card         #101511
 *   border       #25312b
 *   card text    #cbd6d0
 *   footer       #718078
 *
 * Fonts use the same asset URLs as lodlp.net. They are expected to be exposed
 * by the final radio.lodlp.net nginx configuration.
 */

@font-face {
  font-family: "Ubuntu Sans";
  src: url("/assets/fonts/ubuntu-sans/UbuntuSans-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Ubuntu Sans";
  src: url("/assets/fonts/ubuntu-sans/UbuntuSans-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Dancing Script";
  src: url("/assets/fonts/dancing-script/DancingScript-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Ubuntu Sans", ui-sans-serif, system-ui, sans-serif;

  --bg: #0b0d10;
  --fg: #f4f7f5;
  --green: #8be9b4;
  --green-soft: #8aa99a;
  --card: rgba(16, 21, 17, 0.78);
  --now-playing-card: rgba(24, 31, 26, 0.78);
  --card-hover: rgba(18, 26, 21, 0.86);
  --border: #25312b;
  --border-active: #466454;
  --card-text: #cbd6d0;
  --muted: #718078;
  --danger: #ef9a9a;

  --radius: 0.9rem;
  --max-width: 76rem;
  --cover-size: 7rem;

  /* Le titre commence à --page-top. L’image est décalée de la moitié
   * de cette distance, horizontalement comme verticalement. */
  --page-top: clamp(3rem, 8vw, 7rem);
  --background-offset: clamp(1.5rem, 4vw, 3.5rem);
  --background-size: clamp(22rem, 48vw, 50rem);

  background: var(--bg);
  color: var(--fg);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

[hidden] {
  display: none !important;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  isolation: isolate;
  background-color: var(--bg);
  background-image: url("./craig-pelton-background.png");
  background-repeat: no-repeat;
  background-position: var(--background-offset) var(--background-offset);
  background-size: var(--background-size) auto;
  background-attachment: fixed;
}

/*
 * Reflets d'ambiance 0.7.0.
 *
 * Cette couche est volontairement très simple pour rester utilisable sur un
 * navigateur en rendu logiciel : douze petits éléments DOM réutilisés, aucun
 * filtre ni canvas. Une seule boucle synchronisée au rafraîchissement déplace
 * légèrement les reflets actifs ; leur position principale ne change que
 * lorsqu'ils sont invisibles.
 */
.ambient-lights {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

.ambient-light {
  --ambient-x: 50vw;
  --ambient-y: 50vh;
  --ambient-dx: 0px;
  --ambient-dy: 0px;
  --ambient-cross-x: 50%;
  --ambient-point-size: 8px;
  --ambient-angle: 0deg;
  --ambient-scale: 1;
  --ambient-alpha: 0.25;
  --ambient-attack: 70ms;
  --ambient-decay: 620ms;

  position: absolute;
  top: 0;
  left: 0;
  display: block;
  opacity: 0;
  color: #b7efd0;
  transform:
    translate(var(--ambient-x), var(--ambient-y))
    translate(var(--ambient-dx), var(--ambient-dy))
    rotate(var(--ambient-angle))
    scale(var(--ambient-scale));
  transform-origin: center;
  transition: opacity var(--ambient-decay) ease-out;
  box-shadow: 0 0 8px 1px currentColor;
}

.ambient-light.is-lit {
  opacity: var(--ambient-alpha);
  transition-duration: var(--ambient-attack);
}

.ambient-light--point {
  width: var(--ambient-point-size);
  height: var(--ambient-point-size);
  border-radius: 50%;
  background: currentColor;
}

.ambient-light--streak {
  width: 72px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

/*
 * Etoile à huit bras : quatre segments croisés au même centre décalé.
 * Le quatrième segment est un enfant statique ; tous les autres sont portés
 * par l'élément lui-même et ses pseudo-éléments.
 */
.ambient-light--streak::before,
.ambient-light--streak::after,
.ambient-light--streak .ambient-light-arm {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--ambient-cross-x);
  width: 62px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 7px 1px currentColor;
  transform-origin: center;
}

.ambient-light--streak::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.ambient-light--streak::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.ambient-light--streak .ambient-light-arm {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/*
 * Etoile à six bras : trois segments fins à 60°, avec le même décentrage
 * aléatoire que les étoiles à huit bras.
 */
.ambient-light--glint {
  width: 68px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.ambient-light--glint::before,
.ambient-light--glint::after {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--ambient-cross-x);
  width: 68px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 7px 1px currentColor;
}

.ambient-light--glint::before {
  transform: translate(-50%, -50%) rotate(60deg);
}

.ambient-light--glint::after {
  transform: translate(-50%, -50%) rotate(-60deg);
}

/* Mode sobre : coupe uniquement l’ambiance JS. Le shimmer du libellé
 * "Actuellement à l’écoute" reste fonctionnel car il indique la lecture. */
.exuberance-disabled .ambient-lights {
  display: none;
}

.exuberance-control {
  position: fixed;
  z-index: 20;
  top: 0.55rem;
  left: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.45rem;
  border-radius: 0.45rem;
  background: rgba(11, 13, 16, 0.78);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.exuberance-control input {
  margin: 0;
}

.exuberance-control:hover,
.exuberance-control:focus-within {
  color: var(--card-text);
}

/* Aide affichée uniquement lorsque Firefox refuse audio.play() pour cause
 * d'autoplay. Elle n'intercepte aucun clic : l'interaction peut donc servir
 * immédiatement à débloquer la lecture. */
.autoplay-help {
  position: fixed;
  z-index: 40;
  top: clamp(0.75rem, 3vh, 1.5rem);
  left: 25%;
  width: min(40rem, calc(75vw - 1.5rem));
  padding: 1.1rem 1.25rem 1.1rem 6.3rem;
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
  background: rgba(28, 32, 39, 0.97);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.45);
  color: var(--fg);
  transform: none;
  pointer-events: none;
}

.autoplay-help p {
  margin: 0;
  font-size: clamp(1.14rem, 3vw, 1.30rem);
  line-height: 1.45;
}

.autoplay-help-arrow {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  font-size: 4rem;
  line-height: 1;
  transform: translateY(-54%);
  animation: autoplay-help-point 850ms ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes autoplay-help-point {
  from { transform: translateY(-58%); }
  to   { transform: translateY(-38%); }
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--green-soft);
}

.page {
  position: relative;
  z-index: 1;
  width: min(var(--max-width), 100%);
  margin-inline: auto;
  padding: var(--page-top) clamp(1rem, 4vw, 3rem) 3rem;
}

.site-header {
  text-align: center;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(2.8rem, 10vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1;
}

.site-title {
  position: relative;
}

/* Preview title-sign-v1 : « Radio » devient une petite enseigne nette plutôt
 * qu'une seconde masse typographique derrière le nom. L'illustration porte
 * déjà le grand RADIO flou ; ici on reprend ses ors, magentas et violets. */
.title-radio {
  display: inline-block;
  position: relative;
  z-index: 3;
  margin: 0 0.38em 0 0.18em;
  color: transparent;
  background: linear-gradient(
    105deg,
    #fff6c7 0%,
    #f2c45d 38%,
    #ff87de 72%,
    #b897ff 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 0.38em;
  font-weight: 850;
  letter-spacing: 0.24em;
  line-height: 1;
  text-transform: uppercase;
  -webkit-text-stroke: 0.65px rgba(54, 31, 10, 0.9);
  transform: translateY(-0.12em);
  transform-origin: 50% 70%;
}

.title-radio::before,
.title-radio::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0.42em;
  height: 1.05em;
  background: linear-gradient(180deg, #ffe76d 0%, #ff59cf 58%, #986cff 100%);
  clip-path: polygon(52% 0, 100% 0, 65% 39%, 96% 39%, 24% 100%, 42% 55%, 8% 55%);
  transform: translateY(-52%) rotate(7deg);
  filter: drop-shadow(0 0 0.16em rgba(255, 126, 218, 0.65));
  pointer-events: none;
}

.title-radio::before {
  left: -0.72em;
}

.title-radio::after {
  right: -0.43em;
  transform: translateY(-52%) scaleX(-1) rotate(7deg);
}

.title-name {
  position: relative;
  color: var(--fg);
  text-shadow: 0 0 1px var(--fg);
  white-space: nowrap;
}

.title-name::before,
.title-name::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: transparent;
  text-shadow: none;
  background: linear-gradient(90deg, #d8aa55 0%, #a86be8 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.title-name::before {
  filter: blur(8px);
  opacity: 0.95;
}

.title-name::after {
  filter: blur(20px);
  opacity: 0.85;
}

.tagline {
  max-width: 48rem;
  margin: 1rem auto 0;
  color: var(--green);
  font-size: clamp(1rem, 2.5vw, 1.28rem);
  line-height: 1.5;
  text-align: center;
  -webkit-text-stroke: 0.35px rgba(0, 0, 0, 0.75);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.tagline-brand:focus-visible,
a:focus-visible {
  border-radius: 0.2rem;
  outline: 2px solid var(--green);
  outline-offset: 4px;
}


.now-playing {
  position: relative;
  display: grid;
  grid-template-columns: clamp(8rem, 18vw, 12rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.2rem, 4vw, 2.4rem);
  margin: clamp(2.5rem, 7vw, 5rem) 0 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--now-playing-card);
}


/*
 * Surfaces translucides : seule leur couleur de fond est alpha-composée.
 * Le contenu reste à opacité 1 ; le flou ne s’applique qu’à l’arrière-plan.
 */
.now-playing,
.history-panel,
.play-card,
.empty-state {
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}


.now-playing-tools {
  position: absolute;
  z-index: 2;
  top: clamp(1rem, 3vw, 1.5rem);
  right: clamp(1rem, 3vw, 1.5rem);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.now-playing-label {
    position: relative;
margin: 0;
  color: var(--green);
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

.now-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.8rem;
}

.now-cover .cover-placeholder,
.now-cover img {
  width: 100%;
  height: 100%;
}

.now-cover img {
  display: block;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: #0d120f;
}

.now-cover img[hidden] {
  display: none;
}

.now-content {
  min-width: 0;
}

.now-artist,
.now-title,
.now-album {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-artist {
  color: var(--green);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 700;
}

.now-title {
  margin-top: 0.1rem;
  color: var(--fg);
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.now-album {
  margin-top: 0.3rem;
  color: var(--card-text);
  font-size: 0.95rem;
}

.progress-row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) 3.2rem;
  align-items: center;
  gap: 0.7rem;
  margin-top: clamp(1rem, 3vw, 1.6rem);
}

.progress-time {
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.progress-time:last-child {
  text-align: right;
}

.progress-track {
  position: relative;
  height: 0.32rem;
  overflow: hidden;
  border-radius: 99rem;
  background: var(--border);
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: var(--green);
}

.now-playing.is-unavailable .now-title,
.now-playing.is-unavailable .now-artist,
.now-playing.is-unavailable .now-album {
  color: var(--muted);
}


.private-player {
  display: flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0;
  margin-top: -10px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.private-player-controls {
  display: flex;
  align-items: center;
  gap: 0;
}

.private-player-button,
.private-player-volume-button {
  display: inline-grid;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--green);
  cursor: pointer;
}

.private-player-button {
  margin-right: 0.45rem;
}

/*
 * Flux en lecture : shimmer large et continu.
 *
 * La position du centre du gradient est animée directement au lieu de déplacer
 * une image de fond. Cela permet d'élargir le shimmer sans réintroduire la
 * répétition qui provoquait les cycles partiels.
 *
 * Largeur visuelle : environ x3 par rapport à 0.5.20.
 * Traversal : 5 s.
 * Pause hors texte : 2 s.
 * Cycle complet : 7 s.
 */
@property --now-playing-shimmer-x {
  syntax: "<percentage>";
  inherits: false;
  initial-value: -50%;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .now-playing-label.is-stream-playing::after {
    content: attr(data-shimmer-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    color: transparent;
    --now-playing-shimmer-x: -50%;
    background:
      linear-gradient(
        105deg,
        transparent 0%,
        transparent calc(var(--now-playing-shimmer-x) - 35%),
        #46755a calc(var(--now-playing-shimmer-x) - 19%),
        #46755a calc(var(--now-playing-shimmer-x) - 9.5%),
        #c5f4da var(--now-playing-shimmer-x),
        #46755a calc(var(--now-playing-shimmer-x) + 9.5%),
        #46755a calc(var(--now-playing-shimmer-x) + 19%),
        transparent calc(var(--now-playing-shimmer-x) + 35%),
        transparent 100%
      );
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: now-playing-label-shimmer 7s linear infinite;
  }
}

@keyframes now-playing-label-shimmer {
  0% {
    --now-playing-shimmer-x: -50%;
  }
  71.4286% {
    --now-playing-shimmer-x: 150%;
  }
  100% {
    --now-playing-shimmer-x: 150%;
  }
}


.private-player-button:hover,
.private-player-button:focus-visible,
.private-player-volume-button:hover,
.private-player-volume-button:focus-visible {
  background: var(--card-hover);
}

.private-player-button:focus-visible,
.private-player-volume-button:focus-visible,
.private-player-volume input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.private-player-time {
  min-width: 3.2rem;
  color: var(--card-text);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  margin-right: 0.15rem;
}

.private-player-volume {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}

.private-player-volume-button {
  flex: 0 0 auto;
  width: 1.45rem;
  height: 1.9rem;
  color: var(--muted);
}

.private-player-volume-button i {
  width: 1rem;
  text-align: center;
}

.private-player-volume input[type="range"] {
  width: 5rem;
  margin: 0;
  accent-color: var(--green);
}

.private-audio-engine {
  display: none;
}

/*
 * Le lecteur est en position absolue sous le libellé. Quand il existe, on
 * réserve un peu d'air à la métadonnée afin qu'un titre long ne passe pas
 * dessous. Les visiteurs publics ne paient pas cet espace supplémentaire.
 */
.now-playing.has-private-player .now-content {
  padding-top: 3.2rem;
}

.history-panel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  margin: clamp(2.5rem, 7vw, 5rem) 0 0;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.day-navigation,
.filters {
  display: flex;
  align-items: center;
}

.day-navigation {
  flex: 0 0 auto;
  gap: 0.5rem;
}

.filters {
  flex: 1 1 auto;
  min-width: 0;
  gap: 1rem;
}

.icon-button,
.date-field,
.filter-field {
  min-height: 2.85rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: #0d120f;
  color: var(--card-text);
}

.icon-button {
  width: 2.85rem;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.icon-button:disabled {
  cursor: default;
  opacity: 0.28;
}

.date-field,
.filter-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.85rem;
}

.date-field > i,
.filter-field > i {
  color: var(--green);
}

.date-field input,
.filter-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
}

.date-field input {
  width: 9.3rem;
}

.filter-field input[type="time"] {
  width: 4.4rem;
}

.time-field {
  flex: 0 0 auto;
}

.time-window-hint {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.search-field {
  flex: 1 1 auto;
  min-width: 12rem;
  width: auto;
}

.search-field input {
  width: 100%;
}

input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.day-section {
  margin-top: clamp(2.2rem, 5vw, 4rem);
}

.day-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.section-label {
  margin: 0 0 0.22rem;
  color: var(--green);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.day-heading h2 {
  margin: 0;
  color: var(--fg);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.result-count {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.status,
.empty-state {
  color: var(--muted);
}

.status {
  padding: 1.5rem 0;
}

.status.error {
  color: var(--danger);
}

.history-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.play-card {
  min-height: calc(var(--cover-size) + 1.4rem);
  display: grid;
  grid-template-columns: 4.6rem var(--cover-size) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.play-time {
  align-self: start;
  padding-top: 0.22rem;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}


.play-cover {
  position: relative;
  width: var(--cover-size);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.72rem;
}

.play-cover .cover-placeholder,
.play-cover-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.play-cover-image {
  display: block;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 0.72rem;
  background: #0d120f;
  opacity: 0;
}

.play-cover-image.is-loaded {
  opacity: 1;
}

.cover-placeholder {
  position: relative;
  width: var(--cover-size);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 0.72rem;
  background:
    radial-gradient(circle at 50% 50%, #18201b 0 12%, transparent 13%),
    #0d120f;
  color: var(--green);
}

.record-ring {
  position: absolute;
  border: 1px solid rgba(139, 233, 180, 0.12);
  border-radius: 50%;
}

.record-ring-1 {
  width: 72%;
  height: 72%;
}

.record-ring-2 {
  width: 46%;
  height: 46%;
}

.record-label {
  position: relative;
  z-index: 2;
  width: 24%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #0b0d10;
  font-size: 0.68rem;
}

.play-meta {
  min-width: 0;
}

.play-meta p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-artist {
  color: var(--green);
  font-size: 0.95rem;
  font-weight: 700;
}

.play-title {
  margin-top: 0.08rem !important;
  color: var(--fg);
  font-size: clamp(1.08rem, 2vw, 1.34rem);
  font-weight: 700;
  letter-spacing: -0.018em;
}

.play-album {
  margin-top: 0.08rem !important;
  color: var(--card-text);
  font-size: 0.95rem;
}

.play-end-details {
  margin-top: 0.34rem !important;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.play-end-reason {
  color: var(--green-soft);
  font-weight: 700;
}

.empty-state {
  padding: 2rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

footer {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
  text-align: center;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--green-soft);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .icon-button,
  .date-field,
  .filter-field,
  .play-card {
    transition:
      border-color 160ms ease,
      background 160ms ease;
  }

  .icon-button:not(:disabled):hover,
  .icon-button:not(:disabled):focus-visible,
  .date-field:focus-within,
  .filter-field:focus-within,
  .play-card:hover {
    border-color: var(--border-active);
    background: var(--card-hover);
  }
}


/* En portrait mobile/tablette, l’image conserve son décalage vertical mais
 * se centre horizontalement. Le paysage garde le placement de bureau. */
@media (orientation: portrait) and (max-width: 64rem) {
  body {
    background-position: center var(--background-offset);
  }
}

@media (max-width: 42rem) {
  .now-playing {
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
  }

  .now-playing-tools {
    top: 1rem;
    right: 1rem;
  }

  .now-playing-label {
    font-size: 0.60em;
  }

  .now-content {
    padding-top: 1.15rem;
  }

  .now-playing.has-private-player .now-content {
    padding-top: 4.15rem;
  }

  .private-player-volume input[type="range"] {
    width: 4rem;
  }

  .now-title {
    font-size: clamp(1.2rem, 6vw, 1.8rem);
  }

  .now-album {
    font-size: 0.82rem;
  }
}

@media (max-width: 48rem) {
  .tagline .desktop-only-break {
    display: none;
  }

  .now-playing-label {
    font-size: 0.65em;
  }

  .history-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .day-navigation,
  .filters {
    width: 100%;
  }

  .filters {
    gap: 0.75rem;
  }

  .date-field,
  .search-field {
    flex: 1;
    width: auto;
  }

  .date-field input {
    width: 100%;
  }
}

@media (max-width: 42rem) {
  .page {
    padding-inline: 0.65rem;
  }

  :root {
    --cover-size: 5.85rem;
  }

  .play-card {
    grid-template-columns: 3.8rem var(--cover-size) minmax(0, 1fr);
    gap: 0.7rem;
  }

  .play-time {
    font-size: 0.82rem;
  }
}

@media (max-width: 30rem) {
  .tagline-claim {
    white-space: normal;
  }

  .filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
  }

  .time-field {
    grid-column: 1 / -1;
    width: 100%;
  }

  .search-field {
    grid-column: 1;
    min-width: 0;
  }

  #clear-filters {
    grid-column: 2;
  }

  :root {
    --cover-size: 4.85rem;
  }

  .play-card {
    grid-template-columns: 3rem var(--cover-size) minmax(0, 1fr);
    padding: 0.55rem;
  }

  .play-artist,
  .play-album {
    font-size: 0.86rem;
  }

  .play-title {
    font-size: 1rem;
  }

  .private-player-time {
    min-width: 2.8rem;
  }

  .private-player-volume input[type="range"] {
    width: 3.4rem;
  }
}

/* Taille des téléphones étroits ; la tablette paysage est rétablie plus bas. */
@media (max-width: 42rem) {
  .now-playing-label {
    font-size: 0.63em;
  }
}

/* Mobile portrait : le titre passe volontairement sur deux lignes.
 * Craig Pelton reste indivisible. */
@media (orientation: portrait) and (max-width: 42rem) {
  .site-title .title-radio,
  .site-title .title-name {
    display: block;
  }
}

/*
 * Tablette paysage + desktop : le contenu principal se range à droite pour
 * laisser respirer l’illustration. Le cadre du morceau courant conserve un
 * léger chevauchement en occupant 60 % de la largeur disponible.
 */
@media (min-width: 75rem),
       (orientation: landscape) and (min-width: 42rem) and (min-height: 32rem) {
  .site-header {
    text-align: right;
  }

  .tagline {
    margin-right: 0;
    margin-left: auto;
    text-align: right;
  }

  .now-playing {
    width: 60%;
    margin-left: auto;
  }
}

/* Tablettes en paysage : cette règle vient après les breakpoints de largeur
 * afin que 0.87em l’emporte aussi sur le breakpoint max-width: 48rem. */
@media (orientation: landscape) and (min-width: 42rem) and (min-height: 32rem) and (max-width: 75rem) {
  .now-playing-label {
    font-size: 0.87em;
  }
}

/* Desktop : l'enseigne « RADIO » se pose au-dessus du nom. Le grand RADIO
 * atmosphérique reste celui de l'illustration de fond. */
@media (min-width: 75rem) {
  .site-title {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
  }

  .title-radio {
    margin: 0 0 0.18em 0;
    font-size: 0.38em;
    letter-spacing: 0.30em;
    transform: none;
  }
}
