/* Page /beats : la planche contact. Autonome (ne charge pas styles.css) ;
   beats.css ne sert plus qu'a thanks.html. Clair par defaut, sombre au
   choix ou selon le systeme (data-theme sur <html>, pose par beats.js). */

:root {
  --paper: #e9e4d8;
  --ink: #0d0d0d;
  --mute: #6f6b62;
  --line: #0d0d0d;
  --acc: #e8442b;
  --hover: #dcd6c6;
  --dock-bg: #0d0d0d;
  --dock-fg: #e9e4d8;
  --font-display: 'Archivo', 'Arial Narrow', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #0c0c0b;
  --ink: #ebe6da;
  --mute: #8d887d;
  --line: #ebe6da;
  --hover: #171714;
  --dock-bg: #ebe6da;
  --dock-fg: #0c0c0b;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 300ms ease, color 300ms ease;
}

a { color: inherit; }

button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

/* ----- en-tete --------------------------------------------------- */

.head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1rem;
  padding: 3vw 3vw 1.2vw;
  border-bottom: 2px solid var(--line);
}

.head__name {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 800;
  /* Une seule ligne : sur deux, le nom mangeait la moitie de l'ecran et
     laissait un grand vide a droite. */
  font-size: clamp(40px, 14.5vw, 290px);
  line-height: 0.78;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.head__side { text-align: right; line-height: 1.7; }

.head__side a { text-decoration: none; }
.head__side a:hover { color: var(--acc); }

.theme {
  margin-top: 0.8rem;
  padding: 0.35rem 0.7rem;
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
}

.theme:hover { background: var(--ink); color: var(--paper); }

.search {
  display: block;
  width: calc(100% - 6vw);
  margin: 0 3vw;
  padding: 1rem 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.search::placeholder { color: var(--mute); }
.search:focus { outline: none; border-bottom-color: var(--acc); }

/* ----- grille ---------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  border-left: 1px solid var(--line);
  margin: 0 3vw;
}

.card {
  position: relative;
  padding: 0.9rem 0.9rem 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  background: var(--paper);
  transition: background 200ms ease;
}

.card:hover { background: var(--hover); }

.card.pick .card__id span:first-child { color: var(--acc); }

.card__id {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
  color: var(--mute);
}

.frame {
  position: relative;
  aspect-ratio: 21 / 9;
  background: #111 center / cover;
  overflow: hidden;
}

.frame::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.frame__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.fs {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  opacity: 0;
  transition: opacity 200ms ease, background 200ms ease, color 200ms ease;
}

.card:hover .fs, .fs:focus-visible { opacity: 1; }
@media (hover: none) { .fs { opacity: 1; } }
.fs:hover { background: #fff; color: #000; }
.fs svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.card__title {
  margin: 0.8rem 0 0.4rem;
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
}

.card__title button {
  display: inline;
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.card__title .collab {
  font-family: var(--font-mono);
  font-stretch: 100%;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mute);
  white-space: nowrap;
}

.card__meta { display: flex; justify-content: space-between; color: var(--mute); }

.card__buy { display: flex; gap: 0.4rem; margin-top: 0.8rem; }

.card.on { background: var(--ink); color: var(--paper); }
.card.on .card__id, .card.on .card__meta, .card.on .card__title .collab {
  color: color-mix(in srgb, var(--paper) 60%, transparent);
}
.card.on .frame::before {
  content: '▶ now playing';
  position: absolute;
  left: 0.6rem;
  top: 0.6rem;
  z-index: 2;
  padding: 0.2rem 0.5rem;
  color: #fff;
  background: var(--acc);
}

/* Boutons d'achat : palier a gauche, prix a droite. */
.buy {
  display: inline-flex;
  align-items: stretch;
  padding: 0;
  background: none;
  border: 1px solid currentColor;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}

.buy span { padding: 0.45rem 0.7rem; }
.buy__tier { border-right: 1px solid currentColor; opacity: 0.7; }
.buy:hover:not([disabled]) { background: var(--acc); border-color: var(--acc); color: #fff; }
.buy[disabled] { opacity: 0.45; cursor: default; }

.empty { grid-column: 1 / -1; padding: 3rem 1rem; text-align: center; color: var(--mute); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ----- pages ----------------------------------------------------- */

.pager { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.5rem 3vw 0; }
.pager[hidden] { display: none; }
.pager__btn { padding: 0.45rem 0.8rem; background: none; border: 1px solid var(--line); cursor: pointer; }
.pager__btn:hover:not([disabled]) { background: var(--ink); color: var(--paper); }
.pager__btn.is-current { background: var(--ink); color: var(--paper); }
.pager__btn[disabled] { opacity: 0.4; cursor: default; }

/* ----- licences -------------------------------------------------- */

.licenses-wrap { margin: 4rem 3vw 0; padding-top: 1.2rem; border-top: 2px solid var(--line); }

.licenses-wrap h2 {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(40px, 8vw, 110px);
  line-height: 0.85;
}

.licenses { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 1.5rem; border-left: 1px solid var(--line); }
.license { padding: 1.2rem; border-right: 1px solid var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.license__name { font-family: var(--font-display); font-stretch: 75%; font-size: 22px; }
.license__price { margin: 0.4rem 0 0.9rem; color: var(--acc); font-size: 16px; }
.license__perks { list-style: none; padding: 0; line-height: 2; color: var(--mute); }
.license__perks li::before { content: '— '; }
.note { max-width: 70ch; margin-top: 1.4rem; line-height: 1.8; text-transform: none; color: var(--mute); font-size: 12px; }
.note:empty { display: none; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem 2rem; margin: 3rem 3vw 9rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--mute); }
.foot a:hover { color: var(--acc); }

/* ----- barre de lecture ------------------------------------------ */

.dock {
  position: fixed;
  left: 3vw;
  right: 3vw;
  bottom: 1.2rem;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.4rem;
  padding: 0.9rem 1.2rem;
  color: var(--dock-fg);
  background: var(--dock-bg);
  transform: translateY(140%);
  transition: transform 400ms ease;
}

.dock.show { transform: none; }
.dock__play { padding: 0.5rem 0.9rem; background: none; border: 1px solid currentColor; cursor: pointer; }
.dock__play:hover { background: var(--dock-fg); color: var(--dock-bg); }
.dock__title { font-family: var(--font-display); font-stretch: 75%; font-size: 18px; }
.dock__sub { margin-left: 0.8rem; opacity: 0.6; }
.dock__seek { height: 14px; margin-top: 0.3rem; display: flex; align-items: center; cursor: pointer; }
.dock__line { position: relative; flex: 1; height: 2px; background: color-mix(in srgb, var(--dock-fg) 25%, transparent); }
.dock__line i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--acc); }
.dock__buy { display: flex; gap: 0.4rem; }
.dock .buy:hover:not([disabled]) { background: var(--acc); }

/* ----- plein ecran ----------------------------------------------- */

.ov {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 4vw 6vh;
  color: #f3efe6;
  background: #05060a;
}

.ov.show { display: flex; }

.ov__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: center / cover;
  transform: scale(1.08);
  transition: transform 6s ease-out;
}

.ov.show .ov__bg { transform: scale(1); }

.ov::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0) 58%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0) 22%);
}

