/* ==========================================================================
   iogame monster — thème pixel art
   Principes : polices bitmap, bordures "crantées" (box-shadow sans flou), biseaux
   internes, aucune courbe (border-radius: 0 partout), transitions par paliers.
   ========================================================================== */

@font-face { font-family: 'Press Start 2P'; src: url(/fonts/press-start-2p.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'VT323';          src: url(/fonts/vt323.woff2) format('woff2');          font-display: swap; }
@font-face { font-family: 'Silkscreen';     src: url(/fonts/silkscreen.woff2) format('woff2');      font-weight: 400; font-display: swap; }
@font-face { font-family: 'Silkscreen';     src: url(/fonts/silkscreen-bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #140d2b;
  --bg-2: #1c1240;
  --panel: #251758;
  --panel-2: #33217a;
  --ink: #07031a;
  --text: #f4ecff;
  --muted: #a998d6;
  --lime: #c4f53a;
  --violet: #7c5cff;
  --violet-d: #4a33c9;
  --pink: #ff5fa8;
  --cyan: #3de1ff;
  --gold: #ffd23f;

  --px: 4px;
  --head: 68px;
  --rail: 76px;
  --rail-open: 268px;

  --f-head: 'Press Start 2P', 'Courier New', monospace;
  --f-ui: 'Silkscreen', 'Courier New', monospace;
  --f-body: 'VT323', 'Courier New', monospace;

  /* bordure crantée : 4 ombres pleines, coins coupés */
  --b: var(--ink);
  --notch: 0 calc(var(--px) * -1) 0 0 var(--b), 0 var(--px) 0 0 var(--b),
           calc(var(--px) * -1) 0 0 0 var(--b), var(--px) 0 0 0 var(--b);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  /* damier discret = trame pixel */
  background-image: repeating-conic-gradient(rgba(255,255,255,.025) 0 25%, transparent 0 50%);
  background-size: 8px 8px;
  color: var(--text);
  font: 22px/1.3 var(--f-body);
  min-height: 100vh;
  -webkit-font-smoothing: none;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 4px dashed var(--lime); outline-offset: 4px; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }

/* --- Icônes pixel ----------------------------------------------------------------------- */
.pi { width: 24px; height: 24px; fill: currentColor; flex: none; display: block; }
.pi .off { opacity: .22; }
.pi.mini { width: 14px; height: 14px; color: var(--gold); }
.stars { display: inline-flex; gap: 3px; color: var(--gold); }
.stars .pi { width: 20px; height: 20px; }

/* --- Boîtes & boutons ------------------------------------------------------------------- */
.px-box { background: var(--panel); box-shadow: var(--notch), inset 0 var(--px) 0 0 rgba(255,255,255,.07); }

.btn {
  --c: var(--panel-2); --t: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  margin: var(--px); padding: 14px 18px;
  font: 12px/1 var(--f-head); text-transform: uppercase; letter-spacing: .5px; white-space: nowrap;
  color: var(--t); background: var(--c); border: 0; cursor: pointer; user-select: none;
  box-shadow: inset -4px -4px 0 0 rgba(0,0,0,.3), inset 4px 4px 0 0 rgba(255,255,255,.28), var(--notch);
  transition: transform .06s steps(1);
}
.btn .pi { width: 16px; height: 16px; }
.btn:hover { filter: brightness(1.15); transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: inset 4px 4px 0 0 rgba(0,0,0,.3), var(--notch); filter: none; }
.btn-lime   { --c: var(--lime); --t: var(--ink); }
.btn-violet { --c: var(--violet); }
.btn-dark   { --c: #2b1b66; }
.btn-xl     { font-size: 14px; padding: 20px 26px; }
.btn.is-off { opacity: .5; cursor: not-allowed; }
.btn.is-off:hover { transform: none; filter: none; }
.btn.pg-cur { cursor: default; }
.btn.pg-cur:hover { transform: none; filter: none; }

.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; margin: var(--px); flex: none;
  background: var(--panel-2); color: var(--text); cursor: pointer;
  box-shadow: inset -4px -4px 0 0 rgba(0,0,0,.3), inset 4px 4px 0 0 rgba(255,255,255,.22), var(--notch);
}
.icon-btn:hover { background: var(--violet); }
.icon-btn:active { transform: translateY(2px); }

/* --- Barre du haut ---------------------------------------------------------------------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--head);
  display: flex; align-items: center; gap: 14px; padding: 0 18px 0 10px;
  background: var(--bg-2); border-bottom: var(--px) solid var(--ink);
  box-shadow: inset 0 calc(var(--px) * -1) 0 0 rgba(255,255,255,.05);
}
.logo { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.logo-sprite { width: 48px; display: block; }
.logo-sprite svg { display: block; width: 100%; height: auto; }
.logo-text { display: flex; flex-direction: column; gap: 6px; }
.logo-text b { font: 18px/1 var(--f-head); color: var(--lime); text-shadow: 3px 3px 0 var(--ink); }
.logo-text i { font: 10px/1 var(--f-head); font-style: normal; color: #fff; letter-spacing: 1px; text-shadow: 2px 2px 0 var(--ink); }
.logo:hover .logo-sprite { animation: bob .5s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(-3px); } }

.search { position: relative; flex: 1 1 auto; max-width: 560px; margin: 0 auto; }
.search input {
  width: 100%; height: 46px; padding: 0 56px 0 18px; border: 0; color: var(--text);
  font: 23px var(--f-body); background: #0d0724;
  box-shadow: inset 4px 4px 0 0 rgba(0,0,0,.45), var(--notch);
}
.search input::placeholder { color: var(--muted); opacity: .8; }
.search input:focus { outline: none; --b: var(--lime); }
.search input::-webkit-search-cancel-button { display: none; }
.search button {
  position: absolute; right: 4px; top: 4px; bottom: 4px; width: 38px; display: grid; place-items: center;
  border: 0; background: var(--violet); color: #fff; cursor: pointer;
  box-shadow: inset -3px -3px 0 0 rgba(0,0,0,.3), inset 3px 3px 0 0 rgba(255,255,255,.25);
}
.search button:hover { background: var(--lime); color: var(--ink); }
.search button .pi { width: 20px; height: 20px; }
.topbar-cta { flex: none; }

/* --- Menu latéral ----------------------------------------------------------------------- */
.sidebar {
  position: fixed; z-index: 40; top: var(--head); bottom: 0; left: 0; width: var(--rail);
  padding: 14px 8px 24px; overflow-x: hidden; overflow-y: auto;
  background: var(--bg-2); border-right: var(--px) solid var(--ink);
  transition: width .15s steps(3);
  scrollbar-width: thin; scrollbar-color: var(--violet) var(--bg-2);
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--violet); }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 16px; height: 48px; padding: 0 18px;
  margin-bottom: 4px; color: var(--muted); white-space: nowrap;
}
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--violet-d); color: var(--text); box-shadow: inset 4px 0 0 0 var(--lime); }
.nav-item[aria-current="page"] .pi { color: var(--lime); }
.nav-label { font: 700 13px/1 var(--f-ui); text-transform: uppercase; letter-spacing: .5px; }
.nav-count { margin-left: auto; font: 18px var(--f-body); color: var(--muted); }
.nav-label, .nav-count { display: none; }
.nav-sep { margin: 14px 0 10px; height: 4px; background: repeating-linear-gradient(90deg, var(--panel-2) 0 8px, transparent 8px 16px); }
.nav-sep span { display: none; }

