/* =========================================================
   CAZISTATS — BLACKJACK FINAL
   Simple / responsive / 3 tools
   ========================================================= */

.bj-page,
.bj-page *{box-sizing:border-box}

.bj-page{
    --bg:#050a15;
    --panel:#0b1730;
    --panel2:#0a1327;
    --line:rgba(94,137,211,.24);
    --cyan:#48e6ff;
    --blue:#4d87ff;
    --violet:#8a6cff;
    --text:#f3f7ff;
    --muted:#8fa5c4;
    --green:#58e6bd;
    --red:#ff657d;
    min-height:calc(100vh - 72px);
    padding:48px 18px 80px;
    color:var(--text);
    background:
        radial-gradient(circle at 20% 0,rgba(0,213,255,.10),transparent 30%),
        radial-gradient(circle at 80% 15%,rgba(110,75,255,.10),transparent 28%),
        #050a15;
    overflow-x:hidden;
}

.bj-wrap{width:min(1180px,100%);margin:0 auto}

.bj-head{
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:28px;
    padding:30px;
    border:1px solid rgba(74,222,255,.28);
    border-radius:24px;
    background:linear-gradient(135deg,rgba(8,43,67,.92),rgba(24,28,76,.92));
    box-shadow:0 20px 55px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.04);
}

.bj-eyebrow,.bj-mini-label,.bj-section-title>div>span{
    display:block;
    color:var(--cyan);
    font-size:11px;
    font-weight:900;
    letter-spacing:.15em;
    text-transform:uppercase;
}
.bj-eyebrow{display:flex;align-items:center;gap:9px}
.bj-eyebrow span{width:7px;height:7px;border-radius:50%;background:var(--cyan);box-shadow:0 0 14px var(--cyan)}

.bj-head h1{margin:8px 0 2px;font-size:clamp(38px,6vw,64px);line-height:.95;letter-spacing:-.045em}
.bj-head p,.bj-section-title p{margin:12px 0 0;color:var(--muted);line-height:1.6}

.bj-main-tabs{
    display:grid;
    grid-template-columns:repeat(3,minmax(150px,1fr));
    gap:8px;
    min-width:min(590px,52%);
    padding:7px;
    border:1px solid rgba(102,134,207,.22);
    border-radius:18px;
    background:rgba(4,11,27,.58);
}

