:root {
  --bg: #050816;
  --card: #0f172a;
  --muted: #9ca3af;
  --text: #e5e7eb;
  --border: #1f2937;
  --accent: #fbbf24;
  --ul: #a855f7;
  --sp: #f97316;
  --ex: #22c55e;
  --he: #f87171;
  --elem-RED: rgba(248,113,113,0.85);
  --elem-PUR: rgba(192,132,252,0.85);
  --elem-BLU: rgba(96,165,250,0.85);
  --elem-GRN: rgba(52,211,153,0.85);
  --elem-YEL: rgba(250,204,21,0.90);
  --radius-xl: 18px;
  --radius-md: 10px;
  --transition: 0.18s ease-out;
  --equip-size: 110px;     /* changer ici pour toute la liste */
  --equip-inner-pct: 90%; /* proportion du contenu / frame */
  --compat-col-min: 160px;   /* largeur mini du “carré” */
  --compat-card-h: 220px;    /* hauteur fixe du carré */
  --compat-thumb-h: 120px;   /* hauteur max de l’image */
  --compat-badge: 24px;      /* taille SP/UL */
  --chars-col-min: 230px;   /* largeur mini des cartes dans .characters-grid (default: 230px) */
  --chars-thumb-w: 100px;   /* largeur fixe du thumb dans .char-card-thumb-wrap (default: 110px) */
  --chars-badge-h: 34px;    /* hauteur des badges .badge-rarity / .badge-zenkai (default: 40px) */
  --chars-name-size: 0.95rem; /* taille du nom (default: 1rem) */
  --equip-compat-size: 170px;   /* taille du carré (largeur min de colonne) */
  --equip-thumb-max-w: 100%;     /* largeur max du portrait dans la carte */
  --equip-thumb-max-h: 100%;     /* hauteur max du portrait */
  --equip-badge-size: 40px;     /* taille des badges UL/SP */
  --equip-zenkai-size: 22px;    /* taille badge Zenkai */
  --equip-ll-height: 22px;      /* hauteur plaque LL */
  --equip-name-size: 15px;    /* taille du nom */
  --equip-type-size: 15px; 
  --equip-zenkai-size: 32px;   /* taille badge Zenkai */
}

/* corps en colonne : header / main */
body.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.layout > main {
  flex: 1 0 auto;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.home-main {
  max-width: 1300px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* --- PAGE LISTE PERSOS --- */

.page-characters {
  background: #020816;
  color: #fff;
  min-height: 100vh;
}

.characters-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.characters-top {
  margin-bottom: 1.5rem;
}

.characters-top h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.characters-filters .filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.characters-filters select,
.characters-filters input[type="search"] {
  background: #050b18;
  border: 1px solid #222a40;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

.characters-filters input::placeholder {
  color: #98a0c2;
}

/* carte perso */

.char-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  pointer-events: none;
}

.char-card-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem 0.8rem;
  align-items: center;
}

.char-card-ll-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 52px;
  pointer-events: none;
}

.char-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* responsive */

@media (max-width: 640px) {
  .characters-layout {
    padding-inline: 1rem;
  }

  .char-card-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .char-card-thumb-wrap {
    width: 100%;
    max-width: 150px;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.45);
  }
}

.char-card-type img {
  width: 16px;
  height: 16px;
}

.badge-rarity {
  height: 32px;      /* taille fixe = rendu propre */
}

/* ---------- HEADER ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 10, 25, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
}

.site-header-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fdfdfd;
  text-decoration: none;
}

.site-logo img {
  width: 150px;
  height: 60px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: #c5ccdd;
  text-decoration: none;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.site-nav a.is-active {
  background: linear-gradient(135deg, #ffb347, #ff6b6b);
  color: #050814;
}

/* ---------- HERO ---------- */

.home-hero {
  position: relative;
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
  border-radius: 26px;
  padding: 2.4rem 2rem;
  overflow: hidden;
  background: radial-gradient(circle at top left, #ffe28a 0, #ff6b6b 25%, #522b84 55%, #050814 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);
}

.home-hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  z-index: 1;
}

.home-hero-text {
  max-width: 520px;
}

.home-hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: rgba(5, 8, 24, 0.9);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.home-hero-title {
  font-size: clamp(2.2rem, 3vw, 2.8rem);
  font-weight: 800;
  margin: 0 0 0.6rem;
  color: #050814;
}

.home-hero-subtitle {
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(5, 8, 20, 0.85);
  max-width: 480px;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn-primary {
  background: #050814;
  color: #fdfdfd;
  box-shadow: 0 10px 20px rgba(5, 8, 20, 0.7);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(5, 8, 20, 0.9);
}

.btn-ghost {
  background: rgba(5, 8, 20, 0.15);
  color: #050814;
  border: 1px solid rgba(5, 8, 20, 0.35);
}

.btn-ghost:hover {
  background: rgba(5, 8, 20, 0.25);
}

.home-hero-art img {
  max-width: 380px;
  width: 100%;
  border-radius: 22px;
  display: block;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);
}

.home-hero-glow {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.4), transparent 55%);
  opacity: 0.45;
}

/* ---------- SECTIONS ---------- */

.home-section {
  background: radial-gradient(circle at top, #0b1020 0, #050814 55%);
  border-radius: 22px;
  padding: 1.5rem 1.5rem 1.7rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.7);
}

.home-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.home-section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.home-section-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #8ea0ff;
}

.home-section-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.home-section-link {
  font-size: 0.85rem;
  color: #9fb4ff;
  text-decoration: none;
}

.home-section-link:hover {
  text-decoration: underline;
}

/* ---------- RANGÉES DE CARTES ---------- */

.home-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
}

.home-card-row-sub {
  margin-top: 1rem;
}

/* ---------- CARTES PERSONNAGE ---------- */

.home-char-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 0.9rem 1rem;
  border-radius: 18px;
  text-decoration: none;
  background: linear-gradient(135deg, #050910, #070e1a);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.85);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.home-char-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
}

.home-char-thumb-wrap {
  position: relative;
  flex-shrink: 0;
}

