/*
 * Page Jeux.
 *
 * Les boutons restent fondés sur le composant global .button et son cadre
 * continu défini dans borders.css.
 */

.games-catalogue__heading {
  max-width: 830px;
  margin-bottom: 34px;
}

.games-catalogue__heading h2,
.games-discovery__heading h2,
.steam-weekly__header h2 {
  margin: 8px 0 14px;
  font-size: clamp(2.15rem, 4vw, 4rem);
  line-height: .98;
}

.games-catalogue__heading p,
.games-discovery__heading .section-heading > p,
.steam-weekly__header .section-heading > p {
  max-width: 720px;
  color: #b8bbcf;
  font-size: clamp(.94rem, 1.2vw, 1.08rem);
  line-height: 1.7;
}

.games-catalogue__points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 34px;
}

.games-catalogue-point {
  display: grid;
  min-width: 0;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 17px 18px;
  border-bottom: 1px solid rgba(111, 76, 239, .25);
  background: linear-gradient(112deg, rgba(15, 17, 54, .7), rgba(5, 8, 29, .38));
}

.games-catalogue-point__icon {
  --az-cut: 6px;
  --az-border-start: #7845f2;
  --az-border-end: #d52bce;
  --az-frame-fill: linear-gradient(145deg, rgba(26, 17, 75, .98), rgba(8, 9, 34, .98));
  display: grid;
  width: 48px;
  height: 48px;
  color: #e8dcff;
  filter: drop-shadow(0 0 7px rgba(139, 68, 255, .25));
  place-items: center;
}

.games-catalogue-point__icon .icon {
  width: 20px;
  height: 20px;
}

.games-catalogue-point h3 {
  margin: 2px 0 7px;
  font-size: .86rem;
  letter-spacing: .035em;
}

.games-catalogue-point p {
  margin: 0;
  color: #9297af;
  font-size: .72rem;
  line-height: 1.55;
}

.games-catalogue .game-card__content {
  min-height: 330px;
}

.games-page .games-catalogue .game-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.games-page .games-catalogue .game-card__visual {
  aspect-ratio: 16 / 9;
}

.game-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 15px;
}

.game-card__meta li {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  color: color-mix(in srgb, var(--game-accent), #e4e5ef 66%);
  background: color-mix(in srgb, var(--game-accent), transparent 92%);
  font-size: .58rem;
  letter-spacing: .025em;
  line-height: 1.2;
}

.game-card__meta .icon {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
}

.games-page .game-card .button--game {
  --az-cut: 7px;
  --az-border-start: #7845f2;
  --az-border-end: #b32ad9;
  display: grid;
  width: 100%;
  min-height: 54px;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  justify-content: stretch;
  gap: 10px;
  padding: 0 14px 0 9px;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--game-accent), transparent 58%));
  font-family: var(--az-font-display);
  font-size: .67rem;
  font-weight: 600;
  letter-spacing: .075em;
}

.games-page .game-card .button--game::before {
  background:
    radial-gradient(circle at 10% 50%, color-mix(in srgb, var(--game-accent), transparent 78%), transparent 32%),
    linear-gradient(108deg, rgba(19, 13, 55, .99), rgba(7, 8, 29, .99) 72%);
  box-shadow: inset 0 0 22px color-mix(in srgb, var(--game-accent), transparent 92%);
}

