/* ---------------------------------------------------------------------------
   Le podium d'une catégorie, en HTML.

   Transposition du visuel d'annonce : trois marches 2 – 1 – 3, portraits
   cerclés de la couleur de leur médaille, puis les deux classements par
   collège. Sur fond clair, comme la page qui l'accueille.
   --------------------------------------------------------------------------- */

.podium {
  margin-bottom: 1.25rem;
}

/* --- Les trois marches ----------------------------------------------------- */

.podium-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.podium-runner {
  display: block;
  text-decoration: none;
  color: inherit;
}

.podium-photo {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto -32px;
  position: relative;
  z-index: 2;
  background-color: var(--ldt-surface-3);
  box-shadow: 0 4px 12px rgba(var(--ldt-shadow-rgb), 0.25);
}

.podium-photo-empty {
  background-color: var(--ldt-surface-3);
}

/* L'anneau reprend la couleur de la médaille : c'est lui qui fait lire le
   rang avant même le chiffre. */
.is-rank-1 .podium-photo {
  width: 104px;
  height: 104px;
  border: 5px solid #f2c200;
  margin-bottom: -38px;
}

.is-rank-2 .podium-photo {
  border: 5px solid #d8dde4;
}

.is-rank-3 .podium-photo {
  border: 5px solid #e8a877;
}

.podium-block {
  background: linear-gradient(var(--ldt-primary), var(--ldt-primary-strong));
  border-radius: 0.75rem 0.75rem 0 0;
  padding: 2.6rem 0.4rem 0.9rem;
  text-align: center;
  color: var(--ldt-on-primary);
}

/* Les hauteurs disent le classement : la première marche domine. */
.is-rank-1 .podium-block {
  padding-top: 3.4rem;
  padding-bottom: 1.6rem;
}

.is-rank-3 .podium-block {
  padding-bottom: 0.6rem;
}

.podium-rank {
  display: block;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.is-rank-1 .podium-rank {
  font-size: 2.6rem;
  color: #f2c200;
}

.is-rank-2 .podium-rank {
  color: #d8dde4;
}

.is-rank-3 .podium-rank {
  color: #e8a877;
}

.podium-name {
  margin: 0;
  line-height: 1.2;
}

.podium-flag {
  margin-right: 0.2rem;
}

.podium-first {
  font-size: 0.85rem;
  font-weight: 300;
}

.podium-last {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
}

.podium-points {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  opacity: 0.85;
}

.podium-runner:hover .podium-last {
  text-decoration: underline;
}

/* --- Les deux collèges ----------------------------------------------------- */

.podium-colleges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.podium-college {
  background-color: var(--ldt-surface);
  border: 1px solid var(--border-soft);
  border-radius: 0.9rem;
  padding: 0.75rem 0.6rem 0.6rem;
}

.podium-college-title {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.podium-college-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.podium-college-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.45rem;
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
}

/* Un fond très pâle qui décroît avec le rang, comme sur le visuel. */
.podium-college-list li.is-place-1 {
  background-color: var(--ldt-gold-soft);
}

.podium-college-list li.is-place-2 {
  background-color: var(--ldt-surface-2);
}

.podium-college-list li.is-place-3 {
  background-color: var(--ldt-bronze-soft);
}

.podium-college-rank {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-muted);
  flex: 0 0 auto;
  width: 1rem;
  text-align: center;
}

.is-place-1 .podium-college-rank {
  color: #c99209;
}

.is-place-3 .podium-college-rank {
  color: #b97a45;
}

.podium-college-list .podium-name {
  flex: 1;
  min-width: 0;
  color: var(--text-main);
}

.podium-college-list .podium-first {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.podium-college-list .podium-last {
  font-size: 0.92rem;
  font-weight: 500;
}

.podium-college-points {
  flex: 0 0 auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.podium-college-points small {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* --- Petits écrans --------------------------------------------------------- */

@media (max-width: 520px) {
  .podium-photo {
    width: 62px;
    height: 62px;
    margin-bottom: -24px;
  }

  .is-rank-1 .podium-photo {
    width: 76px;
    height: 76px;
    margin-bottom: -28px;
  }

  .podium-block {
    padding-top: 2rem;
  }

  .is-rank-1 .podium-block {
    padding-top: 2.5rem;
  }

  .podium-rank {
    font-size: 1.6rem;
  }

  .is-rank-1 .podium-rank {
    font-size: 2rem;
  }

  .podium-last {
    font-size: 0.82rem;
  }

  .podium-first {
    font-size: 0.72rem;
  }

  /* Deux colonnes de classement deviennent illisibles : on les empile. */
  .podium-colleges {
    grid-template-columns: 1fr;
  }
}
