/* Trame. Une seule famille, Archivo, jouée sur son axe de largeur :
   étroite et lourde pour les titres, normale pour la lecture, large pour les petits repères.
   Martian Mono est réservée aux valeurs mesurées. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("../fonts/martian-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

:root {
  --ink: #0c0c0d;
  --ink-2: #161617;
  --ink-3: #232324;
  --bone: #ece8e1;
  --bone-2: #a8a59e;
  --line: rgba(236, 232, 225, 0.16);
  --line-ink: rgba(12, 12, 13, 0.2);
  --red: #ff3a24;
  --gut: clamp(16px, 2.4vw, 40px);
  --nav: 60px;
  --r: 10px;
  --r-lg: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --mono: "Martian Mono", ui-monospace, monospace;
  interpolate-size: allow-keywords;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); scroll-padding-top: calc(var(--nav) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  color: var(--bone);
  background: var(--ink);
  font: 400 clamp(16px, 1.15vw, 18px)/1.5 "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, canvas { display: block; }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
::selection { background: var(--red); color: var(--ink); }

.sr, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 8px 14px; background: var(--bone); color: var(--ink); }

/* ---------- Titres ---------- */
h1, .title {
  font-stretch: 62%;
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.title { font-size: clamp(52px, 8.6vw, 148px); }
.title, .shop-hero h1 { white-space: pre-line; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: var(--nav); padding-inline: var(--gut);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s, border-color 0.25s;
}
.nav.is-solid { background: var(--ink); border-color: var(--line); }
.logo { font-stretch: 125%; font-weight: 800; font-size: 21px; letter-spacing: -0.03em; transition: font-stretch 0.35s var(--ease); justify-self: start; }
.logo:hover { font-stretch: 62%; }
.nav nav { display: flex; gap: clamp(18px, 2.6vw, 40px); font-stretch: 110%; font-size: 14px; font-weight: 500; }
.nav nav a { position: relative; padding-block: 6px; }
.nav nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--red);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.nav nav a:hover::after, .nav nav a[aria-current]::after { transform: scaleX(1); }
.nav nav svg { display: none; }
.nav__end { justify-self: end; display: flex; align-items: center; gap: clamp(10px, 1.6vw, 22px); }
.nav__dl { font-stretch: 100%; font-size: 14px; font-weight: 600; line-height: 1; padding: 11px 15px; border-radius: var(--r); background: var(--bone); color: var(--ink); transition: background-color 0.2s, transform 0.2s var(--ease); }
.nav__dl:hover { background: var(--red); transform: translateY(-1px); }
.lang { position: relative; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 8px; height: 37px; padding: 0 10px 0 9px;
  font-size: 14px; font-weight: 500; line-height: 1; color: var(--bone-2); border-radius: var(--r);
  box-shadow: inset 0 0 0 1px var(--line); transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.lang__btn:hover, .lang.is-open .lang__btn { color: var(--bone); background: var(--ink-3); box-shadow: inset 0 0 0 1px rgba(236, 232, 225, 0.3); }
.lang__globe { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; }
.lang__chev { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform 0.3s var(--ease); }
.lang.is-open .lang__chev { transform: rotate(180deg); }
.lang__menu {
  position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; min-width: 196px; padding: 6px;
  display: grid; gap: 2px; border-radius: 14px; background: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line), 0 24px 50px -18px rgba(0, 0, 0, 0.9);
  transform-origin: top right; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.97);
  transition: opacity 0.18s, transform 0.28s var(--ease), visibility 0.18s;
}
.lang.is-open .lang__menu { opacity: 1; visibility: visible; transform: none; transition: opacity 0.18s, transform 0.28s var(--ease), visibility 0s; }
.lang__item {
  display: grid; grid-template-columns: auto 1fr 16px; align-items: center; gap: 11px; width: 100%; padding: 9px 10px 9px 9px;
  font-size: 14px; font-weight: 500; line-height: 1; text-align: left; color: var(--bone-2); border-radius: 9px;
  transition: background-color 0.15s, color 0.15s;
}
.lang__item:hover, .lang__item:focus-visible { background: var(--ink-3); color: var(--bone); }
.lang__item:focus-visible { outline-offset: -2px; }
.lang__item[aria-checked="true"] { color: var(--bone); }
.lang__code { min-width: 28px; padding: 5px 0; text-align: center; font: 500 10px/1 var(--mono); font-stretch: 87.5%; text-transform: uppercase; border-radius: 6px; background: var(--ink-3); color: var(--bone-2); transition: background-color 0.15s, color 0.15s; }
.lang__item:hover .lang__code, .lang__item:focus-visible .lang__code { background: var(--ink); }
.lang__item[aria-checked="true"] .lang__code { background: var(--red); color: var(--ink); }
.lang__tick { width: 16px; height: 16px; fill: none; stroke: var(--red); stroke-width: 2.4; opacity: 0; }
.lang__item[aria-checked="true"] .lang__tick { opacity: 1; }
.nav__cart { position: relative; width: 42px; height: 42px; display: grid; place-items: center; transition: color 0.2s; }
.nav__cart svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: miter; overflow: visible; }
.nav__cart .handle { transition: transform 0.3s var(--ease); }
.nav__cart:hover { color: var(--red); }
.nav__cart:hover .handle { transform: translateY(-2px); }
.nav__badge {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding-inline: 4px;
  display: grid; place-items: center; border-radius: 6px;
  font: 600 10px/1 var(--mono); font-stretch: 87.5%; background: var(--red); color: var(--ink);
}
.nav__badge.bump { animation: bump 0.35s var(--ease); }
@keyframes bump { 40% { transform: translateY(-4px) scale(1.15); } }

