/* Les sélections Jeux occupent les marges larges et restent accessibles sur mobile. */
.gr-discovery-layout {
  --gr-rail-gap: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "center center" "left right" "library library";
  align-items: start;
  gap: 28px var(--gr-rail-gap);
}
.gr-discovery-center { grid-area: center; min-width: 0; }
.gr-discovery-library { grid-area: library; min-width: 0; }
.gr-discovery-left { grid-area: left; }
.gr-discovery-right { grid-area: right; }
.gr-discovery-rail,
.gr-discovery-rail-content {
  display: grid;
  align-content: start;
  gap: var(--gr-rail-gap);
  min-width: 0;
}
.gr-discovery-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--gr-line);
  border-radius: 15px;
  background: var(--gr-panel);
}
.gr-discovery-panel>header {
  position: relative;
  padding: 19px 18px 15px;
  border-block-end: 1px solid var(--gr-line);
  background: linear-gradient(125deg, var(--gr-red-soft), transparent 75%);
}
.gr-discovery-panel>header::before {
  position: absolute;
  content: "";
  inset-block-start: 22px;
  inset-inline-start: 0;
  width: 3px;
  height: 27px;
  border-radius: 0 3px 3px 0;
  background: var(--gr-red);
}
.gr-discovery-eyebrow {
  display: block;
  margin-block-end: 5px;
  color: var(--gr-muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.m-game-reviews .gr-discovery-panel h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.gr-discovery-panel h2 svg { width: 17px; height: 17px; flex: none; color: var(--gr-red); }
.gr-discovery-list { list-style: none; margin: 0; padding: 0 16px; }
.gr-discovery-list>li { min-width: 0; }
.gr-discovery-list>li+li { border-block-start: 1px solid var(--gr-line); }
.m-game-reviews .gr-discovery-list>li>a {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 84px;
  margin-inline: -16px;
  padding: 13px 16px;
  color: var(--gr-text);
  transition: background .16s ease;
}
.gr-discovery-list>li>a:hover { background: var(--gr-panel-soft); }
.gr-discovery-list>li>a:focus-visible { outline-offset: -3px; border-radius: 5px; }
.gr-discovery-thumb {
  display: block;
  position: relative;
  flex: none;
  width: 68px;
  height: 52px;
  overflow: hidden;
  border-radius: 7px;
  background: var(--gr-panel-soft);
  border: 1px solid #ffffff0c;
}
.gr-discovery-thumb>picture,
.gr-discovery-thumb img { display: block; width: 100%; height: 100%; }
.gr-discovery-thumb img {
  object-fit: cover;
  object-position: center;
  transition: transform .28s ease;
}
.gr-discovery-info { display: block; min-width: 0; flex: 1; }
.gr-discovery-info>strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: var(--gr-text);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -.01em;
}
.gr-discovery-info>small {
  display: block;
  margin-block-start: 4px;
  color: var(--gr-muted);
  font-size: 12px;
  line-height: 1.5;
}
.gr-discovery-score {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  margin-block-start: 6px;
  padding: 2px 7px;
  border-radius: 7px;
  background: #78cda615;
  color: var(--gr-green);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.gr-discovery-score>small { color: inherit; font-size: 9px; font-weight: 500; }
.gr-discovery-date {
  display: inline-block;
  margin-block-start: 6px;
  color: var(--gr-amber);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.m-game-reviews .gr-discovery-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 46px;
  padding: 11px 18px;
  border-block-start: 1px solid var(--gr-line);
  color: var(--gr-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  transition: background .16s ease, color .16s ease;
}
.m-game-reviews .gr-discovery-more:hover { color: var(--gr-text); background: var(--gr-panel-soft); }
.gr-discovery-more svg { width: 15px; height: 15px; flex: none; }
.gr-discovery-empty { padding: 17px 15px; }
.gr-discovery-empty p { color: var(--gr-muted); font-size: 13px; line-height: 1.65; }
.gr-discovery-panel.is-upcoming>header { background: linear-gradient(125deg, #e6c1770b, transparent 75%); }
.gr-discovery-panel.is-upcoming>header::before { background: var(--gr-amber); }
.gr-discovery-panel.is-community>header { background: linear-gradient(125deg, #7ccca609, transparent 75%); }
.gr-discovery-panel.is-community>header::before { background: var(--gr-green); }

.gr-discovery-sticky { min-width: 0; }
.m-game-reviews .gr-discovery-feature {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--gr-line);
  border-radius: 15px;
  background: var(--gr-panel);
  color: var(--gr-text);
  transition: border-color .2s ease;
}
.gr-discovery-panel .gr-discovery-feature {
  border: 0;
  border-radius: 0;
}
.gr-discovery-feature-image {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--gr-panel-soft);
}
.gr-discovery-feature-image::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(transparent 60%, #11141660);
  pointer-events: none;
}
.gr-discovery-feature-image>picture,
.gr-discovery-feature-image img { display: block; width: 100%; height: 100%; }
.gr-discovery-feature-image img { object-fit: cover; transition: transform .38s ease; }
.gr-discovery-feature-copy {
  display: grid;
  gap: 6px;
  padding: 15px 17px 17px;
}
.gr-discovery-feature-copy>strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.gr-discovery-feature-copy>p,
.gr-discovery-feature-copy>small {
  margin: 0;
  color: var(--gr-muted);
  font-size: 12px;
  line-height: 1.5;
}
.gr-discovery-feature-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-block-start: 4px;
  font-size: 12px;
  font-weight: 650;
}
.gr-discovery-feature-action>span { transition: transform .2s ease; }
.gr-discovery-feature:focus-visible { outline-offset: -3px; }

.gr-discovery-links {
  display: grid;
  gap: 5px;
  padding: 9px;
}
.gr-discovery-feature+.gr-discovery-links { border-block-start: 1px solid var(--gr-line); }
.m-game-reviews .gr-discovery-links a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 43px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--gr-text);
  font-size: 13px;
  line-height: 1.35;
  transition: background .16s ease;
}
.gr-discovery-links a:hover { background: var(--gr-panel-soft); }
.gr-discovery-links a>svg { width: 16px; height: 16px; flex: none; color: var(--gr-muted); }
.gr-discovery-links a>[aria-hidden="true"]:last-child { margin-inline-start: auto; }

.gr-discovery-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 0 14px;
}
.m-game-reviews .gr-discovery-jumps a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid var(--gr-line);
  border-radius: 999px;
  background: var(--gr-panel);
  color: var(--gr-text);
  font-size: 12px;
  line-height: 1.4;
}
.gr-discovery-jumps a:hover { border-color: var(--gr-red); }
.gr-discovery-jumps a>svg { width: 14px; height: 14px; flex: none; }

