/* Polices auto-hébergées (licence OFL) : aucune requête vers un service tiers */
@font-face { font-family: 'Anton'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('fonts/anton-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-style: normal; font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 600; font-style: normal; font-display: swap;
  src: url('fonts/ibm-plex-mono-latin-600-normal.woff2') format('woff2'); }

:root {
  --paper: #e8e5dd;
  --paper-2: #dedad1;
  --ink: #0c0c0c;
  --red: #ee2f1f;
  --muted: #5d5a52;
  --rule: rgba(12, 12, 12, .28);
  --pad: clamp(14px, 2.2vw, 38px);
  --cond: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 13px/1.5 var(--mono); letter-spacing: .01em;
  background-image: radial-gradient(rgba(0,0,0,.035) 1px, transparent 1px);
  background-size: 3px 3px;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
h1, h2, h3 { font-family: var(--cond); font-weight: 400; text-transform: uppercase; margin: 0; letter-spacing: .005em; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.grow { flex: 1; }
main, .masthead, .mast-compact, .menu, .foot { padding-left: var(--pad); padding-right: var(--pad); }

/* ---------- En-tête ---------- */
.masthead { display: flex; align-items: stretch; gap: clamp(14px, 2vw, 36px); padding-top: 12px; padding-bottom: 14px; }
.masthead .logo { font-family: var(--cond); font-size: clamp(54px, 11vw, 196px); line-height: .82; text-decoration: none; letter-spacing: -.005em; flex: 0 1 auto; }
.masthead .logo:hover { color: var(--ink); }
.tagline { margin: 6px 0 0; font-size: clamp(10px, 1.05vw, 15px); line-height: 1.55; letter-spacing: .04em; border-left: 1px solid var(--ink); padding-left: clamp(10px, 1.4vw, 22px); align-self: flex-start; }
.barcode { margin-left: auto; align-self: stretch; display: flex; flex-direction: column; min-width: 120px; width: clamp(120px, 20vw, 340px); }
.ean { width: 100%; flex: 1; min-height: 60px; fill: var(--ink); display: block; }
.ean-digits { font: 500 clamp(11px, 1.6vw, 28px)/1.1 var(--mono); letter-spacing: .12em; margin-top: 4px; white-space: nowrap; }

.mast-compact { padding-top: 12px; }
.mast-compact .logo { font-family: var(--cond); font-size: clamp(30px, 4vw, 46px); line-height: 1; text-decoration: none; }
.mast-compact .logo:hover { color: var(--ink); }

.menu { display: flex; gap: clamp(14px, 2.2vw, 34px); align-items: center; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin: 6px var(--pad) 0; padding: 9px 0; font-size: 11.5px; letter-spacing: .06em; padding-left: 0; padding-right: 0; }
.menu a { text-decoration: none; padding: 2px 0; }
.menu a.on { color: var(--red); box-shadow: inset 0 -2px 0 var(--red); }

/* ---------- Recherche ---------- */
.searchbar { display: flex; align-items: stretch; border: 3px solid var(--ink); margin: 16px 0 0; background: var(--paper); }
.searchbar input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 6px 18px; font-family: var(--cond); font-size: clamp(26px, 3.4vw, 46px); line-height: 1.5; color: var(--ink); outline: none; text-transform: none; }
.searchbar input::placeholder { color: var(--ink); opacity: .88; }
.searchbar.big input { font-size: clamp(30px, 5vw, 66px); padding-top: 12px; padding-bottom: 12px; }
.searchbar:focus-within { box-shadow: 0 0 0 3px var(--red); }
.scan-btn { border: 0; border-left: 1px solid var(--ink); background: transparent; font: 500 11.5px var(--mono); letter-spacing: .1em; padding: 0 clamp(10px, 1.6vw, 24px); cursor: pointer; color: var(--ink); }
.scan-btn:hover { background: var(--ink); color: var(--paper); }
.go { border: 0; background: var(--red); color: var(--ink); width: clamp(60px, 7vw, 104px); cursor: pointer; display: grid; place-items: center; }
.go:hover { background: var(--ink); color: var(--red); }
#scan { position: fixed; inset: 0; z-index: 50; background: rgba(12,12,12,.94); color: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px; }
#scan[hidden] { display: none; }
#scan video { width: min(92vw, 560px); aspect-ratio: 4/3; object-fit: cover; border: 3px solid var(--red); background: #000; }
#scan button { background: var(--red); border: 0; font: 600 13px var(--mono); letter-spacing: .1em; padding: 12px 26px; cursor: pointer; }

/* ---------- Colonnes de l'accueil ---------- */
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 22px; }
.col { padding: 0 clamp(12px, 1.6vw, 26px); border-left: 1px solid var(--ink); }
.col:first-child { padding-left: 0; border-left: 0; }
.col:last-child { padding-right: 0; }
.col-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.col-head h2 { font-size: clamp(30px, 3.6vw, 54px); line-height: .95; }
.linkbtn { background: none; border: 0; padding: 0; font: 500 11px var(--mono); letter-spacing: .06em; cursor: pointer; color: var(--ink); white-space: nowrap; margin-bottom: 6px; }
.linkbtn:hover { color: var(--red); }

/* ---------- Listes en lignes ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; gap: 14px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.rows > li.empty { color: var(--muted); border-bottom: 0; }
.rows .n { flex: 0 0 auto; min-width: 2.2em; font-size: 12px; color: var(--muted); padding-top: 2px; }
.rows .r { min-width: 0; }
.rows .t { font-weight: 600; font-size: 15px; text-decoration: none; line-height: 1.25; }
.rows .t:hover { color: var(--red); }
.rows .s { color: var(--muted); }
.rows .m { font-size: 11.5px; letter-spacing: .04em; color: var(--muted); }
.rows.plain > li { padding: 6px 0; }
.rows.suggest .t { font-size: 15px; }
.cover { display: block; flex: 0 0 auto; width: 70px; aspect-ratio: 1; background: var(--red); position: relative; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1) contrast(1.08); transition: filter .25s; }
.rows > li:hover .cover img, .cover.big:hover img { filter: none; }
.cover.big { width: 100%; }

/* ---------- Résultats ---------- */
.results, .about, .msg { padding: 22px 0 10px; }
.res-title { font-size: clamp(30px, 4.6vw, 64px); line-height: .95; margin-bottom: 16px; }
.sub { font-size: clamp(22px, 2.4vw, 32px); border-bottom: 2px solid var(--ink); padding-bottom: 4px; margin: 20px 0 8px; }
.res-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(16px, 3vw, 48px); }
.msg h1 { font-size: clamp(34px, 5vw, 70px); }
.about p, .about li { max-width: 78ch; }
.plainlist { padding-left: 18px; }

