/* ========================================
   CLASSEMENT SPORTIF MULTI-COMPÉTITIONS
======================================== */

.competition-standings-page,
.competition-standings-page * {
    box-sizing: border-box;
}

.competition-standings-page {
    --competition-primary: #a3e635;
    --competition-primary-rgb: 163, 230, 53;
    --competition-secondary: #0f172a;
    --competition-secondary-rgb: 15, 23, 42;
    --competition-banner-image: none;

    width: min(92%, 1280px);
    margin: 26px auto 80px;

    color: #ffffff;
}

/* APERÇU ADMIN */

.standings-admin-preview {
    display: flex;
    align-items: center;
    gap: 15px;

    padding: 15px 17px;
    margin-bottom: 18px;

    border: 1px solid rgba(250, 204, 21, 0.28);
    border-radius: 15px;

    background: rgba(250, 204, 21, 0.08);
}

.standings-admin-preview > span {
    color: #fde047;
    font-size: 1.25rem;
}

.standings-admin-preview > div {
    flex: 1;
}

.standings-admin-preview p {
    margin-top: 3px;

    color: #fde68a;
    font-size: 0.86rem;
}

.standings-admin-preview a {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: var(--competition-primary);
    font-weight: 800;
    text-decoration: none;
}

/* BANDEAU */

.standings-hero {
    position: relative;

    min-height: 205px;
    display: flex;
    align-items: center;

    padding: 30px 34px;
    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;

    background-image:
        linear-gradient(
            135deg,
            rgba(var(--competition-secondary-rgb), 0.88),
            rgba(2, 6, 23, 0.78)
        ),
        var(--competition-banner-image),
        linear-gradient(
            135deg,
            var(--competition-secondary),
            #020617
        );

    background-size: auto, cover, auto;
    background-position: center;

    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

.standings-hero::after {
    content: "";

    position: absolute;
    right: -95px;
    bottom: -150px;

    width: 250px;
    height: 250px;

    border: 42px solid rgba(var(--competition-primary-rgb), 0.045);
    border-radius: 50%;
}

.standings-hero-content {
    position: relative;
    z-index: 1;

    min-width: 0;
    display: flex;
    align-items: center;
    gap: 24px;
}

.competition-theme-page-logo {
    width: 96px;
    height: 96px;
    flex: 0 0 96px;

    display: grid;
    place-items: center;
    overflow: visible;

    border: 0;
    background: transparent;
    color: var(--competition-primary);

    font-size: 2rem;
}

.competition-theme-page-logo img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

.standings-hero .section-subtitle {
    color: var(--competition-primary);
}

.standings-hero h1 {
    margin: 5px 0 8px;

    font-size: clamp(2.3rem, 4vw, 3.8rem);
    line-height: 0.98;
}

.standings-hero-subtitle {
    max-width: 690px;

    color: #cbd5e1;
    font-weight: 650;
    line-height: 1.55;
}

/* NAVIGATION */

.competition-hub-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;

    margin: 18px 0;
}

.competition-hub-group {
    min-width: 0;
    padding: 16px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;

    background: rgba(15, 23, 42, 0.86);
}

.competition-hub-group-heading {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 13px;
}

.competition-hub-group-heading > span {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    background: rgba(var(--competition-primary-rgb), 0.1);
    color: var(--competition-primary);
}

.competition-hub-group-heading small,
.competition-hub-group-heading strong {
    display: block;
}

.competition-hub-group-heading small {
    color: var(--competition-primary);

    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.competition-hub-group-heading strong {
    margin-top: 2px;

    color: #f8fafc;
    font-size: 0.88rem;
}

.competition-hub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.competition-hub-links a {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 9px 12px;
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.035);
    color: #cbd5e1;

    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;

    transition: 0.2s ease;
}

.competition-hub-links a:hover,
.competition-hub-links a.active {
    color: var(--competition-primary);
    background: rgba(var(--competition-primary-rgb), 0.12);
}

/* RÉSUMÉ */

.standings-summary {
    display: grid;
    grid-template-columns: 1.15fr 0.9fr 0.9fr;
    gap: 12px;

    margin: 16px 0 28px;
}

.standings-summary article {
    min-width: 0;
    min-height: 112px;

    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;

    padding: 15px 18px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 17px;

    background: linear-gradient(145deg, #0f172a, #111827);
}

.standings-summary-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 13px;

    background: rgba(var(--competition-primary-rgb), 0.1);
    color: var(--competition-primary);
}

.standings-summary small,
.standings-summary strong,
.standings-summary p {
    display: block;
}

.standings-summary article > div > small {
    color: #94a3b8;

    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.07em;
}

.standings-summary article > div > strong {
    margin-top: 4px;

    color: #f8fafc;
    font-size: 1.18rem;
}

.standings-summary p {
    margin-top: 3px;

    color: #94a3b8;
    font-size: 0.76rem;
}

.standings-leader {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-top: 6px;
}

.standings-leader-logo {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    border-radius: 10px;
    background: #ffffff;
}

.standings-leader-logo img {
    width: 78%;
    height: 78%;
    object-fit: contain;
}