@media (hover: hover) and (pointer: fine) {
  .gr-discovery-list a:hover .gr-discovery-thumb img { transform: scale(1.07); }
  .gr-discovery-feature:hover { border-color: var(--gr-red); }
  .gr-discovery-feature:hover img { transform: scale(1.05); }
  .gr-discovery-feature:hover .gr-discovery-feature-action>span { transform: translateX(3px); }
}

@media (min-width: 1480px) {
  .gr-catalogue-page .gr-main,
  .gr-catalogue-page .gr-header-inner {
    width: min(100%, 1960px);
    padding-inline: clamp(22px, 1.6vw, 32px);
  }
  .gr-discovery-layout {
    --gr-rail-gap: clamp(20px, 1.35vw, 26px);
    --gr-rail-width: clamp(240px, 14.4vw, 288px);
    grid-template-columns: var(--gr-rail-width) minmax(0, 1fr) var(--gr-rail-width);
    grid-template-areas: "left center right" "left library right";
    row-gap: 0;
  }
  /* A regular block lets the last card use the height of the whole rail. */
  .gr-discovery-rail { display: block; align-self: stretch; padding-block-start: 3px; }
  .gr-discovery-rail-content + .gr-discovery-sticky { margin-block-start: var(--gr-rail-gap); }
  .gr-discovery-panel h2 { text-wrap: balance; }
  .gr-discovery-info>strong { font-size: 15px; }
  .gr-discovery-jumps { display: none; }
}
@media (min-width: 1480px) and (min-height: 680px) {
  .gr-discovery-sticky { position: sticky; inset-block-start: 100px; }
}
@media (max-width: 700px) {
  .gr-discovery-layout {
    --gr-rail-gap: 16px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "center" "left" "right" "library";
    gap: 20px;
  }
  .gr-discovery-panel>header { padding-block: 14px 12px; }
  .gr-discovery-panel>header::before { inset-block-start: 16px; }
  .gr-discovery-thumb { width: 68px; height: 50px; }
  .gr-discovery-info>strong { font-size: 14px; -webkit-line-clamp: 2; }
  .gr-discovery-info>small { font-size: 11px; }
  .m-game-reviews .gr-discovery-list>li>a { min-height: 77px; padding-block: 12px; }
}
[data-theme=light] .gr-discovery-thumb { border-color: #0000000c; }
[data-theme=light] .gr-discovery-score { background: #237f5b0d; color: #23764d; }
[data-theme=light] .gr-discovery-date { color: #865914; }
@media (prefers-reduced-motion: reduce) {
  .gr-discovery-list>li>a,
  .gr-discovery-more,
  .gr-discovery-thumb img,
  .gr-discovery-feature,
  .gr-discovery-feature-image img,
  .gr-discovery-feature-action>span,
  .gr-discovery-links a { transition: none; }
  .gr-discovery-list a:hover .gr-discovery-thumb img,
  .gr-discovery-feature:hover img,
  .gr-discovery-feature:hover .gr-discovery-feature-action>span { transform: none; }
}
@media print {
  .gr-discovery-layout { display: block; }
  .gr-discovery-rail,
  .gr-discovery-jumps { display: none; }
}