.bj-main-tab{
    appearance:none;
    border:1px solid transparent;
    border-radius:13px;
    padding:13px 12px;
    color:#a8b8d3;
    background:transparent;
    font:inherit;
    font-size:13px;
    font-weight:850;
    cursor:pointer;
    transition:.2s ease;
}
.bj-main-tab:hover{color:#fff;background:rgba(255,255,255,.04)}
.bj-main-tab.is-active{
    color:#fff;
    border-color:rgba(59,221,255,.45);
    background:linear-gradient(135deg,rgba(18,118,166,.52),rgba(75,80,181,.50));
    box-shadow:0 0 20px rgba(0,211,255,.10);
}
.bj-tab-icon{display:inline-grid;place-items:center;min-width:25px;margin-right:6px;color:var(--cyan)}

.bj-section{margin-top:30px}
.bj-section[hidden]{display:none!important}
.bj-section-title{display:flex;align-items:end;justify-content:space-between;gap:20px;margin:0 0 17px}
.bj-section-title h2{margin:6px 0 0;font-size:clamp(26px,4vw,36px);letter-spacing:-.03em}
.bj-section-title p{max-width:520px;text-align:right;font-size:13px}

.bj-variant-picker,.bj-prob-picker{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:10px;
    margin-bottom:16px;
}

.bj-variant-button,.bj-prob-picker button{
    appearance:none;
    min-width:0;
    border:1px solid var(--line);
    border-radius:15px;
    color:#aebcd2;
    background:#0a152b;
    cursor:pointer;
    font:inherit;
    font-weight:850;
    transition:.18s ease;
}
.bj-variant-button{display:flex;align-items:center;gap:10px;padding:12px;text-align:left}
.bj-variant-button b{
    display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:11px;
    color:var(--cyan);border:1px solid rgba(57,218,255,.30);background:rgba(0,211,255,.05);font-size:13px
}
.bj-variant-button span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bj-variant-button:hover,.bj-prob-picker button:hover{border-color:rgba(72,230,255,.45);color:#fff}
.bj-variant-button.is-active,.bj-prob-picker button.is-active{
    border-color:rgba(72,230,255,.72);
    color:#fff;
    background:linear-gradient(135deg,rgba(11,68,105,.88),rgba(38,43,101,.88));
    box-shadow:inset 0 -2px 0 rgba(132,94,255,.82),0 0 18px rgba(0,213,255,.08);
}

.bj-chart-card,.bj-prob-card,.bj-counter-card,.bj-help-card,.bj-prob-profile{
    border:1px solid var(--line);
    border-radius:20px;
    background:linear-gradient(145deg,rgba(11,27,54,.97),rgba(7,17,35,.97));
    box-shadow:0 16px 40px rgba(0,0,0,.16);
}

.bj-chart-card{padding:18px}
.bj-chart-head,.bj-prob-card>header,.bj-counter-top,.bj-prob-profile{display:flex;align-items:center;justify-content:space-between;gap:18px}
.bj-chart-head{padding:3px 2px 14px}
.bj-chart-head h3,.bj-prob-card h3,.bj-counter-card h3,.bj-help-card h3,.bj-prob-profile h3{margin:5px 0 0;font-size:22px;letter-spacing:-.025em}

.bj-open-chart{
    border:1px solid rgba(66,215,255,.35);border-radius:12px;padding:10px 14px;
    color:#dff9ff;background:rgba(0,188,235,.08);font:inherit;font-size:12px;font-weight:900;cursor:pointer
}
.bj-open-chart:hover{background:rgba(0,188,235,.15)}
.bj-open-chart span{margin-right:5px;color:var(--cyan)}

.bj-rule-pills{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 14px}
.bj-rule-pills span{padding:6px 9px;border:1px solid rgba(93,133,204,.24);border-radius:999px;background:#071329;color:#9eb0cc;font-size:10px;font-weight:800}
.bj-rule-pills--compact{margin:0;justify-content:flex-end}

.bj-chart-image-button{
    display:block;width:100%;padding:0;border:0;border-radius:15px;overflow:hidden;background:#020713;cursor:zoom-in
}
.bj-chart-image-button img{display:block;width:100%;height:auto;max-width:100%;object-fit:contain}

/* probabilities */
.bj-prob-picker button{padding:12px 10px;font-size:12px}
.bj-prob-profile{padding:16px 18px;margin-bottom:14px}
.bj-prob-profile h3{font-size:18px}
.bj-prob-grid{display:grid;grid-template-columns:1fr;gap:14px}
.bj-prob-card{padding:16px;min-width:0}
.bj-prob-card>header{margin-bottom:12px}
.bj-prob-card h3{font-size:18px}
.bj-table-scroll{max-width:100%;overflow:auto;border:1px solid rgba(84,126,193,.17);border-radius:13px;background:#071126;scrollbar-width:thin}
.bj-prob-table{width:100%;min-width:650px;border-collapse:separate;border-spacing:0;font-size:12px}
.bj-prob-table th,.bj-prob-table td{padding:11px 10px;border-right:1px solid rgba(90,128,187,.13);border-bottom:1px solid rgba(90,128,187,.13);text-align:center;white-space:nowrap}
.bj-prob-table th{color:#9eb1cd;background:#0a1830;font-weight:850}
.bj-prob-table thead th:first-child,.bj-prob-table tbody th{position:sticky;left:0;z-index:2;background:#0a1830;color:#fff}
.bj-prob-table td{color:#eaf3ff;font-weight:800;background:linear-gradient(90deg,rgba(40,205,255,calc(var(--heat,0)*.16)),rgba(112,78,255,calc(var(--heat,0)*.16)))}
.bj-prob-table tr:last-child>*{border-bottom:0}.bj-prob-table tr>*:last-child{border-right:0}
.bj-prob-table .is-bust{color:#64edc7}.bj-prob-table .is-push22{color:#ffc763}
.bj-prob-note{margin-top:12px;padding:11px 14px;border:1px solid rgba(85,133,205,.18);border-radius:12px;background:#071123;color:#8096b6;font-size:11px;line-height:1.55}

/* counter */
.bj-counter-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(330px,.75fr);gap:14px;align-items:start}
.bj-counter-card,.bj-help-card{padding:20px}
.bj-counter-top{margin-bottom:16px}
.bj-deck-select{display:grid;gap:5px;color:#8298b8;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.bj-deck-select select{min-width:105px;border:1px solid rgba(91,132,199,.30);border-radius:10px;background:#071226;color:#fff;padding:9px 10px;font:inherit;font-size:13px}
.bj-hilo-scale{display:grid;grid-template-columns:1fr .75fr 1.2fr;gap:8px;margin-bottom:14px}
.bj-hilo-scale>div{display:flex;align-items:center;justify-content:center;gap:9px;padding:10px;border:1px solid rgba(88,128,192,.18);border-radius:11px;background:#071226;color:#99abc6;font-size:12px;font-weight:800}
.bj-hilo-scale b{font-size:17px;color:#fff}.bj-hilo-scale .plus b{color:#5ce8bd}.bj-hilo-scale .minus b{color:#ff7890}
.bj-card-buttons{display:grid;grid-template-columns:repeat(13,1fr);gap:6px;margin:0 0 16px}
.bj-card-buttons button{min-width:0;height:44px;border:1px solid rgba(64,214,255,.24);border-radius:9px;background:#0a1931;color:#fff;font:inherit;font-size:13px;font-weight:900;cursor:pointer;transition:.12s ease}
.bj-card-buttons button:hover{border-color:var(--cyan);background:#0d2342}.bj-card-buttons button.is-tapped{transform:scale(.92);background:#135278}
.bj-counter-results{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.bj-counter-results>div{padding:13px;border:1px solid rgba(85,125,191,.20);border-radius:12px;background:#071226}
.bj-counter-results span{display:block;margin-bottom:4px;color:#7f94b2;font-size:10px;font-weight:800}.bj-counter-results strong{font-size:20px;color:#fff}
.bj-count-reading{margin-top:10px;padding:12px 14px;border:1px solid rgba(75,229,199,.18);border-radius:11px;background:rgba(17,77,72,.18);color:#9ce8d3;font-size:12px;line-height:1.5}
.bj-counter-actions{display:flex;gap:8px;margin-top:12px}
.bj-counter-actions button{border:1px solid rgba(85,126,194,.28);border-radius:10px;padding:10px 13px;background:#0a1830;color:#c9d6e9;font:inherit;font-size:11px;font-weight:850;cursor:pointer}
.bj-counter-actions .is-danger{border-color:rgba(255,91,118,.25);color:#ff9aac}
.bj-count-help{display:grid;gap:14px}
.bj-help-card p{margin:10px 0 0;color:#8fa5c3;font-size:12px;line-height:1.65}
.bj-compat{display:grid;gap:7px;margin-top:12px}
.bj-compat>div{display:grid;grid-template-columns:1fr auto;gap:3px 8px;padding:10px 11px;border:1px solid rgba(83,123,187,.17);border-radius:11px;background:#071226}
.bj-compat b{font-size:12px}.bj-compat span{font-size:9px;font-weight:950;letter-spacing:.06em}.bj-compat small{grid-column:1/-1;color:#7890b1;font-size:10px}
.bj-compat .yes{color:#5ee8bf}.bj-compat .no{color:#ff8195}.bj-compat .maybe{color:#ffca67}

/* lightbox */
body.bj-lightbox-open{overflow:hidden}
.bj-lightbox{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:18px}
.bj-lightbox[hidden]{display:none!important}
.bj-lightbox-backdrop{position:absolute;inset:0;background:rgba(0,5,14,.94);backdrop-filter:blur(8px)}
.bj-lightbox-dialog{position:relative;display:flex;flex-direction:column;width:min(1320px,96vw);height:min(94vh,1100px);border:1px solid rgba(55,220,255,.38);border-radius:18px;overflow:hidden;background:#050b17;box-shadow:0 30px 90px rgba(0,0,0,.55)}
.bj-lightbox-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-bottom:1px solid rgba(83,125,192,.18);background:#08152a}
.bj-lightbox-dialog>header strong{font-size:13px}.bj-lightbox-dialog>header div{display:flex;gap:6px}
.bj-lightbox-dialog>header button{border:1px solid rgba(82,127,196,.24);border-radius:8px;background:#0a1931;color:#fff;min-width:36px;height:34px;font:inherit;font-weight:850;cursor:pointer}
.bj-lightbox-dialog>header .bj-lightbox-close{color:#ff9aac}
.bj-lightbox-scroll{flex:1;overflow:auto;padding:14px;text-align:center}
.bj-lightbox-scroll img{display:block;width:100%;height:auto;max-width:none;margin:0 auto;transition:width .12s ease;transform-origin:top center}

@media(max-width:900px){
    .bj-head{align-items:stretch;flex-direction:column;padding:24px}
    .bj-main-tabs{min-width:0;width:100%}
    .bj-counter-layout{grid-template-columns:1fr}
    .bj-card-buttons{grid-template-columns:repeat(7,1fr)}
}

@media(max-width:640px){
    .bj-page{padding:24px 12px 58px}
    .bj-head{padding:18px;border-radius:19px}
    .bj-head h1{font-size:40px}
    .bj-head p{font-size:12px;margin-top:8px}
    .bj-main-tabs{grid-template-columns:1fr;padding:6px}
    .bj-main-tab{display:flex;align-items:center;justify-content:flex-start;padding:11px 12px}
    .bj-section{margin-top:24px}
    .bj-section-title{align-items:flex-start;flex-direction:column;gap:5px}
    .bj-section-title h2{font-size:27px}.bj-section-title p{text-align:left;margin-top:0;font-size:11px}
    .bj-variant-picker,.bj-prob-picker{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
    .bj-variant-button{padding:9px;gap:7px;font-size:11px}.bj-variant-button b{width:35px;height:35px;font-size:11px}
    .bj-variant-button:last-child{grid-column:1/-1}
    .bj-prob-picker button{padding:10px 6px;font-size:11px}.bj-prob-picker button:last-child{grid-column:1/-1}
    .bj-chart-card{padding:10px;border-radius:16px}.bj-chart-head{padding:3px 3px 10px}.bj-chart-head h3{font-size:18px}
    .bj-open-chart{padding:8px 10px;font-size:10px}.bj-rule-pills{gap:5px;margin-bottom:9px}.bj-rule-pills span{font-size:9px;padding:5px 7px}
    .bj-chart-image-button{border-radius:10px}
    .bj-prob-profile{align-items:flex-start;flex-direction:column;padding:13px}.bj-rule-pills--compact{justify-content:flex-start}
    .bj-prob-card{padding:10px}.bj-prob-card h3{font-size:16px}.bj-prob-table{min-width:560px;font-size:10px}.bj-prob-table th,.bj-prob-table td{padding:9px 7px}
    .bj-counter-card,.bj-help-card{padding:14px}.bj-counter-top{align-items:flex-start}.bj-counter-card h3{font-size:18px}
    .bj-hilo-scale{grid-template-columns:1fr}.bj-card-buttons{grid-template-columns:repeat(5,1fr)}.bj-card-buttons button{height:42px}
    .bj-counter-results{grid-template-columns:repeat(2,1fr)}.bj-counter-results strong{font-size:18px}
    .bj-counter-actions{display:grid;grid-template-columns:1fr 1fr}.bj-counter-actions button{padding:10px 6px}
    .bj-lightbox{padding:0}.bj-lightbox-dialog{width:100vw;height:100vh;border-radius:0;border-left:0;border-right:0}.bj-lightbox-scroll{padding:8px}
}


/* =========================================================
   CAZISTATS — BLACKJACK MOBILE VARIANT BUTTONS
   1 variante par ligne
   ========================================================= */

@media(max-width:640px){

    .bj-variant-picker{
        display:grid;
        grid-template-columns:1fr;
        gap:8px;
        width:100%;
    }

    .bj-variant-button,
    .bj-variant-button:last-child{
        grid-column:auto;

        width:100%;
        min-width:0;
        min-height:56px;

        padding:9px 12px;

        display:flex;
        align-items:center;

        gap:10px;
    }

    .bj-variant-button b{
        width:36px;
        height:36px;

        flex:0 0 36px;

        font-size:11px;
    }

    .bj-variant-button span{
        flex:1;

        min-width:0;

        white-space:normal;
        overflow:visible;
        text-overflow:clip;

        line-height:1.25;
    }

}