.home-char-thumb {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  object-fit: cover;
  background: radial-gradient(circle at top, #353b63, #050814);
  border: 2px solid rgba(255, 255, 255, 0.12);
}

/* badges */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.badge-rarity-ul {
  background: linear-gradient(135deg, #ffdf5f, #ff4fd8);
}

.badge-ll {
  position: absolute;
  right: 4px;
  bottom: 4px;
  background: #f5f7ff;
  color: #5a2fb0;
  border: 1px solid rgba(90, 47, 176, 0.4);
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #111827 0, #020817 55%, #000 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

h1 {
  margin: 0 0 4px;
  font-size: 24px;
}

.sub {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

input[type="search"],
select {
  background: #020817;
  color: var(--text);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 8px 10px;
  font-size: 13px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 14px;
}

/* Section de rareté sur index */

.rarity-section-title {
  margin: 20px 0 4px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.badge.UL { color: var(--ul); border-color: var(--ul); }
.badge.SP { color: var(--sp); border-color: var(--sp); }
.badge.EX { color: var(--ex); border-color: var(--ex); }
.badge.HE { color: var(--he); border-color: var(--he); }

/* meta badges */

.home-char-main {
  flex: 1;
  min-width: 0;
}

.home-char-name {
  margin: 0 0 0.1rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: #f5f7ff;
}

.home-char-id {
  margin: 0 0 0.3rem;
  font-size: 0.75rem;
  color: #9098b5;
}

.home-char-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.badge-element {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e9edf8;
  background: rgba(10, 16, 35, 0.9);
}

.badge-type {
  background: rgba(255, 255, 255, 0.06);
  color: #d7dff7;
}

/* ---------- ACCÈS RAPIDE ---------- */

.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.quick-link-card {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(5, 9, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: #e3e7f5;
  font-size: 0.9rem;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.quick-link-card h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.quick-link-card p {
  margin: 0;
  font-size: 0.82rem;
  color: #a5afcd;
}

.quick-link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(159, 180, 255, 0.9);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.8);
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 900px) {
  .home-hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-hero-art {
    align-self: stretch;
  }

  .home-hero-art img {
    max-width: 100%;
  }

  .site-header-inner {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .home-main {
    padding-inline: 1rem;
  }

  .home-section {
    padding-inline: 1.1rem;
  }

  .home-hero {
    padding-inline: 1.3rem;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }
}

/* couleurs élément approximatives */

.badge.elem-red { border-color: #ff5b5b; }
.badge.elem-blu { border-color: #5b8dff; }
.badge.elem-grn { border-color: #4fd66d; }
.badge.elem-pur { border-color: #c770ff; }
.badge.elem-yel { border-color: #ffd95b; }

/* Cartes personnages */

.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.card {
  background: var(--card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15,23,42,0.7);
  border-color: var(--accent);
}

.card-header {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-element {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--muted);
  background: #020817;
}

.card-title {
  font-size: 14px;
  margin: 0;
  font-weight: 600;
}

.card-meta {
  font-size: 11px;
  color: var(--muted);
}

.pill.UL { color: var(--ul); border-color: var(--ul); }
.pill.SP { color: var(--sp); border-color: var(--sp); }
.pill.EX { color: var(--ex); border-color: var(--ex); }
.pill.HE { color: var(--he); border-color: var(--he); }

.card-link {
  margin-top: 4px;
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

/* Bandelettes (details) */

.details-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.art-block,
.ability-block {
  background: #f5f5f5;
  color: #111827;
  border-radius: 10px;
  border: 1px solid #d4d4d4;
  overflow: hidden;
}

.art-block summary,
.ability-block summary {
  list-style: none;
  padding: 6px 9px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
}

.art-block summary::-webkit-details-marker,
.ability-block summary::-webkit-details-marker {
  display: none;
}

.art-body-row {
  display: flex;
  align-items: center;        /* centre verticalement texte + icône */
  justify-content: space-between;
  gap: 16px;
}

.art-meta,
.ability-meta {
  font-size: 10px;
  color: #6b7280;
}

.art-entry-armor-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/*.art-entry-armor {
  width: 60px;
  height: auto;
}*/

.art-entry-armor-text {
  font-size: 11px;
  color: #111827;
  opacity: 0.9;
}

.art-body,
.ability-body {
  padding: 6px 9px 8px;
  font-size: 11px;
  line-height: 1.5;
}

.art-flags {
  margin: 2px 0 4px;
  font-size: 10px;
  color: #4b5563;
}

/* Styles spé capacité */

.ability-block.limited_z summary {
  background: #fef3c7;
}
.ability-block.ultra summary {
  background: linear-gradient(90deg, #e0f2fe, #fee2ff);
}
.ability-block.z summary {
  background: #e5e7eb;
}
.ability-block.zenkai summary {
  background: #e0f2fe;
}
.ability-block.unique summary {
  background: #f9fafb;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 11px;
}

.icon-arts { width: 50px; height: 60px; display:inline-block; }

.ability-subtitle {
  font-weight: 600;
  margin: .25rem 0 .35rem;
  opacity: .9;
}

.icon-list { display: flex; gap: 8px; align-items: center; }

.flow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.flow-node { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.flow-node img { width: 36px; height: 36px; }
.flow-label { font-size: .9rem; opacity: .85; }
.flow-arrow { font-size: 1.2rem; opacity: .7; }

.ability-bullets { margin: .25rem 0 1rem; padding-left: 1.2rem; }
.ability-bullets li { margin: .15rem 0; }

/* ===== HERO ===== */
.char-hero{
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  aspect-ratio: 32 / 7;      /* AVANT : 16 / 5 -> maintenant plus "fin" */
}


.char-hero-bg{
  position: absolute;
  inset: 0;
  z-index: 0;
  background-repeat: no-repeat;
  background-size: var(--bg-zoom-x, 130%) 100%;
  background-position: calc(50% + var(--bg-shift-x, 0px)) center;
  filter: brightness(.95) saturate(1.05);
}

.char-hero-inner{
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.hero-left{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-ll-banner{
  position: absolute;
  left: 24px;
  top: 16px;
  z-index: 3;
}

.hero-ll-banner img{
  height: 30px;          /* ajuste 26–34px selon ton rendu */
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.45));
}

.hero-art{
  height: calc(100% * var(--art-scale, 1.1));  /* fallback 0.8 si rien dans le style inline */
  width: auto;
  object-fit: contain;
  transform: translate(var(--art-x, 0), var(--art-y, 0));
  transform-origin: center;
}

.hero-main{
  position: absolute; left: 18px; bottom: 14px;
  display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(90deg, rgba(0,0,0,.48), rgba(0,0,0,.08), transparent);
  padding: 10px 14px; border-radius: 10px;
  max-width: min(620px, 55%);
}

.hero-topline{ display:flex; align-items:center; gap:10px; }
.hero-name{ margin:0; font-size: 22px; }
.hero-id{ opacity:.85; font-weight:600; }

.hero-top-left{
  position: absolute;
  left: 18px;
  bottom: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.hero-stamps{
  position: absolute;
  right: 22px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

.hero-switch-container{
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  display: flex;
  gap: 20px;            /* un peu plus d'espace entre boutons */
  z-index: 30;
  pointer-events: auto;
}

.hero-switch-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;          /* légèrement plus petit */
  height: 34px;
  padding: 4px;         /* léger padding pour l'icône */
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.32);
  cursor: pointer;
  transition: transform 120ms cubic-bezier(.2,.8,.2,1), box-shadow 120ms ease, filter 120ms ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.45);
  will-change: transform, box-shadow;
  outline: none;
}

.hero-switch-btn:active { transform: translateY(2px) scale(0.94); }

.hero-switch-btn.pressed {
  transform: translateY(2px) scale(0.94);
  box-shadow: 0 3px 8px rgba(0,0,0,0.38) inset;
  filter: brightness(0.98);
}

/* accessibilité : focus visible */
.hero-switch-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(96,165,250,0.16);
}

.hero-switch-btn img{
  width: 22px;          /* réduit */
  height: 22px;
  object-fit: contain;
  display:block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.hero-stamps img.stamp-rarity{
  display:block;
  height: 60px;          /* taille de SPARKING */
  width:auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.45));
}

.hero-stamps img{
  display:block;
  height: 60px;             /* même hauteur pour les deux = même “grosseur” */
  width: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.45));
  pointer-events: none;
}

.hero-stamps img.stamp-ll{
  display:block;
  height: 20px;  /* ou la valeur que tu utilises déjà */
  width:auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.45));
  transform: translateX(var(--ll-offset-x, 0));  /* +px => plus à droite */
}

main { position: relative; z-index: 0; }

.hero-stamps img.stamp-ultra{ height: 64px; }

.hero-icons{ display:flex; gap:8px; flex-wrap:wrap; }

.pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;                             /* légèrement plus grand */
  border-radius: 9999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  color: #e5e7eb;
}

/* couleur identique pour lien normal & visité */
.pill,
.pill:link,
.pill:visited{
  color: #e5e7eb;
}

.pill img{
  height: 18px;
}

/* right-side: rarity + (optional) Legends Limited banner */
.hero-branding{
  --brand-w: clamp(240px, 22vw, 340px); /* même largeur pour les deux */
  position: absolute; right: 22px; bottom: 14px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  z-index: 2;
}

.hero-branding .rarity-logo{ width: var(--brand-w); height: auto; display: block; }

.hero-branding .ll-wrap{ order: -1; }
.hero-branding .ll-logo{ width: var(--brand-w); height: auto; display: block; }

.hero-bottom-left{
  position: absolute;
  left: 24px;
  bottom: 16px;
  display: inline-flex;
  flex-direction: column;
  /* Surtout pas de pointer-events:none ici */
}

.hero-name-inner{
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.hero-bottom-label{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing:  .12em;
  font-weight: 700;
  opacity: .85;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.12);
  display: inline-flex;
  align-items: center;
}

.hero-bottom-pills{
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;   /* responsive */
}

.hero-bottom-pills .pill{
  text-decoration: none;     /* ce sont des <a> maintenant */
}

.hero-bottom-pills .pill:hover{
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.35);
}

.hero-bottom-pills .pill-element-RED{
  background: linear-gradient(135deg, #7f1d1d, #f97316);
  border-color: #fecaca;
}

.hero-bottom-pills .pill-element-BLU{
  background: linear-gradient(135deg, #0f172a, #38bdf8);
  border-color: #bae6fd;
}

.hero-bottom-pills .pill-element-GRN{
  background: linear-gradient(135deg, #064e3b, #22c55e);
  border-color: #bbf7d0;
}

.hero-bottom-pills .pill-element-PUR{
  background: linear-gradient(135deg, #312e81, #a855f7);
  border-color: #ddd6fe;
}

.hero-bottom-pills .pill-element-YEL{
  background: linear-gradient(135deg, #78350f, #facc15);
  border-color: #fef9c3;
}

.hero-bottom-pills .pill-type{
  background: linear-gradient(135deg, #020617, #111827);
  border-color: rgba(148,163,184,0.65);
  color: #e5e7eb;
}

.hero-name-bar{
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 12px 6px;
  margin-bottom: 6px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(15,23,42,0.95),
    rgba(15,23,42,0.75)
  );
  border: 1px solid rgba(148,163,184,0.7);
  box-shadow: 0 4px 14px rgba(15,23,42,0.85);
  user-select: none;                 /* pas sélectionnable */
}


.hero-name-text{
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d1d5db;                    /* gris clair */
}

.hero-id-inline{
  font-size: 10px;
  color: #9ca3af;
}
/* ===== TAGS / RIBBONS ===== */
.tags-ribbons{
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  padding: 14px 18px 8px;
}

.tag-link{
  text-decoration: none;
  flex: 0 0 220px;          /* largeur fixe du “slot” */
  display: flex;
  justify-content: center;
}

/* styles.css */
.tag-ribbon{
  width: 100%;              /* prend toute la largeur du slot (220px) */
  height: 52px;             /* hauteur identique pour tous */
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0 16px;

  font: 800 13px/1.1 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: center;
  color: #151823;
  text-shadow: 0 1px 0 rgba(255,255,255,.85);

  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;

  border: none;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
}

.tag-ribbon.long{
  font-size: 12px;          /* un peu plus petit pour les textes longs */
  line-height: 1.1;
  white-space: normal;      /* permet 2 lignes max */
}

.tag-ribbon:hover{
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* Petites aides visuelles */
.section > h2{ margin: 18px 0 8px; }
.muted.small{ opacity:.7; font-size:.9rem; }

/* ===== KIT : Arts + Capacités (style Legends) ===== */

.kit-panel {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Un groupe : "Principale", "Capacités LIMITED Z", "Z", "Cap. unique"... */
.kit-section {
  border-radius: 14px;
  overflow: hidden;
  background: #f3f4f6;
  color: #111827;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}

.kit-section.main,
.kit-section.unique {
  border: 2px solid #020617;
}

/* Bande noire en haut du groupe (titre) */
.kit-section-header {
  padding: 6px 12px;
  background: #111827;
  color: #f9fafb;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Corps du groupe = liste des entrées */
.kit-section-body {
  padding: 6px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ===== Entrées de capacités (accordion) ===== */

.kit-entry {
  border-radius: 10px;
  background: #f9fafb;
  border: 1.5px solid #d4d4d8;
  overflow: hidden;
}

/* On utilise <details> pour l'accordion */
.kit-entry summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f3f4f6;
}

.kit-entry summary::-webkit-details-marker {
  display: none;
}

.kit-entry-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kit-entry-title {
  font-weight: 700;
  font-size: 13px;
  color: #111827;
}

.kit-entry-meta {
  font-size: 11px;
  color: #6b7280;
}

.kit-entry-arrow {
  font-size: 13px;
  color: #4b5563;
  margin-left: 8px;
}

/* Body de la capacité */
.kit-entry-body {
  padding: 8px 10px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #111827;
}

.kit-entry-body p {
  margin: 0 0 4px;
}

.kit-entry-body .kit-entry-note {
  font-size: 11px;
  color: #4b5563;
}

.kit-entry[open] summary {
  background: #fef9c3;
  border-bottom: 1.5px solid #d4d4d8;
}

/* Variation de couleur pour LIMITED Z / Z / Unique (comme dans le jeu) */

.kit-section.limited_z .kit-section-header {
  background: linear-gradient(90deg, #facc15, #f59e0b);
}

.kit-section.z .kit-section-header {
  background: #111827;
}

.kit-section.unique .kit-section-header {
  background: #111827;
}

.kit-section.main .kit-section-header {
  background: #111827;
}

/* ===== Entrées d'arts ===== */

/* Un art = carte complète */
.art-entry {
  border-radius: 12px;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  overflow: hidden;
  color: #111827;
}

.art-entry summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 12px;
  display: block;
}

.art-entry summary::-webkit-details-marker {
  display: none;
}

.art-entry-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.art-entry-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
}

.art-entry-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative; /* nécessaire pour placer le badge LF en absolute */
}

/* petit badge Legends Limited sur la vignette */
.art-entry-lf-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 28px;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
  z-index: 4;
}

.art-entry-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.art-entry-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.art-entry-title {
  font-weight: 700;
  font-size: 14px;
  color: #111827;
}

.art-entry-meta {
  font-size: 12px;
  color: #4b5563;
  display: flex;
  gap: 10px;
}

.art-entry-badges {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Corps du détail */
.art-entry-body-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.22s ease-out;
}

.art-entry-body {
  padding: 8px 12px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #111827;
}

.art-entry-text {
  font-size: 12px;
  line-height: 1.5;
  color: #111827;
}

.art-entry-text p {
  margin: 0 0 4px;
}

.art-entry-text .kit-entry-body {
  font-size: 11px;
  color: #4b5563;
}

.art-entry[open] summary {
  background: #fef9c3;
  border-bottom: 1.5px solid #e5e7eb;
}

/* Optionnel : petite étiquette en haut du bloc Arts ("Performance des arts") */
.kit-subtitle {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

/* === Capacités Z : onglets par palier d'étoiles === */

.kit-section.z {
  background: #020617;
  color: #e5e7eb;
}

.kit-section.z .kit-section-body {
  padding: 10px 12px 12px;
}

.kit-z {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kit-z-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kit-z-tab {
  border-radius: 999px;
  border: 1px solid #374151;
  background: #020617;
  color: #e5e7eb;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kit-z-tab .kit-z-stars {
  font-size: 11px;
  color: #9ca3af;
}

.kit-z-tab.is-active {
  background: #2563eb;
  border-color: #60a5fa;
}

.kit-z-content {
  border-radius: 10px;
  background: #0b1120;
  padding: 8px 10px 10px;
  border: 1px solid #1f2937;
  font-size: 12px;
  line-height: 1.5;
}

.kit-z-pane {
  display: none;
}

.kit-z-pane.is-active {
  display: block;
}

.kit-z-pane-title {
  font-weight: 700;
  margin-bottom: 4px;
}

/* Responsive : sur mobile, on se contente de la largeur 100% */
@media (max-width: 640px) {
  .art-entry-icon {
    width: 56px;
    height: 56px;
  }
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--chars-col-min), 1fr));
  gap: 1.4rem;
}

/* carte perso */

.char-card-link {
  text-decoration: none;
  color: inherit;
}

.char-card {
  position: relative;
  display: flex;
  border-width: 1px;
  border-style: solid;
  flex-direction: column;
  border-radius: 18px;
  padding: 10px 14px 18px; /* un peu plus de place en bas pour la plaque LL */
  background: radial-gradient(circle at top left, rgba(255,255,255,0.06), transparent 60%),
              #101320;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  height: 190px;                 /* hauteur UNIFORME sur desktop */
}

.char-card.char-card--dual {
  position: relative;
  border-color: transparent; /* la vraie bordure est dessinée par ::after */
  box-shadow:
    0 0 10px var(--elem-color-a),
    0 0 10px var(--elem-color-b); /* glow mix des deux couleurs */
}

/* anneau dégradé autour de la carte */
.char-card.char-card--dual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px; /* épaisseur du liseré */

  /* ⬇ séparateur DIAGONAL entre les deux couleurs */
  background: linear-gradient(
    145deg,
    var(--elem-color-a) 0 50%,
    var(--elem-color-b) 50% 100%
  );

  /* on creuse l'intérieur pour ne garder qu'un anneau */
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  pointer-events: none;
  z-index: 0;
}

/* … idem pour BLU / GRN / YEL */

.char-card[style*="--border-elem-b:RED"] { --elem-color-b: var(--elem-RED); }
.char-card[style*="--border-elem-b:YEL"] { --elem-color-b: var(--elem-YEL); }
.char-card[style*="--border-elem-b:PUR"] { --elem-color-b: var(--elem-PUR); }
.char-card[style*="--border-elem-b:GRN"] { --elem-color-b: var(--elem-GRN); }
.char-card[style*="--border-elem-b:BLU"] { --elem-color-b: var(--elem-BLU); }

.char-card[data-active-element="RED"] {
  border: 1px solid rgba(248, 113, 113, 0.85);
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.30);
}

.char-card[data-active-element="BLU"] {
  border: 1px solid rgba(96, 165, 250, 0.85);
  box-shadow: 0 0 14px rgba(96, 165, 250, 0.30);
}

.char-card[data-active-element="GRN"] {
  border: 1px solid rgba(52, 211, 153, 0.85);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.30);
}

.char-card[data-active-element="PUR"] {
  border: 1px solid rgba(192, 132, 252, 0.85);
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.30);
}

.char-card[data-active-element="YEL"] {
  border: 1px solid rgba(250, 204, 21, 0.90);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.30);
}

.char-pill-elem {
  margin-right: 2px;
}
.char-pill-elem-second {
  margin-left: -6px;   /* léger chevauchement si tu veux */
}

@media (max-width: 768px) {
  .char-card {
    height: auto;                /* sur mobile on laisse respirer */
  }
}

.char-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.45);
}

.char-card-main {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;                       /* prend toute la hauteur dispo */
}

.char-card-thumb-wrap {
  position: relative;
  flex: 0 0 var(--chars-thumb-w);
}

.char-card-thumb {
  width: 100%;
  height: auto;
  display: block;
}

.char-card-text {
  flex: 1;
  min-width: 0;
}

.char-card-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px;
  font-size: var(--chars-name-size);
  font-weight: 600;
  min-width:0;
}

.thumb-stack-transform{
  position: relative;
  width: 100%;
}

.thumb-stack-transform img{
  grid-area: 1 / 1;       /* ✅ superposition propre */
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: opacity .18s ease;
}

.thumb-stack-transform .thumb-img-a{
  position: relative !important;
  display: block;
  width: 100%;
  height: auto;
  opacity: 1;
}

/* B en overlay */
.thumb-stack-transform .thumb-img-b{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
}

a.char-card-link:hover .thumb-stack-transform .thumb-img-a{ opacity:0; }
a.char-card-link:hover .thumb-stack-transform .thumb-img-b{ opacity:1; }

/* texte du nom, bridé à 2 lignes pour garder la même hauteur */
.char-card-name-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow:ellipsis;
  min-width:0;
}

.char-card-id {
  font-size: 0.8rem;
  opacity: 0.7;
}

.char-card-type {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(255,255,255,0.06);
}

/* pastille réutilisable (élément, etc.) */
.char-pill {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(0,0,0,0.65);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.char-pill img {
  max-width: 22px;
  max-height: 22px;
}

/* Badges UL/SP + Zenkai (en haut de la carte) */
.char-card-badges {
  position: absolute;
  top: 6px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.char-card-badges-left,
.char-card-badges-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-rarity,
.badge-zenkai {
  height: var(--chars-badge-h);
}

/* Style spécial pour les cartes Zenkai - Option A (subtil) */
.char-card.card-zenkai {
  position: relative;
  background:
    radial-gradient(130% 120% at 0% 0%,
      rgba(255, 215, 0, 0.18),
      rgba(0, 0, 0, 0.92) 60%),
    var(--card-bg, #141722);
  
  box-shadow:
    0 0 0 1px rgba(255, 215, 0, 0.6),
    0 10px 26px rgba(255, 180, 0, 0.18);
}

.char-card.card-zenkai::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.35),
    rgba(255, 170, 0, 0.10) 45%,
    rgba(255, 215, 0, 0.25) 100%
  );
  opacity: 0.55;
  mix-blend-mode: screen;
  pointer-events: none;
}

.char-card.card-zenkai:hover {
  box-shadow:
    0 0 0 1px rgba(255, 215, 0, 0.95),
    0 14px 34px rgba(255, 180, 0, 0.30);
  transform: translateY(-2px);
}

/* texte légèrement chaud pour harmonie, mais pas trop contrasté */
.card-zenkai .char-card-name,
.card-zenkai .char-card-id,
.card-zenkai .char-card-type {
  color: #f3e9d2;
}

/* vignette : bord discret doré */
.card-zenkai .char-card-thumb {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* badge zenkai : ton plus foncé et moins criard */
.badge-zenkai {
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.28));
  opacity: 0.96;
}

