@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;1,9..144,500&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink: #12100D;
  --surface: #1C1815;
  --brass: #C08B3E;
  --ember: #A8402F;
  --parchment: #EDE3D0;
  --ash: #948A7B;
  --line: #332C24;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(15,13,10,0.35), rgba(15,13,10,0.55)),
    url("covers/bg-voute.jpg");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--parchment);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
}

/* Fond plus neutre pour le catalogue : garde la palette mais retire la
   texture "couloir de pierre" pour ne pas fatiguer l'œil pendant la
   lecture/comparaison des fiches produit. */
body.catalogue-page {
  background-image:
    linear-gradient(180deg, #18140f 0%, #12100D 45%, #0d0b09 100%);
  background-attachment: fixed;
}

header {
  position: sticky;
  top: 0;
  background: rgba(18,16,13,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  z-index: 10;
}

header .header-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

header .logo {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 24px;
  color: var(--parchment);
}

header .tagline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.bestseller-feature {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  background: rgba(18,16,13,0.85);
  border: 2px solid var(--ember);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 24px 0 0;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  transition: background 0.15s ease, transform 0.15s ease;
}

.bestseller-feature:hover {
  background: rgba(28,24,19,0.92);
  transform: translateY(-1px);
}

.bestseller-feature img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.bestseller-feature .bf-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bestseller-feature .bf-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #E8674F;
}

.bestseller-feature .bf-stars {
  font-size: 14px;
  color: var(--brass);
  letter-spacing: 2px;
}

.bestseller-feature .bf-title {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  color: var(--parchment);
}

@media (max-width: 480px) {
  .bestseller-feature { margin-left: 20px; margin-right: 20px; }
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  border-top: 3px solid var(--brass);
}
.card.ember { border-top-color: var(--ember); }

.card .system {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.card.ember .system { color: var(--ember); }
.system.ember { color: var(--ember); }

.card .title {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  line-height: 1.25;
}

.card .blurb {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  color: var(--ash);
  line-height: 1.5;
}

.card .meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ash);
  margin-top: 4px;
}

.card .price {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--parchment);
  font-size: 13.5px;
}

.card.locked {
  opacity: 0.45;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ash);
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 150ms ease;
}
.filter-btn:hover {
  border-color: var(--brass);
  color: var(--parchment);
}
.filter-btn.active {
  background: rgba(192,139,62,0.15);
  border-color: var(--brass);
  color: var(--brass);
}
.card.hidden {
  display: none;
}

/* --- Cartes illustrées du catalogue --- */
.card.illustrated {
  padding: 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card.illustrated:hover {
  transform: translateY(-4px);
  border-color: var(--brass);
  box-shadow: 0 14px 34px rgba(0,0,0,0.5), 0 0 0 1px rgba(192,139,62,0.25),
              0 0 40px rgba(232,199,126,0.08);
}
.card.illustrated .cover {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--surface2, #241F19);
}
.card.illustrated .cover img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.92) contrast(1.03);
  transition: transform .5s ease;
  display: block;
}
.card.illustrated:hover .cover img { transform: scale(1.05); }
.card.illustrated .cover::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(18,16,13,0.95) 0%, rgba(18,16,13,0.15) 42%, transparent 62%);
}
.card.illustrated .cover.cover-pending {
  background:
    radial-gradient(ellipse at 50% 20%, rgba(192,139,62,0.10), transparent 60%),
    var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card.illustrated .cover.cover-pending .pending-num {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 64px;
  color: var(--line);
  line-height: 1;
}
.card.illustrated .seal {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--ember), #6b2013 75%);
  border: 1px solid rgba(232,199,126,0.5);
  color: #E8C77E;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5), inset 0 0 4px rgba(0,0,0,0.4);
  z-index: 2;
}
.card.illustrated .card-body {
  padding: 14px 16px 18px;
  margin-top: -34px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}
.card.illustrated .card-body .system { margin-bottom: 4px; }
.card.illustrated .card-body .title { margin-bottom: 6px; }
.card.illustrated .card-body .blurb { margin-bottom: 12px; }
.card.illustrated .card-body .meta {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: auto;
}

#search-input {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 10px 16px;
  color: var(--parchment);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  margin-bottom: 14px;
  outline: none;
}
#search-input::placeholder {
  color: var(--ash);
}
#search-input:focus {
  border-color: var(--brass);
}

.product {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  border-top: 3px solid var(--brass);
}
.product.ember { border-top-color: var(--ember); }

