/* Reset et base */
body {
  font-family: sans-serif;
  background: #121212;
  color: white;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1700px;
  margin: auto;
  display: flex;
  height: 88vh;
}

.column {
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  background: #1e1e1e;
  border-radius: 8px;
  margin: 10px;
  box-shadow: 0 0 10px #000;
}

.left {
  flex: 0 0 400px;
  width: 400px;
  display: flex;
  flex-direction: column;
  max-width: 400px;
  background: #222;
  height: 86vh;
  overflow: hidden;
}

.middle {
  overflow: hidden;
  position: relative;
  height: 86vh;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  background: #222;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 0 15px #000;
  min-height: 0;
  min-width: 0;
}

.middle-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;

  /* Réserve l’espace de la barre pour éviter tout “saut” de largeur */
  scrollbar-gutter: stable both-edges;
  -webkit-overflow-scrolling: touch;
}

/* Fallback si scrollbar-gutter n'est pas supporté */
@supports not (scrollbar-gutter: stable) {
  .middle-body { padding-right: 16px; }
}

.right {
 flex: 0 0 350px;
 width: 350px;
 max-width: none;
  background: #222;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 0 10px #000;
  overflow-y: auto;
}

.game-banner {
  background: linear-gradient(90deg, #0f0c29, #302b63, #24243e);
  color: #00ffe1;
  text-align: center;
  padding: 0 20px;
  font-family: 'Orbitron', sans-serif;
  border-bottom: 1px solid #00ffe1;
  box-shadow: 0 0 20px #00ffe1aa;
}

.game-banner h1 {
  font-size: 3em;
  letter-spacing: 4px;
  margin: 0;
  text-shadow: 0 0 10px #00ffe1aa, 0 0 20px #00ffe1aa;
}

.game-banner .subtitle {
  font-size: 1.2em;
  color: #c0f7ff;
  margin-top: 0;
  text-shadow: 0 0 5px #00ffe199;
}

.heroes-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100% - 200px);
  font-size: 14px;
}

.hero-stack {
  background: #2a2a2a;
  border-radius: 5px;
  padding: 4px 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  position: relative;
  font-size: 14px;
}

.hero-stack:hover {
  background: #444;
}

.hero-stack.selected {
  border: 2px solid yellow;
}

.fusion {
  margin-top: 12px;
  background: #333;
  border-radius: 5px;
  padding: 12px;
}

.fusion-selection {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  max-height: 120px;
  overflow-y: auto;
}

