/* Google Fonts, served locally with their SIL Open Font licences. */
.lm-site {
  --lm-night: #0a0a0c;
  --lm-surface: #141418;
  --lm-surface-raised: #201d29;
  --lm-border: #393442;
  --lm-action: #c79bff;
  --lm-action-hover: #e0c5ff;
  --lm-violet: #a873ff;
  --lm-link: var(--lm-action);
  --lm-text: #f4f2f8;
  --lm-muted: #b6b0c1;
  --lm-heading: 'LM Charte Sans', sans-serif;
  --lm-audio-font: 'LM Charte Sans', sans-serif;
  --lm-sticker-ink: #0a0a0c;
  --lm-sticker-paper: #fff;
  --lm-sticker-accent: #ffd600;
  --lm-hard-shadow: 4px 4px 0 #ffd600;
  --lm-text-font: 'LM Charte Sans', sans-serif;
  --lm-radius: 1rem;
  --lm-footer-space: calc(96px + env(safe-area-inset-bottom));
}

/* Match legacy component styles without overriding code, emoji or SVG typography. */
html.lm-site :where(body, body *):not(:where(svg, svg *, pre, pre *, code, code *, kbd, samp, .madone-chat-room-flag)) {
  font-family: var(--lm-text-font) !important;
}

html.lm-site :is(h1, h2, h3, h4, h5, h6, [role="heading"]),
html.lm-site :is(h1, h2, h3, h4, h5, h6, [role="heading"]) :not(:where(svg, svg *, code, code *)) {
  font-family: var(--lm-heading) !important;
}

html.lm-site :is(h1, h2, h3, h4, h5, h6, [role="heading"]) {
  font-style: normal !important;
  font-weight: 400 !important;
}

html.lm-site :is(h1, h2, h3) {
  text-transform: uppercase;
}

html.lm-site :is(.listening-app, .listening-page, .direct-page) {
  --background: var(--lm-night);
  --surface: var(--lm-surface);
  --paper: var(--lm-text);
  --muted: var(--lm-muted);
  --violet: var(--lm-link);
  --ink: var(--lm-night);
  --rule: var(--lm-border);
}

html.lm-site > body:has(.station #player-title) {
  --station-ink: var(--lm-night);
  --station-paper: var(--lm-text);
  --station-muted: var(--lm-muted);
  --station-violet: var(--lm-violet);
  --station-pink: var(--lm-link);
  --station-line: var(--lm-border);
}

.lm-site :is(.listening-app .station-header, .listening-app .app-controls,
  .station .station-header, .station .station-player) {
  background-color: var(--lm-surface);
}

html.lm-site:not(.radio-refonte) {
  min-block-size: 100%;
  color-scheme: dark;
  color: var(--lm-text);
  font-family: var(--lm-text-font);
  background:
    radial-gradient(52rem 33rem at 10% 0, rgb(168 115 255 / 15%), transparent 76%),
    var(--lm-night);
  scroll-padding-block-end: var(--lm-footer-space);
}

.lm-site:not(.radio-refonte) body {
  background: transparent;
  font-family: var(--lm-text-font);
}

.lm-site:not(.radio-refonte) :focus-visible {
  outline: 2px solid var(--lm-link);
  outline-offset: 3px;
}

.lm-site:not(.radio-refonte) ::selection {
  color: var(--lm-night);
  background: var(--lm-link);
}

.lm-site:not(.radio-refonte) :is(body > footer, .links-footer, .offstage-page) {
  padding-block-end: max(var(--lm-footer-space), 1.35rem);
}

.lm-site:not(.radio-refonte) :is(body > footer, .links-footer) a {
  display: inline-flex;
  align-items: center;
  min-inline-size: 44px;
  min-block-size: 44px;
}

/* Existing site controls that read these variables keep the native pointer. */
html.lm-site {
  --madone-cursor: auto;
  --madone-cursor-action: pointer;
}

.lm-site:not(.radio-refonte) :is(
  .discovery-page main,
  .editorial-home main,
  .fashion-only main,
  .actu-page main,
  .links-intro,
  main.layout
) :is(h1, h2),
.lm-site:not(.radio-refonte) :is(.follow-block h2, .editorial-universe-title) {
  color: var(--lm-text);
  font-family: var(--lm-heading);
  font-style: normal;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.03em;
}