.product .system {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.product h1 {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  margin: 0 0 12px;
}

.product .blurb {
  color: var(--ash);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.product .infos {
  font-size: 12.5px;
  color: var(--ash);
  margin-bottom: 20px;
}

.trailer-wrap {
  margin: 4px 0 20px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(192, 139, 62, 0.35);
  background: #000;
}

.trailer-wrap video {
  display: block;
  width: 100%;
  height: auto;
}

.trailer-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.contents-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.contents-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}
.contents-list li::before {
  content: "•";
  color: var(--brass);
  margin-right: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 0;
  border-radius: 6px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.btn-buy { background: var(--ember); color: var(--parchment); }
.btn-download { background: var(--brass); color: var(--ink); }

.success-box {
  text-align: center;
  padding: 40px 20px;
}
.seal {
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid var(--brass);
  background: rgba(192,139,62,0.12);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--ash);
  font-size: 12.5px;
  text-decoration: none;
}

/* --- Collage de couvertures pour les packs --- */
.card .stack {
  position: relative;
  height: 152px;
  margin: 4px 6px 26px;
}
.card .stack img {
  position: absolute;
  width: 86px;
  height: 114px;
  object-fit: cover;
  border-radius: 3px;
  border: 2px solid var(--surface);
  box-shadow: 0 8px 18px rgba(0,0,0,0.5);
  transition: transform .25s ease;
}
.card:hover .stack img { transform: translateY(-3px); }
.card .stack img:nth-child(1) { left: 6%;  top: 14px; transform: rotate(-9deg); z-index: 1; }
.card .stack img:nth-child(2) { left: 30%; top: 2px;  transform: rotate(-2deg); z-index: 2; }
.card .stack img:nth-child(3) { left: 54%; top: 6px;  transform: rotate(4deg);  z-index: 3; }
.card .stack img:nth-child(4) { left: 76%; top: 18px; transform: rotate(10deg); z-index: 2; }
.card:hover .stack img:nth-child(1) { transform: rotate(-9deg) translateY(-3px); }
.card:hover .stack img:nth-child(2) { transform: rotate(-2deg) translateY(-3px); }
.card:hover .stack img:nth-child(3) { transform: rotate(4deg) translateY(-3px); }
.card:hover .stack img:nth-child(4) { transform: rotate(10deg) translateY(-3px); }
.card .stack-count {
  position: absolute;
  bottom: 0; right: 4%;
  background: radial-gradient(circle at 35% 30%, var(--ember), #6b2013 75%);
  border: 1px solid rgba(232,199,126,0.5);
  color: #E8C77E;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 10px;
  z-index: 4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* --- Cartes de packs de genre : version compacte --- */
.card.pack-mini {
  padding: 12px;
  gap: 6px;
}
.card.pack-mini .stack {
  height: 108px;
  margin: 2px 4px 16px;
}
.card.pack-mini .stack img {
  width: 62px;
  height: 82px;
  border-width: 1.5px;
}
.card.pack-mini .stack-count {
  font-size: 9.5px;
  padding: 2px 7px;
}
.card.pack-mini .title {
  font-size: 16.5px;
}
.card.pack-mini .blurb {
  font-size: 11.5px;
  line-height: 1.4;
}
.card.pack-mini .system {
  font-size: 9.5px;
}
.card.pack-mini .stack img:nth-child(1) { top: 12px; }
.card.pack-mini .stack img:nth-child(2) { top: 1px; }
.card.pack-mini .stack img:nth-child(3) { top: 5px; }

/* ============ Page d'accueil ============ */
.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 20px;
  text-align: center;
}
.hero .eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 14px;
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.15;
  margin: 0 0 18px;
  color: var(--parchment);
}
.hero h1 .accent { color: var(--brass); font-style: normal; }
.hero p.pitch {
  font-size: 15.5px;
  line-height: 1.65;
  color: #cfc3ac;
  max-width: 540px;
  margin: 0 auto 30px;
}
.hero-cta {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--brass-glow, #E8C77E), var(--brass));
  padding: 14px 30px;
  border-radius: 3px;
  text-decoration: none;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 24px rgba(192,139,62,0.25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(192,139,62,0.35);
}

.stat-row {
  display: flex;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
  margin: 44px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  max-width: 640px;
}
.stat-row .stat { text-align: center; }
.stat-row .stat .n {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--brass);
  display: block;
}
.stat-row .stat .l {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ash);
}

.cover-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 50px 24px 10px;
  max-width: 1040px;
  margin: 0 auto;
  scrollbar-width: thin;
}
.cover-strip img {
  height: 210px;
  width: 148px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(0,0,0,0.45);
  flex-shrink: 0;
  transition: transform .25s ease;
}
.cover-strip img:hover { transform: translateY(-5px); }

.steps {
  max-width: 760px;
  margin: 56px auto 20px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.steps .step {
  text-align: center;
  padding: 22px 14px;
}
.steps .step .num {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--brass);
  display: block;
  margin-bottom: 8px;
}
.steps .step h3 {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--parchment);
}
.steps .step p {
  font-size: 12.5px;
  color: var(--ash);
  line-height: 1.5;
  margin: 0;
}
@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; }
}

.home-footer-link {
  display: block;
  text-align: center;
  margin: 20px 0 70px;
  font-size: 13px;
  color: var(--ash);
}
.home-footer-link a { color: var(--brass); text-decoration: none; }

.cover-strip .item {
  flex-shrink: 0;
  text-align: center;
  text-decoration: none;
  display: block;
}
.cover-strip .item span {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  color: var(--ash);
  max-width: 148px;
  line-height: 1.3;
  transition: color .2s ease;
}
.cover-strip .item:hover span {
  color: var(--brass);
}
