/* =====================================================
   XIXOU BUILDER V92.7 - CORRECTIONS DÉFINITIVES
   Chargé APRÈS v88-fixes.css
   ===================================================== */

/* V92.7 loaded */


/* =====================================================
   1. CROIX × — DANS LE CADRE (ultra-spécificité)
   ===================================================== */

body .xb-wrapper .xb-slot .xb-remove {
    position: absolute !important;
    top: 4px !important;
    right: 4px !important;
    width: 18px !important;
    height: 18px !important;
    background: rgba(200, 30, 30, 0.92) !important;
    color: white !important;
    border-radius: 50% !important;
    border: none !important;
    display: none !important;
    z-index: 60 !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 18px !important;
    padding: 0 !important;
    text-align: center !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.7) !important;
}

body .xb-wrapper .xb-slot.filled:hover .xb-remove {
    display: flex !important;
}

body .xb-wrapper .xb-slot .xb-remove:hover {
    background: #ef4444 !important;
    transform: scale(1.15) !important;
}

/* Dofus slots */
body .xb-wrapper .xb-dofus-inline .xb-slot-dofus .xb-remove {
    top: 2px !important;
    right: 2px !important;
    width: 14px !important;
    height: 14px !important;
    font-size: 9px !important;
    line-height: 14px !important;
}

/* Split mode (60px slots) */
body .xb-split-container.split-active .xb-slot .xb-remove {
    top: 2px !important;
    right: 2px !important;
    width: 16px !important;
    height: 16px !important;
    font-size: 10px !important;
    line-height: 16px !important;
}


/* =====================================================
   2. SLOT TOOLTIPS + MYSTERY BOX FIX
   
   PROBLÈME 1: Le tooltip ::after (data-slot-name) passe sous le header
   → Les parents ont overflow:hidden qui clip le tooltip
   PROBLÈME 2: "Case vide" = le tooltip slot-name s'affiche même
   sur les slots remplis, créant un cadre vide inutile
   PROBLÈME 3: v88 ::after sur forged = ⚒️ orange conflicte
   ===================================================== */

/* col-doll clips content + flex shrinks — override v88 flex: 2.5 + min-width: 550px */
body .xb-col-doll,
body .mode-build .xb-col-doll {
    overflow: hidden !important;
    min-width: 200px !important;
    flex: 1.5 1 350px !important;
}

/* Override v88 col-stats width: 750px + min-width: 720px → flexible with cap */
body .xb-col-stats,
body .mode-build .xb-col-stats {
    width: auto !important;
    max-width: 750px !important;
    min-width: 200px !important;
    flex: 1 1 400px !important;
}

/* Override v88 col-bonus width: 300px + min-width: 280px */
body .xb-col-bonus,
body .mode-build .xb-col-bonus {
    width: auto !important;
    max-width: 300px !important;
    min-width: 100px !important;
    flex: 0 1 250px !important;
}

/* Override col-manage width: 340px */
body .xb-col-manage {
    width: auto !important;
    max-width: 340px !important;
    min-width: 100px !important;
    flex-shrink: 1 !important;
}

/* ==== ÉLÉMENTS INTERNES RESPONSIFS ==== */

/* Sprite: override base height: 360px → responsive */
body .xb-sprite,
body #xb-char-sprite {
    height: auto !important;
    max-height: 280px !important;
    max-width: 100% !important;
    width: auto !important;
    object-fit: contain !important;
}

/* Char-zone: override base min-height: 450px → auto */
body .xb-char-zone {
    min-height: 0 !important;
    height: auto !important;
}

/* Doll-grid: override base height: 100% → auto */
body .xb-doll-grid {
    height: auto !important;
}

/* Slots équipement: responsive dans leur cellule grille */
/* Exclure les dofus (par classe OU par parent OU par ID) */
body .xb-wrapper .xb-slot:not(.xb-slot-dofus):not([id^="slot-dofus"]),
body .mode-build .xb-slot:not(.xb-slot-dofus):not([id^="slot-dofus"]) {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    max-width: 70px !important;
    box-sizing: border-box !important;
}

/* Dofus slots: taille fixe — ciblés par classe, ID et parent */
body .xb-wrapper .xb-dofus-inline .xb-slot-dofus,
body .xb-wrapper .xb-slot-dofus,
body .xb-slot-dofus,
body .xb-dofus-inline > .xb-slot,
body .xb-wrapper [id^="slot-dofus"] {
    width: 42px !important;
    height: 42px !important;
    flex-shrink: 0 !important;
    aspect-ratio: auto !important;
}
body .xb-doll-grid {
    max-width: 100% !important;
    grid-template-columns: minmax(50px, 70px) 1fr minmax(50px, 70px) !important;
}

/* Split-active: doll-grid encore plus compact */
body .xb-split-container.split-active .xb-doll-grid {
    grid-template-columns: minmax(40px, 60px) 1fr minmax(40px, 60px) !important;
}
body .xb-split-container.split-active .xb-slot:not(.xb-slot-dofus):not([id^="slot-dofus"]) {
    max-width: 60px !important;
}
body .xb-split-container.split-active .xb-dofus-inline .xb-slot-dofus,
body .xb-split-container.split-active .xb-slot-dofus,
body .xb-split-container.split-active .xb-dofus-inline > .xb-slot,
body .xb-split-container.split-active [id^="slot-dofus"] {
    width: 36px !important;
    height: 36px !important;
    aspect-ratio: auto !important;
}
body .xb-split-container.split-active .xb-sprite,
body .xb-split-container.split-active #xb-char-sprite {
    max-height: 180px !important;
}

body .xb-char-zone,
body .xb-hero-display,
body .xb-hero-row,
body .xb-dofus-inline {
    overflow: visible !important;
}

/* Slot de base */
body .xb-wrapper .xb-slot {
    position: relative !important;
}

body .xb-wrapper .xb-slot:hover {
    z-index: 100 !important;
}

/* Tooltip sur slots VIDES uniquement - fonctionne déjà via v88 ::after */
body .xb-wrapper .xb-slot::after {
    z-index: 200 !important;
}

