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

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

.competition-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, TEST ET CONNEXION
======================================== */

.results-preview-banner,
.results-test-banner,
.results-login-message {
    display: flex;
    align-items: center;
    gap: 15px;

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

    border-radius: 15px;
}

.results-preview-banner {
    border: 1px solid rgba(250, 204, 21, 0.28);
    background: rgba(250, 204, 21, 0.08);
}

.results-test-banner {
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: rgba(56, 189, 248, 0.09);
}

.results-login-message {
    border: 1px solid rgba(59, 130, 246, 0.25);
    background: rgba(59, 130, 246, 0.09);
}

.results-preview-banner > span,
.results-test-banner > span,
.results-login-message > i {
    font-size: 1.25rem;
}

.results-preview-banner > span {
    color: #fde047;
}

.results-test-banner > span {
    color: #7dd3fc;
}

.results-login-message > i {
    color: #93c5fd;
}

.results-preview-banner > div,
.results-test-banner > div,
.results-login-message > div {
    flex: 1;
}

.results-preview-banner p,
.results-test-banner p,
.results-login-message p {
    margin-top: 3px;

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

.results-preview-banner a,
.results-test-banner a,
.results-login-message a {
    display: inline-flex;
    align-items: center;
    gap: 7px;

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

/* ========================================
   BANDEAU PRINCIPAL
======================================== */

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

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

.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;
    border-radius: 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));
}

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

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

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

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

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

/* ========================================
   NAVIGATION EN DEUX BLOCS
======================================== */

.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,
.competition-hub-link-disabled {
    min-height: 42px;

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

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

    color: #cbd5e1;

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

    transition: 0.2s ease;
}

.competition-hub-links a {
    background: rgba(255, 255, 255, 0.035);
}

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

.competition-hub-link-disabled {
    opacity: 0.48;
    cursor: not-allowed;

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

.competition-hub-link-disabled small {
    padding: 3px 6px;
    border-radius: 999px;

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

    font-size: 0.58rem;
    text-transform: uppercase;
}

/* ========================================
   CARROUSEL DES JOURNÉES
======================================== */

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

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

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

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

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

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

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

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

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

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

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

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

.results-matchday-arrow-left {
    left: -18px;
}

.results-matchday-arrow-right {
    right: -18px;
}

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

/* ========================================
   CARTES DE RÉSUMÉ
======================================== */

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

    margin: 16px 0 28px;
}

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

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

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

.results-summary small {
    color: #94a3b8;

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

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

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

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

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

.results-day-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    margin-top: 8px;
}

.results-day-breakdown span {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 6px 9px;
    border-radius: 999px;

    background: rgba(var(--competition-primary-rgb), 0.09);
    color: #cbd5e1;

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

.results-day-breakdown strong {
    color: var(--competition-primary);
}

/* ========================================
   CONTENU
======================================== */

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

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

    margin: 24px 0 19px;
}

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

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

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

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

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

.result-match-card {
    overflow: hidden;

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

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

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

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

.result-finished-badge {
    margin-left: auto;

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

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

    padding: 20px 21px;
}

.result-team {
    min-width: 0;

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

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

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

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

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

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

.result-team small {
    margin-top: 3px;

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

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

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

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

    background: #ffffff;
}

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

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

.result-real-score {
    min-width: 0;
    text-align: center;
}

.result-real-score small {
    display: block;

    margin-bottom: 7px;

    color: #94a3b8;

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

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

.result-real-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;
}

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

/* ========================================
   LIGNE DU PRONOSTIC
======================================== */

.result-prediction-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 14px 20px;

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

.result-prediction-score {
    display: flex;
    align-items: center;
    gap: 13px;
}

.result-prediction-score > span {
    color: #94a3b8;
    font-size: 0.8rem;
}

.result-prediction-score > strong {
    font-size: 1.05rem;
}

.result-prediction-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    padding: 8px 11px;
    border-radius: 999px;

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

.result-prediction-status strong {
    margin-left: 3px;
}

.result-prediction-row.exact .result-prediction-status {
    background: rgba(var(--competition-primary-rgb), 0.12);
    color: var(--competition-primary);
}

.result-prediction-row.good .result-prediction-status {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
}

.result-prediction-row.wrong .result-prediction-status {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}

.result-prediction-row.waiting .result-prediction-status {
    background: rgba(250, 204, 21, 0.12);
    color: #fde68a;
}

.result-prediction-row.missing .result-prediction-status {
    background: rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
}

/* ========================================
   ÉTATS VIDES
======================================== */

.results-empty-state {
    padding: 48px 25px;

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

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

    text-align: center;
}

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

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

.results-empty-state h1,
.results-empty-state h2 {
    margin-bottom: 9px;
}

.results-empty-state p {
    max-width: 620px;

    margin: 0 auto;

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

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

/* ========================================
   RESPONSIVE TABLETTE
======================================== */

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

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

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

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

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

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

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

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

/* ========================================
   RESPONSIVE MOBILE
======================================== */

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

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

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

    .results-preview-banner,
    .results-test-banner,
    .results-login-message {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .results-preview-banner a,
    .results-test-banner a,
    .results-login-message a {
        width: 100%;
        margin-left: 31px;
    }

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

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

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

    .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,
    .competition-hub-link-disabled {
        justify-content: flex-start;
    }

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

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

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

        padding: 13px 14px;
    }

    .result-finished-badge {
        margin-left: 0;
    }

    /*
     * Même structure que les pages Calendrier et Pronostics :
     * équipe domicile, score final, équipe extérieure.
     */
    .result-match-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;
    }

    .result-team,
    .result-team.home,
    .result-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;
    }

    .result-team.home {
        grid-row: 1;
    }

    .result-real-score {
        grid-row: 2;

        width: 140px;
        margin: 0 auto;
        padding: 0;

        border: 0;
    }

    .result-team.away {
        grid-row: 3;
    }

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

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

        border-radius: 15px;
    }

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

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

        text-align: left;
    }

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

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

    .result-prediction-row {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;

        padding: 14px;
    }

    .result-prediction-score {
        justify-content: space-between;
    }

    .result-prediction-status {
        width: 100%;
        justify-content: center;
    }
}

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

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

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

    .result-real-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;
}

