/* GLORYUS — pages du site des cartes (galerie + page carte) */
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh;
  background: var(--onyx); color: var(--snow);
  font-family: var(--f-text); font-stretch: 112%;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
body::before { /* grain de fond, comme la charte */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: var(--grain); background-size: 220px; opacity: .05;
}

.topbar {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.topbar a { text-decoration: none; }
.topbar .display { font-size: 26px; letter-spacing: .01em; }
.topbar .tag { color: var(--lime); }

/* ---------- Galerie ---------- */
.hero {
  position: relative; z-index: 1;
  padding: clamp(24px, 6vw, 72px) clamp(16px, 4vw, 48px) 24px;
  overflow: hidden;
}
.hero h1 { margin: 0; font-size: clamp(56px, 12vw, 150px); color: var(--lime); }
.hero p { max-width: 640px; color: rgba(250,250,250,.75); line-height: 1.55; font-size: 15px; }
.hero__letter {
  position: absolute; right: -2%; top: 10%;
  font-family: var(--f-letter); font-size: clamp(80px, 18vw, 240px);
  color: var(--snow); opacity: .06; transform: rotate(-9deg); pointer-events: none; white-space: nowrap;
}

.season { position: relative; z-index: 1; padding: 8px clamp(16px, 4vw, 48px) 64px; }
.season__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px;
  border-top: 2px dashed rgba(161,229,0,.5); padding-top: 20px; margin-bottom: 24px; }
.season__head h2 { margin: 0; font-size: clamp(40px, 7vw, 72px); }
.season__head h2 span { color: var(--lime); }
.counts { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--snow); background: transparent; cursor: pointer;
  border: 2px solid rgba(250,250,250,.25); padding: 9px 14px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.chip[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--onyx); }
.chip:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.chip i { display: inline-block; width: 9px; height: 9px; margin-right: 7px; vertical-align: 0; background: var(--c); }

.grid {
  display: grid; gap: clamp(20px, 3vw, 36px);
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
  justify-items: center;
}
.grid > a { display: block; width: 100%; max-width: 280px; text-decoration: none; }
.grid .card { --card-w: 100%; }
.grid > a:focus-visible { outline: 3px solid var(--lime); outline-offset: 6px; border-radius: 12px; }
.grid > a[hidden] { display: none; }

.footer { position: relative; z-index: 1; padding: 32px clamp(16px, 4vw, 48px) 48px; font-size: 12px; color: rgba(250,250,250,.5); letter-spacing: .06em; }

/* ---------- Page d'une carte ---------- */
.solo {
  position: relative; z-index: 1;
  display: grid; gap: clamp(28px, 5vw, 72px);
  grid-template-columns: minmax(0, 520px) minmax(0, 440px);
  justify-content: center; align-items: center;
  padding: clamp(16px, 4vw, 48px);
  min-height: calc(100vh - 80px);
}
.solo__stage { display: grid; place-items: center; position: relative; }
.solo__stage::before {
  content: ""; position: absolute; inset: 8% 4%; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow, var(--lime)) 40%, transparent), transparent);
  filter: blur(40px); opacity: .55;
}
.solo .card { --card-w: min(500px, 86vw); }

.solo__info h1 { margin: 0 0 6px; font-size: clamp(44px, 7vw, 76px); }
.solo__tier { color: var(--glow, var(--lime)); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 14px; margin: 0 0 20px; }
.solo__meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; margin: 0 0 28px; font-size: 14px; }
.solo__meta dt { color: rgba(250,250,250,.55); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 700; padding-top: 3px; }
.solo__meta dd { margin: 0; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 18px; cursor: pointer; text-decoration: none;
  color: var(--onyx); background: var(--lime); border: 2px solid var(--lime);
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.btn--ghost { background: transparent; color: var(--snow); border-color: rgba(250,250,250,.35); }
.btn:focus-visible { outline: 2px solid var(--snow); outline-offset: 3px; }
.btn[hidden] { display: none; }
.hint { margin-top: 18px; font-size: 12px; color: rgba(250,250,250,.5); }

@media (max-width: 860px) {
  .solo { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .solo__meta { text-align: left; }
  .actions { justify-content: center; }
}

/* ---------- Modes de capture (script render.py) ---------- */
body.capture-card { background: transparent; }
body.capture-card::before, body.capture-card .topbar, body.capture-card .solo__info,
body.capture-card .solo__stage::before { display: none; }
body.capture-card .solo { display: block; padding: 0; min-height: 0; }
body.capture-card .solo__stage { display: block; width: 500px; }
body.capture-card .card { --card-w: 500px; }

/* Visuel réseaux 1080 × 1350 */
body.capture-social { width: 1080px; height: 1350px; overflow: hidden; }
body.capture-social .topbar, body.capture-social .solo__info { display: none; }
body.capture-social .solo { display: block; padding: 0; min-height: 0; }
.social { display: none; }
body.capture-social .social {
  display: block; position: absolute; inset: 0; z-index: 0; overflow: hidden;
}
body.capture-social .solo__stage { position: absolute; left: 50%; top: 152px; transform: translateX(-50%); width: 640px; }
body.capture-social .solo__stage::before { inset: -6% -14%; opacity: .7; }
body.capture-social .card { --card-w: 640px; }
.social__frame { position: absolute; inset: 36px; border: 3px dashed color-mix(in srgb, var(--glow) 80%, transparent); }
.social__letter { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%) rotate(-10deg);
  font-family: var(--f-letter); font-size: 330px; color: var(--glow); opacity: .12; white-space: nowrap; }
.social__top, .social__bottom { position: absolute; left: 72px; right: 72px; display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: 22px; }
.social__top { top: 68px; }
.social__top .display { font-size: 56px; letter-spacing: .01em; }
.social__bottom { bottom: 64px; font-size: 20px; }
.social__bottom span { white-space: nowrap; }
.social__bottom .display { font-size: 58px; color: var(--glow); letter-spacing: .01em; }
