@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e8e8e8; 
    font-size: 14px;
    min-height: 100vh;
}

/* → Déplacé dans css/mobile-nav.css */


/* → Déplacé dans css/mobile-nav.css */


/* ========== MOBILE SIDEBAR - Style Fourmizzz Compact ========== */
/* → Déplacé dans css/mobile-nav.css */


/* ========== SIDEBAR ========== */
#sidebar { 
    position: fixed; 
    left: 0; 
    top: 0; 
    width: 240px; 
    height: 100vh; 
    background: linear-gradient(180deg, #12121f 0%, #1a1a2e 100%);
    border-right: 1px solid #3a3a5c;
    overflow-y: auto; 
    z-index: 1001; 
}

/* → Déplacé dans css/mobile-nav.css */


.sb-header { 
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border-bottom: 1px solid #3a3a5c;
    padding: 12px; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.server { 
    background: rgba(255,255,255,0.2);
    color: white; 
    padding: 4px 10px; 
    border-radius: 20px; 
    font-size: 0.7rem;
    font-weight: 600;
}

.pseudo-link {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.pseudo-link:hover {
    text-decoration: underline;
}

/* ========== NOUVELLE SIDEBAR GAMING ========== */

/* Carte Profil Gaming */
.sb-profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(74, 77, 124, 0.4) 0%, rgba(45, 48, 85, 0.4) 100%);
    border-bottom: 1px solid #3a3a5c;
}

.sb-profile-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.sb-profile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sb-profile-name {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.2s;
}

