/* =========================================================
   MBCW — WIDGET MATCHS
   ========================================================= */


/* =========================================================
   1. BASE
   ========================================================= */

.mbcw,
.mbcw * {
    box-sizing: border-box;
}

.mbcw {
    width: 100%;
    min-width: 0;
    color: #102944;
    font-family: inherit;
}


/* =========================================================
   2. NAVIGATION SEMAINES
   ========================================================= */

.mbcw-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.mbcw-nav button {
    width: 44px;
    height: 44px;
    padding: 0;

    background: #102944;
    border: 1px solid #809bb4;
    border-radius: 50%;

    color: #fff;
    font-size: 24px;

    cursor: pointer;
}

.mbcw-nav button:disabled {
    opacity: 0.35;
    cursor: default;
}

.mbcw-status {
    font-size: 13px;
}


/* =========================================================
   3. CONTENEUR / CARROUSEL
   ========================================================= */

.mbcw-track {
    display: flex;
    align-items: stretch;
    gap: 20px;

    position: relative;

    overflow-x: auto;
    scroll-snap-type: x mandatory;

    padding: 2px 0 26px;
}


/* =========================================================
   4. CARTE SEMAINE
   ========================================================= */

.mbcw-week {
    flex: 0 0 calc((100% - 20px) / 2);
    min-width: 0;

    height: auto;
    min-height: 0;
    align-self: stretch;

    scroll-snap-align: start;

    background: #f7f9fc;
    border: 1px solid #dce4ed;
    border-radius: 14px;

    overflow: hidden;
}


/* =========================================================
   5. HEADER SEMAINE
   ========================================================= */

.mbcw .mbcw-week > header {
    padding: 10px 16px;

    background: linear-gradient(
        120deg,
        #173f66,
        #0b2541
    );

    color: #fff;
}

.mbcw .mbcw-week h2 {
    display: flex;
    align-items: center;
    gap: 9px;

    margin: 0 0 3px;

    color: #fff;
    font-size: clamp(17px, 1.5vw, 21px);
    font-weight: 750;
    line-height: 1.2;
}

.mbcw .mbcw-week > header p {
    margin: 0;

    color: #d4e2ef;
    font-size: 11px;
    line-height: 1.3;
}


/* Icône calendrier */

.mbcw .mbcw-calendar {
    display: block;

    flex: 0 0 20px;

    width: 20px;
    height: 20px;
    max-width: 20px;
}


/* =========================================================
   6. CONTENU SEMAINE
   ========================================================= */

.mbcw-days {
    padding: 16px;
}


/* =========================================================
   7. TITRES DES JOURS
   ========================================================= */

.mbcw .mbcw-day {
    margin: 20px 0 10px;
    padding-bottom: 8px;

    border-bottom: 1px solid #d9e2ec;

    color: #102944;
    font-size: 21px;
    font-weight: 750;
    text-align: center;
    text-transform: capitalize;
}

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


/* =========================================================
   8. LISTE DES MATCHS
   ========================================================= */

.mbcw-list {
    display: grid;
    gap: 10px;
}


/* =========================================================
   9. CARTE MATCH
   ========================================================= */

.mbcw-match {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) 60px;
    gap: 5px 6px;

    padding: 8px 10px;

    background: #fff;
    border: 1px solid #e5eaf0;
    border-radius: 10px;

    box-shadow: 0 2px 8px #10294406;
}


/* =========================================================
   10. IDENTITÉ DU MATCH
   ========================================================= */

.mbcw-identity {
    min-width: 0;

    grid-column: 2;
    grid-row: 1;
    align-self: center;
    text-align: center;
    overflow-wrap: anywhere;
}

.mbcw-identity strong {
    display: block;

    font-size: 13px;
    line-height: 1.3;
}

.mbcw-identity small {
    display: block;

    color: #627389;
    font-size: 10px;
    line-height: 1.4;
}


/* =========================================================
   11. ÉQUIPES / SCORE
   ========================================================= */

