/* Podiums LM / Nation League - à charger une seule fois dans indexLM */
.lm-podium {
    --podium-gold: #ffd968;
    --podium-silver: #dbe5ef;
    --podium-bronze: #d98b50;
    --podium-text: var(--theme-text, #f7fbff);
    --podium-muted: var(--theme-muted, #aab6c9);
    --podium-surface: rgba(7, 17, 31, .94);
    --podium-surface-2: rgba(15, 31, 49, .92);
    width: 100%;
    isolation: isolate;
    color: var(--podium-text);
}

.lm-podium__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: clamp(8px, 1.4vw, 18px);
    padding: 24px 4px 4px;
}

.lm-podium__grid > .lm-podium__card:only-child {
    grid-column: 2;
}

.lm-podium__card {
    --rank-color: var(--podium-silver);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    min-height: 225px;
    padding: 18px 12px 15px;
    overflow: hidden;
    text-align: center;
    background:
        radial-gradient(circle at 50% -15%, color-mix(in srgb, var(--rank-color) 30%, transparent), transparent 48%),
        linear-gradient(160deg, var(--podium-surface-2), var(--podium-surface));
    border: 1px solid color-mix(in srgb, var(--rank-color) 46%, transparent);
    border-top: 3px solid var(--rank-color);
    border-radius: 18px 18px 11px 11px;
    box-shadow:
        0 18px 35px rgba(0, 0, 0, .34),
        inset 0 1px 0 rgba(255, 255, 255, .08),
        0 0 24px color-mix(in srgb, var(--rank-color) 10%, transparent);
}

.lm-podium__card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 15%, rgba(255,255,255,.07) 42%, transparent 58%);
    transform: translateX(-70%);
}

.lm-podium__card--rank-1 {
    --rank-color: var(--podium-gold);
    min-height: 320px;
    padding-top: 24px;
    border-width: 1px;
    border-top-width: 4px;
    border-radius: 22px 22px 12px 12px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, .43),
        inset 0 1px 0 rgba(255, 255, 255, .12),
        0 0 36px color-mix(in srgb, var(--podium-gold) 20%, transparent);
}

.lm-podium__card--rank-2 {
    --rank-color: var(--podium-silver);
    min-height: 225px;
}

.lm-podium__card--rank-3 {
    --rank-color: var(--podium-bronze);
    min-height: 175px;
    padding-top: 14px;
}

.lm-podium__medal {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    margin-bottom: 11px;
    color: #101318;
    background: linear-gradient(145deg, #fff, var(--rank-color) 42%, color-mix(in srgb, var(--rank-color) 72%, #000));
    border: 2px solid rgba(255,255,255,.72);
    border-radius: 50%;
    font-size: .78rem;
    font-weight: 1000;
    box-shadow: 0 7px 18px rgba(0,0,0,.35), 0 0 16px color-mix(in srgb, var(--rank-color) 26%, transparent);
}

.lm-podium__card--rank-1 .lm-podium__medal {
    width: 50px;
    height: 50px;
    margin-bottom: 16px;
    font-size: 1rem;
}

.lm-podium__card--rank-3 .lm-podium__medal {
    width: 31px;
    height: 31px;
    margin-bottom: 8px;
    font-size: .68rem;
}

.lm-podium__photo-stage {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 88px;
    margin: -2px 0 10px;
    overflow: hidden;
}

.lm-podium__photo-stage::after {
    content: "";
    position: absolute;
    right: 15%;
    bottom: 0;
    left: 15%;
    height: 2px;
    background: var(--rank-color);
    border-radius: 999px;
    box-shadow: 0 0 18px var(--rank-color);
    opacity: .72;
}

.lm-podium__photo {
    position: relative;
    z-index: 1;
    display: block;
    width: auto;
    max-width: 92%;
    height: 84px;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 9px 10px rgba(0,0,0,.55));
}

.lm-podium__card--rank-1 .lm-podium__photo-stage { height: 132px; margin-bottom: 14px; }
.lm-podium__card--rank-1 .lm-podium__photo { height: 128px; }
.lm-podium__card--rank-3 .lm-podium__photo-stage { height: 58px; margin-bottom: 7px; }
.lm-podium__card--rank-3 .lm-podium__photo { height: 55px; }

.lm-podium__identity {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-width: 0;
}

.lm-podium__emblem {
    flex: 0 0 auto;
    width: 25px;
    height: 25px;
    object-fit: contain;
    filter: drop-shadow(0 4px 7px rgba(0,0,0,.45));
}

.lm-podium__player,
.lm-podium__manager,
.lm-podium__score {
    position: relative;
    z-index: 1;
    display: block;
    max-width: 100%;
}

