/* Stats joueurs MHSC v2 — scoped .mhsk */

.mhsk {
    --navy: #071525;
    --navy-2: #0c1e32;
    --red: #c8102e;
    --blue: #1d6fbf;
    --text: #152033;
    --muted: #5c6d80;
    --line: #d7e0ea;
    --bg: #f3f6f9;
    --max: 1200px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

.mhsk *,
.mhsk *::before,
.mhsk *::after {
    box-sizing: border-box;
}

.mhsk-wrap {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 20px;
}

.mhsk-hero {
    background: var(--navy);
    color: #fff;
    padding: 36px 0 28px;
    border-top: 3px solid var(--red);
}

.mhsk .mhsk-hero h1 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.mhsk-hero p {
    margin: 0;
    color: #9db4c9;
    font-size: 15px;
    max-width: 720px;
}

.mhsk-body {
    padding: 20px 0 48px;
}

.mhsk-filters {
    background: #fff;
    border: 1px solid var(--line);
    margin-bottom: 16px;
}

.mhsk-filters-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
}

.mhsk-filters-h strong {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--navy);
}

.mhsk-req {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
}

.mhsk-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
}

.mhsk-grid--opt {
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
    background: #fbfcfd;
}

.mhsk-field label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 5px;
}

.mhsk-field label em {
    color: var(--red);
    font-style: normal;
}

.mhsk-field select,
.mhsk-field input[type="text"],
.mhsk-field input[type="number"] {
    width: 100%;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
}

.mhsk-field select:disabled {
    background: #eef1f4;
    color: #9aa8b6;
}

.mhsk-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px 16px;
}