.sb-profile-name:hover {
    color: var(--title-color, #ff6b6b);
}

.sb-profile-rank {
    font-size: 0.75rem;
    color: #4ade80;
    font-weight: 600;
}

/* Ressources Gaming */
.sb-resources {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid #3a3a5c;
}

.sb-res-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.sb-res-item:hover {
    background: rgba(255,255,255,0.05);
    transform: translateX(3px);
}

.sb-res-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.sb-res-data {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sb-res-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.sb-res-value.green { color: #4ade80; }
.sb-res-value.res-warning { color: #f59e0b; }
.sb-res-value.res-full { color: #ef4444; }

.sb-res-bar {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.sb-res-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.sb-res-fill.green { background: linear-gradient(90deg, #22c55e, #4ade80); }
.sb-res-fill.orange { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.sb-res-fill.red { background: linear-gradient(90deg, #dc2626, #ef4444); }

/* Message item */
.sb-msg-item {
    background: rgba(99, 102, 241, 0.1) !important;
}

.sb-msg-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
}

.sb-msg-count.has-new {
    color: #fff;
    background: #ef4444;
    padding: 2px 8px;
    border-radius: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ========== FIN SIDEBAR GAMING ========== */

/* Styles anciens conservés pour compatibilité */
.sb-stats {
    padding: 10px 12px;
    border-bottom: 1px solid #3a3a5c;
    display: none; /* Caché car remplacé par sb-resources */
}

.sb-stat-row {
    display: block;
    padding: 6px 8px;
    font-size: 0.85rem;
    color: var(--text-muted, #a0a0b8);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.sb-stat-row:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

/* Stats avec barre de progression */
.sb-stat-with-bar {
    flex-direction: column;
    gap: 2px;
}

.sb-stat-main {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.sb-progress-bar {
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.15);
    border-radius: 1px;
    overflow: hidden;
}

.sb-progress-fill {
    height: 100%;
    border-radius: 1px;
    transition: width 0.3s ease;
}

.sb-progress-fill.green { background: #4ade80; }
.sb-progress-fill.orange { background: #f59e0b; }
.sb-progress-fill.red { background: #ef4444; }

/* Lien messagerie sidebar */
.sb-msg-row {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
}

.sb-msg-row .msg-count {
    background: rgba(100,100,100,0.5);
    color: #888;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
}

.sb-msg-row .msg-count.has-msg {
    background: #ef4444;
    color: #fff;
}

.sb-recolte {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid #3a3a5c;
    font-size: 0.85rem;
    color: var(--text-muted, #a0a0b8);
    text-decoration: none;
    transition: all 0.2s;
}

.sb-recolte:hover {
    background: rgba(255,255,255,0.05);
}

.sb-recolte .timer-recolte {
    color: #f39c12;
    font-weight: 700;
}

.sb-search {
    padding: 0;
}

.sb-search-input {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid #3a3a5c;
    background: rgba(0,0,0,0.2);
    color: var(--text-color, #fff);
    font-size: 0.85rem;
}

.sb-search-input:focus {
    outline: none;
    background: rgba(0,0,0,0.3);
}

.sb-search-input::placeholder {
    color: var(--text-muted, #666);
}

.pseudo { 
    color: #fff; 
    font-weight: 600; 
    font-size: 1rem; 
}

.sb-stats { 
    padding: 16px; 
    color: #a0a0b8; 
    font-size: 0.9rem;
    border-bottom: 1px solid #3a3a5c;
}

.sb-stats div { 
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sb-stats .green { 
    color: #4ade80;
    font-weight: 600;
}

.sb-stats .res-warning,
.res-warning {
    color: #f39c12 !important;
    font-weight: 600;
}

.sb-stats .res-full,
.res-full {
    color: #ef4444 !important;
    font-weight: 600;
}

.sb-section { 
    padding: 16px; 
}

.sb-title { 
    color: #5c5f8a;
    font-size: 0.75rem; 
    margin-bottom: 12px; 
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.activity { 
    padding: 8px 0; 
    color: #666680; 
    font-size: 0.85rem; 
    display: flex; 
    flex-direction: column;
    gap: 2px; 
}

.activity.on { 
    color: #4ade80; 
}

.activity-timer {
    font-size: 0.75rem;
    color: #f39c12;
    font-weight: 600;
    margin-left: 20px;
}

/* ========== MAIN ========== */
#main { 
    margin-left: 240px; 
    padding: 24px; 
    min-height: 100vh; 
}

.page-title { 
    font-size: 1.4rem; 
    color: #fff;
    text-align: center;
    margin-bottom: 24px; 
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ========== ITEM FOURMIZZZ (Style Fourmizzz Original) ========== */

/* Style de base pour .fz-item */
.fz-item {
    display: flex;
    flex-direction: row;
    background: var(--card-bg, #1a1a2e);
    border-radius: 8px;
    margin-bottom: 10px;
    min-height: 100px;
    overflow: hidden;
    border: 1px solid var(--border-color, #3a3a5c);
    transition: all 0.2s ease;
}

.fz-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Image du bâtiment/unité */
.fz-item-img {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    height: 120px;
    min-height: 120px;
    background: var(--bg-secondary, #252540);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 3rem;
    border-right: 1px solid var(--border-color, #3a3a5c);
}

.fz-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Mobile: layout vertical */
@media (max-width: 600px) {
    .fz-item {
        flex-direction: column;
    }
    
    .fz-item-img {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: 150px;
        border-right: none;
        border-bottom: 1px solid var(--border-color, #3a3a5c);
    }
}

/* Contenu central */
.fz-item-content {
    flex: 1;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.fz-item-title {
    font-size: 1.05rem;
    color: var(--title-color, #ff6b6b);
    margin-bottom: 5px;
    font-weight: 600;
    font-style: italic;
}

.fz-item-title .stock {
    font-size: 0.95rem;
    color: var(--text-color, #e8e8e8);
    margin-left: 8px;
    font-weight: 600;
    font-style: normal;
}

.fz-item-title .level {
    font-size: 0.85rem;
    color: var(--text-muted, #a0a0b8);
    margin-left: 8px;
    font-weight: 500;
    font-style: normal;
}

.fz-item-desc {
    font-size: 0.82rem;
    color: var(--text-muted, #8888a0);
    line-height: 1.45;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 801px) {
    .fz-item-desc {
        -webkit-line-clamp: unset;
        display: block;
        overflow: visible;
    }
}


.fz-item-stats {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.fz-item-stats span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.fz-item-stats .life { color: #f87171; }
.fz-item-stats .attack { color: #fbbf24; }
.fz-item-stats .defense { color: #60a5fa; }

.fz-item-details {
    font-size: 0.72rem;
    color: var(--text-dark, #666680);
    margin-top: 1px;
}

.fz-item-details .requirement {
    color: var(--danger-color, #f87171);
}

.fz-item-details .requirement.ok {
    color: var(--text-color, #e0e0e0);
}

/* Zone de contrôle à droite */
.fz-item-right {
    min-width: 120px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: var(--card-right-bg, rgba(0,0,0,0.15));
    border-left: 1px solid var(--border-color, #3a3a5c);
}

.fz-item-right .info-line {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--text-muted, #a0a0b8);
}

.fz-item-right .info-line.cost-ok { color: var(--success-color, #4ade80); }
.fz-item-right .info-line.cost-ko { color: var(--text-muted, #a0a0b8); opacity: 0.7; }
/* Pas de curseur "?" (help) au survol des coûts. */
.fz-item-right .info-line.cost-ok,
.fz-item-right .info-line.cost-ko { cursor: default !important; }

/* Coût : nombre entièrement lisible (plus de zéros estompés), bien centré.
   La taille est réduite par JS seulement si le nombre est très long, jamais coupé. */
.cost-num {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    text-align: center;
    transition: font-size 0.15s ease;
}

/* Full cost display with shrinking zeros */
.cost-full {
    font-size: 0.72rem;
    letter-spacing: -0.3px;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.cost-full .cost-zero {
    transition: all 0.2s ease;
}
.cost-full .cost-sep {
    display: inline;
    font-size: 60%;
}
.cost-full.cost-expanded,
.cost-full:hover {
    font-size: 0.82rem !important;
    letter-spacing: 0px;
}
.cost-full.cost-expanded .cost-zero,
.cost-full:hover .cost-zero {
    font-size: 100% !important;
    opacity: 1 !important;
}

.fz-item-right .qte-input {
    width: 55px;
    padding: 5px;
    text-align: center;
    border: 1px solid var(--border-color, #3a3a5c);
    border-radius: 4px;
    background: var(--input-bg, #1a1a2e);
    color: var(--text-color, #fff);
    font-size: 0.85rem;
    font-weight: 600;
}

.fz-item-right .qte-input:focus {
    border-color: var(--accent-color, #4f5280);
    outline: none;
}
    color: var(--text-muted, #a0a0b8);
}

.fz-item-controls .info-line.cost-ok { color: var(--success-color, #4ade80); }
.fz-item-controls .info-line.cost-ko { color: var(--text-muted, #a0a0b8); opacity: 0.7; }

.fz-item-controls .costs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.fz-item-controls .qte-input {
    width: 50px;
    padding: 5px;
    text-align: center;
    border: 1px solid var(--border-color, #3a3a5c);
    border-radius: 4px;
    background: var(--input-bg, #1a1a2e);
    color: var(--text-color, #fff);
    font-size: 0.85rem;
    font-weight: 600;
}

.fz-item-controls .actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Pour les items sans stats (bâtiments) */
.fz-item.no-stats .fz-item-stats {
    display: none;
}

/* Barre de progression style Fourmizzz */
.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--progress-bg, #333);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
    border-radius: 3px;
}

/* Boutons */
.btn-loge {
    background: var(--accent-gradient, linear-gradient(135deg, #4a4d7c 0%, #5c5f8a 100%));
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-loge:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-loge:disabled {
    background: var(--disabled-bg, #3a3a5c);
    cursor: not-allowed;
    filter: none;
    transform: none;
}

/* Bouton rond style Fourmizzz */
.btn-action {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--btn-action-bg, linear-gradient(135deg, #c9a227 0%, #9a7b0a 100%));
    border: 2px solid var(--btn-action-border, #8b6914);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.btn-action:hover {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.btn-action:disabled {
    background: var(--disabled-bg, #666);
    border-color: #555;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.btn-action img {
    width: 24px;
    height: 24px;
}

/* Bouton Construire/Rechercher — mobile-first (compact) */
.btn-construire {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 4px;
    background: linear-gradient(180deg, #4a6a2a 0%, #3a5520 100%);
    border: 1px solid rgba(74,122,42,0.6);
    color: #e8f0d8;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(74,122,42,0.25);
    font-family: inherit;
    letter-spacing: 0.2px;
    white-space: nowrap;
    margin-top: 3px;
    margin-right: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.btn-construire:hover {
    filter: brightness(1.1);
}

.btn-construire:disabled {
    cursor: not-allowed;
    transform: none;
    filter: none;
}

/* Bouton quand pas assez de ressources (locked) */
.btn-construire.btn-construire-locked {
    background: linear-gradient(180deg, #b87333 0%, #8b5a2a 100%);
    border-color: #9a6830;
    color: rgba(255,255,255,0.7);
    box-shadow: 0 2px 6px rgba(184, 115, 51, 0.2);
    opacity: 0.75;
}

.btn-construire.btn-construire-locked:hover {
    transform: none;
    filter: none;
}

/* Bouton "En cours" orange */
.btn-en-cours {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 4px;
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
    border: 1px solid #b45309;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: inherit;
    white-space: nowrap;
    margin-top: 3px;
    cursor: default;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    box-shadow: 0 1px 4px rgba(245,158,11,0.25);
    pointer-events: none;
}

/* ========== PC: Layout horizontal classique ========== */
@media (min-width: 801px) {
    .fz-item {
        display: flex;
        flex-direction: row;
        min-height: 120px;
        margin-bottom: 10px;
    }
    
    
    
    .fz-item-stats {
        display: none;
    }
    
    .fz-item-content {
        flex: 1;
        padding: 14px 18px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border-left: none;
    }
    
    /* Stats inline dans le content sur PC */
    .fz-item-content .fz-item-stats-pc {
        display: flex;
        font-size: 0.85rem;
        gap: 16px;
        margin-bottom: 4px;
    }
    
    .fz-item-stats-pc span {
        display: flex;
        align-items: center;
        gap: 3px;
    }
    
    .fz-item-stats-pc .life { color: #f87171; }
    .fz-item-stats-pc .attack { color: #fbbf24; }
    .fz-item-stats-pc .defense { color: #60a5fa; }
    
    .fz-item-title {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    
    .fz-item-desc {
        font-size: 0.85rem;
        margin-bottom: 8px;
        -webkit-line-clamp: unset;
        display: block;
        cursor: default;
    }
    
    .fz-item-controls {
        display: none;
    }
    
    .fz-item-right {
        display: flex;
        min-width: 140px;
        padding: 12px 16px;
        flex-direction: column;
        justify-content: center;
        align-items: flex-end;
        gap: 6px;
        background: var(--card-right-bg, rgba(0,0,0,0.15));
        border-left: 1px solid var(--border-color, #3a3a5c);
    }
    
    .fz-item-right .info-line {
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 4px;
        color: var(--text-muted, #a0a0b8);
    }
    
    .fz-item-right .info-line.cost-ok { color: var(--success-color, #4ade80); }
    .fz-item-right .info-line.cost-ko { color: var(--text-muted, #a0a0b8); opacity: 0.7; }
    
    .fz-item-right .qte-input {
        width: 65px;
        padding: 6px;
        text-align: center;
        border: 1px solid var(--border-color, #3a3a5c);
        border-radius: 4px;
        background: var(--input-bg, #1a1a2e);
        color: var(--text-color, #fff);
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .btn-loge {
        padding: 8px 18px;
        font-size: 0.85rem;
    }
    
    .btn-action {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    /* === BOUTON CONSTRUIRE/RECHERCHER PC === */
    /* Modifier ici pour ajuster la taille sur desktop */
    .btn-construire {
        padding: 7px 18px;
        font-size: 0.82rem;
        border-radius: 7px;
        border-width: 2px;
        margin-top: 4px;
        margin-right: 6px;
        letter-spacing: 0.3px;
        gap: 4px;
        box-shadow: 0 2px 10px rgba(74,122,42,0.35), inset 0 1px 0 rgba(255,255,255,0.12);
    }
    
    .btn-construire:hover {
        transform: translateY(-1px);
        box-shadow: 0 5px 16px rgba(74,122,42,0.45), inset 0 1px 0 rgba(255,255,255,0.18);
        filter: brightness(1.15);
    }
    
    .btn-en-cours {
        padding: 7px 18px;
        font-size: 0.82rem;
        border-radius: 7px;
        border-width: 2px;
        box-shadow: 0 2px 10px rgba(245,158,11,0.3);
    }
}

/* ========== PAGE HEADER BAR ========== */
.page-header-bar {
    padding-top: 12px;
    margin-bottom: 10px;
}

.page-header-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--title-color, #c9302c);
    font-style: italic;
    margin: 0;
    letter-spacing: -0.3px;
}

@media (max-width: 800px) {
    .page-header-bar {
        margin-bottom: 6px;
        padding-top: 6px;
    }
    .page-header-title {
        font-size: 0.9rem;
    }
}

/* ========== CARD FOURMIZZZ ========== */
.fz-card {
    background: linear-gradient(135deg, #1e1e32 0%, #252542 100%);
    border: 1px solid #3a3a5c;
    border-radius: 16px;
    margin-bottom: 20px;
    padding: 24px;
}

.fz-card-title {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #3a3a5c;
    font-weight: 600;
}

.fz-card p {
    color: #a0a0b8;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* ========== LABORATOIRE STYLES ========== */
.fz-item-effect {
    font-size: 0.75rem;
    color: var(--text-color, #e0e0e0);
    margin-top: 1px;
    font-style: normal;
    line-height: 1.3;
}

.fz-item-effect strong {
    color: var(--text-color, #fff);
    font-weight: 800;
}

@media (max-width: 800px) {
    .fz-item-effect {
        font-size: 0.65rem;
        margin-top: 1px;
    }
}

.fz-item-locked {
    opacity: 0.6;
    filter: grayscale(30%);
}

.fz-item-locked .fz-item-content .fz-item-details {
    opacity: 1 !important;
    filter: none !important;
}

.fz-item-locked .fz-item-details .requirement {
    opacity: 1 !important;
    filter: none !important;
    color: #ef4444 !important;
    font-weight: 800 !important;
    font-size: 0.85rem !important;
    text-shadow: 0 0 8px rgba(239,68,68,.3);
}

.fz-item-locked .fz-item-img {
    filter: grayscale(50%);
}

.fz-item-details .requirement {
    color: var(--danger-color, #f87171);
}

.fz-item-details .requirement.ok {
    color: var(--text-color, #e0e0e0);
}

/* ========== TABLE ========== */
.table-fz { 
    width: 100%; 
    border-collapse: collapse; 
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1e1e32 0%, #252542 100%);
    border: 1px solid #3a3a5c;
    border-radius: 12px;
    overflow: hidden;
}

.table-fz thead, .table-fz tbody {
    display: table;
    width: 100%;
}

.table-fz tr {
    display: table-row;
}

.table-fz th { 
    background: rgba(74, 77, 124, 0.15);
    color: #c8c8d8; 
    padding: 10px 6px; 
    text-align: left; 
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.table-fz td { 
    padding: 8px 6px;
    border-bottom: 1px solid #3a3a5c;
    font-size: 0.75rem;
    color: #e8e8e8;
    vertical-align: middle;
}

.table-fz tr:hover { background: rgba(74, 77, 124, 0.08); }
.table-fz tr:last-child td { border-bottom: none; }
.table-fz .timer { color: #fbbf24; font-weight: 600; }

/* PC: table plus grande */
@media (min-width: 801px) {
    .table-fz th {
        padding: 12px 10px;
        font-size: 0.8rem;
    }
    .table-fz td {
        padding: 12px 10px;
        font-size: 0.9rem;
    }
    .btn-annuler {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

/* ========== FORM BOX ========== */
.fz-form-box {
    background: rgba(0,0,0,0.2);
    border: 1px solid #3a3a5c;
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
}

.fz-form-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    color: #a0a0b8;
}

.fz-form-row label {
    min-width: 280px;
    font-size: 0.95rem;
}

.fz-form-row input[type="number"] {
    width: 120px;
    padding: 10px 14px;
    border: 2px solid #3a3a5c;
    border-radius: 8px;
    font-size: 1rem;
    background: #1a1a2e;
    color: #fff;
    font-weight: 500;
}

.fz-form-row input[type="number"]:focus {
    border-color: #4f5280;
    outline: none;
}

.fz-btn-validate {
    background: linear-gradient(135deg, #4a4d7c 0%, #5c5f8a 100%);
    border: none;
    padding: 10px 24px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.fz-btn-validate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 77, 124, 0.3);
}

/* ========== INFO BOX ========== */
.fz-info-box {
    background: rgba(74, 77, 124, 0.1);
    border: 1px solid rgba(74, 77, 124, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #c8c8d8;
}

.fz-info-box.warning {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
}

.fz-info-box strong { color: #4ade80; }

/* ========== MESSAGES ========== */
.message { 
    padding: 14px 18px; 
    border-radius: 12px; 
    margin-bottom: 16px;
    font-weight: 500;
}
.message-success { 
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2) 0%, rgba(34, 197, 94, 0.2) 100%);
    border: 1px solid rgba(74, 222, 128, 0.4);
    color: #4ade80;
}
.message-error { 
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.2) 0%, rgba(239, 68, 68, 0.2) 100%);
    border: 1px solid rgba(248, 113, 113, 0.4);
    color: #f87171;
}

/* ========== STATS GRID ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-box {
    background: linear-gradient(135deg, #1e1e32 0%, #252542 100%);
    border: 1px solid #3a3a5c;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.stat-box:hover {
    border-color: #4f5280;
}

.stat-box .label { color: #8888a0; font-size: 0.85rem; font-weight: 500; }
.stat-box .value { color: #4ade80; font-size: 1.2rem; font-weight: 700; }
.stat-box .value.red { color: #f87171; }

/* Stat box avec barre de progression */
.stat-box.stat-with-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.stat-box .stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-box .stat-bar {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 1px;
    overflow: hidden;
}

.stat-box .stat-bar-fill {
    height: 100%;
    border-radius: 1px;
    transition: width 0.3s ease;
}

.stat-box .stat-bar-fill.green { background: #4ade80; }
.stat-box .stat-bar-fill.orange { background: #f59e0b; }
.stat-box .stat-bar-fill.red { background: #ef4444; }

.stat-box .stat-capacity {
    font-size: 0.7rem;
    color: #666680;
    text-align: right;
}

/* → Déplacé dans css/mobile-nav.css */


/* ========== HORLOGE ANTX ========== */
.sb-clock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    margin: 0 10px 10px 10px;
    background: linear-gradient(135deg, rgba(74, 77, 124, 0.3) 0%, rgba(60, 60, 100, 0.3) 100%);
    border: 1px solid rgba(100, 100, 160, 0.4);
    border-radius: 10px;
    font-family: 'Courier New', monospace;
}

.sb-clock .clock-icon {
    font-size: 1rem;
}

/* ========== HORLOGE ANTX ========== */
.sb-clock {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    margin: 0 10px 8px 10px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.sb-clock:hover {
    opacity: 0.8;
}

.sb-clock .clock-time {
    font-size: 0.85rem;
    font-weight: 500;
    color: #888;
    letter-spacing: 1px;
    font-family: 'Inter', -apple-system, sans-serif;
}

/* Horloge invisible sur mobile */
/* → Déplacé dans css/mobile-nav.css */


/* ========== SIDEBAR STYLE FOURMIZZZ ========== */
.sb-stats-fz {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color, #3a3a5c);
    font-size: 0.85rem;
}

.sb-stat-line {
    display: flex;
    align-items: center;
    padding: 4px 0;
    gap: 8px;
}

.sb-stat-icon {
    width: 20px;
    text-align: center;
}

.sb-stat-value {
    flex: 1;
    font-weight: 500;
}

.sb-stat-value.res-normal {
    color: #4ade80;
}

.sb-stat-value.res-warning {
    color: #f59e0b;
    font-weight: 600;
}

.sb-stat-value.res-full {
    color: #ef4444;
    font-weight: 600;
}

.sb-stat-badge {
    background: rgba(100,100,100,0.3);
    color: #888;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    min-width: 20px;
    text-align: center;
}

.sb-stat-badge.has-new {
    background: #ef4444;
    color: #fff;
}

.sb-section-fz {
    border-bottom: 1px solid var(--border-color, #3a3a5c);
}

.sb-title-fz {
    background: rgba(0,0,0,0.15);
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted, #a0a0b8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sb-activity {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    color: var(--text-muted, #666);
    text-decoration: none;
    font-size: 0.85rem;
    gap: 8px;
    transition: all 0.2s;
}

.sb-activity:hover {
    background: rgba(255,255,255,0.05);
}

.sb-activity.on {
    color: #4ade80;
}

.sb-activity-icon {
    width: 20px;
    text-align: center;
}

.sb-activity-text {
    flex: 1;
}

.sb-search-fz {
    padding: 10px 12px;
}

.sb-search-input-fz {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color, #3a3a5c);
    border-radius: 4px;
    background: rgba(0,0,0,0.2);
    color: var(--text-color, #fff);
    font-size: 0.8rem;
}

.sb-search-input-fz::placeholder {
    color: var(--text-muted, #666);
}

.sb-search-input-fz:focus {
    outline: none;
    border-color: var(--accent-color, #4f5280);
}

/* ========== SIDEBAR FOURMIZZZ STYLE ========== */
.sb-fz-header {
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    padding: 8px 10px;
    text-align: center;
    border-bottom: 1px solid var(--border-color, #3a3a5c);
}

.sb-fz-server {
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    display: block;
}

.sb-fz-stats {
     border-bottom: 1px solid var(--border-color, #3a3a5c);
     background: #404432 !important;
}

.sb-fz-stat-row {
    display: flex;
    align-items: center;
    padding: 2px 0;
    gap: 5px;
    font-size: 0.8rem !important;
    line-height: 1.0;
}

.sb-fz-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.sb-fz-icon-small {
    width: 12px;
    height: 12px;
    object-fit: contain;
    margin-left: auto;
    flex-shrink: 0;
}

.sb-fz-value {
    color: var(--text-color, #e8e8e8);
    font-size: 11px;
    font-family: Verdana, Arial, sans-serif;
    padding: 2px;
}

.sb-fz-value.res-normal {
    color: #4ade80;
}

.sb-fz-value.res-warning {
    color: #f59e0b;
    font-weight: 600;
}

.sb-fz-value.res-full {
    color: #ef4444;
    font-weight: 600;
}

.sb-fz-badge {
    background: rgba(100,100,100,0.3);
    color: #888;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 0.7rem;
    min-width: 14px;
    text-align: center;
    flex-shrink: 0;
}

.sb-fz-badge.has-new {
    background: #ef4444;
    color: #fff;
}

.sb-fz-separator {
    height: 6px;
    background: rgba(0,0,0,0.15);
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid var(--border-color, #3a3a5c);
}

.sb-fz-section {
    border-bottom: 1px solid var(--border-color, #3a3a5c);
}

.Cplus{
background: radial-gradient(
  circle at top,
  rgba(55, 58, 44, 0.95) 0%,
  rgba(38, 40, 30, 0.9) 70%
) !important;

    padding: 5px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted, #a0a0b8);
    text-align: center;
    border-bottom: 1px solid var(--border-color, #3a3a5c);
}

.quete{
background:linear-gradient(135deg, #414532 0%, #323425 100%);
}

.weekly{
    background:
  repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255,0.0) 0px,
    rgba(255, 255, 255,0.0) 1px,
    transparent 1px,
    transparent 4px
  ),
  linear-gradient(
    180deg,
    rgba(0, 66, 120, 1),
    rgba(0, 66, 120, 1)
  ) !important;

   color: white !important; 
   font-size: 25px !important;
}

.sb-fz-activity {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    color: var(--text-muted, #888);
    text-decoration: none;
    font-size: 0.75rem;
    gap: 6px;
    transition: all 0.15s;
}

.sb-fz-activity:hover {
    background: rgba(255,255,255,0.05);
}

.sb-fz-activity.on {
    color: #4ade80;
}

.sb-fz-search {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-color, #3a3a5c);
}

.sb-fz-search-input {
    width: 100%;
    padding: 5px 6px;
    border: 1px solid var(--border-color, #3a3a5c);
    border-radius: 2px;
    background: rgba(0,0,0,0.2);
    color: var(--text-color, #fff);
    font-size: 0.7rem;
    box-sizing: border-box;
}

.sb-fz-search-input::placeholder {
    color: var(--text-muted, #666);
}

/* ========== BBCODE [code] BLOCK — IDE THEME ========== */
.bbcode-codeblock {
    margin: 10px 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #3a3a4a;
    background: #1e1e2e;
    font-size: 13px;
}
.bbcode-codeblock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: #2a2a3c;
    border-bottom: 1px solid #3a3a4a;
    font-size: 11px;
    color: #888;
}
.bbcode-codeblock-header span {
    font-weight: 600;
    color: #aaa;
}
.bbcode-codeblock-header button {
    background: #3a3a4a;
    color: #ccc;
    border: 1px solid #4a4a5a;
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}
.bbcode-codeblock-header button:hover {
    background: #4a4a5a;
    color: #fff;
}
.bbcode-codeblock-pre {
    margin: 0;
    padding: 12px 16px;
    background: #1e1e2e;
    color: #d4d4d4;
    font-family: 'Fira Code', 'Cascadia Code', 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    tab-size: 4;
}
.bbcode-codeblock-pre code {
    color: #d4d4d4;
    background: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
}
/* Light theme overrides for profil pages */
.profil-apercu-content .bbcode-codeblock,
.forum-msg-body .bbcode-codeblock {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
