/* ==========================================================================
   Skyloria — Panthéon (classements.html)
   Chargé par cette page seulement, après base.css, components.css et pages.css.
   ========================================================================== */


.board-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.board-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  color: var(--text-2);
}

.board-intro__title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--text-1);
}

.board-intro__title .picon {
  width: 36px;
  height: 36px;
}

.board-panel {
  transition:
    opacity var(--dur-2) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
}

.board-panel.is-switching {
  opacity: 0;
  transform: translateY(10px);
}

/* Podium : plaque de nom façon Minecraft, joueur posé sur un bloc d'or / fer / cuivre */
.podium {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: clamp(0.6rem, 0.3rem + 1.5vw, 1.75rem);
  max-width: 760px;
  margin: 0 auto var(--space-10);
}

.podium__place {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
}

.podium__place--1 {
  order: 2;
}

.podium__place--2 {
  order: 1;
}

.podium__place--3 {
  order: 3;
}

.podium__tag {
  max-width: 100%;
  margin-bottom: var(--space-2);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.42);
  font-family: var(--font-pixel);
  font-weight: 600;
  font-size: clamp(0.8rem, 0.7rem + 0.4vw, 1rem);
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium__skin {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: clamp(118px, 9vw + 70px, 190px);
  margin-bottom: -6px;
}

.podium__place--1 .podium__skin {
  height: clamp(132px, 11vw + 74px, 220px);
}

.podium__skin img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.45));
  transform-origin: 50% 100%;
  animation: idle 4s var(--ease-in-out) infinite alternate;
  animation-delay: var(--idle-delay, 0s);
}

@keyframes idle {
  to {
    transform: translateY(-5px);
  }
}

.podium__crown {
  position: absolute;
  top: -30px;
  left: 50%;
  width: 36px;
  height: 36px;
  transform: translateX(-50%) rotate(-8deg);
  animation: crown 2.8s var(--ease-in-out) infinite alternate;
}

@keyframes crown {
  to {
    transform: translateX(-50%) translateY(-6px) rotate(6deg);
  }
}

.podium__place--1 .podium__tag {
  margin-bottom: calc(var(--space-2) + 30px);
}

.podium__block {
  position: relative;
  width: 100%;
  height: var(--h);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  padding: var(--space-2);
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  color: rgba(29, 20, 0, 0.82);
  background-color: var(--block);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0) 30%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Cg fill='%23000' opacity='.12'%3E%3Crect x='0' y='15' width='16' height='1'/%3E%3Crect x='15' y='0' width='1' height='16'/%3E%3Crect x='3' y='4' width='2' height='1'/%3E%3Crect x='10' y='9' width='3' height='1'/%3E%3C/g%3E%3Cg fill='%23fff' opacity='.18'%3E%3Crect x='0' y='0' width='16' height='1'/%3E%3Crect x='6' y='6' width='2' height='1'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, 32px 32px;
  image-rendering: pixelated;
  box-shadow: 0 -4px 0 rgba(255, 255, 255, 0.18) inset, 0 20px 40px -20px rgba(0, 0, 0, 0.8);
  transform-origin: bottom;
  animation: grow 900ms var(--ease-out) both;
  animation-delay: var(--grow-delay, 0s);
}

@keyframes grow {
  from {
    transform: scaleY(0.2);
    opacity: 0;
  }
}

.podium__rank {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.4rem);
  line-height: 1;
  color: rgba(0, 0, 0, 0.38);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.28);
}

.podium__value {
  font-size: clamp(0.78rem, 0.7rem + 0.35vw, 0.95rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.podium__value .unit.text-muted {
  color: inherit;
  opacity: 0.7;
}

.podium__place--1 .podium__block {
  --block: #f4bf2b;
  --h: clamp(118px, 7vw + 70px, 160px);
}

.podium__place--2 .podium__block {
  --block: #c9ced6;
  --h: clamp(96px, 5vw + 56px, 126px);
}

.podium__place--3 .podium__block {
  --block: #c7804a;
  --h: clamp(84px, 4vw + 48px, 106px);
}

.podium__place.is-match .podium__tag {
  background: var(--gold-400);
  color: var(--ink-on-gold);
}

.podium__place.is-match .podium__block {
  box-shadow: 0 0 0 3px var(--gold-300), 0 -4px 0 rgba(255, 255, 255, 0.18) inset, 0 20px 40px -20px rgba(0, 0, 0, 0.8);
}

/* Tableau du classement */
.lb-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.lb-table thead th {
  padding: 0 1rem 0.4rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: left;
}

.lb-table thead th.num-col {
  text-align: right;
}

.lb-table tbody tr {
  background: rgba(15, 35, 72, 0.55);
  transition:
    background-color var(--dur-2) var(--ease-out),
    transform var(--dur-2) var(--ease-out);
  animation: row-in 500ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.lb-table tbody tr:hover {
  background: rgba(20, 48, 94, 0.8);
}

.lb-table tbody tr.is-match {
  background: rgba(255, 212, 71, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 212, 71, 0.4) inset;
}

.lb-table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.lb-table td:first-child {
  border-radius: var(--r-md) 0 0 var(--r-md);
  width: 64px;
}

.lb-table td:last-child {
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

.lb-player {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 600;
}

.lb-value {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lb-bar-cell {
  width: 32%;
}

.lb-bar {
  height: 8px;
  border-radius: 0 4px 4px 0;
  background: var(--sky-400);
  width: var(--w);
  transform-origin: left;
  animation: bar-in 900ms var(--ease-out) both;
  animation-delay: calc(150ms + var(--i, 0) * 35ms);
}

@keyframes bar-in {
  from {
    transform: scaleX(0);
  }
}

.board-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  margin-top: var(--space-6);
  font-size: var(--fs-sm);
  color: var(--text-3);
}

@media (max-width: 720px) {
  .lb-bar-cell,
  .lb-table thead th.lb-bar-cell {
    display: none;
  }

  .lb-table td {
    padding: 0.65rem 0.7rem;
  }

  .lb-table td:first-child {
    width: 44px;
  }
}

/* ---------- Liens du podium ---------- */

a.podium__tag:hover,
a.podium__tag:focus-visible {
  background: var(--gold-400);
  color: var(--ink-on-gold);
}

a.lb-player {
  transition: color var(--dur-2) var(--ease-out);
}

a.lb-player:hover {
  color: var(--gold-300);
}