/* MASQUER le tooltip sur les slots REMPLIS = le "mystery box" */
body .xb-wrapper .xb-slot.filled::after {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

/* MASQUER aussi sur forged (qui sont toujours filled) */
body .xb-wrapper .xb-slot.forged::after {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

/* Idem exo+forged */
body .xb-wrapper .xb-slot.exo.forged::after {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

/* Hero row ne bloque pas le tooltip des slots vides */
body .xb-hero-row,
body .xb-hero-display {
    z-index: auto !important;
    position: relative !important;
}

/* Remplacer le marteau SVG (::before) par un label FM texte */
body .xb-wrapper .xb-slot.forged:not(.exo)::before {
    content: 'FM' !important;
    position: absolute !important;
    top: -9px !important;
    left: -9px !important;
    right: auto !important;
    width: auto !important;
    height: auto !important;
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #fff !important;
    font-size: 0.5rem !important;
    font-weight: 900 !important;
    padding: 2px 5px !important;
    border-radius: 5px !important;
    z-index: 70 !important;
    line-height: 1.2 !important;
    filter: none !important;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.5) !important;
}

/* Cacher le bouton customize orphelin */
body .xb-slot-customize,
body .xb-wrapper .xb-slot-customize {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* FM button CSS orphelin - masquer */
body .xb-slot-fm-btn {
    display: none !important;
}


/* =====================================================
   3. EXO BADGE — Label dynamique (data-exo-label)
   ===================================================== */

body .xb-wrapper .xb-slot.exo {
    border: 2px dashed #a855f7 !important;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.5) !important;
    animation: exo-pulse-v92 2s ease-in-out infinite !important;
}

body .xb-wrapper .xb-slot.exo[data-exo-label]::before {
    content: attr(data-exo-label) !important;
    position: absolute !important;
    top: -10px !important;
    right: -10px !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    background: linear-gradient(135deg, #9333ea, #7c3aed) !important;
    color: #fff !important;
    font-size: 0.5rem !important;
    font-weight: 900 !important;
    padding: 2px 5px !important;
    border-radius: 5px !important;
    z-index: 70 !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.5) !important;
    filter: none !important;
}

body .xb-wrapper .xb-slot.exo:not([data-exo-label])::before {
    content: 'EXO' !important;
    position: absolute !important;
    top: -10px !important;
    right: -10px !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    background: linear-gradient(135deg, #9333ea, #7c3aed) !important;
    color: #fff !important;
    font-size: 0.5rem !important;
    font-weight: 900 !important;
    padding: 2px 5px !important;
    border-radius: 5px !important;
    z-index: 70 !important;
    line-height: 1.2 !important;
    filter: none !important;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.5) !important;
}

body .xb-wrapper .xb-slot.exo.forged[data-exo-label]::before {
    background: linear-gradient(135deg, #f59e0b, #9333ea) !important;
}

body .xb-wrapper .xb-slot.exo.forged:not([data-exo-label])::before {
    content: 'EXO+FM' !important;
    background: linear-gradient(135deg, #f59e0b, #9333ea) !important;
}

/* exo.forged ::after déjà masqué par la règle .filled ci-dessus */

@keyframes exo-pulse-v92 {
    0%, 100% { box-shadow: 0 0 12px rgba(168, 85, 247, 0.5); }
    50% { box-shadow: 0 0 22px rgba(168, 85, 247, 0.8); }
}


/* =====================================================
   4. ICÔNES STATS -5%
   ===================================================== */

.xb-sl-item img { width: 19px !important; height: 19px !important; }
.xb-sl-item.xb-sl-compact img { width: 17px !important; height: 17px !important; }


/* =====================================================
   5. AFFICHER STATS SANS SCROLL
   
   CAUSE: .xb-split-container a height fixe + overflow:hidden
   FIX: Container height:auto, panneau droit sticky
   ===================================================== */

body .xb-split-container,
body .xb-split-container.split-active {
    height: auto !important;
    min-height: calc(100vh - 180px) !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
}

body .xb-split-container .xb-split-left,
body .xb-split-container.split-active .xb-split-left {
    overflow: hidden !important;
    height: auto !important;
    min-width: 0 !important;
}

body .xb-split-main,
body .mode-build .xb-split-main,
body .xb-split-container.split-active .xb-split-main {
    overflow: hidden !important;
    height: auto !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

body .xb-col-doll,
body .mode-build .xb-col-doll,
body .xb-split-container.split-active .xb-col-doll {
    overflow: hidden !important;
    height: auto !important;
    max-height: none !important;
    min-width: 200px !important;
    flex: 1.5 1 350px !important;
}

/* Override v88 split-right min-width: 400px */
body .xb-split-container.split-active .xb-split-right {
    min-width: 0 !important;
}

body .xb-all-stats,
body .xb-split-container.split-active .xb-col-doll .xb-all-stats {
    overflow: hidden !important;
    max-height: none !important;
    height: auto !important;
}

body .xb-all-stats .xb-stats-section:last-of-type {
    padding-bottom: 25px !important;
    margin-bottom: 15px !important;
}

/* === RESPONSIVE SPLIT MODE === */
@media (max-width: 1300px) {
    body .xb-split-container.split-active .xb-col-doll {
        padding: 8px !important;
    }
    body .xb-split-container.split-active .xb-col-doll .xb-all-stats {
        padding: 8px 10px !important;
    }
}

@media (max-width: 1100px) {
    body .xb-split-container.split-active .xb-col-doll {
        padding: 5px !important;
    }
    body .xb-split-container.split-active .xb-split-left {
        flex: 0 0 35% !important;
        max-width: 35% !important;
    }
    body .xb-split-container.split-active .xb-split-right {
        flex: 0 0 65% !important;
        width: 65% !important;
    }
}

/* Split-right min-width override covered above */

/* PANNEAU DROIT: sticky + scroll interne — z-index above slot hover */
body .xb-split-container.split-active .xb-split-right {
    position: sticky !important;
    top: 20px !important;
    height: calc(100vh - 60px) !important;
    max-height: calc(100vh - 60px) !important;
    align-self: flex-start !important;
    overflow: hidden !important;
    z-index: 500 !important;
}

body .xb-split-container.split-active .xb-split-ency {
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
}

/* Stats column mode normal */
body .xb-col-stats,
body .mode-build .xb-col-stats {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: none !important;
}

body .xb-stats-body,
body .mode-build .xb-stats-body {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

body #xb-stats-secondary {
    overflow: visible !important;
    max-height: none !important;
    padding-bottom: 20px !important;
}


/* =====================================================
   6. ACCORDION FERMÉ — ÉTANCHE
   ===================================================== */

body .xb-filters-accordion,
body .xb-filters-accordion:not(.open) {
    max-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

body .xb-filters-accordion.open {
    max-height: 600px !important;
    overflow: visible !important;
    margin-top: 10px !important;
    padding: 10px !important;
    border-top: 1px solid rgba(212, 175, 55, 0.2) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

.xb-split-filter-btn.xb-filter-res-per { border-color: rgba(147, 51, 234, 0.4) !important; color: #c4b5fd !important; }
.xb-split-filter-btn.xb-filter-res-per.active { background: rgba(147, 51, 234, 0.3) !important; border-color: #9333ea !important; }
.xb-split-filter-btn.xb-filter-divers { border-color: rgba(100, 116, 139, 0.4) !important; color: #94a3b8 !important; }
.xb-split-filter-btn.xb-filter-divers.active { background: rgba(100, 116, 139, 0.3) !important; border-color: #64748b !important; }


/* =====================================================
   7. TEXTES AGRANDIS — Header split panel
   ===================================================== */

body .xb-split-close-btn { font-size: 1rem !important; font-weight: 700 !important; }
body .xb-split-ency-title h2, body #xb-split-slot-name { font-size: 1.25rem !important; font-weight: 800 !important; }
body .xb-split-current-label { font-size: 0.85rem !important; font-weight: 700 !important; text-transform: uppercase !important; }
body .xb-split-current-item .xb-split-item-name { font-size: 1.05rem !important; font-weight: 700 !important; }
body .xb-split-search-input { font-size: 1rem !important; }
body .xb-split-sort-select { font-size: 0.95rem !important; font-weight: 600 !important; }
body .xb-filters-toggle { font-size: 0.95rem !important; font-weight: 700 !important; }
body .xb-filter-label { font-size: 0.9rem !important; font-weight: 700 !important; }
body .xb-split-lvl-input { font-size: 1rem !important; font-weight: 700 !important; }


/* =====================================================

/* =====================================================
   8. MODAL FM — REFONTE NO-SCROLL + TEXTES AGRANDIS
   ===================================================== */

/* --- Overlay scrollable (pas le body interne) --- */
body #xb-fm-modal.xb-modal-overlay {
    overflow-y: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px 15px !important;
}

/* --- Switcher items avec images --- */
body #xb-fm-modal .xb-fm-switcher {
    display: flex !important;
    gap: 5px !important;
    padding: 10px 10px !important;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 100%) !important;
    border-bottom: 2px solid rgba(147, 51, 234, 0.25) !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
}

body #xb-fm-modal .xb-fm-sw-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 8px 8px 7px !important;
    border-radius: 12px !important;
    border: 1.5px solid rgba(255,255,255,0.06) !important;
    background: rgba(255,255,255,0.025) !important;
    color: #9ca3af !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    min-width: 115px !important;
    max-width: 160px !important;
    position: relative !important;
    font-size: 0 !important;
}

body #xb-fm-modal .xb-fm-sw-btn:hover {
    background: rgba(147, 51, 234, 0.1) !important;
    border-color: rgba(147, 51, 234, 0.3) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

body #xb-fm-modal .xb-fm-sw-btn.active {
    background: linear-gradient(160deg, rgba(147, 51, 234, 0.2), rgba(79, 70, 229, 0.1)) !important;
    border-color: #9333ea !important;
    box-shadow: 0 4px 16px rgba(147, 51, 234, 0.3), inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

body #xb-fm-modal .xb-fm-sw-btn.active .xb-fm-sw-label { color: #f59e0b !important; }

body #xb-fm-modal .xb-fm-sw-img {
    width: 52px !important;
    height: 52px !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    background: rgba(0,0,0,0.45) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    padding: 4px !important;
    flex-shrink: 0 !important;
    transition: all 0.15s ease !important;
}

body #xb-fm-modal .xb-fm-sw-btn.active .xb-fm-sw-img {
    border-color: rgba(147, 51, 234, 0.5) !important;
    background: rgba(147, 51, 234, 0.15) !important;
    box-shadow: 0 2px 10px rgba(147, 51, 234, 0.25) !important;
}

body #xb-fm-modal .xb-fm-sw-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1px !important;
    min-width: 0 !important;
    width: 100% !important;
}

body #xb-fm-modal .xb-fm-sw-label {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    color: #6b7280 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

body #xb-fm-modal .xb-fm-sw-name {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: #e5e7eb !important;
    white-space: nowrap !important;
    max-width: 145px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
    text-align: center !important;
}

body #xb-fm-modal .xb-fm-sw-btn.active .xb-fm-sw-name { color: #f5f5f5 !important; font-weight: 700 !important; }

body #xb-fm-modal .xb-fm-sw-dot {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    font-size: 0.6rem !important;
    line-height: 1 !important;
    z-index: 2 !important;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)) !important;
}

/* --- Modal box: WIDER, constrained height, scrollable body --- */
body #xb-fm-modal .xb-modal-box {
    max-width: 1250px !important;
    width: 98% !important;
    max-height: calc(100vh - 80px) !important;
    border: 2px solid rgba(147, 51, 234, 0.45) !important;
    border-radius: 16px !important;
    background: linear-gradient(160deg, #1a1028 0%, #0f0f1a 40%, #0d0d18 100%) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(147, 51, 234, 0.15), inset 0 1px 0 rgba(147, 51, 234, 0.1) !important;
    overflow: hidden !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* --- Header --- */
body #xb-fm-modal .xb-modal-header {
    padding: 16px 20px !important;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.12), rgba(79, 70, 229, 0.06)) !important;
    border-bottom: 1px solid rgba(147, 51, 234, 0.2) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

