/* Exkave Bibliothèque V2.1
   Portée volontairement limitée à exkave-base.html via body.library-page.
   La recherche artiste/album reste l'entrée principale, puis artiste, albums et pressages. */

body.library-page .shell {
  width: min(calc(100% - 44px), 1500px);
}

body.library-page .hero {
  min-height: 132px;
  margin-top: 8px;
  padding: 22px 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.library-page .base-title {
  font-size: clamp(54px, 7vw, 102px);
  line-height: .86;
  letter-spacing: -.065em;
}

body.library-page .search-panel {
  display: grid;
  grid-template-columns: minmax(280px, .58fr) minmax(520px, 1.42fr);
  gap: 28px;
  align-items: end;
  margin: 0 0 26px;
  padding: 18px 20px;
  border: 1px solid rgba(216, 183, 101, .32);
  border-radius: 16px;
  background:
    linear-gradient(105deg, rgba(255,255,255,.09), transparent 22%),
    linear-gradient(180deg, rgba(20,19,16,.97), rgba(5,5,4,.98));
  box-shadow: 0 22px 56px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.08);
}

body.library-page .search-panel::before,
body.library-page .search-panel::after,
body.library-page .search-guide,
body.library-page .examples {
  display: none;
}

body.library-page .search-title {
  font-size: clamp(20px, 1.843vw, 36px);
  line-height: 1;
}

body.library-page .search-form {
  margin: 0;
  border-width: 1px;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] {
  gap: 0;
}

body.library-page .artist-stage {
  position: relative;
  min-height: 340px;
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr) auto;
  align-items: end;
  gap: 34px;
  margin: 0 0 18px;
  padding: 38px;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: #080807;
  box-shadow: 0 34px 86px rgba(0,0,0,.54), inset 0 1px rgba(255,255,255,.1);
}

body.library-page .artist-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  width: auto;
  aspect-ratio: auto;
  border-radius: 0;
  opacity: 1;
  background:
    linear-gradient(90deg, rgba(3,3,3,.94) 0%, rgba(3,3,3,.7) 58%, rgba(3,3,3,.58)),
    var(--artist-stage-image, url("/blueprints/assets/exkave-analog80-news-shop.png")) center 38% / cover;
  filter: saturate(.64) contrast(1.1);
  transform: none;
}

body.library-page .artist-stage::before {
  z-index: 1;
  opacity: .28;
}

body.library-page .artist-stage-visual {
  z-index: 2;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.12), transparent 34%),
    var(--artist-cover-image, none) center / cover,
    #11100d;
  box-shadow: 0 28px 64px rgba(0,0,0,.62);
}

body.library-page .artist-stage-visual::after {
  display: none;
}

body.library-page .artist-stage:not([data-has-cover]) {
  grid-template-columns: minmax(0, 1fr) auto;
}

body.library-page .artist-stage:not([data-has-cover]) .artist-stage-visual {
  display: none;
}

body.library-page .workspace.is-neutral > :not(.artist-stage) {
  display: none !important;
}

body.library-page .workspace.is-neutral .artist-stage {
  min-height: clamp(300px, 36vw, 430px);
}

body.library-page .workspace.is-neutral .artist-stage::after {
  background:
    linear-gradient(90deg, rgba(3,3,3,.94) 0%, rgba(3,3,3,.68) 54%, rgba(3,3,3,.45)),
    url("/blueprints/assets/exkave-analog80-news-shop.png") center 44% / cover;
}

body.library-page .artist-stage[data-has-artist] .artist-stage-monogram {
  opacity: 0;
}

body.library-page .artist-stage-copy,
body.library-page .artist-stage-route {
  z-index: 2;
}

body.library-page .artist-stage-copy h2 {
  margin: 8px 0 5px;
  font-size: clamp(60px, 7.5vw, 118px);
  line-height: .8;
}

body.library-page .artist-stage-meta {
  margin-top: 20px;
  color: #f1e9db;
  font-size: 16px;
}