/* small flag if no icon available */
.zenkai-flag {
  background: linear-gradient(90deg,#ffefb3,#ffd24a);
  border: 1px solid rgba(0,0,0,0.06);
  color: #462f00;
  padding: 4px 6px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 11px;
}

/* Plaque Legends Limited en bas de la carte */
.char-card-ll {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* plaque plus grande */
.char-card-ll img {
  height: 28px;          /* ajuste à 26 / 30 si besoin */
  display: block;
}

/* texte par-dessus la plaque */
.char-card-ll-label {
  position: absolute;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #2c1600;        /* texte sombre, lisible sur doré */
  text-shadow: 0 1px 0 rgba(255,255,255,.85);
  white-space: nowrap;
  pointer-events: none;
}

/* Contour coloré selon l’élément (mais plus de “PUR/GRN” qui traîne) */
/* Contour coloré directement sur la carte selon l’élément */
.card-element-RED .char-card {
  border: 1px solid rgba(248, 113, 113, 0.85);
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.30);
}

.card-element-BLU .char-card {
  border: 1px solid rgba(96, 165, 250, 0.85);
  box-shadow: 0 0 14px rgba(96, 165, 250, 0.30);
}

.card-element-GRN .char-card {
  border: 1px solid rgba(52, 211, 153, 0.85);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.30);
}