.button--game__service {
  display: grid;
  width: 34px;
  height: 32px;
  color: color-mix(in srgb, var(--game-accent), #fff 30%);
  border-right: 1px solid color-mix(in srgb, var(--game-accent), transparent 72%);
  place-items: center;
}

.button--game__service .icon,
.button--game__service .social-icon {
  width: 17px;
  height: 17px;
  filter: drop-shadow(0 0 5px currentColor);
}

.games-page .game-card .button--game__label {
  min-width: 0;
  text-align: left;
  overflow-wrap: anywhere;
}

.games-page .game-card .button--game > .icon:last-child {
  width: 16px;
  height: 16px;
  color: #fff;
  transition: transform .22s ease;
}

.games-page .game-card .button--game:hover {
  transform: translateY(-2px);
  filter: brightness(1.14) drop-shadow(0 7px 15px color-mix(in srgb, var(--game-accent), transparent 68%));
}

.games-page .game-card .button--game:hover > .icon:last-child {
  transform: translateX(3px);
}

.games-discovery {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.games-discovery::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 84% 20%, rgba(52, 137, 255, .16), transparent 24%),
    radial-gradient(circle at 12% 80%, rgba(178, 35, 223, .12), transparent 28%),
    linear-gradient(180deg, rgba(5, 9, 30, .3), rgba(9, 12, 41, .74), rgba(4, 6, 24, .35));
}

.games-discovery__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 34px;
}

.games-discovery__heading .section-heading {
  max-width: 800px;
}

.games-discovery__all {
  min-width: 260px;
  flex: 0 0 auto;
}

.games-discovery__all .social-icon {
  width: 19px;
  height: 19px;
  color: #70b9ff;
}

.steam-discovery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.steam-discovery-card {
  --az-cut: 9px;
  --az-border-start: rgba(65, 154, 255, .75);
  --az-border-end: rgba(183, 50, 220, .75);
  --az-frame-fill: linear-gradient(152deg, rgba(11, 18, 53, .99), rgba(5, 8, 29, .99));
  overflow: hidden;
  display: flex;
  min-width: 0;
  flex-direction: column;
  filter: drop-shadow(0 13px 28px rgba(0, 0, 0, .2));
}

.steam-discovery-card__visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 616 / 353;
  margin: 0;
  background: radial-gradient(circle, rgba(61, 125, 255, .32), transparent 48%), #080d2a;
}

.steam-discovery-card__visual::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, transparent 44%, rgba(5, 8, 28, .76));
}

.steam-discovery-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.steam-discovery-card:hover .steam-discovery-card__visual img {
  transform: scale(1.035);
}

.steam-discovery-card__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  color: #70b9ff;
  place-items: center;
}

.steam-discovery-card__placeholder .icon {
  width: 44px;
  height: 44px;
}

