/* BM Classement Mondial - JS */
.bm-classement-wrap{
    width:100%;
    max-width:980px;
    margin:20px auto;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}

.bm-classement-caption{
    margin-bottom:12px;
    font-size:18px;
    font-weight:800;
    color:#222;
    text-align:center;
}

.bm-compare-topbar{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:18px;
    flex-wrap:nowrap;
    margin:0 auto 18px auto;
    width:100%;
}

.bm-compare-label{
    font-size:13px;
    color:#555;
    font-weight:600;
    white-space:nowrap;
}

.bm-topbar-actions{
    display:flex;
    gap:12px;
    align-items:center;
    justify-content:center;
    flex-wrap:nowrap;
}

.bm-compare-form{
    display:flex;
    gap:8px;
    align-items:center;
    flex-wrap:nowrap;
    margin:0;
}

.bm-compare-form label{
    white-space:nowrap;
    margin:0;
}

.bm-compare-form select{
    min-width:140px;
}

.bm-compare-form button{
    white-space:nowrap;
}

.bm-medals-btn,
.bm-brs-bottom-close{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:none;
    background:#0d0d0d;
    color:#fff;
    border-radius:10px;
    padding:9px 14px;
    cursor:pointer;
    font-size:13px;
    font-weight:700;
    transition:.2s ease;
}

.bm-medals-btn:hover,
.bm-brs-bottom-close:hover{
    background:#c75100;
    color:#fff;
}

.bm-classement-table{
    width:100%;
    max-width:650px;
    margin:0 auto;
    min-width:0 !important;
    border-collapse:separate;
    border-spacing:0;
    background:#fff;
    font-size:13px;
    table-layout:fixed;
    border-radius:16px;
    overflow:hidden;
    box-shadow:0 10px 24px rgba(0,0,0,.08);
}

.bm-classement-table th,
.bm-classement-table td{
    border-right:1px solid #ececec;
    border-bottom:1px solid #ececec;
    padding:8px 5px;
    text-align:center;
    vertical-align:middle;
    overflow:hidden;
    text-overflow:ellipsis;
}

.bm-classement-table th:last-child,
.bm-classement-table td:last-child{
    border-right:none;
}

.bm-classement-table tr:last-child td{
    border-bottom:none;
}

.bm-classement-table th{
    background:#0d0d0d;
    color:#fff;
    font-weight:800;
    white-space:normal;
    line-height:1.15;
    letter-spacing:.1px;
}

.bm-classement-table td{
    white-space:nowrap;
    color:#333;
}

.bm-classement-table tr:nth-child(even){
    background:#fcfcfc;
}

.bm-classement-table tr:hover{
    background:#fff7eb;
}

.bm-top1{
    background:linear-gradient(90deg,#fff7d6 0%, #fff2b8 100%) !important;
}

.bm-top2{
    background:linear-gradient(90deg,#f4f6f8 0%, #eceff3 100%) !important;
}

.bm-top3{
    background:linear-gradient(90deg,#f7e5d6 0%, #efd4bd 100%) !important;
}

.bm-top10 td{
    font-weight:600;
}

.bm-classement-table th:nth-child(1),
.bm-classement-table td:nth-child(1){
    width:60px !important;
}

.bm-classement-table th:nth-child(2),
.bm-classement-table td:nth-child(2){
    width:255px !important;
}

.bm-classement-table th:nth-child(3),
.bm-classement-table td:nth-child(3){
    width:110px !important;
}

.bm-classement-table th:nth-child(4),
.bm-classement-table td:nth-child(4){
    width:95px !important;
}

.bm-rank{
    font-weight:800;
    font-size:15px;
    color:#333;
}

.bm-rank-top1{
    color:#9c6a00;
}

.bm-rank-top2{
    color:#66707a;
}

.bm-rank-top3{
    color:#8c552b;
}

.bm-classement-pays{
    text-align:left !important;
    font-weight:700;
    white-space:normal !important;
    line-height:1.18;
    word-break:break-word;
    color:#2b2b2b;
}

.bm-classement-flag{
    width:18px;
    height:auto;
    vertical-align:middle;
    margin-right:5px;
    border:1px solid #ddd;
    border-radius:2px;
    background:#fff;
}

.bm-badge{
    display:inline-block;
    min-width:34px;
    padding:4px 8px;
    border-radius:999px;
    font-weight:800;
    font-size:12px;
    line-height:1;
}

.bm-badge-brs{
    background:#fff0e5;
    color:#c75100;
}

.bm-medal-gold{
    font-weight:800;
    color:#b8860b;
}

.bm-medal-silver{
    font-weight:800;
    color:#6f6f6f;
}

.bm-medal-bronze{
    font-weight:800;
    color:#9a5b2e;
}

.bm-total{
    font-weight:800;
    color:#444;
}

.bm-detail-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-left:6px;
    border:none;
    background:#f1f1f1;
    border-radius:999px;
    padding:3px 8px;
    cursor:pointer;
    font-size:12px;
    font-weight:700;
    color:#444;
    vertical-align:middle;
}

.bm-detail-btn:hover{
    background:#c75100;
    color:#fff;
}

.bm-brs-modal,
.bm-medals-modal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.55);
    z-index:999999;
    align-items:center;
    justify-content:center;
    padding:18px;
}

.bm-brs-modal.is-open,
.bm-medals-modal.is-open{
    display:flex;
}