/* ---------- Boutons et liens ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  padding: 16px 22px; background: var(--red); color: var(--ink);
  font-stretch: 75%; font-weight: 700; font-size: 20px; line-height: 1;
  transition: color 0.2s;
}
.btn { border-radius: var(--r); }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bone);
  transform: translateX(-101%); transition: transform 0.35s var(--ease);
}
.btn:hover::before { transform: none; }
.btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateY(2px); }

/* Bouton Télécharger : une tuile pour l'icône, le titre, et ce qu'il faut savoir en dessous. */
.dlbtn {
  display: inline-flex; align-items: center; gap: 13px; padding: 7px 24px 7px 7px;
  border-radius: 14px; background: var(--red); color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 10px 30px -14px rgba(255, 58, 36, 0.9);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background-color 0.2s;
}
.dlbtn:hover { transform: translateY(-2px); background: #ff4b36; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 18px 44px -14px rgba(255, 58, 36, 1); }
.dlbtn:active { transform: translateY(0) scale(0.985); }
.dlbtn__icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; overflow: hidden; border-radius: 10px; background: var(--ink); color: var(--bone); }
.dlbtn__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.dlbtn:hover .dlbtn__icon svg path:first-child { animation: drop 0.7s var(--ease); }
@keyframes drop { 0% { transform: translateY(0); opacity: 1; } 45% { transform: translateY(14px); opacity: 0; } 46% { transform: translateY(-14px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
.dlbtn__text { display: grid; gap: 3px; text-align: left; }
.dlbtn__text b { font-stretch: 75%; font-weight: 700; font-size: 22px; line-height: 1; }
.dlbtn__text small { font-size: 13px; font-weight: 500; line-height: 1; opacity: 0.78; }
.dlbtn--large { padding: 9px 30px 9px 9px; gap: 16px; }
.dlbtn--large .dlbtn__icon { width: 56px; height: 56px; }
.dlbtn--large .dlbtn__text b { font-size: 27px; }
.dlbtn[aria-disabled="true"] { background: var(--ink-3); color: var(--bone-2); box-shadow: inset 0 0 0 1px var(--line); cursor: not-allowed; transform: none; }
.dlbtn[aria-disabled="true"] .dlbtn__icon { background: var(--ink-2); color: var(--bone-2); }
.dlbtn[aria-disabled="true"] .dlbtn__icon svg path:first-child { animation: none; }

.btn:disabled { background: var(--ink-3); color: var(--bone-2); cursor: not-allowed; }
.btn:disabled::before { display: none; }
.btn--full { width: 100%; }
.btn--small { padding: 11px 14px; font-size: 16px; }
.btn--ink { background: var(--ink); color: var(--bone); }
.btn--ink::before { background: var(--red); }
.btn--ink:hover { color: var(--ink); }
.btn.is-in { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.is-in::before { background: currentColor; opacity: 0.12; }
.btn.is-in:hover { color: inherit; }

.link {
  font-stretch: 110%; font-size: 14px; font-weight: 500;
  padding-block: 4px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
  transition: background-size 0.3s var(--ease);
}
.link:hover { background-size: 28% 1.5px; }

/* ---------- Accueil ---------- */
.hero { position: relative; height: 100svh; min-height: 680px; overflow: hidden; isolation: isolate; }
.hero__art {
  position: absolute; z-index: -1; left: 0; top: 16%; width: 100%; height: 100%;
  object-fit: cover; object-position: right top;
  -webkit-mask-image: linear-gradient(to bottom, transparent 8%, #000 34%);
  mask-image: linear-gradient(to bottom, transparent 8%, #000 34%);
  animation: art-in 1.5s var(--ease) both;
}
@keyframes art-in { from { opacity: 0; transform: translateY(3%); } }
.hero__copy { padding: calc(var(--nav) + clamp(16px, 4svh, 56px)) var(--gut) 0; }
.hero__kicker { font-stretch: 110%; font-size: clamp(13px, 1vw, 15px); font-weight: 500; color: var(--bone-2); margin-bottom: 14px; }
.hero h1 { font-size: min(8.4vw, 16.5svh); }
.line { display: block; overflow: hidden; padding-bottom: 0.2em; margin-bottom: -0.2em; }
.line > span { display: block; animation: rise 1s var(--ease) both; }
.line:nth-child(2) > span { animation-delay: 0.09s; }
@keyframes rise { from { transform: translateY(125%); } }
.hero__lede { max-width: 44ch; margin-top: clamp(14px, 2.4svh, 26px); font-size: clamp(16px, 1.3vw, 20px); line-height: 1.42; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: clamp(14px, 2.4svh, 26px); }

.section.demo { padding-inline: 0; padding-top: clamp(72px, 9vw, 130px); padding-bottom: clamp(56px, 7vw, 100px); }
.demo__head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; align-items: end; padding-inline: var(--gut); }
.demo__head .title { grid-column: 1 / span 8; }
.demo__head p { grid-column: 9 / -1; max-width: 40ch; }

.compare { display: inline-flex; gap: 4px; padding: 4px; margin: clamp(30px, 4vw, 56px) var(--gut) 18px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.compare__btn { border-radius: var(--r); padding: 13px 24px; font-stretch: 75%; font-weight: 700; font-size: clamp(20px, 1.8vw, 26px); line-height: 1; color: var(--bone-2); transition: background-color 0.25s, color 0.25s; }
.compare__btn:hover { color: var(--bone); }
.compare__btn[data-mode="off"][aria-pressed="true"] { background: var(--bone); color: var(--ink); }
.compare__btn[data-mode="on"][aria-pressed="true"] { background: var(--red); color: var(--ink); }

.strip { position: relative; overflow: hidden; height: clamp(190px, 38svh, 430px); border-block: 1px solid var(--line); }
.strip__track { position: absolute; inset: 0 auto 0 0; display: flex; width: max-content; will-change: transform; filter: saturate(0.3) brightness(0.74); transition: filter 0.7s; }
.is-on .strip__track { filter: none; }
.strip__frame { position: relative; flex: none; height: 100%; aspect-ratio: 1280 / 414; border-right: 2px solid var(--ink); }
.strip__frame img { width: 100%; height: 100%; object-fit: cover; }
.strip__sweep { position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--red); opacity: 0; pointer-events: none; }
.strip.sweep .strip__sweep { animation: sweep 0.9s var(--ease); }
@keyframes sweep { 0% { opacity: 1; left: 0; } 90% { opacity: 1; } 100% { opacity: 0; left: 100%; } }

.graph { height: clamp(110px, 17svh, 170px); border-bottom: 1px solid var(--line); }
.graph canvas { width: 100%; height: 100%; }

.demo__foot { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px 20px; align-items: start; padding: 22px var(--gut) 0; }
.demo__explain { grid-column: 1 / span 6; max-width: 54ch; }
.demo__explain b { font-weight: 700; }
.readout { grid-column: 8 / -1; display: flex; gap: clamp(24px, 4vw, 64px); }
.readout dt { font-size: 14px; color: var(--bone-2); }
.readout dd { font-stretch: 62%; font-weight: 800; font-size: clamp(52px, 5.4vw, 88px); line-height: 1; font-variant-numeric: tabular-nums; min-width: 2ch; }
.is-on .readout dd { color: var(--red); }
.demo__note { grid-column: 8 / -1; font-size: 13px; color: var(--bone-2); }

/* ---------- Téléchargement ---------- */
.dl { display: grid; grid-template-columns: repeat(12, 1fr); gap: 30px 20px; align-items: center; border-top: 1px solid var(--line); }
.dl__art { grid-column: 1 / span 7; margin-left: calc(var(--gut) * -1); }
.dl__art img {
  width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(to right, #000 68%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, #000 68%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  mask-composite: intersect;
}
.dl__body { grid-column: 8 / -1; }
.dl .title { font-size: clamp(52px, 6.6vw, 112px); margin-bottom: clamp(20px, 2.6vw, 36px); }
.dl__steps { counter-reset: s; margin-bottom: 26px; border-top: 1px solid var(--line); }
.dl__steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; padding-block: 11px; border-bottom: 1px solid var(--line); }
.dl__steps li::before { content: counter(s); grid-row: span 2; font-stretch: 62%; font-weight: 800; font-size: 26px; line-height: 1.05; color: var(--red); }
.dl__steps b { font-stretch: 75%; font-weight: 700; font-size: 21px; line-height: 1.15; }
.dl__steps span { font-size: 15px; color: var(--bone-2); }
.dl__specs { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 12px 20px; margin-top: 24px; }
.dl__specs dt { font-size: 13px; color: var(--bone-2); }
.dl__specs dd { font-size: 15px; font-weight: 600; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 150px) var(--gut); }

/* Apparition : le titre se comprime en entrant, comme une image qui se cale. */
.reveal { opacity: 0; font-stretch: 86%; transition: opacity 0.5s, font-stretch 1.1s var(--ease); }
.reveal.in { opacity: 1; font-stretch: 62%; }

/* ---------- Plateforme : Boost, Capture, Studio ---------- */
.platform { padding-top: clamp(64px, 8vw, 120px); padding-bottom: 0; }
.platform__head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; align-items: end; margin-bottom: clamp(26px, 3.4vw, 50px); }
.platform__head .title { grid-column: 1 / span 8; }
.platform__head p { grid-column: 9 / -1; max-width: 40ch; }
.bricks { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.2vw, 18px); }
.brick { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); transition: transform 0.45s var(--ease), box-shadow 0.45s; }
.brick:hover { transform: translateY(-5px); box-shadow: inset 0 0 0 1px rgba(236, 232, 225, 0.32), 0 26px 60px -30px #000; }
.brick__art { aspect-ratio: 4 / 3; overflow: hidden; }
.brick__art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.brick:hover .brick__art img { transform: scale(1.05); }
.brick__body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: clamp(16px, 1.6vw, 24px); }
.brick__status { align-self: flex-start; padding: 6px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; line-height: 1; color: var(--bone-2); box-shadow: inset 0 0 0 1px var(--line); }
.brick__status--live { background: var(--red); color: var(--ink); box-shadow: none; }
.brick h3 { font-stretch: 62%; font-weight: 800; font-size: clamp(40px, 4.2vw, 68px); line-height: 0.95; }
.brick__body > p:not([class]) { color: var(--bone-2); }
.brick__access { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--bone-2); }
.brick__access b { color: var(--bone); font-weight: 600; }