/* Discovery layout, shared by releases, shows, sessions and artist pages. */
.lm-site:not(.radio-refonte) .discovery-page {
  --ink: var(--lm-night);
  --surface: var(--lm-surface);
  --paper: var(--lm-text);
  --muted: var(--lm-muted);
  --accent: var(--lm-link);
  --line: var(--lm-border);
  --display: var(--lm-heading);
  color: var(--paper);
}

.lm-site:not(.radio-refonte) .discovery-header {
  background: rgb(10 10 12 / 86%);
  backdrop-filter: blur(1rem);
}

.lm-site:not(.radio-refonte) .discovery-header .discovery-shell {
  column-gap: clamp(.4rem, 2vw, 1.25rem);
}

.lm-site:not(.radio-refonte) .discovery-header .discovery-brand:not(:has(img))::before {
  content: "";
  flex: 0 0 1.75rem;
  block-size: 1.75rem;
  border-radius: .25rem;
  background: url('/app/assets/madone-radio-app-192.png') center / cover;
}

/* The legacy chat selector includes an ID and outranks class selectors. */
.lm-site:not(.radio-refonte) .discovery-header .discovery-room { color: var(--lm-link) !important; }

.lm-site .artist-header__nav a {
  justify-content: center;
  min-inline-size: 44px;
}

.discovery-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem .4rem;
  margin-inline-start: auto;
}

.lm-site .discovery-switch a {
  color: var(--lm-muted);
}

.lm-site .discovery-switch a[aria-current="page"] {
  color: var(--lm-text);
  text-decoration-color: var(--lm-link);
}

.lm-site .discovery-header .discovery-live {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-block-size: 44px;
  padding-inline: .75rem;
  border-radius: 999px;
  background: var(--lm-action);
  color: var(--lm-night);
  text-decoration: none;
  font-size: .75rem;
  font-weight: 800;
  white-space: nowrap;
}

.discovery-live::before {
  content: "";
  inline-size: .45rem;
  block-size: .45rem;
  border-radius: 50%;
  background: currentColor;
}

.lm-site .discovery-header .discovery-live:hover {
  background: var(--lm-action-hover);
}

.lm-site:not(.radio-refonte) :is(.discovery-brand, .discovery-section a, .discovery-intro a):hover {
  color: var(--lm-link);
}

.lm-site:not(.radio-refonte) .discovery-page .discovery-kicker,
.lm-site .discovery-badge,
.lm-site main.layout .format,
.lm-site .offstage-status {
  display: inline-block;
  max-inline-size: 100%;
  padding: .3em .72em;
  border-radius: 999px;
  background: var(--lm-border);
  color: var(--lm-link);
  font-size: .8125rem;
  line-height: 1.35;
  letter-spacing: .045em;
}

.lm-site .discovery-card h3 > a {
  display: inline-flex;
  align-items: center;
  min-inline-size: 44px;
  min-block-size: 44px;
}

.lm-site:not(.radio-refonte) .discovery-page main h1 {
  font-size: clamp(2.85rem, 7.5vw, 6.8rem);
  text-wrap: balance;
}

.lm-site:not(.radio-refonte) .discovery-page h2 {
  font-size: clamp(1.95rem, 4.25vw, 3.8rem);
}

.lm-site:not(.radio-refonte) .discovery-hero-art img {
  border-radius: var(--lm-radius);
}

.lm-site:not(.radio-refonte) :is(
  .discovery-card, .follow-block, .link-card, .tool-card, .instructions li,
  .offstage-look, .plugin-interface figure, .home-release-card, .home-live-strip,
  .home-newsletter-inner, .actu-card
) {
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius);
  background: var(--lm-surface);
}

.lm-site:not(.radio-refonte) :is(.discovery-card, .tool-card, .home-release-card, .actu-card):focus-within {
  border-color: var(--lm-link);
}