.ov > * { position: relative; z-index: 1; }
.ov > .ov__bg { position: absolute; z-index: 0; }
.ov > .ov__top { position: absolute; top: 3vh; left: 4vw; right: 4vw; z-index: 2; display: flex; justify-content: space-between; align-items: center; }

.ov__nav { display: flex; gap: 0.6rem; }
.ov__nav button, .ov__act button, .ov__act .buy { background: none; color: #f3efe6; border: 1px solid rgba(243, 239, 230, 0.45); cursor: pointer; transition: background 250ms ease, color 250ms ease; }
.ov__nav button { padding: 0.6rem 1rem; letter-spacing: 0.1em; }
.ov__nav button:hover, .ov__act button:hover { background: #f3efe6; color: #000; }

.ov__cover { width: clamp(96px, 14vw, 190px); aspect-ratio: 1; margin-bottom: 2.4vh; object-fit: cover; border: 1px solid rgba(255, 255, 255, 0.55); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.ov__n { margin-bottom: 1.2vh; color: rgba(243, 239, 230, 0.6); }

.ov h2 {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(52px, 13vw, 210px);
  line-height: 0.86;
  letter-spacing: -0.01em;
}

.ov h2 em { margin-left: 1rem; font: 400 11px/1 var(--font-mono); letter-spacing: 0.04em; color: rgba(243, 239, 230, 0.6); vertical-align: middle; }
.ov__row { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1.2rem 2rem; margin-top: 3vh; }
.ov__meta { display: flex; gap: 2.2rem; color: rgba(243, 239, 230, 0.6); }
.ov__act { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.ov__act .pl { width: 3.4rem; height: 3.4rem; padding: 0; border-radius: 50%; }
.ov__act .buy:hover:not([disabled]) { background: #f3efe6; color: #000; border-color: #f3efe6; }
.ov__bar { height: 1px; margin-top: 3vh; background: rgba(243, 239, 230, 0.25); }
.ov__bar i { display: block; width: 0; height: 100%; background: #f3efe6; }

@media (max-width: 640px) {
  .head { grid-template-columns: 1fr; }
  .head__side { text-align: left; }
  .dock { grid-template-columns: auto 1fr; }
  .dock__buy { grid-column: 1 / -1; }
  .ov__meta { gap: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ov__bg, .ov.show .ov__bg, .dock { transition: none; }
}

/* ----- pages simples : accueil, 404, merci ------------------------- */

.lead {
  margin: 0 3vw;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.cells {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin: 0 3vw;
  border-left: 1px solid var(--line);
}

.cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.2rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 13px;
  transition: background 200ms ease, color 200ms ease;
}

.cell:hover { background: var(--ink); color: var(--paper); }
.cell img { width: 22px; height: 22px; margin-right: 0.8rem; vertical-align: middle; }
:root:not([data-theme="dark"]) .cell img { filter: invert(1); }
:root:not([data-theme="dark"]) .cell:hover img { filter: none; }
:root[data-theme="dark"] .cell:hover img { filter: invert(1); }

.banner {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  min-height: 46vh;
  margin: 0 3vw;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-top: 0;
  color: #f3efe6;
  text-decoration: none;
  background: #111 center / cover;
  overflow: hidden;
}

.banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0) 60%);
  transition: opacity 300ms ease;
}

.banner > * { position: relative; }

.banner__title {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(56px, 13vw, 200px);
  line-height: 0.85;
}

.banner__go { padding: 0.9rem 1.4rem; border: 1px solid rgba(243, 239, 230, 0.6); letter-spacing: 0.14em; transition: background 250ms ease, color 250ms ease; }
.banner:hover .banner__go { background: #f3efe6; color: #000; }

.big {
  margin: 0 3vw;
  padding: 4vh 0;
  border-bottom: 1px solid var(--line);
}

.big__eyebrow { color: var(--acc); margin-bottom: 1rem; }

.big__title {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(44px, 10vw, 150px);
  line-height: 0.88;
}

.big__lede { max-width: 56ch; margin-top: 1.4rem; line-height: 1.8; text-transform: none; color: var(--mute); font-size: 13px; }

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.6rem 3vw 0; }

.btn {
  display: inline-block;
  padding: 0.9rem 1.4rem;
  border: 1px solid var(--line);
  background: none;
  text-decoration: none;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}

.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--acc); border-color: var(--acc); color: #fff; }

.page-note { margin: 1.4rem 3vw 0; max-width: 70ch; line-height: 1.8; text-transform: none; color: var(--mute); font-size: 12px; }
.page-note:empty { display: none; }
[hidden] { display: none !important; }

/* ----- tactile : cibles d'au moins 44 px ---------------------------- */

@media (pointer: coarse) {
  .theme, .btn, .pager__btn, .dock__play { min-height: 44px; }
  .buy span { padding-block: 0.9rem; }
  .fs { width: 44px; height: 44px; }
  .card__title button { padding-block: 0.5rem; }
  .ov__nav button { min-height: 44px; min-width: 44px; }
  .card__buy { gap: 0.6rem; }
}