body #xb-fm-modal .xb-fm-header-left { display: flex !important; align-items: center !important; gap: 14px !important; }
body #xb-fm-modal .xb-fm-header-img { width: 60px !important; height: 60px !important; object-fit: contain !important; border-radius: 10px !important; background: rgba(0,0,0,0.4) !important; border: 2px solid rgba(147, 51, 234, 0.4) !important; padding: 4px !important; }
body #xb-fm-modal .xb-fm-header-info h3, body #xb-fm-modal .xb-modal-header h3 { font-size: 1.9rem !important; font-weight: 800 !important; color: #e9d5ff !important; text-shadow: 0 2px 10px rgba(147, 51, 234, 0.4) !important; margin: 0 !important; }
body #xb-fm-modal .xb-fm-header-level { font-size: 1.2rem !important; color: #f59e0b !important; font-weight: 700 !important; }
body #xb-fm-modal .xb-fm-header-pano { font-size: 1.05rem !important; color: #a78bfa !important; }
body #xb-fm-modal .xb-fm-mod-count { font-size: 0.95rem !important; background: rgba(245, 158, 11, 0.2) !important; color: #f59e0b !important; padding: 3px 12px !important; border-radius: 20px !important; font-weight: 700 !important; }
body #xb-fm-modal .xb-modal-close { font-size: 1.8rem !important; width: 40px !important; height: 40px !important; display: flex !important; align-items: center !important; justify-content: center !important; border-radius: 50% !important; background: rgba(255,255,255,0.08) !important; cursor: pointer !important; color: #d1d5db !important; }
body #xb-fm-modal .xb-modal-close:hover { background: rgba(239, 68, 68, 0.3) !important; }

/* --- Weight summary bar --- */
body #xb-fm-modal .xb-fm-weight-summary {
    display: none !important;
}

body #xb-fm-modal .xb-fm-weight-info { display: flex !important; flex-direction: column !important; min-width: 110px !important; }
body #xb-fm-modal .xb-fm-weight-label { font-size: 0.95rem !important; color: #6b7280 !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; font-weight: 600 !important; }
body #xb-fm-modal .xb-fm-weight-val { font-size: 1.25rem !important; color: #d1d5db !important; }
body #xb-fm-modal .xb-fm-weight-val strong { color: #f0f0f0 !important; font-size: 1.45rem !important; }
body #xb-fm-modal .xb-fm-weight-bar { flex: 1 !important; height: 10px !important; background: rgba(255,255,255,0.08) !important; border-radius: 8px !important; overflow: hidden !important; }
body #xb-fm-modal .xb-fm-weight-fill { height: 100% !important; border-radius: 8px !important; transition: width 0.3s ease !important; }
body #xb-fm-modal .xb-fm-weight-pct { font-size: 1.45rem !important; font-weight: 800 !important; min-width: 56px !important; text-align: right !important; }

/* --- Body: scrollable within constrained modal --- */
body #xb-fm-modal .xb-modal-body {
    padding: 10px 4px !important;
    overflow-y: auto !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
}

/* --- TAB SYSTEM: Stats / Exomagie --- */
body #xb-fm-modal .xb-fm-tabs {
    display: flex !important;
    gap: 0 !important;
    padding: 0 20px !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border-bottom: 2px solid rgba(147, 51, 234, 0.15) !important;
}

body #xb-fm-modal .xb-fm-tab {
    flex: 1 !important;
    padding: 14px 20px !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #9ca3af !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
}

body #xb-fm-modal .xb-fm-tab:hover {
    color: #c4b5fd !important;
    background: rgba(147, 51, 234, 0.06) !important;
}

body #xb-fm-modal .xb-fm-tab.active {
    color: #e9d5ff !important;
    border-bottom-color: #9333ea !important;
    background: rgba(147, 51, 234, 0.08) !important;
}

body #xb-fm-modal .xb-fm-tab-content {
    display: none !important;
}

body #xb-fm-modal .xb-fm-tab-content.active {
    display: block !important;
}

/* --- Section heads --- */
body #xb-fm-modal .xb-fm-section { background: rgba(0, 0, 0, 0.15) !important; border-radius: 10px !important; padding: 6px !important; border: 1px solid rgba(147, 51, 234, 0.15) !important; margin-bottom: 6px !important; }
body #xb-fm-modal .xb-fm-stats { display: flex !important; flex-direction: column !important; gap: 8px !important; }
body #xb-fm-modal .xb-fm-section-head { display: flex !important; justify-content: space-between !important; align-items: center !important; margin-bottom: 14px !important; }
body #xb-fm-modal .xb-fm-section-title { font-size: 1.5rem !important; font-weight: 800 !important; color: #f59e0b !important; text-transform: uppercase !important; font-family: inherit !important; }

/* --- Quick buttons --- */
body #xb-fm-modal .xb-fm-quick-btns { display: flex !important; gap: 8px !important; }
body #xb-fm-modal .xb-fm-quick-btn { padding: 8px 18px !important; font-size: 1.1rem !important; font-weight: 700 !important; border-radius: 8px !important; border: 1px solid rgba(255,255,255,0.15) !important; background: rgba(255,255,255,0.04) !important; color: #d1d5db !important; cursor: pointer !important; transition: all 0.15s ease !important; }
body #xb-fm-modal .xb-fm-quick-btn:hover { background: rgba(255,255,255,0.1) !important; }
body #xb-fm-modal .xb-fm-qb-perfect:hover { border-color: #22c55e !important; color: #4ade80 !important; }
body #xb-fm-modal .xb-fm-qb-reset:hover { border-color: #f59e0b !important; color: #fbbf24 !important; }

/* --- Stats grid: 2 columns desktop --- */
body #xb-fm-modal .xb-fm-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
}

/* --- Single stat row --- */
body #xb-fm-modal .xb-fm-stat {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    padding: 10px 10px 8px !important;
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid rgba(255,255,255,0.07) !important;
    border-radius: 10px !important;
    transition: all 0.15s ease !important;
    gap: 6px !important;
    overflow: hidden !important;
}

body #xb-fm-modal .xb-fm-stat:hover { background: rgba(255,255,255,0.05) !important; border-color: rgba(255,255,255,0.12) !important; }
body #xb-fm-modal .xb-fm-stat.over { border-left: 3px solid #f59e0b !important; }
body #xb-fm-modal .xb-fm-stat.under { border-left: 3px solid #ef4444 !important; }
body #xb-fm-modal .xb-fm-stat.perfect { border-left: 3px solid #22c55e !important; }

