/* Habillage DBL : ressources natives, dimensions adaptées au navigateur. */
@font-face {
  font-family:LegendsUI;
  src:url('../assets/game/ui/Legends-Condensed-Bold.ttf') format('truetype');
  font-weight:400 900;
  font-display:swap
}

:root {
  --game-ink:#17191d;
  --game-gold:#ffbf00;
  --game-ui:url('../assets/game/ui/background_NextGenUI.png');
  --game-panel:url('../assets/game/ui/Cmn_2_pltGameDialog_Base.png');
  --game-head:url('../assets/game/ui/Cmn_pltHeadLine.png');
  --game-button:url('../assets/game/ui/Cmn_2_btnDecide52.png')
}

body.layout-home,body.page-character {
  font-family:LegendsUI,Arial,sans-serif;
  font-size:16px;
  line-height:1.5
}

body.layout-home {
  background:#292f38 url('../assets/game/ui/background_cmn.png') center top/cover fixed;
  color:#f4f4f4
}

body.page-character {
  background:#ececec var(--game-ui) center top/cover no-repeat fixed;
  color:var(--game-ink)
}

.layout-home .site-header,.page-character .site-header {
  background:#15171a;
  border-bottom:3px solid #f3b917;
  box-shadow:0 4px 16px #0005
}

.layout-home .site-nav a,.page-character .site-nav a {
  border-radius:0;
  color:#eee;
  font-size:17px
}

.layout-home .site-nav a.is-active,.page-character .site-nav a.is-active {
  background:var(--game-button) center/100% 100%;
  color:#111;
  box-shadow:none
}

.game-page-title {
  display:flex;
  align-items:center;
  gap:18px;
  min-height:64px;
  margin:8px 0 20px
}

.game-page-title h1 {
  font-size:clamp(23px,3vw,32px);
  margin:0;
  font-style:italic;
  line-height:1.1
}

.game-page-title>span {
  font-size:12px;
  letter-spacing:1.5px;
  border-left:4px solid var(--game-gold);
  padding-left:12px;
  max-width:126px
}

.game-back {
  display:grid;
  place-items:center;
  flex-shrink:0;
  width:42px;
  height:42px;
  border-radius:50%;
  background:#222;
  color:white;
  text-decoration:none;
  border:2px solid #a2a2a2;
  line-height:1
}

.game-back svg {
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round
}

.home-main {
  max-width:1300px;
  padding:16px 28px 56px
}

.home-lobby {
  display:grid;
  grid-template-columns:minmax(260px,.9fr) minmax(0,1.1fr);
  align-items:center;
  min-height:440px;
  position:relative;
  isolation:isolate;
  margin-bottom:20px;
  border-bottom:2px solid #ffca3966
}

.home-lobby-intro {
  position:relative;
  z-index:2;
  padding:24px 0 32px 12px;
  max-width:440px
}

.game-kicker {
  display:inline-block;
  padding:3px 24px;
  background:#ffbf00;
  color:#131313;
  font-size:13px;
  letter-spacing:2px;
  transform:skew(-8deg)
}

.home-lobby h2 {
  font-size:clamp(32px,4.6vw,60px);
  line-height:1.04;
  font-style:italic;
  text-shadow:3px 3px #101116;
  margin:16px 0;
  max-width:420px
}

.home-lobby-intro p {
  font-family:Arial,sans-serif;
  font-size:15px;
  color:#e6e8eb;
  max-width:340px;
  margin:0 0 24px;
  line-height:1.6
}

