/* version Waven (agent herosheet) : page Personnages façon écran Héros de Waven (js/herosheet.js). Fond bleu-vert à
   hexagones (assets/ui/herosheet/bg.jpg, motif CommonUI_hexagon_tile_bg de Waven), héros animé au centre, colonnes
   d'hexagones à gauche (armes) et à droite (classes), socle et 3 boutons en bas. Plat, sans ombre portée. */
#p-champions:has(.hs) { padding: 0; }
.hs { position: absolute; inset: 0; display: grid; grid-template-columns: 292px minmax(0, 1fr) 330px; gap: 16px; padding: 16px 22px 14px;
  background: #0f5a78 var(--hs-bg) center / cover no-repeat; overflow: hidden; }
.hs h3 { color: #c8f6ff; margin-bottom: 10px; }
.hs h3::after { background: linear-gradient(90deg, rgba(160,240,255,.45), transparent); }
.hs .hs-n { order: 2; margin-left: auto; font-size: 11px; color: #8fdcef; letter-spacing: .5px; }
.hs h3 .hs-n + ::after { display: none; }
.hs-sec { position: relative; padding: 12px 12px 12px; border-radius: 16px; background: rgba(5, 34, 58, .62); border: 2px solid rgba(110, 222, 240, .28); }
.hs-l, .hs-r { display: flex; flex-direction: column; gap: 12px; min-height: 0; }

/* hexagone générique : .hx = bord coloré (--rc), image découpée dedans */
.hs .hx { position: absolute; inset: 0; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--rc, #4fc9de); transition: background .15s; }
.hs .hx img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: cover; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: #123a55; }
.hs-hex { position: relative; width: 88px; height: 100px; padding: 0; border: 0; background: none; transition: transform .15s; }
.hs-hex:hover { transform: translateY(-3px); }
.hs-hex.sel .hx { background: #fff; }
.hs-hex.sel .hx img { background: #1d6f8c; }
.hs-hex.locked .hx img { filter: saturate(.55) brightness(.75); }
.hs-hex .lk { position: absolute; right: 6px; bottom: 10px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #0b2236; border: 2px solid var(--rc); }
.hs-hex .lk img { width: 15px; }
.hs .hs-act { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); border: 2px solid #0b2236; }
.hs .hs-act img { width: 13px; filter: brightness(.1); }

/* presets */
.hs-presets { display: flex; flex-wrap: wrap; gap: 8px 6px; }
.hs-pre { position: relative; width: 56px; height: 62px; padding: 0; border: 0; background: none; }
.hs-pre > img:first-child { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: #123a55; box-shadow: none; }
.hs-pre::before { content: ''; position: absolute; inset: -3px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: rgba(120, 220, 240, .45); }
.hs-pre.sel::before { background: #fff; }
.hs-pre.new, .hs-pre.buy { display: grid; place-items: center; }
.hs-pre.new::before, .hs-pre.buy::before { background: rgba(120, 220, 240, .25); }
.hs-pre.new img, .hs-pre.buy img { position: relative; width: 22px; height: 22px; clip-path: none; background: none; opacity: .8; }
.hs-pre .hs-num { position: absolute; left: -4px; top: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: #0b2236; color: #c8f6ff; font: 700 11px/18px Lexend, sans-serif; font-style: normal; text-align: center; }
.hs-pre .hs-act { bottom: -8px; width: 18px; height: 18px; }
.hs-pre .hs-act img { width: 11px; }   /* « > img » plus haut : le portrait seul (la coche du preset en jeu devenait un hexagone sombre, Scott 2026-10-24) */

/* armes (styles) : colonne d'hexagones en nid d'abeille */
.hs-hexes { display: grid; grid-template-columns: repeat(2, 88px); column-gap: 14px; row-gap: 6px; justify-content: center; padding-bottom: 50px; }
.hs-hexes .hs-hex:nth-child(2n) { top: 50px; }
.hs-gender { display: flex; gap: 0; margin-top: 4px; border-radius: 12px; overflow: hidden; border: 2px solid rgba(120, 220, 240, .45); }
.hs-gender button { flex: 1; height: 34px; border: 0; background: rgba(4, 26, 44, .7); color: #c8f6ff; font-weight: 700; font-size: 13.5px; }
.hs-gender button + button { border-left: 2px solid rgba(120, 220, 240, .45); }
.hs-gender button.on { background: #4fd6ea; color: #062033; }
.hs-gender button:disabled { opacity: .35; cursor: default; }
.hs-gnote { display: block; margin-top: 6px; text-align: center; color: #8fdcef; white-space: normal; }

/* centre : nom, héros, socle */
.hs-c { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; justify-items: center; min-width: 0; min-height: 0; }
.hs-name { text-align: center; line-height: 1; }
.hs-name .hs-editing { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 700; color: #8fdcef; letter-spacing: .6px; text-transform: uppercase; }
.hs-name .kicker { color: #e8ff5a; }
.hs-name h2 { margin: 2px 0 0; font-family: Rowdies, sans-serif; font-weight: 400; font-size: 44px; color: #fff; }
.hs-c canvas { height: 100%; width: auto; max-width: 100%; min-height: 0; cursor: pointer; }
.hs-c.busy canvas { opacity: .55; transition: opacity .2s; }
.hs-ped { position: relative; width: min(720px, 100%); margin-top: -26px; padding: 0 0 2px; display: flex; flex-direction: column; align-items: center; }
.hs-ped::before { content: ''; position: absolute; left: 0; right: 0; top: 34px; height: 46px; background: var(--ped) center / 100% 100% no-repeat; opacity: .95; }

/* droite : classes (nid d'abeille), sort et évolutions, jouer */
.hs-cls { display: grid; grid-template-columns: repeat(3, 66px); column-gap: 18px; row-gap: 10px; justify-content: center; padding-bottom: 44px; }
.hs-cls .hs-hex { width: 66px; height: 88px; }
.hs-cls .hs-hex .hx { inset: 0 0 14px; }
.hs-cls .hs-hex:nth-child(3n+2) { top: 46px; }
.hs-cls .hs-hex b { position: absolute; left: -8px; right: -8px; bottom: -2px; font-size: 11px; color: #e6fbff; text-align: center; white-space: nowrap; }
.hs-cls .hs-hex.sel b { color: var(--lime); }
.hs-cls .cls-new { right: -12px; top: 2px; padding: 0 5px; font-size: 8.5px; }
.hs-spells { display: grid; grid-template-columns: repeat(4, 50px); grid-template-areas: ". b b ." "a a c c" "d e f g"; gap: 6px 10px; justify-content: center; }
.hs-spell { position: relative; width: 50px; height: 50px; padding: 0; border-radius: 12px; border: 2px solid rgba(120, 220, 240, .4); background: #0d3550; justify-self: center; }
.hs-spell img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.hs-spell.base { grid-area: b; width: 56px; height: 56px; border-color: var(--lime); }
.hs-spell.l6:nth-child(2) { grid-area: a; border-color: #5ab4ff; } .hs-spell.l6:nth-child(3) { grid-area: c; border-color: #ff8fd8; }
.hs-spell:nth-child(4) { grid-area: d; } .hs-spell:nth-child(5) { grid-area: e; } .hs-spell:nth-child(6) { grid-area: f; } .hs-spell:nth-child(7) { grid-area: g; }
.hs-spell.l12:nth-child(4), .hs-spell.l12:nth-child(5) { border-color: #5ab4ff; } .hs-spell.l12:nth-child(6), .hs-spell.l12:nth-child(7) { border-color: #ff8fd8; }
.hs-spell:hover, .hs-spell.on { border-color: #fff; transform: translateY(-2px); }
.hs-tip { margin-top: 8px; padding: 7px 10px; min-height: 80px; border-radius: 10px; background: rgba(0, 0, 0, .3); }
.hs-tip b { font-size: 13.5px; color: #fff; } .hs-tip em { display: block; font-style: normal; font-size: 11px; color: #8fdcef; margin: 1px 0 3px; }
.hs-tip-h { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.hs-tip-h .spi { flex: none; width: 42px; height: 42px; border-radius: 9px; object-fit: cover; }
.hs-tip-h em { margin-bottom: 0; }
.hs-tip p { margin: 0; font-size: 12px; line-height: 1.35; color: #e2f4f8; }
.hs-tip p img { width: 14px; vertical-align: -2px; }
.hs-play { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.hs-play .btn-green.big { height: 52px; flex: none; font-size: 17px; }
.hs-play .btn-grey.sm { align-self: center; }

/* panneau des 3 boutons du socle */
.hs-gender.big button { height: 40px; font-size: 15px; }

/* téléphone en paysage (body.mobile, scène ≈ 995 × 460) */
body.mobile .hs { grid-template-columns: 178px minmax(0, 1fr) 226px; gap: 8px; padding: 6px 8px 6px; }
body.mobile .hs-sec { padding: 6px 7px; border-radius: 12px; }
body.mobile .hs h3 { margin-bottom: 5px; font-size: 10px; }
body.mobile .hs-l, body.mobile .hs-r { gap: 6px; overflow-y: auto; touch-action: pan-y; }
body.mobile .hs-presets { gap: 5px 4px; }
body.mobile .hs-pre { width: 30px; height: 34px; }
body.mobile .hs-pre .hs-num { min-width: 14px; height: 14px; font-size: 9px; line-height: 14px; }
body.mobile .hs-hexes { grid-template-columns: repeat(3, 44px); column-gap: 8px; row-gap: 2px; padding-bottom: 25px; }
body.mobile .hs-hexes .hs-hex { width: 44px; height: 50px; }
body.mobile .hs-hexes .hs-hex:nth-child(2n) { top: 0; }
body.mobile .hs-hexes .hs-hex:nth-child(3n+2) { top: 25px; }
body.mobile .hs .hs-act { width: 16px; height: 16px; bottom: -4px; }
body.mobile .hs .hs-act img { width: 10px; }
body.mobile .hs-hex .lk { width: 17px; height: 17px; right: 0; bottom: 4px; border-width: 1px; }
body.mobile .hs-hex .lk img { width: 10px; }
body.mobile .hs-gender button { height: 30px; font-size: 12px; }
body.mobile .hs-gnote { display: none; }
body.mobile .hs-name h2 { font-size: 26px; }
body.mobile .hs-name .hs-editing { display: none; }
body.mobile .hs-name .skin-tag { font-size: 11px; margin-top: 2px; }
body.mobile .hs-ped { margin-top: -14px; }
body.mobile .hs-ped::before { top: 22px; height: 30px; }
body.mobile .hs-cls { grid-template-columns: repeat(3, 52px); column-gap: 10px; padding-bottom: 30px; }
body.mobile .hs-cls .hs-hex { width: 52px; height: 72px; }
body.mobile .hs-cls .hs-hex .hx { inset: 0 0 12px; }
body.mobile .hs-cls .hs-hex:nth-child(3n+2) { top: 30px; }
body.mobile .hs-cls .hs-hex b { font-size: 9.5px; }
body.mobile .hs-spells { grid-template-columns: repeat(4, 38px); gap: 4px 8px; }
body.mobile .hs-spell { width: 38px; height: 38px; border-radius: 9px; }
body.mobile .hs-spell.base { width: 42px; height: 42px; }
body.mobile .hs-tip { font-size: 10.5px; }   /* sort + évolutions visibles sur téléphone (plus de panneau Compétences) */
body.mobile .hs-play .btn-green.big { height: 42px; font-size: 14px; }
body.mobile .hs-play .btn-grey.sm { display: none; }

/* ---- v2 (Scott) : gros bouton « Jouer ce preset » / « Débloquer · prix » sous le héros, bénédiction au-dessus, 3 accès
   discrets en haut à gauche du centre, aperçu des styles non achetés, niveau de déblocage sous chaque sort */
.hs-ped { margin-top: -34px; gap: 8px; }
.hs-ped::before { top: 0; height: 44px; }
.hs-bless { position: relative; margin-top: 34px; display: flex; align-items: center; gap: 12px; max-width: 660px; padding: 6px 14px 6px 8px; border-radius: 14px; background: rgba(4, 26, 44, .72); }
.hs-bless .hx { position: relative; flex: 0 0 auto; display: block; width: 44px; height: 50px; --rc: #e8ff5a; }
.hs-bless .hx img { object-fit: contain; padding: 4px; background: #0d3550; }
.hs-bless b { display: block; font-size: 13.5px; color: #e8ff5a; }
.hs-bless p { margin: 1px 0 0; font-size: 13px; line-height: 1.32; color: #f2fbfd; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hs-cta { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; width: min(470px, 92%); height: 62px; padding: 0 22px;
  border: 3px solid #f2ff9c; border-radius: 16px; background: #c8e20a; color: #1c2300; font-family: Rowdies, sans-serif; font-size: 25px; letter-spacing: .5px; transition: transform .12s, background .12s; }
.hs-cta:hover { transform: translateY(-2px); background: #d8f02a; }
.hs-cta:active { transform: translateY(1px); }
.hs-cta.buy { background: #ffa51f; border-color: #ffe08a; color: #2a1500; }
.hs-cta.buy:hover { background: #ffb547; }
.hs-cta .hs-price { display: flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 12px; background: rgba(255, 255, 255, .85); font: 700 19px Lexend, sans-serif; font-style: normal; color: #1c1630; }
.hs-cta .hs-price img { width: 24px; height: 24px; }
.hs-cta .hs-price s { font-size: 13px; opacity: .6; }
.hs-prevtag { display: inline-block; margin: 4px 0 0 6px; padding: 2px 10px; border-radius: 10px; background: #ffa51f; color: #2a1500; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.hs-hex.prev.sel .hx { background: #fff; }
.hs-spells { row-gap: 18px; padding-bottom: 12px; }
.hs-spell .hs-lv { position: absolute; left: 50%; top: calc(100% + 1px); transform: translateX(-50%); font-style: normal; font-size: 9.5px; font-weight: 600; letter-spacing: .2px; color: rgba(200, 246, 255, .55); white-space: nowrap; pointer-events: none; }
.hs-play { margin-top: auto; }
body.mobile .hs-ped { margin-top: -20px; gap: 4px; }
body.mobile .hs-ped::before { top: 0; height: 26px; }
body.mobile .hs-bless { margin-top: 20px; gap: 6px; padding: 3px 8px 3px 4px; max-width: 100%; }
body.mobile .hs-bless .hx { width: 26px; height: 30px; }
body.mobile .hs-bless b { font-size: 10.5px; }
body.mobile .hs-bless p { font-size: 10px; -webkit-line-clamp: 1; }
body.mobile .hs-cta { height: 40px; font-size: 17px; border-radius: 12px; width: min(340px, 96%); }
body.mobile .hs-cta .hs-price { font-size: 14px; padding: 2px 8px; }
body.mobile .hs-cta .hs-price img { width: 18px; height: 18px; }
body.mobile .hs-prevtag { font-size: 9px; padding: 1px 6px; }

/* ---- page TERRAINS (js/terrainpage.js) : même langage que l'écran Héros */
#p-terrains:has(.hs) { padding: 0; }
.hs.tp { grid-template-columns: minmax(0, 1fr) 560px; gap: 18px; }
.tp-c { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; justify-items: center; gap: 10px; min-width: 0; min-height: 0; }
.tp-view { position: relative; min-height: 0; height: 100%; max-width: 100%; aspect-ratio: 1280 / 800; border-radius: 20px; border: 4px solid var(--rc); overflow: hidden; background: #0d3550; }
.tp-view img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tp-badge { position: absolute; top: 10px; right: 10px; padding: 3px 12px; border-radius: 10px; background: rgba(4, 26, 44, .8); color: #c8f6ff; font: 800 12px Lexend, sans-serif; font-style: normal; letter-spacing: .5px; text-transform: uppercase; }
.tp-badge.on { background: var(--lime); color: #1c2300; }
.tp-badge.prev { background: #ffa51f; color: #2a1500; }
.tp-info { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 760px; padding: 8px 16px; border-radius: 14px; background: rgba(4, 26, 44, .72); text-align: center; }
.tp-info .hint { font-size: 12px; color: #c8f6ff; white-space: normal; }
.hs-cta.done { background: rgba(4, 26, 44, .8); border-color: var(--lime); color: var(--lime); cursor: default; }
.hs-cta.done:hover { transform: none; }
.tp-r { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.tp-chips button { padding: 4px 10px; border-radius: 10px; border: 2px solid rgba(120, 220, 240, .35); background: rgba(4, 26, 44, .6); color: #c8f6ff; font-size: 12px; font-weight: 700; }
.tp-chips button:hover { border-color: #fff; }
.tp-chips button.on { background: #4fd6ea; border-color: #4fd6ea; color: #062033; }
.tp-chips.rar button.on { background: var(--rc); border-color: var(--rc); color: #10141c; }
.tp-grid { flex: 1; min-height: 0; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.tp-grid .ter-card { background: #0f3a58; }
.tp-grid .ter-card.tp-on { border-color: #fff; box-shadow: 0 0 0 3px #fff; }
body.mobile .hs.tp { grid-template-columns: minmax(0, 1fr) 300px; gap: 8px; }
body.mobile .tp-c { gap: 4px; }
body.mobile .tp-c .hs-name .hs-editing { display: none; }
body.mobile .tp-c .hs-name h2 { font-size: 20px; }
body.mobile .tp-view { border-width: 3px; border-radius: 12px; }
body.mobile .tp-info { padding: 3px 8px; }
body.mobile .tp-info .hint { display: none; }
body.mobile .tp-chips { gap: 3px; }
body.mobile .tp-chips button { padding: 2px 6px; font-size: 9.5px; border-width: 1px; }
body.mobile .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; touch-action: pan-y; }
body.mobile .tp-grid .ter-info b { font-size: 11px; }
body.mobile .tp-grid .ter-info em { display: none; }
/* barre de navigation : une entrée de plus (Terrains) → un peu plus serrée */
.mh-brand { flex-shrink: 0; }
#mnav { gap: 0; }
#mnav button { padding: 0 7px; gap: 6px; font-size: 13px; letter-spacing: 0; }   /* Scott 2026-10-20 : avec l'Encyclopédie, les boutons de son sortaient du cadre (1600 px) */
#mnav button.on::after { left: 7px; right: 7px; }
#mnav button img { width: 18px; }
body.mobile #mnav button { padding: 0 7px; font-size: 12px; }
body.mobile .tp-chips { flex-wrap: nowrap; overflow-x: auto; touch-action: pan-x; scrollbar-width: none; }
body.mobile .tp-chips button { flex: 0 0 auto; }

/* Scott 2026-10-21 : les 7 classes en hexagone complet (une fleur) : Crâ au centre, Osamodas au-dessus, Xélor dessous, deux de chaque côté */
.hs-cls { grid-auto-rows: 88px; padding-bottom: 0; }
.hs-cls .hs-hex[data-cls="osamodas"] { grid-area: 1 / 2; top: 0; }
.hs-cls .hs-hex[data-cls="cra"] { grid-area: 2 / 2; top: 0; }
.hs-cls .hs-hex[data-cls="xelor"] { grid-area: 3 / 2; top: 0; }
.hs-cls .hs-hex[data-cls="iop"] { grid-area: 1 / 1; top: 49px; }
.hs-cls .hs-hex[data-cls="sram"] { grid-area: 2 / 1; top: 49px; }
.hs-cls .hs-hex[data-cls="eniripsa"] { grid-area: 1 / 3; top: 49px; }
.hs-cls .hs-hex[data-cls="sacrieur"] { grid-area: 2 / 3; top: 49px; }
body.mobile .hs-cls { grid-auto-rows: 72px; padding-bottom: 0; }
body.mobile .hs-cls .hs-hex[data-cls="osamodas"], body.mobile .hs-cls .hs-hex[data-cls="cra"], body.mobile .hs-cls .hs-hex[data-cls="xelor"] { top: 0; }
body.mobile .hs-cls .hs-hex[data-cls="iop"], body.mobile .hs-cls .hs-hex[data-cls="sram"], body.mobile .hs-cls .hs-hex[data-cls="eniripsa"], body.mobile .hs-cls .hs-hex[data-cls="sacrieur"] { top: 41px; }
/* Scott 2026-10-21 : plus de barre (socle) sous le héros, la bénédiction juste sous ses pieds */
.hs-ped::before, body.mobile .hs-ped::before { display: none; }
.hs-ped .hs-bless { margin-top: 18px; }
body.mobile .hs-ped .hs-bless { margin-top: 10px; }
