/* ============================================================
   VALHALLA OTAKU — Styles page d'accueil
   ============================================================ */

/* BARRE DE FILTRES */
.filters-bar {
  background: var(--stone);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 44px;
  z-index: 90;
}

.filters-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* RECHERCHE */
.search-input {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-style: italic;
  background: var(--bg-subtle, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--border-light, rgba(255, 255, 255, 0.1));
  color: var(--parchment);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  width: 260px;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}

.search-input::placeholder { color: var(--fade); opacity: 0.8; }
html[data-theme="light"] .search-input::placeholder { color: var(--dust); opacity: 0.7; }
.search-input:focus { border-color: var(--gold-dim); }

/* CHIPS DE FILTRE */
.filter-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.chip {
  font-family: var(--font-title);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  padding: 0.3rem 0.85rem;
  background: none;
  border: 1px solid var(--fade);
  color: var(--dust);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.chip:hover { border-color: var(--dust); color: var(--parchment); }

.chip.active          { border-color: var(--gold-dim); color: var(--gold); }
.chip[data-type="sacrifice"].active  { border-color: var(--ember); color: var(--ember); }
.chip[data-type="souffrance"].active { border-color: var(--rose);  color: var(--rose);  }
.chip[data-type="legende"].active    { border-color: var(--gold);  color: var(--gold);  }

/* SELECT TRI */
.sort-select {
  font-family: var(--font-title);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  background: var(--bg-subtle, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--border-light, rgba(255, 255, 255, 0.1));
  color: var(--dust);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  margin-left: auto;
  transition: background var(--transition);
}

/* GRILLE DES HÉROS */
.memorial-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border-light, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-light, rgba(255, 255, 255, 0.05));
}

/* CARTE HÉROS */
.hero-card {
  background: var(--ash);
  padding: 1.5rem;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  border: 1px solid rgba(0,0,0,0.05);
  border-top: 2px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

html[data-theme="light"] .hero-card {
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.hero-card:hover { 
  background: var(--hover-bg);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.hero-card.sacrifice  { border-top-color: var(--ember); }
.hero-card.souffrance { border-top-color: var(--rose);  }
.hero-card.legende    { border-top-color: var(--gold);  }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.card-anime {
  font-family: var(--font-title);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--dust);
  text-transform: uppercase;
}

.card-flames {
  font-family: var(--font-title);
  font-size: 0.65rem;
  color: var(--dust);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-name {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--parchment);
  line-height: 1.3;
}

.card-epitaph {
  font-style: italic;
  font-size: 0.9rem;
  color: var(--fade);
  line-height: 1.6;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
}

.card-scores {
  display: flex;
  gap: 0.75rem;
  font-family: var(--font-title);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--dust);
}

.card-score-item span {
  font-weight: 600;
  margin-left: 3px;
}

.card-score-item.s-sacrifice span { color: var(--ember); }
.card-score-item.s-suffering span { color: var(--rose);  }

.card-tags {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.card-tag {
  font-family: var(--font-title);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--fade);
  background: rgba(255, 255, 255, 0.04);
  padding: 1px 7px;
  border-radius: var(--radius-sm);
}

/* RESPONSIVE */
@media (max-width: 700px) {
  .filters-bar {
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  }
  .filters-inner { gap: 0.75rem; }
  .search-input  { width: 100%; }
  .sort-select   { margin-left: 0; }
  .hero-grid     { grid-template-columns: 1fr; }
}
/* ===== AVATAR ROND À CÔTÉ DU NOM ===== */
.card-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.card-avatar-wrapper {
  width: 45px;
  height: 45px;
  flex-shrink: 0;
}

.card-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-dim);
  background: var(--ash);
}

.card-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--ash);
  border: 2px solid var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--dust);
}

.card-name {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--parchment);
  margin: 0;
  flex: 1;
}

/* Responsive */
@media (max-width: 500px) {
  .card-avatar-wrapper {
    width: 35px;
    height: 35px;
  }
  .card-avatar-placeholder {
    font-size: 0.9rem;
  }
  .card-name {
    font-size: 0.95rem;
  }
  .card-title-row {
    gap: 0.5rem;
  }
}
/* Amélioration responsive */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .filters-inner {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-input {
    width: 100%;
    max-width: none;
  }
  
  .sort-select {
    margin-left: 0;
    width: 100%;
  }
  
  .filter-chips {
    justify-content: center;
  }
  
  .card-title-row {
    gap: 0.5rem;
  }
  
  .card-avatar-wrapper {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .site-nav {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  
  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.6rem;
  }
  
  .card-name {
    font-size: 0.9rem;
  }
  
  .card-epitaph {
    font-size: 0.8rem;
  }
}
/* ============================================================
   AMÉLIORATION DE LA LISIBILITÉ DES CARTES
   ============================================================ */

/* Carte héros - meilleure lisibilité */
.hero-card {
  padding: 1.5rem;
  background: var(--ash);
}

.card-anime {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  background: rgba(0, 0, 0, 0.1);
  padding: 3px 8px;
  border-radius: 20px;
}

.card-name {
  font-size: 1.2rem;
  margin-top: 0.25rem;
}

.card-epitaph {
  font-size: 0.9rem;
  color: #d4c9bc;
  line-height: 1.6;
}

.card-flames {
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.1);
  padding: 3px 8px;
  border-radius: 20px;
}

.card-scores {
  font-size: 0.65rem;
}

.card-score-item span {
  font-size: 0.8rem;
}

.card-tag {
  font-size: 0.6rem;
  padding: 3px 8px;
}

/* Résultats label */
.section-label, #results-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
}