.lm-podium__player {
    overflow: hidden;
    color: #fff;
    font-size: clamp(.72rem, 1.2vw, .95rem);
    font-weight: 950;
    line-height: 1.18;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lm-podium__card--rank-1 .lm-podium__player {
    font-size: clamp(.9rem, 1.6vw, 1.22rem);
}

.lm-podium__manager {
    margin-top: 7px;
    overflow: hidden;
    color: var(--podium-muted);
    font-size: clamp(.58rem, .9vw, .72rem);
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lm-podium__score {
    margin-top: auto;
    padding-top: 13px;
    color: var(--rank-color);
    font-size: clamp(.7rem, 1vw, .9rem);
    font-weight: 1000;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 14px color-mix(in srgb, var(--rank-color) 32%, transparent);
}

.lm-podium__card--rank-1 .lm-podium__score {
    padding-top: 19px;
    font-size: clamp(.9rem, 1.3vw, 1.12rem);
}

.lm-podium__score--gp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.lm-podium__score--gp img {
    width: 21px;
    height: 21px;
    object-fit: contain;
}

.lm-podium__cards {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: auto;
    padding-top: 13px;
}

.lm-podium__badge {
    min-width: 29px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 1000;
    font-variant-numeric: tabular-nums;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 5px 12px rgba(0,0,0,.22);
}

.lm-podium__badge--red { color: #fff; background: linear-gradient(145deg, #ff4c59, #a40012); }
.lm-podium__badge--yellow { color: #17130a; background: linear-gradient(145deg, #ffe96b, #e6ae00); }

.lm-podium__empty {
    padding: 24px 14px;
    color: var(--podium-muted);
    text-align: center;
    font-size: .78rem;
}

.lm-ranking-list {
    margin-top: 16px;
    overflow: hidden;
    color: var(--podium-text, #f7fbff);
    background: linear-gradient(180deg, rgba(15,31,49,.94), rgba(7,17,31,.96));
    border: 1px solid rgba(120, 220, 255, .16);
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.04);
}

.lm-ranking-list__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 13px;
    background: linear-gradient(90deg, rgba(37,151,214,.17), rgba(15,31,49,.76));
    border-bottom: 1px solid rgba(120, 220, 255, .14);
}

.lm-ranking-list__head strong { color: #fff; font-size: .72rem; font-weight: 950; letter-spacing: .04em; text-transform: uppercase; }
.lm-ranking-list__head span { color: var(--podium-muted, #aab6c9); font-size: .58rem; font-weight: 800; }
.lm-ranking-list .lm-ranking-table { --bs-table-bg: transparent !important; width: 100%; margin: 0 !important; color: var(--podium-text, #f7fbff) !important; font-size: .68rem !important; }
.lm-ranking-list .lm-ranking-table thead th { padding: 8px !important; color: #cbd5e1 !important; background: rgba(37,151,214,.10) !important; border: 0 !important; border-bottom: 1px solid rgba(120,220,255,.14) !important; font-size: .54rem !important; font-weight: 900 !important; text-transform: uppercase; white-space: nowrap; }
.lm-ranking-list .lm-ranking-table tbody td { padding: 8px !important; color: #f7fbff !important; background: rgba(7,17,31,.82) !important; border: 0 !important; border-bottom: 1px solid rgba(120,220,255,.08) !important; vertical-align: middle !important; }
.lm-ranking-list .lm-ranking-table tbody tr:nth-child(even) > td { background: rgba(15,31,49,.84) !important; }
.lm-ranking-list .lm-ranking-table tbody tr:hover > td { background: rgba(37,151,214,.15) !important; }
.lm-ranking-rank { width: 38px; color: var(--podium-muted, #aab6c9) !important; font-weight: 950; text-align: center; }
.lm-ranking-rank--top { color: var(--podium-gold, #ffd968) !important; }
.lm-ranking-gp { display: inline-flex; align-items: center; gap: 5px; color: var(--podium-gold, #ffd968); font-weight: 950; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lm-ranking-gp img { width: 18px; height: 18px; object-fit: contain; }
.lm-ranking-empty { padding: 22px 12px; color: var(--podium-muted, #aab6c9); text-align: center; font-size: .68rem; }

@media (max-width: 575.98px) {
    .lm-podium__grid { gap: 5px; padding-top: 14px; }
    .lm-podium__card { min-height: 170px; padding: 12px 6px 10px; border-radius: 14px 14px 9px 9px; }
    .lm-podium__card--rank-1 { min-height: 235px; padding-top: 18px; border-radius: 17px 17px 10px 10px; }
    .lm-podium__card--rank-2 { min-height: 170px; }
    .lm-podium__card--rank-3 { min-height: 135px; padding-top: 10px; }
    .lm-podium__medal { width: 30px; height: 30px; margin-bottom: 8px; }
    .lm-podium__card--rank-1 .lm-podium__medal { width: 42px; height: 42px; margin-bottom: 11px; }
    .lm-podium__card--rank-3 .lm-podium__medal { width: 26px; height: 26px; }
    .lm-podium__photo-stage { height: 58px; margin-bottom: 6px; }
    .lm-podium__photo { height: 55px; max-width: 96%; }
    .lm-podium__card--rank-1 .lm-podium__photo-stage { height: 88px; margin-bottom: 9px; }
    .lm-podium__card--rank-1 .lm-podium__photo { height: 85px; }
    .lm-podium__card--rank-3 .lm-podium__photo-stage { height: 40px; margin-bottom: 4px; }
    .lm-podium__card--rank-3 .lm-podium__photo { height: 38px; }
    .lm-podium__emblem { width: 19px; height: 19px; }
    .lm-podium__identity { gap: 4px; }
    .lm-podium__player { font-size: .58rem; }
    .lm-podium__card--rank-1 .lm-podium__player { font-size: .76rem; }
    .lm-podium__manager { margin-top: 4px; font-size: .48rem; }
    .lm-podium__score { padding-top: 8px; font-size: .58rem; }
    .lm-podium__card--rank-1 .lm-podium__score { padding-top: 12px; font-size: .75rem; }
    .lm-podium__cards { gap: 3px; padding-top: 8px; }
    .lm-podium__badge { min-width: 23px; padding: 4px 6px; font-size: .58rem; }
    .lm-ranking-list__head { padding: 8px 9px; }
    .lm-ranking-list .lm-ranking-table { font-size: .58rem !important; }
    .lm-ranking-list .lm-ranking-table thead th,
    .lm-ranking-list .lm-ranking-table tbody td { padding: 6px !important; }
}