.bm-brs-modal-box,
.bm-medals-modal-box{
    width:100%;
    max-width:1100px;
    max-height:88vh;
    overflow:auto;
    background:#fff;
    border-radius:18px;
    box-shadow:0 18px 48px rgba(0,0,0,.2);
    padding:18px;
    position:relative;
}

.bm-brs-modal-close,
.bm-medals-modal-close{
    position:absolute;
    top:10px;
    right:12px;
    border:none;
    background:#f3f3f3;
    width:36px;
    height:36px;
    border-radius:50%;
    cursor:pointer;
    font-size:22px;
    line-height:1;
    font-weight:800;
    color:#333;
    z-index:10;
}

.bm-brs-modal-close:hover,
.bm-medals-modal-close:hover{
    background:#c75100;
    color:#fff;
}

.bm-brs-loading,
.bm-brs-empty{
    padding:18px;
    text-align:center;
    color:#666;
}

.bm-brs-detail-wrap{
    width:100%;
    max-width:920px;
    margin:0 auto;
    font-family:Arial, Helvetica, sans-serif;
    color:#333;
}

.bm-brs-detail-header{
    display:flex;
    align-items:center;
    gap:12px;
    margin:0 0 14px 0;
    padding-right:42px;
    flex-wrap:wrap;
}

.bm-brs-detail-flag{
    width:32px;
    height:auto;
    border:1px solid #ddd;
    border-radius:4px;
    background:#fff;
}

.bm-brs-detail-title{
    font-size:18px;
    font-weight:800;
    color:#444;
    margin:0;
}

.bm-brs-detail-table-wrap{
    width:100%;
    overflow-x:auto;
    border:1px solid #e2e2e2;
    border-radius:14px;
    background:#fff;
    box-shadow:0 4px 12px rgba(0,0,0,.04);
}

.bm-brs-detail-table{
    width:100%;
    min-width:760px;
    border-collapse:collapse;
    font-size:12px;
    background:#fff;
}

.bm-brs-detail-table th,
.bm-brs-detail-table td{
    border:1px solid #e8e8e8;
    padding:8px 9px;
    text-align:center;
    vertical-align:middle;
}

.bm-brs-detail-table th{
    background:#0d0d0d;
    color:#fff;
    font-weight:800;
    white-space:nowrap;
}

.bm-brs-detail-table td{
    color:#555;
    white-space:nowrap;
}

.bm-brs-detail-table tbody tr:nth-child(even) td{
    background:#fcfcfc;
}

.bm-brs-detail-table tbody tr:hover td{
    background:#fff7eb;
}

.bm-brs-detail-table td:nth-child(2),
.bm-brs-detail-table td:nth-child(3),
.bm-brs-detail-table td:nth-child(4){
    text-align:left;
    white-space:normal;
}

.bm-brs-detail-table td:nth-child(9){
    font-weight:800;
    color:#444;
}

.bm-brs-detail-table tfoot th{
    background:#fafafa;
    color:#111;
    font-weight:800;
    font-size:13px;
}

.bm-brs-detail-total-label{
    text-align:right !important;
    padding-right:18px !important;
}

.bm-classement-empty{
    padding:14px 16px;
    background:#f8f8f8;
    border:1px solid #e5e5e5;
    border-radius:10px;
}

.bm-classement-note{
    margin:12px auto 0 auto;
    max-width:820px;
    padding:12px 14px;
    background:#fafafa;
    border-left:4px solid #c75100;
    font-size:14px;
    line-height:1.55;
    border-radius:10px;
}

.bm-medal-filter-select{
    min-width:240px;
    padding:7px 10px;
    border:1px solid #d6d6d6;
    border-radius:8px;
    background:#fff;
    font-size:13px;
    font-weight:600;
    color:#333;
}

.bm-medals-table{
    table-layout:fixed;
}

.bm-medals-table th,
.bm-medals-table td{
    text-align:center !important;
    white-space:nowrap;
}

.bm-medals-table th:nth-child(1),
.bm-medals-table td:nth-child(1){
    width:82px;
}

.bm-medals-table th:nth-child(2),
.bm-medals-table td:nth-child(2){
    width:220px;
}

.bm-medals-table th:nth-child(3),
.bm-medals-table td:nth-child(3),
.bm-medals-table th:nth-child(4),
.bm-medals-table td:nth-child(4),
.bm-medals-table th:nth-child(5),
.bm-medals-table td:nth-child(5),
.bm-medals-table th:nth-child(6),
.bm-medals-table td:nth-child(6){
    width:68px;
}

.bm-medals-table td:nth-child(2){
    text-align:left !important;
    white-space:normal !important;
}

@media (max-width:768px){
    .bm-compare-topbar{
        flex-direction:column;
        justify-content:center;
        align-items:center;
        gap:10px;
    }

    .bm-compare-label{
        width:100%;
        text-align:center;
    }

    .bm-topbar-actions{
        width:100%;
        flex-direction:column;
        gap:10px;
    }

    .bm-compare-form{
        width:100%;
        flex-direction:column;
        align-items:center;
        gap:10px;
    }

    .bm-compare-form select,
    .bm-compare-form button,
    .bm-medals-btn{
        width:100%;
        max-width:260px;
    }

    .bm-classement-wrap{
        max-width:100%;
    }

    .bm-classement-table{
        max-width:none;
        min-width:520px !important;
    }

    .bm-brs-detail-table{
        font-size:11px;
        min-width:720px;
    }

    .bm-brs-detail-table th,
    .bm-brs-detail-table td{
        padding:7px 8px;
    }

    .bm-medal-filter-select{
        min-width:100%;
    }
}