/* Stat top row — name + diff */
body #xb-fm-modal .xb-fm-stat-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
}
body #xb-fm-modal .xb-fm-stat-namerow {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    min-width: 0 !important;
    flex: 1 !important;
}
body #xb-fm-modal .xb-fm-stat-icon {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
}
body #xb-fm-modal .xb-fm-stat-label {
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
}
body #xb-fm-modal .xb-fm-stat-left { display: none !important; }
body #xb-fm-modal .xb-fm-stat-name { display: none !important; }

/* Mid row — jet badge + gauge pct aligned */
body #xb-fm-modal .xb-fm-stat-mid {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    margin: 2px 0 !important;
}

/* Jet display (min › max) — premium glass badge */
body #xb-fm-modal .xb-fm-jet {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.12), rgba(245, 158, 11, 0.08), rgba(147, 51, 234, 0.06)) !important;
    border: 1px solid rgba(147, 51, 234, 0.25) !important;
    padding: 3px 12px !important;
    border-radius: 6px !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    font-variant-numeric: tabular-nums !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.12), inset 0 1px 0 rgba(255,255,255,0.05) !important;
    position: relative !important;
}
body #xb-fm-modal .xb-fm-jet::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: 6px !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 50%) !important;
    pointer-events: none !important;
}
body #xb-fm-modal .xb-fm-jet-min {
    color: #c4b5fd !important;
    text-shadow: 0 0 6px rgba(167, 139, 250, 0.3) !important;
}
body #xb-fm-modal .xb-fm-jet-sep {
    color: rgba(250, 204, 21, 0.5) !important;
    font-weight: 400 !important;
    margin: 0 5px !important;
    font-size: 0.95rem !important;
}
body #xb-fm-modal .xb-fm-jet-max {
    color: #facc15 !important;
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.3) !important;
}

/* Old range bar / badges hidden */
body #xb-fm-modal .xb-fm-range-bar { display: none !important; }
body #xb-fm-modal .xb-fm-stat-badges { display: none !important; }
body #xb-fm-modal .xb-fm-stat-range { display: none !important; }
body #xb-fm-modal .xb-fm-stat-weight { display: none !important; }
body #xb-fm-modal .xb-fm-ovmax-badge { display: none !important; }
body #xb-fm-modal .xb-fm-rune-tip { display: none !important; }

/* Over tag */
body #xb-fm-modal .xb-fm-over-tag { font-size: 0.78rem !important; background: linear-gradient(135deg, #f59e0b, #d97706) !important; color: #000 !important; padding: 2px 7px !important; border-radius: 4px !important; font-weight: 800 !important; margin-left: 2px !important; }

/* Diff badge */
body #xb-fm-modal .xb-fm-diff { font-size: 1.25rem !important; font-weight: 900 !important; min-width: 38px !important; text-align: center !important; padding: 4px 8px !important; border-radius: 7px !important; flex-shrink: 0 !important; }
body #xb-fm-modal .xb-fm-diff.over { background: rgba(245, 158, 11, 0.25) !important; color: #f59e0b !important; }
body #xb-fm-modal .xb-fm-diff.under { background: rgba(239, 68, 68, 0.2) !important; color: #f87171 !important; }
body #xb-fm-modal .xb-fm-diff.perfect { color: #22c55e !important; font-size: 1.25rem !important; }

/* Stat bottom row — gauge + input */
body #xb-fm-modal .xb-fm-stat-bottom { display: flex !important; align-items: center !important; gap: 8px !important; }

/* Gauge */
body #xb-fm-modal .xb-fm-gauge-wrap { display: flex !important; align-items: center !important; gap: 4px !important; flex: 1 !important; }
body #xb-fm-modal .xb-fm-gauge { flex: 1 !important; height: 10px !important; background: rgba(255,255,255,0.1) !important; border-radius: 6px !important; overflow: hidden !important; position: relative !important; }
body #xb-fm-modal .xb-fm-gauge-fill { height: 100% !important; border-radius: 6px !important; transition: width 0.2s ease !important; }
body #xb-fm-modal .xb-fm-gauge-overzone { position: absolute !important; top: 0 !important; bottom: 0 !important; width: 2px !important; background: rgba(255,255,255,0.4) !important; }
body #xb-fm-modal .xb-fm-gauge-pct { font-size: 1.1rem !important; font-weight: 800 !important; min-width: 40px !important; text-align: right !important; }
body #xb-fm-modal .xb-fm-stat.perfect .xb-fm-gauge-pct { color: #22c55e !important; }
body #xb-fm-modal .xb-fm-stat.under .xb-fm-gauge-pct { color: #ef4444 !important; }
body #xb-fm-modal .xb-fm-stat.over .xb-fm-gauge-pct { color: #f59e0b !important; }

/* Input group */
body #xb-fm-modal .xb-fm-input-group {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 2px solid rgba(147, 51, 234, 0.3) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

body #xb-fm-modal .xb-fm-btn-pm {
    width: 32px !important;
    height: 32px !important;
    border: none !important;
    background: rgba(147, 51, 234, 0.1) !important;
    color: #c4b5fd !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.15s ease !important;
}

body #xb-fm-modal .xb-fm-btn-pm:hover { background: rgba(147, 51, 234, 0.3) !important; color: #e9d5ff !important; }
body #xb-fm-modal .xb-fm-btn-pm:active { background: rgba(147, 51, 234, 0.5) !important; }

body #xb-fm-modal .xb-fm-input {
    width: 48px !important;
    text-align: center !important;
    border: none !important;
    background: transparent !important;
    color: #f0f0f0 !important;
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    padding: 5px 2px !important;
    -moz-appearance: textfield !important;
}

body #xb-fm-modal .xb-fm-input::-webkit-inner-spin-button,
body #xb-fm-modal .xb-fm-input::-webkit-outer-spin-button { -webkit-appearance: none !important; margin: 0 !important; }
body #xb-fm-modal .xb-fm-input:focus { outline: none !important; background: rgba(245, 158, 11, 0.1) !important; }

/* --- Footer --- */
body #xb-fm-modal .xb-modal-footer { padding: 14px 22px !important; background: rgba(0,0,0,0.3) !important; border-top: 1px solid rgba(147, 51, 234, 0.2) !important; display: flex !important; gap: 12px !important; justify-content: flex-end !important; }
body #xb-fm-modal .xb-modal-footer button { font-size: 1.25rem !important; font-weight: 700 !important; padding: 14px 36px !important; border-radius: 10px !important; cursor: pointer !important; }
body #xb-fm-modal .xb-btn-gold { background: linear-gradient(135deg, #f59e0b, #d97706) !important; border: 2px solid #f59e0b !important; color: #000 !important; }
body #xb-fm-modal .xb-btn-gold:hover { transform: translateY(-1px) !important; box-shadow: 0 4px 15px rgba(245, 158, 11, 0.5) !important; }
body #xb-fm-modal .xb-btn-secondary { background: rgba(255,255,255,0.06) !important; border: 1px solid rgba(255,255,255,0.2) !important; color: #d1d5db !important; }

