/* ============================================================
   Renaud — Discographie
   Direction : clair & aéré, éditorial premium
   ============================================================ */

:root {
  --ivory:        #f6f3ec;   /* fond principal */
  --ivory-soft:   #efeae0;   /* surfaces légèrement creusées */
  --paper:        #fbfaf6;   /* cartes claires */
  --ink:          #1b1a17;   /* texte principal */
  --ink-soft:     #6b665c;   /* texte secondaire */
  --ink-faint:    #a9a394;   /* texte tertiaire / méta */
  --line:         #e2ddd1;   /* filets */
  --accent:       #c0392b;   /* rouge Renaud, parcimonieux */
  --accent-soft:  #d8a39c;

  --shadow-soft:  0 1px 2px rgba(27,26,23,.04), 0 8px 24px rgba(27,26,23,.06);
  --shadow-lift:  0 4px 12px rgba(27,26,23,.08), 0 24px 60px rgba(27,26,23,.14);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, sans-serif;

  --ease:  cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);

  --pad: clamp(1.25rem, 4vw, 4rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

/* Grain / vignette très subtils pour la chaleur du papier */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background:
    radial-gradient(120% 120% at 50% 0%, transparent 60%, rgba(27,26,23,.05) 100%);
  mix-blend-mode: multiply;
}

/* ============================================================
   Frise chronologique (extrême gauche)
   ============================================================ */
.timeline {
  position: fixed;
  left: clamp(.5rem, 2vw, 1.75rem);
  top: 0;
  height: 100vh;
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  pointer-events: none;
}
.timeline__track {
  position: relative;
  height: min(62vh, 560px);
  width: 1px;
  background: var(--line);
}
.timeline__progress {
  position: absolute;
  top: 0; left: 0;
  width: 1px;
  height: 0;
  background: var(--accent);
  transition: height .15s linear;
}
.timeline__year {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: .62rem;
  letter-spacing: .14em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.timeline__year--start { top: -1.6rem; }
.timeline__year--end   { bottom: -1.6rem; }
.timeline__cursor {
  position: absolute;
  left: 50%;
  top: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  transition: top .15s linear;
  box-shadow: 0 0 0 4px rgba(192,57,43,.12);
}
.timeline__cursor-label {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.timeline.is-active .timeline__cursor-label { opacity: 1; }

/* ============================================================
   En-tête
   ============================================================ */
.masthead {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: var(--pad);
  padding-left: clamp(3.5rem, 8vw, 8rem);
}
.masthead__inner { max-width: 46rem; }
.masthead__eyebrow {
  font-size: .72rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.6rem;
}
.masthead__title {
  font-family: var(--serif);
  font-weight: 400;
  font-optical-sizing: auto;
  font-size: clamp(5rem, 22vw, 18rem);
  line-height: .88;
  letter-spacing: -.02em;
  margin-bottom: 1.8rem;
}
.masthead__sub {
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 34rem;
}
.masthead__scroll {
  margin-top: 4rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: var(--ink-faint);
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.masthead__scroll svg { animation: bob 2.4s var(--ease) infinite; }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(6px)} }

/* ============================================================
   Scène : 2 colonnes
   ============================================================ */
.stage {
  display: grid;
  grid-template-columns: minmax(360px, 42%) 1fr;
  gap: clamp(2rem, 5vw, 6rem);
  padding: 0 var(--pad) 0 clamp(3.5rem, 8vw, 8rem);
  align-items: stretch;   /* la colonne détail s'étire sur toute la hauteur -> sticky a sa course */
}

/* ---- Colonne gauche : albums ---- */
.albums { padding: 40vh 0; }
.albums__list { list-style: none; }

.album {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: clamp(2rem, 5vh, 4rem) 0;
  cursor: pointer;
  opacity: .42;
  filter: grayscale(.85);
  transform: scale(.96);
  transition: opacity .6s var(--ease), filter .6s var(--ease), transform .6s var(--ease);
}
.album.is-active {
  opacity: 1;
  filter: grayscale(0);
  transform: scale(1);
}
.album:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; border-radius: 4px; }

.album__thumb {
  position: relative;
  width: clamp(72px, 9vw, 116px);
  aspect-ratio: 1;
  flex: none;
  border-radius: 6px;
  overflow: hidden;
  background: var(--ivory-soft);
  box-shadow: var(--shadow-soft);
  transition: box-shadow .6s var(--ease), transform .6s var(--ease);
}
.album.is-active .album__thumb {
  box-shadow: var(--shadow-lift);
  transform: scale(1.04);
}
.album__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
/* placeholder typographique pour albums sans pochette */
.album__thumb--empty {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, var(--ivory-soft), var(--paper));
  border: 1px solid var(--line);
}
.album__thumb--empty span {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  color: var(--ink-faint);
  font-style: italic;
}

