/**
 * QRUSH — Top 5 Pilotes v1.0.16
 */

.qrush-top5-pilotes {
    --qrush-blue: #118fd0;
    --qrush-yellow: #ffd21f;
    --qrush-red: #ff2347;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(50, 145, 255, .5);
    border-bottom: 1px solid rgba(50, 145, 255, .28);
    background:
        linear-gradient(115deg, rgba(4, 21, 39, .98) 0%, rgba(6, 24, 45, .98) 48%, rgba(76, 12, 19, .92) 100%);
    color: #fff;
}

.qrush-top5-pilotes *,
.qrush-top5-pilotes *::before,
.qrush-top5-pilotes *::after {
    box-sizing: border-box;
}

.qrush-top5__header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 18px 20px;
}

.qrush-top5__kicker {
    display: block;
    margin-bottom: 10px;
    color: #08131f;
    font-size: .68rem;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.qrush-top5__header h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.65rem, 4vw, 2.1rem);
    font-weight: 950;
    line-height: 1;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.qrush-top5__season {
    margin: 9px 0 0;
    color: #77869a;
    font-size: .95rem;
}

.qrush-top5__season strong {
    color: #fff;
}

.qrush-top5__fleur {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid rgba(255, 210, 31, .35);
    background: rgba(255, 210, 31, .05);
    color: rgba(255, 210, 31, .43);
    font-size: 1.1rem;
}

.qrush-top5__alert,
.qrush-top5__preseason {
    margin: 0 18px 18px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.13);
    background:
        repeating-linear-gradient(
            135deg,
            rgba(255,255,255,.05) 0 11px,
            rgba(255,255,255,.025) 11px 22px
        );
    color: #fff;
    font-size: .9rem;
    font-weight: 750;
}

.qrush-top5__preseason {
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 3px solid var(--qrush-yellow);
    color: #cfd9e8;
}

.qrush-top5__preseason > span {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 4px 7px;
    background: var(--qrush-yellow);
    color: #07101c;
    font-size: .62rem;
    font-weight: 950;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.qrush-top5__grid {
    display: grid;
    gap: 1px;
    padding: 0 18px 18px;
}

.qrush-top5__driver {
    position: relative;
    display: grid;
    grid-template-columns: 48px 72px minmax(0, 1fr) 86px;
    align-items: center;
    min-height: 84px;
    border-left: 3px solid var(--driver-accent, var(--qrush-blue));
    border-top: 1px solid rgba(255,255,255,.075);
    border-bottom: 1px solid rgba(255,255,255,.045);
    background:
        linear-gradient(90deg, rgba(255,255,255,.055), rgba(255,255,255,.016));
}

.qrush-top5__driver::after {
    content: "";
    position: absolute;
    inset: 0 0 0 auto;
    width: 25%;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--driver-accent) 13%, transparent));
}

.qrush-top5__rank {
    display: grid;
    place-items: center;
    align-self: stretch;
    border-right: 1px solid rgba(255,255,255,.07);
    color: var(--qrush-yellow);
    font-size: 1.15rem;
    font-weight: 950;
    font-style: italic;
}

.qrush-top5__avatar {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.15);
    background: #07111e;
}

.qrush-top5__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    image-rendering: auto;
}

.qrush-top5__avatar > span {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 950;
}

.qrush-top5__identity {
    min-width: 0;
    padding: 10px 10px 10px 6px;
}

.qrush-top5__name {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
}

.qrush-top5__name > span {
    color: var(--driver-accent, var(--qrush-blue));
    font-size: .74rem;
    font-weight: 950;
}

.qrush-top5__name > strong {
    overflow: hidden;
    color: #fff;
    font-size: .95rem;
    font-weight: 950;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.qrush-top5__team {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-top: 5px;
    color: #8fa0b7;
    font-size: .67rem;
    font-weight: 800;
    text-transform: uppercase;
}

.qrush-top5__team img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    image-rendering: auto;
}

.qrush-top5__team span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qrush-top5__stats {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: end;
    gap: 4px;
    padding: 10px 13px;
    border-left: 1px solid rgba(255,255,255,.07);
}

