/* ===== PROFIL D'AVENTURIER ===== */

/* ===== HERO HEADER ===== */
.profil-hero {
  position: relative;
  text-align: center;
  padding: 7rem 2rem 2.5rem;
  background: #120000;
  overflow: hidden;
}

.profil-hero-bg {
  position: absolute;
  inset: 0;
  background: url('../img/mapmonde.png') center/cover no-repeat;
  opacity: 0.18;
  z-index: 0;
}

.profil-hero h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: #a78a7f;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.profil-hero h1::after {
  content: '';
  display: block;
  width: 80px;
  height: 2px;
  background: #735751;
  margin: 0.8rem auto 0;
}

.profil-hero-subtitle {
  font-family: var(--font-accent);
  font-size: 1.1rem;
  color: #735751;
  letter-spacing: 0.1em;
  position: relative;
  z-index: 1;
  margin-bottom: 1.5rem;
}

.profil-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.profil-hero-btn {
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(167, 138, 127, 0.3);
  border-radius: 6px;
  color: #a78a7f;
  text-decoration: none;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.3s;
  white-space: nowrap;
}
.profil-hero-btn:hover {
  background: rgba(167, 138, 127, 0.15);
  border-color: #a78a7f;
  color: #e7d7c1;
}

.profil-nav-search {
  position: relative;
  width: 260px;
}

.profil-nav-search input {
  width: 100%;
  padding: 0.45rem 0.8rem;
  background: rgba(42, 28, 20, 0.6);
  border: 1px solid rgba(167, 138, 127, 0.25);
  border-radius: 6px;
  color: #e7d7c1;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.profil-nav-search input::placeholder {
  color: rgba(167, 138, 127, 0.5);
}

.profil-nav-search input:focus {
  border-color: rgba(167, 138, 127, 0.5);
}

.profil-search-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(30, 18, 12, 0.95);
  border: 1px solid rgba(167, 138, 127, 0.25);
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
}

.profil-search-dropdown.open {
  display: block;
}

.profil-search-item {
  display: block;
  padding: 0.5rem 0.8rem;
  color: #e7d7c1;
  text-decoration: none;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}

.profil-search-item:hover {
  background: rgba(167, 138, 127, 0.15);
}

.profil-search-empty {
  padding: 0.5rem 0.8rem;
  color: #a78a7f;
  font-size: 0.8rem;
  font-style: italic;
}

.profil-page {
  min-height: 100vh;
  padding: 1.5rem 2rem 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

.profil-loading {
  text-align: center;
  padding: 6rem 2rem;
  color: #a78a7f;
  font-style: italic;
  font-size: 1.1rem;
}

/* ===== LAYOUT 2 COLONNES ===== */
.profil-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.profil-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 5rem;
}