.album__text { min-width: 0; }
.album__year {
  font-size: .74rem;
  letter-spacing: .16em;
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.album.is-active .album__year { opacity: 1; transform: none; }
.album__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  margin-top: .25rem;
}
.album__count {
  font-size: .82rem;
  color: var(--ink-faint);
  margin-top: .4rem;
}

/* ---- Colonne droite : détail sticky ---- */
.detail { position: relative; }
.detail__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(3vh, 6vh, 7vh) 0 4vh;
  overflow: hidden;            /* le bloc reste dans le viewport */
}
/* En-tête détail : pochette + méta côte à côte.
   La pochette s'aligne sur la hauteur du bloc texte (stretch). */
.detail__header {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  flex: none;
  margin-bottom: .4rem;
}
.detail__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.detail__cover-wrap {
  position: relative;
  flex: none;
}
.detail__index {
  position: absolute;
  top: -.35em;
  left: clamp(-1rem, -2vw, -2.5rem);
  font-family: var(--serif);
  font-size: clamp(7rem, 16vw, 13rem);
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
  opacity: .05;
  font-variant-numeric: tabular-nums;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.detail__cover {
  position: relative;
  z-index: 1;
  width: clamp(120px, 12vw, 168px);   /* calée sur la hauteur du bloc texte */
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ivory-soft);
  box-shadow: var(--shadow-lift);
}
.detail__cover-wrap { display: flex; }
.detail__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail__cover--empty {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--ivory-soft), var(--paper));
}
.detail__cover--empty span {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--ink-faint);
  text-align: center;
  padding: 1rem;
}

.detail__year {
  font-size: .76rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.detail__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -.015em;
  margin: .35rem 0 .8rem;
}
.detail__facts {
  font-size: .9rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1rem;
}
.detail__facts span { display: inline-flex; align-items: center; gap: .45rem; }
.detail__facts span + span::before {
  content: "";
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--ink-faint);
  margin-right: 1rem;
  margin-left: -.45rem;
}

.detail__tracks-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 1.6rem 0 .2rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--line);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  flex: none;
}
.detail__hint {
  transition: opacity .4s var(--ease), color .4s var(--ease);
}