.qrush-top5__stat-line {
    display: grid;
    grid-template-columns: auto auto;
    align-items: baseline;
    justify-content: end;
    gap: 7px;
}

.qrush-top5__stats > span,
.qrush-top5__stat-line > span {
    color: #788aa4;
    font-size: .58rem;
    font-weight: 950;
    letter-spacing: .08em;
}

.qrush-top5__stats > strong,
.qrush-top5__stat-line > strong {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 950;
}

.qrush-top5__random-label {
    color: var(--qrush-yellow) !important;
    text-align: right;
}

.qrush-top5__driver.is-preseason {
    border-left-color: rgba(255, 210, 31, .72);
}

@media (max-width: 640px) {
    .qrush-top5__header {
        padding: 20px 14px 16px;
    }

    .qrush-top5__alert,
    .qrush-top5__preseason {
        margin-left: 14px;
        margin-right: 14px;
    }

    .qrush-top5__grid {
        padding-left: 14px;
        padding-right: 14px;
    }

    .qrush-top5__driver {
        grid-template-columns: 38px 60px minmax(0, 1fr);
        min-height: 76px;
    }

    .qrush-top5__avatar {
        width: 50px;
        height: 50px;
    }

    .qrush-top5__stats {
        grid-column: 3;
        justify-items: start;
        padding: 0 10px 8px 6px;
        border-left: 0;
    }

    .qrush-top5__stats > strong,
.qrush-top5__stat-line > strong {
        font-size: 1rem;
    }

    .qrush-top5__preseason {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================================================
   QRUSH Top 5 Pilotes v1.0.17 — Correctifs avant-saison
   ========================================================= */

/* Le module ne doit jamais déborder de sa colonne Gantry. */
.qrush-top5-pilotes {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.qrush-top5__grid,
.qrush-top5__driver,
.qrush-top5__identity {
    min-width: 0;
    max-width: 100%;
}

/* Avant-saison : aucune colonne de statistiques à droite. */
.qrush-top5__driver.is-preseason {
    grid-template-columns: 48px 72px minmax(0, 1fr) !important;
}

/* Le texte d'avant-saison reste compact et lisible. */
.qrush-top5__preseason {
    flex-wrap: wrap;
    overflow: hidden;
    max-width: calc(100% - 36px);
}

.qrush-top5__preseason > span {
    white-space: nowrap;
}

.qrush-top5__name,
.qrush-top5__team {
    max-width: 100%;
}

/* Empêche toute chaîne longue de sortir du module. */
.qrush-top5__name > strong,
.qrush-top5__team span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Le label interne par pilote n'est plus utilisé. */
.qrush-top5__random-label {
    display: none !important;
}

@media (max-width: 640px) {
    .qrush-top5__driver.is-preseason {
        grid-template-columns: 38px 60px minmax(0, 1fr) !important;
    }
}

/* =========================================================
   QRUSH Top 5 Pilotes v1.0.18
   Hauteur synchronisée avec Top 5 Équipes
   ========================================================= */

.qrush-top5-pilotes.is-equalized-with-teams {
    display: flex;
    flex-direction: column;
}

.qrush-top5-pilotes.is-equalized-with-teams .qrush-top5__header {
    flex: 0 0 auto;
}

.qrush-top5-pilotes.is-equalized-with-teams .qrush-top5__grid {
    display: grid;
    flex: 1 1 auto;
    grid-template-rows: repeat(5, minmax(0, 1fr));
    min-height: 0;
}

.qrush-top5-pilotes.is-equalized-with-teams .qrush-top5__driver {
    min-height: 0;
    height: 100%;
}

/* Le bandeau avant-saison n'est plus affiché. */
.qrush-top5__preseason {
    display: none !important;
}

@media (max-width: 699px) {
    .qrush-top5-pilotes {
        height: auto !important;
        min-height: 0 !important;
    }
}


.qrush-top5__stat-line--absences > span { color: #ff9f2f; }
.qrush-top5__stat-line--absences > strong { font-size: .9rem; }