.profil-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ===== HEADER (sidebar card) ===== */
.profil-header {
  text-align: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(160deg, #3f0418 0%, #370617 100%);
  border: 2px solid #735751;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

/* Rarity top glow */
.profil-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  opacity: 0.7;
}

.profil-header[data-rarity="bronze"]::before { background: linear-gradient(90deg, transparent, #8b6914, transparent); }
.profil-header[data-rarity="gold"]::before { background: linear-gradient(90deg, transparent, #c9a84c, transparent); }
.profil-header[data-rarity="red"]::before { background: linear-gradient(90deg, transparent, #a4161a, transparent); }
.profil-header[data-rarity="violet"]::before { background: linear-gradient(90deg, transparent, #7b2d8b, transparent); }
.profil-header[data-rarity="silver"]::before { background: linear-gradient(90deg, transparent, #a8a8a8, transparent); }

.profil-header[data-rarity="gold"] { border-color: #c9a84c; }
.profil-header[data-rarity="red"] { border-color: #a4161a; }
.profil-header[data-rarity="violet"] { border-color: #7b2d8b; }
.profil-header[data-rarity="silver"] { border-color: #a8a8a8; }

.profil-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid #735751;
  object-fit: cover;
  margin-bottom: 1rem;
}

.profil-header[data-rarity="gold"] .profil-avatar { border-color: #c9a84c; }
.profil-header[data-rarity="red"] .profil-avatar { border-color: #a4161a; }
.profil-header[data-rarity="violet"] .profil-avatar { border-color: #7b2d8b; }
.profil-header[data-rarity="silver"] .profil-avatar { border-color: #a8a8a8; }

.profil-name {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: #e7d7c1;
  margin-bottom: 0.3rem;
}

.profil-role-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.profil-role-icon {
  width: 130px;
  height: 130px;
  object-fit: contain;
}

.profil-role-name {
  font-family: var(--font-title);
  font-size: 0.9rem;
  color: #a78a7f;
  font-style: italic;
  font-weight: bold;
}

/* ── Stats de rôle (mini tableau horizontal) ── */
.profil-role-stats {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin: 0.6rem 0 0.4rem;
  padding: 0.4rem 0.6rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  border: 1px solid rgba(107, 66, 38, 0.15);
}

.role-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-width: 36px;
}

.role-stat-icon {
  font-size: 0.75rem;
}

.role-stat-label {
  font-family: var(--font-title);
  font-size: 0.55rem;
  color: #a78a7f;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.role-stat-val {
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 700;
  color: #c9a84c;
}

.profil-motto {
  font-family: var(--font-accent);
  font-size: 0.9rem;
  color: #a78a7f;
  font-style: italic;
  margin-bottom: 0.8rem;
}

.profil-badges {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.7rem;
  font-family: var(--font-title);
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 1px solid;
}

.badge-sub { color: #c9a84c; border-color: #c9a84c; }
.badge-mod { color: #a4161a; border-color: #a4161a; }
.badge-vip { color: #7b2d8b; border-color: #7b2d8b; }

/* ===== SECTIONS ===== */
.profil-section {
  background: linear-gradient(160deg, #3f0418 0%, #370617 100%);
  border: 1px solid rgba(115, 87, 81, 0.3);
  border-radius: 10px;
  padding: 1.8rem 2rem;
}

/* Sections dans la sidebar : padding réduit */
.profil-sidebar .profil-section {
  padding: 1.2rem 1.2rem;
}

.profil-section-title {
  font-family: var(--font-title);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a78a7f;
  margin-bottom: 1rem;
  font-weight: 900;
  text-align: center;
}

.profil-section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #735751, transparent);
  margin: 0.5rem auto 0;
}

/* ===== STATS GRID ===== */
.profil-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.profil-stat {
  text-align: center;
  padding: 0.8rem;
  background: rgba(115, 87, 81, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(115, 87, 81, 0.15);
  display: flex;
  flex-direction: column;
}

.profil-stat-label {
  font-size: 0.75rem;
  color: #a78a7f;
  font-weight: 700;
  order: 1;
  margin-bottom: 0.3rem;
}

.profil-stat-value {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: #e7d7c1;
  order: 2;
}

.profil-stat-sub {
  font-size: 0.85rem;
  color: #735751;
  font-style: italic;
  order: 3;
  margin-top: 0.2rem;
}

/* ===== STARTER PACK — AFFICHAGE HORIZONTAL ===== */
.starter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.starter-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  background: rgba(115, 87, 81, 0.1);
  border: 1px solid rgba(115, 87, 81, 0.2);
  border-radius: 5px;
}

.starter-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.starter-name {
  font-size: 0.78rem;
  color: #e7d7c1;
  font-weight: 600;
}

/* ===== BUTIN — TABLEAU RPG AVEC DÉROULEUR ===== */
.loot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.loot-table thead th {
  font-family: var(--font-title);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #735751;
  font-weight: 700;
  padding: 0.4rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(115, 87, 81, 0.25);
}

.loot-table thead th:first-child {
  width: 42px;
  text-align: center;
}

/* Ligne principale — cliquable */
.loot-row {
  transition: background 0.2s;
  cursor: pointer;
}

.loot-row:hover {
  background: rgba(115, 87, 81, 0.1);
}

.loot-row + .loot-detail-row + .loot-row {
  border-top: 1px solid rgba(115, 87, 81, 0.1);
}

.loot-cell-icon {
  width: 42px;
  padding: 0.4rem;
  text-align: center;
  vertical-align: middle;
}

.loot-icon-frame {
  width: 44px;
  height: 44px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(115, 87, 81, 0.3);
  background: rgba(115, 87, 81, 0.1);
  position: relative;
}

/* Rarity overlay */
.loot-icon-frame::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0.12;
}

.loot-icon-frame[data-rarity="uncommon"] { border-color: #4a8c5c; }
.loot-icon-frame[data-rarity="uncommon"]::after { background: #4a8c5c; }
.loot-icon-frame[data-rarity="rare"] { border-color: #4a7cb5; }
.loot-icon-frame[data-rarity="rare"]::after { background: #4a7cb5; }
.loot-icon-frame[data-rarity="epic"] { border-color: #9b59b6; box-shadow: 0 0 6px rgba(155, 89, 182, 0.2); }
.loot-icon-frame[data-rarity="epic"]::after { background: #9b59b6; opacity: 0.15; }
.loot-icon-frame[data-rarity="legendary"] { border-color: #c9a84c; box-shadow: 0 0 6px rgba(201, 168, 76, 0.2); }
.loot-icon-frame[data-rarity="legendary"]::after { background: #c9a84c; opacity: 0.15; }
.loot-icon-frame[data-rarity="lore"] { border-color: #2d2929; }
.loot-icon-frame[data-rarity="lore"]::after { background: #2d2929; }
.loot-icon-frame[data-rarity="cursed"] { border-color: #a4161a; }
.loot-icon-frame[data-rarity="cursed"]::after { background: #a4161a; }
.loot-icon-frame[data-rarity="altered"] { border-color: #1e3a5f; box-shadow: 0 0 6px rgba(30, 58, 95, 0.3); }
.loot-icon-frame[data-rarity="altered"]::after { background: #1e3a5f; opacity: 0.15; }

.loot-icon-frame .loot-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.loot-cell-name {
  padding: 0.4rem 0.5rem;
  color: #e7d7c1;
  font-weight: 600;
  vertical-align: middle;
}

.loot-qty {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: #c9a84c;
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 8px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.loot-expand-hint {
  display: inline-block;
  font-size: 0.65rem;
  color: #735751;
  margin-left: 0.3rem;
  transition: transform 0.2s;
}

.loot-row.expanded .loot-expand-hint {
  transform: rotate(90deg);
  color: #a78a7f;
}

.loot-cell-rarity {
  padding: 0.4rem 0.5rem;
  vertical-align: middle;
  white-space: nowrap;
}

.loot-rarity-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: default;
}

.loot-rarity-tag[data-rarity="common"] { color: #a78a7f; }
.loot-rarity-tag[data-rarity="uncommon"] { color: #4a8c5c; }
.loot-rarity-tag[data-rarity="rare"] { color: #4a7cb5; }
.loot-rarity-tag[data-rarity="epic"] { color: #9b59b6; }
.loot-rarity-tag[data-rarity="legendary"] { color: #c9a84c; }
.loot-rarity-tag[data-rarity="lore"] { color: #ababab; }
.loot-rarity-tag[data-rarity="cursed"] { color: #a4161a; }
.loot-rarity-tag[data-rarity="altered"] { color: #1e3a5f; }

/* ===== LIGNE DÉTAIL (dérouleur) ===== */
.loot-detail-row {
  display: none;
}

.loot-row.expanded + .loot-detail-row {
  display: table-row;
}

.loot-detail-content {
  padding: 0.6rem 0.8rem 0.8rem 3.2rem;
  border-left: 2px solid rgba(115, 87, 81, 0.2);
  margin-left: 1rem;
}

.loot-detail-desc {
  font-size: 0.9rem;
  color: #e7d7c1;
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 0.3rem;
}

.loot-detail-empty {
  color: #5a4440;
}

.loot-detail-drop {
  font-size: 0.8rem;
  color: #a78a7f;
  font-style: italic;
  margin: 0;
}

/* ===== SCRIBE DES ARCHIVES ===== */
.profil-scribe {
  text-align: center;
}

.profil-scribe-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid #735751;
  object-fit: cover;
  margin-bottom: 0.6rem;
}

.profil-scribe-name {
  font-family: var(--font-title);
  font-size: 1rem;
  color: #e7d7c1;
  margin-bottom: 0.2rem;
}

.profil-scribe-role {
  font-family: var(--font-accent);
  font-size: 0.85rem;
  color: #a78a7f;
  font-style: italic;
  margin-bottom: 0.2rem;
}

.profil-scribe-motto {
  font-size: 0.8rem;
  color: #735751;
  font-style: italic;
  margin-bottom: 0.8rem;
}

.profil-scribe-count {
  display: inline-block;
  border: 1px solid rgba(115, 87, 81, 0.3);
  border-radius: 6px;
  padding: 0.5rem 1.2rem;
  margin-bottom: 0.8rem;
}

.profil-scribe-number {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: #e7d7c1;
  display: block;
}

.profil-scribe-label {
  font-family: var(--font-title);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c9a84c;
}

.profil-scribe-ornament {
  width: 100px;
  height: auto;
  opacity: 0.5;
  margin-top: 0.8rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.profil-scribe-placeholder {
  font-size: 0.85rem;
  color: #a78a7f;
  font-style: italic;
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== EXPLORATION ===== */
.profil-exploration-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.profil-badge-item {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.profil-badge-item img {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
}

.profil-badge-count {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 0.6rem;
  font-family: var(--font-title);
  color: #c9a84c;
  background: rgba(22, 4, 1, 0.85);
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid #735751;
}

.profil-badge-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a0505;
  color: #e7d7c1;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  border: 1px solid #735751;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
}

.profil-badge-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #735751;
}

.profil-badge-item:hover .profil-badge-tooltip {
  opacity: 1;
}

/* ===== PACK CONTAINER ===== */
.profil-pack {
  width: 100%;
  background: rgba(115, 87, 81, 0.08);
  border: 1px solid rgba(115, 87, 81, 0.2);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.8rem;
}

.profil-pack-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.profil-pack-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.profil-pack-name {
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9a84c;
  font-weight: 700;
}

/* ===== RARITY LABELS (narratifs) ===== */
.rarity-label-common { color: #a78a7f; }
.rarity-label-uncommon { color: #4a8c5c; }
.rarity-label-rare { color: #4a7cb5; }
.rarity-label-epic { color: #9b59b6; }
.rarity-label-legendary { color: #c9a84c; }
.rarity-label-lore { color: #2d2929; }
.rarity-label-cursed { color: #a4161a; }
.rarity-label-altered { color: #1e3a5f; }

/* ===== EMPTY INVENTORY ===== */
.profil-inventory-empty {
  text-align: center;
  color: #735751;
  font-style: italic;
  font-size: 0.85rem;
  padding: 1rem;
}

/* ===== RESPONSIVE ===== */

/* Tablette : sidebar plus étroite */
@media (max-width: 960px) {
  .profil-layout {
    grid-template-columns: 240px 1fr;
    gap: 1rem;
  }
}

/* Mobile : layout vertical (fiche agrandie) */
@media (max-width: 768px) {
  .profil-page {
    padding: 4.5rem 1rem 1rem;
  }

  .profil-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .profil-sidebar {
    position: static;
  }

  .profil-header {
    padding: 2rem 1.5rem;
  }

  .profil-name {
    font-size: 1.4rem;
  }

  .profil-section {
    padding: 1.2rem 1rem;
  }

  .profil-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .starter-grid {
    gap: 0.5rem;
  }

  .starter-item {
    padding: 0.3rem 0.5rem;
  }

  .loot-detail-content {
    padding-left: 1rem;
  }

  .profil-achievements-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== SUCCÈS ===== */
.profil-achievements-counter {
  color: #a78a7f;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  font-style: italic;
}

.profil-achievements-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.profil-achievement {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  background: rgba(42, 28, 20, 0.5);
  border: 1px solid rgba(167, 138, 127, 0.15);
  transition: background 0.2s;
}

.profil-achievement.unlocked {
  border-color: rgba(167, 138, 127, 0.3);
}

.profil-achievement.unlocked:hover {
  background: rgba(42, 28, 20, 0.8);
}

.profil-achievement.locked {
  opacity: 0.45;
}

.profil-achievement.locked.secret {
  opacity: 0.3;
}

.profil-achievement-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.profil-achievement-lock {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  filter: grayscale(1);
}

.profil-achievement-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.profil-achievement-name {
  color: #e7d7c1;
  font-size: 0.9rem;
  font-weight: bold;
}

.profil-achievement-desc {
  color: #a78a7f;
  font-size: 0.9rem;
  font-style: italic;
}

.profil-achievement-date {
  color: rgba(167, 138, 127, 0.6);
  font-size: 0.9rem;
}

/* ===== DERNIÈRE ACTIVITÉ ===== */
.profil-last-activity {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.profil-activity-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.profil-activity-label {
  color: #a78a7f;
  font-size: 0.85rem;
}

.profil-activity-value {
  color: #e7d7c1;
  font-size: 0.85rem;
  font-weight: bold;
  text-align: right;
}

/* ===== NIVEAU D'AVENTURIER ===== */
.profil-level-section {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  background: rgba(42, 28, 20, 0.5);
  border: 1px solid rgba(167, 138, 127, 0.15);
  border-radius: 8px;
}

.profil-level-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.5rem;
}

.profil-level-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 0.4rem;
}

.profil-level-label {
  color: #a78a7f;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex: 1;
}

.profil-level-number {
  color: #e7d7c1;
  font-size: 1.4rem;
  font-weight: bold;
}

.profil-xp-bar {
  width: 100%;
  height: 10px;
  background: rgba(42, 28, 20, 0.8);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(167, 138, 127, 0.2);
}

.profil-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b6914, #c9a84c);
  border-radius: 5px;
  transition: width 0.5s ease;
  min-width: 2px;
}

.profil-xp-text {
  display: block;
  text-align: right;
  color: rgba(167, 138, 127, 0.6);
  font-size: 0.75rem;
  margin-top: 0.3rem;
}

/* ===== BOUTON BESTIAIRE ===== */
/* ===== AUTH BUTTONS ===== */
.profil-auth-container {
  margin-bottom: 1rem;
}
.profil-auth-container:empty {
  display: none;
}
.profil-auth-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  background: rgba(30, 20, 18, 0.5);
  border: 1px solid rgba(167, 138, 127, 0.15);
  border-radius: 8px;
}
.profil-auth-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(106, 120, 95, 0.4);
  object-fit: cover;
}
.profil-auth-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.profil-auth-name {
  color: #e7d7c1;
  font-family: var(--font-title);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}
.profil-auth-hint {
  color: #6a785f;
  font-size: 1rem;
  font-style: italic;
}
.profil-auth-login-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.2rem 1.5rem;
  background: rgba(115, 87, 81, 0.08);
  border: 1px solid rgba(167, 138, 127, 0.2);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}
.profil-auth-login-card:hover {
  background: rgba(106, 120, 95, 0.12);
  border-color: rgba(106, 120, 95, 0.5);
}
.profil-auth-twitch-icon {
  width: 28px;
  height: 28px;
  color: #9146ff;
  margin-bottom: 0.2rem;
}
.profil-auth-login-text {
  font-family: var(--font-title);
  font-size: 1rem;
  color: #e7d7c1;
  letter-spacing: 0.04em;
}
.profil-auth-login-sub {
  font-size: 0.8rem;
  color: #a78a7f;
  font-style: italic;
}
.profil-auth-card-connected {
  padding: 0.8rem 1.2rem;
}
.profil-auth-card-connected .profil-auth-avatar {
  width: 56px;
  height: 56px;
}
.profil-auth-login-btn {
  display: block;
  text-align: center;
  padding: 0.7rem 1rem;
  background: rgba(30, 20, 18, 0.5);
  border: 1px solid rgba(106, 120, 95, 0.4);
  border-radius: 8px;
}
.profil-auth-btn-link {
  padding: 0.4rem 1rem;
  border: 1px solid rgba(106, 120, 95, 0.4);
  border-radius: 4px;
  color: #6a785f;
  text-decoration: none;
  font-size: 0.85rem;
  font-family: var(--font-title);
  letter-spacing: 0.04em;
  transition: all 0.3s;
}
.profil-auth-btn-link:hover {
  background: rgba(106, 120, 95, 0.15);
  border-color: #6a785f;
  color: #8a9e7a;
}
.profil-auth-logout {
  border-color: rgba(167, 138, 127, 0.25);
  color: #a78a7f;
  font-size: 0.75rem;
}
.profil-auth-logout:hover {
  background: rgba(167, 138, 127, 0.1);
  color: #e7d7c1;
}

/* ===== LOOT NOTES ===== */
.loot-note {
  margin-top: 0.6rem;
  padding: 0.5rem 0.7rem;
  background: rgba(106, 120, 95, 0.1);
  border-left: 3px solid #6a785f;
  border-radius: 0 4px 4px 0;
}
.loot-note-label {
  display: block;
  font-size: 0.7rem;
  color: #6a785f;
  font-style: italic;
  margin-bottom: 0.25rem;
  font-family: var(--font-accent);
}
.loot-note-text {
  color: #e7d7c1;
  font-size: 0.8rem;
  line-height: 1.4;
  white-space: pre-wrap;
  margin: 0;
}

.loot-note-edit-btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.6rem;
  background: transparent;
  border: 1px solid rgba(167, 138, 127, 0.25);
  border-radius: 4px;
  color: #a78a7f;
  font-size: 0.7rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.loot-note-edit-btn:hover {
  background: rgba(167, 138, 127, 0.1);
  border-color: #a78a7f;
}

/* ===== NOTE EDITOR ===== */
.loot-note-editor {
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(30, 20, 18, 0.6);
  border: 1px solid rgba(167, 138, 127, 0.2);
  border-radius: 6px;
}
.loot-note-textarea {
  width: 100%;
  min-height: 70px;
  padding: 0.5rem;
  background: rgba(10, 5, 3, 0.6);
  border: 1px solid rgba(167, 138, 127, 0.2);
  border-radius: 4px;
  color: #e7d7c1;
  font-family: inherit;
  font-size: 0.8rem;
  resize: vertical;
  outline: none;
}
.loot-note-textarea:focus {
  border-color: rgba(167, 138, 127, 0.4);
}
.loot-note-textarea::placeholder {
  color: rgba(167, 138, 127, 0.4);
}
.loot-note-editor-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.loot-note-charcount {
  color: rgba(167, 138, 127, 0.4);
  font-size: 0.7rem;
  flex: 1;
}
.loot-note-save,
.loot-note-cancel {
  padding: 0.3rem 0.8rem;
  border: 1px solid rgba(167, 138, 127, 0.3);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.loot-note-save {
  background: rgba(106, 120, 95, 0.3);
  color: #8a9e7a;
  border-color: rgba(106, 120, 95, 0.4);
}
.loot-note-save:hover {
  background: rgba(106, 120, 95, 0.5);
}
.loot-note-cancel {
  background: transparent;
  color: #a78a7f;
}
.loot-note-cancel:hover {
  background: rgba(167, 138, 127, 0.1);
}

/* ===== INVENTAIRE TOGGLE ===== */
.profil-inventory-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 1rem;
  margin-bottom: 0.6rem;
  background: rgba(30, 20, 18, 0.5);
  border: 1px solid rgba(167, 138, 127, 0.2);
  border-radius: 6px;
  color: #a78a7f;
  font-family: var(--font-title);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s;
  text-align: left;
}
.profil-inventory-toggle:hover {
  background: rgba(167, 138, 127, 0.1);
  border-color: rgba(167, 138, 127, 0.35);
  color: #e7d7c1;
}
.profil-toggle-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.profil-inventory-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.profil-inventory-section.open .profil-inventory-content {
  max-height: 5000px;
}

.role-stat-icon-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.profil-bestiaire-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
  gap: 0.4rem;
}
.profil-bestiaire-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  opacity: 0.8;
}
.profil-bestiaire-link {
  display: inline-block;
  font-weight: 900;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(106, 120, 95, 0.5);
  border-radius: 4px;
  color: #6a785f;
  text-decoration: none;
  font-size: 0.8rem;
  font-family: 'IM Fell English SC', serif;
  letter-spacing: 0.05em;
  transition: all 0.3s;
}
.profil-bestiaire-link:hover {
  background: rgba(106, 120, 95, 0.15);
  border-color: #6a785f;
  color: #8a9e7a;
}

/* ===== CARNET DE COMBAT ===== */
.boss-combat-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.boss-combat-card {
  background: rgba(30, 20, 18, 0.5);
  border: 1px solid rgba(167, 138, 127, 0.15);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  transition: all 0.3s;
}
.boss-combat-card:hover {
  border-color: rgba(167, 138, 127, 0.3);
  background: rgba(30, 20, 18, 0.7);
}

.boss-combat-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.boss-combat-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 4px;
}

.boss-combat-summary {
  flex: 1;
  min-width: 0;
}

.boss-combat-name {
  display: block;
  color: #d68b57;
  font-family: 'IM Fell English SC', serif;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

.boss-combat-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(167, 138, 127, 0.15);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.2rem;
}

.boss-combat-bar {
  height: 100%;
  background: linear-gradient(90deg, #6a785f, #8a9e7a);
  border-radius: 3px;
  transition: width 0.5s ease;
  min-width: 2px;
}

.boss-combat-winrate {
  color: #a78a7f;
  font-size: 0.75rem;
}

.boss-combat-flavor {
  display: block;
  color: #a78a7f;
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 0.15rem;
}

.boss-combat-chevron {
  font-size: 0.6rem;
  color: rgba(167, 138, 127, 0.4);
  transition: transform 0.3s;
  display: inline-block;
}
.boss-combat-card.expanded .boss-combat-chevron {
  transform: rotate(180deg);
}

/* Détails cliquables */
.boss-combat-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 0.2rem;
}
.boss-combat-card.expanded .boss-combat-details {
  max-height: 200px;
  padding: 0.5rem 0.2rem 0;
}

.boss-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.2rem 0;
  font-size: 0.75rem;
  color: rgba(167, 138, 127, 0.7);
  border-bottom: 1px solid rgba(167, 138, 127, 0.08);
}
.boss-detail-row:last-child {
  border-bottom: none;
}
.boss-detail-row span:last-child {
  color: #a78a7f;
  font-weight: 600;
}
