
@font-face {
  font-family: "Intense Writings";
  src: url("assets/fonts/intense-writings.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #191817;
  --ink-soft: #5f5b57;
  --ink-faint: #8b8580;
  --ink-rgb: 25, 24, 23;
  --night: #f3f4f5;
  --night-raised: #f7f8f9;
  --night-rgb: 243, 244, 245;
  --panel: rgba(248, 249, 250, 0.9);
  --line: rgba(35, 31, 28, 0.12);
  --line-strong: rgba(35, 31, 28, 0.22);
  --line-rgb: 35, 31, 28;
  --surface: #ffffff;
  --surface-rgb: 255, 255, 255;
  --media-placeholder: #ebe7e1;
  --accent: #a14142;
  --violet: var(--accent);
  --mint: #191817;
  --coral: var(--accent);
  --champagne: var(--accent);
  --roboto: "Roboto", Arial, sans-serif;
  --display: var(--roboto);
  --game-title: var(--roboto);
  --game-heading: var(--roboto);
  --support-font: var(--roboto);
  --sans: var(--roboto);
  --masthead-height: 64px;
  /* Échelle typographique commune, pensée du mobile vers le desktop. */
  --type-2xs: 8px;
  --type-xs: 9px;
  --type-caption: 10px;
  --type-small: 11px;
  --type-ui: 13px;
  --type-body: 16px;
  --type-lead: 20px;
  --type-subtitle: 24px;
  --type-title: 32px;
  --type-title-large: 40px;
  --type-display: 48px;
  --type-display-large: 64px;
  --page-title-size: var(--type-title);
  --detail-title-size: var(--type-title);
  --list-title-size: var(--type-lead);
  --stat-size: var(--type-title);
  --completion-size: var(--type-subtitle);
  --maker-glow: rgba(34, 62, 138, 0.09);
  --maker-texture:
    repeating-linear-gradient(115deg, transparent 0 38px, rgba(91, 117, 190, 0.035) 39px 40px),
    radial-gradient(circle at 82% 20%, rgba(56, 82, 160, 0.08), transparent 34rem);
}

/* Mode sombre : déclenché automatiquement (préférence système) sauf si
   l'utilisateur a choisi explicitement un thème via le bouton de bascule
   (voir app/theme-toggle.js), auquel cas [data-theme] force ce choix. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f1efec;
  --ink-soft: #b6b0a9;
  --ink-faint: #837d77;
  --ink-rgb: 241, 239, 236;
  --night: #17161a;
  --night-raised: #201f24;
  --night-rgb: 23, 22, 26;
  --panel: rgba(32, 31, 36, 0.9);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --line-rgb: 255, 255, 255;
  --surface: #232227;
  --surface-rgb: 35, 34, 39;
  --media-placeholder: #2a2830;
  --accent: #c85f5f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Réserve la largeur de la barre de défilement afin que le header et le
     fil d’Ariane ne se décalent pas entre les rubriques courtes et longues. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

img {
  display: block;
  max-width: 100%;
}

.site-shell {
  position: relative;
  z-index: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: clip;
  isolation: isolate;
}

.site-shell::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  background: var(--night);
  background-position: center top;
  background-size: auto;
  content: "";
  opacity: 1;
  transition: background-image 320ms ease;
}

.site-shell::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: transparent;
  content: "";
  opacity: 0.72;
  pointer-events: none;
  transition: background 320ms ease;
}

.theme-sony {
  --support-font: var(--roboto);
  --maker-glow: rgba(37, 63, 142, 0.1);
  --maker-texture:
    repeating-linear-gradient(118deg, transparent 0 44px, rgba(67, 94, 172, 0.035) 45px 46px),
    radial-gradient(circle at 80% 12%, rgba(54, 84, 174, 0.1), transparent 36rem);
}

.theme-nintendo {
  --support-font: var(--roboto);
  --maker-glow: rgba(159, 20, 30, 0.08);
  --maker-texture:
    radial-gradient(circle, rgba(196, 40, 48, 0.045) 0 2px, transparent 2.5px) 0 0 / 34px 34px,
    radial-gradient(circle at 82% 12%, rgba(155, 22, 31, 0.08), transparent 34rem);
}

.theme-sega {
  --support-font: var(--roboto);
  --maker-glow: rgba(0, 83, 173, 0.09);
  --maker-texture:
    repeating-linear-gradient(132deg, transparent 0 56px, rgba(0, 116, 204, 0.04) 57px 59px),
    linear-gradient(100deg, transparent 55%, rgba(0, 90, 186, 0.07));
}

.theme-microsoft {
  --support-font: var(--roboto);
  --maker-glow: rgba(57, 126, 31, 0.08);
  --maker-texture:
    repeating-linear-gradient(0deg, transparent 0 51px, rgba(76, 151, 44, 0.025) 52px 53px),
    repeating-linear-gradient(90deg, transparent 0 51px, rgba(76, 151, 44, 0.025) 52px 53px),
    radial-gradient(circle at 82% 12%, rgba(58, 133, 29, 0.07), transparent 34rem);
}

.theme-nec {
  --support-font: var(--roboto);
  --maker-glow: rgba(190, 52, 34, 0.07);
  --maker-texture:
    repeating-linear-gradient(90deg, transparent 0 62px, rgba(202, 69, 45, 0.03) 63px 64px),
    repeating-linear-gradient(0deg, transparent 0 62px, rgba(202, 69, 45, 0.02) 63px 64px);
}

.theme-snk {
  --support-font: var(--roboto);
  --maker-glow: rgba(38, 93, 158, 0.08);
  --maker-texture:
    repeating-radial-gradient(circle at 85% 4%, transparent 0 38px, rgba(42, 104, 177, 0.035) 39px 41px),
    radial-gradient(circle at 82% 10%, rgba(43, 91, 151, 0.07), transparent 32rem);
}

.theme-atari {
  --support-font: var(--roboto);
  --maker-glow: rgba(184, 43, 37, 0.08);
  --maker-texture:
    repeating-conic-gradient(from 215deg at 84% 0%, transparent 0deg 9deg, rgba(182, 49, 43, 0.03) 9deg 10deg),
    radial-gradient(circle at 84% 0%, rgba(173, 43, 38, 0.07), transparent 31rem);
}

.masthead {
  position: sticky;
  z-index: 50;
  top: 0;
  min-height: 92px;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(580px, 2.2fr);
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: rgba(var(--night-rgb), 0.96);
  backdrop-filter: blur(24px);
  padding-inline: clamp(24px, 4vw, 72px);
  transition:
    min-height 220ms ease,
    box-shadow 220ms ease;
}

.masthead.is-compact {
  min-height: 64px;
  box-shadow: 0 10px 28px rgba(var(--ink-rgb), 0.07);
}

.main-nav .theme-toggle {
  display: grid;
  place-items: center;
  align-self: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  margin-left: 18px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.main-nav .theme-toggle::after {
  display: none;
}

.main-nav .theme-toggle:hover,
.main-nav .theme-toggle:focus-visible {
  border-color: var(--line-strong);
  background: rgba(var(--ink-rgb), 0.06);
  color: var(--ink);
  outline: none;
}

.theme-toggle svg {
  display: block;
  width: 16px;
  height: 16px;
}

.brand {
  display: flex;
  align-items: center;
  align-self: center;
  width: fit-content;
  text-decoration: none;
}

.brand__plate {
  display: block;
  width: auto;
  background: transparent;
}

.brand__wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: "Intense Writings", var(--sans);
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
  transition: font-size 220ms ease;
}

.brand__wordmark-tld {
  font-size: 0.4em;
  color: #c10020;
}

.masthead.is-compact .brand__wordmark {
  font-size: 23px;
}

.main-nav {
  display: flex;
  justify-content: flex-end;
}

.main-nav .theme-toggle {
  /* Le bouton est physiquement replacé en fin de navigation par
     app/theme-toggle.js à chaque changement de page, mais ce repositionnement
     a lieu juste après le rendu React, donc visible un court instant (le
     bouton "saute" avant de se stabiliser). En le fixant aussi visuellement
     en dernière position via flexbox, ce saut disparaît complètement : peu
     importe où il se trouve un instant dans le DOM, il s'affiche toujours
     après "Statistiques". Le repositionnement JS reste utile en parallèle
     pour l'ordre de tabulation au clavier, qui suit le DOM et non `order`. */
  order: 1;
}