.nav-toggle:checked ~ .sidebar { width: var(--rail-open); box-shadow: 8px 0 0 0 rgba(0,0,0,.35); }
.nav-toggle:checked ~ .sidebar .nav-label,
.nav-toggle:checked ~ .sidebar .nav-count { display: inline; }
.nav-toggle:checked ~ .sidebar .nav-sep { height: auto; background: none; margin: 18px 0 8px; padding: 0 18px; }
.nav-toggle:checked ~ .sidebar .nav-sep span { display: block; font: 10px var(--f-head); color: var(--lime); }
.nav-toggle:focus-visible ~ .topbar .burger { outline: 4px dashed var(--lime); outline-offset: 2px; }
.scrim { display: none; }

/* --- Contenu ---------------------------------------------------------------------------- */
.main { margin-left: var(--rail); padding: calc(var(--head) + 30px) 32px 0; }
.main > * { max-width: 1480px; margin-inline: auto; }
.section { margin-bottom: 56px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-title {
  font: 28px/1.35 var(--f-head); text-transform: uppercase; color: #fff;
  text-shadow: 4px 4px 0 var(--violet-d), 8px 8px 0 var(--ink);
}
.section-title { font: 16px/1.4 var(--f-head); text-transform: uppercase; color: var(--lime); text-shadow: 3px 3px 0 var(--ink); }
.intro { color: var(--muted); font-size: 24px; margin: 20px 0 30px; max-width: 900px; }

.tabs { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 0; padding-left: 4px; }
.tab {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--panel); color: var(--text);
  font: 700 14px/1 var(--f-ui); text-transform: uppercase; letter-spacing: .5px;
  box-shadow: var(--notch), inset 0 var(--px) 0 0 rgba(255,255,255,.07);
}
.tab .pi { width: 18px; height: 18px; color: var(--muted); }
.tab:hover { background: var(--panel-2); }
.tab.is-on { background: var(--violet); box-shadow: var(--notch), inset -4px -4px 0 0 rgba(0,0,0,.25), inset 4px 4px 0 0 rgba(255,255,255,.25); }
.tab.is-on .pi { color: var(--lime); }