/* ---------- Jeux ---------- */
#jeux { padding-inline: 0; padding-bottom: 0; }
.games-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px 20px; align-items: end; padding-inline: var(--gut); }
.games-head .title { grid-column: 1 / span 7; }
.games-tools { grid-column: 8 / -1; display: grid; gap: 22px; }
.games-tools p { max-width: 46ch; }
.search { display: flex; align-items: center; gap: 10px; border-bottom: 1.5px solid var(--bone); padding-block: 8px; }
.search:focus-within { border-color: var(--red); }
.search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; }
.search input { width: 100%; background: none; border: 0; outline: 0; font-size: 18px; }
.search input::placeholder { color: var(--bone-2); }
.search input::-webkit-search-cancel-button { filter: invert(1); }

.tabs { display: flex; gap: clamp(16px, 2.2vw, 34px); padding: clamp(32px, 4vw, 56px) var(--gut) 18px; overflow-x: auto; scrollbar-width: none; }
.tab { flex: none; font-stretch: 75%; font-weight: 600; font-size: clamp(19px, 1.8vw, 26px); line-height: 1.1; color: var(--bone-2); transition: color 0.2s, font-stretch 0.35s var(--ease); }
.tab sup { font: 500 10px/1 var(--mono); font-stretch: 87.5%; margin-left: 4px; vertical-align: 0.85em; }
.tab:hover { color: var(--bone); }
.tab[aria-pressed="true"] { color: var(--red); font-stretch: 100%; }