.cards-button {
  background: linear-gradient(90deg, #4a90e2, #005cbf);
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  color: white;
  font-weight: bold;
  font-size: 1.2em;
  cursor: pointer;
  box-shadow: 0 4px 8px #003974;
  transition: background 0.3s ease;
  width: 100%;
  max-width: 280px;
  display: block;
  margin: 0 auto;
}

.cards-button:hover:not(:disabled) {
  background: linear-gradient(90deg, #0077ff, #004a99);
}

.cards-button:disabled {
  background: #444;
  cursor: not-allowed;
  box-shadow: none;
  color: #999;
}

.upgrade-btn, .elite-upgrade-btn {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  font-size: 1.3em;
  white-space: normal;
  line-height: 1.4;
}

.elite-upgrade-btn {
  background: linear-gradient(90deg, #ff9800, #ff5722);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 152, 0, 0.5);
  transition: all 0.3s;
}

.elite-upgrade-btn:hover {
  background: linear-gradient(90deg, #ff5722, #ff9800);
  box-shadow: 0 0 15px rgba(255, 152, 0, 0.7);
}

.tabs {
  /* existant conservé */
  position: sticky;
  top: 0;
  z-index: 5;
  background: #222;
  display: flex;
  border-bottom: 2px solid #444;
  margin-bottom: 12px;

  /* nouveau : autorise 2 lignes (voire plus) */
  flex-wrap: wrap;
  gap: 6px 6px;       /* espace entre boutons (lignes/colonnes) */
  padding: 6px 6px 0; /* un peu d’air autour des boutons */
    justify-content: center;
}

.tab-btn {
  /* remplace "flex: 1" par ceci : */
  flex: 0 1 auto;
  min-width: 120px;   /* largeur mini confortable ; ajuste si besoin */
  white-space: nowrap;/* évite le retour à la ligne dans un bouton */
  background: #222;
  color: white;
  padding: 10px 12px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
  border-radius: 6px 6px 0 0; /* joli arrondi haut */
  margin: 0;                   /* évite des sauts visuels */
}

.tab-btn:hover {
  background: #333;
}

.tab-btn.active {
  background: #005cbf;
  box-shadow: inset 0 -3px 0 #00aaff;
}

.tab-panel {
  padding: 10px;
  background: #1e1e1e;
  border-radius: 6px;
  box-shadow: inset 0 0 10px #000;
  display: none;
}

.tab-panel.active {
  display: block;
  /* pas de overflow ici → le scroll est sur .middle-body */
  overflow: visible;
}

.enemy {
  flex: 1;
  background: #2c2c2c;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: inset 0 0 20px #111;
}

.enemy h2 {
  margin-bottom: 12px;
  font-size: 1.8em;
  text-shadow: 0 0 5px #f00;
}

.health-bar-container {
  width: 100%;
  height: 20px;
  background: #333;
  border-radius: 10px;
  margin: 10px 0;
  overflow: hidden;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}

.health-bar {
  height: 100%;
  /* width: 100%;  ← plus nécessaire */
  background: linear-gradient(90deg, #ff0000, #ff4500);
  border-radius: 10px;
  transition: transform 0.18s linear;
  transform-origin: left center;
  will-change: transform;
  position: relative;
}

.health-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 50%);
  border-radius: 10px;
}

.log h3 {
  margin-top: 0;
  text-align: center;
  margin-bottom: 10px;
  text-shadow: 0 0 5px #00ffea;
}

#log {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 300px;
  border: 1px solid #444;
  padding: 5px;
  background-color: rgba(0, 0, 0, 0.5);
}

#log p {
  margin: 3px 0;
  padding: 2px 5px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.inventory-container {
  display: flex;
  gap: 20px;
  height: calc(100% - 40px);
}

.equipped-section {
  flex: 1;
  min-width: 200px;
  max-width: 220px;
  overflow: hidden;
}

.inventory-section {
  flex: 2;
  overflow-y: auto;
}

.equipped-items {
  background: rgba(30, 30, 50, 0.7);
  padding: 10px;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  overflow: hidden;
}

.items-list {
  background: rgba(30, 30, 50, 0.7);
  padding: 10px;
  border-radius: 5px;
  max-height: 100%;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.reset-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

#reset-btn {
  background: #a33;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: background 0.3s ease;
}

#reset-btn:hover {
  background: #c44;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.tabs-left {
  display: flex;
  margin-bottom: 10px;
  border-bottom: 1px solid #444;
}

.tab-left-btn {
  background: #222;
  color: #ccc;
  border: none;
  padding: 8px 15px;
  cursor: pointer;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  transition: all 0.3s;
}

.tab-left-btn.active {
  background: #333;
  color: #0ff;
  border-bottom: 2px solid #0ff;
}

.tab-left-btn:hover:not(.active) {
  background: #2a2a2a;
}

.tab-left-panel {
  display: none;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Styles communs pour les cartes d'objets */
.item-card, .item-equipped {
  background: #2a2a2a;
  border-radius: 5px;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #444;
  position: relative;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.item-card:hover, .item-equipped:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.item-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.item-name {
  font-weight: bold;
  font-size: 1em;
  color: #fff;
  flex: 1;
  margin-bottom: 4px;
}

.item-rarity {
  font-size: 0.8em;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(0,0,0,0.3);
  text-transform: capitalize;
  white-space: nowrap;
  flex-shrink: 0;
}

.item-main-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
  padding: 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}

.item-dps {
  font-weight: bold;
  color: #4CAF50;
  font-size: 1.1em;
}

.item-type {
  font-style: italic;
  color: #aaa;
  font-size: 0.9em;
}

.item-effects-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  margin: 10px 0;
}

.item-effect {
  display: flex;
  justify-content: space-between;
  padding: 5px;
  background: rgba(0,0,0,0.2);
  border-radius: 3px;
  font-size: 0.85em;
}

.effect-name {
  color: #aaa;
}

.effect-value {
  font-weight: bold;
  color: #FFC107;
}

.item-actions {
  margin-top: 10px;
}

.item-actions button {
  width: 100%;
  padding: 8px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s;
}

.equip-btn {
  background: #4CAF50;
  color: white;
}

.equip-btn:hover {
  background: #45a049;
}

.unequip-btn {
  background: #f44336;
  color: white;
}

.unequip-btn:hover {
  background: #d32f2f;
}

.empty-slot {
  color: #777;
  font-style: italic;
  padding: 15px;
  text-align: center;
  background: rgba(30, 30, 40, 0.3);
  border-radius: 5px;
  margin-bottom: 10px;
}

/* Styles pour les objets spéciaux */
.special-item {
  border: 2px solid gold;
  background: linear-gradient(135deg, rgba(40,40,60,0.9), rgba(20,20,30,0.9));
  box-shadow: 0 0 15px rgba(255,215,0,0.5);
  animation: pulse-gold 2s infinite, glow 3s infinite alternate;
}

.special-item .item-name {
  color: #FFD700;
  text-shadow: 0 0 5px rgba(255,215,0,0.7);
}

.special-item .item-dps {
  color: #FFD700;
}

.special-item .effect-value {
  color: #FFD700;
  text-shadow: 0 0 3px rgba(255,215,0,0.5);
}

.special-item .equip-btn {
  background: #FFD700;
  color: #333;
}

.special-item .unequip-btn {
  background: #f44336;
  color: white;
}

.item-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.item-special-stat {
  font-size: 0.85em;
  color: #a0a0a0;
  display: flex;
  justify-content: space-between;
}

.item-special-stat .effect-name {
  color: #aaa;
}

.item-special-stat .effect-value {
  color: #FFC107;
  font-weight: bold;
}

.item-description {
  font-size: 0.85em;
  color: #a0f0ff;
  margin-top: 8px;
  padding: 5px;
  background: rgba(0, 30, 40, 0.3);
  border-radius: 4px;
  border-left: 2px solid #00aaff;
}

.special-item .item-description {
  color: #ffd700;
  border-left: 2px solid gold;
  background: rgba(40, 30, 0, 0.3);
}

.boss-damage {
  color: #ff5555;
  font-weight: bold;
}

/* Indicateur d'objet meilleur */
.better-item {
  position: relative;
  overflow: hidden;
}

.better-item::after {
  content: "↑ Meilleur";
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(76, 175, 80, 0.9);
  color: white;
  font-size: 0.7em;
  padding: 2px 5px;
  border-radius: 3px;
  font-weight: bold;
  z-index: 10;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

.special-item.better-item::after {
  background: rgba(255, 215, 0, 0.9);
  color: #222;
}

.warning {
  color: #ff6b6b;
  font-weight: bold;
}

.success {
  color: #51cf66;
  font-weight: bold;
}

#fusion-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #cccccc;
}

/* Styles de rareté */
.rarity-common { color: gray; }
.rarity-uncommon { color: #3adb76; }
.rarity-rare { color: #0077ff; }
.rarity-epic { color: #aa00ff; }
.rarity-legendary { color: #ff7f00; }
.rarity-mythic { color: #ff0055; }
.rarity-divine { color: #fff700; text-shadow: 0 0 8px gold; }
.rarity-celestial { color: #00fff7; text-shadow: 0 0 8px cyan; }
.rarity-transcendent { background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet); -webkit-background-clip: text; color: transparent; }
.rarity-god { color: gold; font-weight: bold; text-shadow: 0 0 12px white; }

.log-common { color: gray; }
.log-uncommon { color: #3adb76; }
.log-rare { color: #0077ff; }
.log-epic { color: #aa00ff; }
.log-legendary { color: orange; }
.log-mythic { color: #ff0055; }
.log-divine { color: #fff700; text-shadow: 0 0 8px gold; }
.log-celestial { color: #00fff7; text-shadow: 0 0 8px cyan; }
.log-transcendent { background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet); -webkit-background-clip: text; color: transparent; }
.log-god { color: #ff00ff; font-weight: bold; text-shadow: 0 0 12px white; }

.rarity-transcendent,
.log-transcendent {
  color: #00fff7;                /* texte cyan lisible */
  text-shadow: 0 0 6px rgba(0,255,255,.6);
}



/* Styles pour les héros élites */
.elite-hero {
  display: block;
  border: 1px solid gold;
  background: linear-gradient(135deg, rgba(40,40,60,0.9), rgba(20,20,30,0.9));
  box-shadow: 0 0 10px rgba(255,215,0,0.3);
  position: relative;
  overflow: hidden;
  font-size: 14px;
  padding: 4px 6px;
  color: #fff;
}

.elite-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255,215,0,0) 45%,
    rgba(255,215,0,0.1) 50%,
    rgba(255,215,0,0) 55%
  );
  transform: rotate(30deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  100% {
    transform: translateX(100%) rotate(30deg);
  }
}

.elite-hero .hero-special {
  color: #ffd700;
  font-weight: bold;
  text-shadow: 0 0 3px rgba(255,215,0,0.5);
  font-size: 0.85em;
  margin-top: 5px;
}

.elite-hero::after {
  content: "👑";
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 1.2em;
  text-shadow: 0 0 5px rgba(255,215,0,0.7);
}

.elite-hero:not(.locked-elite) {
  animation: pulse-gold 2s infinite;
}

.locked-elite-icon {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 1.2em;
  color: #ffcc00;
}

.hero-stack.locked-elite:hover {
  cursor: not-allowed;
  background-color: rgba(0,0,0,0.1);
}

/* Styles pour la forge */
.forge-container {
  padding: 15px;
  background: rgba(30, 30, 40, 0.7);
  border-radius: 8px;
  border: 1px solid #444;
}

.forge-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  min-height: 60px;
}

.forge-selection .item-card {
  width: 80px;
  height: 80px;
  padding: 5px;
  margin: 0;
}

.forge-selection .item-name {
  font-size: 0.7em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.forge-selection .item-dps {
  font-size: 0.8em;
}

.forge-selection .item-rarity {
  font-size: 0.6em;
}

#forge-items-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 15px;
}

#forge-result {
  margin-top: 15px;
  padding: 10px;
  border-radius: 5px;
  text-align: center;
  font-weight: bold;
}

.forge-success {
  background-color: rgba(76, 175, 80, 0.2);
  border: 1px solid #4CAF50;
  color: #4CAF50;
}

.forge-failure {
  background-color: rgba(244, 67, 54, 0.2);
  border: 1px solid #f44336;
  color: #f44336;
}

.forge-special {
  background-color: rgba(255, 215, 0, 0.2);
  border: 1px solid #FFD700;
  color: #FFD700;
  animation: pulse-gold 2s infinite;
}

/* Styles pour la santé du joueur */
.player-health {
  background: #2c2c2c;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: inset 0 0 20px #111;
}

.player-health h2 {
  margin-bottom: 10px;
  color: #4CAF50;
  text-shadow: 0 0 5px #4CAF50;
}

#heroes-hp {
  color: #4CAF50;
  font-weight: bold;
}

#heroes-max-hp {
  color: #aaa;
}

/* Styles pour la progression élite */
.elite-progress {
  background: rgba(0, 0, 0, 0.7);
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
}

.elite-progress h3 {
  color: gold;
  margin-bottom: 15px;
}

.elite-progress-item {
  margin-bottom: 10px;
}

.progress-container {
  width: 100%;
  height: 10px;
  background: #333;
  border-radius: 10px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin: 0 10px;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff8a00, #ff0058);
  transition: width 0.3s;
}

.elite-name {
  display: inline-block;
  width: 150px;
  color: #fff;
}

.elite-count {
  display: inline-block;
  color: #fff;
  width: 80px;
  text-align: right;
}

.unlocked-badge {
  color: gold;
  margin-left: 10px;
  font-weight: bold;
}

.elite-progress-item.locked {
  opacity: 0.7;
  filter: grayscale(70%);
}

.elite-progress-item.locked .elite-name {
  color: #888;
}

.elite-ability {
  font-size: 0.9em;
  color: #aaa;
  margin-top: 5px;
  font-style: italic;
}

.elite-progress-item.unlocked .elite-ability {
  color: #4CAF50;
}

/* Styles pour la vue d'ensemble des héros */
.all-heroes-overview {
  padding: 15px;
  background: rgba(30, 30, 40, 0.7);
  border-radius: 8px;
}

.all-heroes-overview h4 {
  color: #00ffff;
  margin: 15px 0 10px 0;
  border-bottom: 1px solid #444;
  padding-bottom: 5px;
}

.heroes-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.hero-preview {
  border: 1px solid #444;
  border-radius: 8px;
  padding: 10px;
  background: #222;
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
}

.hero-preview, .hero-card {
  color: #ddd;
}

.hero-preview:hover {
  transform: scale(1.02);
}

.hero-preview-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.hero-preview-rarity {
  font-size: 0.8em;
  padding: 2px 5px;
  border-radius: 3px;
  margin-bottom: 5px;
  display: inline-block;
}

.hero-stats {
  margin: 10px 0;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9em;
  margin-bottom: 3px;
}

.hero-preview-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mini-upgrade-btn, .mini-equip-btn {
  padding: 5px;
  font-size: 0.8em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.mini-upgrade-btn {
  background: #4CAF50;
  color: white;
}

.mini-equip-btn {
  background: #2196F3;
  color: white;
}

.mini-upgrade-btn.disabled, .mini-equip-btn.disabled {
  background: #666;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Styles pour les statistiques HP */
.hp-stat {
  margin: 5px 0;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
}

.hp-stat .stat-label {
  color: #ff99cc;
}

.hp-stat .stat-value {
  color: white;
  font-weight: bold;
}

.view-all-btn {
  display: block;
  margin: 10px auto;
  padding: 8px 15px;
  background-color: #4a4a4a;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.view-all-btn:hover {
  background-color: #5e5e5e;
}

/* Animations */
@keyframes pulse-gold {
  0% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
  50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
  100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
}

@keyframes glow {
  0% { border-color: gold; }
  100% { border-color: #FFD700; box-shadow: 0 0 25px rgba(255,215,0,0.7); }
}

@keyframes rainbow {
  0% { background-position: 0% 50% }
  50% { background-position: 100% 50% }
  100% { background-position: 0% 50% }
}

@keyframes rainbow-border {
  0% { border-image-source: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3); }
  100% { border-image-source: linear-gradient(45deg, #9400d3, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082); }
}

@keyframes particle-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(100%, 100%); }
}

@keyframes pulse-cyan {
  0% { text-shadow: 0 0 5px #00ffff; }
  50% { text-shadow: 0 0 10px #00ffff; }
  100% { text-shadow: 0 0 5px #00ffff; }
}

/* Styles pour le bouton de gain de carte */
#gain-card-btn {
  background: linear-gradient(135deg, rgba(40,0,60,0.9), rgba(20,0,30,0.9));
  border: 1px solid #cc00ff;
  border-radius: 6px;
  padding: 10px 5px;
  color: #ffffff;
  box-shadow: 0 0 10px #cc00ff99;
  margin-bottom: 20px;
  width: 100%;
  text-align: center;
  font-weight: bold;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: normal;
  line-height: 1.4;
  display: flex;
  justify-content: center;
  align-items: center;
}

#gain-card-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 15px #cc00ff99;
}

#gain-card-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#card-cost {
  color: #00ffff;
  text-shadow: 0 0 5px #00ffff;
  margin: 0 3px;
  white-space: nowrap;
}

.not-enough-essence {
  color: #ff5555 !important;
  text-shadow: 0 0 5px #ff5555 !important;
}

@media (max-width: 400px) {
  #gain-card-btn {
    font-size: 0.9em;
    padding: 8px 4px;
  }
}

/* Styles pour l'arbre de talents */
.talent-tree-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.talent-tree-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #444;
}

.talent-points {
  background: rgba(0, 150, 255, 0.2);
  padding: 5px 10px;
  border-radius: 15px;
  font-weight: bold;
  color: #00aaff;
}

.talent-tree-categories {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.talent-category {
  padding: 8px 15px;
  background: #333;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
}

.talent-category:hover {
  background: #444;
}

.talent-category.active {
  background: #005cbf;
  color: white;
}

.talent-tree-nodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  overflow-y: auto;
  flex: 1;
}

.talent-node {
  background: #2a2a2a;
  border-radius: 8px;
  padding: 15px;
  border: 1px solid #444;
  position: relative;
}

.talent-node.unlocked {
  border-color: #4CAF50;
  background: rgba(76, 175, 80, 0.1);
}

.talent-node.maxed {
  border-color: gold;
  background: rgba(255, 215, 0, 0.1);
}

.talent-node h4 {
  margin-top: 0;
  color: #00aaff;
}

.talent-node-cost {
  color: #FFD700;
  font-weight: bold;
  margin: 5px 0;
}

.talent-node-current {
  font-size: 0.9em;
  color: #aaa;
  margin-bottom: 10px;
}

.talent-node-effect {
  font-size: 0.9em;
  margin-bottom: 10px;
}

.talent-node-button {
  width: 100%;
  padding: 8px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.talent-node-button:hover:not(:disabled) {
  background: #45a049;
}

.talent-node-button:disabled {
  background: #666;
  cursor: not-allowed;
}

.talent-node-button.maxed {
  background: #FFD700;
  color: #333;
}

.talent-tree-summary {
  margin-top: 20px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

#talent-tree-bonuses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.talent-summary-bonus {
  font-size: 0.9em;
  padding: 5px;
  background: rgba(0, 100, 200, 0.2);
  border-radius: 4px;
}

.talent-node-stats {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
  font-size: 0.9em;
  color: #ddd;
}

.talent-node-stats span {
  background: rgba(0,0,0,0.3);
  padding: 2px 5px;
  border-radius: 3px;
}

.milestone-section {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
  border: 1px solid #444;
}

.milestone-progress {
  margin: 15px 0;
}

.progress-bar-container {
  height: 30px;
  background: #222;
  border-radius: 15px;
  position: relative;
  overflow: hidden;
  border: 1px solid #444;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  transition: width 0.5s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  text-shadow: 1px 1px 2px black;
}

.milestone-reached {
  background: rgba(76, 175, 80, 0.2);
  border: 1px solid #4CAF50;
  border-radius: 5px;
  padding: 10px;
  text-align: center;
  margin: 10px 0;
  color: #8BC34A;
  font-weight: bold;
}

.milestone-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.milestone-stat {
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
}

.milestone-stat .stat-label {
  color: #aaa;
}

.milestone-stat .stat-value {
  color: #4CAF50;
  font-weight: bold;
}

/* Style pour les quêtes */
.quests-container {
  padding: 15px;
  max-height: 80vh;
  overflow-y: auto;
}

.quest-card {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #444;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 15px;
  position: relative;
}

.quest-card.completed {
  border-color: #4CAF50;
}

.quest-card.claimed {
  opacity: 0.7;
}

.quest-card h3 {
  margin-top: 0;
  color: #FFD700;
}

.quest-progress {
  display: flex;
  align-items: center;
  margin: 10px 0;
}

.quest-progress progress {
  flex-grow: 1;
  height: 20px;
  margin-right: 10px;
}

.quest-reward {
  color: #4CAF50;
  font-weight: bold;
  margin: 10px 0;
}

.claim-btn {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.claim-btn:disabled {
  background-color: #666;
  cursor: not-allowed;
}

.claim-btn:hover:not(:disabled) {
  background-color: #45a049;
}

.bonus-quest .quest-card {
  border-color: #FFD700;
  background: rgba(0, 0, 0, 0.8);
}

.bonus-quest .quest-reward {
  color: #FFD700;
}

.bonus-quest .claim-btn {
  background-color: #FFD700;
  color: #000;
}

.bonus-quest .claim-btn:hover:not(:disabled) {
  background-color: #e6c200;
}

/* Ajoutez ceci à votre fichier CSS */

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: #1a1a2e;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #444;
  width: 80%;
  max-width: 500px;
  border-radius: 5px;
  position: relative;
}

.close-modal {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.reward-content {
  padding: 20px;
  text-align: center;
  border-radius: 5px;
  margin-bottom: 20px;
}

.reward-content.epic {
  background-color: #6a0dad;
  border: 2px solid #9b59b6;
}

.reward-content.legendary {
  background-color: #d4af37;
  border: 2px solid #f1c40f;
  color: #000;
}

.reward-icon {
  font-size: 50px;
  margin-bottom: 15px;
}

.modal-btn {
  background-color: #4CAF50;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  display: block;
  margin: 20px auto 0;
}

.modal-btn:hover {
  background-color: #45a049;
}

/* Styles pour les nouvelles raretés */
.rarity-legend { color: #ff9900; text-shadow: 0 0 5px #ff9900; }
.rarity-deity {
  color: #ffd700;                /* or lisible */
  text-shadow: 0 0 6px rgba(255,215,0,.6);
}

@supports (-webkit-background-clip: text) {
  .hero-preview-rarity.rarity-transcendent,
  .item-rarity.rarity-transcendent,
  .log-transcendent {
    background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
  }

  .hero-preview-rarity.rarity-deity,
  .item-rarity.rarity-deity {
    background: linear-gradient(45deg, #ff0000, #ff7700, #ffdd00, #00ff00, #0099ff, #7700ff);
    background-size: 600% 600%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 3s ease infinite;
    text-shadow: none;
  }
}

@keyframes rainbow {
  0% { background-position: 0% 50% }
  50% { background-position: 100% 50% }
  100% { background-position: 0% 50% }
}

/* Styles pour les cartes spéciales */
.hero-card.legend {
  border: 2px solid #ff9900;
  box-shadow: 0 0 10px #ff9900;
}

.hero-card.god {
  border: 2px solid #ffffff;
  box-shadow: 0 0 15px #ffffff, 0 0 10px #7700ff;
}

/* Amélioration des progress bars */
.elite-progress-item.unlocked {
  background: rgba(255, 153, 0, 0.1); /* Orange pour légendes */
}

#legend-progress .elite-progress-item.unlocked {
  border-left: 3px solid #ff9900;
}

#god-progress .elite-progress-item.unlocked {
  border-left: 3px solid #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.quest-tabs {
  display: flex;
  margin-bottom: 10px;
  border-bottom: 1px solid #444;
}

.quest-tab-btn {
  padding: 8px 15px;
  background: #333;
  border: none;
  color: #ddd;
  cursor: pointer;
  margin-right: 5px;
  border-radius: 5px 5px 0 0;
  transition: all 0.3s;
}

.quest-tab-btn:hover {
  background: #444;
}

.quest-tab-btn.active {
  background: #555;
  color: #fff;
  font-weight: bold;
}

.scrollable-container {
  max-height: 70vh; /* 70% de la hauteur de l'écran */
  overflow-y: auto;
  padding-right: 10px;
}

.progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 10px;
}

.progress-section {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 15px;
}

.progress-item {
  margin: 10px 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-info {
  display: flex;
  flex-direction: column;
}

.claim-progress-btn {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
}

.claim-progress-btn:hover {
  background: #45a049;
}

.no-reward {
  color: #999;
  font-style: italic;
}

/* Styles pour la progression et récompenses */
.progression-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 15px;
  background: rgba(30, 30, 40, 0.7);
  border-radius: 8px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.progression-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #444;
}

.progression-header h3 {
  color: #00ffff;
  margin: 0;
  text-shadow: 0 0 5px #00ffff;
}

.progression-tabs {
  display: flex;
  margin-bottom: 15px;
  border-bottom: 1px solid #444;
}

.progression-tab {
  padding: 8px 15px;
  background: #333;
  border: none;
  color: #ddd;
  cursor: pointer;
  margin-right: 5px;
  border-radius: 5px 5px 0 0;
  transition: all 0.3s;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
}

.progression-tab:hover {
  background: #444;
}

.progression-tab.active {
  background: #005cbf;
  color: #fff;
  font-weight: bold;
  border-bottom: 2px solid #00aaff;
}

.progression-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
}



.progress-quests-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.progress-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.progress-quest-card {
  background: #2a2a2a;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.progress-quest-card h3 {
  margin-top: 0;
  color: #f0f0f0;
  font-size: 1.1em;
}

.progress-info {
  margin: 10px 0;
  font-size: 0.9em;
  color: #ccc;
}

.progress-bar-container {
  width: 100%;
  height: 10px;
  background: #444;
  border-radius: 5px;
  margin: 10px 0;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  border-radius: 5px;
  transition: width 0.3s;
}

.claim-btn {
  width: 100%;
  padding: 8px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

.claim-btn:disabled {
  background: #666;
  cursor: not-allowed;
}

.claim-btn:not(:disabled):hover {
  background: #45a049;
}

.hero-tabs {
  display: flex;
  margin-bottom: 10px;
  border-bottom: 1px solid #444;
}

.hero-tab-btn {
  padding: 8px 15px;
  margin-right: 5px;
  background: #333;
  border: none;
  border-radius: 5px 5px 0 0;
  color: #ccc;
  cursor: pointer;
  transition: all 0.2s;
}

.hero-tab-btn.active {
  background: #555;
  color: white;
  font-weight: bold;
}

/* Conteneurs des listes de héros */
.hero-list-container {
  display: none;
}

.hero-list-container.active {
  display: block;
}

.card {
    height: auto !important; /* ou une valeur fixe comme 150px */
    min-height: unset !important;
    padding: 10px !important;
}

/* Optionnel : ajuster le contenu à l'intérieur des cartes */
.card-content {
    padding: 5px !important;
}

.reward-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.reward-icon {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.9em;
}

/* Pour le bonus mensuel avec beaucoup de récompenses */
.monthly-rewards .reward-icon {
  font-size: 0.8em;
  padding: 2px 4px;
}

.bonus-quest .rewards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.bonus-quest .reward-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

.weekly-bonus .rewards-container {
  flex-direction: column;
}

.monthly-bonus .rewards-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.monthly-bonus .reward-item {
  font-size: 0.9em;
}

#shop-items .item-actions button,
#shop-items .cards-button {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-shadow: none !important;
  mix-blend-mode: normal !important;
}

/* Si un span “prix” est utilisé, mets-le en or lisible */
#shop-items .item-actions button .price,
#shop-items .item-actions button .price-gold {
  color: #ffe082 !important;
  -webkit-text-fill-color: #ffe082 !important;
}

/* Cas particuliers si une carte a la classe de rareté sur le conteneur */
#shop-items .rarity-deity .item-actions button {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}

/* === MODAL SHOP === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-box {
  background: #222;
  color: #fff;
  padding: 20px;
  border-radius: 12px;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,255,255,0.6);
  font-family: "Orbitron", sans-serif;
}
.modal-box h2 {
  margin-top: 0;
  color: #0ff;
}
.modal-box button {
  margin-top: 15px;
  padding: 8px 14px;
  background: #0ff;
  color: #000;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}
.modal-box button:hover {
  background: #0cc;
}

/* === Infection: contrôles de vague (centrés, style "Renaissance") === */
.wave-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 14px 0 20px;
}

.btn-neo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: .3px;
  text-shadow: 0 0 0 transparent; /* texte net, pas de blend bizarre */
}

.btn-renaissance {
  background: linear-gradient(90deg, #ff3cac, #784ba0, #2b86c5);
  color: #000;                    /* lisible comme le bouton de droite */
  border: 1px solid #ff8adf;
  box-shadow: 0 0 14px rgba(255, 61, 172, .55);
}

.btn-renaissance:hover {
  filter: brightness(1.06);
  box-shadow: 0 0 18px rgba(255, 61, 172, .75);
}

.btn-renaissance.secondary {
  opacity: .95;
  background: linear-gradient(90deg, #c4c4c4, #bdbdbd, #aaaaaa); /* variante douce */
  border-color: #e0e0e0;
  box-shadow: 0 0 12px rgba(255,255,255,.25);
}

.btn-neo .icon {
  font-size: 1.05em;
  line-height: 1;
}

/* === Infection: footer des boutons (tout en bas, centré) === */
.wave-controls-footer{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:14px;
  padding:16px 0 8px;
  /* option "collé en bas" de la zone centrale quand on scrolle à l'intérieur */
  position: sticky;      /* retire si tu n'en veux pas */
  bottom: 0;             /* retire si tu n'en veux pas */
  background: transparent;
}

/* léger affinage si on copie les classes Renaissance */
.wavebtn{
  font-weight:800;
  white-space:nowrap;
  border-radius:12px;
}
.wavebtn.secondary{ opacity:.95; }

/* ===== Infection header scales ===== */

/* Chaque pastille : x2 par défaut */
.inf-dots-xl .inf-dot{
  display:inline-block;
  transform: scale(2);
  transform-origin: center;
  line-height: 1;
}

/* Dernière pastille : x3 */
.inf-dots-xl .inf-dot:last-child{
  transform: scale(3);
}

/* Optionnel : micro-espacement si tu n'utilises pas space-between */
.inf-dots-xl .inf-dot{ margin: 0 2px; }

/* Badge "Run 1–10" : taille x2 via scale (plus simple pour la typo/puce interne) */
.inf-run-badge-xl2{
  display: inline-block;
  transform: scale(2);
  transform-origin: left center;
  line-height: 1;
}

/* === Override taille badge "Run 1–10" === */
.inf-header .inf-badge.inf-run-size2,
.inf-badge.inf-run-size2 {
  font-size: 1.2rem !important;   /* x1.5 garanti */
  line-height: 1.1 !important;
  padding: .30em .70em !important;
  border-radius: .9em !important;
  transform: none !important;     /* au cas où une autre règle l'aurait scalé */
}

/* Conteneur des pastilles : étalé sur la largeur disponible du header */
.inf-dots-wide{
  display: flex !important;
  align-items: center;
  justify-content: space-between;    /* étale les ronds */
  width: 100%;
  gap: 0;                            /* l’étalement se fait par space-between */
  /* On laisse le JS ajouter padding-left = largeur du badge + 16px pour éviter le chevauchement */
}

/* ===== Infection header — agrandissement propre, sans modifier le layout ===== */

/* Badge "Run 1–10" : x2 via font-size + padding (aucun overlap) */
.inf-run-size2{
  font-size: 10em;             /* x2 */
  line-height: 1.05;
  padding: .35em .8em;        /* adapte si besoin */
  border-radius: 1em;         /* pour garder un arrondi net après grossissement */
}

/* Pastilles : x2 pour toutes, x3 pour la dernière — on touche aux vraies dimensions */
.inf-dots-size2 > *{
  /* valeurs de base supposées ~8px ; on double proprement */
  width: 16px !important;     /* x2 */
  height: 16px !important;    /* x2 */
  border-width: 3px !important;
  border-radius: 50% !important;
  display: inline-block;      /* garantit la prise en compte des dimensions */
  box-sizing: content-box;    /* évite l’écrasement par le border */
  vertical-align: middle;
  /* on NE change PAS margin/gap/justify => disposition d’origine conservée */
}

/* Dernier point : x3 */
.inf-dots-size2 > *:last-child{
  width: 24px !important;     /* x3 */
  height: 24px !important;    /* x3 */
  border-width: 4px !important;
}

.inf-dots-size2{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 0;
}

.inf-header #inf-run-badge,
#inf-run-badge,
#inf-run-badge * {
  font-size: 3rem !important;   /* x1.5 visuel garanti, indépendant des em du parent */
  line-height: 1.05;
}

#inf-run-badge {
  padding: .30em .7em !important;
  border-radius: .9em !important;
  transform: none !important;     /* au cas où une autre règle le remettrait */
}

.wavebtn{
  transition: transform .03s ease, filter .12s ease, box-shadow .12s ease;
}
.wavebtn:hover{ filter: brightness(1.06); }
.wavebtn:active{ transform: translateY(1px); }

.wavebtn:disabled,
.wavebtn[aria-disabled="true"]{
  opacity: .55 !important;
  cursor: not-allowed !important;
  filter: grayscale(.2);
  box-shadow: none !important;
}

.wave-controls-footer{
  margin-top: 8px;   /* petit souffle */
  padding-bottom: 6px;
}

.rarity { white-space: nowrap; }
.rarity .t-badge { padding: 0 6px; margin-left: 6px; border: 1px dashed currentColor; border-radius: 6px; font-weight: 600; font-size: .85em; opacity: .9; }
.hero-stack .rarity {
  font-size: 0.85em;
  opacity: 0.9;
}

.hero-stack .hero-special {
  display: block;
  margin-top: 2px;
  font-size: 0.8em;
  color: #ffd700;
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.6);
}

/* === Village (MVP SQLite) === */
.village-wrap { padding: 8px; }
.village-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.village-col { background: rgba(30,30,40,.6); border: 1px solid #444; border-radius: 8px; padding: 12px; }
.v-row, .m-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px; background:rgba(0,0,0,.2); border-radius:6px; margin-bottom:8px; }
.v-title { font-weight:700; color:#0ff; }
.v-sub { font-size:.9em; color:#cfe; opacity:.85; }
.v-btn { background:#0ff; color:#000; border:none; border-radius:8px; padding:8px 12px; font-weight:800; cursor:pointer; }
.v-btn:hover { filter:brightness(1.05); }
.v-stock .s-row { padding:6px 8px; background:rgba(0,0,0,.2); border-radius:6px; margin-bottom:6px; }
.v-market .m-act { display:flex; align-items:center; gap:8px; }
.v-market .m-qty, .m-sel { padding:6px 8px; background:#111; color:#fff; border:1px solid #333; border-radius:6px; }
.v-gold { margin-top:10px; font-weight:700; color:#ffe082; }
@media (max-width:1100px){ .village-cols{ grid-template-columns:1fr; } }
#village-root .vtab.active { background:#1a2534; border-color:#3a4a69; }

/* === VILLAGE v2: top tabs + cards + workers + craft lib === */
.top-tabs {
  position: sticky; top: 0; z-index: 9;
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; padding: 8px 10px; background:#161a22; border-bottom: 1px solid #2b3a55;
}
.top-tabs .top-tab {
  background:#222; color:#cfe1ff; border:1px solid #334; border-radius:8px;
  padding:8px 12px; font-weight:700; cursor:pointer;
}
.top-tabs .top-tab.active {
  background:#0c2a44; border-color:#2e6aa2; box-shadow: inset 0 -2px 0 #00aaff;
}
.top-panel { display:none; }
.top-panel.active { display:block; }

.v-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap:12px; }
.v-card {
  background:#1b1f2a; border:1px solid #2b3a55; border-radius:10px; padding:12px; box-shadow: 0 0 10px #0007;
  display:flex; flex-direction:column; gap:8px;
}
.v-card h4 { margin:0; color:#9fd3ff; font-weight:800; }
.v-meta { font-size:12px; color:#cfe; opacity:.9; display:flex; flex-wrap:wrap; gap:8px; }
.v-row-ctl { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.worker-ctl { display:flex; align-items:center; gap:6px; }
.worker-ctl .btn { background:#0ff; color:#000; border:none; border-radius:8px; padding:5px 8px; font-weight:800; cursor:pointer; }
.worker-ctl .count { min-width:36px; text-align:center; font-weight:800; }
.v-badge { font-size:11px; padding:3px 6px; border:1px dashed #567; border-radius:6px; color:#cfe; }
.v-kv { display:flex; gap:6px; flex-wrap:wrap; }
.v-kv .k { opacity:.8; }
.v-kv .v { font-weight:700; }
.badge-warn { color:#ffb7b7; border-color:#9b4; }
.badge-ok { color:#aef39c; border-color:#3a5; }

.tooltip {
  position:relative; cursor:help;
}
.tooltip:hover::after {
  content: attr(data-tip);
  position:absolute; left:50%; transform:translateX(-50%);
  bottom: 110%; white-space:nowrap; background:#10131a; color:#cfe; border:1px solid #2b3a55; border-radius:6px; padding:6px 8px; font-size:12px; box-shadow: 0 0 10px #0008;
}

.craft-toolbar { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin: 6px 0 10px; }
.craft-filter { background:#111; color:#fff; border:1px solid #2b3a55; border-radius:8px; padding:6px 10px; }
.craft-queue { display:flex; flex-direction:column; gap:6px; }
.craft-job { background:#222a; border:1px dashed #335; border-radius:8px; padding:8px; font-size:12px; }
.craft-progress { height:10px; background:#333; border-radius:8px; overflow:hidden; }
.craft-progress > div { height:100%; width:0%; background:linear-gradient(90deg, #4CAF50, #8BC34A); transition: width .2s ease; }
.craft-pager { display:flex; gap:6px; flex-wrap:wrap; }
.craft-pager .btn { background:#2a3344; color:#cfe; border:1px solid #3a4a69; border-radius:6px; padding:6px 10px; font-size:12px; }
.craft-pager .btn.active { background:#0c2a44; color:#fff; }

.v-cap { font-weight:700; color:#ffe082; }

/* === [SHOP:ACHATS:CSS] === */
.shop-header{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin-bottom:14px; padding:10px 12px;
  background: linear-gradient(135deg, rgba(40,0,60,.6), rgba(20,0,30,.6));
  border:1px solid #cc00ff66; border-radius:10px; box-shadow: 0 0 8px #cc00ff44;
}
.shop-title h3{ color:#ff66cc; text-shadow:0 0 5px #ff66cc; }
.shop-title small{ color:#cbd; opacity:.9; }
.rp-pill{
  display:inline-block; min-width:72px; text-align:center; font-weight:800;
  background:#111; color:#00ffff; border:1px solid #00ffff88; padding:6px 10px; border-radius:999px;
  text-shadow:0 0 6px #00ffffaa;
}
.shop-grid{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap:14px;
}
.shop-card{
  background:#26252b; border:1px solid #3a2b3e; border-radius:12px; padding:12px;
  display:flex; flex-direction:column; gap:10px; box-shadow: 0 4px 18px rgba(0,0,0,.25);
}
.shop-card.disabled{ opacity:.6; filter:grayscale(.2); }
.shop-card-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.shop-card-title{ font-weight:800; color:#f0e7ff; }
.shop-card-desc{ color:#cfd2ff; opacity:.9; font-size:.95em; }
.shop-cost{ font-weight:900; color:#ffd700; white-space:nowrap; }
.shop-cost .ico{ margin-right:6px; text-shadow:0 0 6px #ffd700aa; }
.shop-buy{
  border:none; border-radius:10px; padding:10px 12px; cursor:pointer; font-weight:900;
  background: linear-gradient(90deg, #4a90e2, #005cbf); color:#fff; box-shadow: 0 4px 12px #003974aa;
}
.shop-buy:hover:not(:disabled){ filter:brightness(1.05); transform: translateY(-1px); }
.shop-buy:disabled{ opacity:.5; cursor:not-allowed; }
.shop-card.not-enough{ outline:2px solid #ff3d3d; box-shadow:0 0 10px #ff3d3daa; }

#log .log-hero     { color:#ffd966; }
#log .log-equip    { color:#9ad0ec; }
#log .log-artifact { color:#ff9ad0; }
#log .log-village  { color:#b5ff9a; }
#log .log-gain     { color:#d7ff8a; }
#log .log-shop     { color:#ffffff; }
#log .log-warn     { color:#ff6961; }

/* [PATCH:AUTH:SETUP-CARD] — carte d'identité utilisateur */
.auth-card{
  max-width: 520px;
  margin: 0 auto 16px;
  padding: 16px 18px;
  background: #1b1b1f;
  border: 1px solid #333;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0,0,0,.4);
  text-align: center;
}
.auth-user{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}
.auth-avatar{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg,#005cbf,#00aaff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 8px #00aaff55;
}
.auth-email{
  padding: 6px 12px;
  border-radius: 999px;
  background: #0e2233;
  color: #cfefff;
  border: 1px solid #00aaff55;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: .3px;
  max-width: 100%;
}
.auth-logout{
  max-width: 320px;
  margin: 8px auto 0;
}

/* Responsif : email sur mobile ellipsé proprement */
@media (max-width: 600px){
  .auth-email{
    font-size: .9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90vw;
  }
}

/* [PATCH:STYLE:ELITE-LIST] — cartes élites plus lisibles (sans colonne bonus à droite) */
.elite-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 8px 4px; 
  margin-bottom: 4px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
}

.elite-row-main {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1px;  
}

.elite-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 600;
}

.elite-icon {
  font-size: 13px;
}

.elite-count {
  min-width: 40px;
  text-align: left;
  opacity: 0.9;
}

.elite-name {
  flex: 1 1 auto;
}

.elite-level {
  font-size: 12px;
  opacity: 0.8;
}

.elite-stats {
  display: flex;
  flex-wrap: wrap;               /* passe à la ligne si besoin */
  gap: 6px 12px;
  font-size: 12px;
  opacity: 0.9;
}

/* le bonus n’est plus une colonne à droite, juste une ligne en dessous */
.elite-bonus {
  margin-top: 2px;
  font-size: 12px;
  color: #ffd966;
  text-align: left;
  padding-left: 0;
}

/* [PATCH:STYLE:ELITE-LIST-FIX] — meilleure lisibilité des héros élites */
.elite-list {
  display: flex;
  flex-direction: column;
  gap: 6px;                /* espace entre cartes */
  padding: 6px 0;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

.elite-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  border: 1px solid gold;
  border-radius: 6px;
  padding: 8px 10px;
  background: linear-gradient(135deg, rgba(40,40,60,0.9), rgba(20,20,30,0.9));
  box-shadow: 0 0 6px rgba(255,215,0,0.25);
  min-height: 36px;
}

.elite-hero + .elite-hero {
  margin-top: 4px;
}

.elite-hero .name {
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 4px rgba(255,215,0,0.5);
}

.elite-hero .rarity {
  font-size: 0.85em;
  color: #ccc;
  opacity: 0.8;
}

.zone-selector {
  margin-bottom: 10px;
}

.zone-current-btn {
  width: 100%;
  background: linear-gradient(90deg, #6a00ff, #00c6ff);
  border: none;
  border-radius: 20px;
  padding: 8px 12px;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  font-family: 'Orbitron', sans-serif;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.zone-current-diff {
  font-size: 0.9em;
  opacity: 0.9;
}

.zone-list {
  margin-top: 8px;
  max-height: 260px;
  overflow-y: auto;
  background: rgba(0,0,0,0.6);
  border-radius: 8px;
  border: 1px solid #444;
  padding: 6px;
}

.zone-btn {
  width: 100%;
  text-align: left;
  background: #222;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 18px;
}

.zone-btn:hover {
  background: #333;
}

.zone-btn-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.zone-btn-name {
  font-weight: bold;
  color: #0ff;
}

.zone-btn-diff {
  font-size: 0.85em;
  color: #ffd700;
}

.zone-btn-desc {
  margin: 0;
  font-size: 0.8em;
  color: #ccc;
}

.zone-badge-loot {
  display: inline-block;
  font-size: 0.75em;
  margin-right: 4px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0,0,0,0.4);
  color: #aef39c;
}

/* [PATCH:CSS:BOSS-AURAS] */
.boss-special   { box-shadow: 0 0 10px rgba(100, 180, 255, 0.6) inset, 0 0 8px rgba(100,180,255,0.5); }
.boss-exception { box-shadow: 0 0 12px rgba(255, 200, 80, 0.7) inset, 0 0 10px rgba(255,200,80,0.6); }
.boss-mythic    { box-shadow: 0 0 14px rgba(200, 80, 255, 0.7) inset, 0 0 12px rgba(200,80,255,0.6); }
.boss-cosmic    { box-shadow: 0 0 16px rgba(80, 255, 210, 0.7) inset, 0 0 14px rgba(80,255,210,0.6); }