.mbcw-versus {
    grid-row: 2;
    grid-column: 1 / -1;

    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr);

    align-items: center;
    gap: 9px;
}

.mbcw-versus > div {
    display: flex;
    align-items: center;
    gap: 7px;

    min-width: 0;

    font-size: 11px;
    line-height: 1.3;

    overflow-wrap: anywhere;
}


/* Équipe de gauche :
   texte puis logo vers le score */

.mbcw-versus > div:first-child {
    flex-direction: row-reverse;
    text-align: right;
}


/* Équipe de droite :
   logo puis texte */

.mbcw-versus > div:last-child {
    flex-direction: row;
    text-align: left;
}


/* =========================================================
   12. SCORE / HEURE
   ========================================================= */

.mbcw-versus > b {
    font-size: 15px;
    white-space: nowrap;
}

.mbcw-versus > b.mbcw-score {
    display: flex;
    align-items: center;
    gap: 4px;

    font-size: 21px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.mbcw-score-separator {
    color: #8190a0;
    font-size: 15px;
}

/* =========================================================
   SCORE MONTASTRUC
   ========================================================= */

.mbcw .mbcw-score--mbc-win,
.mbcw .mbcw-score--mbc-loss,
.mbcw .mbcw-score--mbc-draw {
    color: #0759c7;
    background: #e5efff;
    padding: 1px 5px;
    border-radius: 5px;
}

/* =========================================================
   13. LOGOS ÉQUIPES
   ========================================================= */

.mbcw .mbcw-logo {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;
    flex: 0 0 44px;

    padding: 0;

    background: transparent;
    border: 0;
    border-radius: 0;
}

.mbcw .mbcw-logo img {
    display: block;

    width: 100%;
    height: 100%;
    max-width: 100%;

    object-fit: contain;

    background: transparent;
    border: 0;
    border-radius: 0;
}

.mbcw-logo--empty {
    color: #a6b6c4;
}


/* =========================================================
   14. BADGES
   ========================================================= */

.mbcw-badge {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    max-width: 100%;
    text-align: center;

    padding: 3px 6px;

    border-radius: 20px;

    font-size: 9px;
    font-weight: 800;
    line-height: 1.2;
    white-space: normal;
}


.mbcw-badge--venue {
    grid-column: 1;
    justify-self: start;
    background: #e2e5e9;
    color: #4b5563;
}

/* Victoire */

.mbcw-badge--win {
    background: #13813d;
    color: #fff;
}


/* Défaite */

.mbcw-badge--loss {
    background: #ce263c;
    color: #fff;
}


/* Match à venir */

.mbcw-badge--future {
    background: #e7f1ff;
    color: #255d9a;
}


/* Live */

.mbcw-badge--live {
    background: #fff0d3;
    color: #855b00;
}


/* Neutre */

.mbcw-badge--neutral {
    background: #edf0f4;
    color: #566275;
}


/* =========================================================
   15. LIEU
   ========================================================= */

.mbcw-place {
    grid-column: 1 / -1;

    color: #627389;
    font-size: 11px;
}


/* =========================================================
   16. MESSAGES / ÉTATS VIDES
   ========================================================= */

.mbcw-empty,
.mbcw-notice {
    padding: 12px;

    color: #627389;
    font-size: 14px;
}


/* =========================================================
   17. ACCESSIBILITÉ / FOCUS
   ========================================================= */

.mbcw button:focus-visible,
.mbcw-track:focus-visible {
    outline: 3px solid #ff861e;
    outline-offset: 3px;
}


/* =========================================================
   18. MOBILE
   ========================================================= */

@media (max-width: 767px) {

    /* Une seule semaine visible */

    .mbcw-week {
        flex-basis: 100%;
    }


    /* Marges internes */

    .mbcw-days {
        padding: 12px;
    }


    /* Cartes matchs */

    .mbcw-match {
        padding: 7px 8px;
    }


    /* Logos légèrement plus petits */

    .mbcw .mbcw-logo {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }
}