.games { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.games li { background: var(--ink); min-width: 0; }
.gcard {
  position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; text-align: left; overflow: hidden;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.9s var(--ease) var(--d, 0ms);
}
.gcard.in { clip-path: inset(0); }
.gcard:focus-visible { outline-offset: -3px; }
.gcard__art { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; background: var(--ink-2); }
.gcard__art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease), filter 0.4s; }
.gcard:hover .gcard__art img, .gcard:focus-visible .gcard__art img { transform: scale(1.05); filter: brightness(0.6); }

.gcard__foot {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  flex: 1; padding: 11px 12px 12px; background: var(--ink); position: relative; z-index: 2;
}
.gcard__name {
  font-stretch: 62%; font-weight: 700; font-size: clamp(19px, 1.65vw, 24px); line-height: 1.02;
  transition: font-stretch 0.45s var(--ease), color 0.2s;
}
.gcard:hover .gcard__name, .gcard:focus-visible .gcard__name { font-stretch: 78%; }
.gcard__target { font: 500 11px/1 var(--mono); font-stretch: 87.5%; color: var(--bone-2); flex: none; }

.gcard__hud {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 14px 12px 12px; background: var(--ink); border-top: 2px solid var(--red);
  display: grid; gap: 6px;
  transform: translateY(102%); transition: transform 0.45s var(--ease);
}
.gcard:hover .gcard__hud, .gcard:focus-visible .gcard__hud { transform: none; }
.gcard__ms { font-stretch: 62%; font-weight: 800; font-size: clamp(40px, 4.4vw, 68px); line-height: 0.95; }
.gcard__ms small { font-size: 0.4em; font-weight: 600; color: var(--bone-2); }
.gcard__per { font-size: 13px; line-height: 1.25; color: var(--bone-2); }
.gcard__tech { font-size: 13px; line-height: 1.3; }
.meter { display: block; height: 4px; background: var(--ink-3); margin-block: 4px; }
.meter i { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 0.7s var(--ease) 0.12s; }
.gcard:hover .meter i, .gcard:focus-visible .meter i { transform: none; }