.card-element-PUR .char-card {
  border: 1px solid rgba(192, 132, 252, 0.85);
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.30);
}

.card-element-YEL .char-card {
  border: 1px solid rgba(250, 204, 21, 0.90);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.30);
}

.card-element-RED .char-card.char-card--dual,
.card-element-BLU .char-card.char-card--dual,
.card-element-GRN .char-card.char-card--dual,
.card-element-PUR .char-card.char-card--dual,
.card-element-YEL .char-card.char-card--dual {
  /* on garde le bord "classique" transparent pour laisser
     la bordure dégradée (pseudo-élément ::after) faire le job */
  border-color: transparent;

  /* et on RÉACTIVE le glow mix des deux couleurs */
  box-shadow:
    0 0 3px var(--elem-color-a),
    0 0 3px var(--elem-color-b);
}

/* === Bordure bicolore + languette TAG === */

/* Languette en BAS GAUCHE, même gradient */
.char-card[style*="--elem-corner"]::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 26px;
  height: 26px;

  background-image: var(--elem-corner);
  background-size: 100% 100%;
  background-repeat: no-repeat;

  /* Quart de cercle collé au coin bas-gauche de la carte */
  border-bottom-left-radius: 18px;
  border-top-right-radius: 0;
  border-top-left-radius: 0;
  border-bottom-right-radius: 0;

  pointer-events: none;
  z-index: 1; /* ← au-dessus du bord dégradé */
}

