/* ────────────────────────────────────────────────────────────
   history.css — page Historique des giveaways
   ──────────────────────────────────────────────────────────── */

.container { max-width: 900px; }

/* ── Loading skeletons ────────────────────────────────────── */
.history-loading {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px 0;
}

.skel {
  background: var(--bg-card);
  border-radius: 2px;
  animation: pulse 1.4s ease-in-out infinite;
}
.skel-h  { height: 32px; }
.skel-sm { height: 16px; }
.skel-card {
  height: 220px;
  background: var(--bg-card);
  animation: pulse 1.4s ease-in-out infinite;
}

/* ── Header ───────────────────────────────────────────────── */
.history-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 2px solid rgba(0,0,0,0.4);
  padding-bottom: 20px;
  margin-bottom: 36px;
}

@media (min-width: 600px) {
  .history-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.history-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--primary);
  line-height: 1;
}

.history-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* ── Stats bar ─────────────────────────────────────────────── */
.history-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.history-stat {
  text-align: center;
  min-width: 56px;
}

.history-stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--primary);
  line-height: 1.1;
}
.history-stat-value.green { color: var(--green); }

.history-stat-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Active callout ───────────────────────────────────────── */
.active-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(207,106,50,0.05);
  border: 2px solid rgba(207,106,50,0.35);
  padding: 14px 18px;
  margin-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.active-dot {
  width: 10px;
  height: 10px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 1.6s ease-in-out infinite;
}

.active-callout-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--primary);
}

.active-callout a {
  color: var(--primary);
  text-decoration: underline;
}

/* ── Champion spotlight ───────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.section-label-icon {
  color: var(--primary);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.section-label-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--primary);
}

.champion-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

@media (min-width: 600px) {
  .champion-grid { grid-template-columns: 1fr 1fr; }
}

.champion-card {
  background: var(--bg-card);
  border: 2px solid #000;
  overflow: hidden;
  transition: box-shadow 0.25s;
}
.champion-card:hover {
  box-shadow: 0 0 24px rgba(207,106,50,0.2);
}

.champion-card-head {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.champion-card-head.paid {
  background: linear-gradient(135deg, #8B1A08 0%, #CF6A32 100%);
}
.champion-card-head.free {
  background: linear-gradient(135deg, #14532d 0%, #22c55e 100%);
}

.champion-badge {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
}

.champion-badge-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}

.champion-card-body {
  padding: 16px;
}

.champion-item-img {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(207,106,50,0.06);
  border: 1px solid rgba(207,106,50,0.2);
}
.champion-item-img img {
  max-width: 72px;
  max-height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(207,106,50,0.4));
}

.champion-item-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
}

.champion-item-effect {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
}

.champion-divider {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 14px 0;
}

.champion-winner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.champion-winner-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
}

.champion-winner-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
}
.champion-winner-name a {
  color: var(--primary);
  transition: opacity 0.2s;
}
.champion-winner-name a:hover { opacity: 0.75; }

.champion-winner-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── History table ────────────────────────────────────────── */
.history-table-section { margin-bottom: 48px; }

.history-table-wrapper { overflow-x: auto; }

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
}

.history-table th {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid rgba(0,0,0,0.6);
  white-space: nowrap;
}

.history-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.35);
  vertical-align: middle;
}

.history-table tr:hover td {
  background: rgba(207,106,50,0.04);
}

.history-rank {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--primary);
  opacity: 0.7;
  min-width: 36px;
}

.item-thumb {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.type-badge {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  display: inline-block;
  white-space: nowrap;
}
.type-badge.paid { background: var(--primary); color: #fff; }
.type-badge.free { background: var(--green); color: #000; }

.item-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--text);
}

.item-effect {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 2px;
}

.item-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  white-space: nowrap;
}

.winner-mini {
  display: flex;
  align-items: center;
  gap: 8px;
}

.winner-mini-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.winner-mini-name {
  font-size: 0.75rem;
  color: var(--text);
  white-space: nowrap;
}
.winner-mini-name a {
  color: var(--primary);
  transition: opacity 0.2s;
}
.winner-mini-name a:hover { opacity: 0.75; }

/* ── Empty state ──────────────────────────────────────────── */
.history-empty {
  text-align: center;
  padding: 80px 20px;
  background: var(--bg-card);
  border: 4px solid #000;
}

.history-empty-icon {
  font-size: 3rem;
  opacity: 0.3;
  margin-bottom: 16px;
}

.history-empty-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.history-empty-sub {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}