/* Le balayage d'un rafraîchissement d'écran. */
.gcard__scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--red); opacity: 0; pointer-events: none; z-index: 3; }
.gcard:hover .gcard__scan, .pcard:hover .gcard__scan { animation: scan 0.6s linear; }
@keyframes scan { 0% { top: 0; opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

.games-empty { padding: 56px var(--gut); display: grid; gap: 12px; justify-items: start; font-size: 22px; border-bottom: 1px solid var(--line); }

::view-transition-group(*) { animation-duration: 0.45s; animation-timing-function: var(--ease); }

/* ---------- Fiche d'un jeu ---------- */
dialog { color: var(--bone); border: 0; padding: 0; background: var(--ink-2); }
dialog::backdrop { background: rgba(5, 5, 6, 0.78); }
.sheet { border-radius: var(--r-lg); width: min(860px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; position: fixed; }
.sheet[open] { animation: sheet-in 0.5s var(--ease); }
@keyframes sheet-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
.sheet__art { width: 100%; aspect-ratio: 1280 / 414; object-fit: cover; background: var(--ink-3); }
.sheet__body { padding: clamp(18px, 3vw, 36px); }
.sheet__cat { font-size: 14px; color: var(--bone-2); }
.sheet__title { font-stretch: 62%; font-weight: 800; font-size: clamp(44px, 7vw, 84px); line-height: 0.92; margin-block: 4px 22px; }
.sheet__stats { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); margin-bottom: 26px; }
.sheet__stats > div { padding: 12px 12px 14px 0; }
.sheet__stats > div + div { border-left: 1px solid var(--line); padding-left: 12px; }
.sheet__stats dt { font-size: 13px; color: var(--bone-2); }
.sheet__stats dd { font-stretch: 75%; font-weight: 700; font-size: clamp(19px, 2.2vw, 26px); line-height: 1.15; margin-top: 2px; }
.sheet h3 { font-stretch: 110%; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.sheet__tweaks { margin-bottom: 26px; }
.sheet__tweaks li { padding-block: 9px; border-bottom: 1px solid var(--line); }
.close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r); background: var(--ink); transition: background-color 0.2s, color 0.2s; }
.close:hover { background: var(--red); color: var(--ink); }
.close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ---------- Méthode ---------- */
.budget { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 20px; padding-bottom: 0; }
.budget .title { grid-column: 1 / -1; font-size: clamp(44px, 7vw, 120px); margin-bottom: clamp(20px, 3vw, 44px); }
.budget__sticky {
  grid-column: 1 / -1; position: sticky; top: var(--nav); z-index: 1;
  background: var(--ink); padding-block: 14px 16px; border-bottom: 1px solid var(--line);
}
.budget__total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 15px; margin-bottom: 10px; }
.budget__total b { font-stretch: 62%; font-weight: 800; font-size: clamp(40px, 4vw, 60px); line-height: 1; color: var(--red); }
.budget__total i { font-style: normal; }
.budget__total span { color: var(--bone-2); font-size: 13px; margin-left: auto; }

.bar { display: flex; gap: 2px; height: 66px; background: repeating-linear-gradient(135deg, transparent 0 5px, var(--ink-3) 5px 6px); }
.seg {
  --w: 20%;
  flex: 0 0 var(--w); min-width: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: 7px 9px; background: var(--bone); color: var(--ink); white-space: nowrap;
  container-type: inline-size;
  transition: flex-basis 0.9s var(--ease), background-color 0.3s, color 0.3s;
}
@container (max-width: 60px) { .seg span { display: none; } .seg em { font-size: 10px; letter-spacing: -0.04em; } }
.seg span { font-size: 13px; font-weight: 600; line-height: 1.1; }
.seg em { font: 500 13px/1 var(--mono); font-stretch: 75%; font-style: normal; }
.seg--keep { background: var(--red); }
.budget:not([data-stage="0"]) .seg:not(.seg--keep) { background: var(--ink-3); color: var(--bone); }
.budget[data-stage="1"] .seg[data-seg="windows"],
.budget[data-stage="2"] .seg[data-seg="pilote"],
.budget[data-stage="3"] .seg[data-seg="jeu"] { background: var(--bone); color: var(--ink); }

.steps { grid-column: 6 / -1; padding-block: 22vh 30vh; display: grid; gap: 30vh; }
.step { transition: opacity 0.4s; opacity: 0.32; }
.step.is-active { opacity: 1; }
.step h3 { font-stretch: 62%; font-weight: 800; font-size: clamp(38px, 5vw, 76px); line-height: 0.95; margin-bottom: 12px; }
.step p { max-width: 50ch; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.42; }

