/* ======================================================
   PAGE RÉSULTATS
   Alignée sur le langage visuel classique du thème
====================================================== */

.results-page {
    background: linear-gradient(180deg, #f7faf8 0%, #ffffff 100%);
}

/* ======================================================
   HERO
====================================================== */

.results-hero {
    position: relative;
    padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(2.75rem, 5vw, 4rem);
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 20%, rgba(0, 168, 84, 0.15), transparent 34%),
        linear-gradient(135deg, #08140f 0%, #0d261a 58%, #07331e 100%);
    color: var(--color-white);
}

.results-hero::after {
    content: "";
    position: absolute;
    right: -110px;
    bottom: -175px;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(0, 168, 84, 0.15);
    border-radius: 50%;
    box-shadow:
        0 0 0 44px rgba(0, 168, 84, 0.035),
        0 0 0 88px rgba(0, 168, 84, 0.02);
    pointer-events: none;
}

.results-hero__inner {
    position: relative;
    z-index: 1;
}

.results-kicker {
    margin: 0 0 0.7rem;
    color: var(--color-primary);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.results-hero h1 {
    margin: 0;
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: clamp(3.6rem, 7vw, 6.5rem);
    line-height: 0.92;
    text-transform: uppercase;
}

.results-hero h1::after {
    content: "";
    display: block;
    width: 54px;
    height: 3px;
    margin-top: 0.85rem;
    background: var(--color-primary);
}

.results-hero__inner > p:last-child {
    max-width: 680px;
    margin: 1.3rem 0 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 1rem;
    line-height: 1.7;
}

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

.results-dashboard {
    padding: clamp(3rem, 6vw, 5rem) 0 clamp(4rem, 7vw, 6rem);
}

/* ======================================================
   SYNTHÈSE ET NAVIGATION DU WEEK-END
====================================================== */

.results-week-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
    padding: clamp(1.4rem, 3vw, 2.25rem);
    border: 1px solid rgba(0, 0, 0, 0.075);
    border-radius: 14px;
    background: var(--color-white);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.055);
}

.results-week-overview h2 {
    margin: 0;
    color: var(--color-black);
    font-family: var(--font-heading);
    font-size: clamp(2.1rem, 4.2vw, 3.7rem);
    line-height: 1;
    text-transform: uppercase;
}

.results-week-overview h2::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    margin-top: 0.65rem;
    background: var(--color-primary);
}

.results-week-balance {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-top: 1.15rem;
}

.results-week-balance__intro {
    display: flex;
    flex-direction: column;
    gap: 0.24rem;
}

.results-week-balance__intro strong {
    color: var(--color-black);
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    line-height: 1.2;
}

.results-week-balance__intro span {
    color: var(--color-muted);
    font-size: 0.92rem;
}

.results-week-balance__rate {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.results-week-balance__rate strong {
    color: var(--color-primary-dark);
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 2.75rem);
    line-height: 0.85;
}

.results-week-balance__rate span {
    margin-top: 0.35rem;
    color: var(--color-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(78px, 1fr));
    max-width: 560px;
    margin-top: 1.35rem;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.075);
    border-radius: 10px;
    background: #f8faf9;
}

.results-summary.has-upcoming {
    grid-template-columns: repeat(4, minmax(78px, 1fr));
}

.results-summary__item {
    position: relative;
    display: flex;
    min-height: 82px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.8rem 0.65rem;
    text-align: center;
}

.results-summary__item + .results-summary__item {
    border-left: 1px solid rgba(0, 0, 0, 0.07);
}

.results-summary__item::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: #89938e;
}

.results-summary__item strong {
    color: var(--color-black);
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.2vw, 2.8rem);
    line-height: 0.85;
}

