/* PAGE
   (.page/.page__card/.page__header/.page__title/.page__back
   vivent dans main.css — ici juste la largeur specifique) */
.page{ --page-w: 1080px; }

.page__meta{
  max-width: 620px;
  line-height: 1.4;
}

.games{
  padding: 18px;
}

.games__grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 22px;
  align-items: start;
}

/* =========================
   CARTE JEU
========================= */
.gameCard{
  position: relative;
  text-decoration: none;
  color: rgba(219,219,219,.95);

  display: grid;
  justify-items: center;
  gap: 12px;

  padding: 12px 8px 16px;

  border-radius: 18px;
  background: rgba(12,15,16,.18);
  border: 1px solid rgba(219,219,219,.06);

  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity .35s ease,
    transform .35s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    filter .18s ease;
}
.gameCard.is-in{ opacity: 1; transform: translateY(0); }

.gameCard:hover{
  border-color: rgba(61,206,97,.22);
  box-shadow: 0 0 0 1px rgba(61,206,97,.10), 0 16px 40px rgba(0,0,0,.30);
  filter: saturate(1.06);
}

/* Favori : la carte entiere ressort un peu, en plus de l'etoile remplie */
.gameCard.is-favorite{
  border-color: rgba(61,206,97,.28);
  box-shadow: 0 0 0 1px rgba(61,206,97,.10), 0 16px 40px rgba(0,0,0,.30);
}

/* =========================
   BOUTON FAVORI
   En dehors de .gameCard__badge (qui a overflow:hidden pour le cercle
   d'image) : positionne sur toute la carte pour deborder proprement dans
   le coin, sans se faire couper par le cercle.
========================= */
.gameCard__fav{
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;

  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;

  border-radius: 999px;
  border: 1px solid rgba(219,219,219,.14);
  background: rgba(12,15,16,.68);
  backdrop-filter: blur(8px);
  cursor: pointer;

  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.gameCard__fav:hover{
  transform: scale(1.10);
  border-color: rgba(61,206,97,.45);
}

.gameCard__favIcon{
  width: 16px;
  height: 16px;
  fill: none;
  stroke: rgba(219,219,219,.65);
  stroke-width: 1.6;
  stroke-linejoin: round;
  transition: fill .15s ease, stroke .15s ease;
}

.gameCard__fav[aria-pressed="true"]{
  border-color: rgba(61,206,97,.55);
  box-shadow: 0 0 14px rgba(61,206,97,.25);
}
.gameCard__fav[aria-pressed="true"] .gameCard__favIcon{
  fill: var(--green);
  stroke: var(--green);
}

/* Cercle image (comme ghost__badge / equip__badge) */
.gameCard__badge{
  position: relative;
  width: 230px;
  height: 230px;
  border-radius: 999px;
  padding: 14px;
  display: grid;
  place-items: center;

  background: radial-gradient(circle at 50% 50%, rgba(12,15,16,.62), rgba(12,15,16,.35));
  border: 1px solid rgba(219,219,219,.10);
  box-shadow: 0 16px 44px rgba(0,0,0,.42);
  overflow: hidden;
}

.gameCard__badge::after{
  content:"";
  position:absolute;
  inset: -4px;
  border-radius: 999px;
  border: 2px solid rgba(82,56,119,.60);
  box-shadow:
    0 0 0 1px rgba(82,56,119,.22),
    0 0 20px rgba(82,56,119,.16);
  pointer-events:none;
}

.gameCard__img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 18px rgba(61,206,97,.10));
  user-select: none;
  -webkit-user-drag: none;
  transition: transform .35s ease;
}
.gameCard:hover .gameCard__img{ transform: scale(1.05); }

.gameCard__tag{
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(61,206,97,.50);
  background: rgba(12,15,16,.62);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 30px rgba(0,0,0,.42);

  color: var(--green);
  font-size: 11px;
  letter-spacing: .10em;
  white-space: nowrap;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 980px){
  .games__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gameCard__badge{ width: 212px; height: 212px; }
}

@media (max-width: 560px){
  .games{ padding: 14px; }
  .games__grid{ grid-template-columns: 1fr; }
  .gameCard__badge{ width: 230px; height: 230px; }
}

@media (prefers-reduced-motion: reduce){
  .gameCard{ transition: opacity .01s linear, transform .01s linear; }
  .gameCard__img{ transition: none; }
  .gameCard__fav{ transition: none; }
}