/* ---------- Fiche album ---------- */
.album { margin-top: 16px; }
.album-top { display: grid; grid-template-columns: minmax(160px, 22%) minmax(0, 1fr) minmax(220px, 24%); border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); }
.album-cover { margin: 0; padding: 16px 16px 12px 0; border-right: 1px solid var(--ink); }
.album-cover figcaption { font-size: 10.5px; letter-spacing: .08em; margin-top: 6px; color: var(--muted); }
.album-main { padding: 12px clamp(12px, 2vw, 30px); min-width: 0; }
.album-title { font-size: clamp(34px, 6vw, 96px); line-height: .9; word-break: break-word; }
.album-title.long { font-size: clamp(30px, 4.4vw, 70px); }
.album-title.xlong { font-size: clamp(26px, 3.3vw, 52px); line-height: .95; }
.album-artist { font-family: var(--cond); text-transform: uppercase; font-size: clamp(26px, 4vw, 60px); line-height: 1; margin: 6px 0 14px; }
.album-artist a { text-decoration: none; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; font-size: 12px; letter-spacing: .04em; }
.meta span { padding: 0 14px; border-left: 1px solid var(--ink); }
.meta span:first-child { padding-left: 0; border-left: 0; }
.meta b { font-weight: 500; }
.album-side { border-left: 1px solid var(--ink); padding: 0 0 12px clamp(12px, 1.6vw, 24px); }
.alert { background: var(--red); margin: 0 0 12px calc(-1 * clamp(12px, 1.6vw, 24px)); padding: 14px 0 14px clamp(12px, 1.6vw, 24px); }
.alert > * { padding-right: 14px; }
.alert summary { font-family: var(--cond); font-size: clamp(22px, 2.3vw, 34px); line-height: 1.02; text-transform: uppercase; cursor: pointer; list-style: none; }
.alert summary::-webkit-details-marker { display: none; }
.alert ul { margin: 10px 0 6px; padding: 0; list-style: none; }
.alert li { font-size: 12.5px; }
.alert p { font-size: 11.5px; margin: 6px 0 0; }
.side-h { font-size: 28px; margin: 12px 0 6px; line-height: 1; }
.sources { display: flex; gap: 14px; align-items: flex-start; }
.sources ul { list-style: none; padding: 0; margin: 0; font-size: 12px; letter-spacing: .05em; }
.sources li { white-space: nowrap; }
.sources i { font-style: normal; font-weight: 700; margin-left: 4px; }
.sources i.no { color: var(--muted); font-weight: 400; }
.sources a { text-decoration: none; }
.verdict { margin: 0; padding-left: 14px; border-left: 1px solid var(--ink); font-size: 11.5px; letter-spacing: .05em; align-self: stretch; }