.standings-leader-logo > span {
    color: #0f172a;
    font-size: 0.62rem;
    font-weight: 900;
}

/* TABLEAU */

.standings-table-card {
    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;

    background: #0f172a;
}

.standings-table-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;

    padding: 24px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.standings-table-heading .section-subtitle {
    color: var(--competition-primary);
}

.standings-table-heading h2 {
    margin-top: 4px;
}

.standings-table-heading > p {
    max-width: 460px;

    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.5;
}

.standings-table-wrapper {
    overflow-x: auto;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
}

.standings-table th,
.standings-table td {
    padding: 14px 13px;

    text-align: center;
    white-space: nowrap;
}

.standings-table th {
    background: rgba(255, 255, 255, 0.025);
    color: #94a3b8;

    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.standings-table th:nth-child(2),
.standings-table td:nth-child(2) {
    text-align: left;
}

.standings-table tbody tr {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.standings-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

.standings-position {
    width: 36px;
    height: 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.05);

    font-weight: 900;
}

.standings-table tbody tr:first-child .standings-position {
    background: rgba(var(--competition-primary-rgb), 0.13);
    color: var(--competition-primary);
}

.standings-team-cell {
    display: flex;
    align-items: center;
    gap: 11px;
}

.standings-team-logo {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    border-radius: 11px;
    background: #ffffff;
}

.standings-team-logo img {
    width: 78%;
    height: 78%;
    object-fit: contain;
}

.standings-team-logo > span {
    color: #0f172a;
    font-size: 0.62rem;
    font-weight: 900;
}

.standings-team-cell strong,
.standings-team-cell small {
    display: block;
}

.standings-team-cell small {
    margin-top: 3px;
    color: #64748b;
}

.standings-points {
    color: var(--competition-primary);
    font-size: 1.05rem;
}

.standings-mobile-list {
    display: none;
}

/* NOTE DISCIPLINAIRE */

.standings-fair-play-note {
    display: flex;
    align-items: flex-start;
    gap: 11px;

    padding: 14px 16px;
    margin-top: 16px;

    border: 1px solid rgba(250, 204, 21, 0.2);
    border-radius: 14px;

    background: rgba(250, 204, 21, 0.07);
    color: #fde68a;

    font-size: 0.8rem;
    line-height: 1.5;
}

/* ÉTATS VIDES */

.standings-empty-state {
    padding: 52px 25px;

    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 20px;

    background: rgba(15, 23, 42, 0.7);

    text-align: center;
}

.standings-empty-state > i {
    margin-bottom: 15px;

    color: var(--competition-primary);
    font-size: 2.3rem;
}

.standings-empty-state p {
    max-width: 620px;
    margin: 8px auto 0;

    color: #94a3b8;
    line-height: 1.6;
}

.standings-empty-state a {
    display: inline-flex;

    margin-top: 19px;
    padding: 10px 15px;

    border-radius: 11px;

    background: var(--competition-primary);
    color: #17210a;

    font-weight: 900;
    text-decoration: none;
}

.standings-not-found {
    margin-top: 140px;
}

/* RESPONSIVE */

@media screen and (max-width: 1000px) {
    .competition-hub-navigation {
        grid-template-columns: 1fr;
    }

    .standings-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .standings-summary article:last-child {
        grid-column: 1 / -1;
    }
}

@media screen and (max-width: 900px) {
    .competition-standings-page {
        width: 94%;
        margin-top: 24px;
    }

    .standings-table-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media screen and (max-width: 720px) {
    .standings-summary {
        grid-template-columns: 1fr;
    }

    .standings-summary article:last-child {
        grid-column: auto;
    }
}

@media screen and (max-width: 650px) {
    .competition-standings-page {
        margin-top: 20px;
        margin-bottom: 55px;
    }

    .standings-admin-preview {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .standings-admin-preview a {
        width: 100%;
        margin-left: 31px;
    }

    .standings-hero {
        min-height: 180px;
        padding: 22px 18px;
        border-radius: 19px;
    }

    .standings-hero-content {
        align-items: flex-start;
        gap: 14px;
    }

    .competition-theme-page-logo {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
    }

    .standings-hero-subtitle {
        font-size: 0.87rem;
    }

    .competition-hub-group {
        padding: 14px;
    }

    .competition-hub-links {
        display: grid;
        grid-template-columns: 1fr;
    }

    .competition-hub-links a {
        justify-content: flex-start;
    }

    .standings-summary article {
        min-height: 0;
        padding: 14px;
    }

    .standings-table-wrapper {
        display: none;
    }

    .standings-mobile-list {
        display: flex;
        flex-direction: column;
        gap: 10px;

        padding: 12px;
    }

    .standings-mobile-card {
        padding: 13px;

        border: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 15px;

        background: rgba(255, 255, 255, 0.025);
    }

    .standings-mobile-card header {
        display: grid;
        grid-template-columns: 36px 46px minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
    }

    .standings-mobile-card .standings-team-logo {
        width: 46px;
        height: 46px;
    }

    .standings-mobile-card header > div {
        min-width: 0;
    }

    .standings-mobile-card header > div strong,
    .standings-mobile-card header > div small {
        display: block;
    }

    .standings-mobile-card header > div strong {
        overflow: hidden;

        text-overflow: ellipsis;
        white-space: nowrap;

        font-size: 0.93rem;
    }

    .standings-mobile-card header > div small {
        margin-top: 3px;

        color: #64748b;
        font-size: 0.72rem;
    }

    .standings-mobile-points {
        color: var(--competition-primary);
        font-size: 1.12rem;
        text-align: right;
    }

    .standings-mobile-points small {
        display: block;
        color: #94a3b8;
        font-size: 0.62rem;
    }

    .standings-mobile-stats {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 7px;

        margin-top: 12px;
    }

    .standings-mobile-stats span {
        padding: 8px 5px;

        border-radius: 10px;

        background: rgba(255, 255, 255, 0.035);

        text-align: center;
    }

    .standings-mobile-stats small,
    .standings-mobile-stats strong {
        display: block;
    }

    .standings-mobile-stats small {
        color: #64748b;
        font-size: 0.61rem;
        font-weight: 800;
    }

    .standings-mobile-stats strong {
        margin-top: 4px;
        font-size: 0.78rem;
    }
}

@media screen and (max-width: 390px) {
    .standings-mobile-card header {
        grid-template-columns: 34px 42px minmax(0, 1fr) auto;
        gap: 8px;
    }

    .standings-mobile-card .standings-team-logo {
        width: 42px;
        height: 42px;
    }

    .standings-mobile-stats {
        gap: 5px;
    }
}

/* ========================================
   NAVIGATION COMPÉTITION REPLIABLE SUR MOBILE
======================================== */

.competition-hub-mobile-toggle {
    width: 100%;

    padding: 0;
    border: 0;

    background: transparent;
    color: inherit;

    font: inherit;
    text-align: left;
}

.competition-hub-group
    > .competition-hub-mobile-toggle {
    cursor: default;
}

.competition-hub-mobile-chevron {
    display: none;
}

.competition-hub-mobile-toggle:focus-visible {
    outline: 3px solid rgba(
        var(--competition-primary-rgb),
        0.22
    );

    outline-offset: -3px;
}

@media screen and (max-width: 650px) {

    .competition-hub-navigation {
        gap: 10px;
        margin: 14px 0;
    }

    .competition-hub-group {
        padding: 0 !important;
        overflow: hidden;

        border-radius: 15px;
    }

    .competition-hub-group
        > .competition-hub-mobile-toggle {
        min-height: 72px;

        display: grid;
        grid-template-columns:
            38px
            minmax(0, 1fr)
            24px;
        align-items: center;
        gap: 11px;

        padding: 12px 13px;
        margin: 0;

        cursor: pointer;
    }

    .competition-hub-group
        > .competition-hub-mobile-toggle
        > span {
        width: 38px;
        height: 38px;
        flex-basis: 38px;

        border-radius: 11px;
    }

    .competition-hub-mobile-toggle small {
        font-size: 0.62rem;
    }

    .competition-hub-mobile-toggle strong {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .competition-hub-mobile-chevron {
        display: inline-block;
        justify-self: end;

        color: var(--competition-primary);
        font-size: 0.74rem;

        transition: transform 0.2s ease;
    }

    .competition-hub-group
        > .competition-hub-links {
        display: none !important;

        grid-template-columns: 1fr;

        padding: 0 12px 12px;
    }

    .competition-hub-group.is-mobile-open
        > .competition-hub-links {
        display: grid !important;
    }

    .competition-hub-group.is-mobile-open
        .competition-hub-mobile-chevron {
        transform: rotate(180deg);
    }

    .competition-hub-group
        > .competition-hub-links
        a,
    .competition-hub-group
        > .competition-hub-links
        .competition-hub-link-disabled {
        width: 100%;
        justify-content: flex-start;
    }
}

@media screen and (min-width: 651px) {

    .competition-hub-mobile-chevron {
        display: none !important;
    }
}

/* ========================================
   LIENS VERS LES FICHES ÉQUIPES
======================================== */

.team-profile-link,
.team-profile-card-link {
    color: inherit;
    text-decoration: none;
}

.team-profile-link {
    border-radius: 12px;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.team-profile-link:hover,
.team-profile-link:focus-visible {
    color: var(--competition-primary);
}

.team-profile-link:hover {
    transform: translateY(-2px);
}

.team-profile-link:focus-visible,
.team-profile-card-link:focus-visible {
    outline: 3px solid rgba(
        var(--competition-primary-rgb),
        0.24
    );

    outline-offset: 3px;
}


.standings-team-cell.team-profile-link,
.standings-leader.team-profile-link {
    width: fit-content;
}

.standings-mobile-card.team-profile-card-link {
    display: block;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.standings-mobile-card.team-profile-card-link:hover {
    border-color: rgba(
        var(--competition-primary-rgb),
        0.34
    );

    background: rgba(
        var(--competition-primary-rgb),
        0.06
    );

    transform: translateY(-2px);
}

