/* Page /jeux : hub des jeux (cartes des jeux, profil joueur, personnalisation) — DA glitch des Démat's (variables --bx-* de common.css) */
.gp-page { --g-otaku: #ff4f8b; --g-pokemon: #3fb27f; --g-deck: #ffc83d;
  --k0: #8a90b0; --k1: #3fd28a; --k2: #2e9bff; --k3: #a855ff; --k4: #ffc83d; --k5: #ff4fa8; }
.bx-eyebrow a { color: inherit; text-decoration: none; }
.bx-eyebrow a:hover { color: #fff; }

/* ── Cartes des jeux ── */
.gm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,360px),1fr)); gap: 14px; padding-bottom: 20px; }
.gm { display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-height: 320px; padding: 26px; overflow: hidden; }
.gm::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 100% 0%, var(--c), transparent 70%); opacity: .12; pointer-events: none; }
.gm-top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; }
.gm-top svg { width: 60px; height: 60px; }
.gm-idx { font-family: var(--font-mono); font-size: 12px; color: var(--bx-muted); }
.gm-txt { position: relative; display: flex; flex-direction: column; gap: 10px; }
.gm-name { font-family: var(--font-display); font-size: clamp(40px,4.4vw,58px); line-height: .9; }
.gm-tags { font-weight: 600; font-size: 14px; letter-spacing: .16em; color: var(--bx-dim); text-transform: uppercase; }
.gm-desc { font-size: 15px; color: var(--bx-soft); max-width: 48ch; }
.gm-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-family: var(--font-mono); font-size: 13px; letter-spacing: .18em; color: #fff; text-transform: uppercase; }
.gm-go i { width: 7px; height: 7px; background: var(--c); }
.gm.fav { box-shadow: inset 0 0 0 1px var(--c); }
/* Progression du joueur sur la carte du jeu */
.gm-me { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: rgba(0,0,0,.28); border-left: 3px solid var(--c); }
.gm-me:empty { display: none; }
.gm-me b { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #fff; font-weight: 400; }
.gm-me small { font-family: var(--font-mono); font-size: 11px; color: var(--bx-soft); }

/* ── En-tête de profil ── */
.gp-head { position: relative; margin-bottom: 14px; overflow: hidden; }
.gp-banner { height: 120px; background: linear-gradient(120deg, #141833, #0d1024); position: relative; }
.gp-banner::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 3px); pointer-events: none; }
.gp-id { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 20px; padding: 0 22px 20px; margin-top: -44px; position: relative; }
.gp-av { width: 96px; height: 96px; flex: none; object-fit: cover; background: #1a1f3a; border: 3px solid var(--bx-card); box-shadow: -3px 0 0 var(--bx-red), 3px 0 0 var(--bx-cyan); }
.gp-who { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.gp-name { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 4vw, 48px); line-height: .95; color: #fff; overflow-wrap: anywhere; }
.gp-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gp-title { display: inline-block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; color: var(--k4); border: 1px solid rgba(255,200,61,.45); background: rgba(255,200,61,.08); }
.gp-fav { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; color: #fff; border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
.gp-bio { margin: 2px 0 0; font-size: 15px; color: var(--bx-soft); overflow-wrap: anywhere; }
.gp-bio:empty { display: none; }
.gp-acts { display: flex; flex-wrap: wrap; gap: 8px; }
/* Résumé des 3 jeux sous l'en-tête */
.gp-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--bx-line); border-top: 1px solid var(--bx-line); }
.gp-sum a { display: flex; flex-direction: column; gap: 4px; padding: 12px 18px; background: var(--bx-card); color: inherit; text-decoration: none; border-top: 3px solid var(--c); }
.gp-sum a:hover { background: #151a36; }
.gp-sum span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--bx-dim); }
.gp-sum b { font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1; color: #fff; }
.gp-sum small { font-family: var(--font-mono); font-size: 11px; color: var(--bx-soft); }
.gp-login { padding: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.gp-login p { margin: 0; color: var(--bx-soft); font-size: 15px; }

/* Bannières (api/games-profile.php : GP_BANNERS) */
.gp-ban-neon { background: linear-gradient(115deg, #0b0f2a 10%, #ff2e88 45%, #2ee6ff 90%); }
.gp-ban-sunset { background: linear-gradient(120deg, #2a0b3a, #ff6a1f 55%, #ffc83d); }
.gp-ban-sakura { background: radial-gradient(circle at 20% 30%, #ffd1e6 0 6%, transparent 7%), radial-gradient(circle at 70% 60%, #ffb7d5 0 5%, transparent 6%), linear-gradient(120deg, #3a1230, #ff7ac6 60%, #ffe1ef); }
.gp-ban-ocean { background: linear-gradient(120deg, #031a2e, #0f5fa8 50%, #2ee6ff); }
.gp-ban-matrix { background: repeating-linear-gradient(90deg, rgba(63,210,138,.35) 0 2px, transparent 2px 18px), linear-gradient(180deg, #021208, #0b3b1c); }
.gp-ban-gold { background: linear-gradient(120deg, #2b1d05, #c8a96b 40%, #ffd23f 60%, #6b4a0a); }
.gp-ban-void { background: radial-gradient(ellipse at 70% 40%, #a855ff 0, transparent 55%), radial-gradient(ellipse at 20% 80%, #2e9bff 0, transparent 45%), #05060f; }
.gp-ban-crimson { background: linear-gradient(120deg, #1a0006, #ff2e63 55%, #3a0010); }

/* ── Onglets et volets ── */
.gp-tabs { margin-bottom: 18px; }
.gp-tabs .bx-tab[hidden] { display: none; }
.gp-pane[hidden] { display: none; }
.gp-hint { font-size: 14px; color: var(--bx-soft); margin: -4px 0 12px; }
.gp-sec { margin-top: 26px; }
.gp-empty { padding: 28px 16px; text-align: center; font-family: var(--font-mono); font-size: 12px; letter-spacing: .2em; color: var(--bx-muted); text-transform: uppercase; border: 1px dashed var(--bx-line); }

/* ── Vitrine multi-jeux ── */
.gp-show { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.gp-item { --rc: var(--k0); position: relative; display: flex; flex-direction: column; min-width: 0; background: linear-gradient(160deg, #141833, #0a0c1c); border: 2px solid var(--rc); color: var(--bx-text); text-decoration: none; overflow: hidden; }
.gp-item[data-k="1"] { --rc: var(--k1); } .gp-item[data-k="2"] { --rc: var(--k2); } .gp-item[data-k="3"] { --rc: var(--k3); }
.gp-item[data-k="4"] { --rc: var(--k4); } .gp-item[data-k="5"] { --rc: var(--k5); }
.gp-item-img { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; background: #10132a; overflow: hidden; font-size: 54px; }
.gp-item-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gp-item[data-g="pokemon"] .gp-item-img img { object-fit: contain; padding: 10%; image-rendering: auto; }
.gp-item[data-g="otaku"] .gp-item-img img { object-fit: contain; }
.gp-item-g { position: absolute; top: 6px; left: 6px; z-index: 2; padding: 2px 6px; background: rgba(8,10,22,.85); border: 1px solid var(--rc); font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.gp-item-s { position: absolute; top: 6px; right: 8px; z-index: 2; color: #fff; text-shadow: 0 0 6px #ffd23f; }
.gp-item-body { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px 8px; border-top: 1px solid rgba(255,255,255,.06); }
.gp-item-body b { font-family: var(--font-display); font-weight: 400; font-size: 18px; line-height: 1; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-item-body small { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; color: var(--bx-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-slot { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4.6; border: 1px dashed var(--bx-line); color: var(--bx-muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; text-align: center; padding: 8px; }

/* ── Stats détaillées par jeu ── */
.gp-games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gp-game { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; background: var(--bx-card); border: 1px solid var(--bx-line); border-top: 3px solid var(--c); }
.gp-game h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1; color: #fff; }
.gp-kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; font-size: 14px; }
.gp-kv dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--bx-dim); padding-top: 2px; }
.gp-kv dd { margin: 0; text-align: right; color: #fff; font-family: var(--font-mono); }
.gp-prog { display: flex; flex-direction: column; gap: 4px; }
.gp-prog small { font-family: var(--font-mono); font-size: 11px; color: var(--bx-soft); }
.gp-bar { position: relative; height: 8px; background: #0b0e20; border: 1px solid var(--bx-line); overflow: hidden; }
.gp-bar i { position: absolute; inset: 0 auto 0 0; background: var(--c); box-shadow: 0 0 10px var(--c); }
.gp-game .bx-btn { align-self: flex-start; margin-top: auto; }

/* ── Personnalisation ── */
.gp-form { display: flex; flex-direction: column; gap: 4px; }
.gp-field { padding: 16px; background: var(--bx-card); border: 1px solid var(--bx-line); margin-bottom: 10px; }
.gp-field > .bx-label { margin-bottom: 10px; }
.gp-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.gp-sw { position: relative; height: 54px; border: 2px solid var(--bx-line); cursor: pointer; padding: 0; background-color: #10132a; color: #fff; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: flex-end; justify-content: flex-start; overflow: hidden; }
.gp-sw span { position: relative; z-index: 1; padding: 3px 6px; background: rgba(8,10,22,.8); }
.gp-sw.on { border-color: var(--bx-orange); box-shadow: -3px 0 0 var(--bx-red), 3px 0 0 var(--bx-cyan); }
.gp-sw:hover { border-color: rgba(255,255,255,.5); }
.gp-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--bx-line); }
.gp-seg button { padding: 9px 14px; border: 0; border-right: 1px solid var(--bx-line); background: transparent; color: var(--bx-soft); font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.gp-seg button:last-child { border-right: 0; }
.gp-seg button.on { background: var(--bx-orange); color: #0a0b16; }
.gp-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.gp-in { width: 100%; padding: 10px 12px; background: #0b0e20; border: 1px solid var(--bx-line); color: var(--bx-text); font-family: var(--font-body); font-size: 15px; box-sizing: border-box; }
.gp-in:focus { outline: none; border-color: var(--bx-cyan); box-shadow: -2px 0 0 var(--bx-red); }
.gp-count { display: block; margin-top: 4px; text-align: right; font-family: var(--font-mono); font-size: 11px; color: var(--bx-dim); }
/* Vitrine : 6 emplacements, puis le choix par jeu */
.gp-slots .gp-item { cursor: pointer; }
.gp-slots .gp-item::after { content: '×'; position: absolute; top: 4px; right: 6px; z-index: 3; width: 22px; height: 22px; line-height: 20px; text-align: center; background: var(--bx-red); color: #fff; font-size: 16px; opacity: 0; transition: opacity .15s; }
.gp-slots .gp-item:hover::after, .gp-slots .gp-item:focus-visible::after { opacity: 1; }
.gp-pick-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 10px; }
.gp-pick-tools .gp-in { flex: 1 1 200px; width: auto; }
.gp-pick { max-height: 460px; overflow: auto; padding: 4px; border: 1px solid var(--bx-line); }
.gp-pick .gp-show { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.gp-pick .gp-item { cursor: pointer; }
.gp-pick .gp-item.sel { outline: 3px solid var(--bx-cyan); outline-offset: 2px; }
.gp-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; margin-top: 10px; background: rgba(9,11,24,.94); border: 1px solid var(--bx-line); backdrop-filter: blur(8px); }
.gp-savebar span { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: var(--bx-soft); }
.gp-savebar.dirty span { color: var(--bx-orange); }

/* Messages */
.gp-toast { position: fixed; right: 16px; bottom: 16px; z-index: 300; max-width: min(360px, calc(100vw - 32px)); padding: 12px 14px; background: var(--bx-card); border: 1px solid var(--bx-line); border-left: 4px solid var(--k1); color: var(--bx-text); font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.gp-toast.err { border-left-color: var(--bx-red); }

@media (max-width: 1000px) {
  .gp-show { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gp-games { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .gm { min-height: 0; padding: 20px; } .gm-top svg { width: 46px; height: 46px; }
  .gp-banner { height: 90px; }
  .gp-id { padding: 0 14px 16px; margin-top: -36px; }
  .gp-av { width: 76px; height: 76px; }
  .gp-sum { grid-template-columns: 1fr; }
  .gp-sum a { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
  .gp-show { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gp-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gp-tabs .bx-tab { padding: 10px 4px; font-size: 11px; letter-spacing: .08em; text-align: center; }
}