/* dropdown tri */
.dd { position: relative; }
.dd summary { list-style: none; }
.dd summary::-webkit-details-marker { display: none; }
.dd[open] summary { --c: var(--violet); }
.dd-menu { position: absolute; right: 4px; top: calc(100% + 10px); z-index: 30; min-width: 210px; background: var(--panel); box-shadow: var(--notch), 8px 8px 0 0 rgba(0,0,0,.4); padding: 6px; }
.dd-menu a { display: block; padding: 12px 14px; font: 700 13px/1 var(--f-ui); text-transform: uppercase; letter-spacing: .5px; }
.dd-menu a:hover { background: var(--violet); }
.dd-menu a[aria-current] { color: var(--lime); }
.dd-menu a[aria-current]::before { content: '▶ '; }

/* --- Grille de jeux --------------------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 26px; padding: 6px; }
.card { display: block; min-width: 0; }
.thumb {
  --b: var(--ink); position: relative; display: block; aspect-ratio: 275 / 157; overflow: hidden;
  background: var(--panel); box-shadow: var(--notch);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb::after { /* scanlines CRT */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.16) 0 2px, transparent 2px 4px);
}
.ph { display: grid; place-items: center; width: 100%; height: 100%; background: var(--panel-2); color: var(--violet); }
.ph .pi { width: 48px; height: 48px; }
.thumb-play {
  position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: rgba(7,3,26,.62); color: var(--lime); font: 14px var(--f-head); opacity: 0;
}
.thumb-play .pi { width: 18px; height: 18px; }
.card:hover .thumb, .card:focus-visible .thumb { --b: var(--lime); }
.card:hover .thumb-play, .card:focus-visible .thumb-play { opacity: 1; }
.card:hover .card-title { color: var(--lime); }
.card-title { display: block; margin-top: 16px; font: 25px/1.1 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; align-items: center; gap: 7px; margin-top: 4px; color: var(--muted); font-size: 20px; white-space: nowrap; overflow: hidden; }
.card-meta i { font-style: normal; opacity: .6; }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 46px 0 0; }
.pg-gap { font: 14px var(--f-head); color: var(--muted); padding: 0 6px; }

.empty { padding: 48px 24px; text-align: center; }
.empty h2 { font: 22px var(--f-head); color: var(--pink); margin-bottom: 18px; text-shadow: 3px 3px 0 var(--ink); }
.empty a { color: var(--cyan); text-decoration: underline; }