.main-nav :is(button, a) {
  display: inline-flex;
  align-items: center;
  position: relative;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  padding: 0 clamp(13px, 1.3vw, 24px);
  transition:
    color 180ms ease,
    background 180ms ease,
    font-size 220ms ease,
    min-height 220ms ease;
}

.main-nav .nav-home {
  justify-content: center;
  padding-inline: clamp(13px, 1.3vw, 20px);
}

.masthead.is-compact .main-nav :is(button, a) {
  font-size: 11px;
}

.platforms-menu,
.menu-scrim {
  display: none;
}

.main-nav :is(button, a)::after {
  position: absolute;
  right: 22%;
  bottom: -1px;
  left: 22%;
  height: 2px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(0.3);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.main-nav :is(button, a):hover,
.main-nav :is(button, a).is-active {
  color: var(--accent);
}

.main-nav :is(button, a).is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.collection-index {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.collection-index strong {
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
}

.page-frame,
.category-view {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.platform-hero {
  padding: clamp(23px, 3vw, 46px) 0 clamp(38px, 5vw, 72px);
}

/* Hiérarchie visuelle des pages de support : fil d’Ariane, sélection, titre. */
.platform-hero:not(.category-hero) {
  display: flex;
  flex-direction: column;
  padding-top: 24px;
}

.platform-hero:not(.category-hero) > .breadcrumb {
  order: 1;
  margin-bottom: 40px;
}

.platform-hero:not(.category-hero) > .platform-select {
  order: 2;
  width: min(100%, 340px);
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.platform-hero:not(.category-hero) > .title-line {
  order: 3;
}

.platform-hero:not(.category-hero) .platform-select > label {
  display: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.breadcrumb > span:last-child {
  color: var(--ink-soft);
  font-weight: 500;
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease;
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--accent);
}

/* Le fil d’Ariane conserve la même position sur toutes les familles de pages. */
.home-hero:has(> .breadcrumb),
.platform-hero.category-hero {
  padding-top: 24px;
}

.home-hero > .breadcrumb,
.category-hero > .breadcrumb {
  margin-bottom: 40px;
}

.collection-home {
  padding-bottom: 0;
}

.home-hero {
  padding: clamp(24px, 3vw, 42px) 0 clamp(58px, 8vw, 104px);
}

.home-hero h1 {
  max-width: 940px;
  margin: 0 0 28px;
  font-family: var(--game-heading);
  font-size: 64px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.88;
  white-space: normal;
  overflow-wrap: normal;
  text-wrap: balance;
}

.home-hero > p:not(.eyebrow):not(.selection-guidance) {
  max-width: 700px;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--game-heading);
  font-size: clamp(19px, 2vw, 28px);
  line-height: 1.45;
}

/* Les introductions des constructeurs reprennent le corps du texte d’accueil. */
.home-hero:has(> .breadcrumb) > p:not(.eyebrow):not(.selection-guidance) {
  max-width: none;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.7;
}

.home-introduction {
  display: grid;
  gap: 16px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
}

.home-introduction p {
  margin: 0;
}

.home-introduction__lead {
  max-width: 760px;
  color: var(--ink);
  font-family: var(--game-heading);
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: -0.015em;
  line-height: 1.45;
}

.home-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin-top: 52px;
}

.home-stats > span {
  min-width: 150px;
  display: grid;
  gap: 5px;
  border-left: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.14em;
  padding: 0 30px;
  text-transform: uppercase;
}

.home-stats > span:first-child {
  border-left: 0;
  padding-left: 0;
}

.home-stats strong {
  color: var(--ink);
  font-family: var(--game-title);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.home-hero--collection > h1 {
  margin-bottom: 40px;
}

.home-hero--collection > .home-stats {
  margin: 0 0 40px;
}

.overview-section {
  padding-bottom: 110px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.overview-card {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  cursor: pointer;
  padding: 26px;
  text-align: left;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.overview-card:hover {
  border-color: rgba(161, 65, 66, 0.65);
  background: rgba(var(--surface-rgb), 0.96);
  transform: translateY(-2px);
}

.overview-card > span {
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.overview-card strong {
  margin: 10px 38px 12px 0;
  color: var(--ink);
  font-family: var(--game-heading);
  font-size: clamp(21px, 2.04vw, 29px);
  font-weight: 500;
  line-height: 1.05;
}

.overview-card small {
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.overview-card i {
  position: absolute;
  right: 24px;
  bottom: 26px;
  color: var(--accent);
  font-size: 18px;
  font-style: normal;
}

.platform-select {
  display: grid;
  grid-template-columns: 112px minmax(250px, 340px);
  align-items: center;
  gap: 24px;
  margin-bottom: 42px;
}

.platform-select label,
.detail-label {
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  width: 100%;
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
  appearance: none;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background:
    linear-gradient(120deg, rgba(161, 65, 66, 0.025), transparent),
    var(--night-raised);
  color: var(--ink);
  cursor: pointer;
  padding: 0 48px 0 16px;
}

.select-wrap .chevron {
  position: absolute;
  top: 50%;
  right: 19px;
  pointer-events: none;
  transform: translateY(-65%) rotate(45deg);
}

.select-wrap .select-chevron {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 20px;
  height: 20px;
  pointer-events: none;
  transform: translateY(-50%);
  fill: var(--accent);
}

.eyebrow {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 10px;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow span {
  color: var(--accent);
}

.title-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
}

.title-line h1,
.detail-title h1,
.category-view > h1 {
  max-width: 900px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(58px, 8vw, 118px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.88;
  text-wrap: balance;
}

.title-line h1 {
  font-family: var(--support-font);
  font-weight: 300;
  letter-spacing: -0.045em;
}

.theme-sony .title-line h1 {
  letter-spacing: 0.015em;
}

.theme-nintendo .title-line h1 {
  font-weight: 700;
  letter-spacing: -0.055em;
}

.theme-sega .title-line h1,
.theme-snk .title-line h1 {
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.055em;
  text-transform: none;
}

.theme-microsoft .title-line h1 {
  font-weight: 300;
  letter-spacing: -0.045em;
}

.theme-nec .title-line h1,
.theme-atari .title-line h1 {
  font-weight: 700;
}

.detail-title h1 {
  font-family: var(--game-heading);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.category-view > h1 {
  font-family: var(--display);
}

.count {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 8px;
  border-left: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 9px 0 3px 28px;
}

.count strong {
  color: var(--ink);
  font-family: var(--game-title);
  font-size: 44px;
  font-weight: 400;
}

.count span {
  font-size: 13px;
}

.collection-section {
  margin-bottom: 54px;
}

.section-heading {
  display: grid;
  grid-template-columns: 34px auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading span {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.section-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.section-heading i {
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

/* Les intitulés de sections n’utilisent plus de numérotation décorative. */
.collection-section > .section-heading {
  grid-template-columns: auto 1fr;
}

.collection-section > .section-heading > span {
  display: none;
}

.hardware-row,
.game-row {
  position: relative;
  width: 100%;
  display: grid;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(110deg, rgba(var(--surface-rgb), 0.65), transparent 34%),
    var(--panel);
  box-shadow:
    0 20px 60px rgba(52, 43, 35, 0.07),
    inset 0 1px rgba(var(--surface-rgb), 0.9);
  text-align: left;
  color: inherit;
  text-decoration: none;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.game-row:hover,
.hardware-row:hover {
  border-color: rgba(161, 65, 66, 0.78);
  background:
    linear-gradient(110deg, rgba(161, 65, 66, 0.055), transparent 38%),
    rgba(var(--surface-rgb), 0.96);
  transform: translateY(-2px);
}

.hardware-row {
  grid-template-columns: 262px 1fr 14px;
  gap: clamp(26px, 4vw, 60px);
  padding: 14px 24px 14px 14px;
}

.hardware-row {
  cursor: pointer;
}

.hardware-row .row-chevron {
  justify-self: end;
}

.detail-meta--hardware {
  margin-top: 0;
}

.hardware-list {
  display: grid;
  gap: 12px;
}

.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--media-placeholder);
}

.media-frame::after {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--surface-rgb), 0.28);
  content: "";
  pointer-events: none;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.media-placeholder,
.detail-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(var(--surface-rgb), 0.7), transparent 48%),
    repeating-linear-gradient(
      -45deg,
      rgba(161, 65, 66, 0.025) 0,
      rgba(161, 65, 66, 0.025) 1px,
      transparent 1px,
      transparent 9px
    ),
    var(--media-placeholder);
  color: rgba(var(--line-rgb), 0.3);
  font-family: var(--game-title);
  font-size: clamp(24px, 3vw, 42px);
  letter-spacing: 0.12em;
}

.game-row:hover img {
  transform: scale(1.025);
}

.item-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.item-kicker {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.item-copy > strong {
  color: var(--ink);
  font-family: var(--game-title);
  font-size: clamp(25px, 2.5vw, 38px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.game-row .item-copy > strong {
  font-family: var(--game-heading);
  font-size: clamp(22px, 2.125vw, 33px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 28px;
}

.meta-line > span {
  display: grid;
  gap: 5px;
  min-width: 100px;
  border-left: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  padding: 0 20px;
}

.meta-line > span:first-child {
  border-left: 0;
  padding-left: 0;
}

.meta-line small {
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.chevron {
  display: block;
  width: 10px;
  height: 10px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  color: var(--accent);
  transform: rotate(45deg);
}

.games-section {
  margin-bottom: 110px;
}

.game-list {
  display: grid;
  gap: 12px;
}

.alphabet-index {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: -12px 0 18px;
  color: var(--ink-faint);
}

.alphabet-index button {
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 10px;
}

.alphabet-index button:hover:not(:disabled) {
  background: rgba(var(--ink-rgb), 0.06);
  color: var(--accent);
}

.alphabet-index button:disabled {
  opacity: 0.22;
  cursor: default;
}

.letter-divider {
  position: sticky;
  z-index: 20;
  top: var(--masthead-height);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 18px 0 2px;
  background: rgba(var(--night-rgb), 0.97);
  box-shadow: 0 1px rgba(var(--line-rgb), 0.05);
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 8px 0;
  scroll-margin-top: var(--masthead-height);
  backdrop-filter: blur(12px);
}

.letter-divider:first-child {
  margin-top: 0;
}

.letter-divider i {
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.empty-list {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 13px;
  padding: 28px;
}

.game-row {
  scroll-margin-top: var(--masthead-height);
  grid-template-columns: 210px minmax(300px, 1fr) minmax(260px, 0.7fr) 18px;
  gap: 34px;
  padding: 12px 20px 12px 12px;
}

.game-row--category {
  grid-template-columns: 210px minmax(300px, 1fr) 18px;
}

.completion {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.completion--compact {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  border-top: 0;
  border-left: 1px solid var(--line);
  padding: 4px 0 4px 28px;
}

.completion--compact .completion__score {
  align-items: flex-end;
}

.completion__score {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.completion__score strong {
  color: var(--ink);
  font-family: var(--game-title);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.completion__score span {
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.completion__checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 12px 18px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.check i {
  display: grid;
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex: 0 0 18px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 12px;
  font-style: normal;
}

.check--yes i {
  border-color: #2f7d52;
  background: #2f7d52;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(47, 125, 82, 0.2);
}

.check--yes i:has(svg[data-remix-icon="checkbox-circle-fill"]) {
  border: 0;
  background: transparent;
  color: #2f7d52;
  box-shadow: none;
  line-height: 0;
}

.check--yes i svg[data-remix-icon="checkbox-circle-fill"] {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.check--no i {
  border-color: rgba(161, 65, 66, 0.58);
  color: var(--accent);
}

.check--no i:has(svg[data-remix-icon="close-circle-line"]) {
  border: 0;
  background: transparent;
  box-shadow: none;
  line-height: 0;
}

.check--no i svg[data-remix-icon="close-circle-line"] {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.row-chevron {
  display: grid;
  place-items: center;
}

.back-link {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  text-decoration: none;
}

.maker-platform-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.home-hero > .selection-guidance {
  margin: 24px 0 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
}

.maker-platform-links a {
  border: 1px solid rgba(161, 65, 66, 0.48);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 3px 10px rgba(var(--ink-rgb), 0.08);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  padding: 10px 16px;
  text-decoration: none;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.maker-platform-links a:hover,
.maker-platform-links a:focus-visible {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 6px 16px rgba(161, 65, 66, 0.24);
  color: #fff;
  transform: translateY(-1px);
}

.maker-platform-links a:focus-visible {
  outline: 3px solid rgba(161, 65, 66, 0.24);
  outline-offset: 3px;
}

.maker-platform-links a:active {
  transform: translateY(0);
}

.back-link span:not(.back-link-icon) {
  position: relative;
  width: 24px;
  height: 24px;
  display: block;
  flex: 0 0 24px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
  transition: transform 180ms ease;
}

.back-link span:not(.back-link-icon)::before {
  position: absolute;
  top: 50%;
  left: 1px;
  width: 22px;
  height: 14px;
  background: var(--accent);
  clip-path: polygon(0 50%, 8px 0, 8px 5px, 100% 5px, 100% 9px, 8px 9px, 8px 100%);
  content: "";
  transform: translateY(-50%);
}

.back-link .back-link-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: block;
  color: var(--accent);
  transition: transform 180ms ease;
}

.back-link .back-link-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.back-link:hover span,
.back-link:hover .back-link-icon {
  transform: translateX(-4px);
}

.back-link:hover,
.category-card button:hover {
  color: var(--accent);
}

.game-detail {
  display: flex;
  flex-direction: column;
  padding: 24px 0 110px;
}

/* Ordre des fiches : fil d’Ariane, retour liste, puis contenu. */
.game-detail > .detail-title,
.game-detail > .detail-title > div {
  display: contents;
}

.game-detail .detail-title .breadcrumb {
  order: 1;
  margin: 0 0 40px;
}

.game-detail > .back-link {
  order: 2;
  align-self: flex-start;
  margin: 0 0 24px;
}

.game-detail .detail-title h1 {
  order: 3;
  margin: 0 0 52px;
}

.game-detail > .detail-grid {
  order: 4;
}

.detail-title {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 40px;
  margin: 58px 0 52px;
}

.detail-title h1 {
  max-width: 930px;
  font-size: clamp(41px, 5.695vw, 80px);
  line-height: 0.94;
}

.category-hero .title-line h1 {
  font-family: var(--game-heading);
  font-size: clamp(50px, 6.8vw, 101px);
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-transform: none;
}

.platform-hero:not(.category-hero) .title-line h1 {
  font-size: 64px;
}

.detail-title__year {
  border-left: 1px solid var(--line);
  color: var(--accent);
  font-family: var(--game-title);
  font-size: 38px;
  padding: 12px 0 2px 28px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(380px, 0.88fr);
  align-items: start;
  gap: clamp(36px, 6vw, 86px);
}

.detail-media-column {
  display: grid;
  gap: 28px;
}

.detail-grid--game .detail-image,
.detail-grid--hardware .detail-image {
  position: static;
}

.detail-image {
  position: sticky;
  top: 28px;
  margin: 0;
}

.detail-image > img,
.detail-image-trigger > img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--night-raised);
  box-shadow: 0 32px 85px rgba(55, 44, 35, 0.14);
  object-fit: cover;
}

.detail-image-trigger {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
  padding: 0;
  text-align: inherit;
}

.detail-image-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.detail-image-trigger__hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.72);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  opacity: 0;
  padding: 8px 11px;
  text-transform: uppercase;
  transform: translateY(4px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.detail-image-trigger:hover .detail-image-trigger__hint,
.detail-image-trigger:focus-visible .detail-image-trigger__hint {
  opacity: 1;
  transform: translateY(0);
}

.image-lightbox {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 15, 0.82);
  cursor: zoom-out;
  padding: clamp(18px, 4vw, 56px);
  backdrop-filter: blur(5px);
}

html.has-image-lightbox .masthead {
  visibility: hidden;
}

html.has-image-lightbox .site-shell {
  isolation: auto;
}

html.has-image-lightbox .detail-image {
  position: static;
}

.image-lightbox__content {
  position: relative;
  display: flex;
  max-width: 100%;
  max-height: 100%;
  cursor: default;
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.45);
}

.image-lightbox__content > img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - clamp(36px, 8vw, 112px));
  border: 0;
  border-radius: 3px;
  background: #111;
  object-fit: contain;
}

.image-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  transition: background 160ms ease, color 160ms ease;
}

.image-lightbox__close svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.image-lightbox__close:hover,
.image-lightbox__close:focus-visible {
  background: var(--accent);
  color: #fff;
  outline: none;
}

.detail-placeholder {
  aspect-ratio: 4 / 3;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow: 0 32px 85px rgba(55, 44, 35, 0.14);
}

.detail-placeholder {
  align-content: center;
  gap: 8px;
}

.detail-placeholder small {
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.detail-image figcaption {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.1em;
  padding-top: 12px;
  text-transform: uppercase;
}

.detail-content {
  display: grid;
  gap: 36px;
}

.detail-intro,
.collection-note {
  display: grid;
  gap: 18px;
}

.summary {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.detail-grid--game .summary,
.detail-grid--hardware .summary,
.detail-grid:not(.detail-grid--game):not(.detail-grid--hardware) .summary {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.detail-content > .completion {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: start;
  gap: 28px;
}

.detail-grid--game .detail-content > .completion {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "checks score";
  gap: clamp(28px, 5vw, 72px);
  border-top: 0;
  padding-top: 0;
}

.detail-grid--game .detail-content > .completion .completion__checks {
  grid-area: checks;
}

.detail-grid--game .detail-content > .completion .completion__score {
  grid-area: score;
  min-width: 132px;
  align-self: stretch;
  justify-content: center;
  background: var(--panel);
  padding: 0 12px;
}

.detail-grid--game .detail-content > .completion .completion__score strong {
  line-height: 1;
}

.detail-grid--game .detail-content > .completion .check {
  background: var(--panel);
  padding: 6px 8px;
}

.detail-content > .completion .completion__score strong {
  font-size: 50px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 0;
  border-top: 1px solid var(--line);
}

.detail-meta div {
  display: grid;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.detail-meta div:nth-child(even) {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.detail-meta dt {
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.detail-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.rarity-stars {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
}

.rarity-stars svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: currentColor;
}

.rarity-star--filled { color: var(--accent); }
.rarity-star--empty { color: var(--ink-faint); }

.deleted-object-message {
  min-height: 55vh;
  display: grid;
  align-content: center;
  gap: 24px;
}

.collection-note {
  border-left: 2px solid var(--accent);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
  padding-left: 22px;
}

.detail-grid--game .collection-note {
  color: var(--ink);
}

.collection-note p {
  margin: 0;
}

.category-view {
  min-height: calc(100vh - 92px);
  padding: 0 0 120px;
}

.category-hero {
  border-bottom: 0;
}

.category-list {
  padding-bottom: 20px;
}

.category-view > h1 {
  margin: 22px 0 64px;
}

.category-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 54px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  padding: 48px 0;
}

.category-card__index {
  color: var(--accent);
  font-family: var(--display);
  font-size: 92px;
  line-height: 0.8;
  opacity: 0.55;
}

.category-card h2 {
  max-width: 720px;
  margin: 20px 0;
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.category-card p:not(.detail-label) {
  max-width: 600px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.category-card button {
  border: 0;
  border-bottom: 1px solid var(--accent);
  background: transparent;
  cursor: pointer;
  margin-top: 28px;
  padding: 0 0 8px;
}

.category-card button span {
  margin-left: 12px;
}

footer {
  height: 150px;
  min-height: 150px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.06em;
  margin-top: auto;
  padding: 40px clamp(24px, 4vw, 72px);
}

.footer__brand {
  width: max-content;
  display: grid;
  align-content: center;
  gap: 4px;
  line-height: 1.1;
}

.footer__brand strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}

.footer__tagline {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 1em;
  letter-spacing: 0.22em;
  white-space: nowrap;
}

.footer__social {
  display: grid;
  justify-items: center;
  gap: 7px;
  line-height: 1.1;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(var(--surface-rgb), 0.46);
  color: var(--ink-soft);
  text-decoration: none;
  transition:
    color 220ms ease,
    background-color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.social-icon svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
  transition: transform 220ms ease;
}

.social-icon:hover,
.social-icon:focus-visible {
  border-color: var(--accent);
  outline: none;
  background: var(--accent);
  box-shadow: 0 7px 18px rgba(161, 65, 66, 0.2);
  color: #fff;
  transform: translateY(-2px);
}

.social-icon:hover svg,
.social-icon:focus-visible svg {
  transform: scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .social-icon,
  .social-icon svg {
    transition: none;
  }

  .social-icon:hover,
  .social-icon:focus-visible,
  .social-icon:hover svg,
  .social-icon:focus-visible svg {
    transform: none;
  }
}

/* Échelle commune à toutes les pages de catégorie, calée sur Jeux vidéo. */
.category-hero .title-line h1,
.category-view > h1 {
  font-size: var(--page-title-size);
  line-height: 0.88;
}

/* Même rythme entre fil d’Ariane et titre sur toutes les catégories. */
.home-hero:has(> .breadcrumb) > .breadcrumb,
.platform-hero.category-hero > .breadcrumb {
  margin-bottom: 40px;
}

.platform-hero.category-hero > .title-line {
  display: block;
}

/* Navigation compacte pour mobile et tablette. */
.menu-toggle {
  display: none;
}

@media (max-width: 820px),
  (orientation: landscape) and (max-height: 600px) and (max-width: 1180px) {
  body.mobile-menu-open {
    overflow: hidden;
  }

  .masthead {
    min-height: 72px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    backdrop-filter: none;
    padding-inline: 16px;
  }

  .masthead.is-compact {
    min-height: 60px;
  }

  .brand {
    min-width: 0;
  }

  .brand__plate {
    padding: 12px 0;
  }

  .brand__wordmark {
    font-size: clamp(18px, 5.5vw, 26px);
  }

  .masthead.is-compact .brand__wordmark {
    font-size: clamp(14px, 4.2vw, 20px);
  }

  .menu-toggle {
    position: relative;
    z-index: 54;
    width: 40px;
    height: 40px;
    display: grid;
    place-content: center;
    gap: 5px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--night-raised);
    color: var(--ink);
    cursor: pointer;
  }

  .menu-toggle svg {
    display: block;
    width: 22px;
    height: 22px;
  }

  .masthead .main-nav {
    position: fixed;
    z-index: 53;
    top: 0;
    right: 0;
    bottom: auto;
    left: auto;
    width: 95vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow-y: auto;
    border-left: 1px solid var(--line);
    background: rgba(var(--night-rgb), 0.985);
    box-shadow: -18px 0 30px rgba(var(--ink-rgb), 0.12);
    margin: 0;
    padding: 76px 16px 24px;
    pointer-events: none;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 240ms ease, visibility 240ms ease;
  }

  body.mobile-menu-open .masthead .main-nav {
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
  }

  .masthead .menu-scrim {
    position: fixed;
    z-index: 52;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    display: block;
    border: 0;
    background: rgba(16, 17, 18, 0.58);
    cursor: pointer;
    opacity: 0;
    padding: 0;
    pointer-events: none;
    transition: opacity 240ms ease;
    visibility: hidden;
  }

  body.mobile-menu-open .masthead .menu-scrim {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .masthead .main-nav :is(button, a) {
    width: 100%;
    min-height: 48px;
    justify-content: flex-start;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    padding: 0 8px;
  }

  .masthead .main-nav > :is(button, a) {
    flex: 0 0 auto;
  }

  .masthead .main-nav > [data-mobile-games-entry="true"] {
    display: none;
  }

  .masthead .main-nav .nav-home {
    justify-content: flex-start;
    padding-inline: 8px;
  }

  .masthead .main-nav .theme-toggle {
    width: 32px;
    height: 32px;
    min-height: 32px;
    flex: 0 0 32px;
    align-self: flex-start;
    margin: 14px 0 6px;
    padding: 0;
    border-bottom: 0;
    justify-content: center;
  }

  .masthead .main-nav :is(button, a)::after {
    right: auto;
    bottom: 8px;
    left: 8px;
    width: 32px;
  }

  .masthead .platforms-menu {
    display: block;
    flex: 0 0 auto;
    border-bottom: 1px solid var(--line);
  }

  .masthead .platforms-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    border-bottom: 0;
  }

  .accordion-chevron {
    width: 9px;
    height: 9px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    margin-right: 0;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 180ms ease;
  }

  .platforms-toggle[aria-expanded="true"] .accordion-chevron {
    transform: rotate(225deg) translate(-2px, -2px);
  }

  .platforms-accordion {
    max-height: min(54dvh, 520px);
    overflow-y: auto;
    border-top: 1px solid var(--line);
    background: rgba(var(--surface-rgb), 0.48);
    padding: 8px 14px 18px;
  }

  .platforms-accordion[hidden] {
    display: none;
  }

  .platform-maker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
    padding-top: 14px;
  }

  .platform-maker p {
    grid-column: 1 / -1;
    color: var(--accent);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    margin: 0 0 4px;
    text-transform: uppercase;
  }

  .masthead .main-nav .platform-maker a {
    min-height: 40px;
    border-bottom: 1px solid rgba(var(--ink-rgb), 0.08);
    color: var(--ink-soft);
    font-size: 11px;
    line-height: 1.25;
    padding: 7px 2px;
  }

  .masthead .main-nav .platform-maker a::after {
    display: none;
  }
}

@media (max-width: 420px) {
  .platform-maker {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .masthead .main-nav,
  .masthead .menu-scrim,
  .accordion-chevron {
    transition: none;
  }
}

.footer__rights {
  justify-self: end;
  text-align: right;
}

footer,
.footer__brand strong {
  text-transform: uppercase;
}

.back-to-top {
  position: fixed;
  z-index: 45;
  right: clamp(18px, 2.5vw, 38px);
  bottom: clamp(18px, 2.5vw, 38px);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(var(--night-rgb), 0.94);
  box-shadow: 0 10px 26px rgba(var(--ink-rgb), 0.12);
  color: var(--accent);
  cursor: pointer;
  font-size: 20px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--surface);
}

@media (max-width: 1280px) {
  .home-hero h1 {
    font-size: 56px;
  }

  .platform-hero:not(.category-hero) .title-line h1 {
    font-size: 56px;
  }
}

@media (max-width: 1080px) {
  .home-hero h1 {
    font-size: 44px;
  }

  .platform-hero:not(.category-hero) .title-line h1 {
    font-size: 44px;
  }

  .masthead {
    grid-template-columns: auto 1fr;
  }

  .main-nav {
    order: 3;
    grid-column: 1 / -1;
    overflow-x: auto;
    justify-content: flex-start;
    border-top: 1px solid var(--line);
    margin-inline: -24px;
    padding-inline: 24px;
  }

  .main-nav :is(button, a) {
    min-height: 54px;
    white-space: nowrap;
  }

  .masthead.is-compact .main-nav :is(button, a) {
    min-height: 40px;
  }

  .collection-index {
    min-height: 72px;
  }

  .game-row {
    grid-template-columns: 184px minmax(260px, 1fr) minmax(240px, 0.72fr) 14px;
    gap: 24px;
  }

  .game-row--category {
    grid-template-columns: 184px minmax(260px, 1fr) 14px;
  }

  .completion--compact {
    padding-left: 22px;
  }

  .completion__checks {
    grid-template-columns: 1fr;
    gap: 7px;
  }
}

@media (max-width: 820px) {
  .home-hero h1 {
    font-size: 32px;
  }

  .platform-hero:not(.category-hero) .title-line h1 {
    font-size: 32px;
  }

  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-frame,
  .category-view {
    width: min(100% - 32px, 720px);
  }

  .title-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .count {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 16px 0 0;
  }

  .hardware-row {
    grid-template-columns: 198px 1fr 14px;
    gap: 24px;
  }

  .game-row {
    grid-template-columns: 170px 1fr;
    gap: 22px 24px;
    padding: 12px;
  }

  .game-row .completion--compact {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
    margin: 0 8px;
    padding: 20px 0 8px;
  }

  .game-row .completion__checks {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .row-chevron {
    position: absolute;
    right: 22px;
    bottom: 35px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-image {
    position: static;
  }

  .detail-title {
    grid-template-columns: 1fr;
  }

  .detail-title__year {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 16px 0 0;
  }
}

@media (max-width: 560px) {
  .image-lightbox {
    padding: 12px;
  }

  .image-lightbox__content > img {
    max-height: calc(100vh - 24px);
  }

  .image-lightbox__close {
    top: 8px;
    right: 8px;
    width: 38px;
    height: 38px;
  }

  .summary {
    font-size: 20px;
  }

  .game-detail .detail-title h1 {
    margin-bottom: 36px;
  }

  .home-hero h1 {
    font-size: 24px;
  }

  .platform-hero:not(.category-hero) .title-line h1 {
    font-size: 24px;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .overview-card {
    min-height: 155px;
  }

  .home-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 24px;
  }

  .home-stats > span {
    min-width: 0;
    padding: 0 12px;
  }

  .home-stats > span:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .home-stats strong {
    font-size: 27px;
  }

  .masthead {
    grid-template-columns: 1fr auto;
    padding-inline: 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand__plate {
    padding: 16px 0;
  }

  .brand__wordmark {
    font-size: clamp(15px, 5.2vw, 20px);
  }

  .masthead.is-compact .brand__wordmark {
    font-size: clamp(12px, 4vw, 16px);
  }

  .collection-index span {
    display: none;
  }

  .main-nav {
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .main-nav :is(button, a)::after {
    height: 3px;
  }

  .nav-home svg {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }

  .platform-hero {
    padding-top: 19px;
  }

  .platform-select {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 38px;
  }

  .title-line h1,
  .category-view > h1 {
    font-size: 54px;
    line-height: 0.94;
  }

  .category-hero .title-line h1 {
    font-size: 46px;
  }

  .section-heading {
    grid-template-columns: 28px auto 1fr;
    gap: 10px;
  }

  .hardware-row,
  .game-row {
    grid-template-columns: 104px 1fr;
    gap: 16px;
    border-radius: 10px;
    padding: 10px;
  }

  .game-row--category {
    grid-template-columns: 104px 1fr;
  }

  .hardware-row {
    grid-template-columns: 115px 1fr;
  }

  .hardware-row .media-frame,
  .game-row .media-frame {
    align-self: start;
  }

  .item-kicker {
    margin-bottom: 6px;
    font-size: 8px;
  }

  .item-copy > strong {
    font-size: 20px;
  }

  .game-row .item-copy > strong {
    font-size: 17px;
  }

  .meta-line {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 12px 16px;
    margin-top: 14px;
  }

  .meta-line > span,
  .meta-line > span:first-child {
    min-width: 0;
    border-left: 0;
    padding: 0;
  }

  .game-row .completion--compact {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 0;
    padding: 16px 2px 6px;
  }

  .completion--compact .completion__score {
    align-items: flex-end;
  }

  .completion--compact .completion__score strong {
    font-size: 32px;
  }

  .game-row .completion__checks {
    grid-template-columns: repeat(2, 1fr);
  }

  .row-chevron {
    display: none;
  }

  .detail-title {
    margin: 44px 0 36px;
  }

  .detail-title h1 {
    font-size: 40px;
  }

  .detail-content > .completion {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .detail-grid--game .detail-content > .completion {
    grid-template-areas:
      "score"
      "checks";
  }

  .completion__checks {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-image figcaption {
    line-height: 1.5;
  }

  .category-view {
    padding-top: 0;
  }

  .category-card {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .category-card__index {
    font-size: 64px;
  }

  footer {
    height: 300px;
    min-height: 300px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 34px;
    flex-direction: column;
    text-align: center;
  }

  .footer__rights {
    justify-self: center;
    text-align: center;
  }
}

.game-row:not(.game-row--category) > .media-frame {
  grid-area: media;
}

.game-row:not(.game-row--category) > .item-copy {
  grid-area: title;
}

.game-row:not(.game-row--category) > .meta-line {
  grid-area: meta;
  margin-top: 0;
}

.game-row:not(.game-row--category) > .completion--compact {
  grid-area: completion;
}

.game-row:not(.game-row--category)
  > .completion--compact
  .completion__score
  strong {
  font-size: clamp(22px, 2.125vw, 33px);
  line-height: 1.12;
}

.game-row:not(.game-row--category) > .row-chevron {
  grid-area: chevron;
}

.game-row--category > .media-frame {
  grid-area: media;
}

.game-row--category > .item-copy {
  grid-area: title;
}

.game-row--category > .meta-line {
  grid-area: meta;
  margin-top: 0;
}

.game-row--category > .row-chevron {
  grid-area: chevron;
}

@media (min-width: 821px) {
  .game-row:not(.game-row--category) {
    grid-template-areas:
      "media title completion chevron"
      "media meta completion chevron";
  }

  .game-row--category {
    grid-template-areas:
      "media title chevron"
      "media meta chevron";
  }
}

@media (min-width: 561px) and (max-width: 820px) {
  .game-row:not(.game-row--category) {
    grid-template-areas:
      "media title"
      "media meta"
      "completion completion";
  }

  .game-row:not(.game-row--category) > .row-chevron {
    display: none;
  }

  .game-row--category {
    grid-template-areas:
      "media title"
      "media meta";
  }

  .game-row--category > .row-chevron {
    display: none;
  }
}

@media (max-width: 560px) {
  .game-row:not(.game-row--category) {
    grid-template-columns: clamp(96px, 26vw, 130px) minmax(0, 1fr);
    grid-template-areas:
      "media title"
      "meta meta"
      "completion completion";
    gap: 18px 20px;
    padding: 18px 20px;
  }

  .game-row:not(.game-row--category) > .meta-line {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-row:not(.game-row--category) > .completion--compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px;
    grid-template-areas: "checks score";
    align-items: center;
    gap: 20px;
    border-top: 1px solid var(--line);
    border-left: 0;
    margin: 0;
    padding: 14px 0 0;
  }

  .game-row:not(.game-row--category)
    > .completion--compact
    .completion__checks {
    grid-area: checks;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
  }

  .game-row:not(.game-row--category)
    > .completion--compact
    .completion__score {
    grid-area: score;
    align-items: flex-end;
  }

  .game-row:not(.game-row--category)
    > .completion--compact
    .completion__score
    strong {
    font-size: 17px;
  }

  .game-row:not(.game-row--category)
    > .completion--compact
    .completion__score
    span {
    display: none;
  }

  .game-row:not(.game-row--category) > .row-chevron {
    display: none;
  }

  .game-row--category {
    grid-template-columns: clamp(96px, 26vw, 130px) minmax(0, 1fr);
    grid-template-areas:
      "media title"
      "meta meta";
    gap: 18px 20px;
    padding: 18px 20px;
  }

  .game-row--category > .meta-line {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-row--category > .row-chevron {
    display: none;
  }
}

@media (max-width: 380px) {
  .game-row:not(.game-row--category)
    > .completion--compact
    .completion__checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
  }
}

/* List cards: stable metadata alignment and responsive completion. */
.game-row > .row-chevron {
  display: none !important;
}

.game-row > .meta-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  gap: 0;
}

.game-row:not(.game-row--category)
  > .meta-line:has(> span:nth-child(4)) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.game-row--category > .meta-line:has(> span:nth-child(4)) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.game-row:not(.game-row--category)
  > .meta-line:has(> span:nth-child(4))
  > span:nth-child(4) {
  border-left: 1px solid var(--line);
  padding-left: clamp(10px, 1.5vw, 20px);
}

.game-row--category
  > .meta-line:has(> span:nth-child(4))
  > span:nth-child(4) {
  border-left: 1px solid var(--line);
  padding-left: clamp(10px, 1.5vw, 20px);
}

.game-row > .meta-line > span,
.game-row > .meta-line > span:first-child {
  min-width: 0;
  border-left: 1px solid var(--line);
  padding: 0 clamp(10px, 1.5vw, 20px);
  white-space: nowrap;
}

.game-row > .meta-line > span:nth-child(3n + 1) {
  border-left: 0;
  padding-left: 0;
}

.meta-value {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.region-flags {
  display: inline-flex;
  height: 20px;
  min-width: 27px;
  flex: 0 0 auto;
  align-items: center;
  overflow: visible;
  line-height: 1;
}

.region-flags img {
  display: block;
  width: 27px;
  height: 20px;
  flex: 0 0 27px;
}

.region-flags--multiple img + img {
  margin-left: 4px;
}

.region-flags--multiple img {
  border-radius: 4px;
  filter: drop-shadow(0 1px 1px rgba(var(--ink-rgb), 0.2));
}

.region-flags__globe {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 20px;
  flex: 0 0 27px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink-faint);
}

.region-flags__globe svg {
  display: block;
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.region-flags--multiple .region-flags__globe + img,
.region-flags--multiple img + .region-flags__globe {
  margin-left: 4px;
}

.region-flags--symbol,
.region-flags--code {
  width: 27px;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink-faint);
}

.region-flags--symbol svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.region-flags--code {
  width: auto;
  min-width: 27px;
  padding-inline: 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.detail-meta dd.meta-value--region {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.region-help {
  position: relative;
  display: inline-grid;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  place-items: center;
  border: 0;
  border-radius: 0;
  color: var(--ink-faint);
  cursor: help;
  outline: none;
  margin-left: -1px;
}

.format-badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--ink-soft);
}

.format-badge__icon {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.region-help__icon {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.region-help::after {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: min(290px, 74vw);
  padding: 9px 11px;
  border-radius: 6px;
  background: #191817;
  box-shadow: 0 8px 22px rgba(25, 24, 23, 0.18);
  color: #fff;
  content: attr(data-tooltip);
  font-family: var(--game-heading);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  text-transform: none;
  transform: translate(-50%, 4px);
  transition: opacity 150ms ease, transform 150ms ease;
  white-space: pre-line;
}

.region-help:hover::after,
.region-help:focus::after,
.region-help:focus-visible::after,
.region-help[aria-expanded="true"]::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 1081px) {
  .game-row:not(.game-row--category) {
    grid-template-columns: 190px minmax(350px, 1fr) minmax(340px, 0.8fr);
    grid-template-areas:
      "media title completion"
      "media meta completion";
  }

  .game-row--category {
    grid-template-columns: 190px minmax(350px, 1fr);
    grid-template-areas:
      "media title"
      "media meta";
  }
}

@media (min-width: 821px) and (max-width: 1080px) {
  .game-row:not(.game-row--category) {
    grid-template-columns: 150px minmax(300px, 1fr) minmax(280px, 0.8fr);
    grid-template-areas:
      "media title completion"
      "media meta completion";
    gap: 16px;
  }

  .game-row--category {
    grid-template-columns: 150px minmax(300px, 1fr);
    grid-template-areas:
      "media title"
      "media meta";
  }
}

@media (min-width: 561px) {
  .game-row:not(.game-row--category)
    > .completion--compact
    .completion__checks {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px 14px;
  }

  .game-row:not(.game-row--category)
    > .completion--compact
    .completion__checks .check {
    flex: 0 1 auto;
  }
}

@media (min-width: 821px) {
  .game-row:not(.game-row--category) > .completion--compact {
    align-self: stretch;
    justify-content: space-between;
    padding-top: 0;
  }

  .game-row:not(.game-row--category)
    > .completion--compact
    .completion__score {
    transform: translateY(10px);
  }

  .game-row:not(.game-row--category)
    > .completion--compact
    .completion__checks {
    transform: translateY(-5px);
  }
}

@media (max-width: 560px) {
  /* Les métadonnées des objets restent lisibles avec des éditeurs longs. */
  .game-row--category > .meta-line {
    grid-template-columns:
      minmax(52px, 0.65fr)
      minmax(0, 1.75fr)
      minmax(76px, 1fr);
  }

  .game-row--category > .meta-line:has(> span:nth-child(4)) {
    grid-template-columns:
      minmax(52px, 0.6fr)
      minmax(0, 1.45fr)
      minmax(58px, 0.8fr)
      minmax(76px, 1fr);
  }

  .game-row--category > .meta-line > span,
  .game-row--category > .meta-line:has(> span:nth-child(4)) > span {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .game-row:not(.game-row--category) > .meta-line,
  .game-row--category > .meta-line {
    width: 100%;
  }

  .game-row:not(.game-row--category) > .meta-line > span {
    font-size: 11px;
  }

  .game-row--category > .meta-line > span {
    font-size: 11px;
  }

  .game-row:not(.game-row--category) > .meta-line small {
    font-size: 8px;
    letter-spacing: 0.11em;
  }

  .game-row--category > .meta-line small {
    font-size: 8px;
    letter-spacing: 0.11em;
  }

  .game-row--category > .meta-line:has(> span:nth-child(4)) {
    grid-template-columns:
      minmax(52px, 0.6fr)
      minmax(0, 1.45fr)
      minmax(58px, 0.8fr)
      minmax(76px, 1fr);
  }

  .game-row--category
    > .meta-line:has(> span:nth-child(4))
    > span {
    padding-inline: 6px;
  }

  .game-row--category
    > .meta-line:has(> span:nth-child(4))
    > span:first-child {
    padding-left: 0;
  }

  .game-row:not(.game-row--category)
    > .meta-line:has(> span:nth-child(4)) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .game-row:not(.game-row--category)
    > .meta-line:has(> span:nth-child(4))
    > span {
    border-left: 1px solid var(--line);
    padding: 0 6px;
    font-size: 11px;
  }

  .game-row:not(.game-row--category)
    > .meta-line:has(> span:nth-child(4))
    > span:first-child {
    border-left: 0;
    padding-left: 0;
  }

  .game-row:not(.game-row--category)
    > .meta-line:has(> span:nth-child(4))
    small {
    font-size: 8px;
    letter-spacing: 0.11em;
  }

  .game-row:not(.game-row--category)
    > .completion--compact
    .completion__checks {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
  }

  .game-row:not(.game-row--category)
    > .completion--compact
    .completion__checks .check {
    gap: 4px;
    font-size: 10px;
    white-space: nowrap;
  }

  .game-row:not(.game-row--category)
    > .completion--compact
    .completion__checks .check i {
    width: 16px;
    height: 16px;
    min-width: 16px;
    flex-basis: 16px;
    font-size: 10px;
  }
}

/* Métadonnées des listes : Auto Layout horizontal, tous les champs en Fill. */
.game-row > .meta-line,
.game-row:not(.game-row--category) > .meta-line,
.game-row--category > .meta-line,
.game-row > .meta-line:has(> span:nth-child(4)),
.game-row:not(.game-row--category) > .meta-line:has(> span:nth-child(4)),
.game-row--category > .meta-line:has(> span:nth-child(4)) {
  display: flex;
  flex-flow: row nowrap;
  align-items: stretch;
  width: 100%;
  gap: 0;
}

.game-row > .meta-line > span,
.game-row > .meta-line > span:first-child,
.game-row > .meta-line > span:nth-child(3n + 1) {
  flex: 1 1 auto;
  min-width: 0;
  border-left: 1px solid var(--line);
  padding: 0 clamp(8px, 1.25vw, 18px);
  white-space: normal;
  overflow-wrap: anywhere;
}

.game-row > .meta-line > span:first-child {
  border-left: 0;
  padding-left: 0;
}

@media (max-width: 560px) {
  .game-row > .meta-line,
  .game-row:not(.game-row--category) > .meta-line,
  .game-row--category > .meta-line,
  .game-row > .meta-line:has(> span:nth-child(4)),
  .game-row:not(.game-row--category) > .meta-line:has(> span:nth-child(4)),
  .game-row--category > .meta-line:has(> span:nth-child(4)) {
    display: flex;
    flex-flow: row nowrap;
    align-items: stretch;
  }

  .game-row > .meta-line > span,
  .game-row--category > .meta-line > span,
  .game-row--category > .meta-line:has(> span:nth-child(4)) > span,
  .game-row:not(.game-row--category)
    > .meta-line:has(> span:nth-child(4))
    > span {
    min-width: 0;
    padding-inline: clamp(4px, 1.8vw, 8px);
    font-size: clamp(9px, 2.65vw, 11px);
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .game-row > .meta-line > span:first-child,
  .game-row--category > .meta-line > span:first-child,
  .game-row--category
    > .meta-line:has(> span:nth-child(4))
    > span:first-child,
  .game-row:not(.game-row--category)
    > .meta-line:has(> span:nth-child(4))
    > span:first-child {
    padding-left: 0;
  }

  .game-row > .meta-line small,
  .game-row--category > .meta-line small,
  .game-row:not(.game-row--category) > .meta-line small {
    font-size: clamp(7px, 2vw, 8px);
    letter-spacing: 0.08em;
  }

  .game-row > .meta-line .meta-value {
    gap: 4px;
  }

  .game-row > .meta-line .region-help,
  .game-row > .meta-line .region-help__icon {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1180px) {
  .masthead,
  .masthead.is-compact {
    min-height: 60px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding-inline: 16px;
  }

  .brand__plate,
  .masthead.is-compact .brand__plate {
    padding: 8px 0;
  }

  .brand__wordmark,
  .masthead.is-compact .brand__wordmark {
    font-size: clamp(14px, 4vw, 18px);
  }

  .menu-toggle {
    display: grid;
  }
}

/* --------------------------------------------------------------------------
   Système typographique mobile-first
   Tous les composants visibles sont ramenés à l’échelle déclarée dans :root.
   -------------------------------------------------------------------------- */

body {
  font-size: var(--type-body);
}

.main-nav :is(button, a) {
  font-size: var(--type-ui);
}

.masthead.is-compact .main-nav :is(button, a),
.collection-index strong,
.eyebrow,
.check,
.maker-platform-links a,
footer,
.region-help::after {
  font-size: var(--type-small);
}

.collection-index,
.overview-card small,
.platform-select label,
.detail-label,
.item-kicker,
.alphabet-index button,
.letter-divider {
  font-size: var(--type-caption);
}

.breadcrumb,
.home-stats > span,
.overview-card > span,
.meta-line small,
.completion__score span,
.detail-image-trigger__hint,
.detail-placeholder small,
.detail-image figcaption,
.detail-meta dt {
  font-size: var(--type-xs);
}

.home-introduction,
.home-hero:has(> .breadcrumb) > p:not(.eyebrow):not(.selection-guidance),
.section-heading h2 {
  font-size: var(--type-body);
}

.home-introduction__lead {
  font-size: var(--type-lead);
}

.home-hero h1,
.platform-hero:not(.category-hero) .title-line h1,
.category-hero .title-line h1,
.title-line h1,
.category-view > h1 {
  font-size: var(--page-title-size);
}

.detail-title h1 {
  font-size: var(--detail-title-size);
}

.overview-card strong,
.category-card h2 {
  font-size: var(--type-subtitle);
}

.item-copy > strong,
.game-row .item-copy > strong {
  font-size: var(--list-title-size);
  font-weight: 400;
}

.meta-line > span,
.empty-list,
.summary,
.detail-grid--game .summary,
.detail-grid--hardware .summary,
.detail-grid:not(.detail-grid--game):not(.detail-grid--hardware) .summary,
.detail-meta dd,
.collection-note,
.count span {
  font-size: var(--type-ui);
}

.completion__score strong,
.game-row:not(.game-row--category) > .completion--compact .completion__score strong {
  font-size: var(--completion-size);
}

.detail-content > .completion .completion__score strong {
  font-size: var(--type-title-large);
}

.check i {
  font-size: var(--type-small);
}

.back-link,
.footer__brand strong {
  font-size: var(--type-ui);
}

.home-stats strong,
.count strong,
.detail-title__year,
.detail-placeholder,
.image-lightbox__close {
  font-size: var(--stat-size);
}

.overview-card i {
  font-size: var(--type-body);
}

.category-card__index {
  font-size: var(--type-display-large);
}

.back-to-top {
  font-size: var(--type-lead);
}

@media (max-width: 560px) {
  .game-row > .meta-line > span,
  .game-row--category > .meta-line > span,
  .game-row--category > .meta-line:has(> span:nth-child(4)) > span,
  .game-row:not(.game-row--category) > .meta-line:has(> span:nth-child(4)) > span {
    font-size: var(--type-small);
  }

  .game-row > .meta-line small,
  .game-row--category > .meta-line small,
  .game-row:not(.game-row--category) > .meta-line small {
    font-size: var(--type-2xs);
  }

  .game-row:not(.game-row--category) > .completion--compact .completion__checks .check,
  .game-row:not(.game-row--category) > .completion--compact .completion__checks .check i {
    font-size: var(--type-caption);
  }
}

@media (min-width: 561px) {
  :root {
    --page-title-size: var(--type-title-large);
    --detail-title-size: var(--type-title-large);
    --list-title-size: var(--type-subtitle);
    --completion-size: var(--type-title);
  }

  .home-introduction__lead {
    font-size: var(--type-subtitle);
  }

  .overview-card strong,
  .category-card h2 {
    font-size: var(--type-title);
  }
}

@media (min-width: 821px) {
  :root {
    --page-title-size: var(--type-display);
    --detail-title-size: var(--type-display);
    --list-title-size: 28px;
    --stat-size: var(--type-title-large);
  }

  .detail-content > .completion .completion__score strong,
  .category-card h2 {
    font-size: var(--type-display);
  }

  .detail-content > .completion .check {
    font-size: 12px;
  }

  .summary,
  .detail-grid--game .summary,
  .detail-grid--hardware .summary,
  .detail-grid:not(.detail-grid--game):not(.detail-grid--hardware) .summary,
  .collection-note {
    font-size: 1rem;
  }
}

@media (min-width: 1281px) {
  :root {
    --page-title-size: var(--type-display-large);
    --detail-title-size: 48px;
  }

  .category-hero .title-line h1 {
    font-size: var(--type-display-large);
  }
}

/* Tous les titres de plateformes reprennent la graisse de « Game Boy ». */
.platform-hero:not(.category-hero) .title-line h1 {
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
