/* =====================================================================
   THÈME ESPORT / GAMING (07/11) — chargé après style.css
   Fond nuit, néon framboise + violet + cyan, coins coupés,
   typographie anguleuse en capitales (Chakra Petch + Barlow).
   ===================================================================== */
:root {
  --bg: #07060d;
  --bg-2: #0d0b18;
  --surface: #121022;
  --surface-2: #1a1630;
  --border: #2a2448;
  --text: #f1eefb;
  --muted: #9a93b8;
  --sea: #22e1ff;
  --sea-strong: #12b8d6;
  --gold: #ffc94d;
  --berry: #ff2e88;
  --berry-2: #b31dff;
  --ok: #3cf0a0;
  --danger: #ff5c7a;
  --font-display: "Chakra Petch", system-ui, sans-serif;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --grad: linear-gradient(100deg, var(--berry) 0%, var(--berry-2) 100%);
  --glow-berry: 0 0 24px rgba(255, 46, 136, 0.35);
  --cut-sm: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  --cut-md: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  --cut-card: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  --cut-lg: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
}
body {
  background:
    radial-gradient(900px 500px at 85% -5%, rgba(179, 29, 255, 0.18), transparent 60%),
    radial-gradient(800px 500px at 0% 30%, rgba(255, 46, 136, 0.1), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 100% 48px,
    var(--bg);
  background-color: var(--bg);
}
h1, h2, h3, h4 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.02em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 13px var(--font-display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--sea);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--grad); }

