/* ═══════════════════════════════════════════════════════════
   Sidebar leagues + Modal Locked
   BetWinProno · fr/index.php · 2026-07
   ═══════════════════════════════════════════════════════════ */

.ix-content { max-width: 1440px; }

/* Neutralise le width:70% de .main-content (header.css:539) sur la page index
   pour laisser la grille de cards utiliser toute la largeur disponible. */
.main-content:has(> .ix-content) { width: 100%; max-width: none; }

.bwp-layout {
    display: flex;
    align-items: stretch;
    gap: 5px;
    position: relative;
}

.bwp-layout .bwp-main {
    flex: 1 1 auto;
    min-width: 0;
}


/* ── SIDEBAR ────────────────────────────────────────────────────── */
.bwp-sidebar {
    flex: 0 0 260px;
    width: 260px;
    background: rgba(5, 83, 143, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.15);
    color: #fff;
    overflow: hidden;
    /* Hauteur = hauteur de .bwp-main via align-items:stretch sur .bwp-layout.
       Scroll interne géré par .bwp-sidebar__body (overflow-y:auto). */
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.bwp-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    flex: 0 0 auto;
}
.bwp-sidebar__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ix-gold);
    letter-spacing: 0.02em;
}
.bwp-sidebar__close {
    background: none;
    border: 0;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
}
.bwp-sidebar__close:hover { color: #fff; }

.bwp-sidebar__search {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.15);
    flex: 0 0 auto;
}
.bwp-sidebar__search i {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
}
.bwp-sidebar__search input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: #fff;
    font-size: 12px;
    font-family: inherit;
}
.bwp-sidebar__search input::placeholder { color: rgba(255,255,255,0.45); }

.bwp-sidebar__body {
    flex: 1 1 auto;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.25) transparent;
}
.bwp-sidebar__body::-webkit-scrollbar { width: 6px; }
.bwp-sidebar__body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

.bwp-sidebar__section-label {
    padding: 10px 12px 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,215,0,0.85);
}

/* Country row (details/summary) */
.bwp-country {
    border-top: 1px solid rgba(255,255,255,0.07);
}
.bwp-country > summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.bwp-country > summary::-webkit-details-marker { display: none; }
.bwp-country > summary:hover { background: rgba(255,255,255,0.06); }
.bwp-country[open] > summary { background: rgba(255,255,255,0.08); }

.bwp-country__chev {
    width: 12px;
    font-size: 10px;
    color: rgba(255,255,255,0.55);
    transition: transform 0.2s;
}
.bwp-country[open] > summary .bwp-country__chev { transform: rotate(90deg); }
.bwp-flag {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 0 0.5px rgba(0,0,0,0.2);
}
.bwp-flag-globe {
    width: 18px;
    text-align: center;
    color: rgba(255,255,255,0.65);
    font-size: 13px;
}
.bwp-country__name {
    flex: 1;
    font-size: 12.5px;
    font-weight: 500;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bwp-count {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.25);
    padding: 1px 7px;
    border-radius: 10px;
    font-variant-numeric: tabular-nums;
}

/* League nested */
.bwp-league {
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.15);
}
.bwp-league > summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 28px;
    cursor: pointer;
    transition: background 0.15s;
}
.bwp-league > summary::-webkit-details-marker { display: none; }
.bwp-league > summary:hover { background: rgba(255,255,255,0.05); }