/* ---------- Ce que Trame ne fera jamais ---------- */
.nots { border-top: 1px solid var(--line); }
.nots__intro { font-stretch: 110%; font-size: 16px; font-weight: 600; margin-bottom: clamp(22px, 3vw, 44px); }
.nots .reveal { font-stretch: 110%; }
.strike { display: grid; grid-template-columns: 2fr 1fr; gap: 6px 20px; align-items: end; padding-block: clamp(14px, 1.6vw, 24px); border-top: 1px solid var(--line); }
.strike__t { font-stretch: 62%; font-weight: 800; font-size: clamp(36px, 5.2vw, 92px); line-height: 1; color: var(--bone-2); text-wrap: balance; }
.strike s {
  text-decoration: none;
  background: linear-gradient(var(--red), var(--red)) 0 58% / 0 clamp(4px, 0.55vw, 8px) no-repeat;
  transition: background-size 0.9s var(--ease) 0.15s;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.strike.in s { background-size: 100% clamp(4px, 0.55vw, 8px); }
.strike p { padding-bottom: 0.5em; max-width: 38ch; }

/* ---------- Licences, sur papier ---------- */
.paper { background: var(--bone); color: var(--ink); }
.paper ::selection { color: var(--bone); }
.paper__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: clamp(30px, 5vw, 70px); }
.price {
  display: grid; grid-template-columns: 148px 2.2fr 4fr 2fr auto; gap: 8px 24px; align-items: center;
  padding-block: 16px; border-top: 1px solid var(--line-ink);
  transition: padding 0.4s var(--ease);
}
.price:last-child { border-bottom: 1px solid var(--line-ink); }
.price__art { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r); }
.price__art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.price:hover .price__art img { transform: scale(1.09); }
.price__name { font-stretch: 62%; font-weight: 800; font-size: clamp(36px, 4.2vw, 68px); line-height: 1; }
.price__text { max-width: 44ch; }
.price__num { font-stretch: 75%; font-weight: 700; font-size: clamp(26px, 2.6vw, 38px); line-height: 1; white-space: nowrap; }
.price__num small { font-size: 0.5em; font-weight: 500; margin-left: 2px; }
.price .btn { min-width: 170px; }

/* ---------- Questions ---------- */
.faq { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px 20px; }
.faq .title { grid-column: 1 / span 5; font-size: clamp(48px, 6.2vw, 104px); }
.faq__list { grid-column: 6 / -1; border-bottom: 1px solid var(--line); }
details { border-top: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center;
  padding-block: 18px; font-stretch: 75%; font-weight: 700; font-size: clamp(23px, 2.2vw, 32px); line-height: 1.1;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 15px; height: 15px;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform 0.35s var(--ease), color 0.2s;
}
details[open] summary::after { transform: rotate(45deg); color: var(--red); }
details::details-content { block-size: 0; overflow: hidden; transition: block-size 0.4s var(--ease), content-visibility 0.4s allow-discrete; }
details[open]::details-content { block-size: auto; }
details p { padding-bottom: 20px; max-width: 58ch; }

/* ---------- Pied de page ---------- */
.footer { border-top: 1px solid var(--line); overflow: hidden; padding-top: 24px; }
.footer__top { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 40px; padding-inline: var(--gut); font-size: 14px; }
.footer__top nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 500; align-self: flex-start; }
.footer__top nav a:hover { color: var(--red); }
.footer__legal { display: grid; gap: 4px; }
.footer__top p { color: var(--bone-2); max-width: 54ch; }
.footer__word {
  pointer-events: none; user-select: none;
  font-weight: 800; font-size: 32.4vw; line-height: 0.78; letter-spacing: -0.045em; text-align: center; white-space: nowrap;
  font-stretch: 125%; margin-top: 30px; margin-bottom: -0.03em; color: var(--red);
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .footer__word { animation: unpack linear both; animation-timeline: view(); animation-range: entry 0% cover 60%; }
    @keyframes unpack { from { font-stretch: 62%; } to { font-stretch: 125%; } }
  }
}

