/* ========================================
   RÉSULTATS SPORTIFS MULTI-COMPÉTITIONS
======================================== */

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

.competition-match-results-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 */

.match-results-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);
}

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

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

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

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

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

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

/* BANDEAU */

.match-results-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);
}

.match-results-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%;
}

.match-results-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));
}

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

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

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

.match-results-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);
}

/* CARROUSEL */

.match-results-day-carousel {
    position: relative;
    margin-bottom: 17px;
}

.match-results-day-tabs {
    display: flex;
    gap: 9px;

    padding: 3px 52px 14px 2px;
    overflow-x: auto;

    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.match-results-day-tabs a {
    min-width: 124px;

    display: flex;
    flex-direction: column;
    gap: 4px;

    padding: 11px 14px;

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

    background: #0f172a;
    color: #ffffff;

    text-decoration: none;
    white-space: nowrap;

    scroll-snap-align: start;
    transition: 0.2s ease;
}

.match-results-day-tabs a:hover,
.match-results-day-tabs a.active {
    border-color: rgba(var(--competition-primary-rgb), 0.42);

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

.match-results-day-tabs small {
    color: #94a3b8;
    font-size: 0.72rem;
}

.match-results-day-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;

    width: 42px;
    height: 42px;

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

    padding: 0;

    border: 1px solid rgba(var(--competition-primary-rgb), 0.28);
    border-radius: 50%;

    background: rgba(15, 23, 42, 0.97);
    color: var(--competition-primary);

    box-shadow:
        0 9px 24px rgba(0, 0, 0, 0.34),
        0 0 0 5px rgba(15, 23, 42, 0.72);

    font: inherit;
    cursor: pointer;

    transform: translateY(-62%);
    transition: 0.2s ease;
}

.match-results-day-arrow:hover {
    border-color: rgba(var(--competition-primary-rgb), 0.55);

    background: var(--competition-primary);
    color: #07111f;

    transform: translateY(-62%) scale(1.06);
}

.match-results-day-arrow-left {
    left: -18px;
}

.match-results-day-arrow-right {
    right: -18px;
}

.match-results-day-arrow[hidden] {
    display: none !important;
}

/* RÉSUMÉ */

.match-results-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;

    margin: 16px 0 28px;
}

.match-results-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);
}

.match-results-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);
}

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

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

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

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

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

.match-results-summary p {
    margin-top: 3px;

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

/* CONTENU */

.match-results-content {
    scroll-margin-top: 125px;
}

.match-results-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    margin: 24px 0 19px;
}

.match-results-section-heading .section-subtitle {
    color: var(--competition-primary);
}

.match-results-section-heading h2 {
    margin-top: 4px;

    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.match-results-section-heading > span {
    padding: 8px 13px;
    border-radius: 999px;

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

    font-size: 0.84rem;
    font-weight: 800;
}

.match-results-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.match-results-card {
    overflow: hidden;

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

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

.match-results-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px 17px;

    padding: 13px 20px;

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

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

.match-results-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.match-results-finished {
    margin-left: auto;

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

.match-results-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
    align-items: center;
    gap: 20px;

    padding: 20px 21px;
}

.match-results-team {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 13px;
}

.match-results-team.home {
    justify-content: flex-end;
    text-align: right;
}

.match-results-team.away {
    justify-content: flex-start;
    text-align: left;
}

.match-results-team > div:not(.match-results-team-logo) {
    min-width: 0;
}

.match-results-team strong,
.match-results-team small {
    display: block;
}

.match-results-team strong {
    font-size: 0.98rem;
    line-height: 1.25;
}

.match-results-team small {
    margin-top: 3px;

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

.match-results-team-logo {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;

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

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

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

.match-results-team-logo span {
    color: #0f172a;
    font-size: 0.72rem;
    font-weight: 900;
}

.match-results-score {
    min-width: 0;
    text-align: center;
}

.match-results-score small {
    display: block;

    margin-bottom: 7px;

    color: #94a3b8;

    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.match-results-score strong {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.match-results-score strong span {
    min-width: 44px;

    padding: 9px 11px;

    border: 1px solid rgba(var(--competition-primary-rgb), 0.25);
    border-radius: 12px;

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

    font-size: 1.4rem;
}

.match-results-score em {
    color: #64748b;
    font-style: normal;
    font-size: 1.15rem;
}

/* ÉTATS VIDES */

.match-results-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;
}

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

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

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

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

.match-results-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;
}

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

/* RESPONSIVE */

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

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

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

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

    .match-results-day-arrow {
        display: none !important;
    }

    .match-results-day-tabs {
        padding-right: 2px;
        padding-left: 2px;
    }

    .match-results-main {
        grid-template-columns: minmax(0, 1fr) 126px minmax(0, 1fr);
        gap: 12px;
    }

    .match-results-team-logo {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }
}

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

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

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

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

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

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

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

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

    .match-results-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;
    }

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

    .match-results-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .match-results-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;

        padding: 13px 14px;
    }

    .match-results-finished {
        margin-left: 0;
    }

    .match-results-main {
        width: 100%;

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

        padding: 17px 14px;
    }

    .match-results-team,
    .match-results-team.home,
    .match-results-team.away {
        width: 100%;
        min-width: 0;

        display: grid;
        grid-template-columns: 60px minmax(0, 1fr);
        grid-template-rows: 60px;
        align-items: center;
        justify-content: start;
        column-gap: 14px;

        text-align: left;
    }

    .match-results-team.home {
        grid-row: 1;
    }

    .match-results-score {
        grid-row: 2;

        width: 140px;
        margin: 0 auto;
    }

    .match-results-team.away {
        grid-row: 3;
    }

    .match-results-team .match-results-team-logo {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;

        width: 60px;
        height: 60px;
        margin: 0;

        border-radius: 15px;
    }

    .match-results-team > div:not(.match-results-team-logo) {
        grid-column: 2;
        grid-row: 1;
        justify-self: start;

        width: 100%;
        min-width: 0;
        margin: 0;

        text-align: left;
    }

    .match-results-team strong {
        font-size: 1rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .match-results-team small {
        display: block;
        margin-top: 4px;
        font-size: 0.82rem;
    }
}

@media screen and (max-width: 390px) {
    .match-results-team,
    .match-results-team.home,
    .match-results-team.away {
        grid-template-columns: 54px minmax(0, 1fr);
        grid-template-rows: 54px;
        column-gap: 12px;
    }

    .match-results-team .match-results-team-logo {
        width: 54px;
        height: 54px;
    }

    .match-results-team strong {
        font-size: 0.94rem;
    }

    .match-results-score strong span {
        min-width: 40px;
        padding: 9px 10px;
    }
}

/* ========================================
   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;
}