@font-face {
  font-family: "DBLGame";
  src: url("../font/FOT_OutPut_RodinWanpakuPro-B.otf") format("opentype");
  font-style: normal;
  font-display: swap;
}

.page-character .art-entry-title,
.page-character .art-entry-text,
.page-character .art-entry-meta,
.page-character .kit-entry-title,
.page-character .kit-entry-body,
.page-character .kit-entry-body p,
.page-character .kit-entry-note,
.page-character .hero-name-text,
.page-character .hero-id-inline {
  font-family: "DBLGame", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Respect accessibilité */
@media (prefers-reduced-motion: reduce){
  .char-card-thumb-wrap .tag-thumb-stack .tag-thumb-b{
    opacity: 0;
  }
}

.char-card-thumb.thumb--cardart{
  transform: translate(-18%, -18%) scale(1.9);
  transform-origin: 0 0;
}

/* petite vignette pour la forme 'fusion' (ex: Gogeta) */
.char-card-thumb.tag-thumb-fusion{
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 46px;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 6px 14px rgba(0,0,0,0.45);
  background: rgba(0,0,0,0.35);
  z-index: 3;
}

/* keyframes : fade-in rapide, visible court, fade-out plus PRECOCE et plus RAPIDE */
@keyframes tagFade{
  0%   { opacity: 0; }   /* start hidden */
  6%   { opacity: 1; }   /* fade-in rapide */
  30%  { opacity: 1; }   /* visible */
  36%  { opacity: 0; }   /* fade-out rapide, plus tôt dans la timeline */
  100% { opacity: 0; }   /* reste caché jusqu'à la prochaine itération */
}

.char-card-thumb-wrap .tag-thumb-stack{
  position: relative;
  width: 100%;
  display: grid;
}

.char-card-thumb-wrap .tag-thumb-stack .tag-thumb{
  grid-area: 1 / 1;
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.45s linear;
  will-change: opacity;
  pointer-events: none;
}

.char-card-thumb-wrap .tag-thumb-stack .tag-thumb.active{
  opacity: 1;
  pointer-events: auto;
}

/* reduced motion */
@media (prefers-reduced-motion: reduce){
  .char-card-thumb-wrap .tag-thumb-stack .tag-thumb{
    transition: none;
    opacity: 1;
  }
}

.tag-description {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 2rem;
  border-radius: 8px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
}

.equip-card-top{ display:flex; gap:14px; align-items:center; }
.equip-card-id{ opacity:.7; font-size:13px; margin-top:3px; }

.equip-icon{ position:relative; width:84px; height:84px; flex:0 0 auto; }
.equip-icon img{ position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.equip-art{ transform: scale(.86); }

.equip-hero{ display:flex; gap:24px; align-items:center; margin-bottom:32px; }
.equip-hero-left { flex-shrink:0; width:120px; }
.equip-hero-right { flex:1; }

.equip-slot {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.slot-title {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 16px;
  color: #e5e7eb;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.slot-stats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slot-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.95rem;
}

.slot-stat:last-child {
  border-bottom: none;
}

.stat-label {
  color: var(--text);
  flex: 1;
  padding-right: 12px;
}

/* Pilule dorée pour les plages min-max */
.stat-range {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(251,191,36,0.15);
  border: 1px solid rgba(251,191,36,0.4);
  font-weight: 700;
  font-size: 0.9rem;
  color: #fbbf24;
  white-space: nowrap;
}

/* Pilule dorée pour les valeurs fixes (platine) */
.stat-value-fixed {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(251,191,36,0.15);
  border: 1px solid rgba(251,191,36,0.4);
  font-weight: 700;
  font-size: 0.9rem;
  color: #fbbf24;
  white-space: nowrap;
}

/* Stats fixes (équipements platine) - pourcentages dorés */
.slot-stat-fixed {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

/* Slots bleus pour équipements platine */
.equip-slot-platinum {
  background: linear-gradient(135deg, rgba(30,58,95,0.5) 0%, rgba(20,40,70,0.6) 100%);
  border-left: 3px solid #3b82f6;
  border-top: 1px solid rgba(59,130,246,0.2);
  border-right: 1px solid rgba(59,130,246,0.2);
  border-bottom: 1px solid rgba(59,130,246,0.2);
}

.equip-slot-platinum .slot-title {
  color: #60a5fa;
}

/* Effets textuels */
.slot-effects {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slot-effect-main {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.55;
}

.slot-effect-sub {
  font-size: 0.92rem;
  color: #94a3b8;
  padding-left: 14px;
  line-height: 1.5;
}

/* Badge déblocage (★7 etc.) */
.slot-unlock {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251,191,36,0.12);
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 8px;
}

/* Rang GOD centré pour les équipements platine */
.rank-calculator-platinum {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
}

.rank-calculator-platinum .calc-header {
  margin-bottom: 24px;
}

.rank-calculator-platinum .rank-badge-wrap {
  position: static;
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.rank-calculator-platinum .rank-badge {
  width: 100px;
  height: 100px;
}

/* === LISTE ÉQUIPEMENTS : vignettes compactes avec frame superposé === */
.equip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 16px 0 40px;
}

.equip-card {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 100px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

.equip-card-icon-wrap {
  position: relative;
  width: 100px;
  height: 100px;
}

.equip-card-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 75%;
  height: 75%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  border-radius: 8px;
  z-index: 1;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.equip-card-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
  transition: filter 0.2s ease;
}

/* Nom en tooltip au hover - VERSION CORRECTE */
.equip-card-name {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%) translateY(6px);
  width: max-content;
  max-width: 280px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.96);
  border: 1px solid rgba(251, 191, 36, 0.55);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.85);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.35;
  color: #fef9c3;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 100;
}

.equip-card:hover .equip-card-name {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* === AJOUTS : Calculateur de rang === */
.calc-stat {
  margin-bottom: 16px;
}

.calc-stat-label {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 6px;
}

.calc-stat-value {
  font-size: 0.85rem;
  color: #fbbf24;
  font-weight: 600;
}

/* === ÉQUIPEMENTS : Hover fluide + nom visible === */

.equip-card:hover .equip-card-icon {
  transform: translate(-50%, -50%) scale(1.05);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.equip-card:hover .equip-card-frame {
  filter: drop-shadow(0 6px 16px rgba(251, 191, 36, 0.35));
}

/* === CALCULATEUR DE RANG : Style amélioré === */
.rank-calculator {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 20px;
  padding: 28px;
  margin-top: 28px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.calc-header {
  font-size: 1.1rem;
  font-weight: 800;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 24px;
  text-align: center;
}

.rank-badge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.rank-badge {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 6px 20px rgba(167, 139, 250, 0.4));
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}

.rank-badge-animate {
  animation: rankPop 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes rankPop {
  0% { transform: scale(0.8); opacity: 0.6; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity:  1; }
}

.calc-slot {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 18px;
}

.calc-slot-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #60a5fa;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calc-stat-slider {
  margin-bottom: 18px;
}

.calc-stat-slider label {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 8px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1e3a5f, #3b82f6);
  cursor: pointer;
  transition: background 0.2s ease;
}

.stat-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.5);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.7);
}