@media (hover: hover) and (pointer: fine) {
  .lm-site:not(.radio-refonte) :is(.discovery-card, .tool-card, .home-release-card, .actu-card):has(a, button, summary):hover {
    border-color: var(--lm-action);
  }
}

.lm-site:not(.radio-refonte) :is(.discovery-card-image, .home-release-card img) {
  border-radius: calc(var(--lm-radius) / 2);
}

.lm-site:not(.radio-refonte) :is(.discovery-video, .discovery-video iframe) {
  border-radius: var(--lm-radius);
}

.lm-site:not(.radio-refonte) .discovery-section summary {
  display: list-item;
  min-block-size: 44px;
  padding-block: .6rem;
  color: var(--lm-link);
  cursor: pointer;
}

.lm-site:not(.radio-refonte) .discovery-tracklist {
  border-radius: var(--lm-radius);
  background: var(--lm-surface);
  padding-block: .75rem;
  padding-inline: 2rem 1rem;
}

.lm-site:not(.radio-refonte) .discovery-tracklist li {
  border-block-end: 1px solid var(--lm-border);
}

.lm-site:not(.radio-refonte) .follow-block {
  --follow-accent: var(--lm-link);
}

.lm-site:not(.radio-refonte) :is(
  .discovery-page .discovery-button, .follow-block [data-follow],
  main.layout .action, .artist-cover .artist-cover__action,
  .editorial-home .button, .editorial-home .offstage-door-cta,
  .editorial-home .home-game__play
) {
  color: var(--lm-text);
  border: 1px solid var(--lm-violet);
  border-radius: .65rem;
  background: transparent;
  min-block-size: 44px;
  min-inline-size: 44px;
  font-family: var(--lm-text-font);
  font-weight: 700;
}

.lm-site:not(.radio-refonte) :is(
  .discovery-page .discovery-button, .follow-block [data-follow],
  main.layout .action, .artist-cover .artist-cover__action,
  .editorial-home .button, .editorial-home .offstage-door-cta,
  .editorial-home .home-game__play
):hover {
  color: var(--lm-text);
  border-color: var(--lm-link);
  background: var(--lm-surface-raised);
}

.lm-site:not(.radio-refonte) :is(
  .discovery-page .discovery-button--primary, .follow-block [data-follow="newsletter"],
  main.layout .action:not(.action--secondary), .artist-cover .artist-cover__radio,
  .artist-cover .artist-cover__listen, .editorial-home .button.primary,
  .editorial-home .home-newsletter-form button, .links-hub .link-card--primary
) {
  color: var(--lm-night);
  border-color: var(--lm-action);
  background: var(--lm-action);
}

.lm-site:not(.radio-refonte) :is(
  .discovery-page .discovery-button--primary, .follow-block [data-follow="newsletter"],
  main.layout .action:not(.action--secondary), .artist-cover .artist-cover__radio,
  .artist-cover .artist-cover__listen, .editorial-home .button.primary,
  .editorial-home .home-newsletter-form button, .links-hub .link-card--primary
):hover {
  color: var(--lm-night);
  border-color: var(--lm-action-hover);
  background: var(--lm-action-hover);
}

.lm-site:not(.radio-refonte) .discovery-button:disabled {
  color: var(--lm-muted);
  border-color: var(--lm-border);
  background: var(--lm-surface);
}

/* Artwork in record sleeves. The effect exists only with fine hover and motion. */
.lm-vinyl {
  position: relative;
  isolation: isolate;
  display: block;
  min-inline-size: 0;
  border-radius: calc(var(--lm-radius) / 2);
}


.lm-site .discovery-hero > .lm-vinyl {
  inline-size: min(100%, 25rem);
  justify-self: center;
  border-radius: var(--lm-radius);
}

.lm-site .discovery-hero > .lm-vinyl img {
  inline-size: 100%;
  max-block-size: none;
}