/* --- Exomagie section --- */
body #xb-fm-modal .xb-exo-section { margin-top: 20px !important; padding: 18px !important; background: linear-gradient(135deg, rgba(147, 51, 234, 0.08), rgba(79, 70, 229, 0.04)) !important; border: 2px solid rgba(147, 51, 234, 0.35) !important; border-radius: 14px !important; position: relative !important; }
body #xb-fm-modal .xb-exo-section::before { content: '' !important; position: absolute !important; top: 0 !important; left: 0 !important; right: 0 !important; height: 2px !important; background: linear-gradient(90deg, transparent, #9333ea, transparent) !important; border-radius: 14px 14px 0 0 !important; }
body #xb-fm-modal .xb-exo-title { font-size: 1.5rem !important; font-weight: 900 !important; color: #c084fc !important; text-transform: uppercase !important; margin-bottom: 12px !important; }
body #xb-fm-modal .xb-exo-info { font-size: 1.1rem !important; color: #c4b5fd !important; line-height: 1.5 !important; padding: 14px 18px !important; background: rgba(0,0,0,0.3) !important; border-radius: 10px !important; border-left: 3px solid #7c3aed !important; margin-bottom: 16px !important; }
body #xb-fm-modal .xb-exo-info strong { color: #e9d5ff !important; }
body #xb-fm-modal .xb-exo-weight { font-size: 1.2rem !important; color: #d1d5db !important; margin-bottom: 16px !important; padding: 12px 16px !important; background: rgba(0,0,0,0.2) !important; border-radius: 8px !important; }
body #xb-fm-modal .xb-exo-weight strong { color: #f59e0b !important; font-size: 1.35rem !important; }
body #xb-fm-modal .xb-exo-group { margin-bottom: 12px !important; }
body #xb-fm-modal .xb-exo-group-label { font-size: 1.1rem !important; font-weight: 700 !important; color: #a78bfa !important; text-transform: uppercase !important; letter-spacing: 1px !important; margin-bottom: 10px !important; }
body #xb-fm-modal .xb-exo-btns { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; margin-bottom: 16px !important; }
body #xb-fm-modal .xb-exo-btn { padding: 14px 30px !important; font-size: 1.25rem !important; font-weight: 800 !important; display: inline-flex !important; align-items: center !important; gap: 8px !important; border-radius: 10px !important; border: 2px solid rgba(147, 51, 234, 0.35) !important; background: rgba(147, 51, 234, 0.06) !important; color: #d1d5db !important; cursor: pointer !important; transition: all 0.2s ease !important; position: relative !important; }
body #xb-fm-modal .xb-exo-btn:hover { background: rgba(147, 51, 234, 0.2) !important; border-color: #9333ea !important; color: #e9d5ff !important; }
body #xb-fm-modal .xb-exo-btn.active { background: linear-gradient(135deg, #7c3aed, #9333ea) !important; border-color: #a855f7 !important; color: #fff !important; box-shadow: 0 3px 15px rgba(147, 51, 234, 0.5) !important; }
body #xb-fm-modal .xb-exo-btn.active::after { content: '✓' !important; position: absolute !important; top: -6px !important; right: -6px !important; width: 20px !important; height: 20px !important; background: #22c55e !important; border-radius: 50% !important; font-size: 11px !important; display: flex !important; align-items: center !important; justify-content: center !important; color: white !important; border: 2px solid #0f0f1a !important; }
body #xb-fm-modal .xb-exo-btn.xb-exo-btn-small { padding: 10px 20px !important; font-size: 1.1rem !important; display: inline-flex !important; align-items: center !important; gap: 6px !important; }

body #xb-fm-modal .xb-exo-btn-icon {
    width: 24px !important;
    height: 24px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

body #xb-fm-modal .xb-exo-btn.xb-exo-btn-small .xb-exo-btn-icon {
    width: 20px !important;
    height: 20px !important;
}



/* =====================================================
   10. FM SÉLECTEUR — TEXTES AGRANDIS
   ===================================================== */

body .xb-fm-selector-header h3 { font-size: 1.5rem !important; font-weight: 800 !important; color: #ff8800 !important; }
body .xb-fm-selector-item img { width: 52px !important; height: 52px !important; }
body .xb-fm-selector-name { font-size: 1.1rem !important; font-weight: 700 !important; }
body .xb-fm-selector-level { font-size: 0.95rem !important; font-weight: 600 !important; color: #f59e0b !important; }


/* =====================================================
   11. HOVER PREVIEW BADGES
   ===================================================== */

.xb-sl-diff { position: absolute !important; top: -14px !important; right: -10px !important; font-size: 1.1rem !important; font-weight: 900 !important; padding: 5px 12px !important; border-radius: 8px !important; z-index: 100 !important; white-space: nowrap !important; pointer-events: none !important; }
.xb-sl-diff.positive { background: linear-gradient(135deg, #22c55e, #16a34a) !important; color: #fff !important; border: 2px solid #4ade80 !important; box-shadow: 0 3px 14px rgba(34, 197, 94, 0.7) !important; }
.xb-sl-diff.negative { background: linear-gradient(135deg, #ef4444, #dc2626) !important; color: #fff !important; border: 2px solid #f87171 !important; box-shadow: 0 3px 14px rgba(239, 68, 68, 0.7) !important; }


/* =====================================================
   12. RESPONSIVE FM MODAL
   ===================================================== */

/* Medium screens: 3 columns */
@media (max-width: 1000px) and (min-width: 769px) {
    body #xb-fm-modal .xb-fm-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    /* Modal fullscreen with scroll */
    body #xb-fm-modal.xb-modal-overlay { padding: 0 !important; align-items: stretch !important; }
    body #xb-fm-modal .xb-modal-box {
        max-width: 100% !important;
        width: 100% !important;
        max-height: 100vh !important;
        height: 100vh !important;
        margin: 0 !important;
        overflow: hidden !important;
        border-radius: 0 !important;
        border: none !important;
        display: flex !important;
        flex-direction: column !important;
    }
    body #xb-fm-modal .xb-modal-header {
        flex-shrink: 0 !important;
        padding: 10px 12px !important;
    }
    body #xb-fm-modal .xb-fm-tabs {
        flex-shrink: 0 !important;
    }
    body #xb-fm-modal .xb-fm-switcher {
        flex-shrink: 0 !important;
        padding: 8px 6px !important;
        gap: 5px !important;
    }
    body #xb-fm-modal .xb-modal-body {
        padding: 10px 8px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
    }
    body #xb-fm-modal .xb-modal-footer {
        flex-shrink: 0 !important;
    }

    /* Header compact */
    body #xb-fm-modal .xb-fm-header-info h3, body #xb-fm-modal .xb-modal-header h3 { font-size: 1.3rem !important; }
    body #xb-fm-modal .xb-fm-header-img { width: 40px !important; height: 40px !important; padding: 3px !important; }
    body #xb-fm-modal .xb-fm-header-left { gap: 10px !important; }
    body #xb-fm-modal .xb-fm-header-level { font-size: 0.95rem !important; }
    body #xb-fm-modal .xb-fm-header-pano { font-size: 0.85rem !important; }
    body #xb-fm-modal .xb-fm-mod-count { font-size: 0.8rem !important; padding: 2px 8px !important; }
    body #xb-fm-modal .xb-modal-close { width: 34px !important; height: 34px !important; font-size: 1.4rem !important; }

    /* Tabs */
    body #xb-fm-modal .xb-fm-tab { padding: 10px 14px !important; font-size: 1rem !important; }

    /* Switcher — horizontal scroll */
    body #xb-fm-modal .xb-fm-sw-btn { min-width: 78px !important; max-width: 100px !important; padding: 6px 5px 5px !important; border-radius: 10px !important; }
    body #xb-fm-modal .xb-fm-sw-img { width: 36px !important; height: 36px !important; padding: 3px !important; }
    body #xb-fm-modal .xb-fm-sw-label { font-size: 0.62rem !important; }
    body #xb-fm-modal .xb-fm-sw-name { font-size: 0.78rem !important; max-width: 85px !important; }
    body #xb-fm-modal .xb-fm-sw-dot { font-size: 0.5rem !important; top: -3px !important; right: -3px !important; }

    /* Grid — 1 colonne sur mobile */
    body #xb-fm-modal .xb-fm-stats-grid { grid-template-columns: 1fr !important; gap: 5px !important; }
    body #xb-fm-modal .xb-fm-section { padding: 6px !important; margin-bottom: 6px !important; }
    body #xb-fm-modal .xb-fm-section-title { font-size: 1.15rem !important; margin-bottom: 6px !important; }

    /* Stat cards — full width, bien alignées */
    body #xb-fm-modal .xb-fm-stat { padding: 10px 12px 8px !important; border-radius: 10px !important; gap: 4px !important; }

    /* Ligne 1 : icône + nom + diff */
    body #xb-fm-modal .xb-fm-stat-top { gap: 8px !important; }
    body #xb-fm-modal .xb-fm-stat-namerow { gap: 6px !important; }
    body #xb-fm-modal .xb-fm-stat-icon { width: 22px !important; height: 22px !important; }
    body #xb-fm-modal .xb-fm-stat-label { font-size: 1.2rem !important; }
    body #xb-fm-modal .xb-fm-diff { font-size: 1.1rem !important; min-width: 34px !important; padding: 3px 7px !important; }

    /* Ligne 2 : jet + % */
    body #xb-fm-modal .xb-fm-stat-mid { gap: 8px !important; }
    body #xb-fm-modal .xb-fm-jet { font-size: 0.9rem !important; padding: 2px 8px !important; }
    body #xb-fm-modal .xb-fm-jet-sep { margin: 0 3px !important; }
    body #xb-fm-modal .xb-fm-gauge-pct { font-size: 1rem !important; min-width: 36px !important; }

    /* Ligne 3 : gauge + input */
    body #xb-fm-modal .xb-fm-stat-bottom { gap: 10px !important; }
    body #xb-fm-modal .xb-fm-gauge { height: 8px !important; }
    body #xb-fm-modal .xb-fm-input-group { border-radius: 6px !important; }
    body #xb-fm-modal .xb-fm-btn-pm { width: 34px !important; height: 34px !important; font-size: 1.1rem !important; }
    body #xb-fm-modal .xb-fm-input { width: 48px !important; font-size: 1.15rem !important; }

    /* Over tag */
    body #xb-fm-modal .xb-fm-over-tag { font-size: 0.68rem !important; padding: 1px 5px !important; }

    /* Boutons rapides */
    body #xb-fm-modal .xb-fm-quick-btns { gap: 5px !important; flex-wrap: wrap !important; }
    body #xb-fm-modal .xb-fm-quick-btn { padding: 8px 14px !important; font-size: 0.92rem !important; }

    /* Weight summary */
    body #xb-fm-modal .xb-fm-weight-summary { padding: 8px 10px !important; gap: 8px !important; }
    body #xb-fm-modal .xb-fm-weight-info { min-width: 70px !important; }
    body #xb-fm-modal .xb-fm-weight-label { font-size: 0.8rem !important; }
    body #xb-fm-modal .xb-fm-weight-val { font-size: 1rem !important; }

    /* Exomagie */
    body #xb-fm-modal .xb-exo-title { font-size: 1.1rem !important; }
    body #xb-fm-modal .xb-exo-info { font-size: 0.9rem !important; padding: 10px 12px !important; }
    body #xb-fm-modal .xb-exo-btn { padding: 10px 16px !important; font-size: 0.95rem !important; }
    body #xb-fm-modal .xb-exo-btn.xb-exo-btn-small { padding: 8px 12px !important; font-size: 0.85rem !important; }
    body #xb-fm-modal .xb-exo-btn-icon { width: 18px !important; height: 18px !important; }
    body #xb-fm-modal .xb-exo-btn.xb-exo-btn-small .xb-exo-btn-icon { width: 15px !important; height: 15px !important; }

    /* Footer */
    body #xb-fm-modal .xb-modal-footer { padding: 10px 12px !important; }
    body #xb-fm-modal .xb-modal-footer button { padding: 12px 24px !important; font-size: 1.05rem !important; width: 100% !important; }

    /* Hidden elements */
    body #xb-fm-modal .xb-fm-stat-weight,
    body #xb-fm-modal .xb-fm-ovmax-badge,
    body #xb-fm-modal .xb-fm-rune-tip { display: none !important; }
}