/* ---------- Panier ---------- */
.cart { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(460px, 100vw); max-width: none; height: 100dvh; max-height: none; flex-direction: column; }
.cart[open] { display: flex; animation: cart-in 0.45s var(--ease); }
@keyframes cart-in { from { transform: translateX(100%); } }
.cart__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.cart__head h2 { font-stretch: 62%; font-weight: 800; font-size: 40px; line-height: 1; }
.cart__head .close { position: static; }
.cart__list { flex: 1; overflow-y: auto; padding-inline: 20px; }
.cart__empty { display: grid; gap: 10px; justify-items: start; padding-block: 28px; font-size: 19px; }
.cart__line { display: grid; grid-template-columns: 76px 1fr auto; gap: 2px 14px; align-items: start; padding-block: 14px; border-bottom: 1px solid var(--line); }
.cart__art { grid-row: span 2; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; }
.cart__art img { width: 100%; height: 100%; object-fit: cover; }
.cart__name { font-stretch: 75%; font-weight: 700; font-size: 20px; line-height: 1.1; }
.cart__price { font-weight: 500; white-space: nowrap; }
.cart__remove { grid-column: 2 / -1; justify-self: start; font-size: 13px; color: var(--bone-2); text-decoration: underline; text-underline-offset: 2px; }
.cart__remove:hover { color: var(--red); }
.cart__foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.cart__total { display: flex; justify-content: space-between; align-items: baseline; }
.cart__total strong { font-stretch: 75%; font-size: 32px; line-height: 1; }
.cart__note { font-size: 13px; line-height: 1.35; color: var(--bone-2); }
.cart__legal { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.cart__legal a { color: var(--bone-2); text-decoration: underline; text-underline-offset: 2px; }
.cart__legal a:hover { color: var(--red); }

/* ---------- Boutique ---------- */
.shop-hero { padding: calc(var(--nav) + clamp(28px, 5vw, 72px)) var(--gut) clamp(28px, 4vw, 56px); display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px 20px; align-items: end; }
.shop-hero h1 { grid-column: 1 / span 8; font-size: clamp(60px, 10vw, 170px); }
.shop-hero p { grid-column: 9 / -1; max-width: 34ch; font-size: clamp(16px, 1.3vw, 20px); line-height: 1.4; }
.offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.2vw, 18px); padding-inline: var(--gut); }
.offer { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: var(--r-lg); background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); transition: transform 0.45s var(--ease), box-shadow 0.45s; }
.offer:hover { transform: translateY(-5px); box-shadow: inset 0 0 0 1px rgba(236, 232, 225, 0.32), 0 26px 60px -30px #000; }
.offer__art { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.offer__art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.offer:hover .offer__art img { transform: scale(1.05); }
.offer:hover .gcard__scan { animation: scan 0.6s linear; }
.offer__body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: clamp(16px, 1.6vw, 24px); }
.offer h3 { font-stretch: 62%; font-weight: 800; font-size: clamp(40px, 4.2vw, 68px); line-height: 0.95; }
.offer p { color: var(--bone-2); }
.offer__buy { margin-top: auto; padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.offer__price { font-stretch: 75%; font-weight: 700; font-size: clamp(28px, 2.5vw, 38px); line-height: 1; white-space: nowrap; }
.offer__price small { font-size: 0.5em; font-weight: 500; margin-left: 2px; }
.compare-sec { padding: clamp(56px, 7vw, 110px) var(--gut); }
.compare-sec h2 { font-stretch: 62%; font-weight: 800; font-size: clamp(40px, 5vw, 84px); line-height: 1; margin-bottom: clamp(18px, 2.4vw, 34px); }
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td { padding: 15px 10px; border-top: 1px solid var(--line); text-align: center; font-weight: 500; }
.compare-table tbody tr:last-child > * { border-bottom: 1px solid var(--line); }
.compare-table thead th { font-stretch: 75%; font-weight: 700; font-size: clamp(18px, 1.8vw, 26px); }
.compare-table thead td, .compare-table thead th { border-top: 0; }
.compare-table tbody th { text-align: left; padding-left: 0; font-weight: 400; width: 46%; }
.tick { display: inline-block; vertical-align: middle; width: 20px; height: 20px; fill: none; stroke: var(--red); stroke-width: 2.4; }
.dash { display: inline-block; vertical-align: middle; width: 14px; height: 2px; background: var(--bone-2); opacity: 0.6; }

.offers--coins { grid-template-columns: repeat(4, 1fr); padding-inline: 0; }
.offers--coins .offer h3 { font-size: clamp(32px, 3.2vw, 54px); }
.coins-sec { padding: 0 var(--gut) clamp(64px, 8vw, 120px); scroll-margin-top: calc(var(--nav) + 16px); }
.coins-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px 20px; align-items: end; margin-bottom: clamp(22px, 3vw, 40px); }
.coins-head h2 { grid-column: 1 / span 6; font-stretch: 62%; font-weight: 800; font-size: clamp(60px, 10vw, 170px); line-height: 0.88; }
.coins-head p { grid-column: 9 / -1; max-width: 38ch; }
.coins-soon { margin-top: clamp(26px, 3vw, 44px); font-weight: 600; }
.coin-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(20px, 3vw, 56px); margin-top: 14px; border-top: 1px solid var(--line); }
.coin-actions li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 13px; border-bottom: 1px solid var(--line); }
.coin-actions b { flex: none; font-stretch: 75%; font-weight: 700; font-size: 19px; white-space: nowrap; color: var(--bone); }
.coin-actions span { color: var(--bone-2); }
.price__num--from { font-size: clamp(22px, 2.1vw, 30px); }