.stat-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.1);
}

.stat-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.5);
  cursor: grab;
}

.stat-output {
  min-width: 55px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  font-weight: 700;
  font-size: 0.9rem;
  color: #fbbf24;
  text-align: center;
}

.calc-stat-fixed {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.calc-stat-val {
  font-weight: 700;
  color: #fbbf24;
}

.calc-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.calc-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.calc-choice:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(96, 165, 250, 0.3);
}

.calc-choice input[type="radio"] {
  margin-top: 3px;
  accent-color: #fbbf24;
}

/* Notice platine */
.platinum-notice {
  margin-top: 16px;
  font-size: 0.92rem;
  color: #e5e7eb;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  text-align: center;
}

.platinum-notice strong {
  color: #60a5fa;
}

/* === PERSONNAGES COMPATIBLES : Cartes plus grandes === */
.compat-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.compat-card-thumb img,
.compat-card-thumb .char-card-thumb {
  border-radius: 12px;
}

.compat-rarity-badge {
  height: 28px;
}

.compat-card-ll img {
  height: 22px;
}

.compat-card-ll-label {
  font-size: 6.5px;
}

.compat-element {
  width: 18px;
  height: 18px;
}

@media (max-width: 480px) {
  .compat-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  .compat-card-thumb {
    width: 64px;
    height: 64px;

  }
  .compat-card-name {
    font-size: 0.78rem;
    max-width: 90px;
  }
}

/* === FIX GRID PERSONNAGES COMPATIBLES === */

/* Force la grid à rester en carré */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-top:  24px;
  grid-auto-rows: 1fr; /* force toutes les lignes à avoir la même hauteur */
}

/* Carte en flex column pour occuper toute la hauteur */
.compat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 6px;
  transition: all 0.2s ease;
  min-height: 140px; /* hauteur minimum */
  aspect-ratio: 3/4; /* ratio carré portrait */
  text-decoration: none;
  overflow: hidden;
}

/* Badges SP/UL plus petits et ronds */
.compat-sp-badge,
.compat-ul-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  object-fit: contain;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

/* Thumb occupe l'espace disponible */
.compat-card-thumb {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  overflow: hidden;
}

.compat-card-thumb img {
  max-width: 90%;
  max-height: 100%;
  object-fit: contain;
}