/* ---- Tracklist (zone scrollable si trop longue) ---- */
.tracks {
  list-style: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: .2rem 0 1.5rem;
  /* fondu haut/bas pour suggérer le défilement */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.tracks::-webkit-scrollbar { width: 6px; }
.tracks::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.tracks::-webkit-scrollbar-track { background: transparent; }
.track {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: .72rem .6rem .72rem .4rem;
  border-radius: 8px;
  position: relative;
  transition: background .35s var(--ease), color .35s var(--ease);
  cursor: default;
}
.track::after {
  content: "";
  position: absolute;
  left: .4rem; right: .6rem; bottom: 0;
  height: 1px;
  background: var(--line);
  transition: opacity .3s var(--ease);
}
.track:last-child::after { opacity: 0; }
.track:hover {
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}
.track:hover::after { opacity: 0; }
.track__num {
  font-size: .8rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  text-align: right;
  transition: color .35s var(--ease);
}
.track:hover .track__num { color: var(--accent); }
.track__title {
  font-size: 1rem;
  font-weight: 400;
  min-width: 0;
}
.track__title-main { display: block; }
.track__feat {
  display: block;
  font-size: .78rem;
  color: var(--ink-faint);
  margin-top: .1rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .4s var(--ease), opacity .4s var(--ease), margin .4s var(--ease);
}
.track:hover .track__feat { max-height: 2rem; opacity: 1; }
.track__badge {
  display: inline-block;
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  padding: .1rem .45rem;
  margin-left: .5rem;
  vertical-align: middle;
}
.track__dur {
  font-size: .85rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  transition: color .35s var(--ease);
}
.track:hover .track__dur { color: var(--ink-soft); }

/* ============================================================
   Colophon
   ============================================================ */
.colophon {
  padding: 10vh var(--pad) 6vh clamp(3.5rem, 8vw, 8rem);
  border-top: 1px solid var(--line);
  margin-top: 8vh;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .8rem;
  color: var(--ink-faint);
}

/* ============================================================
   Apparition au scroll (révélation des albums)
   ============================================================ */
.album { will-change: transform, opacity; }

/* ============================================================
   Accordéon mobile (caché sur desktop)
   ============================================================ */
.album__panel {
  display: none;             /* activé seulement en mobile */
  grid-column: 1 / -1;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .5s var(--ease), opacity .4s var(--ease);
}
.album__panel-inner {
  padding: .4rem 0 1.4rem;
}

/* ============================================================
   Responsive — mobile : une seule liste, tracklist en accordéon
   ============================================================ */
@media (max-width: 880px) {
  .timeline { display: none; }
  .masthead {
    padding-left: var(--pad);
    min-height: 78vh;
  }
  .masthead__title { font-size: clamp(4.5rem, 30vw, 9rem); }

  /* on abandonne la grille 2 colonnes : la colonne détail disparaît */
  .stage {
    display: block;
    padding: 0 var(--pad);
  }
  .detail { display: none; }

  .albums { padding: 2vh 0 18vh; }

  /* chaque album devient une ligne tappable ; pas de désaturation/scale */
  .album {
    display: grid;
    grid-template-columns: clamp(64px, 18vw, 88px) 1fr auto;
    align-items: center;
    column-gap: 1.1rem;
    padding: 1.1rem 0;
    opacity: 1;
    filter: none;
    transform: none;
    border-bottom: 1px solid var(--line);
  }
  .album.is-active { transform: none; }   /* neutralise l'effet desktop */
  .album__thumb { width: 100%; }
  .album.is-active .album__thumb { transform: none; box-shadow: var(--shadow-soft); }
  .album__text { grid-column: 2; }
  .album__year { opacity: 1; transform: none; }   /* toujours visible en mobile */
  .album__name { font-size: clamp(1.15rem, 5vw, 1.5rem); }

  /* chevron d'ouverture */
  .album__chevron {
    grid-column: 3;
    width: 20px; height: 20px;
    color: var(--ink-faint);
    transition: transform .4s var(--ease), color .4s var(--ease);
    flex: none;
  }
  .album.is-open .album__chevron { transform: rotate(180deg); color: var(--accent); }

  .album__panel { display: block; }
  .album.is-open .album__panel { max-height: 2400px; opacity: 1; }

  /* tracklist en mode statique (pas de survol sur mobile) */
  .album__panel .tracks {
    overflow: visible;
    -webkit-mask-image: none;
            mask-image: none;
    padding: 0;
  }
  .album__panel .track { cursor: default; }
  .album__panel .track:hover { background: transparent; box-shadow: none; }
  .album__panel .track__feat { max-height: 2rem; opacity: 1; }   /* feat toujours montré */
}

/* le chevron n'existe que pour le mobile : masqué sur desktop */
.album__chevron { display: none; }
@media (max-width: 880px) { .album__chevron { display: block; } }

/* ============================================================
   Accessibilité : mouvement réduit
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .album { opacity: 1; filter: none; transform: none; }
  /* on neutralise l'apparition (état de repos visible d'emblée) sans
     interdire l'agrandissement au survol, qui reste utile pour lire. */
  .disccard:not(.is-hover) { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   PAGE « FULL DISC » — grille 16 × 16 des 256 chansons
   ============================================================ */
.page-fulldisc { overflow-x: hidden; }

/* --- petit fil d'Ariane / navigation inter-pages --- */
.pagenav {
  display: flex;
  align-items: center;
  gap: .9rem;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.pagenav__link {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color .3s var(--ease);
}
.pagenav__link:hover { color: var(--accent); }
.pagenav__here {
  color: var(--ink-faint);
  position: relative;
  padding-left: .9rem;
}
.pagenav__here::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 1px; height: 11px;
  transform: translateY(-50%);
  background: var(--line);
}

/* lien retour vers la grille, posé sur la page discographie */
.disclink {
  position: fixed;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .95rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.disclink:hover {
  color: var(--accent);
  border-color: var(--accent-soft);
  transform: translateY(-1px);
}
.disclink__grid {
  display: grid;
  grid-template-columns: repeat(2, 4px);
  grid-template-rows: repeat(2, 4px);
  gap: 2px;
}
.disclink__grid i { background: currentColor; border-radius: 1px; }

/* --- masthead de la grille (plus compact que la home) --- */
.grid-masthead {
  padding: clamp(3.5rem, 9vh, 7rem) var(--pad) clamp(2rem, 5vh, 4rem);
  padding-left: clamp(1.25rem, 5vw, 5rem);
  padding-right: clamp(1.25rem, 5vw, 5rem);
  max-width: 1500px;
  margin: 0 auto;
}
.grid-masthead__inner { max-width: 50rem; }
.grid-masthead__eyebrow {
  font-size: .72rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.2rem;
}
.grid-masthead__title {
  font-family: var(--serif);
  font-weight: 400;
  font-optical-sizing: auto;
  font-size: clamp(3.5rem, 13vw, 9rem);
  line-height: .9;
  letter-spacing: -.02em;
  margin-bottom: 1.4rem;
}
.grid-masthead__sub {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 34rem;
}

/* --- la grille --- */
.discgrid-wrap {
  padding: 0 clamp(1.25rem, 5vw, 5rem);
  max-width: 1500px;
  margin: 0 auto;
}
.discgrid {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: clamp(4px, .5vw, 9px);
  cursor: pointer;   /* la carte agrandie est pointer-events:none ; on garde le pointeur sur toute la grille */
}

/* --- une carte = une chanson ---
   Au repos : uniquement la pochette + un petit numéro chronologique.
   Le carré est trop exigu pour un titre lisible, alors on laisse l'image
   parler. Tout le détail apparaît au survol, quand la carte s'agrandit. */
.disccard {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: clamp(3px, .35vw, 7px);
  overflow: hidden;
  background: var(--ivory-soft);
  cursor: pointer;
  isolation: isolate;
  outline: none;
  /* transform-origin est posé en ligne par fulldisc.js (ancrage selon
     la position pour que l'agrandissement 3×3 reste dans la grille). */

  /* apparition à l'entrée dans le viewport */
  opacity: 0;
  transform: translateY(10px) scale(.985);
  transition:
    opacity .5s var(--ease-out),
    transform .45s var(--ease-out),
    box-shadow .35s var(--ease);
}
.disccard.is-in { opacity: 1; transform: none; }

.disccard__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.94) brightness(.98);
  transition: filter .45s var(--ease);
}
.disccard__img--empty {
  background: linear-gradient(135deg, var(--ivory-soft), var(--paper));
}

/* petit numéro chronologique, en bas à gauche, très discret */
.disccard__num {
  position: absolute;
  left: .3em; bottom: .15em;
  z-index: 2;
  font-size: clamp(.42rem, .5vw, .6rem);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: .04em;
  color: rgba(255,255,255,.82);
  text-shadow: 0 1px 4px rgba(0,0,0,.55);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.disccard:not(.is-hover) .disccard__num { opacity: .72; }

/* initiales du titre au repos : typo serif, centrées, discrètes mais
   lisibles sur n'importe quelle pochette. S'effacent à l'agrandissement
   (le titre complet prend le relais). */
.disccard__initials {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(.95rem, 1.7vw, 1.55rem);
  line-height: 1;
  letter-spacing: .01em;
  color: rgba(255,255,255,.92);
  text-shadow: 0 1px 3px rgba(0,0,0,.45), 0 0 14px rgba(0,0,0,.3);
  -webkit-text-stroke: .4px rgba(0,0,0,.12);
  pointer-events: none;
  opacity: 0;
  transform: scale(.96);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.disccard:not(.is-hover) .disccard__initials { opacity: 1; transform: none; }

/* léger voile bas, juste pour asseoir le numéro au repos */
.disccard__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(18,16,13,.92) 0%,
    rgba(18,16,13,.72) 22%,
    rgba(18,16,13,.30) 48%,
    rgba(18,16,13,0) 72%
  );
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.disccard:not(.is-hover) .disccard__scrim { opacity: .28; }

/* --- le texte : entièrement masqué au repos, révélé à l'agrandissement.
   Comme toute la carte est mise à l'échelle ×3 au survol, on dimensionne
   ce texte petit : il deviendra parfaitement lisible une fois agrandi. --- */
.disccard__body {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: .42em;
  color: #fff;
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.disccard__year {
  font-size: .28em;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.82);
  margin-bottom: .5em;
  display: flex;
  align-items: center;
  gap: .6em;
}
.disccard__live {
  font-size: .9em;
  padding: .1em .55em;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 999px;
  letter-spacing: .08em;
}
.disccard__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: .42em;
  line-height: 1.12;
  letter-spacing: -.005em;
  text-shadow: 0 1px 8px rgba(0,0,0,.45);
}
.disccard__album {
  font-size: .26em;
  color: rgba(255,255,255,.78);
  font-weight: 400;
  letter-spacing: .02em;
  margin-top: .7em;
}

/* ============================================================
   Survol — desktop pointeur : la carte grandit en 3 × 3.
   L'état actif est piloté en JS (.is-hover) et non par CSS :hover, pour
   qu'on puisse survoler une carte SOUS l'agrandissement : la carte active
   suit toujours la cellule de base sous le pointeur (cf. fulldisc.js).
   ============================================================ */
@media (hover: hover) and (min-width: 1101px) {
  .disccard {
    transition:
      opacity .5s var(--ease-out),
      transform .42s var(--ease-out),
      box-shadow .35s var(--ease);
  }
  /* la carte agrandie ne doit jamais piéger le curseur : c'est la grille
     (et le calcul de cellule) qui décide de la carte active. */
  .disccard.is-hover { pointer-events: none; }

  .disccard.is-in.is-hover {
    z-index: 20;
    /* ×3 = empreinte exacte de 3 cellules sur 3 ;
       l'origine posée en ligne maintient le bloc dans la grille */
    transform: scale(3);
    box-shadow: var(--shadow-lift);
  }
  .disccard.is-hover .disccard__img { filter: saturate(1.04) brightness(1.01); }
  .disccard.is-hover .disccard__scrim { opacity: 1; }
  .disccard.is-hover .disccard__body { opacity: 1; }
  .disccard.is-hover .disccard__num { opacity: 0; }

  .disccard.is-in.is-hover:focus-visible {
    box-shadow: var(--shadow-lift), 0 0 0 .7px var(--accent);
  }
}

/* ============================================================
   Responsive « Full Disc » — sans survol, le détail est toujours montré
   ============================================================ */
@media (max-width: 1100px) {
  .discgrid { grid-template-columns: repeat(8, 1fr); }
}
@media (max-width: 720px) {
  .discgrid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .grid-masthead { padding-left: var(--pad); padding-right: var(--pad); }
}
@media (max-width: 420px) {
  .discgrid { grid-template-columns: repeat(3, 1fr); }
}

/* Appareils tactiles / sans pointeur fin : pas d'agrandissement.
   On affiche en permanence titre + année, en réduisant la dépendance
   au survol. */
@media (hover: none), (max-width: 1100px) {
  .disccard__scrim { opacity: .55 !important; }
  .disccard__body {
    opacity: 1;
    padding: .55rem .5rem;
  }
  .disccard__num { opacity: 0 !important; }
  /* le titre complet est déjà affiché : pas besoin des initiales */
  .disccard__initials { opacity: 0 !important; }
  .disccard__year { font-size: clamp(.5rem, 1.4vw, .66rem); }
  .disccard__title {
    font-size: clamp(.72rem, 2vw, 1rem);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .disccard__album {
    font-size: clamp(.56rem, 1.5vw, .7rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ============================================================
   SPOTIFY — bouton de connexion, mini-lecteur, états des titres
   (n'apparaît que pour un utilisateur connecté & Premium)
   ============================================================ */

/* --- bouton de connexion discret (sous le lien Full Disc) --- */
.spotlogin {
  position: fixed;
  top: calc(clamp(1rem, 3vw, 2rem) + 3rem);   /* sous .disclink, pas de chevauchement */
  right: clamp(1rem, 3vw, 2rem);
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font: 500 .76rem/1 var(--sans);
  letter-spacing: .02em;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .6rem 1rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.spotlogin:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); border-color: var(--accent-soft); }
.spotlogin__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #1db954;            /* vert Spotify, seule entorse à la palette */
}

/* --- états des titres quand Spotify est actif --- */
.spotify-on .track { cursor: pointer; }
.spotify-on .track__num { position: relative; }
/* au survol, un petit ▶ remplace le numéro pour signaler la lecture */
.spotify-on .track:hover .track__num { color: transparent; }
.spotify-on .track:hover .track__num::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0; height: 0;
  border-left: 8px solid var(--accent);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
/* recherche en cours : spinner à la place du numéro */
.spotify-on .track--loading .track__num { color: transparent; }
.spotify-on .track--loading .track__num::after {
  content: "";
  position: absolute; inset: 0; margin: auto;
  width: 13px; height: 13px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  border-left-width: 2px;
  box-sizing: border-box;
  animation: spotspin .7s linear infinite;
}
@keyframes spotspin { to { transform: rotate(360deg); } }
.spotify-on .track--playing { background: var(--paper); box-shadow: var(--shadow-soft); }
.spotify-on .track--playing .track__num { color: transparent; }
.spotify-on .track--playing .track__num::after {
  content: "";
  position: absolute; inset: 0; margin: auto;
  width: 3px; height: 12px;
  background: var(--accent);
  border: none;
  box-shadow: 5px 0 0 var(--accent);   /* deux barres = "en lecture" */
  border-left: none; border-top: none; border-bottom: none;
  animation: eqpulse 1s var(--ease) infinite alternate;
}
@keyframes eqpulse { from { transform: scaleY(.55); } to { transform: scaleY(1); } }

/* --- états des cartes de la grille « Full Disc » quand Spotify est actif --- */
.spotify-on .disccard { cursor: pointer; }
/* petit ▶ révélé au survol, en surimpression de la pochette */
.spotify-on .disccard::after {
  content: "";
  position: absolute;
  top: 10px; left: 10px;
  z-index: 4;
  width: 0; height: 0;
  border-left: 11px solid #fff;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.5));
  opacity: 0;
  transform: scale(.7);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  pointer-events: none;
}
.spotify-on .disccard:hover::after,
.spotify-on .disccard:focus-visible::after { opacity: 1; transform: scale(1); }

/* recherche en cours sur une carte : voile + spinner centré */
.spotify-on .disccard--loading::after { opacity: 0; }  /* masque le ▶ pendant le chargement */
.spotify-on .disccard--loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  background: rgba(20,18,16,.45);
  background-image: radial-gradient(circle, transparent 0, transparent 11px, transparent 11px);
}
.disccard__spinner {
  position: absolute;
  z-index: 7;
  top: 50%; left: 50%;
  width: 22px; height: 22px;
  margin: -11px 0 0 -11px;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spotspin .7s linear infinite;
  pointer-events: none;
}

/* carte en cours de lecture : liseré rouge + ▶ permanent */
.spotify-on .disccard--playing { outline: 2px solid var(--accent); outline-offset: -2px; z-index: 5; }
.spotify-on .disccard--playing::after {
  opacity: 1; transform: scale(1);
  border-left-color: var(--accent);
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.4));
}

/* --- mini-lecteur (barre flottante en bas) --- */
.spotbar {
  position: fixed;
  left: 50%;
  bottom: clamp(1rem, 3vw, 1.8rem);
  transform: translate(-50%, 140%);
  z-index: 200;
  width: min(640px, calc(100vw - 2rem));
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .7rem 1rem .7rem .7rem;
  background: rgba(251,250,246,.86);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
          backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lift);
  opacity: 0;
  transition: transform .55s var(--ease-out), opacity .4s var(--ease);
}
.spotbar.is-visible { transform: translate(-50%, 0); opacity: 1; }