body.library-page .artist-stage-route {
  align-self: end;
  border: 0;
  border-left: 2px solid #d8b765;
  border-radius: 0;
  background: rgba(4,4,3,.54);
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-panel {
  padding: 44px 0 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-panel .panel-head,
body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-controls {
  padding-inline: 0;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail-shell {
  grid-template-columns: 34px minmax(0,1fr) 34px;
  padding-inline: 0;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail-shell > .rail-nav {
  min-height: 286px;
  border: 0;
  background: transparent;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail {
  grid-auto-columns: clamp(210px, 18vw, 275px);
  min-height: 0;
  grid-auto-rows: max-content;
  align-items: start;
  gap: clamp(18px, 2vw, 28px);
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail .result {
  min-height: 0;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 7px;
  padding: 0 0 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail .result:hover,
body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail .result:focus-visible,
body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail .result.active {
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: translateY(-5px);
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail .cover-placeholder {
  border-radius: 6px;
  box-shadow: 0 26px 58px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.12);
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail .result h3 {
  margin-top: 2px;
  font-size: 21px;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail .result-side {
  display: none;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .detail {
  min-height: 0;
  margin-top: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .detail.step-card .master {
  padding: 0;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .master-top {
  min-height: 236px;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid rgba(216,183,101,.24);
  border-radius: 18px;
  background:
    linear-gradient(110deg, rgba(255,255,255,.085), transparent 24%),
    linear-gradient(130deg, rgba(22,21,18,.98), rgba(5,5,4,.96));
  box-shadow: 0 28px 70px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.09);
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .master-cover {
  width: 180px;
  height: 180px;
}

body.library-page .master-cover.is-generic-album-illustration .master-cover-image {
  filter: saturate(.62) sepia(.12) contrast(1.08) brightness(.74);
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .master h2 {
  font-size: clamp(36px, 4vw, 58px);
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-filter-bar {
  margin: 24px 0 18px;
  padding: 12px;
  border: 1px solid rgba(216,183,101,.22);
  border-radius: 15px;
  background: rgba(8,8,7,.9);
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-grid,
body.library-page .workspace[data-desktop-layout="catalog-flow"] .review-pressing-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 12px;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(216,183,101,.2);
  border-radius: 14px;
  background:
    linear-gradient(115deg, rgba(255,255,255,.065), transparent 35%),
    linear-gradient(90deg, rgba(20,19,16,.96), rgba(7,7,6,.94));
  box-shadow: 0 16px 36px rgba(0,0,0,.26), inset 0 1px rgba(255,255,255,.06);
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing:hover,
body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing:focus-visible {
  border-color: rgba(232,198,105,.5);
  transform: translateY(-1px);
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing.selected,
body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing.is-comparison-pinned {
  border-color: rgba(241,208,119,.68);
  box-shadow: 0 18px 46px rgba(0,0,0,.34), inset 3px 0 #d8b765;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 1.18;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-cover::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 8%;
  right: 0;
  width: 84%;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: transparent url("/assets/exkave-vinyl-generic.png") center / contain no-repeat;
  box-shadow: 0 16px 34px rgba(0,0,0,.44);
  opacity: .96;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-cover img {
  z-index: 2;
  inset: 0 auto auto 0;
  width: 84%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid rgba(216,183,101,.3);
  border-radius: 9px;
  box-shadow: 0 14px 32px rgba(0,0,0,.52);
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-cover.is-parent-cover::after {
  inset: 0 auto auto 0;
  z-index: 2;
  width: 84%;
  aspect-ratio: 1;
  border-radius: 9px;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-cover-temp-badge {
  inset: auto 17% 4px 4px;
  z-index: 3;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-cover-placeholder span {
  inset: 0 auto auto 0;
  z-index: 2;
  width: 84%;
  aspect-ratio: 1;
  border: 1px dashed rgba(216,183,101,.28);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(8,8,7,.96));
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-title {
  font-size: 16px;
  line-height: 1.2;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-card-data {
  min-width: 0;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 10px;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-fact {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 3px;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-fact small,
body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-runout-grid small {
  color: #bda978;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-fact strong {
  min-width: 0;
  color: #f4f0e7;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-fact .pressing-title {
  font-size: 14px;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-label-fact {
  grid-column: 1 / -1;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-meta {
  margin-top: 5px;
  font-size: 14px;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-identifiers {
  display: grid;
  gap: 5px;
  margin-top: 9px;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .identifier-pill {
  width: 100%;
  justify-content: space-between;
  border-radius: 8px;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .identifier-pill strong {
  max-width: 66%;
  text-align: right;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-evidence {
  display: grid;
  min-height: 0;
  margin-top: 11px;
  overflow: visible;
  color: #d4ccbe;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-line-clamp: unset;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-runout-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(216,183,101,.22);
  border-radius: 9px;
  background: rgba(4,4,3,.42);
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-runout-grid span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-runout-grid strong {
  color: #f2eee5;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: normal;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .proofs {
  align-self: end;
  justify-self: stretch;
  align-items: flex-start;
  max-width: none;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-card-flags:empty {
  display: none;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-quick-compare {
  position: static;
  grid-column: 3;
  justify-self: end;
  min-width: 116px;
  min-height: 44px;
  margin-top: 8px;
}

body.library-page .workspace[data-desktop-layout="catalog-flow"] .review-note,
body.library-page .workspace[data-desktop-layout="catalog-flow"] .review-duplicate-summary {
  border-radius: 12px;
}

/* La maquette validée ne comporte pas de tuile latérale « Notes ».
   Les informations de revue restent contextuelles dans la ligne concernée. */
body.library-page .pressing-note,
body.library-page .pressing-notes,
body.library-page [data-pressing-notes] {
  display: none !important;
}

@media (max-width: 1023px) {
  body.library-page .shell {
    width: min(calc(100% - 24px), 760px);
  }

  body.library-page .hero {
    min-height: 104px;
    padding: 18px 4px;
  }

  body.library-page .base-title {
    font-size: clamp(46px, 14vw, 72px);
  }

  body.library-page .search-panel {
    display: block;
    margin-bottom: 18px;
    padding: 16px;
  }

  body.library-page .search-head {
    margin-bottom: 13px;
  }

  body.library-page .search-kicker {
    font-size: 11px;
  }

  body.library-page .search-title {
    font-size: 25px;
  }

  body.library-page .artist-stage {
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    border-radius: 18px;
  }

  body.library-page .artist-stage::after {
    background:
      linear-gradient(0deg, rgba(3,3,3,.92), rgba(3,3,3,.2) 68%),
      var(--artist-stage-image, url("/blueprints/assets/exkave-analog80-news-shop.png")) center / cover;
  }

  body.library-page .artist-stage-visual,
  body.library-page .artist-stage-route {
    display: none;
  }

  body.library-page .artist-stage-copy h2 {
    font-size: clamp(58px, 20vw, 88px);
  }

  body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-panel {
    padding-top: 30px;
  }

  body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail-shell {
    grid-template-columns: minmax(0,1fr);
  }

  body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail-shell > .rail-nav {
    display: none;
  }

  body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail {
    grid-auto-columns: 68vw;
    min-height: 0;
    gap: 18px;
  }

  body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail .result {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
    padding: 0 0 14px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail .cover-placeholder {
    grid-row: auto;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 7px;
  }

  body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail .result-side {
    display: none;
  }

  body.library-page .workspace[data-desktop-layout="catalog-flow"] .master-top {
    min-height: 0;
    grid-template-columns: 92px minmax(0,1fr);
    padding: 18px;
  }

  body.library-page .workspace[data-desktop-layout="catalog-flow"] .master-cover {
    width: 92px;
    height: 92px;
  }

  body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-grid,
  body.library-page .workspace[data-desktop-layout="catalog-flow"] .review-pressing-grid {
    grid-template-columns: 1fr;
  }

  body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing {
    min-height: 166px;
    grid-template-columns: 96px minmax(0,1fr);
    padding: 14px;
  }

  body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-cover {
    width: 96px;
    height: 96px;
  }

  body.library-page .workspace[data-desktop-layout="catalog-flow"] .proofs,
  body.library-page .workspace[data-desktop-layout="catalog-flow"] .pressing-quick-compare {
    grid-column: 1 / -1;
    justify-self: stretch;
    max-width: none;
  }
}

@media (max-width: 480px) {
  body.library-page .shell {
    width: min(calc(100% - 18px), 430px);
  }

  body.library-page .search-panel {
    padding: 14px;
  }

  body.library-page .search-title {
    font-size: 22px;
  }

  body.library-page .artist-stage {
    min-height: 286px;
    padding: 20px;
  }

  body.library-page .workspace[data-desktop-layout="catalog-flow"] .album-rail {
    grid-auto-columns: 76vw;
  }
}