/* Footer fixe en bas */
.compat-card-footer {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 6px;
  flex-shrink: 0;
}

.compat-element-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.compat-card-name {
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

/* Badges Zenkai/LL ajustés */
.compat-zenkai-badge {
  position: absolute;
  bottom: 26px;
  z-index: 3;
  
  top:10px; left:10px;
  width:44px; height:44px;
  object-fit:contain;
  background: transparent !important;
  box-shadow:none !important;
}

/* === Compat cards: carré 300px + hover dynamique (scoped equipment page) === */
.page-equipment .char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--equip-compat-size), 1fr));
  gap: 14px;
}

/* Carte carré avec layout vertical */
.page-equipment .compat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.10);
  aspect-ratio: 1 / 1;              /* carré strict */
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

/* Hover: léger lift + glow */
.page-equipment .compat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.55);
  border-color: rgba(96,165,250,0.35);
}

/* BG gradient léger en fond (optionnel) */
.page-equipment .compat-card-bg {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background: radial-gradient(60% 60% at 70% 30%, rgba(96,165,250,0.5), transparent 65%);
  pointer-events: none;
}

/* Zone vignette: centre, avec overflow masqué */
.page-equipment .compat-card-thumb {
  flex: 1;
  display: grid;
  margin-bottom: 8px;
  overflow: hidden;
  position: relative;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  margin: 0;          /* récupère de la hauteur utile */
  min-height: 0;      /* important en flex-column */
  place-items: end center; /* grid: bottom + center */
  padding-bottom: calc(var(--equip-ll-height, 22px) + 8px); /* réserve la place du bandeau LL */
}

/* Image: clamp à ~70% de la carte, zoom au hover */
.page-equipment .compat-card-thumb img,
.page-equipment .compat-card-thumb .char-card-thumb {
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.55));
  transition: transform .22s ease, filter .22s ease;
  will-change: transform;
  max-width: var(--equip-thumb-max-w);
  max-height: var(--equip-thumb-max-h);
}

/* Zoom doux au survol */
.page-equipment .compat-card:hover .compat-card-thumb img,
.page-equipment .compat-card:hover .compat-card-thumb .char-card-thumb {
  transform: scale(1.06);
  filter: drop-shadow(0 10px 26px rgba(96,165,250,0.35));
}

/* Badges SP/UL en haut droit (taille stable) */
.page-equipment .compat-sp-badge,
.page-equipment .compat-ul-badge {
  position: absolute;
  object-fit: contain;
  z-index: 10;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
  pointer-events: none;
  width: var(--equip-badge-size);
  height: var(--equip-badge-size);
  top: 8px;
  right: 8px;
}

/* Badge Zenkai et plaque LL côte à côte en bas au-dessus du footer */
.page-equipment .compat-zenkai-badge {
  position: absolute;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
  pointer-events: none;
  bottom: 40px;
  left: 10px;
  width: var(--equip-zenkai-size);
  height: var(--equip-zenkai-size);
  z-index: 10;
}

.compat-card-zenkai .compat-card-bg{
  background: none !important;
}

.page-equipment .compat-card.card-zenkai{
  background:
    radial-gradient(130% 120% at 0% 0%,
      rgba(255, 215, 0, 0.18),
      rgba(0, 0, 0, 0.92) 60%);
  box-shadow:
    0 0 0 1px rgba(255, 215, 0, 0.6),
    0 10px 26px rgba(255, 180, 0, 0.18);
}

.page-equipment .compat-card.card-zenkai::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.35),
    rgba(255, 170, 0, 0.10) 45%,
    rgba(255, 215, 0, 0.25) 100%
  );
  opacity:.55;
  mix-blend-mode:screen;
  pointer-events:none;
}

/* Footer compact en bas */
.page-equipment .compat-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.65);
  border-radius: 10px;
  flex-shrink: 0;
}
.page-equipment .compat-element-icon { width: 20px; height: 20px; }
.page-equipment .compat-card-name {
  font-weight: 700; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: var(--equip-name-size);
}

/* Responsive: rétrécit le carré et les contenus */
@media (max-width: 900px) {
  .page-equipment .char-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
  }
  .page-equipment .compat-sp-badge,
  .page-equipment .compat-ul-badge { width: 22px; height: 22px; }
  .page-equipment .compat-zenkai-badge { width: 18px; height: 18px; bottom: 40px; }
  .page-equipment .compat-ll-badge { height: 18px; }
  .page-equipment .compat-card-name { font-size: 11px; }
}

@media (max-width: 560px) {
  .page-equipment .char-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }
  .page-equipment .compat-card-thumb img,
  .page-equipment .compat-card-thumb .char-card-thumb {
    max-width: 82%;
    max-height: 68%;
  }
  .page-equipment .compat-sp-badge,
  .page-equipment .compat-ul-badge { width: 20px; height: 20px; }
  .page-equipment .compat-zenkai-badge { width: 16px; height: 16px; bottom: 38px; }
  .page-equipment .compat-ll-badge { height: 16px; }
  .page-equipment .compat-card-name { font-size: 10.5px; }
  :root {
    --equip-compat-size: 200px;
    --equip-badge-size: 26px;
    --equip-name-size: 12.5px;
    --equip-type-size: 11.5px;
  }
}

/* Footer: nom et type plus lisibles */
.page-equipment .compat-card-footer .compat-type,
.page-equipment .compat-card-footer .char-card-type { font-size: var(--equip-type-size); }

/* === LL : plaque + texte (page équipement) === */
.page-equipment .compat-ll{
  height: var(--equip-ll-height, 22px);
  display: grid;
  place-items: center;
  pointer-events: none;
  margin-top: 6px;   /* ← ajuste 4 à 10px selon ton goût */
  margin-bottom: 4px;

  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 52px;     /* ajuste si besoin (au-dessus du footer) */
  margin: 0;
  z-index: 6;
}

.page-equipment .compat-ll-badge{
  position: static;     /* ✅ reprend sa place DANS .compat-ll */
  top: auto; right: auto; bottom: auto; left: auto; /* ✅ annule les anciens offsets */
  height: 100%;
  width: auto;
  display: block;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.45));
}

.page-equipment .compat-ll-label{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2; /* IMPORTANT : au-dessus de la plaque */
  font-weight: 900;
  text-transform: uppercase;
  color: #2c1600;
  text-shadow: 0 1px 0 rgba(255,255,255,.85);
  line-height: 1;
  font-size: 12px;
  letter-spacing: .05em;       /* trop grand => ça déborde vite */
  white-space: nowrap;
  transform: translateY(7px);
}


