﻿/* Le Peloton, côté coureurs : la liste, le marché et la fiche. S'appuie sur lgb-tiles.css. */

.rider-g {
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.rider-tile {
    --tile-pad: 14px;
    gap: 10px;
}

.rider-tile-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.rider-tile-title {
    flex-shrink: 0;
    margin: 0;
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 20px;
    line-height: 1;
    text-transform: uppercase;
}

.rider-tile-sub {
    min-width: 0;
    font-size: 12px;
    color: var(--tile-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rider-quip {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    color: var(--tile-muted);
}

/* Boutons de filtre et de tri */
.rider-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.rider-chips::-webkit-scrollbar {
    display: none;
}

.rider-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: var(--lgb-surface);
    box-shadow: inset 0 0 0 1px #D9D5E2;
    color: var(--lgb-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.rider-chip--on {
    background: var(--lgb-ink);
    box-shadow: none;
    color: #FFFFFF;
}

.rider-chip:focus-visible {
    outline: 3px solid var(--lgb-violet);
    outline-offset: 2px;
}

.rider-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--lgb-ink-2);
}

.rider-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.rider-legend i {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: var(--lgb-violet);
}

.rider-legend i.rider-past {
    background: #A8A2B5;
}

/* Hausse, baisse */
.rider-delta {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.rider-delta .mud-icon-root {
    width: 13px;
    height: 13px;
}

.rider-delta--up {
    background: var(--lgb-green-soft);
    color: var(--lgb-green-ink);
}

.rider-delta--down {
    background: var(--lgb-red-soft);
    color: #9A0013;
}

.rider-delta--same {
    background: #EEEDF2;
    color: #4A4556;
}

/* ==========================================================================
   La fiche
   ========================================================================== */

.rider-sheet {
    container-type: inline-size;
    container-name: rider-sheet;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding-bottom: 16px;
}

.rider-sheet-empty {
    padding: 0.75rem;
    font-size: 0.85rem;
    color: var(--lgb-ink-2);
}

.rider-verdict {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 14px 18px 14px;
    border-radius: var(--lgb-radius);
    background: linear-gradient(150deg, #120B2E 0%, var(--lgb-night) 48%, var(--lgb-violet-deep) 100%);
    color: #FFFFFF;
}

.rider-verdict-top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rider-verdict-jersey {
    flex-shrink: 0;
    width: 84px;
    height: 84px;
    object-fit: contain;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.5));
}

.rider-verdict-identity {
    min-width: 0;
}

.rider-verdict-first {
    font-size: 14px;
    font-weight: 600;
}

.rider-verdict-name {
    margin: 0;
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 32px;
    line-height: 0.92;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.rider-verdict-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 12.5px;
    color: var(--lgb-lilac);
}

.rider-verdict-flag {
    flex-shrink: 0;
    width: 18px;
    height: 13px;
    object-fit: cover;
    border-radius: 2px;
}

.rider-stamp {
    align-self: flex-start;
    margin-left: 4px;
    padding: 3px 10px;
    border: 4px double var(--lgb-gold, #FFD400);
    border-radius: 3px;
    color: var(--lgb-gold, #FFD400);
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 24px;
    line-height: 1;
    text-transform: uppercase;
    transform: rotate(-5deg);
}

.rider-verdict-duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.rider-verdict-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: var(--lgb-radius);
    background: rgba(255, 255, 255, 0.1);
}

.rider-verdict-box b {
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 42px;
    line-height: 1;
    white-space: nowrap;
}

.rider-verdict-box span {
    font-size: 12.5px;
    line-height: 1.2;
    color: var(--lgb-lilac);
}

.rider-verdict-line {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.35;
}

/* Les chiffres de la saison */
.rider-season {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}

.rider-season-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
}

.rider-season-value {
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 32px;
    line-height: 1;
}

.rider-season-label {
    font-size: 12px;
    color: var(--tile-muted);
}

/* Le rendement face au peloton */
.rider-yield {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.rider-yield-value {
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 44px;
    line-height: 1;
}

.rider-bullet {
    position: relative;
    height: 16px;
    border-radius: 0 4px 4px 0;
    background: #F0EEF4;
}

.rider-bullet > i {
    display: block;
    height: 100%;
    border-radius: 0 4px 4px 0;
    background: var(--lgb-violet);
}

.rider-bullet > u {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 2px;
    background: var(--lgb-ink);
}

.rider-bullet-keys {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--tile-muted);
}

/* Sa cote */
.rider-cote {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rider-cote-row {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 90px;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
}

.rider-cote-name {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rider-cote-track {
    position: relative;
    height: 4px;
    border-radius: 2px;
    background: #E7E4EE;
}

.rider-cote-track i {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: 2px;
    background: var(--lgb-violet);
}

.rider-cote-track u {
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: var(--lgb-violet);
    box-shadow: 0 0 0 2px #FFFFFF;
}

.rider-cote-track u.rider-past {
    background: #A8A2B5;
}

.rider-cote-values {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px;
    font-size: 12px;
    font-weight: 400;
    color: var(--tile-muted);
    white-space: nowrap;
}

.rider-cote-values b {
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 17px;
    color: var(--tile-ink);
}

/* La course aux points */
.rider-chart {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

/* La grille d'étapes */
.rider-heat {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.rider-heat-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-height: 46px;
    border-radius: 5px;
    background: #F0EEF4;
    color: #6E6878;
}

.rider-heat-cell small {
    font-size: 9.5px;
    line-height: 1;
    opacity: 0.85;
}

.rider-heat-cell b {
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 19px;
    line-height: 1;
}

.rider-heat-cell--win { background: #FFD400; color: #2B2000; }
.rider-heat-cell--podium { background: var(--lgb-violet-deep); color: #FFFFFF; }
.rider-heat-cell--top10 { background: var(--lgb-violet); color: #FFFFFF; }
.rider-heat-cell--top20 { background: var(--lgb-lilac-2); color: var(--lgb-night); }
.rider-heat-cell--out { background: var(--lgb-red-soft); color: #9A0013; }
.rider-heat-cell--future { background: transparent; box-shadow: inset 0 0 0 1px var(--lgb-line); }

.rider-heat-keys {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 11.5px;
    color: var(--tile-muted);
}

.rider-heat-keys span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rider-heat-keys i {
    display: block;
    width: 11px;
    height: 11px;
    border-radius: 3px;
}

.rider-you {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
}

.rider-you b {
    font-weight: 700;
}

.rider-two {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

@container rider-sheet (min-width: 620px) {
    .rider-two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rider-verdict-jersey {
        width: 96px;
        height: 96px;
    }
}

/* ==========================================================================
   Le marché
   ========================================================================== */

.rider-market {
    container-type: inline-size;
    container-name: rider-market;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 4px 4px 16px 4px;
}

.rider-market-title {
    margin: 0;
    color: var(--lgb-ink);
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 22px;
    line-height: 1;
    text-transform: uppercase;
}

.rider-market-tools {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.rider-market-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.rider-market-filters .mud-input-control {
    flex: 1 1 100%;
    margin-top: 0;
}

.rider-market-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.rider-market-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.rider-market-chart {
    --tile-pad: 10px 8px 8px 8px;
}

.rider-market-chart svg {
    display: block;
    width: 100%;
    height: auto;
}

.rider-market-chart--wide {
    display: none;
}

.rider-market-point {
    cursor: pointer;
}

.rider-market-point:focus-visible {
    outline: 2px solid var(--lgb-violet);
}

.rider-market-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
    color: var(--lgb-ink-2);
}

.rider-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: -4px;
}

.rider-section-title {
    flex-shrink: 0;
    margin: 0;
    color: var(--lgb-ink);
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 22px;
    line-height: 1;
    text-transform: uppercase;
}

.rider-section-sub {
    min-width: 0;
    font-size: 12.5px;
    color: var(--lgb-ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rider-market-row {
    gap: 10px;
    padding: 7px 12px;
    min-height: 58px;
}

.rider-market-jersey {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.rider-market-share {
    flex: 0 0 44px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11.5px;
    color: var(--lgb-ink-2);
}

.rider-track {
    display: block;
    height: 6px;
    border-radius: 0 3px 3px 0;
    background: #F0EEF4;
    overflow: hidden;
}

.rider-track > span {
    display: block;
    height: 100%;
    border-radius: 0 3px 3px 0;
    background: var(--lgb-ink);
}

.rider-market-points {
    flex: 0 0 38px;
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 21px;
    line-height: 1;
    text-align: right;
}

.rider-market-points small {
    display: block;
    margin-top: 2px;
    font-family: 'LGB-Equip', sans-serif;
    font-weight: 400;
    font-size: 11px;
    color: var(--lgb-ink-2);
    text-transform: none;
}

.rider-flair {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.rider-flair div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    font-size: 12px;
}

.rider-flair b {
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 30px;
    line-height: 1;
}

@container rider-market (min-width: 760px) {
    .rider-market-chart--compact {
        display: none;
    }

    .rider-market-chart--wide {
        display: flex;
    }

    .rider-market-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.rider-market-filters .mud-input-control {
    flex: 1 1 100%;
    margin-top: 0;
}

.rider-market-grid {
        grid-template-columns: minmax(0, 1fr) 380px;
        gap: 16px;
    }

    .rider-market-filters .mud-input-control {
        flex: 0 1 300px;
    }

    .rider-market-tools {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
