/* Boutique. Reprend le fond, les couleurs et les fontes de styles.css ;
   ne definit ici que ce que la page d'accueil n'a pas : liste, lecteur,
   grille de licences. */

:root {
  --color-accent: #d47ae8;
  --color-panel: rgba(0, 0, 0, 0.28);
  --bar-height: 4.75rem;
}

/* La home centre son unique bloc au milieu de l'ecran ; ici le contenu
   defile, donc on repart du haut et on elargit. */
.page--shop {
  justify-content: flex-start;
  align-items: stretch;
  text-align: left;
  gap: 0;
  max-width: 58rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem calc(var(--bar-height) + 3rem);
}

/* ----- en-tete --------------------------------------------------- */

.shop__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.shop__back {
  color: var(--color-muted);
  text-decoration: none;
  transition: color 240ms ease;
}

.shop__back:hover,
.shop__back:focus-visible {
  color: var(--color-fg);
  outline: none;
}

.shop__header {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--color-line);
}

.shop__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.shop__title {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.15;
  margin: 0.9rem 0 1.1rem;
  text-shadow:
    0 0 1px rgba(238, 185, 248, 0.25),
    0 0 18px rgba(205, 130, 230, 0.12);
}

.shop__lede {
  max-width: 46ch;
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* La page de remerciement n'a pas de barre de lecture a compenser. */
.page--thanks {
  padding-bottom: 3rem;
}

/* Ici le titre est une phrase, pas un mot : la taille de la page boutique
   le ferait deborder sur trois lignes. */
.page--thanks .shop__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.1em;
}

.thanks__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cta--ghost {
  color: var(--color-muted);
  border-color: var(--color-line);
}

.cta--ghost:hover,
.cta--ghost:focus-visible {
  color: #160320;
  background: var(--color-muted);
  border-color: var(--color-muted);
}

/* ----- filtres --------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 1.75rem 0 0.5rem;
}

.filters__search {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  color: var(--color-fg);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 2px;
  backdrop-filter: blur(2px);
  transition: border-color 240ms ease;
}

.filters__search::placeholder {
  color: var(--color-muted);
}

.filters__search:focus {
  border-color: rgba(238, 185, 248, 0.55);
  outline: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  padding: 0.5rem 0.8rem;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  background: none;
  border: 1px solid var(--color-line);
  border-radius: 2px;
  cursor: pointer;
  transition: color 240ms ease, border-color 240ms ease;
}

.chip:hover {
  color: var(--color-fg);
  border-color: rgba(238, 185, 248, 0.55);
}

.chip[aria-pressed='true'] {
  color: #160320;
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* ----- liste ----------------------------------------------------- */

.list {
  margin-top: 0.75rem;
}

.beat {
  display: grid;
  grid-template-columns: 3rem 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--color-line);
  border-left: 2px solid transparent;
  transition: background 240ms ease, border-color 240ms ease;
}

.beat:hover {
  background: rgba(55, 20, 65, 0.28);
}

.beat.is-playing {
  background: rgba(55, 20, 65, 0.35);
  border-left-color: var(--color-accent);
}

/* La pochette porte le bouton : un voile sombre garde l'icone lisible quelle
   que soit l'image dessous. */
.beat__art {
  position: relative;
  width: 3rem;
  height: 3rem;
}

.beat__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}

.beat__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--color-fg);
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid var(--color-line);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 240ms ease, background 240ms ease, color 240ms ease;
}

.beat:hover .beat__play {
  background: rgba(0, 0, 0, 0.6);
  border-color: rgba(238, 185, 248, 0.55);
}

.beat.is-playing .beat__play {
  color: var(--color-accent);
  background: rgba(22, 3, 32, 0.62);
  border-color: var(--color-accent);
}

.beat__play svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: currentColor;
}

.beat__meta {
  min-width: 0;
}