/* === Slot effects : un seul bullet propre (plus de "· ·" ou "- •") === */
.equip-slot .slot-effects{
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.equip-slot .slot-effect{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.55;
}

.equip-slot .slot-bullet{
  width: 14px;
  flex: 0 0 14px;
  text-align: center;
  opacity: .95;
}

.equip-slot .slot-effect-main{
  font-size: 0.95rem;
  color: var(--text);
}

.equip-slot .slot-effect-sub{
  font-size: 0.92rem;
  color: #94a3b8;
  padding-left: 14px; /* petit retrait visuel */
}

.page-equipment .compat-card-thumb .char-card-thumb,
.page-equipment .compat-card-thumb .tag-thumb{
  width: auto !important;
  height: auto !important;
  max-width: 92%;
  max-height: 92%;
  object-fit: contain !important;
}

.page-equipment .compat-card-thumb .tag-thumb-stack{
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

/* Zoom hover plus doux (sinon ça coupe avec overflow:hidden du carré) */
.page-equipment .compat-card:hover .compat-card-thumb img,
.page-equipment .compat-card:hover .compat-card-thumb .char-card-thumb,
.page-equipment .compat-card:hover .compat-card-thumb .tag-thumb{
  transform: scale(1.02);
}

.tag-pill-ico img{ height:16px; width:auto; display:block; }

/* ✅ Tag-switch : fonctionne partout (index + equipment + etc.) */
.tag-thumb-stack{
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.tag-thumb-stack .tag-thumb{
  grid-area: 1 / 1;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.45s linear;
  will-change: opacity;
  pointer-events: none;
}

.tag-thumb-stack .tag-thumb.active{
  opacity: 1;
  pointer-events: auto;
}

/* Requirements (ribbons DBL) */
.req-line{
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  padding: 8px 0 2px;
}

.req-ribbon.tag-ribbon{
  width: 220px;               /* même “slot” que tes tags */
}

.req-ribbon{
  justify-content: flex-start; /* icône à gauche */
  gap: 10px;
}

.req-ribbon-ico{
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
}

.req-ribbon-ico img{
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.req-ribbon-text{
  flex: 1;
  text-align: center;
}

.req-ribbon-pad{
  width: 18px;                /* équilibre à droite (pour centrer le texte) */
  flex: 0 0 18px;
}

.req-ribbon.is-active{
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.req-inline{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.req-connector{ opacity:.8; font-weight:900; user-select:none; }
.req-pill{ text-decoration:none; }
.req-pill img{ height:18px; width:auto; display:block; }

.page-equipment .compat-card-thumb.char-card-thumb-wrap{
  flex: 1 1 auto;     /* annule le “flex:0 0 ...” de la liste */
  width: auto;
}

/* Choice slots (affichage fixe) */
.equip-slot-choice .slot-choices{
  list-style: none;
  margin: 0;
  padding: 0;
}
.equip-slot-choice .slot-choice{
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.equip-slot-choice .slot-choice:last-child{
  border-bottom: 0;
}
.equip-slot-choice .slot-choice-text{
  display: block;
  white-space: pre-line;  /* ✅ respecte \n dans ton JSON */
  line-height: 1.6;
}

.calc-choice:last-child{
  border-bottom: 0;
}
.calc-choice span{
  white-space: pre-line;  /* ✅ respecte \n */
  line-height: 1.6;
}

.inline-pill {
  white-space:nowrap;
  padding:2px 8px;
  border-radius:999px;
  background:rgba(255,215,0,0.06);
  color:#ffc657;
  font-weight:600;
  margin:0 4px;
  font-size:0.95em;
  display: inline-flex;
  vertical-align: middle;
  margin: 0 .35rem;
}

/* Optionnel : pour conserver espacement visuel des "label-only" */
.slot-stat-label-only .stat-label {
  display: inline-block;
  /* réserve visuellement l'espace à droite si tu veux */
}

/* Empêche un display:flex sur le conteneur texte de repousser la pill */
.slot-effect-text,
.slot-choice-text,
.slot-stat .stat-label,
.calc-stat-slider label {
  display: block;
}

/* Quand la valeur est dans la phrase, on cache la pastille de droite */
.calc-stat-slider.inline-in-label .stat-output {
  display: none;
}

/* === FIX portraits compat : descendre l'image + LL en overlay === */

/* 3) Le zoom part du bas => évite l'effet “coupé” */
.page-equipment .compat-card-thumb img,
.page-equipment .compat-card-thumb .char-card-thumb,
.page-equipment .compat-card-thumb .tag-thumb{
  transform-origin: 50% 100%;
}

.compat-ui-tags{
  position: absolute;
  top: 10px;
  left: 10px;
  right: 46px;          /* évite de chevaucher le badge SP en haut à droite */
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none; /* le clic traverse vers la carte */
}

.compat-ui-tags .ui-tag{
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
}

.compat-footer-line{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
}

.calc-choice-panel { display: none; }
.calc-choice-panel.is-active { display: block; }

.targets-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin:6px 0 8px;
}

.target-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.10);
  font-size:13px;
  line-height:1;
}

.target-chip img{
  width:18px;
  height:18px;
  object-fit:contain;
}

.target-sep{
  opacity:.7;
  font-size:12px;
  padding:0 2px;
}

.effect-block{
  padding:8px 0;
  border-top:1px solid rgba(255,255,255,0.08);
}
.effect-block:first-child{
  border-top:none;
  padding-top:0;
}

.effect-lines{
  margin:0;
  padding-left:16px;
}
.effect-lines li{
  margin:4px 0;
}

.effect-line-inline{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.eli-targets .targets-row{
  margin:0;              /* pas de marge en inline */
  display:inline-flex;
}

.effect-when{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin:6px 0 8px;
  opacity:.95;
}

.effect-when-colon{ opacity:.8; }

.chip{
  display:inline-flex;
  align-items:center;
  vertical-align:middle;
  line-height:1;
  transform: translateY(-1.75px); /* ajuste -1px / -2px / -3px */
}

.chip-ico{
  height:30px;
  display:block; /* important : enlève l'effet “baseline” des images */
}

.chip-txt{
  font-size:12px;
  line-height:1;
}

.slot-effect-spacer{
  list-style: none;
  height: 10px; /* ajuste */
  margin: 6px 0;
  padding: 0;
}

.thumb-stack-transform .char-card-thumb{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .18s ease;
}

.char-card-thumb-wrap > .thumb-switch-badge{
  position: absolute !important;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  z-index: 20;
  display: block;
  pointer-events: none;
}

.thumb-switch-badge{
  position:absolute;
  top:8px;
  left:8px;
  width:24px;
  height:24px;
  z-index:6;
  pointer-events:none;
}

.kit-gauge-row{
  display:block;
  align-items:center;
  gap:10px;
  margin: 6px 0 14px;
}

.kit-gauge-icons { display:flex; align-items:center; gap:10px; margin-top:6px; }

.kit-gauge-icon{
  width:40px;
  height:50px;
  object-fit:contain;
  flex:0 0 auto;
}

.kit-gauge-arrow { width:26px; height:26px; object-fit:contain; }

.kit-gauge-label{
  font-weight:700;
}

.chip-element .chip-ico {
  height: 22px;
}

#episodeWrapper h2 {
  margin-bottom: 0.5rem;
}

.episode-link {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.episode-link:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  transition: var(--transition);
}