/* ---------- Boutons ---------- */
.btn {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
  border-radius: 0; border: none; background: var(--surface-2); color: var(--text); clip-path: var(--cut-sm);
}
.btn:hover { background: #241e40; }
.btn-primary { background: var(--grad); color: #fff; }
.btn-primary:hover { background: linear-gradient(100deg, #ff4f9c, #c242ff); }
.btn-gold { background: linear-gradient(100deg, #ffc94d, #ff9a3d); color: #1a1000; }
.btn-gold:hover { background: linear-gradient(100deg, #ffd56e, #ffae5c); }
.btn-patreon { background: #ff424d; color: #fff; }
.btn-patreon:hover { background: #ff5d66; }
.btn-ghost { background: transparent; clip-path: none; }
.btn-ghost-neon { background: transparent; color: var(--sea); box-shadow: inset 0 0 0 2px var(--sea); }
.btn-ghost-neon:hover { background: rgba(34, 225, 255, 0.1); color: #fff; }
.dl-locked { background: var(--bg-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }

/* ---------- Cartes : coin coupé + filet néon ---------- */
.card {
  border-radius: 0; border: 1px solid var(--border); position: relative;
  background: linear-gradient(180deg, rgba(26, 22, 48, 0.92), rgba(13, 11, 24, 0.96));
  clip-path: var(--cut-card);
}
.card::before { content: ""; position: absolute; left: 0; top: 0; width: 90px; height: 3px; background: var(--grad); z-index: 1; }

/* ---------- Barre latérale ---------- */
.sidebar { background: rgba(7, 6, 13, 0.92); border-right: 1px solid var(--border); }
.side-logo span { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; }
.side-pill {
  border-radius: 0; border: none; min-height: 58px; background: var(--surface);
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.12em; font-size: 17px;
  clip-path: var(--cut-md); box-shadow: inset 3px 0 0 var(--border);
}
.side-pill:hover { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--sea); border: none; }
.side-pill.active { background: linear-gradient(100deg, rgba(255, 46, 136, 0.3), rgba(179, 29, 255, 0.2)); color: #fff; box-shadow: inset 3px 0 0 var(--berry); border: none; }
.side-lang { font-size: 14px; min-height: 46px; color: var(--muted); }
.gems-chip {
  border-radius: 0; background: rgba(34, 225, 255, 0.08); border: 1px solid rgba(34, 225, 255, 0.35);
  font-family: var(--font-display); clip-path: var(--cut-sm);
}

/* ---------- Badges, onglets ---------- */
.tier-badge, .rarity-tag, .version-pill, .chip, .like-btn, .progress, input, select, textarea, .toast, .slot { border-radius: 0; }
.tier-badge, .rarity-tag, .version-pill, .chip, .like-btn { font-family: var(--font-display); }
.tier-badge.sailor { color: var(--sea); background: rgba(34, 225, 255, 0.1); border-color: rgba(34, 225, 255, 0.4); }
.tier-badge.captain { color: var(--gold); background: rgba(255, 201, 77, 0.12); border-color: rgba(255, 201, 77, 0.45); }
.version-pill { color: #fff; background: var(--grad); border: none; }
.home-head .tabs { margin: 26px 0 30px; }
.home-head .tab {
  border-radius: 0; border: none; background: var(--surface); font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: 0.12em; padding: 12px 30px; clip-path: var(--cut-md);
}
.home-head .tab[aria-selected="true"] { background: var(--grad); color: #fff; border: none; }
.tabs .tab[aria-selected="true"] { border-bottom-color: var(--berry); }
.chip { text-transform: uppercase; letter-spacing: 0.06em; }
.chip[aria-pressed="true"] { border-color: var(--berry); background: rgba(255, 46, 136, 0.14); }
.progress > span { background: var(--grad); }
.like-btn.liked { color: #fff; background: var(--grad); border-color: transparent; }
.toast { border-color: var(--berry); }

/* ---------- Bannière d'accueil ---------- */
.hero-x {
  position: relative; overflow: hidden; margin-top: 8px; min-height: 460px;
  display: flex; align-items: center; border: 1px solid var(--border); clip-path: var(--cut-lg);
}
.hero-bg { position: absolute; inset: 0; background: url("/img/bg/port_evening.webp") center 40% / cover no-repeat; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 6, 13, 0.96) 0%, rgba(7, 6, 13, 0.82) 38%, rgba(7, 6, 13, 0.15) 75%, rgba(7, 6, 13, 0.35) 100%),
    linear-gradient(0deg, rgba(7, 6, 13, 0.9), transparent 45%);
}
.hero-copy { position: relative; z-index: 2; padding: 44px 40px; max-width: min(520px, 46%); }
.hero-copy .home-title { font-size: clamp(42px, 6vw, 76px); line-height: 0.95; margin: 14px 0 16px; text-align: left; }
.hero-copy .home-title span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy p { color: #cfc8ea; font-size: 17px; max-width: 440px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-roster {
  position: absolute; z-index: 1; right: 0; bottom: 0; height: 100%; width: 54%;
  display: flex; align-items: flex-end; justify-content: flex-end; padding-right: 10px; pointer-events: none;
}
.hero-roster img {
  height: min(25cqw, 86%); width: auto; margin-left: -3.2cqw;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.6));
  animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.3, 1) both; animation-delay: calc(var(--i) * 70ms);
}
.hero-roster img:first-child { margin-left: 0; }
.hero-roster img:nth-child(3), .hero-roster img:nth-child(5) { height: min(27cqw, 92%); z-index: 1; }
.hero-roster img:nth-child(4) { height: min(29.5cqw, 98%); z-index: 2; }
@keyframes rise { from { transform: translateY(24px); } to { transform: none; } }

/* ---------- Bandeau défilant ---------- */
.ticker { overflow: hidden; background: var(--grad); margin: 18px 0 0; transform: skewY(-1deg); }
.ticker-track { display: inline-flex; gap: 22px; padding: 10px 0; white-space: nowrap; animation: ticker 32s linear infinite; }
.ticker-track span { font: 700 15px var(--font-display); letter-spacing: 0.16em; text-transform: uppercase; color: #fff; }
.ticker-track i { color: rgba(255, 255, 255, 0.6); font-style: normal; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Galerie des filles ---------- */
.roster { margin-top: 40px; }
.section-head { margin-bottom: 18px; }
.section-head h2 { font-size: clamp(24px, 3vw, 34px); margin-top: 6px; }
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.roster-card {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden; display: flex; align-items: flex-end; justify-content: center;
  background: radial-gradient(circle at 50% 30%, rgba(179, 29, 255, 0.35), transparent 65%), var(--surface);
  border: 1px solid var(--border); clip-path: var(--cut-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.roster-card img { height: 92%; width: auto; max-width: none; transition: transform 0.25s ease; }
.roster-card span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 10px; text-align: center;
  font: 700 16px var(--font-display); letter-spacing: 0.16em; text-transform: uppercase; color: #fff;
  background: linear-gradient(0deg, rgba(7, 6, 13, 0.95), transparent);
}
.roster-card:hover { transform: translateY(-4px); border-color: var(--berry); text-decoration: none; }
.roster-card:hover img { transform: scale(1.05); }

/* ---------- Bannières de page (boutique, livre) ---------- */
.page-banner {
  position: relative; overflow: hidden; margin: 8px 0 22px; padding: 34px 32px; min-height: 150px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border: 1px solid var(--border); clip-path: var(--cut-lg);
}
.page-banner::before { content: ""; position: absolute; inset: 0; background: var(--banner) center / cover no-repeat; }
.page-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 6, 13, 0.95), rgba(7, 6, 13, 0.5)); }
.page-banner > * { position: relative; z-index: 1; }
.page-banner h1 { font-size: clamp(30px, 4.5vw, 48px); margin-top: 6px; }
.page-banner p { color: #cfc8ea; }

/* ---------- Profil : décor derrière l'avatar ---------- */
.p-top { position: relative; padding: 30px 20px; margin-top: 8px; overflow: hidden; border: 1px solid var(--border); clip-path: var(--cut-lg); }
.p-top::before { content: ""; position: absolute; inset: 0; background: url("/img/bg/phare_night.webp") center 35% / cover; }
.p-top::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7, 6, 13, 0.9), rgba(7, 6, 13, 0.35)); }
.p-top > * { position: relative; z-index: 1; }
.p-top .avatar { border-color: var(--berry); box-shadow: var(--glow-berry); }

/* ---------- Cartes à collectionner ---------- */
.tcard-art { border-radius: 0; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); }
.tcard.R .tcard-art { border-color: #9b6bff; }
.tcard.UR .tcard-art { border-color: var(--gold); }
.booster-pack { border-radius: 0; border-color: var(--berry); clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px)); }
.booster-pack .pack-label small { color: var(--sea); }
.flip-back { border-radius: 0; background: var(--grad); border-color: var(--gold); color: #fff; }
.post-photo, .post-img { border-radius: 0; }

@media (prefers-reduced-motion: reduce) {
  .ticker-track, .hero-roster img { animation: none; }
}
/* La bannière s'adapte à la largeur de la zone de contenu (la barre latérale en prend une partie) */
main.wrap { container-type: inline-size; }
@container (max-width: 820px) {
  .hero-x { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero-copy { padding: 28px 22px 8px; max-width: none; }
  .hero-roster { position: relative; width: 100%; height: 280px; justify-content: center; padding: 0; }
  .hero-roster img, .hero-roster img:nth-child(3), .hero-roster img:nth-child(5) { width: auto; height: 88%; max-height: none; margin-left: -34px; }
  .hero-roster img:nth-child(4) { width: auto; height: 100%; max-height: none; }
  .hero-roster img:nth-child(2) { margin-left: 0; }
  .hero-roster img:nth-child(1), .hero-roster img:nth-child(7) { display: none; }
  .hero-bg::after { background: linear-gradient(180deg, rgba(7, 6, 13, 0.95) 0%, rgba(7, 6, 13, 0.8) 50%, rgba(7, 6, 13, 0.3) 100%); }
}
@container (max-width: 480px) {
  .hero-roster { height: 230px; }
  .hero-roster img:nth-child(2), .hero-roster img:nth-child(6) { display: none; }
  .hero-roster img { margin-left: -26px; }
}

/* Bloc booster : suit la largeur de la zone de contenu */
.booster { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
.booster > div { min-width: 0; }
@container (max-width: 640px) { .booster { grid-template-columns: minmax(0, 1fr); } }

/* Logo Berry Games (pixel art : pas de lissage) */
.hero-logo { display: block; width: clamp(110px, 16cqw, 190px); height: auto; image-rendering: pixelated; filter: drop-shadow(0 8px 22px rgba(255, 46, 136, 0.35)); margin-bottom: 4px; }
.hero-copy .home-title { margin-top: 6px; margin-bottom: 0; }
.side-logo img { width: 34px; height: 34px; image-rendering: pixelated; }
@container (max-width: 820px) { .hero-copy { display: flex; align-items: center; gap: 18px; } .hero-logo { width: 96px; margin: 0; } }