.steam-discovery-card__source {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  color: #e9f5ff;
  background: rgba(6, 13, 37, .86);
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.steam-discovery-card__source .social-icon {
  width: 13px;
  height: 13px;
  color: #70b9ff;
}

.steam-discovery-card__body {
  display: flex;
  min-height: 245px;
  flex: 1;
  flex-direction: column;
  padding: 19px;
}

.steam-discovery-card__meta {
  color: #70b9ff;
  font-size: .59rem;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.steam-discovery-card h3 {
  margin: 10px 0 9px;
  font-size: clamp(1.05rem, 1.5vw, 1.32rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.steam-discovery-card p {
  flex: 1;
  margin: 0 0 17px;
  color: #aeb3ca;
  font-size: .72rem;
  line-height: 1.55;
}

.steam-discovery-card__button {
  width: 100%;
  min-height: 46px;
  justify-content: space-between;
  padding-inline: 14px;
  font-size: .64rem;
}

.steam-discovery-card__button .icon {
  width: 15px;
  height: 15px;
}

.games-discovery__updated {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin: 16px 2px 0;
  color: #777f9f;
  font-size: .63rem;
}

.games-discovery__updated .icon {
  width: 14px;
  height: 14px;
  color: #70b9ff;
}

.steam-weekly {
  position: relative;
}

.steam-weekly__panel {
  --az-cut: 14px;
  --az-border-start: rgba(99, 167, 255, .82);
  --az-border-end: rgba(207, 42, 203, .78);
  --az-frame-fill:
    radial-gradient(circle at 92% 0, rgba(48, 139, 255, .15), transparent 27%),
    linear-gradient(145deg, rgba(11, 17, 51, .98), rgba(5, 7, 26, .99));
  padding: clamp(22px, 3.5vw, 42px);
  filter: drop-shadow(0 20px 44px rgba(0, 0, 0, .24));
}

.steam-weekly__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}

.steam-weekly__header .section-heading {
  max-width: 760px;
}

.steam-weekly__period {
  --az-cut: 7px;
  --az-border-start: rgba(71, 160, 255, .65);
  --az-border-end: rgba(157, 73, 232, .65);
  --az-frame-fill: rgba(10, 17, 49, .86);
  display: grid;
  min-width: 250px;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.steam-weekly__period > span {
  display: grid;
  width: 40px;
  height: 40px;
  color: #7dc3ff;
  background: rgba(66, 151, 255, .1);
  place-items: center;
}

.steam-weekly__period .icon {
  width: 19px;
  height: 19px;
}

.steam-weekly__period small,
.steam-weekly__period strong {
  display: block;
}

.steam-weekly__period small {
  margin-bottom: 4px;
  color: #7f89a8;
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.steam-weekly__period strong {
  color: #f1f5ff;
  font-size: .72rem;
}

.steam-weekly__legend {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px 130px 150px;
  gap: 14px;
  padding: 0 0 9px 216px;
  color: #69728f;
  font-size: .52rem;
  font-weight: 700;
  letter-spacing: .095em;
  text-transform: uppercase;
}

.steam-weekly__legend span:first-child {
  visibility: hidden;
}

.steam-weekly-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.steam-weekly-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 54px 132px minmax(160px, 1fr) 86px 130px 150px;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid rgba(104, 123, 182, .19);
  transition: background .22s ease, transform .22s ease;
}

.steam-weekly-row:hover {
  background: linear-gradient(90deg, rgba(72, 143, 255, .055), rgba(178, 52, 215, .04));
  transform: translateX(3px);
}

.steam-weekly-row__rank {
  display: flex;
  align-items: baseline;
  color: #f2f5ff;
  font-family: var(--az-font-display);
  font-size: 1.36rem;
  font-weight: 700;
  letter-spacing: -.04em;
}

.steam-weekly-row__rank small {
  margin-right: 2px;
  color: #618fc8;
  font-size: .7rem;
}

.steam-weekly-row__visual {
  overflow: hidden;
  display: grid;
  aspect-ratio: 616 / 353;
  margin: 0;
  color: #72baff;
  background: rgba(40, 87, 155, .17);
  place-items: center;
}

.steam-weekly-row__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.steam-weekly-row__visual .icon {
  width: 25px;
  height: 25px;
}

.steam-weekly-row__game {
  min-width: 0;
}

.steam-weekly-row__game > span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #6faeea;
  font-size: .52rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.steam-weekly-row__game .social-icon {
  width: 12px;
  height: 12px;
}

.steam-weekly-row__game h3 {
  overflow: hidden;
  margin: 7px 0 0;
  font-size: clamp(.82rem, 1.15vw, 1.02rem);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.steam-weekly-row__movement {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border: 1px solid currentColor;
  font-size: .59rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.steam-weekly-row__movement--up {
  color: #63e6b1;
  background: rgba(54, 201, 142, .08);
}

.steam-weekly-row__movement--down {
  color: #ff8299;
  background: rgba(255, 81, 112, .08);
}

.steam-weekly-row__movement--stable {
  color: #8ea4c8;
  background: rgba(105, 130, 172, .08);
}

.steam-weekly-row__movement--new {
  color: #ffb545;
  background: rgba(255, 166, 32, .08);
}

.steam-weekly-row__movement--unknown {
  color: #707a98;
}

.steam-weekly-row__weeks {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #9098b1;
  font-size: .61rem;
  line-height: 1.35;
}

.steam-weekly-row__weeks .icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: #6faeea;
}

.steam-weekly-row__button {
  min-height: 42px;
  justify-content: space-between;
  padding-inline: 13px;
  font-size: .58rem;
}

.steam-weekly-row__button .icon {
  width: 14px;
  height: 14px;
}

.steam-weekly__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding-top: 20px;
  border-top: 1px solid rgba(104, 123, 182, .19);
}

.steam-weekly__footer p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #79829f;
  font-size: .61rem;
}

.steam-weekly__footer p .icon {
  width: 15px;
  height: 15px;
  color: #70b9ff;
}

.steam-weekly__all {
  min-width: 260px;
}

.steam-weekly__all .social-icon {
  width: 19px;
  height: 19px;
  color: #dff2ff;
}

@media (max-width: 1024px) {
  .games-catalogue__points {
    grid-template-columns: 1fr;
  }

  .games-catalogue-point {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .games-catalogue-point__icon {
    width: 44px;
    height: 44px;
  }

  .games-page .games-catalogue .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .games-page .games-catalogue .game-card:last-child:nth-child(odd) {
    width: calc(50% - 8px);
    grid-column: 1 / -1;
    justify-self: center;
  }

  .games-discovery__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .games-discovery__all {
    min-width: 0;
  }

  .steam-weekly__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .steam-weekly__legend {
    display: none;
  }

  .steam-weekly-row {
    grid-template-columns: 50px 112px minmax(140px, 1fr) 76px 112px 128px;
    gap: 11px;
  }
}

@media (max-width: 820px) {
  .steam-weekly-row {
    grid-template-areas:
      "rank visual game movement"
      "rank visual weeks button";
    grid-template-columns: 46px 104px minmax(0, 1fr) 128px;
  }

  .steam-weekly-row__rank {
    grid-area: rank;
  }

  .steam-weekly-row__visual {
    grid-area: visual;
  }

  .steam-weekly-row__game {
    grid-area: game;
  }

  .steam-weekly-row__movement {
    grid-area: movement;
  }

  .steam-weekly-row__weeks {
    grid-area: weeks;
  }

  .steam-weekly-row__button {
    grid-area: button;
  }

  .steam-weekly__footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .games-catalogue__heading,
  .games-discovery__heading {
    text-align: left;
  }

  .games-catalogue-point {
    padding-inline: 13px;
  }

  .games-catalogue .game-card__content,
  .steam-discovery-card__body {
    min-height: auto;
  }

  .games-page .games-catalogue .game-grid {
    grid-template-columns: 1fr;
  }

  .games-page .games-catalogue .game-card:last-child:nth-child(odd) {
    width: 100%;
    grid-column: auto;
  }

  .games-discovery__all,
  .steam-discovery-grid,
  .steam-discovery-card__button {
    width: 100%;
  }

  .steam-discovery-grid {
    grid-template-columns: 1fr;
  }

  .steam-weekly__panel {
    --az-cut: 10px;
    padding: 20px 14px;
  }

  .steam-weekly__period,
  .steam-weekly__all {
    width: 100%;
    min-width: 0;
  }

  .steam-weekly-row {
    grid-template-areas:
      "rank visual game"
      "rank visual movement"
      "weeks weeks weeks"
      "button button button";
    grid-template-columns: 42px 86px minmax(0, 1fr);
    gap: 9px 11px;
    padding-block: 15px;
  }

  .steam-weekly-row:hover {
    transform: none;
  }

  .steam-weekly-row__game h3 {
    font-size: .86rem;
    white-space: normal;
  }

  .steam-weekly-row__movement {
    width: max-content;
    max-width: 100%;
  }

  .steam-weekly-row__weeks {
    padding-top: 3px;
  }

  .steam-weekly-row__button {
    width: 100%;
  }

  .steam-weekly__footer p {
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .steam-discovery-card__visual img,
  .games-page .game-card .button--game > .icon:last-child,
  .steam-weekly-row {
    transition: none;
  }
}