.bwp-league__chev {
    width: 10px;
    font-size: 9px;
    color: rgba(255,255,255,0.5);
    transition: transform 0.2s;
}
.bwp-league[open] > summary .bwp-league__chev { transform: rotate(90deg); }
.bwp-league__logo {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex-shrink: 0;
}
.bwp-league__name {
    flex: 1;
    font-size: 11.5px;
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bwp-matches {
    list-style: none;
    margin: 0;
    padding: 0 0 4px 34px;
}
.bwp-match { list-style: none; }
.bwp-match__link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 10px 8px 6px;
    border-radius: 5px;
    transition: background 0.12s;
    text-decoration: none;
    color: inherit;
    margin: 2px 0;
}
.bwp-match__link:hover {
    background: rgba(255,215,0,0.12);
    text-decoration: none;
}
.bwp-match__link:focus-visible {
    outline: 2px solid var(--ix-gold);
    outline-offset: -2px;
}
.bwp-match__meta {
    font-size: 9.5px;
    font-style: italic;
    color: rgba(255,215,0,0.75);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    margin-bottom: 1px;
}
.bwp-match__team {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.bwp-team__logo,
.bwp-team__logo-fallback {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: rgba(255,255,255,0.35);
}
.bwp-team__name {
    flex: 1;
    font-size: 11.5px;
    color: rgba(255,255,255,0.90);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bwp-sidebar__empty {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

/* Toggle bouton mobile */
.bwp-sidebar-toggle {
    display: none;
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    padding: 10px 14px;
    background: rgba(5, 83, 143, 0.55);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    margin-bottom: 8px;
    cursor: pointer;
    font-family: inherit;
}
.bwp-sidebar-toggle i { margin-right: 6px; color: var(--ix-gold); }

/* ── RESPONSIVE : drawer sur mobile/tablette ──────────────────────── */
@media (max-width: 900px) {
    .bwp-layout { flex-direction: column; }
    .bwp-sidebar-toggle { display: block; }

    .bwp-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-height: 100vh;
        border-radius: 0;
        border: 0;
        border-right: 1px solid rgba(255,255,255,0.15);
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
        z-index: 999;
        background: linear-gradient(180deg, rgba(15,46,78,0.98), rgba(21,67,96,0.98));
    }
    .bwp-sidebar.is-open { transform: translateX(0); }

    .bwp-sidebar__backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.55);
        z-index: 998;
    }
    .bwp-sidebar.is-open + .bwp-sidebar__backdrop { display: block; }
}

/* ── MODAL LOCKED ──────────────────────────────────────────────────── */
.bwp-locked-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5,15,30,0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: bwpLockedFade 0.18s ease-out;
}
.bwp-locked-overlay[data-open="1"] { display: flex; }
@keyframes bwpLockedFade { from { opacity: 0; } to { opacity: 1; } }

.bwp-locked-box {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(160deg, #1a2b47 0%, #0f2036 100%);
    color: #fff;
    border-radius: 16px;
    border: 1px solid rgba(255,215,0,0.25);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    overflow: hidden;
    animation: bwpLockedIn 0.22s cubic-bezier(0.4,0,0.2,1);
}
@keyframes bwpLockedIn { from { transform: translateY(8px); opacity: 0.8; } to { transform: translateY(0); opacity: 1; } }

.bwp-locked-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.bwp-locked-head__info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.bwp-locked-head__champ {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}
.bwp-locked-head__text { min-width: 0; }
.bwp-locked-head__title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 320px;
}
.bwp-locked-head__meta {
    font-size: 10.5px;
    color: rgba(255,255,255,0.6);
}
.bwp-locked-close {
    background: transparent;
    border: 0;
    color: rgba(255,255,255,0.7);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
}
.bwp-locked-close:hover { color: #fff; }

.bwp-locked-hero {
    text-align: center;
    padding: 22px 20px 10px;
}
.bwp-locked-hero__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255,215,0,0.15);
    color: var(--ix-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 12px;
    border: 1.5px solid rgba(255,215,0,0.35);
}
.bwp-locked-hero__title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #fff;
}
.bwp-locked-hero__lead {
    font-size: 12.5px;
    color: rgba(255,255,255,0.75);
    margin: 0;
    line-height: 1.5;
}

.bwp-locked-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 16px 20px 6px;
}
.bwp-locked-feat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    font-size: 11.5px;
}
.bwp-locked-feat i {
    font-size: 13px;
    color: var(--ix-gold);
    width: 16px;
    text-align: center;
}
.bwp-locked-feat span {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.bwp-locked-actions {
    padding: 14px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bwp-locked-btn {
    display: block;
    text-align: center;
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 0;
    font-family: inherit;
    transition: transform 0.12s, box-shadow 0.15s;
}
.bwp-locked-btn--primary {
    background: linear-gradient(135deg, var(--ix-gold) 0%, var(--ix-gold2) 100%);
    color: #1a1a1a;
    box-shadow: 0 4px 14px rgba(255,215,0,0.25);
}
.bwp-locked-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255,215,0,0.35); }
.bwp-locked-btn--ghost {
    background: transparent;
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.18);
}
.bwp-locked-btn--ghost:hover { background: rgba(255,255,255,0.06); }

@media (max-width: 480px) {
    .bwp-locked-features { grid-template-columns: 1fr; }
    .bwp-locked-head__title { max-width: 200px; }
}
