
:root{
  --bg:#020413;
  --panel:#07081e;
  --panel2:#0a0d29;
  --pink:#ff2bb8;
  --pink-soft:#ff79d7;
  --cyan:#00d7ff;
  --yellow:#ffd21c;
  --green:#28ef3f;
  --text:#f8f8ff;
  --muted:#b8b5c6;
  --line:#ff2bb8;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:#02030d;color:var(--text);font-family:Arial,Helvetica,sans-serif}
body{
  background:
    radial-gradient(circle at 7% 0%,rgba(255,43,184,.15),transparent 23%),
    radial-gradient(circle at 86% 8%,rgba(0,215,255,.10),transparent 24%),
    linear-gradient(180deg,#020310 0,#05051a 56%,#02030d 100%);
  overflow-x:auto;
}
body:before{
  content:"";position:fixed;inset:0;pointer-events:none;opacity:.22;
  background-image:
    radial-gradient(circle at 13% 13%,#ff2bb8 0 1px,transparent 2px),
    radial-gradient(circle at 82% 20%,#00d7ff 0 1px,transparent 2px),
    radial-gradient(circle at 56% 4%,#ffd21c 0 1px,transparent 2px);
  background-size:90px 90px,125px 125px,150px 150px;
}
.page-shell{width:min(1536px,100%);min-width:1180px;margin:0 auto;position:relative;min-height:100vh}
.page-shell:after{
  content:"";position:fixed;left:0;right:0;bottom:0;height:135px;pointer-events:none;opacity:.55;
  background:
    linear-gradient(rgba(255,43,184,.48) 1px,transparent 1px),
    linear-gradient(90deg,rgba(0,215,255,.35) 1px,transparent 1px);
  background-size:52px 28px;
  transform:perspective(330px) rotateX(66deg) translateY(68px);
  transform-origin:center bottom;
}
.header{
  height:142px;display:grid;grid-template-columns:390px 1fr 420px;align-items:center;gap:18px;
  padding:10px 18px 12px;border-bottom:1px solid rgba(0,215,255,.42);
  background:linear-gradient(180deg,rgba(2,3,15,.98),rgba(4,4,18,.96));
  position:relative;z-index:5;
}
.brand-area{height:100%;position:relative;display:flex;align-items:center}
.brand-logo{width:365px;max-height:132px;object-fit:contain;object-position:left center;display:block}
.header-deco{position:absolute;left:420px;top:0;width:250px;height:100px;object-fit:cover;opacity:.75;mix-blend-mode:screen;pointer-events:none}
.nav{height:58px;border:1px solid rgba(255,43,184,.55);border-radius:6px;overflow:hidden;display:grid;grid-template-columns:repeat(5,1fr);box-shadow:0 0 20px rgba(255,43,184,.14)}
.nav-item{
  background:rgba(6,7,24,.92);color:#fff;border:0;border-right:1px solid #591251;
  font-weight:700;cursor:pointer;font-size:14px;padding:0 10px;
}
.nav-item:last-child{border-right:0}
.nav-item.active,.nav-item:hover{background:linear-gradient(180deg,#2a0d30,#08091e);box-shadow:inset 0 -3px var(--pink);color:#ffb6e7}

.profile{
  height:96px;border:1px solid var(--pink);border-radius:9px;display:grid;grid-template-columns:64px 1fr 58px;align-items:center;
  gap:12px;padding:10px 12px;background:linear-gradient(135deg,rgba(19,6,33,.96),rgba(6,8,25,.96));
  box-shadow:0 0 18px rgba(255,43,184,.30);
}
.avatar-wrap{width:58px;height:58px;display:flex;align-items:center;justify-content:center}
.avatar-ring{
  width:58px;height:58px;border-radius:50%;padding:3px;
  background:linear-gradient(135deg,var(--pink),var(--cyan));
  flex:0 0 58px;
}
.avatar{
  width:100%;height:100%;border-radius:50%;display:grid;place-items:center;
  background:linear-gradient(145deg,#192853,#07101f);
  font-size:20px;font-weight:900;
}
.profile-copy{min-width:0}
.profile-name{font-size:19px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crown{color:var(--yellow);margin-left:7px}
.vote-line{display:flex;align-items:baseline;gap:5px;margin-top:8px;white-space:nowrap}
.vote-line strong{font-size:24px;color:#13efad}
.vote-line span{font-weight:700}
.vote-line em{font-style:normal;font-size:13px;margin-left:4px}
.profile-action{
  width:46px;height:46px;border:1px solid var(--pink);background:#12061a;color:#ff7bd4;border-radius:6px;
  font-size:22px;cursor:pointer;box-shadow:0 0 12px rgba(255,43,184,.22)
}

.content-layout{display:grid;grid-template-columns:265px 1fr;gap:18px;padding:26px 18px 12px;position:relative;z-index:2}
.sidebar{display:flex;flex-direction:column;gap:20px}
.side-panel{border:1px solid var(--pink);border-radius:9px;background:rgba(6,7,25,.95);overflow:hidden;box-shadow:0 0 16px rgba(255,43,184,.17)}
.side-title{padding:14px 16px;color:#ff87da;font-weight:900;font-size:17px;border-bottom:1px solid #5c155d}
.family-btn,.console-btn{display:block;width:100%;text-align:left;color:#fff;border:0;background:transparent;cursor:pointer}
.family-btn{padding:13px 16px;font-weight:800;border-bottom:1px solid #241f3b;font-size:14px}
.family-btn:hover{background:#12142a}
.console-list{display:none}
.console-list.open{display:block}
.console-btn{padding:10px 15px 10px 42px;color:#eee;font-size:14px}
.console-btn.active{background:linear-gradient(90deg,#7b126d,#231139);color:#ffb8e9}
.community-panel{padding-bottom:8px}
.community-panel a{display:flex;align-items:center;gap:11px;padding:8px 16px;color:#fff;text-decoration:none;font-size:14px}
.community-panel a span{width:18px;color:var(--pink)}
.community-panel a:hover{color:#ff93de}

.main{min-width:0}
.page{display:none}
.page.active{display:block}

.top-panel{
  min-height:168px;border:1px solid var(--pink);border-radius:9px;background:rgba(6,7,25,.95);
  padding:14px 94px 12px 18px;position:relative;box-shadow:0 0 16px rgba(255,43,184,.15);
}
.top-heading{text-align:center;font-size:25px;font-weight:900;margin-bottom:8px;text-shadow:0 0 10px rgba(255,255,255,.08)}
.top-heading span{color:var(--yellow);margin:0 6px}
.top-grid{display:grid;grid-template-columns:repeat(3,1fr)}
.top-card{display:grid;grid-template-columns:54px 102px 1fr;gap:14px;align-items:center;padding:8px 18px;border-right:1px solid #8d145d}
.top-card:last-child{border-right:0}
.rank{font-size:50px;font-weight:900;color:var(--yellow);text-shadow:0 0 13px var(--yellow)}
.top-card:nth-child(2) .rank{color:var(--cyan);text-shadow:0 0 13px var(--cyan)}
.top-card:nth-child(3) .rank{color:var(--pink);text-shadow:0 0 13px var(--pink)}
.mini-cover{width:102px;height:102px;border:1px solid #425e8c;border-radius:4px;overflow:hidden;background:#10142f;display:grid;place-items:center;text-align:center;font-size:11px}
.mini-cover img{width:100%;height:100%;object-fit:cover}
.top-card strong{font-size:19px}
.badge{display:inline-block;border:1px solid var(--pink);color:#ff72d0;padding:2px 6px;border-radius:4px;margin-top:6px;font-size:12px}
.top-votes{color:var(--yellow);font-weight:800;margin-top:8px}
.top-full-btn{
  position:absolute;right:-1px;top:51px;width:73px;height:94px;border:1px solid var(--pink);background:#12071a;color:#ff7fd7;
  border-radius:6px;font-weight:800;line-height:1.25;cursor:pointer
}

.catalog-panel{
  margin-top:16px;border:1px solid var(--pink);border-radius:9px;background:rgba(6,7,25,.96);padding:14px;
  box-shadow:0 0 17px rgba(255,43,184,.15)
}
.catalog-panel.standalone{margin-top:0}
.catalog-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:14px}
.catalog-title-wrap{display:flex;align-items:center;gap:10px;position:relative}
.platform-icon{font-size:34px;color:var(--cyan);text-shadow:0 0 11px var(--cyan)}
.catalog-title-wrap h1{margin:0;font-size:31px;color:#ff2bb8;text-shadow:0 0 11px rgba(255,43,184,.45)}
.tiny-deco{color:#ff49c6;font-size:30px;transform:rotate(-10deg);margin-left:8px}
.catalog-title-wrap:after{
  content:"";height:2px;width:380px;background:linear-gradient(90deg,#ff2bb8,#00d7ff,transparent);margin-left:10px;
  box-shadow:0 0 8px rgba(0,215,255,.4)
}
.catalog-tools{display:flex;gap:10px;align-items:center}
.search-box{height:38px;border:1px solid #3a4677;border-radius:5px;display:flex;align-items:center;background:#05071a}
.search-box input{width:240px;background:transparent;border:0;outline:none;color:#fff;padding:0 12px;font-size:13px}
.search-box span{padding:0 12px;color:#ddd;font-size:20px}
.search-box.wide{width:380px}.search-box.wide input{width:100%}
.filter-btn{height:38px;border:1px solid var(--pink);background:#110719;color:#ff74d1;border-radius:5px;padding:0 18px;font-weight:800;cursor:pointer}

.cards-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:12px}
.game-card{
  border:1px solid #1f86c2;border-radius:7px;overflow:hidden;background:#090b24;position:relative;contain:layout paint style;
  transition:transform .12s linear,border-color .12s linear
}
.game-card:hover{transform:translateY(-3px);border-color:var(--pink)}
.cover{height:126px;background:linear-gradient(145deg,#19285b,#090b22);overflow:hidden;display:grid;place-items:center;text-align:center;font-weight:900}
.cover img{width:100%;height:100%;object-fit:cover;display:block}
.game-body{padding:10px 11px 10px;background:linear-gradient(180deg,#0d102d,#090b22)}
.game-title{font-size:16px;font-weight:900;line-height:1.15;min-height:37px}
.game-meta{font-size:12px;color:#d4cedc;margin-top:6px}
.vote-row{display:flex;justify-content:space-between;color:#ff64cb;font-size:12px;margin-top:7px}
.vote-btn,.done-btn{width:100%;height:34px;border:1px solid var(--pink);border-radius:4px;background:#13071a;color:#ff7dd5;font-weight:900;margin-top:8px;cursor:pointer}
.vote-btn.voted{background:#661351;color:#fff}
.done-btn{border-color:#2de18d;color:#7bf1b9}

.ranking-list{display:flex;flex-direction:column;gap:8px}
.rank-line{display:grid;grid-template-columns:60px 1fr 110px;gap:12px;padding:13px;border:1px solid #282d5a;border-radius:6px;background:#090b24}
.rank-line b{color:var(--yellow)}
.muted{color:var(--muted)}
.hidden{display:none}
.about{line-height:1.6}

.footer{
  min-height:48px;display:grid;grid-template-columns:1fr 1.4fr 1fr;align-items:center;padding:0 18px 8px;font-size:12px;color:#aaa5bb;
  position:relative;z-index:2
}
.footer strong{text-align:center;color:#eee;font-size:14px}

@media(max-width:1280px){
  .page-shell{min-width:1100px}
  .header{grid-template-columns:300px 1fr 330px}
  .brand-logo{width:300px}
  .cards-grid{grid-template-columns:repeat(5,1fr)}
  .top-card{grid-template-columns:44px 82px 1fr}
  .mini-cover{width:82px;height:82px}
}

/* =========================
   V3.1 — header transparent + logo néon intégré
   ========================= */
.header{
  background:transparent !important;
  border-bottom:1px solid rgba(0,215,255,.24) !important;
  box-shadow:none !important;
  overflow:visible;
}
.brand-area{
  overflow:visible;
  height:142px;
}
.brand-logo{
  width:390px;
  max-height:138px;
  object-fit:contain;
  object-position:left center;
  filter:
    drop-shadow(0 0 5px rgba(255,80,205,.70))
    drop-shadow(0 0 13px rgba(255,28,183,.40))
    drop-shadow(0 0 18px rgba(255,210,28,.15));
}
.header-deco{
  opacity:.72;
  mix-blend-mode:screen;
  filter:
    drop-shadow(0 0 8px rgba(255,43,184,.35))
    drop-shadow(0 0 11px rgba(0,215,255,.22));
}

/* Keep the nav and profile as functional HTML, but let the global background show through. */
.nav{
  background:rgba(5,5,22,.50) !important;
  backdrop-filter:blur(5px);
}
.nav-item{
  background:rgba(5,6,24,.62) !important;
}
.nav-item.active,.nav-item:hover{
  background:linear-gradient(180deg,rgba(62,9,57,.72),rgba(7,7,28,.68)) !important;
}
.profile{
  background:linear-gradient(135deg,rgba(26,7,40,.67),rgba(5,8,27,.70)) !important;
  backdrop-filter:blur(5px);
}

/* Avatar never squashes when logged in. */
.avatar-wrap{
  width:58px !important;
  min-width:58px !important;
  height:58px !important;
  flex:0 0 58px !important;
}
.avatar-ring{
  width:58px !important;
  min-width:58px !important;
  height:58px !important;
  flex:0 0 58px !important;
  aspect-ratio:1/1;
}
.avatar{
  width:52px !important;
  height:52px !important;
  min-width:52px !important;
  min-height:52px !important;
  aspect-ratio:1/1;
}
.profile-copy{
  min-width:0;
  overflow:hidden;
}
.profile-name{
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}

/* =========================
   V3.2 — logos constructeurs + header allégé
   ========================= */
.header-deco{display:none!important}

.family-btn{
  display:flex!important;
  align-items:center;
  gap:10px;
  min-height:46px;
}
.maker-logo{
  display:inline-block;
  flex:0 0 auto;
  object-fit:contain;
  vertical-align:middle;
}
.maker-playstation{
  width:28px;
  height:24px;
}
.maker-nintendo{
  width:62px;
  height:22px;
}
.maker-xbox{
  width:27px;
  height:27px;
}
.maker-sega{
  width:50px;
  height:22px;
}
.maker-pc{
  width:25px;
  height:25px;
  display:inline-grid;
  place-items:center;
  color:#00d7ff;
  border:1px solid #00d7ff;
  border-radius:3px;
  font-size:13px;
}

/* V3.3 — sidebar plateformes en texte uniquement */
.family-btn{
  display:block!important;
  padding-left:16px!important;
}
.maker-logo,.maker-pc{
  display:none!important;
}

/* V3.4 — PC ouvre directement son catalogue */
.family-btn.active{
  background:linear-gradient(90deg,#7b126d,#231139);
  color:#ffb8e9;
}

/* V3.5 — liens communauté réels */
.community-panel a{
  cursor:pointer;
}
.community-panel a:focus-visible{
  outline:1px solid #ff2bb8;
  outline-offset:-2px;
  color:#ff93de;
}

/* V3.6 — recherche globale dans le header */
.header{
  grid-template-columns:330px minmax(500px,1fr) 230px 350px!important;
  gap:12px!important;
}
.brand-logo{
  width:320px!important;
}
.global-search{
  width:230px;
  height:42px;
  justify-self:center;
  border-color:rgba(0,215,255,.55);
  box-shadow:0 0 10px rgba(0,215,255,.10);
}
.global-search input{
  width:185px!important;
}
@media(max-width:1280px){
  .header{
    grid-template-columns:270px minmax(440px,1fr) 200px 300px!important;
  }
  .brand-logo{width:260px!important}
  .global-search{width:200px}
  .global-search input{width:155px!important}
}

/* V3.8 — tri A→Z + jaquettes frontales propres */
.cover{
  height:220px!important;
  padding:7px!important;
  background:#050714!important;
}
.cover img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  background:#050714!important;
}
.mini-cover{
  background:#050714!important;
}
.mini-cover img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
}
.cover-missing{
  display:grid!important;
  place-items:center!important;
  color:#8f8aa2!important;
  font-size:12px!important;
  text-align:center!important;
  padding:12px!important;
}

/* V3.9 — bouton Top complet corrigé */
.top-panel{
  padding-right:128px!important;
}
.top-full-btn{
  right:12px!important;
  top:54px!important;
  width:102px!important;
  height:92px!important;
  padding:8px 7px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  line-height:1.18!important;
  font-size:12px!important;
  text-align:center!important;
  white-space:normal!important;
  overflow:hidden!important;
}
.top-full-btn .top-plus{
  display:block;
  font-size:25px;
  line-height:20px;
  color:#ffd21c;
  font-weight:900;
  text-shadow:0 0 8px rgba(255,210,28,.55);
}

/* V3.20 — année + genre sur les vignettes */
.game-info{
  margin-top:7px!important;
  min-height:18px;
  color:#aaa6b7!important;
  font-size:12px!important;
  font-weight:700;
  letter-spacing:.15px;
  line-height:1.25;
}


/* V3.22 — ouverture/fermeture fluide des sous-menus plateformes */
.console-list{
  display:grid!important;
  grid-template-rows:0fr;
  opacity:0;
  transform:translateY(-6px);
  overflow:hidden;
  visibility:hidden;
  transition:
    grid-template-rows .28s ease,
    opacity .20s ease,
    transform .28s ease,
    visibility 0s linear .28s;
}

/* Wrapper implicite : les boutons restent dans le flux pendant l'animation */
.console-list > *{
  min-height:0;
}

.console-list.open{
  grid-template-rows:1fr;
  opacity:1;
  transform:translateY(0);
  visibility:visible;
  transition:
    grid-template-rows .30s ease,
    opacity .22s ease .04s,
    transform .30s ease,
    visibility 0s linear 0s;
}

/* Le max-height permet aussi une transition fiable avec la structure actuelle */
.console-list{
  max-height:0;
}
.console-list.open{
  max-height:520px;
}

@media (prefers-reduced-motion: reduce){
  .console-list,
  .console-list.open{
    transition:none!important;
    transform:none!important;
  }
}


/* V3.23 — animation accordéon réellement visible */
.console-list{
  display:block!important;
  max-height:0!important;
  opacity:0!important;
  overflow:hidden!important;
  transform:translateY(-8px)!important;
  visibility:hidden;
  transition:
    max-height .28s cubic-bezier(.4,0,.2,1),
    opacity .20s ease,
    transform .28s cubic-bezier(.4,0,.2,1),
    visibility 0s linear .28s!important;
}

.console-list.open{
  max-height:520px!important;
  opacity:1!important;
  transform:translateY(0)!important;
  visibility:visible;
  transition:
    max-height .30s cubic-bezier(.4,0,.2,1),
    opacity .22s ease .03s,
    transform .30s cubic-bezier(.4,0,.2,1),
    visibility 0s!important;
}

/* Fermeture jouée sur le DOM existant avant son retrait */
.console-list.closing{
  max-height:0!important;
  opacity:0!important;
  transform:translateY(-8px)!important;
  visibility:visible!important;
}


/* V3.26 — vraie connexion Twitch (prototype local) */
.avatar-ring{
  position:relative;
  overflow:hidden;
}
.avatar-img{
  width:100%!important;
  height:100%!important;
  min-width:100%!important;
  min-height:100%!important;
  object-fit:cover!important;
  border-radius:50%;
  display:block;
}
.avatar-img.hidden,
.avatar.hidden{
  display:none!important;
}
.twitch-status{
  margin-top:2px;
  color:#a9a4b7;
  font-size:11px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.profile-action{
  font-size:12px;
  font-weight:900;
  min-width:46px;
}
.profile.connected .profile-action{
  font-size:21px;
}


/* =========================
   V3.30 — Twitch corrigé
   ========================= */
.profile{
  grid-template-columns:58px minmax(0,1fr) 78px!important;
}
.profile-action{
  min-width:78px!important;
  width:78px!important;
  height:46px!important;
  padding:0 8px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:clip!important;
  font-size:11px!important;
  line-height:1!important;
  letter-spacing:.02em;
  flex:0 0 78px!important;
}
.profile.connected .profile-action{
  min-width:46px!important;
  width:46px!important;
  flex-basis:46px!important;
  padding:0!important;
  font-size:25px!important;
  font-family:"Segoe UI Symbol","Arial Unicode MS",Arial,sans-serif!important;
  color:#ff7bd4!important;
}
#buildVersion{
  color:#00d7ff;
  margin-left:8px;
  font-size:11px;
}


/* V3.31 — Top vide + vote sans rechargement des jaquettes */
.top-empty{
  grid-column:1/-1;
  min-height:92px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  text-align:center;
  color:#aaa6b7;
}
.top-empty strong{
  color:#ff7bd4;
  font-size:16px;
}
.top-empty span{
  font-size:12px;
}
.top-empty.full{
  min-height:140px;
}


/* V3.32 — vote directement depuis le Top */
.top-card-copy{
  min-width:0;
}
.top-vote-btn{
  margin-top:8px;
  min-width:76px;
  height:28px;
  padding:0 10px;
  border:1px solid var(--pink);
  border-radius:4px;
  background:#13071a;
  color:#ff7dd5;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}
.top-vote-btn:hover{
  background:#35102e;
}
.top-vote-btn.voted,
.top-list-vote-btn.voted{
  background:#661351;
  color:#fff;
}

.rank-line{
  grid-template-columns:54px minmax(0,1fr) 105px 92px!important;
  align-items:center;
}
.top-list-vote-btn{
  width:88px;
  height:32px;
  border:1px solid var(--pink);
  border-radius:4px;
  background:#13071a;
  color:#ff7dd5;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}
.top-list-vote-btn:hover{
  background:#35102e;
}


/* V3.34 — accueil */
.home-intro{margin:0 0 22px;padding:24px 26px;border:1px solid rgba(255,105,205,.28);border-radius:8px;background:linear-gradient(135deg,rgba(18,8,28,.92),rgba(8,14,26,.9));box-shadow:0 0 26px rgba(255,72,190,.06)}
.home-intro-kicker{margin-bottom:7px;color:#ff7bd4;font-size:11px;font-weight:900;letter-spacing:.14em}
.home-intro h2{margin:0 0 9px;color:#fff;font-size:24px;line-height:1.15}
.home-intro p{max-width:920px;margin:0;color:#b9b4c6;font-size:13px;line-height:1.65}.home-intro p strong{color:#fff}
.home-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:18px}
.home-steps>div{display:flex;align-items:center;gap:10px;min-height:54px;padding:9px 11px;border:1px solid rgba(0,215,255,.16);border-radius:6px;background:rgba(4,9,18,.52)}
.home-steps b{color:#00d7ff;font-size:16px}.home-steps span{color:#ded9e7;font-size:11px;font-weight:800;line-height:1.3}
@media(max-width:900px){.home-steps{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.home-steps{grid-template-columns:1fr}.home-intro{padding:18px}.home-intro h2{font-size:20px}}


/* V3.37 — accueil & Top stable */
.home-intro-kicker{display:none!important}