/* tuiles catégories */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; padding: 6px; }
.cat-tile {
  --b: var(--ink); display: flex; flex-direction: column; gap: 10px; padding: 18px;
  background: var(--panel); box-shadow: var(--notch), inset 0 var(--px) 0 0 rgba(255,255,255,.07);
}
.cat-tile:hover { --b: var(--lime); background: var(--panel-2); }
.cat-ic { width: 36px; height: 36px; color: var(--lime); }
.cat-name { font: 700 15px/1.2 var(--f-ui); text-transform: uppercase; letter-spacing: .5px; }
.cat-count { color: var(--muted); font-size: 20px; }

/* --- Page jeu --------------------------------------------------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 26px; font: 700 13px var(--f-ui); text-transform: uppercase; color: var(--muted); }
.crumbs a:hover { color: var(--lime); }
.crumbs i { font-style: normal; opacity: .5; }
.crumbs [aria-current] { color: var(--text); }

.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; margin-bottom: 56px; }
.player { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; margin: var(--px); }
.player-cover { position: absolute; inset: 0; display: grid; place-items: center; }
.player-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; filter: brightness(.4) saturate(1.3); }
.player-cover::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 2px, transparent 2px 4px); }
.player-cta { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 20px; text-align: center; }
.player-art { width: min(260px, 36vw); display: block; background: var(--panel); }
.player-name { font: 18px/1.4 var(--f-head); text-shadow: 3px 3px 0 var(--ink); }
.player-alt { color: var(--muted); font-size: 21px; text-decoration: underline; }
.player-alt:hover { color: var(--lime); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player:fullscreen { aspect-ratio: auto; }

.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 28px var(--px) 0; padding: 14px 18px; }
.game-title { font: 18px/1.4 var(--f-head); margin-bottom: 10px; text-shadow: 3px 3px 0 var(--ink); overflow-wrap: anywhere; }
.game-hook { margin: -2px 0 12px; font-size: 22px; line-height: 1.25; color: var(--cyan); overflow-wrap: anywhere; }
.rate { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 22px; }
.rate i { font-style: normal; opacity: .6; }
.player-actions { display: flex; flex-wrap: wrap; }

.tags { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 4px; }
.tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; background: #2b1b66;
  font: 700 12px/1 var(--f-ui); text-transform: uppercase; letter-spacing: .5px; box-shadow: var(--notch);
}
.tag .pi { width: 16px; height: 16px; color: var(--lime); }
.tag:hover { background: var(--lime); color: var(--ink); }
.tag:hover .pi { color: var(--ink); }

.prose { margin: var(--px); padding: 26px 30px 30px; font-size: 23px; line-height: 1.35; overflow-wrap: anywhere; }
.prose h2 { font: 13px/1.5 var(--f-head); color: var(--lime); text-transform: uppercase; margin: 0 0 16px; text-shadow: 2px 2px 0 var(--ink); }
.prose h2:not(:first-child) { margin-top: 34px; }
.prose h3 { font: 700 15px/1.3 var(--f-ui); text-transform: uppercase; color: var(--cyan); margin: 22px 0 8px; }
.prose h4 { font: 700 13px/1.3 var(--f-ui); text-transform: uppercase; color: var(--gold); margin: 18px 0 6px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 26px; }
.prose ul { list-style: none; }
.prose ul li { position: relative; margin-bottom: 4px; }
.prose ul li::before { content: ''; position: absolute; left: -20px; top: .5em; width: 8px; height: 8px; background: var(--lime); }
.prose li p { margin: 0; }
.prose a { color: var(--cyan); text-decoration: underline; }
.prose a:hover { color: var(--lime); }
.prose strong, .prose b { color: #fff; font-weight: normal; text-shadow: 1px 0 0 currentColor; }
.prose blockquote { margin: 0 0 14px; padding: 8px 18px; border-left: 4px solid var(--violet); color: var(--muted); }
.prose table { border-collapse: collapse; margin: 0 0 14px; }
.prose td, .prose th { border: 2px solid var(--panel-2); padding: 4px 10px; text-align: left; }
.prose img { max-width: 100%; height: auto; }

.game-side { position: sticky; top: calc(var(--head) + 26px); max-height: calc(100vh - var(--head) - 48px); overflow-y: auto; padding: 4px; scrollbar-width: thin; scrollbar-color: var(--violet) transparent; }
.side-title { font: 13px/1.4 var(--f-head); text-transform: uppercase; color: var(--lime); margin: 0 0 18px 4px; text-shadow: 2px 2px 0 var(--ink); }
.side-list { display: flex; flex-direction: column; gap: 16px; padding: 4px; }
.side-item { --b: var(--ink); display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 14px; align-items: center; padding: 8px; background: var(--panel); box-shadow: var(--notch); }
.side-item:hover { --b: var(--lime); background: var(--panel-2); }
.side-thumb { display: block; aspect-ratio: 275 / 157; overflow: hidden; background: var(--panel-2); }
.side-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side-thumb .ph .pi { width: 28px; height: 28px; }
.side-txt { min-width: 0; }
.side-txt b { display: block; font: 24px/1.05 var(--f-body); font-weight: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-txt small { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: 19px; white-space: nowrap; overflow: hidden; }
.side-item:hover b { color: var(--lime); }

/* --- 404 -------------------------------------------------------------------------------- */
.nf { text-align: center; padding: 40px 0 20px; }
.nf-art { width: 120px; margin: 0 auto 28px; animation: bob 1s steps(2) infinite; }
.nf .page-title { font-size: 64px; color: var(--pink); }
.nf-sub { font-size: 26px; color: var(--muted); margin: 22px 0 34px; }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* --- Pied de page ----------------------------------------------------------------------- */
.footer { margin-top: 24px; padding: 36px 0 44px; background: repeating-linear-gradient(90deg, var(--panel-2) 0 8px, transparent 8px 16px) top / 100% 4px no-repeat; }
.footer-top { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.footer-top p { color: var(--muted); font-size: 22px; }
.logo-sm .logo-sprite { width: 36px; }
.footer-cats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 26px; }
.footer-cats a { font: 700 12px var(--f-ui); text-transform: uppercase; color: var(--muted); }
.footer-cats a:hover { color: var(--lime); }
.footer-fine { color: var(--muted); font-size: 19px; opacity: .8; }