/* =====================================================
   13. PANOPLIE HOVER PREVIEW TOOLTIP
   ===================================================== */

#xb-pano-tooltip-el {
    pointer-events: none !important;
}

.xb-pano-tooltip {
    width: 310px !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    background: linear-gradient(160deg, #3d3060 0%, #2e2850 50%, #283040 100%) !important;
    border: 2px solid rgba(212, 175, 55, 0.7) !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9), 0 0 50px rgba(212, 175, 55, 0.2) !important;
    padding: 0 !important;
    font-size: 0.9rem !important;
}

.xb-pano-tt-header {
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    color: #f59e0b !important;
    padding: 14px 16px 8px !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
    text-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

.xb-pano-tt-count {
    padding: 8px 16px 12px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #d1d5db !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.xb-pano-tt-current {
    color: #9ca3af !important;
    font-size: 1.1rem !important;
}

.xb-pano-tt-new {
    color: #22c55e !important;
    font-size: 1.2rem !important;
    font-weight: 900 !important;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.5) !important;
}

/* Tier levels */
.xb-pano-tt-tier {
    padding: 10px 16px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.xb-pano-tt-tier.active-tier {
    background: rgba(34, 197, 94, 0.06) !important;
    border-left: 3px solid #22c55e !important;
}

.xb-pano-tt-tier.new-tier {
    background: rgba(245, 158, 11, 0.1) !important;
    border-left: 3px solid #f59e0b !important;
    animation: pano-tt-glow 1.5s ease-in-out infinite !important;
}

.xb-pano-tt-tier.inactive-tier {
    opacity: 0.55 !important;
}

.xb-pano-tt-tier-label {
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 6px !important;
    color: #9ca3af !important;
}

.xb-pano-tt-tier.active-tier .xb-pano-tt-tier-label {
    color: #4ade80 !important;
}

.xb-pano-tt-tier.new-tier .xb-pano-tt-tier-label {
    color: #fbbf24 !important;
}

.xb-pano-tt-stat {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    padding: 2px 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
}

.xb-pano-tt-icon {
    width: 16px !important;
    height: 16px !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

/* Set badge hover effect */
body .xb-split-item-set {
    cursor: pointer !important;
    transition: all 0.2s !important;
    position: relative !important;
}

body .xb-split-item-set:hover {
    background: rgba(212, 175, 55, 0.15) !important;
    color: #f59e0b !important;
    transform: translateX(2px) !important;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.2) !important;
}

@keyframes pano-tt-glow {
    0%, 100% { background: rgba(245, 158, 11, 0.1); }
    50% { background: rgba(245, 158, 11, 0.18); }
}


/* =====================================================
   14. DOSSIERS DE BUILDS
   ===================================================== */

.xb-folders-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 12px 16px !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border-radius: 10px !important;
    margin-bottom: 16px !important;
    align-items: center !important;
}

.xb-folder-tab {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 14px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    color: #9ca3af !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    white-space: nowrap !important;
}

.xb-folder-tab:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-color: var(--folder-color, rgba(255,255,255,0.25)) !important;
}

.xb-folder-tab.active {
    background: rgba(212, 175, 55, 0.15) !important;
    border-color: #d4af37 !important;
    color: #fbbf24 !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2) !important;
}

.xb-folder-tab .xb-folder-actions {
    display: none !important;
    margin-left: 4px !important;
    gap: 2px !important;
}

.xb-folder-tab:hover .xb-folder-actions {
    display: inline-flex !important;
}

.xb-folder-edit,
.xb-folder-del {
    font-size: 0.7rem !important;
    opacity: 0.6 !important;
    cursor: pointer !important;
    transition: opacity 0.15s !important;
}

.xb-folder-edit:hover,
.xb-folder-del:hover {
    opacity: 1 !important;
}

.xb-folder-tab.xb-folder-add {
    border-style: dashed !important;
    color: #6b7280 !important;
}

.xb-folder-tab.xb-folder-add:hover {
    color: #fbbf24 !important;
    border-color: #d4af37 !important;
}

/* Folder badge on card */
.xb-card-folder-badge {
    display: inline-block !important;
    font-size: 0.65rem !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
    color: #fff !important;
    font-weight: 700 !important;
    margin-left: 6px !important;
    vertical-align: middle !important;
    opacity: 0.85 !important;
}

