/* ========== THEME FOURMIZZZ CLASSIC ========== */

body[data-theme="classic"] {
    --fz-beige: #d4c4a0;
    --fz-beige-light: #e8dcc0;
    --fz-border: #a08050;
    --fz-title-red: #c9302c;
    --fz-link-blue: #0066cc;
    --fz-green-kaki: #5a6a3a;
    --fz-text: #333;
    --fz-text-muted: #555;
    
    --bg-primary: #c8b890;
    --card-bg: linear-gradient(180deg, #e8dcc0 0%, #d8ccac 100%);
    --input-bg: #fffef8;
    --border-color: #a08050;
    --text-color: #333;
    --text-muted: #555;
    --title-color: #c9302c;
    --success-color: #5a6a3a;

    display: flex;
    flex-direction: column;
    background: url('../image_2.png') no-repeat center top fixed;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    background-color: #87a96b;
    color: var(--fz-text);
    font-family: Arial, Helvetica, sans-serif;
}
body[data-theme="classic"].btn-primary-build{
    font-size: 2em;
}
/* ========== LAYOUT CENTRÉ : SIDEBAR + MAIN ========== */
/* Wrapper pour centrer sidebar + main ensemble */

/* Header - même largeur que main (1100px), centré */
body[data-theme="classic"] #header {
    width: 1100px !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    background: linear-gradient(180deg, #3a3d2a 0%, #2d2f22 100%);
    border-bottom: none;
    border-left: 2px solid #2a3a2a;
    border-right: 2px solid #2a3a2a;
     
}

body[data-theme="classic"] #nav {
    width: 100%;
    justify-content: space-between;
}

body[data-theme="classic"] #nav .nav-item {
    position: relative;
}

body[data-theme="classic"] #nav .nav-link {
    padding: 0 20px;
    height: 44px;
    justify-content: center;
    color: #e8e8d8;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    border-right: 1px solid rgba(255,255,255,0.15);
    flex-direction: row;
    gap: 6px;
}

body[data-theme="classic"] #nav .nav-link:hover,
body[data-theme="classic"] #nav .nav-item:hover > .nav-link {
    background: #454838;
    color: #fff;
}

body[data-theme="classic"] #nav .nav-link .icon {
    font-size: 1rem;
}

body[data-theme="classic"] #nav .nav-link .text {
    font-size: 0.85rem;
    margin-top: 0;
    color: #e8e8d8;
}

/* Bouton déconnexion petit */
body[data-theme="classic"] #nav .nav-item:last-child .nav-link {
    padding: 0 12px;
}

/* Sidebar - 215px, à gauche du bloc principal */
body[data-theme="classic"] #sidebar {
    position: fixed !important;
    left: calc(50% - 550px - 225px) !important;
    top: 60px !important;
    width: 215px !important;
    height: calc(100vh - 60px) !important;
    background: transparent !important;
    border: none !important;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    box-sizing: border-box;
    z-index: 100;
    display: block !important;
}

/* Main content - centré, 1100px, fond #C9AD63 */
body[data-theme="classic"] #main {
    width: 1100px !important;
    max-width: 1100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 15px 25px;
    background: #C9AD63 !important;
    border-left: 2px solid #a08050;
    border-right: 2px solid #a08050;
    min-height: calc(100vh - 60px);
    box-sizing: border-box;
    padding: 12px 0 !important;
}

/* ========== ITEMS UNITES/BATIMENTS - 215px x 145px ========== */
body[data-theme="classic"] .unite-card,
body[data-theme="classic"] .fz-item,
body[data-theme="classic"] .batiment-card,
body[data-theme="classic"] .unit-card {
    width: calc(100% - 16px);
    min-height: 75px;
    display: flex;
    flex-direction: row;
    background: #D7C384 !important;
    border: 2px solid #a08050 !important;
    border-radius: 0 !important;
    margin: 0 8px 8px 8px !important;
    box-sizing: border-box;
    box-shadow: 1px 2px 4px rgba(0,0,0,0.15);
}

/* Titre de page avec padding */
body[data-theme="classic"] .page-title {
    padding-left: 20px;
    padding-right: 20px;
    margin-bottom: 10px;
    color: var(--fz-title-red);
    font-style: italic;
}

/* Messages avec padding */
body[data-theme="classic"] .message {
    margin-left: 20px;
    margin-right: 20px;
}

/* Cartes fz-card */
body[data-theme="classic"] .fz-card {
    margin: 0 8px 8px 8px !important;
    width: calc(100% - 16px);
    background: #D7C384;
    border: 2px solid #a08050;
}