.game-button {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  min-height:52px;
  max-width:330px;
  padding:10px 24px;
  margin:10px 0;
  background:var(--game-button) center/100% 100%;
  color:#171717;
  text-decoration:none;
  font-size:20px;
  filter:drop-shadow(2px 3px 0 #0006)
}

.game-button-secondary {
  background-image:url('../assets/game/ui/Cmn_2_btnOther52.png')
}

.game-button:hover {
  filter:brightness(1.08) drop-shadow(2px 3px 0 #0006)
}

.game-button span {
  font-size:28px;
  line-height:1
}

.home-featured {
  align-self:stretch;
  min-width:0;
  position:relative
}

.home-featured .home-char-card {
  height:100%;
  border:0!important;
  background:none!important;
  box-shadow:none!important;
  padding:0!important;
  transform:none!important
}

.home-featured .home-char-art-wrap {
  height:370px;
  aspect-ratio:auto;
  background:none;
  border:0;
  overflow:visible
}

.home-featured .home-char-main {
  background:var(--game-head) left center/100% 100%;
  padding:12px 28px;
  width:100%;
  margin-top:0;
  min-height:84px
}

.home-featured .home-char-name {
  font-size:24px;
  line-height:1.1;
  color:#fff;
  white-space:normal
}

.home-featured .home-char-art-wrap img.char-card-thumb {
  object-fit:contain;
  object-position:center bottom;
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
  filter:drop-shadow(5px 8px 5px #0005)
}

.home-featured .home-rarity-stamp {
  width:108px!important;
  height:auto!important;
  max-height:none;
  top:22px!important;
  right:12px!important
}

.home-featured .home-char-id {
  display:inline-block;
  margin:4px 12px 0 0;
  color:#ddd
}

.home-featured .home-char-meta {
  display:inline-flex;
  vertical-align:middle
}

.home-breathe-box {
  background:#14171dcc;
  border:1px solid #b9b9b944;
  border-radius:0;
  box-shadow:none;
  padding:10px 18px
}

.home-breathe-value {
  color:#ffd04b;
  font-size:29px;
  line-height:1.2
}

.home-breathe-label {
  font-size:14px;
  color:#f1f1f1
}

.home-breathe-summary {
  display:none
}

.home-section {
  background:transparent;
  border:0;
  box-shadow:none;
  border-radius:0;
  padding:0;
  margin-top:34px
}

.home-section-header {
  align-items:center;
  gap:20px;
  margin-bottom:16px
}

.home-ribbon {
  background:var(--game-head) left center/100% 100%!important;
  border:0;
  border-radius:0;
  box-shadow:none;
  padding:10px 34px 10px 14px;
  font-style:italic;
  font-size:23px;
  letter-spacing:0;
  text-transform:none;
  color:white
}

.home-ribbon::before,.home-ribbon::after {
  display:none
}

.home-section-link {
  color:#ffcf35;
  white-space:nowrap;
  font-size:15px
}

.home-card-row {
  gap:16px
}

.home-char-card {
  border:1px solid #c1c4c04d;
  border-radius:0;
  background:#191e25d9;
  box-shadow:3px 4px 0 #0005;
  padding:0;
  overflow:hidden;
  gap:0
}

.home-char-art-wrap {
  aspect-ratio:4/4.5;
  border:0;
  border-radius:0;
  background:#30363f url('../assets/game/ui/background_cmn.png') center/cover
}

.home-char-art-wrap>.char-card-thumb,.home-char-art-wrap .tag-thumb-stack,.home-char-art-wrap .tag-thumb {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
  object-fit:contain;
  object-position:center bottom
}

.home-char-art-wrap .tag-thumb-stack .tag-thumb {
  opacity:0;
  transition:opacity .45s
}

.home-char-art-wrap .tag-thumb-stack .tag-thumb.active {
  opacity:1
}

.home-char-main {
  padding:12px;
  width:100%;
  background:#171a20
}

.home-char-name {
  font-size:18px;
  margin:0;
  color:#fff;
  white-space:normal;
  min-height:2.6em;
  line-height:1.3
}

.home-char-id {
  color:#c0c4ca;
  margin:5px 0;
  font-size:12px
}

.home-char-meta .badge {
  background:none;
  border:0;
  border-radius:0;
  padding:0;
  color:#ddd
}

.home-equip-card {
  border-radius:0;
  background:#161b22e8;
  border:1px solid #979caa66;
  box-shadow:3px 4px #0004
}

.home-equip-name {
  color:white;
  font-size:18px
}

.page-character .wrap {
  max-width:1260px;
  padding-bottom:40px
}

.page-character .char-hero {
  border-radius:4px;
  border:2px solid #171717;
  box-shadow:3px 5px 0 #0002
}

.page-character .hero-tag-combo {
  border-radius:2px;
  border:0;
  gap:0;
  background:none;
  overflow:visible;
  box-shadow:none;
  margin-top:16px
}

/* Boutons de forme : images CharaInfo_3 du jeu (border-image .sw, 02-character-hero.css) → ni fond ni border ici,
   sinon le bouton du milieu de Broly perdait son image. */
.page-character .hero-tag-segment {
  font-family:LegendsUI,Arial,sans-serif;
  min-height:48px;
  box-shadow:none;
  font-size:17px;
  color:#111
}

.character-sections {
  display:flex;
  gap:4px;
  position:sticky;
  top:80px;
  z-index:8;
  background:#e3e3e3;
  padding:5px 0;
  border-bottom:2px solid #252525;
  margin:24px 0
}

.character-sections a {
  flex:1;
  text-align:center;
  text-decoration:none;
  background:url('../assets/game/ui/Cmn_2_btnOther52.png') center/100% 100%;
  color:#171717;
  min-height:44px;
  display:grid;
  place-items:center;
  font-size:17px;
  padding:8px
}

.character-sections a:hover,.character-sections a:focus-visible {
  background-image:var(--game-button)
}

.page-character .section,.page-character .tab {
  scroll-margin-top:150px
}

.page-character h2 {
  font-size:24px;
  color:#161719;
  margin:0 0 18px;
  border-bottom:2px solid #252525;
  padding-bottom:7px;
  line-height:1.3
}

.page-character #tagsWrapper,.page-character #vignetteWrapper,.page-character #episodeWrapper {
  margin:22px 0 26px
}

.page-character .tags-ribbons {
  gap:12px
}

.page-character #charEpisode a {
  border:1px solid #909090;
  background:#f7f7f7;
  color:#171717;
  border-radius:2px
}

.page-character .kit-panel {
  gap:22px;
  margin-top:0
}

.page-character .kit-section {
  border:0!important;
  border-radius:0;
  box-shadow:none;
  background:transparent;
  overflow:visible
}

.page-character .kit-section-header {
  color:white;
  background:#1c1e21 var(--game-head) left center/100% 100%;
  font-size:20px;
  font-style:italic;
  min-height:44px;
  padding:8px 20px;
  border:0
}

.page-character .kit-section-body {
  border:solid transparent;
  border-width:10px 24px 22px;
  border-image:var(--game-panel) 16 118 104 118 fill / 10px 24px 22px stretch;
  padding:8px 0 0;
  gap:12px;
  background:none
}

.page-character .kit-entry {
  border:1px solid #a9aaac;
  border-radius:2px;
  background:#fff;
  box-shadow:none
}

.page-character .kit-entry summary {
  background:#e9e9e9 url('../assets/game/ui/background_NextGenUI.png') center/700px auto;
  border:0;
  border-bottom:1px solid #b1b1b1;
  padding:13px 16px;
  min-height:52px
}

.page-character .kit-entry[open] summary {
  background:#fff2aa url('../assets/game/ui/Cmn_2_pltGameDialog_TitleBase.png') center/100% 100%
}

/* Le bandeau LEGEND possède ses propres états et sa flèche native. */
.page-character .legend_action .kit-entry summary {
  background:none;
  border:0;
  border-image:url('../assets/game/ui/Cmn_2_PltPulldownHeader_LEGEND_Close.png') 0 110 0 10 fill / 0 82px 0 8px stretch;
  padding:17px 88px 20px 18px;
  min-height:64px;
}
.page-character .legend_action .kit-entry[open] summary {
  border-image-source:url('../assets/game/ui/Cmn_2_PltPulldownHeader_LEGEND_Open.png');
}
.page-character .legend_action .kit-entry-arrow { visibility:hidden; }

.page-character .kit-entry-title {
  font-size:18px;
  color:#111
}

.page-character .kit-entry-arrow {
  font-size:18px;
  color:#202020
}

.page-character .kit-entry-body,.page-character .kit-entry-text,.page-character .art-entry-text {
  font-family:LegendsUI,Arial,sans-serif;
  font-size:16px;
  line-height:1.55;
  color:#161719
}

.page-character .kit-entry-body {
  padding:18px 20px;
  background:#fbfbfb
}

.page-character .kit-z-tabs {
  gap:4px;
  padding-bottom:8px
}

.page-character .kit-z-tab {
  border:0;
  border-radius:0;
  color:#222;
  background:url('../assets/game/ui/Cmn_2_btnOther52.png') center/100% 100%;
  font-family:inherit;
  font-size:16px;
  padding:10px 12px
}

.page-character .kit-z-tab.is-active {
  background-image:var(--game-button);
  color:#151515;
  box-shadow:none
}

.page-character .kit-z-stars {
  color:inherit;
  font-size:12px
}

.page-character .kit-z-content {
  padding:16px;
  background:#fff;
  border:1px solid #bbb;
  border-radius:0
}

.page-character .kit-z-pane-title {
  font-size:18px;
  color:#191919
}

.page-character .art-entry {
  border:1px solid #98999b;
  border-radius:2px;
  box-shadow:none;
  background:#fff;
  overflow:hidden;
  margin-bottom:12px
}

.page-character .art-entry-header,.page-character .art-entry>summary {
  background:#efefef var(--game-ui) center/700px auto!important;
  color:#161719;
  border-bottom:1px solid #aaa;
  padding:12px 16px
}

.page-character .art-entry[open]>.art-entry-header,.page-character .art-entry[open]>summary {
  background:#ffc72b url('../assets/game/ui/Cmn_2_pltGameDialog_TitleBase.png') center/100% 100%!important
}

.page-character .art-entry-title {
  font-size:19px;
  color:#101010;
  line-height:1.3
}

.page-character .art-entry-body {
  padding:18px 20px;
  background:#fcfcfc;
  font-size:16px;
  line-height:1.55
}

.page-character .kit-inline-icon {
  vertical-align:middle
}

/* Les libellés intégrés aux kits gardent la taille du texte qui les entoure. */
.page-character :is(.kit-panel,.art-entry) .chip-txt { font-size:1em; line-height:1.3; }
.page-character :is(.kit-panel,.art-entry) .chip { gap:4px; max-width:100%; transform:none; }
.page-character :is(.kit-panel,.art-entry) .chip-ico { flex-shrink:0; }

.page-character .legend-illustration {
  background:#24282e url('../assets/game/ui/background_cmn.png') center/cover;
  border:2px solid #222;
  border-radius:2px;
  color:#fff;
  padding:16px;
  margin-top:16px
}

.page-character .legend-illustration summary {
  font-size:18px;
  color:white
}

.page-character .legend-illustration canvas {
  border-radius:0
}

.page-character .illustration-controls select {
  font:inherit;
  background:#ededed;
  color:#111;
  border:1px solid #222;
  border-radius:0
}

.page-character .illustration-controls button {
  font:inherit;
  color:#111;
  background:var(--game-button) center/100% 100%;
  border:0;
  border-radius:0;
  padding:10px 24px
}

.page-character .legend-illustration .muted {
  color:#dce0e4
}

.page-character .equip-card {
  background:none; /* le cadre du jeu sert de bordure : plus de carré sombre derrière */
  color:white
}

.page-character .muted {
  color:#555
}

.game-button:focus-visible,.home-char-card:focus-visible,.character-sections a:focus-visible,.game-back:focus-visible {
  outline:3px solid #0099dc;
  outline-offset:3px
}

@media(max-width:800px) {
  .home-main {
    padding:12px 18px 32px
  }

  .home-lobby {
    grid-template-columns:.9fr 1.1fr;
    min-height:360px
  }

  .home-lobby h2 {
    font-size:38px
  }

  .home-lobby-intro {
    padding:10px 0 20px
  }

  .home-featured .home-char-art-wrap {
    height:320px
  }

  .home-card-row {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }

  .home-featured .home-char-name {
    font-size:20px
  }

  .home-featured .home-char-main {
    padding:10px 14px
  }

  .game-button {
    font-size:17px;
    padding:10px 18px
  }

  .character-sections {
    top:72px
  }

  .page-character .kit-section-body {
    border-width:8px 12px 14px;
    border-image-width:8px 12px 14px
  }

  .page-character .kit-entry-body {
    padding:16px
  }

}

@media(max-width:540px) {
  .home-lobby {
    grid-template-columns:1fr;
    gap:6px
  }

  .home-lobby-intro {
    padding:12px 0 0;
    max-width:none
  }

  .home-lobby h2 {
    font-size:38px;
    max-width:320px
  }

  .home-lobby-intro p {
    display:none
  }

  .game-button {
    display:inline-flex;
    min-width:0;
    width:calc(50% - 4px);
    font-size:14px;
    padding:8px 12px;
    gap:6px;
    vertical-align:top
  }

  .game-button span {
    font-size:20px
  }

  .home-featured .home-char-art-wrap {
    height:320px
  }

  .home-featured .home-char-main {
    min-height:74px
  }

  .home-featured .home-char-name {
    min-height:0
  }

  .home-breathe-value {
    font-size:25px
  }

  .home-breathe-box {
    padding:10px
  }

  .home-breathe-label {
    font-size:12px
  }

  .home-section-header {
    align-items:start;
    flex-direction:column;
    gap:8px
  }

  .home-ribbon {
    font-size:20px;
    width:100%;
    margin:0
  }

  .home-section-link {
    margin-left:auto
  }

  .home-card-row {
    gap:10px
  }

  .home-char-name {
    font-size:16px
  }

  .home-rarity-stamp {
    max-width:76px
  }

  .game-page-title {
    margin-bottom:16px;
    gap:10px
  }

  .game-page-title h1 {
    font-size:23px
  }

  .page-character .wrap {
    padding-left:12px;
    padding-right:12px
  }

  .character-sections {
    gap:2px;
    top:64px
  }

  .character-sections a {
    padding:8px 3px;
    font-size:13px;
    min-width:0
  }

  .page-character .hero-tag-segment {
    font-size:13px;
    padding:8px 5px
  }

  .page-character h2 {
    font-size:22px
  }

  .page-character .kit-entry-title {
    font-size:17px
  }

  .page-character .kit-entry-body,.page-character .kit-entry-text,.page-character .art-entry-text {
    font-size:15px
  }

  .page-character .kit-z-tab {
    font-size:13px;
    padding:8px 5px
  }

  .page-character .kit-z-stars {
    font-size:10px
  }

  .page-character .kit-z-content {
    padding:12px
  }

  .page-character .kit-entry-body {
    padding:14px
  }

  .page-character .legend-illustration {
    padding:12px
  }

  .page-character .section,.page-character .tab {
    scroll-margin-top:132px
  }

}

@media(prefers-reduced-motion:reduce) {
  .home-char-art-wrap .tag-thumb-stack .tag-thumb {
    transition:none
  }

}

/* Les détails natifs restent à leur hauteur réelle après redimensionnement. */
.page-character .art-entry-body-wrapper {
  max-height:none;
  overflow:visible;
  transition:none
}

.page-character .art-entry .art-entry-header {
  background:none!important;
  border:0;
  padding:0
}

/* ── Fiche perso : boutons de forme avec les boutons du jeu ───────────────────── */
/* Fusion / héritage : même famille d'images que les autres boutons de forme (calques .sw du bouton .sw-pair,
   voir 02-character-hero.css) ; ici seulement la police. */
.page-character .hero-form-pill-fusion {
  min-height:48px; gap:8px; border:0; border-radius:0; box-shadow:none; transform:none;
  font-family:LegendsUI,Arial,sans-serif; font-size:17px; letter-spacing:0; color:#111;
}
.page-character .hero-form-fusion img { width:30px; height:30px; }
/* Flèche + Fusion alignées sur les boutons du tag (qui ont 16 px de marge en haut) et même hauteur. */
.page-character .hero-form-flow > .hero-form-link,
.page-character .hero-form-flow > .hero-form-fusion { margin-top:16px; align-self:center; }
.page-character .hero-form-pill-fusion { min-height:48px; }
/* Flèche tag → fusion : sombre et lisible sur le fond clair de la page. */
.page-character .hero-form-link { color:#1d2026; text-shadow:none; }
.page-character .hero-form-link::before { font-size:20px; }
@media(max-width:700px) {
  .page-character .hero-form-pill-fusion { font-size:14px; }
  .page-character .hero-form-fusion img { width:24px; height:24px; }
}

/* ── Bannière Legends Limited de l'en-tête : badge du jeu + reflet ─────────────── */
.page-character .hero-ll-banner { left:8px; top:6px; width:150px; aspect-ratio:250/181; }
.page-character .hero-ll-banner img { display:block; width:100%; height:100%; filter:drop-shadow(0 2px 5px #000a); }
.hero-ll-banner .llbadge-shine {
  position:absolute; inset:0; mix-blend-mode:screen;
  background:linear-gradient(110deg, transparent 42%, rgba(255,248,200,.9) 50%, transparent 58%) 100% 0/300% 100% no-repeat;
  -webkit-mask:url('../assets/game/ui/ll-badge.webp') center/100% 100% no-repeat;
          mask:url('../assets/game/ui/ll-badge.webp') center/100% 100% no-repeat;
  animation:hero-ll-shine 5s ease-in-out infinite;
}
@keyframes hero-ll-shine { 0% { background-position:100% 0; } 24%,100% { background-position:0 0; } }
@media(max-width:700px) { .page-character .hero-ll-banner { width:104px; left:4px; top:4px; } }
@media(prefers-reduced-motion:reduce) { .hero-ll-banner .llbadge-shine { animation:none; opacity:0; } }

/* ── Puces tag / saga / perso dans le texte des capacités ─────────────────────
   Avant : bloc flex de 30 px centré → texte de la puce plus haut que le reste et lignes poussées vers le bas.
   Maintenant : la puce suit la ligne de base du texte et l'icône ne dépasse pas la hauteur de ligne. */
.page-character .kit-entry-text .chip { display:inline; vertical-align:baseline; white-space:nowrap; }
.page-character .kit-entry-text .chip-ico {
  display:inline-block; width:1.5em; height:1.5em; object-fit:contain;
  vertical-align:-0.38em; margin:-0.2em 0.2em -0.2em 0;
}