.spotbar__toggle {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.spotbar__toggle:hover { transform: scale(1.06); background: var(--accent); }
/* play/pause : on montre l'un OU l'autre selon l'état */
.spotbar__icon-pause { display: block; }
.spotbar__icon-play  { display: none; }
.spotbar.is-paused .spotbar__icon-pause { display: none; }
.spotbar.is-paused .spotbar__icon-play  { display: block; }

/* état « recherche » : le bouton devient un spinner, le sous-titre clignote */
.spotbar.is-searching .spotbar__icon-play,
.spotbar.is-searching .spotbar__icon-pause { display: none; }
.spotbar.is-searching .spotbar__toggle {
  pointer-events: none;
  background: var(--ink);
}
.spotbar.is-searching .spotbar__toggle::after {
  content: "";
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spotspin .7s linear infinite;
}
.spotbar.is-searching .spotbar__sub { animation: searchpulse 1.1s var(--ease) infinite; }
@keyframes searchpulse { 0%,100% { opacity: .45; } 50% { opacity: 1; } }

.spotbar__meta { min-width: 0; flex: 1 1 8rem; display: flex; flex-direction: column; gap: .15rem; }
.spotbar__title {
  font-size: .92rem; font-weight: 500; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spotbar__sub {
  font-size: .74rem; color: var(--ink-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spotbar__progress {
  flex: 1 1 10rem;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.spotbar__bar {
  position: absolute; left: 0; top: 0; height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .2s linear;
}
.spotbar__time {
  flex: none;
  font-size: .76rem; color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.spotbar__logo {
  flex: none;
  font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
  color: #1db954; font-weight: 600;
}

@media (max-width: 880px) {
  .spotbar__progress { display: none; }   /* gain de place sur mobile */
  .spotbar__time { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .spotbar { transition: opacity .2s; transform: translate(-50%, 0); }
  .spotify-on .track--playing .track__num::after { animation: none; }
}