/* Folder move menu */
.xb-folder-menu {
    background: linear-gradient(160deg, #2d2145, #1e1a30) !important;
    border: 2px solid rgba(212, 175, 55, 0.5) !important;
    border-radius: 12px !important;
    padding: 8px 0 !important;
    min-width: 200px !important;
    box-shadow: 0 15px 50px rgba(0,0,0,0.8) !important;
}

.xb-folder-menu .xb-fm-title {
    padding: 8px 16px !important;
    font-weight: 800 !important;
    font-size: 0.85rem !important;
    color: #d4af37 !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}

.xb-folder-menu .xb-fm-opt {
    padding: 8px 16px !important;
    font-size: 0.88rem !important;
    color: #d1d5db !important;
    cursor: pointer !important;
    transition: background 0.15s !important;
}

.xb-folder-menu .xb-fm-opt:hover {
    background: rgba(212, 175, 55, 0.12) !important;
    color: #fff !important;
}

.xb-folder-menu .xb-fm-opt.active {
    color: #22c55e !important;
    font-weight: 700 !important;
}

.xb-folder-menu .xb-fm-opt.active::after {
    content: ' ✓' !important;
}

.xb-folder-menu .xb-fm-empty {
    padding: 8px 16px !important;
    font-size: 0.8rem !important;
    color: #6b7280 !important;
    font-style: italic !important;
}

@media (max-width: 768px) {
    .xb-folders-bar {
        padding: 8px 10px !important;
        gap: 6px !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .xb-folder-tab {
        padding: 5px 10px !important;
        font-size: 0.82rem !important;
        flex-shrink: 0 !important;
    }
    
    .xb-folder-tab .xb-folder-actions {
        display: none !important;
    }
}


/* =====================================================
   14b. FILTRE TYPE D'ARME
   ===================================================== */

.xb-weapon-type-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 10px 14px !important;
    background: rgba(0, 0, 0, 0.35) !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15) !important;
}

.xb-wt-btn {
    padding: 7px 14px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: #9ca3af !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
}

.xb-wt-btn:hover {
    background: rgba(212, 175, 55, 0.12) !important;
    color: #fbbf24 !important;
    border-color: rgba(212, 175, 55, 0.3) !important;
}

.xb-wt-btn.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(184, 148, 30, 0.15)) !important;
    color: #fbbf24 !important;
    border-color: #d4af37 !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.15) !important;
}

.xb-wt-btn .xb-wt-count {
    font-size: 0.8rem !important;
    opacity: 0.6 !important;
    margin-left: 3px !important;
}

/* =====================================================
   14c. FIX TOOLTIP ARME + TOUS SLOTS
   Le tooltip doit être opaque et uniforme
   ===================================================== */

body .xb-wrapper .xb-slot::after {
    z-index: 500 !important;
    background: linear-gradient(135deg, #1a1a2e, #0f0f1a) !important;
    opacity: 0 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

body .xb-wrapper .xb-slot:hover::after {
    opacity: 1 !important;
}


/* =====================================================
   15. INPUT MODAL (dossiers, renommer)
   ===================================================== */

.xb-input-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.8) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 20000 !important;
    backdrop-filter: blur(4px) !important;
}

.xb-input-modal-box {
    background: linear-gradient(160deg, #2a1f45, #1a1530) !important;
    border: 2px solid rgba(212, 175, 55, 0.6) !important;
    border-radius: 16px !important;
    padding: 28px !important;
    width: 380px !important;
    max-width: 90vw !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9), 0 0 50px rgba(212, 175, 55, 0.15) !important;
}

.xb-input-modal-title {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #fbbf24 !important;
    margin-bottom: 18px !important;
    text-align: center !important;
}

.xb-input-modal-input {
    width: 100% !important;
    padding: 12px 16px !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    outline: none !important;
    margin-bottom: 18px !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s !important;
}

.xb-input-modal-input:focus {
    border-color: #d4af37 !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2) !important;
}

.xb-input-modal-btns {
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-end !important;
}

.xb-input-modal-btns button {
    padding: 10px 20px !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 0.92rem !important;
    cursor: pointer !important;
    border: none !important;
    transition: all 0.2s !important;
}

.xb-input-modal-btns .xb-btn-cancel {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #9ca3af !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.xb-input-modal-btns .xb-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
}

.xb-input-modal-btns .xb-btn-gold {
    background: linear-gradient(135deg, #d4af37, #b8941e) !important;
    color: #1a1a2e !important;
}

.xb-input-modal-btns .xb-btn-gold:hover {
    background: linear-gradient(135deg, #fbbf24, #d4af37) !important;
    transform: scale(1.03) !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4) !important;
}


/* =====================================================
   16. MOBILE COMPLET — V92 RESPONSIVE
   ===================================================== */

/* --- Tablettes & mobile < 1200px : split vertical --- */
@media (max-width: 1200px) {
    body .xb-split-container.split-active .xb-split-left {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        max-height: 50vh !important;
    }
    
    body .xb-split-container.split-active .xb-split-right {
        position: relative !important;
        top: auto !important;
        height: auto !important;
        max-height: none !important;
        min-width: 0 !important;
    }
    
    body .xb-split-container.split-active .xb-split-ency {
        height: auto !important;
        max-height: none !important;
    }
    
    /* Pano tooltip: centrer */
    #xb-pano-tooltip-el {
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: 90vw !important;
    }
}

