/* ─── Loot du jour — section hub ─────────────────────────────── */
.loot-section {
  margin-bottom: 1.8rem;
  display: none; /* affiché via JS si Discord + non réclamé */
}

.loot-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.4rem;
  background: linear-gradient(135deg, #2a1a4e 0%, #1a1a28 100%);
  border: 1.5px solid #7c3aed44;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  position: relative;
  overflow: hidden;
}

.loot-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #7c3aed18, transparent 60%);
  pointer-events: none;
}

.loot-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124,58,237,0.25);
  border-color: #7c3aed88;
}

.loot-banner-icon {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
  animation: loot-pulse 2s ease-in-out infinite;
}

@keyframes loot-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.12); }
}

.loot-banner-text {
  flex: 1;
}

.loot-banner-title {
  font-size: 1rem;
  font-weight: 800;
  color: #c084fc;
  margin-bottom: 0.15rem;
}

.loot-banner-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.loot-banner-arrow {
  font-size: 1.2rem;
  color: #c084fc;
  opacity: 0.7;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.loot-banner:hover .loot-banner-arrow {
  transform: translateX(4px);
}

/* ─── Loot bannière réclamé ──────────────────────────────────── */
.loot-claimed-header {
  font-size: 0.78rem;
  font-weight: 700;
  color: #4ade80;
  text-align: center;
  margin-bottom: 0.6rem;
  letter-spacing: 0.04em;
}

.loot-claimed-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.3rem;
}

.loot-claimed-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem 0.2rem;
  background: var(--surface);
  border: 1px solid #2e2e4a;
  border-radius: 10px;
  min-width: 0;
}

.loot-claimed-item-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  max-height: 56px;
}

.loot-claimed-item-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 56px;
}

.loot-claimed-item-img-wrap img {
  max-width: 100%;
  max-height: 56px;
  height: auto;
}

.loot-claimed-item-type {
  font-size: 0.5rem;
  color: #c084fc;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  line-height: 1.2;
}


.loot-claimed {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.4rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  opacity: 0.7;
}

.loot-claimed-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.loot-claimed-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.loot-claimed-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.loot-claimed-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  background: #7c3aed22;
  color: #c084fc;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ─── Modal loot ─────────────────────────────────────────────── */
#loot-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

#loot-modal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}

.loot-modal-box {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 520px;
  width: 100%;
}

.loot-modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #c084fc;
  text-align: center;
}

/* ─── Bouton d'ouverture ─────────────────────────────────────── */
.loot-open-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 1.5rem 2.5rem;
  background: linear-gradient(135deg, #2a1a4e, #1a1a28);
  border: 2px solid #7c3aed66;
  border-radius: 20px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.loot-open-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(124,58,237,0.3);
  border-color: #7c3aed99;
}

.loot-open-ball {
  font-size: 5rem;
  line-height: 1;
  animation: loot-pulse 2s ease-in-out infinite;
}

.loot-open-loading {
  animation: loot-spin 0.6s linear infinite;
}

@keyframes loot-spin {
  from { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.1); }
  to   { transform: rotate(360deg) scale(1); }
}

.loot-open-hint {
  font-size: 0.82rem;
  color: #c084fc99;
  text-align: center;
}

/* ─── Fan de cartes (bouton loot) ──────────────────────────── */
.loot-cards-fan {
  position: relative;
  width: 72px;
  height: 100px;
  margin: 0 auto;
}
.loot-card-slot {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: center 90%;
}
.loot-card-slot--left  { transform: rotate(-20deg); z-index: 1; }
.loot-card-slot--mid   { transform: rotate(0deg);   z-index: 3; }
.loot-card-slot--right { transform: rotate(20deg);  z-index: 1; }
.loot-card-item {
  width: 72px;
  height: 100px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0,0,0,0.6);
  display: block;
  animation: loot-pulse 2s ease-in-out infinite;
}
.loot-card-slot--left  .loot-card-item { animation-delay: 0s; }
.loot-card-slot--mid   .loot-card-item { animation-delay: 0.25s; }
.loot-card-slot--right .loot-card-item { animation-delay: 0.5s; }
.loot-cards-fan--spinning {
  animation: loot-spin 0.55s linear infinite;
  transform-origin: center center;
}

/* ─── Rangée d'items révélés ─────────────────────────────────── */
.loot-items-row {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.loot-reveal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 0.4rem 0.6rem;
  background: var(--surface);
  border: 1.5px solid #7c3aed44;
  border-radius: 14px;
  width: 86px;
  opacity: 0;
  transform: scale(0.5) translateY(16px);
}

.loot-reveal-item.revealed {
  animation: loot-pop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes loot-pop {
  from { opacity: 0; transform: scale(0.5) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.loot-reveal-img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 6px;
}

.loot-reveal-img-wrap {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loot-reveal-img-wrap img {
  max-width: 70px;
  max-height: 70px;
  height: auto;
  border-radius: 5px;
}

.loot-reveal-name {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loot-reveal-type {
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  background: #7c3aed22;
  color: #c084fc;
  border-radius: 999px;
  white-space: nowrap;
}

/* ─── Bouton après révélation ────────────────────────────────── */
.loot-modal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.loot-modal-actions button,
.loot-modal-actions a {
  padding: 0.55rem 1.2rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.loot-btn-primary {
  background: #7c3aed;
  color: #fff;
}

.loot-btn-secondary {
  background: var(--surface2);
  color: var(--text);
}

/* ─── Stats complétion ───────────────────────────────────────── */
.col-stats-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}

.col-stats-total {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.col-stats-pct {
  color: #c084fc;
  margin-left: 0.4rem;
}

.col-stats-rows {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.col-stat-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.col-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 90px;
  flex-shrink: 0;
}

.col-stat-bar {
  flex: 1;
  height: 6px;
  background: var(--surface2);
  border-radius: 999px;
  overflow: hidden;
}

.col-stat-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #c084fc);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.col-stat-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  min-width: 56px;
  text-align: right;
  flex-shrink: 0;
}

.col-stat-max {
  color: var(--text-muted);
  font-weight: 400;
}

.col-stat-pct {
  font-size: 0.68rem;
  color: #c084fc;
  font-weight: 700;
  min-width: 52px;
  text-align: right;
  flex-shrink: 0;
}

/* ─── Contrôles collection ───────────────────────────────────── */
.collection-controls {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.collection-search {
  width: 100%;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  box-sizing: border-box;
}

.collection-search:focus {
  outline: none;
  border-color: #7c3aed88;
}

.collection-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.col-filter {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}

.col-filter.active,
.col-filter:hover {
  border-color: #7c3aed;
  color: #c084fc;
  background: #7c3aed18;
}

/* ─── Collection profil ──────────────────────────────────────── */
#tab-collection {
  width: 90vw;
  margin-left: calc(-45vw + 50%);
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.collection-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.7rem 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
}

.collection-item img {
  width: 100%;
  max-width: 72px;
  height: 72px;
  object-fit: contain;
}

.collection-type-orb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.collection-item-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.collection-item-type {
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  background: #7c3aed22;
  color: #c084fc;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  margin-top: auto;
}

/* ─── Tooltip custom ─────────────────────────────────────────── */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  color: #dcdce8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  white-space: pre;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  border: 1px solid #2e2e4a;
  z-index: 950;
  text-align: center;
  line-height: 1.6;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

.collection-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem 0;
}