/* ---------- Pages légales ---------- */
.legal-hero { padding: calc(var(--nav) + clamp(28px, 5vw, 72px)) var(--gut) clamp(28px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.legal-hero h1 { font-size: clamp(52px, 8.6vw, 148px); margin-bottom: clamp(14px, 1.6vw, 22px); }
.legal-hero__intro { max-width: 52ch; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.4; }
.legal-hero__date { margin-top: 6px; font-size: 14px; color: var(--bone-2); }
.legal { display: grid; grid-template-columns: repeat(12, 1fr); gap: 30px 20px; padding: clamp(34px, 5vw, 72px) var(--gut) clamp(64px, 8vw, 120px); }
.legal__toc { grid-column: 1 / span 3; position: sticky; top: calc(var(--nav) + 24px); align-self: start; max-height: calc(100svh - var(--nav) - 48px); overflow-y: auto; font-size: 14px; }
.legal__toc > p { font-weight: 600; margin-bottom: 10px; }
.legal__toc ol { margin-bottom: 20px; }
.legal__toc li a { display: block; padding-block: 5px; color: var(--bone-2); transition: color 0.2s; }
.legal__toc li a:hover { color: var(--bone); }
.legal__body { grid-column: 5 / span 7; max-width: 70ch; }
.legal__body section { scroll-margin-top: calc(var(--nav) + 24px); }
.legal__body section + section { margin-top: clamp(30px, 3.4vw, 46px); }
.legal__body h2 { font-stretch: 62%; font-weight: 800; font-size: clamp(30px, 3vw, 46px); line-height: 1; margin-bottom: 12px; }
.legal__body p + p, .legal__body ul + p, .legal__body p + ul { margin-top: 12px; }
.legal__body ul { display: grid; gap: 8px; }
.legal__body li { position: relative; padding-left: 20px; }
.legal__body li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 9px; height: 2px; background: var(--red); }
.legal__body a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Adaptation ---------- */
@media (max-width: 1180px) {
  .games { grid-template-columns: repeat(4, 1fr); }
  .price { grid-template-columns: 96px 2fr 3fr auto; }
  .price__text { grid-column: 2 / -1; grid-row: 2; }
  .price__num { grid-column: 3; grid-row: 1; justify-self: end; }
  .price__art { grid-row: span 2; }
  .price .btn { grid-column: 4; grid-row: 1; }
}
@media (max-width: 820px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav nav { position: fixed; inset: auto 0 0; z-index: 21; justify-content: space-around; gap: 0; padding: 7px 6px 8px; background: var(--ink); border-top: 1px solid var(--line); font-size: 12px; }
  .nav nav a { display: grid; justify-items: center; gap: 3px; flex: 1; padding-block: 0; color: var(--bone-2); }
  .nav nav a::after { display: none; }
  .nav nav a[aria-current] { color: var(--red); }
  .nav nav svg { display: block; width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.5; }
  body { padding-bottom: 60px; }
  .hero { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .hero__art { position: static; order: 2; width: 100%; height: 74vw; margin-top: 2px; object-position: 80% 70%; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%); mask-image: linear-gradient(to bottom, transparent, #000 22%); }
  .hero h1 { font-size: 11.8vw; }
  .demo__head .title, .demo__head p { grid-column: 1 / -1; }
  .demo__explain, .readout, .demo__note { grid-column: 1 / -1; }
  .compare { display: flex; }
  .compare__btn { flex: 1; padding-inline: 8px; }
  .dl__art, .dl__body { grid-column: 1 / -1; }
  .dl__art { margin-inline: calc(var(--gut) * -1); }
  .dl__art img { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 86%, transparent); -webkit-mask-composite: source-over; mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 86%, transparent); mask-composite: add; }
  .games-head .title, .games-tools { grid-column: 1 / -1; }
  .games { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-column: 1 / -1; gap: 18vh; padding-block: 8vh 16vh; }
  .budget .title { font-size: clamp(38px, 11vw, 72px); }
  .bar { height: 54px; }
  .seg { padding: 5px 4px; min-width: 28px; }
  .seg span { font-size: 11px; }
  .budget__total span { margin-left: 0; width: 100%; }
  .strike { grid-template-columns: 1fr; }
  .faq .title, .faq__list { grid-column: 1 / -1; }
  .shop-hero h1, .shop-hero p { grid-column: 1 / -1; }
  .legal__toc, .legal__body { grid-column: 1 / -1; }
  .legal__toc { position: static; max-height: none; }
  .offers, .offers--coins { grid-template-columns: 1fr; }
  .coins-head h2, .coins-head p { grid-column: 1 / -1; }
  .coin-actions, .bricks { grid-template-columns: 1fr; }
  .platform__head .title, .platform__head p { grid-column: 1 / -1; }
  .compare-table th, .compare-table td { padding: 12px 4px; font-size: 14px; }
  .sheet__stats { grid-template-columns: repeat(2, 1fr); }
  .sheet__stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .sheet__stats > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .games { grid-template-columns: repeat(2, 1fr); }
  .price { grid-template-columns: 76px 1fr auto; gap: 10px 14px; }
  .price__name { grid-column: 2; grid-row: 1; }
  .price__num { grid-column: 3; grid-row: 1; }
  .price__art { grid-column: 1; grid-row: 1; }
  .price__text { grid-column: 1 / -1; grid-row: 2; }
  .price .btn { grid-column: 1 / -1; grid-row: 3; width: 100%; }
  .nav__dl { display: none; }
  .lang__btn { font-size: 13px; }
  .dl__specs { grid-template-columns: 1fr; }
}
@media (hover: none) {
  .gcard__hud { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
  .gcard { clip-path: none; }
}