/* --- Phones < 768px --- */
@media (max-width: 768px) {
    /* Header */
    body .xb-header {
        padding: 10px 12px !important;
        gap: 10px !important;
    }
    
    body .xb-header .xb-title {
        font-size: 1.3rem !important;
    }
    
    body .xb-header .xb-nav-btn {
        font-size: 0.78rem !important;
        padding: 6px 10px !important;
    }
    
    /* Workspace */
    body .xb-workspace {
        padding: 0 8px 10px 8px !important;
        gap: 10px !important;
    }
    
    /* Doll grid: slots plus petits */
    body .xb-doll-grid {
        gap: 6px !important;
    }
    
    body .xb-slot:not(.xb-slot-dofus):not([id^="slot-dofus"]) {
        width: 56px !important;
        height: 56px !important;
    }
    
    body .xb-slot-dofus,
    body [id^="slot-dofus"] {
        width: 38px !important;
        height: 38px !important;
    }
    
    /* Hero */
    body .xb-hd-name,
    body .xb-hero-left .xb-hd-name {
        font-size: 1.1rem !important;
    }
    
    body .xb-hero-row {
        padding: 6px 8px !important;
        gap: 8px !important;
    }
    
    /* Split left: full width, auto height, scroll */
    body .xb-split-container.split-active .xb-split-left {
        max-height: 45vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    
    /* Split right: full width, no min-width */
    body .xb-split-container.split-active .xb-split-right {
        min-width: 0 !important;
        width: 100% !important;
    }
    
    /* Split search row */
    body .xb-split-search-row {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }
    
    body .xb-split-search-input {
        width: 100% !important;
        font-size: 1rem !important;
    }
    
    body .xb-split-sort-select {
        width: 100% !important;
    }
    
    /* Split items: 1 column */
    body .xb-split-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        padding: 8px !important;
    }
    
    /* Split item card */
    body .xb-split-item-card {
        font-size: 0.88rem !important;
    }
    
    body .xb-split-item-name {
        font-size: 0.92rem !important;
    }
    
    body .xb-split-stat-line {
        font-size: 0.82rem !important;
    }
    
    body .xb-split-stat-icon {
        width: 14px !important;
        height: 14px !important;
    }
    
    /* Inline stats */
    body .xb-sl-item {
        font-size: 0.82rem !important;
    }
    
    body .xb-sl-icon {
        width: 16px !important;
        height: 16px !important;
    }
    
    /* Weapon type bar: scroll horizontal */
    .xb-weapon-type-bar {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 6px 8px !important;
        gap: 4px !important;
    }
    
    .xb-wt-btn {
        flex-shrink: 0 !important;
        font-size: 0.88rem !important;
        padding: 6px 12px !important;
    }
    
    /* Build cards: 1 column */
    body .xb-cards-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Build card slots smaller */
    body .xb-slot.xb-slot-md {
        width: 32px !important;
        height: 32px !important;
    }
    
    body .xb-slot.xb-slot-sm {
        width: 22px !important;
        height: 22px !important;
    }
    
    /* Card actions: single line */
    body .xb-card-actions {
        flex-wrap: nowrap !important;
        gap: 3px !important;
    }
    
    body .xb-card-btn {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.85rem !important;
        padding: 0 !important;
    }
    
    /* Panoplie tooltip: bottom fixed */
    #xb-pano-tooltip-el {
        left: 5px !important;
        right: 5px !important;
        bottom: 10px !important;
        top: auto !important;
        transform: none !important;
        width: auto !important;
    }
    
    .xb-pano-tooltip {
        width: 100% !important;
        max-width: none !important;
        max-height: 40vh !important;
    }
    
    /* FM modal */
    body #xb-fm-modal .xb-modal-box {
        margin: 5px !important;
        max-width: 100% !important;
        max-height: 95vh !important;
    }
    
    /* Filter accordion */
    body .xb-split-filters-advanced {
        max-height: 200px !important;
        overflow-y: auto !important;
    }
    
    body .xb-split-filter-btn {
        font-size: 0.72rem !important;
        padding: 3px 7px !important;
    }
    
    /* Toolbar */
    body .xb-builds-toolbar {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    body .xb-toolbar-tags {
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
    
    body .xb-tag-btn {
        font-size: 0.75rem !important;
        padding: 4px 8px !important;
    }
    
    /* Tooltip fixes: go above instead of to the right */
    body .xb-wrapper .xb-slot::after {
        font-size: 0.85rem !important;
        padding: 6px 10px !important;
    }
    
    /* Folder bar: horizontal scroll */
    body .xb-folders-bar {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 8px 10px !important;
        gap: 6px !important;
    }
    
    body .xb-folder-tab {
        flex-shrink: 0 !important;
        padding: 5px 10px !important;
        font-size: 0.82rem !important;
    }
    
    body .xb-folder-tab .xb-folder-actions {
        display: none !important;
    }
    
    /* Input modal */
    .xb-input-modal-box {
        width: 92vw !important;
        padding: 20px !important;
    }
    
    .xb-input-modal-input {
        font-size: 1rem !important;
    }
    
    /* Build name input */
    body .xb-name-input {
        font-size: 1rem !important;
        max-width: 100% !important;
    }
    
    /* Folder menu */
    .xb-folder-menu {
        min-width: 180px !important;
        max-width: 85vw !important;
    }
    
    /* Stats sections: prevent text truncation */
    body .xb-stats-section {
        overflow: visible !important;
    }
    
    body .xb-stats-section-title {
        font-size: 0.85rem !important;
    }
    
    /* Scroll badge */
    body .xb-sl-diff {
        font-size: 0.65rem !important;
        padding: 1px 5px !important;
    }
}

/* --- Tiny phones < 480px --- */
@media (max-width: 480px) {
    body .xb-slot:not(.xb-slot-dofus):not([id^="slot-dofus"]) {
        width: 48px !important;
        height: 48px !important;
    }
    
    body .xb-slot-dofus,
    body [id^="slot-dofus"] {
        width: 32px !important;
        height: 32px !important;
    }
    
    body .xb-doll-grid {
        gap: 4px !important;
    }
    
    body .xb-header .xb-title {
        font-size: 1.1rem !important;
    }
    
    body .xb-header .xb-nav-btn {
        font-size: 0.7rem !important;
        padding: 5px 7px !important;
    }
    
    body .xb-hd-name,
    body .xb-hero-left .xb-hd-name {
        font-size: 0.95rem !important;
    }
    
    body .xb-hero-row {
        padding: 4px 6px !important;
    }
    
    body .xb-split-item-card {
        padding: 8px !important;
    }
    
    body .xb-split-item-name {
        font-size: 0.85rem !important;
    }
    
    body .xb-split-ency-header {
        padding: 8px 10px !important;
        gap: 6px !important;
    }
    
    body #xb-split-slot-name {
        font-size: 1rem !important;
    }
    
    /* Build card */
    body .xb-card-name-big {
        font-size: 0.9rem !important;
    }
    
    body .xb-card-face {
        width: 45px !important;
        height: 45px !important;
    }
    
    body .xb-stuff-card .xb-card-stats,
    body .xb-card-center .xb-card-stats {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        flex-direction: row !important;
        grid-template-columns: unset !important;
        border-top: none !important;
        border-bottom: none !important;
    }
    
    body .xb-stuff-card .xb-stat-icon,
    body .xb-card-center .xb-stat-icon {
        width: 18px !important;
        height: 18px !important;
    }
    
    body .xb-stuff-card .xb-stat-value,
    body .xb-card-center .xb-stat-value {
        font-size: 0.95rem !important;
    }
    
    body .xb-stuff-card .xb-stat-item,
    body .xb-card-center .xb-stat-item {
        padding: 4px 6px !important;
        gap: 3px !important;
    }
    
    body .xb-stuff-card .xb-card-meta-item,
    body .xb-card-center .xb-card-meta-item {
        font-size: 1rem !important;
    }
    
    body .xb-card-bottom {
        padding: 8px 10px !important;
        gap: 6px !important;
    }
    
    body .xb-vis-label {
        font-size: 0.75rem !important;
    }
    
    /* Folder bar: smaller */
    body .xb-folder-tab {
        font-size: 0.75rem !important;
        padding: 4px 8px !important;
    }
    
    /* Change class button */
    body .xb-change-class-btn-top {
        padding: 8px 16px !important;
        font-size: 0.95rem !important;
        max-width: 100% !important;
    }
    
    /* Actions row */
    body .xb-actions-row {
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
    
    body .xb-actions-row button {
        font-size: 0.72rem !important;
        padding: 4px 8px !important;
    }
}

/* Prevent ALL horizontal scrolling */
body.xb-page,
body .xb-wrapper {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}


/* =====================================================
   16. FIX: EMPTY SLOT TOOLTIPS
   Les cases vides doivent afficher Cape, Chapeau, etc.
   ===================================================== */

body .xb-wrapper .xb-slot:not(.filled)::after {
    content: attr(data-slot-name) !important;
    position: absolute !important;
    bottom: 110% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: linear-gradient(135deg, #1a1a2e, #0f0f1a) !important;
    border: 2px solid #d4af37 !important;
    color: #fff !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.2s ease !important;
    z-index: 500 !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5) !important;
    pointer-events: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

body .xb-wrapper .xb-slot:not(.filled):hover::after {
    opacity: 1 !important;
    visibility: visible !important;
    bottom: 115% !important;
}


/* =====================================================
   17. FIX: BUILD CARD STATS (PA/PM) + META (Vues/Date)
   PA/PM en gros, vues/date en ligne de texte lisible en dessous
   ===================================================== */

body .xb-stuff-card .xb-card-stats,
body .xb-card-center .xb-card-stats {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: none !important;
    margin: 8px auto 4px !important;
    flex-direction: row !important;
    grid-template-columns: unset !important;
    border-top: none !important;
    border-bottom: none !important;
    padding: 0 !important;
}

body .xb-stuff-card .xb-stat-item,
body .xb-card-center .xb-stat-item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 5px 10px !important;
    background: rgba(0, 0, 0, 0.45) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body .xb-stuff-card .xb-stat-icon,
body .xb-card-center .xb-stat-icon {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

body .xb-stuff-card .xb-stat-value,
body .xb-card-center .xb-stat-value {
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    color: #fff !important;
}

/* Meta line: vues + date */
body .xb-stuff-card .xb-card-meta,
body .xb-card-center .xb-card-meta {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 6px 0 2px !important;
}

body .xb-stuff-card .xb-card-meta-item,
body .xb-card-center .xb-card-meta-item {
    font-size: 1.15rem !important;
    color: #d1d5db !important;
    font-weight: 600 !important;
}

body .xb-stuff-card .xb-card-meta-sep,
body .xb-card-center .xb-card-meta-sep {
    color: #6b7280 !important;
    font-size: 1rem !important;
}


/* =====================================================
   18. FIX: FOLDER CREATION MODAL — BIGGER TEXT
   ===================================================== */

body .xb-input-modal-title {
    font-size: 1.4rem !important;
}

body .xb-input-modal-input {
    font-size: 1.2rem !important;
    padding: 14px 18px !important;
}

body .xb-input-modal-btns button {
    font-size: 1.05rem !important;
    padding: 12px 24px !important;
}


/* =====================================================
   19. FIX: BUILD CARD BOTTOM — ICONS ON ONE LINE
   ===================================================== */

body .xb-card-bottom {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 15px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
}

body .xb-card-actions {
    display: flex !important;
    gap: 5px !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
}

body .xb-card-btn {
    width: 34px !important;
    height: 34px !important;
    font-size: 1rem !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
}

body .xb-card-visibility {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
}

body .xb-vis-label {
    font-size: 0.85rem !important;
    white-space: nowrap !important;
}