/* --- Responsive ------------------------------------------------------------------------- */
@media (max-width: 1280px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) {
  .game-layout { grid-template-columns: minmax(0, 1fr); }
  .game-side { position: static; }
  .side-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}
@media (max-width: 900px) {
  :root { --head: 60px; }
  .sidebar { width: var(--rail-open); transform: translateX(-110%); transition: transform .15s steps(3); }
  .sidebar .nav-label, .sidebar .nav-count { display: inline; }
  .sidebar .nav-sep { height: auto; background: none; margin: 18px 0 8px; padding: 0 18px; }
  .sidebar .nav-sep span { display: block; font: 10px var(--f-head); color: var(--lime); }
  .nav-toggle:checked ~ .sidebar { transform: none; }
  .nav-toggle:checked ~ .scrim { display: block; position: fixed; inset: var(--head) 0 0 0; z-index: 35; background: rgba(7,3,26,.7); }
  .main { margin-left: 0; padding: calc(var(--head) + 22px) 18px 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; }
  .page-title { font-size: 20px; }
  .logo-text { display: none; }
  .topbar { gap: 8px; padding-right: 10px; }
  .topbar-cta span { display: none; }
  .topbar-cta { padding: 14px; }
}
@media (max-width: 560px) {
  body { font-size: 20px; }
  .grid { gap: 22px 14px; padding: 4px; }
  .card-title { font-size: 22px; }
  .card-meta { font-size: 18px; }
  .page-title { font-size: 16px; text-shadow: 3px 3px 0 var(--violet-d); }
  .intro { font-size: 21px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; padding: 6px 6px 14px; margin-right: -18px; }
  .tab { flex: none; }
  .player-cta { gap: 12px; padding: 10px; }
  .player-art { display: none; }
  .player-name { font-size: 12px; }
  .btn-xl { font-size: 12px; padding: 16px 18px; }
  .prose { padding: 20px 18px; font-size: 21px; }
  .game-title { font-size: 14px; }
  .nf .page-title { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- Page /test : vérification des embeds ------------------------------------------------ */
.main > .tt { max-width: none; }
.tt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 26px; }
.tt-title { font-size: 20px; margin-right: 10px; }
.tt-input {
  height: 44px; padding: 0 14px; border: 0; color: var(--text); background: #0d0724; font: 21px var(--f-body);
  box-shadow: inset 4px 4px 0 0 rgba(0,0,0,.45), var(--notch); margin: var(--px);
}
.tt-input:focus { outline: none; --b: var(--lime); }
.tt-count { color: var(--muted); font-size: 21px; margin-right: auto; }
.tt-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 28px; align-items: start; }
.tt-list { margin: var(--px); padding: 8px; height: calc(100vh - 230px); min-height: 360px; overflow-y: auto; list-style: none; scrollbar-width: thin; scrollbar-color: var(--violet) transparent; }
.tt-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; color: var(--text); font: 21px/1.1 var(--f-body); text-align: left; cursor: pointer; }
.tt-item:hover { background: var(--panel-2); }
.tt-item[aria-current] { background: var(--violet-d); box-shadow: inset 4px 0 0 0 var(--lime); }
.tt-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-dot { width: 12px; height: 12px; flex: none; background: var(--panel-2); box-shadow: 0 0 0 2px var(--ink); }
.tt-dot.auto-ok { background: #54d86b; }
.tt-dot.auto-ko { background: var(--pink); }
.tt-dot.mark-ok { background: var(--lime); }
.tt-dot.mark-bad { background: #ff3b3b; }
.tt-dot.mark-noframe { background: var(--cyan); }
.tt-dot.mark-none { background: transparent; box-shadow: 0 0 0 2px var(--panel-2); }
.tt-head { margin: var(--px); padding: 14px 18px; }
.tt-meta h2 { font: 14px/1.4 var(--f-head); margin-bottom: 8px; overflow-wrap: anywhere; }
.tt-meta a { color: var(--cyan); text-decoration: underline; overflow-wrap: anywhere; font-size: 20px; }
.tt-meta p { color: var(--muted); font-size: 20px; margin-top: 4px; }
.tt-frame { position: relative; margin: 20px var(--px); height: calc(100vh - 400px); min-height: 380px; background: #000; overflow: hidden; }
.tt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.tt-empty { display: grid; place-items: center; height: 100%; padding: 20px; text-align: center; color: var(--muted); font-size: 24px; }
.tt-actions { display: flex; flex-wrap: wrap; }
.tt-export { margin: 28px var(--px); padding: 22px; }
.tt-export p { margin: 12px 0; color: var(--muted); }
.tt-export code { color: var(--lime); }
.tt-export textarea { display: block; width: 100%; margin-bottom: 14px; padding: 12px; border: 0; color: var(--text); background: #0d0724; font: 20px/1.2 var(--f-body); box-shadow: inset 4px 4px 0 0 rgba(0,0,0,.45); resize: vertical; }
@media (max-width: 900px) {
  .tt-grid { grid-template-columns: minmax(0, 1fr); }
  .tt-list { height: 260px; min-height: 0; }
  .tt-frame { height: 60vh; }
}

/* --- Page /play/<jeu> : plein écran sur notre site ---------------------------------------- */
.play-page { overflow: hidden; background: #000; }
.play-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 5; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 12px;
  background: var(--bg-2); border-bottom: var(--px) solid var(--ink);
}
.play-bar .btn { margin: 0 var(--px); padding: 10px 14px; }
.play-title { font: 12px/1.2 var(--f-head); color: #fff; text-shadow: 2px 2px 0 var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.play-title:hover { color: var(--lime); }
.play-spacer { flex: 1; }
.play-frame { position: fixed; inset: 56px 0 0 0; width: 100%; height: calc(100% - 56px); border: 0; background: #000; }
@media (max-width: 560px) { .play-bar .btn span { display: none; } .play-title { font-size: 10px; } }
