/* ─── Bibliothèque DX-5 — DA « L'Énigme » ───
   Fond bleu nuit · matière bleu électrique · or = précieux · rouge = alerte */

:root {
  --bg: #070b14;
  --surface: #0c1322;
  --surface-2: #101a2e;
  --line: rgba(140, 170, 220, 0.14);
  --ink: #e9eef7;
  --ash: #8da0bf;
  --blue: #4cc2ff;
  --gold: #e8c76a;
  --red: #ff4d4d;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.is-bib body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  padding-bottom: 92px; /* place du lecteur */
}

.mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; }
.ash  { color: var(--ash); }
.gold { color: var(--gold); }
.red  { color: var(--red); }



/* ── layout ── */
.is-bib main { max-width: 1060px; margin: 0 auto; padding: 0 22px; }

.hero { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding-top: 110px; }
.is-bib .kicker { color: var(--gold); margin-bottom: 18px; }
.hero h1 { font-size: clamp(40px, 7.5vw, 84px); line-height: 1.02; font-weight: 800; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--blue); }
.sub { max-width: 54ch; margin-top: 22px; color: var(--ash); }
.sub .mono { display: block; margin-top: 10px; }

.block { padding: 11vh 0 4vh; }
.block-head { margin-bottom: 34px; }
.block-head h2 { font-size: clamp(28px, 4.4vw, 48px); font-weight: 800; letter-spacing: -0.015em; margin: 10px 0 8px; }
.sub-head { margin-top: 64px; }
.h-live { font-size: clamp(22px, 3.2vw, 34px) !important; }
.meta { display: block; }

/* ── discographie ── */
.tracks { list-style: none; border-top: 1px solid var(--line); }
.track {
  display: grid;
  grid-template-columns: 34px 52px 1fr auto auto;
  gap: 14px; align-items: center;
  padding: 15px 6px;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s;
}
.track:hover { background: rgba(76, 194, 255, 0.045); }
.track.active { background: rgba(232, 199, 106, 0.07); }
.t-idx { font-family: var(--mono); font-size: 12px; color: var(--ash); }
.track.active .t-idx { color: var(--gold); }
.t-play {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font-size: 14px; cursor: pointer;
  transition: border-color 0.25s, color 0.25s, transform 0.15s;
}
.t-play:hover { border-color: var(--blue); color: var(--blue); transform: scale(1.06); }
.track.active .t-play { border-color: var(--gold); color: var(--gold); }
.t-name { font-weight: 650; }
.t-feat { color: var(--ash); font-size: 13.5px; margin-left: 8px; font-weight: 400; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 99px;
  border: 1px solid currentColor; font-size: 9.5px; vertical-align: 2px;
}
.badge.red-b { color: var(--red); }
.t-yt { color: var(--ash); text-decoration: none; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; padding: 6px 2px; }
.t-yt:hover { color: var(--blue); }
.t-dur { font-family: var(--mono); font-size: 11px; color: var(--ash); }

/* ── album verrouillé ── */
.vault {
  list-style: none;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.vcell {
  border: 1px solid var(--line); border-radius: 10px;
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  padding: 14px 14px 12px;
  position: relative; overflow: hidden;
}
.vcell::after {
  content: '🔒'; position: absolute; right: 10px; top: 10px;
  font-size: 11px; opacity: 0.6; filter: grayscale(1);
}
.v-key { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--gold); }
.v-code { font-family: var(--mono); font-size: 14px; letter-spacing: 0.1em; color: var(--ash); margin-top: 8px; white-space: nowrap; overflow: hidden; }

/* ── vidéothèque ── */
.vidgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 18px; }
.vid { display: flex; flex-direction: column; gap: 8px; }
.facade {
  position: relative; border: 0; padding: 0; cursor: pointer;
  border-radius: 10px; overflow: hidden; background: var(--surface);
  aspect-ratio: 16 / 9; width: 100%;
}
.facade img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s, opacity 0.3s; opacity: 0.85; }
.facade:hover img { transform: scale(1.04); opacity: 1; }
.facade::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 55%, rgba(7, 11, 20, 0.75));
}
.f-play {
  position: absolute; z-index: 2; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(10, 15, 26, 0.78);
  border: 1px solid var(--blue);
  display: grid; place-items: center;
  color: var(--blue); font-size: 16px;
  transition: transform 0.2s, background 0.2s;
}
.facade:hover .f-play { transform: translate(-50%, -50%) scale(1.1); background: rgba(76, 194, 255, 0.18); }
.f-badge {
  position: absolute; z-index: 2; left: 10px; top: 10px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em;
  padding: 3px 8px; border-radius: 99px;
}
.f-badge.gold-b { color: #1a1915; background: var(--gold); }
.f-badge.red-b { color: #fff; background: var(--red); }
.vid iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; display: block; }
.v-title { font-weight: 650; font-size: 15px; }
.v-meta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.13em; color: var(--ash); }

/* ── footer ── */
.is-bib .foot { padding: 10vh 0 6vh; border-top: 1px solid var(--line); margin-top: 8vh; display: grid; gap: 10px; }


/* ── accessibilité / divers ── */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }


@media (max-width: 640px) {
  .track { grid-template-columns: 30px 46px 1fr auto; }
  .t-dur { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .facade img, .f-play, .t-play { transition: none; }
}


/* ── bouton « en entier » des lignes de la discographie ── */
.t-full {
  background: none; border: 1px solid var(--line); color: var(--ash);
  cursor: pointer; border-radius: 99px; padding: 6px 12px;
  font-size: 10px; letter-spacing: 0.1em; white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.t-full:hover { color: var(--blue); border-color: var(--blue); }

@media (max-width: 380px) {
  /* la ligne 24+40+titre+bouton doit tenir dans 320 px */
  .track { gap: 8px; grid-template-columns: 24px 40px 1fr auto; padding: 13px 2px; }
  .t-play { width: 40px; height: 40px; }
  .t-full { padding: 5px 8px; font-size: 9px; letter-spacing: 0.06em; }
}