.lm-vinyl .discovery-card-image { margin-block-end: 0; }
.lm-vinyl + h3 { margin-block-start: .8rem; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .lm-vinyl img {
    position: relative;
    z-index: 1;
    transition: rotate 200ms ease, box-shadow 200ms ease;
  }

  .lm-vinyl::before,
  .lm-vinyl::after {
    position: absolute;
    content: "";
    pointer-events: none;
    opacity: 0;
  }

  .lm-vinyl::before {
    inset: 5% 1% auto auto;
    block-size: 90%;
    max-inline-size: 90%;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
      radial-gradient(circle, #0e0a16 2%, #9d4edd 3% 12%, transparent 13%),
      conic-gradient(from 25deg, transparent, #b67bef38, transparent 33%, #b67bef30 70%, transparent 88%),
      repeating-radial-gradient(circle, #15111d 0 2px, #2a2235 3px 4px);
    box-shadow: 0 0 1.15rem #9d4edd56;
    transition: translate 200ms ease, opacity 200ms ease;
  }

  .lm-vinyl::after {
    z-index: 2;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(126deg, transparent 45%, #e0b7ff26 48%, #9d4edd18 53%, transparent 55%);
    transition: opacity 200ms ease, rotate 200ms ease;
  }

  .lm-vinyl:hover img,
  .lm-vinyl:hover::after { rotate: -3deg; }
  .lm-vinyl:hover { z-index: 1; }
  .lm-vinyl:hover img { box-shadow: 0 0 1.35rem #9d4edd78; }
  .lm-vinyl:hover::before { translate: 16%; }
  .lm-vinyl:hover::before,
  .lm-vinyl:hover::after { opacity: 1; }
}

/* Artist photography keeps its native framing inside a night surface. */
.lm-site .artist-cover {
  --artist-ink: var(--lm-night);
  --artist-paper: var(--lm-text);
  --artist-action-outline: var(--lm-violet);
  border: 1px solid var(--lm-border);
}

.lm-site .artist-cover .artist-cover__name span {
  color: inherit;
  background: none;
  filter: none;
}

.lm-site .artist-cover__genre {
  padding: .35rem .65rem;
  border: 0;
  border-radius: 999px;
  background: var(--lm-border);
  color: var(--lm-link);
}

/* Link hub and the Offstage lookbook share the same type and surfaces. */
.lm-site:has(.links-hub) {
  --surface: var(--lm-surface);
  --paper: var(--lm-text);
  --muted: var(--lm-muted);
  --line: var(--lm-border);
  --accent: var(--lm-link);
}

.lm-site .link-card { color: var(--lm-text); }
.lm-site .link-card:is(:hover, :focus-visible) {
  border-color: var(--lm-link);
  background: var(--lm-surface-raised);
}

.lm-site .links-hub .link-card--primary :is(.link-icon, .link-arrow) { color: currentColor; }
.lm-site .links-hub .language-switch a { min-inline-size: 44px; }

.lm-site .offstage-page {
  --offstage-ink: var(--lm-text);
  --offstage-accent: var(--lm-link);
  --offstage-rule: var(--lm-border);
  background: transparent;
  color-scheme: dark;
}

.lm-site .offstage-look { padding: clamp(.65rem, 2vw, 1.25rem); }
.lm-site .offstage-look .offstage-photo { border-radius: .5rem; }
.lm-site .offstage-info-footer { margin-block-start: .75rem; }

/* Studio plug-ins retain their video player and technical tables. */
.lm-site:has(body > header.layout) {
  --bg: var(--lm-night);
  --panel: var(--lm-surface);
  --ink: var(--lm-text);
  --muted: var(--lm-muted);
  --pink: var(--lm-link);
  --edge: var(--lm-border);
  --focus: var(--lm-link);
}

.lm-site body > header.layout .site-nav {
  border-color: var(--lm-border);
  background: rgb(10 10 12 / 75%);
  backdrop-filter: blur(1rem);
}

.lm-site .site-nav .language-options a { min-inline-size: 44px; }
.lm-site main.layout .hero__aside { border-color: var(--lm-violet); }
.lm-site main.layout :is(.demo-shell, .plugin-download) {
  border-color: var(--lm-border);
  background: var(--lm-surface);
}

.lm-site main.layout .demo-shell { border-radius: var(--lm-radius); }

.lm-site .demo-shell .vst-demo {
  --vst-demo-ink: var(--lm-text);
  --vst-demo-accent: var(--lm-link);
  background: var(--lm-surface-raised);
}

.lm-site .demo-shell .vst-demo :is(.vst-demo__hint, .vst-demo__error) {
  color: var(--lm-muted);
}

.lm-site .demo-shell .vst-demo__controls button {
  border-color: var(--lm-violet);
  background: var(--lm-night);
  color: var(--lm-text);
  font-family: var(--lm-text-font);
}

.lm-site .demo-shell .vst-demo__controls button:hover {
  border-color: var(--lm-link);
  background: var(--lm-surface);
}

.lm-site .demo-shell .vst-demo__controls button[aria-pressed="true"] {
  border-color: var(--lm-action);
  background: var(--lm-action);
  color: var(--lm-night);
}

/* Home sections are laid on one continuous background. */
.lm-site .madone-home :is(
  .station-scene, .home-library, .madone-radio-identity,
  .madone-listening-home, .madone-home-actu, .booking, .home-newsletter
) {
  background: transparent;
}

.lm-site .station-scene .air:has(> .welcome-home) > .mural-layer { display: none; }
.lm-site .by-app { background: transparent; }

.lm-site .editorial-home {
  --ink: var(--lm-night);
  --paper: var(--lm-text);
  --muted: var(--lm-muted);
  --surface: var(--lm-surface);
  --line: var(--lm-border);
  --lavender: var(--lm-link);
  --display: var(--lm-heading);
  --refine-lime: var(--lm-action);
}

.lm-site .editorial-home :is(.editorial-primary-nav a, .section-heading .text-link) {
  display: inline-flex;
  align-items: center;
  min-inline-size: 44px;
  min-block-size: 44px;
}

.lm-site .editorial-home .home-newsletter-inner {
  padding: clamp(1rem, 3vw, 2rem);
}

.lm-site .editorial-home .home-newsletter-form :is(input, button) {
  min-block-size: 44px;
}

.lm-site .editorial-home .music-library {
  --music-ink: var(--lm-night);
  --music-paper: var(--lm-text);
  --music-muted: var(--lm-muted);
  --music-line: var(--lm-border);
  --music-violet: var(--lm-link);
  --music-active: var(--lm-violet);
}

.lm-site .editorial-home .music-filters button[aria-pressed="true"] {
  border-color: var(--lm-link);
  background: var(--lm-surface-raised);
  color: var(--lm-text);
}

.lm-site .editorial-home .music-library :is(.music-playing-state, .music-release-date) {
  color: var(--lm-link);
}

@media (max-width: 44rem) {
  .lm-site:not(.radio-refonte) .discovery-hero > .discovery-hero-art {
    max-inline-size: min(100%, 20rem);
    justify-self: start;
  }

  .lm-site .discovery-header .discovery-room {
    order: 1;
    margin-inline-start: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lm-site:not(.radio-refonte) :is(.discovery-button, .link-card, .home-release-card) {
    transition: none;
  }
}

@media print {
  html.lm-site { background-image: none; }
}

/* Angular sleeves and printable labels on the catalogue and Studio pages. */
html.lm-site:not(.radio-refonte) :is(.discovery-card, .discovery-tracklist, .discovery-hero-art.lm-vinyl, main.layout .demo-shell) {
  border: 2px solid var(--lm-sticker-paper);
  border-radius: 0;
  box-shadow: var(--lm-hard-shadow);
}

html.lm-site:not(.radio-refonte) :is(.discovery-hero-art.lm-vinyl img, .discovery-card .discovery-card-image) {
  border-radius: 0;
}

html.lm-site :is(.discovery-badge, .discovery-live, .madone-daw__meta, .madone-daw__meta *, .radio-track-meta) {
  font-family: var(--lm-audio-font) !important;
}

html.lm-site :is(.discovery-badge, .discovery-live) {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--lm-sticker-paper);
  border-radius: 0;
  background: var(--lm-sticker-ink);
  color: var(--lm-sticker-paper);
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
}

html.lm-site :is(.discovery-badge[data-release-status], .discovery-live) {
  box-shadow: var(--lm-hard-shadow);
}