.beat__title {
  font-size: 0.98rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.beat__tags {
  margin-top: 0.15rem;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.beat__specs {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.5;
  text-align: right;
  white-space: nowrap;
}

.beat__specs b {
  color: var(--color-fg);
  font-weight: 400;
}

.buy {
  padding: 0.55rem 0.9rem;
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  background: none;
  border: 1px solid rgba(212, 122, 232, 0.5);
  border-radius: 2px;
  cursor: pointer;
  transition: color 240ms ease, background 240ms ease;
}

.buy:hover {
  color: #160320;
  background: var(--color-accent);
}

.buy[disabled] {
  color: var(--color-muted);
  border-color: var(--color-line);
  cursor: not-allowed;
}

.buy[disabled]:hover {
  color: var(--color-muted);
  background: none;
}

.empty {
  padding: 3rem 0.5rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* Egaliseur anime a la place du triangle, sur la ligne en cours. */
.beat__eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 0.7rem;
}

.beat.is-playing .beat__eq {
  display: flex;
}

.beat.is-playing .beat__play svg {
  display: none;
}

.beat__eq i {
  width: 2px;
  height: 0.25rem;
  background: currentColor;
  animation: eq 0.7s ease-in-out infinite;
}

.beat__eq i:nth-child(2) { animation-delay: 0.18s; }
.beat__eq i:nth-child(3) { animation-delay: 0.36s; }

@keyframes eq {
  0%, 100% { height: 0.25rem; }
  50%      { height: 0.7rem; }
}

/* ----- licences -------------------------------------------------- */

.section {
  padding: 4rem 0 0;
}

.section__title {
  margin-bottom: 1.25rem;
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.licenses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
}

.licenses--single {
  grid-template-columns: minmax(0, 20rem);
}

.license {
  padding: 1.25rem;
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 2px;
  backdrop-filter: blur(2px);
}

.license--featured {
  border-color: rgba(212, 122, 232, 0.55);
}

.license__name {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.license__price {
  margin: 0.35rem 0 0.9rem;
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.license__perks {
  list-style: none;
  color: var(--color-muted);
  font-size: 0.85rem;
  line-height: 1.75;
}

.license__perks li::before {
  content: '\2014';
  margin-right: 0.5rem;
  color: var(--color-line);
}

.note {
  max-width: 60ch;
  margin-top: 1.75rem;
  color: var(--color-muted);
  font-size: 0.85rem;
  line-height: 1.8;
}

.shop__footer {
  margin-top: 3.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shop__footer a {
  color: var(--color-fg);
  text-decoration: none;
}

/* ----- barre de lecture ------------------------------------------ */

.transport {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  height: var(--bar-height);
  background: rgba(8, 0, 12, 0.9);
  border-top: 1px solid var(--color-line);
  backdrop-filter: blur(10px);
  transform: translateY(110%);
  transition: transform 280ms ease;
}

.transport.is-up {
  transform: none;
}

.transport__seek {
  position: relative;
  height: 3px;
  background: rgba(233, 239, 231, 0.12);
  cursor: pointer;
}

.transport__fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--color-accent);
}

.transport__body {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  height: calc(var(--bar-height) - 3px);
  max-width: 58rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.transport__toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  color: #160320;
  background: var(--color-fg);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.transport__toggle svg {
  width: 0.8rem;
  height: 0.8rem;
  fill: currentColor;
}

.transport__info {
  flex: 1;
  min-width: 0;
}

.transport__track {
  font-size: 0.88rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.transport__sub {
  margin-top: 0.1rem;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.transport .buy {
  flex: none;
}

/* ----- responsive ------------------------------------------------ */

@media (max-width: 640px) {
  .page--shop {
    padding: 2rem 1.1rem calc(var(--bar-height) + 2rem);
  }

  .beat__art {
    width: 2.75rem;
    height: 2.75rem;
  }

  .beat {
    grid-template-columns: 2.75rem 1fr auto;
    gap: 0.75rem;
    padding: 0.8rem 0.25rem;
  }

  .beat__specs {
    display: none;
  }

  .transport .buy {
    display: none;
  }

  .shop__header {
    padding: 2.5rem 0 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .beat__eq i {
    animation: none;
  }

  .transport {
    transition: none;
  }
}
