/* Le Peloton, côté Teams UCI : le mur des maillots, le mercato et la fiche d'écurie. S'appuie sur lgb-tiles.css et lgb-riders.css. */

.uci-teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.uci-teams-column,
.uci-teams-sheet {
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

/* La fiche ne se lit à côté de la liste qu'au bureau */
.uci-teams-sheet {
    display: none;
}

.uci-teams-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 4px 4px 16px 4px;
}

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

.uci-teams-season {
    flex: 0 0 auto;
    max-width: 180px;
}

.uci-teams-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    min-width: 0;
}

/* Le bandeau de nuit, commun au sponsor et au transfert de l'hiver */
.uci-sponsor,
.uci-deal {
    border-radius: var(--lgb-radius);
    background: linear-gradient(150deg, #120B2E 0%, var(--lgb-night) 48%, var(--lgb-violet-deep) 100%);
    color: #FFFFFF;
}

/* Ton sponsor officiel */
.uci-sponsor {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    border: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

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

.uci-sponsor img {
    flex-shrink: 0;
    width: 104px;
    height: 104px;
    object-fit: contain;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.5));
}

.uci-sponsor-kicker {
    font-size: 12.5px;
    color: var(--lgb-lilac);
}

.uci-sponsor-name {
    margin: 1px 0 3px 0;
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 30px;
    line-height: 0.94;
    text-transform: uppercase;
}

.uci-sponsor-line {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.3;
}

.uci-sponsor-line b {
    color: var(--lgb-gold, #FFD400);
    font-weight: 700;
}

/* Le mur : une mosaïque carrée, les positions sont en pourcentage */
.uci-wall {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.uci-brick {
    position: absolute;
    container-type: size;
    padding: 0;
    border: 1px solid var(--lgb-page);
    border-radius: 6px;
    overflow: hidden;
    font: inherit;
}

button.uci-brick {
    cursor: pointer;
}

.uci-brick:focus-visible {
    outline: 3px solid var(--lgb-ink);
    outline-offset: -3px;
}

.uci-brick--on {
    outline: 3px solid var(--lgb-ink);
    outline-offset: -3px;
}

.uci-brick-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 100%;
    height: 100%;
    min-width: 0;
}

.uci-brick-inner img {
    display: block;
    width: 56cqmin;
    height: 56cqmin;
    max-width: 92px;
    max-height: 92px;
    object-fit: contain;
}

.uci-brick-inner b {
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    line-height: 1;
}

.uci-brick-inner small {
    max-width: 96%;
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Lignes de liste */
.uci-row {
    gap: 8px;
    padding: 7px 12px;
    min-height: 60px;
}

.uci-row--on {
    background-color: var(--lgb-lilac-soft);
}

.uci-row-rank {
    width: 1.5rem;
    flex-shrink: 0;
    text-align: center;
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 1.05rem;
    color: var(--lgb-ink-2);
}

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

.uci-row-bar {
    display: block;
    height: 5px;
    margin-top: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--lgb-violet);
}

.uci-row-points {
    flex-shrink: 0;
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 21px;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
}

.uci-row-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;
}

.uci-tag {
    flex-shrink: 0;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--lgb-gold-soft);
    color: #5C4A00;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

/* Le transfert de l'hiver */
.uci-deal {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
}

.uci-deal-kicker {
    font-size: 12.5px;
    color: var(--lgb-lilac);
}

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

.uci-deal-way {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
}

.uci-deal-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 0;
    font-size: 12.5px;
    text-align: center;
}

.uci-deal-side img {
    width: 84px;
    height: 84px;
    object-fit: contain;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45));
}

.uci-deal-side--from img {
    opacity: 0.55;
    filter: grayscale(0.6);
}

.uci-deal-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--lgb-gold, #FFD400);
}

.uci-deal-arrow b {
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 34px;
    line-height: 1;
}

.uci-deal-arrow span {
    font-size: 11.5px;
    color: var(--lgb-lilac);
    white-space: nowrap;
}

/* Qui a bien fait ses courses : bilan de part et d'autre de zéro */
.uci-balance {
    display: flex;
    flex-direction: column;
}

.uci-balance-row {
    display: grid;
    grid-template-columns: 30px 112px minmax(0, 1fr) minmax(0, 1fr) 44px;
    align-items: center;
    gap: 4px;
    min-height: 38px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.uci-balance-row + .uci-balance-row {
    border-top: 1px solid var(--lgb-line);
}

.uci-balance-row img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.uci-balance-name {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.uci-balance-minus {
    display: flex;
    justify-content: flex-end;
    height: 14px;
    border-right: 1px solid #C9C5D2;
}

.uci-balance-plus {
    display: flex;
    height: 14px;
}

.uci-balance-minus i {
    display: block;
    height: 100%;
    border-radius: 3px 0 0 3px;
    background: var(--lgb-red);
}

.uci-balance-plus i {
    display: block;
    height: 100%;
    border-radius: 0 3px 3px 0;
    background: var(--lgb-violet);
}

.uci-balance-value {
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 17px;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
}

/* Un transfert : l'ancien maillot, la flèche, le nouveau */
.uci-move {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.uci-move img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.uci-move .uci-move-from {
    opacity: 0.55;
}

.uci-move-none {
    width: 28px;
    height: 28px;
}

.uci-move .mud-icon-root {
    width: 14px;
    height: 14px;
    color: var(--lgb-ink-2);
}

.uci-more {
    width: 100%;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: var(--lgb-violet);
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
}

/* La fiche : le haut reprend le bandeau de la fiche d'un coureur (lgb-riders.css) */
.uci-team-page .rider-sheet {
    padding-inline: 4px;
}

.rider-sheet-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.uci-sheet-nav {
    display: flex;
    flex-shrink: 0;
    margin-left: auto;
    color: #FFFFFF;
}

.uci-sheet-nav .mud-icon-button {
    color: inherit;
}

/* Qui on regarde */
.uci-attention {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.uci-attention-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.uci-attention-row span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.uci-attention-row i {
    display: block;
    height: 10px;
    border-radius: 0 3px 3px 0;
    background: #A8A2B5;
}

.uci-attention-row b {
    font-family: 'LGB-Garaje', sans-serif;
    font-weight: 900;
    font-size: 17px;
    text-align: right;
}

.uci-attention-row--on {
    font-weight: 700;
}

.uci-attention-row--on i {
    background: var(--lgb-violet);
}

@media (min-width: 1280px) {
    .uci-teams {
        grid-template-columns: 460px minmax(0, 1fr);
        gap: 16px;
    }

    .uci-teams-sheet {
        display: block;
    }
}