.editions { padding: 12px 0 4px; }
.ed-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.ed-head h2 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters select { font: 500 11px var(--mono); letter-spacing: .06em; background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid var(--ink); padding: 4px 18px 4px 2px; border-radius: 0; cursor: pointer; max-width: 200px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 6px; }
.tbl th { text-align: left; font-weight: 500; font-size: 11.5px; letter-spacing: .05em; padding: 6px 12px 6px 0; border-bottom: 2px solid var(--ink); }
.tbl td { padding: 6px 12px 6px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tbl tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--red); padding-left: 8px; }
.tbl tr.extra { display: none; }
.tbl.all tr.extra { display: table-row; }
.tbl tr.hide, .tbl.all tr.extra.hide { display: none; }
.go-td { text-align: right; white-space: nowrap; font-size: 11px; letter-spacing: .06em; padding-right: 0 !important; }
.go-td a { text-decoration: none; }
.more { margin-top: 8px; }

.four { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 1.1fr); border-top: 1px solid var(--ink); margin-top: 14px; }
.blk { padding: 12px clamp(10px, 1.4vw, 22px) 18px; border-left: 1px solid var(--ink); min-width: 0; }
.blk:first-child { padding-left: 0; border-left: 0; }
.blk h2 { font-size: clamp(26px, 2.6vw, 38px); margin-bottom: 8px; line-height: 1; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 16px; margin: 0; font-size: 12px; }
.kv dt { letter-spacing: .05em; color: var(--ink); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv.wide { grid-template-columns: 200px minmax(0, 1fr); gap: 8px 20px; }
.mbid { font-size: 10px; }
.trk { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.trk li { display: flex; gap: 12px; padding: 2px 0; }
.trk .n { flex: 0 0 2.2em; color: var(--muted); }
.trk .tt { flex: 1; min-width: 0; }
.trk .len { color: var(--muted); }
.disc { font-size: 20px; margin: 10px 0 4px; }
.notes p { margin: 0 0 8px; font-size: 12px; }

/* ---------- Fiche artiste ---------- */
.artist { margin-top: 16px; border-top: 3px solid var(--ink); padding-top: 10px; }
.artist-head { padding: 14px 0 16px; border-bottom: 1px solid var(--ink); }
.artist-head .meta { margin-top: 12px; }
.artist-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 24%); }
.artist-main { padding: 12px clamp(0px, 2vw, 30px) 12px 0; min-width: 0; }
.artist-side { border-left: 1px solid var(--ink); padding: 0 0 12px clamp(12px, 1.6vw, 24px); }
.bio h2, .disco h2 { font-size: clamp(28px, 3vw, 42px); margin: 6px 0 6px; }
.count { color: var(--muted); font-family: var(--mono); font-size: .45em; letter-spacing: .05em; }
.cat { border-top: 1px solid var(--rule); padding: 8px 0; }
.cat summary { font-family: var(--cond); text-transform: uppercase; font-size: 24px; cursor: pointer; }
.links { list-style: none; margin: 0; padding: 0; font-size: 12px; letter-spacing: .05em; }
.links li { padding: 2px 0; }
.links a { text-decoration: none; }

