/* ==========================================================================
   portail.css — page d'accueil : en-tête, filtres, boîtes de jeux.
   ========================================================================== */
body {
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1.4px, transparent 1.5px);
  background-size: 22px 22px;
}
.page { max-width: 1120px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); padding-block: 36px 56px; }

/* ---------- En-tête ---------- */
.enseigne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding-bottom: 8px; }
.enseigne h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(42px, 7.5vw, 84px); line-height: .95; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
.enseigne h1 em { font-style: normal; color: var(--pop); }
.enseigne h1 span { display: block; font-family: var(--f-body); font-weight: 600; font-size: .26em; letter-spacing: .02em; color: var(--dim); margin-top: .5em; }
.enseigne p { margin: 0; max-width: 34ch; font-size: 18px; color: var(--dim); }
.credits { display: inline-block; margin-top: 12px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; background: var(--ink); color: var(--bg); padding: 4px 10px; transform: rotate(-1.5deg); }

/* ---------- Filtres ---------- */
.barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 24px; }
.filtres { display: flex; flex-wrap: wrap; gap: 10px; }
.filtre { background: var(--card); border: 2px solid var(--edge); border-radius: 999px; padding: 6px 16px; font-size: 15px; font-weight: 600; box-shadow: 2px 2px 0 var(--shadow); transition: transform .12s, box-shadow .12s; }
.filtre:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--shadow); }
.filtre[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.compteur { font-family: var(--f-mono); font-size: 13px; color: var(--dim); }

/* ---------- Boîtes de jeux ---------- */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 28px; }
.jeu {
  --c: #ffd23f;                     /* couleur du jeu, fixée dans catalogue.js */
  background: var(--card); border: 3px solid var(--edge); border-radius: 14px;
  box-shadow: 6px 6px 0 var(--shadow);
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.jeu:hover { transform: translate(-3px, -3px) rotate(-.4deg); box-shadow: 9px 9px 0 var(--shadow); }

.jaquette { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0c0d12; border-bottom: 3px solid var(--edge); }
.jaquette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.etiquette { position: absolute; right: 12px; top: 12px; font-family: var(--f-mono); font-size: 12px; font-weight: 500; background: var(--c); color: #16161d; border: 2px solid #16161d; border-radius: 6px; padding: 2px 8px; transform: rotate(3deg); }

.corps { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; background: linear-gradient(var(--c), var(--c)) top / 100% 8px no-repeat; }
.jeu h2 { font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1.05; margin: 6px 0 0; }
.description { margin: 0; color: var(--dim); font-size: 15.5px; }
.infos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.infos span { font-family: var(--f-mono); font-size: 12px; border: 1.5px solid var(--edge); border-radius: 6px; padding: 2px 8px; color: var(--dim); }

.actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.jouer { display: inline-flex; align-items: center; gap: 8px; background: var(--c); color: #16161d; border: 2.5px solid #16161d; border-radius: 10px; padding: 9px 20px; font-weight: 700; font-size: 16px; text-decoration: none; box-shadow: 3px 3px 0 #16161d; transition: transform .1s, box-shadow .1s; }
.jouer:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #16161d; }
.jouer:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #16161d; }
.jouer svg { width: 12px; height: 12px; fill: currentColor; }
.record { font-family: var(--f-mono); font-size: 13px; color: var(--dim); }
.record b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.note { font-size: 14px; color: var(--dim); }

/* ---------- Pied de page ---------- */
.credit-ia { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--pop); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.credit-ia:hover { color: var(--pop); }
.pied { margin-top: 48px; padding-top: 18px; border-top: 2px dashed var(--edge); color: var(--dim); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* bulle « généré par une IA » au survol du nom */
.credit { position: relative; display: inline-block; }
.bulle-ia {
  position: absolute; right: 0; bottom: calc(100% + 14px); z-index: 20;
  width: min(360px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px;
  background: var(--card); color: var(--ink); text-align: left;
  border: 3px solid var(--edge); border-radius: 14px; box-shadow: 6px 6px 0 var(--shadow);
  padding: 14px 16px; font-size: 14.5px; line-height: 1.5; font-weight: 400;
  opacity: 0; visibility: hidden; transform: translateY(10px) rotate(1deg);
  transition: opacity .18s, transform .18s, visibility .18s;
  pointer-events: none;
}
.bulle-ia::after {
  content: ""; position: absolute; right: 28px; bottom: -11px; width: 16px; height: 16px;
  background: var(--card); border-right: 3px solid var(--edge); border-bottom: 3px solid var(--edge);
  transform: rotate(45deg);
}
.bulle-titre { font-family: var(--f-display); font-weight: 400; font-size: 18px; color: var(--pop); }
.bulle-suite { font-family: var(--f-mono); font-size: 12px; color: var(--dim); }
.credit:hover .bulle-ia, .credit:focus-within .bulle-ia { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 700px) {
  .bulle-ia { right: auto; left: 0; }
  .bulle-ia::after { right: auto; left: 28px; }
}