body[data-theme="classic"] .unite-card .unite-img,
body[data-theme="classic"] .fz-item .fz-item-img,
body[data-theme="classic"] .batiment-card .batiment-img,
body[data-theme="classic"] .unit-card .unit-image {
    width: 115px !important;
    min-width: 15px !important;
    max-width: 105 !important;
    height: 55px !important;
    min-height: 55px !important;
    max-height: 65px !important;
    background: #5a6a7a !important;
    border-right: 2px solid #a08050 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

body[data-theme="classic"] .unite-card .unite-img img,
body[data-theme="classic"] .fz-item .fz-item-img img,
body[data-theme="classic"] .batiment-card .batiment-img img,
body[data-theme="classic"] .unit-card .unit-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

body[data-theme="classic"] .unite-card .unite-content,
body[data-theme="classic"] .fz-item .fz-item-content,
body[data-theme="classic"] .batiment-card .batiment-content,
body[data-theme="classic"] .unit-card .unit-content {
    flex: 1;
    padding: 12px 15px;
    background: #D7C384 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body[data-theme="classic"] .unite-card .unite-right,
body[data-theme="classic"] .fz-item .fz-item-right,
body[data-theme="classic"] .batiment-card .batiment-right {
    width: 160px;
    min-width: 160px;
    background: #D7C384 !important;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* Actions pour reine.php - Style Fourmizzz */
body[data-theme="classic"] .unit-card .unit-action {
    width: 170px;
    min-width: 170px;
    max-width: 170px;
    background: #D7C384 !important;
    border-left: 1px solid #a08050 !important;
    border-top: none !important;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 4px;
    flex-shrink: 0;
}

/* Form style Fourmizzz */
body[data-theme="classic"] .action-form-fz {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

/* Range/Slider container */
body[data-theme="classic"] .fz-range-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 2px;
}

/* Quantité sous le slider avec icône fourmi */
body[data-theme="classic"] .fz-slider-qte {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    margin-left: 2px;
    margin-bottom: 0;
}

body[data-theme="classic"] .fz-fourmi-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

body[data-theme="classic"] .fz-slider-qte .qte-display {
    font-size: 0.85rem;
    color: #333;
    cursor: pointer;
}

body[data-theme="classic"] .fz-slider-qte .qte-edit-input {
    display: none;
    width: 80px;
    font-size: 0.85rem;
    padding: 2px 5px;
    border: 1px solid #999;
    border-radius: 3px;

}

/* Barre unité reine PC - intérieur blanc, peu arrondi */
body[data-theme="classic"] .fz-range {
    width: 100%;
    height: 12px;
    -webkit-appearance: none;
    appearance: none;
    background: #fff;
    border: 1px solid #999;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

/* Rond du slider - gris foncé, presque carré */
body[data-theme="classic"] .fz-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #888;
    border: 1px solid #666;
    border-radius: 2px;
    cursor: pointer;
}

body[data-theme="classic"] .fz-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #888;
    border: 1px solid #666;
    border-radius: 2px;
    cursor: pointer;
}

/* Infos de ponte */
body[data-theme="classic"] .fz-action-infos {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body[data-theme="classic"] .fz-info-line {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #333;
}

body[data-theme="classic"] .fz-info-line.ko {
    opacity: 0.6;
}

body[data-theme="classic"] .fz-info-line span:first-child {
    width: 18px;
    text-align: center;
}

body[data-theme="classic"] .fz-qty-input {
    width: 55px;
    padding: 3px 5px;
    border: 1px solid #a08050;
    background: #fffef8;
    color: #333;
    font-size: 0.8rem;
    text-align: center;
}

body[data-theme="classic"] .fz-dest-btn {
    background: transparent;
    border: none;
    color: #333;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

body[data-theme="classic"] .fz-dest-btn:hover {
    color: #0066cc;
}

/* Bouton pondre style Fourmizzz sur PC */
body[data-theme="classic"] .fz-btn-egg {
    width: 40px;
    height: 40px;
    background: linear-gradient(180deg, #f5deb3 0%, #daa520 100%);
    border: 2px solid #b8860b;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    align-self: center;
    margin-top: -50px;
    margin-left: 60px;
    transition: transform 0.15s;
}

body[data-theme="classic"] .fz-btn-egg:hover:not(:disabled) {
    transform: scale(1.1);
}

body[data-theme="classic"] .fz-btn-egg:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Boutons Construire/Rechercher/Pondre — classic theme */
body[data-theme="classic"] .btn-construire {
    background: linear-gradient(180deg, #4a6a2a 0%, #3a5520 100%);
    border: 1px solid rgba(74,122,42,0.6);
    color: #e8f0d8;
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    margin-top: 3px;
    margin-right: 4px;
    align-self: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* === BOUTON CONSTRUIRE/RECHERCHER PC (classic) === */
@media (min-width: 801px) {
    body[data-theme="classic"] .btn-construire {
        padding: 7px 18px;
        font-size: 0.82rem;
        border-radius: 7px;
        border-width: 2px;
        margin-right: 6px;
        letter-spacing: 0.3px;
        box-shadow: 0 2px 10px rgba(74,122,42,0.35), inset 0 1px 0 rgba(255,255,255,0.12);
    }
    body[data-theme="classic"] .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);
    }
    body[data-theme="classic"] .btn-en-cours {
        padding: 7px 18px;
        font-size: 0.82rem;
        border-radius: 7px;
        border-width: 2px;
    }
}

body[data-theme="classic"] .btn-construire.btn-construire-locked {
    background: linear-gradient(180deg, #b87333 0%, #8b5a2a 100%);
    border-color: #9a6830;
    color: rgba(255,255,255,0.7);
    opacity: 0.75;
}

body[data-theme="classic"] .unit-card .unit-stats{
        margin-top: 40px;
        margin-left: 8px !important;
        font-size: 1.1em;
        font-weight: normal;

}

/* Titre et textes */
body[data-theme="classic"] .unit-card .unit-title .name {
    font-size: 1.4em;
    line-height: 2.0;
    color: #c9302c !important;
    font-style: italic;
}
 
/* Boutons et inputs */
body[data-theme="classic"] .unit-card .qty-input {
    background: #fffef8 !important;
    border: 1px solid #a08050 !important;
    color: #333 !important;
}

body[data-theme="classic"] .unit-card .dest-btn {
    background: rgba(160, 128, 80, 0.3) !important;
    border: 1px solid #a08050 !important;
    color: #333 !important;
}

body[data-theme="classic"] .unit-card .btn-egg {
    background: linear-gradient(180deg, #f0e68c 0%, #daa520 100%) !important;
    border: 2px solid #b8860b !important;
}

body[data-theme="classic"] .unit-card .action-costs {
    color: #333 !important;
}

body[data-theme="classic"] .fz-card-title {
    background: rgba(180, 160, 120, 0.8);
    border-bottom: 2px solid #a08050;
    color: #333;
    padding: 10px 15px;
    font-weight: bold;
}

/* ========== BLOC STATS (partie haute) ========== */
body[data-theme="classic"] .sb-fz-stats {
    background: rgba(80, 85, 65, 0.94);
    border: 1px solid rgba(60, 65, 50, 0.8);
    border-radius: 8px;
    padding: 0;
    margin-bottom: 20px !important;
}

body[data-theme="classic"] .sb-fz-header {
    background: rgba(50, 55, 40, 0.95);
    border-bottom: 1px solid rgba(80, 85, 65, 0.6);
    border-radius: 8px 8px 0 0;
    padding: 8px 12px;
    text-align: center;
}

body[data-theme="classic"] .sb-fz-server {
    color: #d0d0c0;
    font-size: 0.9rem;
    font-weight: normal;
}

body[data-theme="classic"] .theme-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(60, 65, 50, 0.6);
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1.1rem;
    background: #fffef8;
    border: 1px solid var(--fz-border);
}

body[data-theme="classic"] .theme-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

body[data-theme="classic"] .theme-btn.open {
    background: rgba(100, 150, 100, 0.4);
    border-color: rgba(100, 150, 100, 0.8);
    border-color: var(--fz-green-kaki);
    background: rgba(90, 106, 58, 0.15);
}

/* Supprimer tout élément résiduel dans le sidebar */
body[data-theme="classic"] #sidebar::after {
    display: none !important;
}

body[data-theme="classic"] #sidebar > *:last-child {
    margin-bottom: 0;
}
.fz-item-capacity {
    font-size: 0.85rem;
    color: black;
    margin-top: 8px;
    margin-left: -10px;
    padding: 6px 10px;
    font-weight: bold;
    
}

.fz-item-capacity strong {
    color: gray;
    font-weight: normal;
}

body[data-theme="classic"] .fz-item .fz-item-right .btn-action {
        width: 50px !important;
        height: 50px !important;
        margin-top: 2px !important;
        align-self: flex-end !important;
        background: #E6BE60 !important;
        border: 1px solid #a09070 !important;
        border-radius: 50% !important;
        font-size: 1.8rem !important;
        cursor: pointer !important;
    }
    body[data-theme="classic"] .fz-item .fz-item-right .btn-action:hover {
        background: #DBAC44 !important;
        transform: scale(1.0) !important;
        cursor: pointer !important;
    }

/* LAYOUT - géré par sidebar-classic.css */

/* HEADER */
body[data-theme="classic"] .nav-logo {
    background: rgba(0, 0, 0, 0.95);
    border-right: 1px solid #3a5a3a;
}

/* DROPDOWNS */
body[data-theme="classic"] .dropdown:not(.mobile-sidebar) {
    background: linear-gradient(180deg, #2d3025 0%, #1f2219 100%);
    border: 1px solid #1a1c15;
    border-radius: 0 0 12px 12px;
    box-shadow: 
        0 10px 40px rgba(0,0,0,0.5),
        0 4px 12px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.05);
    padding: 8px 0;
}

body[data-theme="classic"] .dropdown:not(.mobile-sidebar) a {
    color: #b8b8a8;
    background: transparent;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
    border-left: 2px solid transparent;
    margin: 2px 8px;
    border-radius: 6px;
    padding: 9px 14px;
}

body[data-theme="classic"] .dropdown:not(.mobile-sidebar) a:hover {
    background: linear-gradient(90deg, rgba(139, 195, 74, 0.16) 0%, rgba(139, 195, 74, 0.04) 100%);
    color: #fff;
    border-left: 2px solid #8bc34a;
    transform: none;
}

body[data-theme="classic"] .dropdown:not(.mobile-sidebar) a .dd-icon {
    opacity: 0.85;
    transition: opacity 0.12s ease;
}

body[data-theme="classic"] .dropdown:not(.mobile-sidebar) a:hover .dd-icon {
    opacity: 1;
    transform: none;
}

/* Apparition INSTANTANÉE du dropdown au survol (desktop) : aucun délai, aucun fondu */
@media (min-width: 801px) {
    body[data-theme="classic"] .nav-item > .dropdown:not(.mobile-sidebar) {
        opacity: 0;
        transform: none;
        pointer-events: none;
        transition: none;
    }
    body[data-theme="classic"] .nav-item:hover > .dropdown:not(.mobile-sidebar),
    body[data-theme="classic"] .nav-item.open > .dropdown:not(.mobile-sidebar) {
        opacity: 1;
        transform: none;
        pointer-events: auto;
        transition: none;
    }
}

/* Apple popup */
body[data-theme="classic"] .apple-popup {
    background: linear-gradient(180deg, #e8dcc0 0%, #d8ccac 100%);
    border: 2px solid var(--fz-border);
}

body[data-theme="classic"] .apple-popup-header {
    background: linear-gradient(180deg, #5a7a5a 0%, #4a6a4a 100%);
    border-bottom: 2px solid #3a5a3a;
}

body[data-theme="classic"] .apple-popup-stats {
    background: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid var(--fz-border);
}

body[data-theme="classic"] .apple-popup-stats .stat-row { color: var(--fz-text); }
body[data-theme="classic"] .apple-popup-stats .stat-row .value { color: var(--fz-text); }
body[data-theme="classic"] .apple-popup-stats .stat-row .value.green { color: var(--fz-text); }
body[data-theme="classic"] .apple-popup-stats .stat-row .value.res-warning { color: #b8860b; }
body[data-theme="classic"] .apple-popup-stats .stat-row .value.res-full { color: #c9302c; }

body[data-theme="classic"] .apple-popup-recolte {
    background: rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid var(--fz-border);
    color: var(--fz-text);
}

body[data-theme="classic"] .apple-popup-activities {
    background: rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid var(--fz-border);
}

body[data-theme="classic"] .apple-popup-activities .activity-row { color: var(--fz-text-muted); }
body[data-theme="classic"] .apple-popup-activities .activity-row.on { color: var(--fz-green-kaki); }
body[data-theme="classic"] .apple-popup-theme { border-top: 1px solid var(--fz-border); }

body[data-theme="classic"] .mobile-progress-bar { background: rgba(0,0,0,0.15); }
body[data-theme="classic"] .mobile-progress-fill.green { background: var(--fz-green-kaki); }
body[data-theme="classic"] .mobile-progress-fill.orange { background: #b8860b; }
body[data-theme="classic"] .mobile-progress-fill.red { background: #c9302c; }

/* CARDS & ITEMS - Couleurs et styles (dimensions gérées par sidebar-classic.css) */
body[data-theme="classic"] .fz-item-title,
body[data-theme="classic"] .unite-nom {
    color: var(--fz-title-red);
    font-style: italic;
}

body[data-theme="classic"] .fz-item-title .level,
body[data-theme="classic"] .fz-item-title .stock,
body[data-theme="classic"] .unite-stock {
    color: var(--fz-green-kaki);
    font-style: normal;
}

body[data-theme="classic"] .fz-item-desc,
body[data-theme="classic"] .unite-desc { 
    color: var(--fz-text); 
}

body[data-theme="classic"] .fz-item-stats .stat,
body[data-theme="classic"] .fz-item-requis,
body[data-theme="classic"] .unite-requis,
body[data-theme="classic"] .ponte-costs { 
    color: var(--fz-text-muted); 
}

body[data-theme="classic"] .fz-item-requis a,
body[data-theme="classic"] .unite-requis span { 
    color: var(--fz-link-blue); 
}

body[data-theme="classic"] .fz-item-right .info-line { 
    color: var(--fz-text); 
}

body[data-theme="classic"] .qte-input {
    background: #fffef8;
    border: 1px solid var(--fz-border);
    color: var(--fz-text);

}

body[data-theme="classic"] .btn-action {
    background: linear-gradient(180deg, #f0e68c 0%, #daa520 100%);
    border: 2px solid #b8860b;
}

body[data-theme="classic"] .btn-loge {
    background: linear-gradient(180deg, #5a7a5a 0%, #4a6a4a 100%);
    border: 1px solid #3a5a3a;
    color: #fff;
}

body[data-theme="classic"] .dest-toggle {
    background: rgba(160, 128, 80, 0.2);
    border: 1px solid var(--fz-border);
    color: var(--fz-text);
}

body[data-theme="classic"] .ponte-item {
    background: rgba(160, 128, 80, 0.15);
    border: 1px solid var(--fz-border);
}

body[data-theme="classic"] .ponte-details strong,
body[data-theme="classic"] .ponte-timer { color: var(--fz-text); }
body[data-theme="classic"] .ponte-dest { color: var(--fz-text-muted); }

/* TABLES */
body[data-theme="classic"] .table-armee,
body[data-theme="classic"] .table-fz,
body[data-theme="classic"] .admin-table {
    background: linear-gradient(180deg, #e8dcc0 0%, #d8ccac 100%);
    border: 2px solid var(--fz-border);
}

body[data-theme="classic"] .table-armee th,
body[data-theme="classic"] .table-fz th,
body[data-theme="classic"] .admin-table th {
    background: rgba(0, 0, 0, 0.1);
    color: var(--fz-text);
    border-bottom: 2px solid var(--fz-border);
}

body[data-theme="classic"] .table-armee td,
body[data-theme="classic"] .table-fz td,
body[data-theme="classic"] .admin-table td {
    color: var(--fz-text);
    border-bottom: 1px solid rgba(160, 128, 80, 0.4);
}

body[data-theme="classic"] .table-armee tr:hover,
body[data-theme="classic"] .table-fz tr:hover,
body[data-theme="classic"] .admin-table tr:hover {
    background: rgba(255, 255, 255, 0.35);
}

body[data-theme="classic"] .table-armee .total-row { background: rgba(160, 128, 80, 0.15); }
body[data-theme="classic"] .table-armee td.unite-qte.has-units { color: var(--fz-green-kaki); }

/* STAT BOXES */
body[data-theme="classic"] .stat-box {
    background: linear-gradient(180deg, #e8dcc0 0%, #d8ccac 100%);
    border: 1px solid var(--fz-border);
}
body[data-theme="classic"] .stat-box .label { color: var(--fz-text-muted); }
body[data-theme="classic"] .stat-box .value { color: var(--fz-green-kaki); }

/* BONUS & CONVOIS */
body[data-theme="classic"] .bonus-info {
    background: rgba(160, 128, 80, 0.15);
    border-left: 3px solid var(--fz-border);
    color: var(--fz-text);
}
body[data-theme="classic"] .bonus-info strong { color: var(--fz-title-red); }
body[data-theme="classic"] .stats-resume { color: var(--fz-text-muted); }

body[data-theme="classic"] .convoi-item {
    background: rgba(160, 128, 80, 0.15);
    border: 1px solid var(--fz-border);
}
body[data-theme="classic"] .convoi-item.retour {
    background: rgba(90, 106, 58, 0.15);
    border-color: rgba(90, 106, 58, 0.4);
}
body[data-theme="classic"] .convoi-text { color: var(--fz-text); }
body[data-theme="classic"] .convoi-timing,
body[data-theme="classic"] .convoi-field label { color: var(--fz-text-muted); }

body[data-theme="classic"] .btn-convoi,
body[data-theme="classic"] .btn-deplacer {
    background: linear-gradient(180deg, #5a7a5a 0%, #4a6a4a 100%);
    border: 2px solid #3a5a3a;
    color: #fff;
}

/* INPUTS */
body[data-theme="classic"] input,
body[data-theme="classic"] select,
body[data-theme="classic"] textarea {
    background: #fffef8;
    border: 1px solid var(--fz-border);
    color: var(--fz-text);
}
body[data-theme="classic"] input::placeholder,
body[data-theme="classic"] textarea::placeholder { color: #888; }

/* BUTTONS */
body[data-theme="classic"] .btn-primary,
body[data-theme="classic"] .btn-compte {
    background: linear-gradient(180deg, #5a7a5a 0%, #4a6a4a 100%);
    border: 2px solid #3a5a3a;
    color: #fff;
}

/* MESSAGES */
body[data-theme="classic"] .message,
body[data-theme="classic"] .message-success {
    background: rgba(90, 106, 58, 0.15);
    border: 2px solid var(--fz-green-kaki);
    color: var(--fz-green-kaki);
}
body[data-theme="classic"] .message-error {
    background: rgba(201, 48, 44, 0.15);
    border: 2px solid #c9302c;
    color: #c9302c;
}

/* PROFIL */
body[data-theme="classic"] .profile-hero,
body[data-theme="classic"] .compte-section {
    background: linear-gradient(180deg, #e8dcc0 0%, #d8ccac 100%);
    border: 2px solid var(--fz-border);
    border-radius: 0;
}

body[data-theme="classic"] .profile-name { color: var(--fz-title-red); }
body[data-theme="classic"] .profile-info,
body[data-theme="classic"] .stat-mini-value,
body[data-theme="classic"] .stat-card-value { color: var(--fz-text); }
body[data-theme="classic"] .stat-mini-label,
body[data-theme="classic"] .stat-card-label { color: var(--fz-text-muted); }

body[data-theme="classic"] .badge { border: 1px solid; }
body[data-theme="classic"] .badge-alliance { background: rgba(0, 102, 204, 0.15); color: var(--fz-link-blue); border-color: var(--fz-link-blue); }
body[data-theme="classic"] .badge-server { background: rgba(106, 90, 205, 0.15); color: #6a5acd; border-color: #6a5acd; }
body[data-theme="classic"] .badge-secure { background: rgba(90, 106, 58, 0.15); color: var(--fz-green-kaki); border-color: var(--fz-green-kaki); }
body[data-theme="classic"] .badge-temp { background: rgba(212, 160, 23, 0.15); color: #b8860b; border-color: #b8860b; }

body[data-theme="classic"] .stats-grid-profile .stat-card {
    background: linear-gradient(180deg, #e8dcc0 0%, #d8ccac 100%);
    border: 1px solid var(--fz-border);
    border-radius: 0;
}

body[data-theme="classic"] .compte-section-title {
    background: rgba(0, 0, 0, 0.08);
    color: var(--fz-title-red);
    font-style: italic;
    border-bottom: 1px solid var(--fz-border);
}

body[data-theme="classic"] .compte-section-content { color: var(--fz-text); }
body[data-theme="classic"] .warning-text { color: #b8860b; }
body[data-theme="classic"] .textarea-desc { background: #fffef8; color: var(--fz-text); }

body[data-theme="classic"] .avatar-ring {
    background: linear-gradient(135deg, #5a7a5a 0%, #4a6a4a 100%);
}
body[data-theme="classic"] .avatar-level {
    background: linear-gradient(135deg, #6a5acd 0%, #5a4abd 100%);
}

/* ONBOARDING */
body[data-theme="classic"] .onboard-card {
    background: linear-gradient(180deg, #e8dcc0 0%, #d8ccac 100%);
    border: 2px solid var(--fz-border);
}
body[data-theme="classic"] .onboard-card h2 { color: var(--fz-title-red); }
body[data-theme="classic"] .onboard-subtitle,
body[data-theme="classic"] .input-hint { color: var(--fz-text-muted); }

body[data-theme="classic"] .input-wrapper input {
    background: #fffef8;
    border: 2px solid var(--fz-border);
    color: var(--fz-text);
}

body[data-theme="classic"] .btn-next,
body[data-theme="classic"] .btn-confirm,
body[data-theme="classic"] .btn-stay {
    background: linear-gradient(180deg, #5a7a5a 0%, #4a6a4a 100%);
    color: #fff;
}

body[data-theme="classic"] .step-num {
    background: rgba(160, 128, 80, 0.3);
    border: 2px solid var(--fz-border);
    color: var(--fz-text);
}
body[data-theme="classic"] .step.open .step-num {
    background: linear-gradient(135deg, #5a7a5a 0%, #4a6a4a 100%);
    border-color: #3a5a3a;
    color: #fff;
}
body[data-theme="classic"] .step.done .step-num {
    background: var(--fz-green-kaki);
    border-color: var(--fz-green-kaki);
    color: #fff;
}
body[data-theme="classic"] .step-label { color: var(--fz-text-muted); }
body[data-theme="classic"] .step.open .step-label { color: var(--fz-green-kaki); }
body[data-theme="classic"] .step-line { background: var(--fz-border); }
body[data-theme="classic"] .step-line.done { background: var(--fz-green-kaki); }

body[data-theme="classic"] .recap-box { background: rgba(0,0,0,0.08); }
body[data-theme="classic"] .recap-label { color: var(--fz-text-muted); }
body[data-theme="classic"] .recap-value { color: var(--fz-text); }
body[data-theme="classic"] .recap-item { border-bottom-color: rgba(160, 128, 80, 0.3); }
body[data-theme="classic"] .btn-back,
body[data-theme="classic"] .btn-skip { color: var(--fz-text-muted); }

body[data-theme="classic"] .skip-modal-content {
    background: linear-gradient(180deg, #e8dcc0 0%, #d8ccac 100%);
    border: 2px solid #c9302c;
}
body[data-theme="classic"] .skip-modal-content h3 { color: #c9302c; }
body[data-theme="classic"] .skip-modal-content p { color: var(--fz-text); }
body[data-theme="classic"] .warning-highlight { background: rgba(201, 48, 44, 0.15); color: #c9302c !important; }
body[data-theme="classic"] .btn-leave {
    background: transparent;
    border: 1px solid var(--fz-border);
    color: var(--fz-text-muted);
}

/* ADMIN */
body[data-theme="classic"] .admin-stat,
body[data-theme="classic"] .admin-card,
body[data-theme="classic"] .enquete-card {
    background: linear-gradient(180deg, #e8dcc0 0%, #d8ccac 100%);
    border: 2px solid var(--fz-border);
    border-radius: 0;
}

body[data-theme="classic"] .admin-stat .stat-value { color: var(--fz-green-kaki); }
body[data-theme="classic"] .admin-stat .stat-label { color: var(--fz-text-muted); }

body[data-theme="classic"] .admin-tabs a {
    background: linear-gradient(180deg, #e8dcc0 0%, #d8ccac 100%);
    border: 2px solid var(--fz-border);
    color: var(--fz-text);
}

body[data-theme="classic"] .admin-tabs a.open,
body[data-theme="classic"] .admin-tabs a.open-enquete {
    background: linear-gradient(180deg, #5a7a5a 0%, #4a6a4a 100%);
    border-color: #3a5a3a;
    color: #fff;
}

body[data-theme="classic"] .admin-card-title {
    background: rgba(0, 0, 0, 0.08);
    color: var(--fz-title-red);
    font-style: italic;
    border-bottom: 1px solid var(--fz-border);
}

body[data-theme="classic"] .ip-code { background: rgba(0,0,0,0.1); color: var(--fz-text); }
body[data-theme="classic"] .date-cell { color: var(--fz-text-muted); }

body[data-theme="classic"] .badge-admin { background: #6a5acd; }
body[data-theme="classic"] .badge-banned { background: #c9302c; }
body[data-theme="classic"] .badge-guest { background: #b8860b; color: #fff; }
body[data-theme="classic"] .badge-ok { background: var(--fz-green-kaki); }

body[data-theme="classic"] .btn-admin {
    background: linear-gradient(180deg, #e8dcc0 0%, #d8ccac 100%);
    border: 1px solid var(--fz-border);
    color: var(--fz-text);
}
body[data-theme="classic"] .btn-admin.btn-primary {
    background: linear-gradient(180deg, #5a7a5a 0%, #4a6a4a 100%);
    border-color: #3a5a3a;
    color: #fff;
}
body[data-theme="classic"] .btn-admin.btn-danger { background: #c9302c; color: #fff; }
body[data-theme="classic"] .btn-admin.btn-success { background: var(--fz-green-kaki); color: #fff; }
body[data-theme="classic"] .btn-admin.btn-warning { background: #b8860b; color: #fff; }

body[data-theme="classic"] .btn-small { color: var(--fz-text); }
body[data-theme="classic"] .btn-small.btn-primary { 
    background: linear-gradient(180deg, #5a7a5a 0%, #4a6a4a 100%); 
    color: #fff; 
}

body[data-theme="classic"] .enquete-header {
    background: linear-gradient(180deg, rgba(90, 122, 90, 0.95) 0%, rgba(74, 106, 74, 0.95) 100%);
    border: 2px solid #3a5a3a;
}
body[data-theme="classic"] .enquete-header h2 { color: #fff; }
body[data-theme="classic"] .enquete-id { color: rgba(255,255,255,0.7); }
body[data-theme="classic"] .enquete-avatar { background: linear-gradient(135deg, #6a8a6a 0%, #4a6a4a 100%); }
body[data-theme="classic"] .enquete-card h3 { color: var(--fz-title-red); font-style: italic; }

body[data-theme="classic"] .info-row { color: var(--fz-text); border-bottom-color: rgba(160, 128, 80, 0.3); }
body[data-theme="classic"] .info-row span:first-child { color: var(--fz-text-muted); }
body[data-theme="classic"] .info-row code { background: rgba(0,0,0,0.1); color: var(--fz-text); }
body[data-theme="classic"] .description-box { background: rgba(0,0,0,0.08); color: var(--fz-text); }
body[data-theme="classic"] .edit-description textarea { background: #fffef8; color: var(--fz-text); }
body[data-theme="classic"] .same-ip-item { background: rgba(212, 160, 23, 0.2); color: #806020; }
body[data-theme="classic"] .action-group { background: rgba(0,0,0,0.08); }
body[data-theme="classic"] .action-group label { color: var(--fz-text-muted); }
body[data-theme="classic"] .action-group input { background: #fffef8; color: var(--fz-text); }
body[data-theme="classic"] .danger-zone { background: rgba(201, 48, 44, 0.1); border-color: #c9302c; }
body[data-theme="classic"] .ban-form input,
body[data-theme="classic"] .search-form input { background: #fffef8; color: var(--fz-text); }
body[data-theme="classic"] .no-data { color: var(--fz-text-muted); }
body[data-theme="classic"] .hostname-cell,
body[data-theme="classic"] .details-cell { color: var(--fz-text-muted); }

body[data-theme="classic"] .admin-table tr.row-banned { background: rgba(201, 48, 44, 0.1); }
body[data-theme="classic"] .admin-table tr.row-connexion { background: rgba(90, 106, 58, 0.08); }
body[data-theme="classic"] .admin-table tr.row-deconnection { background: rgba(212, 160, 23, 0.08); }
body[data-theme="classic"] .actions-cell { color: var(--fz-text); }

/* FORMS */
body[data-theme="classic"] .form-inline input { background: #fffef8; color: var(--fz-text); }
body[data-theme="classic"] .checkbox-label { color: var(--fz-text); }

/* LINKS */
body[data-theme="classic"] a { color: var(--fz-link-blue); }
body[data-theme="classic"] a:hover { color: #004499; }

/* SCROLLBAR */
body[data-theme="classic"] ::-webkit-scrollbar { width: 12px; }
body[data-theme="classic"] ::-webkit-scrollbar-track { background: #c8b890; }
body[data-theme="classic"] ::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #a08050 0%, #806030 100%); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1500px) {
    body[data-theme="classic"] #header {
        width: auto !important;
        max-width: none !important;
        margin-left: 235px !important;
        margin-right: 15px !important;
    }
    body[data-theme="classic"] #sidebar {
        left: 10px !important;
    }
    body[data-theme="classic"] #main {
        width: auto !important;
        max-width: none !important;
        margin-left: 235px !important;
        margin-right: 15px !important;
    }
}

/* TABLETTE */
@media (max-width: 1024px) {
    body[data-theme="classic"] #header {
        margin-left: 10px !important;
        margin-right: 10px !important;
        width: auto !important;
        border-left: none !important;
        border-right: none !important;
    }
    body[data-theme="classic"] #sidebar {
        display: none !important;
    }
    body[data-theme="classic"] #main {
        margin-left: 10px !important;
        margin-right: 10px !important;
        padding: 10px !important;
        width: auto !important;
        border-left: none !important;
        border-right: none !important;
    }
}

/* MOBILE - Style Fourmizzz IDENTIQUE */
@media (max-width: 800px) {
    /* === HEADER & NAV === */
    body[data-theme="classic"] #header {
        margin: 0 !important;
        width: 100% !important;
        background: #4F5241 !important;
    }
    
    body[data-theme="classic"] #nav {
        display: flex !important;
        background: #4F5241 !important;
    }
    
    body[data-theme="classic"] #nav .nav-item {
        position: relative;
    }
    
    body[data-theme="classic"] #nav .nav-item.mobile-only {
        display: flex !important;
    }
    
    body[data-theme="classic"] #nav .nav-item.mobile-only .nav-logo {
        background: #5F6251 !important;
        padding: 10px 15px !important;
    }
    
    body[data-theme="classic"] #nav .nav-link {
        padding: 8px 12px !important;
        min-height: 50px !important;
        background: transparent !important;
    }
    
    body[data-theme="classic"] #nav .nav-link .icon {
        font-size: 1.4rem !important;
    }
    
    body[data-theme="classic"] #nav .nav-link .text {
        display: none !important;
    }
    
    /* === MAIN === */ */
    body[data-theme="classic"] #main {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        min-height: calc(100vh - 50px) !important;
        background: #C9AD63 !important;
    }
    
    body[data-theme="classic"] .page-title {
        padding: 5px 10px !important;
        font-size: 1rem !important;
        margin-bottom: 0 !important;
    }
    
    /* ============================================
       CARTES UNITÉS - HAUTEUR = IMAGE
       ============================================ */
    body[data-theme="classic"] .unit-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch !important;
        width: calc(100% - 6px) !important;
        margin: 3px !important;
        padding: 0 !important;
        border: 1px solid #a08050 !important;
        background: #D7C384 !important;
        box-shadow: none !important;
        min-height: auto !important;
        height: auto !important;
    }
    
    /* IMAGE - carrée */
    body[data-theme="classic"] .unit-card .unit-image {
        width: 65px !important;
        min-width: 65px !important;
        max-width: 65px !important;
        height: 65px !important;
        min-height: 65px !important;
        max-height: 65px !important;
        margin: 5px !important;
        border: 1px solid #8B7355 !important;
        background: #666 !important;
        flex-shrink: 0 !important;
        overflow: hidden !important;
        align-self: flex-start !important;
    }
    
    body[data-theme="classic"] .unit-card .unit-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }
    
    /* STATS - à droite de l'image  sur MOBILE */
    body[data-theme="classic"] .unit-card .unit-stats {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: flex-start !important;
        padding: 0 4px !important;
        background: transparent !important;
        border: none !important;
        width: auto !important;
        min-width: 32px !important;
        gap: 1px !important;
        align-self: center !important;
        margin-left: 20px !important;
    }
    
    body[data-theme="classic"] .unit-card .unit-stats .stat {
        display: flex !important;
        align-items: center !important;
        gap: 1px !important;
        font-size: 0.7rem !important;
        line-height: 1.3 !important;

    }
    
    body[data-theme="classic"] .unit-card .unit-stats .stat span {
        font-size: 0.65rem !important;
    }
    
    /* Couleurs stats Fourmizzz */
    body[data-theme="classic"] .unit-card .unit-stats .stat.vie { color: #cc3333 !important; }
    body[data-theme="classic"] .unit-card .unit-stats .stat.att { color: #996633 !important; }
    body[data-theme="classic"] .unit-card .unit-stats .stat.def { color: #3399cc !important; }
    
    /* CONTENU - compact */
    body[data-theme="classic"] .unit-card .unit-content {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        padding: 4px 6px !important;
        min-width: 0 !important;
        border: none !important;
        overflow: hidden !important;
    }
    
    body[data-theme="classic"] .unit-card .unit-title {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: baseline !important;
        gap: 4px !important;
        margin-bottom: 1px !important;
    }
    
    body[data-theme="classic"] .unit-card .unit-title .name {
        font-size: 0.85rem !important;
        font-weight: bold !important;
        font-style: italic !important;
        color: #cc3333 !important;
    }
    
    body[data-theme="classic"] .unit-card .unit-title .stock {
        font-size: 0.78rem !important;
        font-weight: normal !important;
        color: #333 !important;
    }
    
    /* Description cliquable avec ... */
    body[data-theme="classic"] .unit-card .unit-desc {
        font-size: 0.68rem !important;
        line-height: 1.2 !important;
        color: #333 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        cursor: pointer !important;
    }
    
    body[data-theme="classic"] .unit-card .unit-desc.expanded {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
    }
    
 
    
    /* ZONE ACTION - compacte */
    body[data-theme="classic"] .unit-card .unit-action {
        width: 95px !important;
        min-width: 95px !important;
        max-width: 95px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: stretch !important;
        padding: 4px !important;
        border: none !important;
        background: #D7C384 !important;
    }
    
    body[data-theme="classic"] .action-form-fz {
        display: flex !important;
        flex-direction: column !important;
        gap: 1px !important;
        width: 100% !important;
    }
    
    /* Slider fin Fourmizzz */
    body[data-theme="classic"] .fz-range-container {
        width: 100% !important;
        margin-bottom: 2px !important;
    }
    
    /* largeur barre fz-range MOBILE*/
    body[data-theme="classic"] .fz-range {
        width: 100% !important;
        height: 7px !important;
        background: #bbb !important;
        border: none !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }
    
    body[data-theme="classic"] .fz-range::-webkit-slider-thumb {
        -webkit-appearance: none !important;
        width: 12px !important;
        height: 12px !important;
        background: #4a7a4a !important;
        border: none !important;
        cursor: pointer !important;
    }
    
    /* Infos action */
    body[data-theme="classic"] .fz-action-infos {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        width: 100% !important;
    }
    
    body[data-theme="classic"] .fz-info-line {
        display: flex !important;
        align-items: center !important;
        gap: 3px !important;
        font-size: 0.65rem !important;
        line-height: 1.4 !important;
        color: #333 !important;
    }
    
    body[data-theme="classic"] .fz-info-line span:first-child {
        font-size: 0.6rem !important;
    }
    
    body[data-theme="classic"] .fz-qty-input {
        width: 45px !important;
        padding: 2px 3px !important;
        font-size: 0.7rem !important;
        border: 1px solid #999 !important;
        background: #fff !important;
        text-align: center !important;
    }
    
    body[data-theme="classic"] .fz-dest-btn {
        font-size: 0.65rem !important;
        color: #333 !important;
        text-decoration: none !important;
    }
    
    /* Bouton pondre - rond */
    body[data-theme="classic"] .fz-btn-egg {
        width: 32px !important;
        height: 32px !important;
        background: radial-gradient(circle, #ffffff 10%, #eee8aa 40%, #daa520 100%) !important;
        box-shadow: 0 0 3px rgba(255, 215, 0, 0.3), inset 0 0 2px #fff !important;
        border: 0.1px solid #daa520 !important;        
        border: 1px solid #a09070 !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.95rem !important;
        cursor: pointer !important;
    }
    
    /* ============================================
       CARTES BATIMENTS/RECHERCHES
       ============================================ */
    body[data-theme="classic"] .fz-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch !important;
        width: calc(100% - 6px) !important;
        margin: 3px !important;
        padding: 0 !important;
        border: 1px solid #a08050 !important;
        background: #D7C384 !important;
        box-shadow: none !important;
    }
    
    body[data-theme="classic"] .fz-item .fz-item-img {
        width: 65px !important;
        min-width: 65px !important;
        max-width: 65px !important;
        height: 65px !important;
        min-height: 65px !important;
        max-height: 65px !important;
        margin-top: 10px !important;
        border: 1px solid #8B7355 !important;
        background: #D7C384 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.8rem !important;
        flex-shrink: 0 !important;
        overflow: hidden !important;
        align-self: flex-start !important;
    }
    
    body[data-theme="classic"] .fz-item .fz-item-img img {
        width: 100px !important;
        height: 100px !important;
        object-fit: cover !important;
    }
    
    body[data-theme="classic"] .fz-item .fz-item-content {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        padding: 4px 6px !important;
        min-width: 0 !important;
        border: none !important;
        max-height: 120px !important;
    }
    
    body[data-theme="classic"] .fz-item .fz-item-title {
        font-size: 0.90rem !important;
        font-weight: bold !important;
        font-style: italic !important;
        color: #cc3333 !important;
        margin-bottom: 1px !important;
    }
    
    body[data-theme="classic"] .fz-item .fz-item-title .level {
        font-size: 0.75rem !important;
        font-weight: normal !important;
        font-style: normal !important;
        color: #5a6a3a !important;
    }
    
    body[data-theme="classic"] .fz-item .fz-item-desc {
        font-size: 0.70rem !important;
        line-height: 1.2 !important;
        color: #333 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        cursor: pointer !important;
    }
    
    body[data-theme="classic"] .fz-item .fz-item-desc.expanded {
        white-space: normal !important;
        overflow: visible !important;
    }
    
    body[data-theme="classic"] .fz-item .fz-item-capacity {
        font-size: 0.62rem !important;
        margin-top: 2px !important;
        color: black !important;
    }
    
    /* Zone action bâtiments */
    body[data-theme="classic"] .fz-item .fz-item-right {
        width: 80px !important;
        min-width: 80px !important;
        max-width: 80px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: flex-start !important;
        padding: 4px !important;
        border: none !important;
        background: #D7C384 !important;
        gap: 0 !important;
    }
    
    body[data-theme="classic"] .fz-item .fz-item-right .info-line {
        font-size: 0.65rem !important;
        line-height: 1.35 !important;
        color: #333 !important;
    }
    
    /* Bouton Construire Sur Construction MOBILE */
    body[data-theme="classic"] .fz-item .fz-item-right .btn-action {
        width: 15px !important;
        height: 15px !important;
        margin-top: -32px !important;
        align-self: flex-end !important;
        background: #D7C384 !important;
        
        border-radius: 50% !important;
        font-size: 0.2em !important;
        cursor: pointer !important;
        margin-left: 45px;
    }
    
    /* === STATS GRID === */
    body[data-theme="classic"] .stats-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 3px !important;
        padding: 3px !important;
        margin-bottom: 0 !important;
    }
    
    body[data-theme="classic"] .stats-grid .stat-box {
        padding: 4px !important;
        font-size: 0.65rem !important;
        background: #D7C384 !important;
        border: 1px solid #a08050 !important;
    }
    
    /* === FZ-CARD === */
    body[data-theme="classic"] .fz-card {
        margin: 3px !important;
        width: calc(100% - 6px) !important;
        padding: 4px !important;
        background: #D7C384 !important;
        border: 1px solid #a08050 !important;
    }
    
    body[data-theme="classic"] .fz-card-title {
        font-size: 0.75rem !important;
        padding: 2px 4px !important;
        color: #cc3333 !important;
        font-style: italic !important;
    }
    
    /* Cacher tableau PC */
    body[data-theme="classic"] .desktop-only {
        display: none !important;
    }
    
    /* === PONTES EN COURS === */
    body[data-theme="classic"] .ponte-item {
        padding: 4px !important;
        gap: 6px !important;
        border-bottom: 1px solid #a08050 !important;
    }
    
    body[data-theme="classic"] .ponte-icon {
        font-size: 0.9rem !important;
    }
    
    body[data-theme="classic"] .ponte-details {
        font-size: 0.65rem !important;
    }
    
    body[data-theme="classic"] .ponte-timer {
        font-size: 0.7rem !important;
    }
    
    body[data-theme="classic"] .btn-annuler {
        font-size: 0.55rem !important;
        padding: 2px 5px !important;
    }
    
    /* === MESSAGES === */
    body[data-theme="classic"] .message {
        margin: 3px !important;
        padding: 6px !important;
        font-size: 0.7rem !important;
    }
    
    /* === APPLE POPUP === */
    body[data-theme="classic"] .apple-popup {
        background: #4F5241 !important;
        border: 1px solid #3a5a3a !important;
    }
    
    body[data-theme="classic"] .apple-popup-header {
        background: #3F4231 !important;
        color: #d0d0c0 !important;
    }
}

/* RESPONSIVE */
@media (max-width: 1400px) {
    body[data-theme="classic"] #sidebar {
        left: 0;
        margin-left: 0;
    }
    body[data-theme="classic"] #main {
        margin-left: 200px;
        max-width: none;
        padding-left: 24px;
    }
}

@media (max-width: 900px) {
    body[data-theme="classic"] .fz-item { 
        flex-direction: column; }
    body[data-theme="classic"] .fz-item-img { 
        width: 100%; 
        height: 150px; 
        border-right: none; 
        border-bottom: 2px solid var(--fz-border); 
    }
    body[data-theme="classic"] .fz-item-right { 
        width: 100%; 
        border-left: none; 
        border-top: 1px solid var(--fz-border); 
    }
}

@media (max-width: 800px) {
    body[data-theme="classic"] #main {
        margin-left: 0;
        padding-left: 16px;
        background: rgba(216, 200, 160, 0.98);
    }
}

/* ============================================================
   CORRECTIF MOBILE V15 : BARRE TRES LONGUE + OEUF EN BAS A DROITE
   ============================================================ */

@media (max-width: 800px) {

    /* 1. LA CARTE ENTIÈRE */
    body[data-theme="classic"] .unit-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch !important;
        height: auto !important;
        min-height: 85px !important;
        padding: 0 !important;
        margin-bottom: 6px !important;
        overflow: visible !important;
    }

    /* 2. IMAGE (Gauche) */
    body[data-theme="classic"] .unit-card .unit-image {
        width: 70px !important;
        min-width: 70px !important;
        height: auto !important;
        margin: 0 !important;
        border-right: 1px solid #a08050 !important;
        flex-shrink: 0 !important;
    }

    /* 3. STATS (Attaque, Défense...) */
    body[data-theme="classic"] .unit-card .unit-stats {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-self: center !important;
        width: 32px !important;
        min-width: 32px !important;
        margin: 0 !important;
        padding: 0 2px !important;
        background: rgba(255,255,255,0.1) !important;
        border-right: 1px solid rgba(160, 128, 80, 0.3) !important;
        gap: 2px !important;
    }

    body[data-theme="classic"] .unit-card .unit-stats .stat {
        font-weight: bold !important;  
        font-size: 0.65rem !important;
        line-height: 1.1 !important;
        margin: 0 !important;
    }

    /* 4. TEXTE CENTRAL (Nom) */
    body[data-theme="classic"] .unit-card .unit-content {
        flex: 1 !important;
        padding: 2px 4px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        min-width: 0 !important;
    }

    body[data-theme="classic"] .unit-card .unit-title {
        font-size: 0.8rem !important;
        margin-bottom: 1px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    body[data-theme="classic"] .unit-card .unit-desc {
        font-size: 0.65rem !important;
        line-height: 1.1 !important;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* 5. ZONE ACTION (Bouton et Formulaire) */
    body[data-theme="classic"] .unit-card .unit-action {
        width: 145px !important; /* <-- ENCORE PLUS LARGE POUR LA BARRE ! */
        min-width: 145px !important;
        max-width: 145px !important;
        border-left: 1px solid #a08050 !important;
        border-top: none !important;
        padding: 4px !important;
        background: rgba(255,255,255,0.15) !important;
        display: flex !important;
        align-items: center !important;
        position: relative !important; /* Repère pour l'oeuf */
    }

    /* FORMULAIRE : Prend tout l'espace possible */
    body[data-theme="classic"] .action-form-fz {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important; /* PLUS AUCUNE RESTRICTION À DROITE */
        gap: 2px !important;
        position: static !important; 
    }

    /* La barre prend 100% de l'espace de la zone entière ! */
    body[data-theme="classic"] .fz-range-container {
        width: 100% !important;
        margin: 0 !important;
    }

    body[data-theme="classic"] .fz-range {
        width: 100% !important;
        height: 12px !important; /* <-- BARRE PLUS ÉPAISSE */         
        margin: 0 0 2px 0 !important;            
        padding: 0 !important;
        background: #fff !important;
        border: 1px solid #999 !important;
        border-radius: 2px !important;
        appearance: none !important;
        -webkit-appearance: none !important;
    }

    body[data-theme="classic"] .fz-range::-webkit-slider-thumb {
        width: 18px !important; /* <-- BOUTON PLUS GROS */
        height: 18px !important;
        background: #888 !important;
        border: 1px solid #666 !important;
        border-radius: 2px !important;
        -webkit-appearance: none !important;
    }

    /* Quantité + Fourmi (Limitée pour ne pas toucher l'oeuf) */
    body[data-theme="classic"] .fz-slider-qte {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important; 
        gap: 5px !important; 
        height: 16px !important; 
        margin: 0 !important; 
        padding: 0 !important;
        max-width: calc(100% - 32px) !important; /* Laisse l'oeuf à droite */
    }
    
    body[data-theme="classic"] .fz-fourmi-icon {
        width: 14px !important;
        height: 14px !important;
        margin: 0 !important;
    }

    body[data-theme="classic"] .fz-slider-qte .qte-display {
        font-size: 0.7rem !important; /* Un peu plus gros */
        margin: 0 !important; 
        padding: 0 !important;
        line-height: 1 !important;
                        margin-top: 5px !important;

    }

    /* Infos (Temps/Ressources) (Limitée pour ne pas toucher l'oeuf) */
    body[data-theme="classic"] .fz-action-infos {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important; 
        gap: 1px !important;
        width: 100% !important;
        max-width: calc(100% - 32px) !important; /* Laisse l'oeuf à droite */
        margin: 0 !important;
        margin-top: 10px !important; /* Espace respecté */
    }

    body[data-theme="classic"] .fz-info-line {
        font-size: 0.65rem !important;
        white-space: nowrap !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
    }

    body[data-theme="classic"] .fz-info-line span:first-child {
        width: 16px !important;
        text-align: center !important;
    }

    body[data-theme="classic"] .fz-qty-input {
        width: 40px !important;
        height: 20px !important;
        font-size: 0.8rem !important;
        text-align: center !important;
        margin-bottom: 2px !important;

    }

    /* Destination */
    body[data-theme="classic"] .fz-dest-btn {
        font-size: 0.6rem !important;
        padding-top: 5px !important;
        max-width: 55px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* --- L'OEUF JAUNE NORMAL PLACÉ EN BAS À DROITE --- */
    body[data-theme="classic"] .unit-card .unit-action .fz-btn-egg {
        position: absolute !important; /* Flotte au-dessus du reste */
        right: 4px !important; 
        bottom: 8px !important; /* Calé en bas à droite */
        top: auto !important;   /* Ne s'aligne plus au centre */
        transform: none !important;
        width: 30px !important; 
        height: 30px !important; 
        min-width: 30px !important;
        max-width: 30px !important;
        margin: 0 !important; 
        padding: 0 !important;
        font-size: 0.9rem !important; 
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        z-index: 10 !important;
    }

    /* --- FIX : OEUF GRISÉ (Quand l'unité est bloquée) --- */
    body[data-theme="classic"] .unit-card .unit-action.unit-action-locked {
        justify-content: center !important;
    }
    
    body[data-theme="classic"] .unit-card .unit-action.unit-action-locked .fz-btn-egg {
        position: static !important; 
        transform: none !important;
        margin: 0 auto !important; 
    }
}