/* ---------- Collection, biographie, liens ---------- */
.coll-btn { font: 500 11px var(--mono); letter-spacing: .08em; background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 7px 12px; cursor: pointer; margin-top: 12px; }
.coll-btn:hover { background: var(--ink); color: var(--paper); }
.coll-btn.on { background: var(--ink); color: var(--paper); }
.rows .rm { margin-left: auto; background: none; border: 0; cursor: pointer; font: 500 13px var(--mono); color: var(--muted); padding: 2px 4px; }
.rows .rm:hover { color: var(--red); }
.linkbtn[hidden] { display: none; }
.bio p { margin: 0 0 10px; max-width: 78ch; font-size: 13px; line-height: 1.6; }
.bio-h { font-size: 22px; margin: 16px 0 6px; line-height: 1; }
.more-bio { margin: 4px 0 10px; }
.more-bio summary { font: 500 11px var(--mono); letter-spacing: .08em; cursor: pointer; margin-bottom: 10px; }
.link-cat { font: 500 10.5px var(--mono); letter-spacing: .1em; color: var(--muted); margin: 12px 0 2px; text-transform: none; }

/* ---------- Pied de page ---------- */
.foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 26px var(--pad) 0; padding: 12px 0 28px; border-top: 1px solid var(--ink); font-size: 10.5px; letter-spacing: .05em; padding-left: 0; padding-right: 0; }
.srcwarn { margin: 0 var(--pad) 18px; padding: 8px 12px; border: 1px solid var(--ink); font-size: 11.5px; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .masthead { flex-wrap: wrap; }
  .masthead .logo { flex-basis: 100%; font-size: 17.4vw; }
  .barcode { margin-left: 0; width: 46vw; }
  .cols3 { grid-template-columns: 1fr; }
  .col, .col:first-child, .col:last-child { border-left: 0; padding: 0; margin-bottom: 26px; }
  .res-grid { grid-template-columns: 1fr; }
  .album-top { grid-template-columns: 1fr; }
  .album-cover { border-right: 0; padding: 14px 0 8px; max-width: 320px; }
  .album-main { padding: 8px 0; }
  .album-side { border-left: 0; padding: 8px 0 12px; }
  .alert { margin: 0 0 12px; }
  .four { grid-template-columns: 1fr; }
  .blk, .blk:first-child { border-left: 0; border-top: 1px solid var(--ink); padding: 12px 0 16px; }
  .blk:first-child { border-top: 0; }
  .artist-grid { grid-template-columns: 1fr; }
  .artist-side { border-left: 0; padding: 8px 0 12px; }
  .scan-btn { display: block; }

  /* tableau des éditions en cartes */
  .tbl thead { display: none; }
  .tbl, .tbl tbody { display: block; }
  .tbl tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
  .tbl td { border: 0; padding: 0; }
  .tbl td::before { content: attr(data-l) " "; font-size: 10px; letter-spacing: .06em; color: var(--muted); display: block; }
  .tbl td[data-l="#"] { display: none; }
  .tbl td.go-td { grid-column: 1 / -1; text-align: left; padding-top: 2px; }
  .tbl td.go-td::before { content: none; }
  .tbl tr.extra { display: none; }
  .tbl.all tr.extra { display: grid; }
  .tbl tr.hide, .tbl.all tr.extra.hide { display: none; }
  .tbl tr.sel td:first-child { padding-left: 8px; }
}
@media (max-width: 520px) {
  body { font-size: 12.5px; }
  .scan-btn { padding: 0 10px; font-size: 10.5px; }
  .searchbar input, .searchbar.big input { font-size: 18px; padding-left: 12px; padding-right: 8px; }
  .go { width: 54px; }
  .kv.wide { grid-template-columns: 1fr; }
}

/* v0.2 — liens dans les titres et crédits, fiche chanson */
.trk .tt a, .credits a { text-decoration: none; border-bottom: 1px dotted var(--muted); }
.trk .tt a:hover, .credits a:hover { color: var(--red); border-bottom-color: var(--red); }
.kicker { font: 500 11px var(--mono); letter-spacing: .14em; color: var(--red); margin: 0 0 6px; }
.song .album-artist { font-size: clamp(20px, 3vw, 40px); margin: 8px 0 10px; }
#discogs, #concerts { min-height: 24px; }
.wide-blk { border-top: 1px solid var(--ink); padding: 14px 0; }
.wide-blk .kv { max-width: 760px; }
.trk .encore { padding-top: 6px; font-size: 11px; letter-spacing: .1em; }
#songs-res, #played { min-height: 24px; }
.bio .kv.credits { margin-bottom: 10px; }