.mhsk-switch {
    display: none;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.mhsk-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.mhsk-switch-track {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 22px;
    background: #c5d0db;
    border-radius: 11px;
    transition: background 0.2s ease;
}

.mhsk-switch-track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.mhsk-switch input:checked + .mhsk-switch-track {
    background: var(--blue);
}

.mhsk-switch input:checked + .mhsk-switch-track::after {
    transform: translateX(18px);
}

.mhsk-switch-text {
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.mhsk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 18px;
    background: var(--blue);
    color: #fff !important;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.mhsk-btn:hover {
    background: #155a9c;
}

.mhsk-btn:disabled {
    background: #9db4c9;
    cursor: not-allowed;
}

.mhsk-ghost {
    color: var(--blue);
    font-size: 13px;
    font-weight: 600;
}

.mhsk-note {
    background: #fff;
    border: 1px solid var(--line);
    padding: 28px 20px;
    text-align: center;
}

.mhsk-note strong {
    display: block;
    font-size: 16px;
    margin-bottom: 6px;
}

.mhsk-note p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.mhsk-leaders {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.mhsk-leaders--2 {
    grid-template-columns: 1fr 1fr;
}

.mhsk-leader {
    background: #fff;
    border: 1px solid var(--line);
}

.mhsk-leader-h {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--navy);
}

.mhsk-leader-h--g { background: #b42318; }
.mhsk-leader-h--a { background: #0b6b3a; }
.mhsk-leader-h--p { background: var(--blue); }

.mhsk-leader-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-top: 1px solid #f0f2f5;
    text-decoration: none;
    color: var(--text);
}

.mhsk-leader-row:hover {
    background: #f7fbff;
    text-decoration: none;
}

.mhsk-leader-row img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.mhsk-leader-row b {
    display: block;
    font-size: 13px;
    line-height: 1.2;
}

.mhsk-leader-row span {
    display: block;
    font-size: 11px;
    color: var(--muted);
}

.mhsk-leader-row i {
    margin-left: auto;
    font-style: normal;
    font-weight: 800;
    font-size: 15px;
    color: var(--navy);
}

.mhsk-table-card {
    background: #fff;
    border: 1px solid var(--line);
    overflow: hidden;
}

.mhsk-table-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.mhsk-preview {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 7px;
    background: #fdecef;
    color: var(--red);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mhsk-table-wrap {
    overflow-x: hidden;
    max-width: 100%;
}

.mhsk-table {
    width: 100%;
    border-collapse: collapse;
}

.mhsk-table th,
.mhsk-table td {
    padding: 8px 10px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid #eef1f4;
    vertical-align: middle;
}

.mhsk-table thead th {
    background: var(--navy);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mhsk-table th.num,
.mhsk-table td.num {
    text-align: center;
    font-variant-numeric: tabular-nums;
    width: 56px;
}

.mhsk-table th.pts,
.mhsk-table td.pts {
    background: rgba(29, 111, 191, 0.08);
    font-weight: 800;
}

.mhsk-table thead th.pts {
    background: #0c1e32;
}

.mhsk-player {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mhsk-player img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}
.mhsk-player img.mhsc-vphoto {
    object-fit: cover;
    border-radius: 50%;
    background: #e2e8f0;
}
.mhsc-vbadge {
    display: inline-flex;
    vertical-align: middle;
    margin-left: 4px;
    color: #1d6fbf;
}
.mhsc-vbadge svg { display: block; }

.mhsk-player a {
    font-weight: 700;
    color: var(--blue);
    text-decoration: none;
}

.mhsk-player a:hover {
    text-decoration: underline;
}

.mhsk-meta {
    display: block;
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

.mhsk-lock {
    color: #f87171;
    cursor: pointer;
    background: none;
    border: 0;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}

.mhsk-lock i {
    pointer-events: none;
}

.mhsk-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px;
}

.mhsk-pager a,
.mhsk-pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px;
}

.mhsk-pager a:hover {
    border-color: var(--blue);
    background: #f1f5f9;
}

.mhsk-pager .is-on {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.mhsk-ad {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 20px 8px;
}

.mhsk-ad-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9aa8b6;
    margin-bottom: 8px;
}

.mhsk-ad-box {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    background: #fff;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mhsk-ad img {
    display: block;
    max-width: 100%;
    height: auto;
}

.mhsk-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(9, 20, 33, 0.62);
    padding: 20px;
    align-items: center;
    justify-content: center;
}

.mhsk-modal.is-on {
    display: flex;
}

.mhsk-modal-box {
    width: 100%;
    max-width: 380px;
    background: #fff;
    padding: 28px 24px;
    text-align: center;
}

.mhsk-modal-box h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.mhsk-modal-box p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.mhsk-modal-box .mhsk-btn {
    width: 100%;
    margin-bottom: 8px;
}

.mhsk-modal-box .mhsk-ghost {
    display: block;
    margin: 8px 0 12px;
}

.mhsk-modal-box button {
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
}

.mhsk-loader-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background: rgba(255, 255, 255, 0.78);
    align-items: center;
    justify-content: center;
}

.mhsk-loading .mhsk-loader-overlay {
    display: flex;
}

.mhsk-loader-spinner {
    width: 54px;
    height: 54px;
    border: 4px solid #f1f5f9;
    border-top-color: var(--blue);
    border-right-color: var(--blue);
    border-radius: 50%;
    animation: mhsk-spin 0.8s linear infinite;
}

@keyframes mhsk-spin {
    to { transform: rotate(360deg); }
}

.mhsk-hide-xs { }

@media (max-width: 900px) {
    .mhsk-grid,
    .mhsk-grid--opt,
    .mhsk-leaders {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .mhsk .mhsk-hero h1 {
        font-size: 22px;
    }
    .mhsk-grid,
    .mhsk-grid--opt,
    .mhsk-leaders {
        grid-template-columns: 1fr;
    }
    .mhsk-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .mhsk-actions .mhsk-btn {
        width: 100%;
    }
    .mhsk-switch {
        display: flex;
        width: 100%;
        padding-top: 4px;
    }
    .mhsk-hide-xs {
        display: none !important;
    }
    .mhsk.is-wide .mhsk-hide-xs {
        display: table-cell !important;
    }
    .mhsk.is-wide .mhsk-table-card {
        overflow: visible;
    }
    .mhsk.is-wide .mhsk-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .mhsk.is-wide .mhsk-table {
        table-layout: fixed;
        width: 100%;
        min-width: 520px;
    }
    .mhsk.is-wide .mhsk-table th.rank,
    .mhsk.is-wide .mhsk-table td.rank {
        width: 28px;
        max-width: 28px;
        min-width: 28px;
        padding-left: 2px;
        padding-right: 2px;
    }
    .mhsk.is-wide .mhsk-table th.name,
    .mhsk.is-wide .mhsk-table td.name {
        width: auto;
        min-width: 148px;
        max-width: none;
    }
    .mhsk.is-wide .mhsk-table th.vdn,
    .mhsk.is-wide .mhsk-table td.vdn {
        width: 58px;
        max-width: 58px;
        min-width: 58px;
    }
    .mhsk.is-wide .mhsk-player {
        max-width: none;
    }
    .mhsk.is-wide .mhsk-player a,
    .mhsk.is-wide .mhsk-meta {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mhsk-table {
        table-layout: fixed;
        min-width: 0;
        width: 100%;
    }
    .mhsk-table th,
    .mhsk-table td {
        padding: 8px 5px;
        font-size: 12px;
    }
    .mhsk-table th.num,
    .mhsk-table td.num {
        width: 38px;
        padding-left: 4px;
        padding-right: 4px;
    }
    .mhsk-player {
        gap: 8px;
    }
    .mhsk-player > div {
        min-width: 0;
        overflow: hidden;
    }
    .mhsk-player a {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mhsk-meta {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mhsk-wrap {
        padding: 0 14px;
    }
}

.mhsk-table thead a {
    color: inherit;
    text-decoration: none;
}

.mhsk-table thead a:hover {
    text-decoration: underline;
}

.mhsk-rank-1 { color: #c9a227; font-weight: 800; }
.mhsk-rank-2 { color: #7d8894; font-weight: 800; }
.mhsk-rank-3 { color: #b87333; font-weight: 800; }