.results-summary__item span {
    color: #56615c;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.results-summary__item.is-win::before { background: var(--color-primary); }
.results-summary__item.is-draw::before { background: #c99719; }
.results-summary__item.is-loss::before { background: #cc4b4b; }
.results-summary__item.is-upcoming::before { background: #397ca5; }
.results-summary__item.is-win strong { color: var(--color-primary-dark); }
.results-summary__item.is-draw strong { color: #8a650d; }
.results-summary__item.is-loss strong { color: #a33b3b; }
.results-summary__item.is-upcoming strong { color: #276a94; }

.results-week-overview__controls {
    padding-left: clamp(1.25rem, 3vw, 2rem);
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.results-week-picker label {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--color-black);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.results-week-picker__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
}

.results-week-picker input,
.results-week-picker button {
    min-height: 44px;
    border-radius: 8px;
    font: inherit;
}

.results-week-picker input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: #fbfcfb;
    color: var(--color-black);
}

.results-week-picker input:focus {
    outline: 2px solid rgba(0, 139, 70, 0.18);
    outline-offset: 2px;
    border-color: var(--color-primary);
}

.results-week-picker button {
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--color-primary);
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    transition: background-color var(--transition-base), transform var(--transition-base);
}

.results-week-picker button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.results-week-nav {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    margin-top: 0.8rem;
}

.results-week-nav a {
    display:flex;
    flex-direction:column;
    align-items:center;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-primary-dark);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.results-week-nav a:hover {
    color: var(--color-primary);
}

/* ======================================================
   LISTE DES RENCONTRES
====================================================== */

.results-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.results-day-title {
    margin: clamp(1.6rem, 4vw, 2.8rem) 0 0.25rem;
    color: var(--color-primary-dark);
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1;
    text-transform: uppercase;
}

.results-day-title:first-child {
    margin-top: 0;
}

.results-match {
    position: relative;
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) minmax(360px, 1.65fr) minmax(180px, 0.75fr);
    align-items: center;
    gap: clamp(1rem, 2.5vw, 2rem);
    padding: clamp(1rem, 2vw, 1.35rem);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.075);
    border-radius: 12px;
    background: var(--color-white);
    box-shadow:
        0 9px 24px rgba(0, 0, 0, 0.05),
        0 2px 7px rgba(0, 0, 0, 0.025);
    transition:
        border-color var(--transition-base),
        box-shadow var(--transition-base),
        transform var(--transition-base);
}

.results-match::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #8a948f;
}

.results-match--win::before { background: var(--color-primary); }
.results-match--loss::before { background: #cc4b4b; }
.results-match--draw::before { background: #c99719; }
.results-match--upcoming::before { background: #397ca5; }

.results-match:hover {
    border-color: rgba(0, 139, 70, 0.2);
    box-shadow:
        0 15px 32px rgba(0, 0, 0, 0.075),
        0 3px 9px rgba(0, 0, 0, 0.035);
    transform: translateY(-2px);
}

.results-match__identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.28rem;
}

.results-match__identity a {
    color: var(--color-black);
    text-decoration: none;
}

.results-match__identity strong {
    font-size: 0.98rem;
}

.results-match__identity small,
.results-match__details small {
    color: var(--color-muted);
    line-height: 1.45;
}

.results-match__badge {
    display:flex;
    flex-direction:column;
    align-items:center;
    margin-bottom: 0.2rem;
    padding: 0.3rem 0.58rem;
    border-radius: 999px;
    background: #edf1ef;
    color: #58615d;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.results-match--win .results-match__badge { background: #e5f5ed; color: #116b49; }
.results-match--loss .results-match__badge { background: #faeaea; color: #9e3434; }
.results-match--draw .results-match__badge { background: #fff3d6; color: #805d09; }
.results-match--upcoming .results-match__badge { background: #e7f2f9; color: #276a94; }

.results-match__fixture {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(0.65rem, 1.5vw, 1rem);
}

.results-match__club {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.65rem;
    color: var(--color-black);
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

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

.results-match__club img {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    object-fit: contain;
}

.results-match__score {
    color: var(--color-black);
    font-family: var(--font-heading);
    font-size: clamp(1.55rem, 3vw, 2rem);
    line-height: 1;
    white-space: nowrap;
}

.results-match__details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap:0.35rem;min-width:90px;
    text-align: right;
}

.results-match__details span {
    color: var(--color-black);
    font-weight: 800;
}

.results-match__details a {
    margin-top: 0.25rem;
    color: var(--color-primary-dark);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.results-match__details a:hover {
    color: var(--color-primary);
}

/* ======================================================
   ÉTAT VIDE
====================================================== */

.results-empty {
    padding: clamp(3rem, 8vw, 6rem) 1rem;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 14px;
    background: var(--color-white);
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.055);
}

.results-empty h2 {
    margin: 0;
    color: var(--color-black);
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.2rem);
    text-transform: uppercase;
}

.results-empty p {
    margin: 1rem 0 1.5rem;
    color: var(--color-muted);
}

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

@media (max-width: 980px) {
    .results-week-overview {
        grid-template-columns: 1fr;
    }

    .results-week-overview__controls {
        padding-top: 1.25rem;
        padding-left: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        border-left: 0;
    }

    .results-match {
        grid-template-columns: 1fr;
    }

    .results-match__identity {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
    }

    .results-match__identity small {
        grid-column: 2;
    }

    .results-match__details {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
        text-align: left;
    }

    .results-match__details a {
        margin-left: auto;
    }
}

@media (max-width: 680px) {
    .results-week-overview {
        padding: 1.25rem;
    }

    .results-week-picker__row {
        grid-template-columns: 1fr;
    }

    .results-week-picker button {
        width: 100%;
    }

    .results-week-balance {
        align-items: flex-start;
        flex-direction: column;
    }

    .results-week-balance__rate {
        align-items: flex-start;
    }

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

    .results-summary__item:nth-child(odd) {
        border-left: 0;
    }

    .results-summary__item:nth-child(n + 3) {
        border-top: 1px solid rgba(0, 0, 0, 0.07);
    }

    .results-match {
        padding: 1rem;
    }

    .results-match__fixture {
        gap: 0.45rem;
    }

    .results-match__club {
        flex-direction: column;
        gap: 0.35rem;
        font-size: 0.78rem;
        text-align: center;
    }

    .results-match__club--home {
        justify-content: center;
    }

    .results-match__club img {
        width: 36px;
        height: 36px;
    }

    .results-match__score {
        font-size: 1.45rem;
    }

    .results-match__details a {
        width: 100%;
        margin-left: 0;
    }
}


/* Temps forts du week-end */
.results-highlights {
    margin: clamp(2.25rem, 4vw, 3.25rem) 0;
}

.results-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.results-section-heading h2 {
    margin: 0.15rem 0 0;
    font-family: var(--font-heading, "Barlow Condensed", sans-serif);
    font-size: clamp(2rem, 3vw, 2.55rem);
    line-height: 1;
    text-transform: uppercase;
}

.results-highlights__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.results-highlight {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    min-height: 176px;
    padding: 1.45rem;
    background: #fff;
    border: 1px solid rgba(21, 37, 30, 0.09);
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(16, 35, 27, 0.065);
}

.results-highlight > div {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
}

.results-highlight__icon {
    display: grid;
    flex: 0 0 68px;
    width: 68px;
    height: 68px;
    place-items: center;
    background: rgba(8, 136, 70, 0.08);
    border-radius: 16px;
    font-size: 2rem;
}

.results-highlight__title {
    margin: 0 0 0.45rem;
    color: #087d42;
    font-family: var(--font-heading, "Barlow Condensed", sans-serif);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.045em;
    line-height: 1.15;
    text-transform: uppercase;
}

.results-highlight__value {
    display: block;
    color: #18221d;
    font-size: clamp(1.05rem, 1.35vw, 1.28rem);
    font-weight: 750;
    line-height: 1.2;
}

.results-highlight__score {
    display: block;
    margin-top: 0.2rem;
    color: #087d42;
    font-family: var(--font-heading, "Barlow Condensed", sans-serif);
    font-size: clamp(1.8rem, 2.4vw, 2.35rem);
    font-weight: 800;
    line-height: 1;
}

.results-highlight__meta {
    display: block;
    margin-top: 0.55rem;
    color: #66736c;
    font-size: 0.9rem;
    line-height: 1.35;
}

@media (max-width: 1180px) {
    .results-highlights__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .results-highlights__grid {
        grid-template-columns: 1fr;
    }

    .results-highlight {
        min-height: 0;
        padding: 1.2rem;
    }

    .results-highlight__icon {
        flex-basis: 58px;
        width: 58px;
        height: 58px;
        font-size: 1.7rem;
    }
}
