/* Overlay plein écran */
.module-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1.1);
}

.module-overlay.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.overlay-close {
    position: absolute;
    top: 30px; right: 40px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    transition: transform 0.3s;
}

.overlay-close:hover { transform: rotate(90deg); }

/* Grille de modules */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.module-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    transition: all 0.3s;
}

.module-card span {
    color: white;
    margin-top: 15px;
    font-weight: 500;
    font-size: 0.9rem;
}

.m-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.module-card:hover .m-icon {
    transform: translateY(-10px) scale(1.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Couleurs spécifiques Masira */
.bg-ai { background: linear-gradient(135deg, #6366f1, #a855f7); }
.ai-glow .m-icon { animation: pulse-ai 2s infinite; }

@keyframes pulse-ai {
    0% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(168, 85, 247, 0); }
    100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); }
}

.bg-blue { background: #3b82f6; }
.bg-purple { background: #8b5cf6; }
.bg-orange { background: #f59e0b; }
.bg-teal { background: #14b8a6; }
.bg-cyan { background: #06b6d4; }
.bg-pink { background: #ec4899; }
.bg-indigo { background: #6366f1; }
.bg-red { background: #ef4444; }

/* Style du bouton Pilule */

.ecosystem-pill:hover {
    background: rgba(var(--bs-primary-rgb), 0.15) !important;
    border-color: rgba(var(--bs-primary-rgb), 0.4) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.2);
}

/* Container d'icône avec effet */
.menu-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 1.1rem;
    color: var(--bs-primary);
}

/* Texte stylisé */
.ecosystem-pill .menu-text {
    color: var(--bs-body-color);
    font-weight: 700;
    letter-spacing: -0.3px;
    font-size: 0.85rem;
}

.ecosystem-pill .text-prefix {
    opacity: 0.6;
    font-weight: 400;
}

/* Point de notification pulsant */
.pulsating-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    background: var(--bs-primary);
    border-radius: 50%;
}

.pulsating-dot::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--bs-primary);
    border-radius: 50%;
    animation: pill-pulse 2s infinite;
}

@keyframes pill-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

/* Effet de reflet au survol (Glow) */
.ecosystem-pill::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.ecosystem-pill:hover::before {
    left: 100%;
}

/* Correction de l'avatar et des éléments du menu header */
.menu-img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    overflow: hidden;
    border-radius: 50%; /* Forcer le cercle */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2d353c;
}

.menu-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Important : empêche la déformation */
}

.menu-text {
    font-weight: 600;
    font-size: 0.85rem;
}

/* Harmonisation des icônes de la toolbar */
.menu-link .menu-icon i {
    width: 20px;
    text-align: center;
}

/* Badge de notification discret */
.menu-label {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff5b57;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 50%;
    line-height: 1;
}




























 .kpi-card {
        border: none;
        border-radius: 16px;
        position: relative;
        overflow: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }
    
    .kpi-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }

    /* Dégradés Premium */
    .bg-gradient-premium-orange { background: linear-gradient(135deg, #FF9F43 0%, #FF6B6B 100%); }
    .bg-gradient-premium-teal   { background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%); }
    .bg-gradient-premium-pink   { background: linear-gradient(135deg, #FF6B6B 0%, #904e95 100%); }
    .bg-gradient-premium-indigo { background: linear-gradient(135deg, #4e54c8 0%, #8f94fb 100%); }

    /* Icône en filigrane (Watermark) */
    .card-watermark-icon {
        position: absolute;
        right: -20px;
        bottom: -20px;
        font-size: 8rem;
        opacity: 0.15;
        transform: rotate(-15deg);
        pointer-events: none;
        transition: all 0.3s ease;
    }
    
    .kpi-card:hover .card-watermark-icon {
        transform: rotate(0deg) scale(1.1);
        opacity: 0.2;
    }

    .kpi-value { font-size: 2.5rem; font-weight: 700; letter-spacing: -1px; line-height: 1; margin-bottom: 5px; }
    .kpi-label { font-size: 0.9rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; }
    
    .trend-badge {
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(5px);
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }





    /* Carte Inventaire compacte */
    .bg-gradient-inventory {
        background: linear-gradient(135deg, #2d3436 0%, #000000 100%);
    }

    .inventory-grid-compact {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2 colonnes seulement pour la hauteur */
        gap: 8px;
    }

    .inventory-mini-item {
        background: rgba(255, 255, 255, 0.05);
        padding: 8px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .inv-data h4 { font-size: 1.1rem; font-weight: 700; margin: 0; line-height: 1; }
    .inv-data small { font-size: 0.6rem; text-transform: uppercase; opacity: 0.5; display: block; }
    .inv-icon { opacity: 0.7; font-size: 1rem; width: 20px; text-align: center; }
























    
    /* --- CARTE ANALYTICS --- */
    .analytics-card {
        background: var(--theme-color);
        border-radius: 16px;
        border: 1px solid var(--bs-border-color);
        box-shadow: 0 4px 20px rgba(0,0,0,0.03);
        padding: 24px;
        height: 100%;
        position: relative;
        overflow: hidden;
    }
    
    /* Header de la carte */
    .analytics-header {
        display: flex; justify-content: space-between; align-items: flex-start;
        margin-bottom: 20px;
    }
    .analytics-title { font-size: 1.1rem; font-weight: 700; color: var(--chart-text); margin-bottom: 4px; }
    .analytics-subtitle { font-size: 0.8rem; color: var(--chart-sub); font-weight: 500; }

    /* Filtres (Pillules) */
    .chart-filter {
        background: var(--bs-tertiary-bg);
        border-radius: 8px; padding: 4px; display: inline-flex;
    }
    .filter-btn {
        border: none; background: transparent; padding: 4px 12px;
        font-size: 0.75rem; font-weight: 600; color: var(--chart-sub);
        border-radius: 6px; transition: 0.2s;
    }
    .filter-btn.active { background: var(--bs-card-bg); color: var(--chart-text); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

    /* --- KPI STATS (Sous le graphe) --- */
    .kpi-row { display: flex; gap: 20px; margin-top: 15px; padding-top: 15px; border-top: 1px dashed var(--chart-grid); }
    .kpi-item { flex: 1; }
    .kpi-label { font-size: 0.75rem; color: var(--chart-sub); text-transform: uppercase; letter-spacing: 0.5px; }
    .kpi-value { font-size: 1.2rem; font-weight: 800; color: var(--chart-text); }
    .kpi-trend { font-size: 0.75rem; font-weight: 600; display: flex; align-items: center; gap: 4px; }
    .text-up { color: var(--neon-success); }
    .text-down { color: #ef4444; }

    /* --- INSIGHTS LIST (Droite) --- */
    .insight-list { display: flex; flex-direction: column; gap: 15px; justify-content: center; height: 100%; }
    .insight-item { display: flex; align-items: center; gap: 12px; }
    .insight-icon {
        width: 36px; height: 36px; border-radius: 10px;
        display: flex; align-items: center; justify-content: center;
        font-size: 1.1rem;
    }
    .progress-thin { height: 6px; border-radius: 10px; background: var(--bs-tertiary-bg); width: 100%; margin-top: 6px; }
    .progress-bar-gradient { border-radius: 10px; background: linear-gradient(90deg, var(--neon-primary), #8b5cf6); }


















    
    /* Radar & Health styling */
    .health-score-container {
        position: relative;
        padding: 20px;
        background: rgba(var(--bs-primary-rgb), 0.03);
        border-radius: 12px;
        border: 1px dashed rgba(var(--bs-border-color-rgb), 0.5);
    }
    
    .status-indicator-dot {
        width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px;
    }
    
    .bg-neon-success { background-color: #00ff88; box-shadow: 0 0 10px rgba(0,255,136,0.5); }
    
    /* Stats List */
    .performance-list {
        list-group-item: border-0;
        background: transparent;
        padding: 10px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--bs-border-color);
    }
    
    .performance-list:last-child { border-bottom: none; }


























    

    :root {
        --studio-bg: var(--bs-body-bg);
        --studio-card: var(--bs-card-bg);
        --studio-border: var(--bs-border-color);
        --studio-text-muted: var(--bs-secondary-color);
        --studio-hover: var(--bs-tertiary-bg);
    }

    /* --- CARTE PRINCIPALE --- */
    .studio-card-ultimate {
        background-color: var(--studio-card);
        border: 1px solid var(--studio-border);
        border-radius: 16px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        display: flex; flex-direction: column; height: 100%; overflow: hidden;
    }

    /* --- HEADER GLOBAL --- */
    .studio-header {
        padding: 1.5rem;
        border-bottom: 1px solid var(--studio-border);
        display: flex; justify-content: space-between; align-items: center;
    }

    /* --- ONGLETS NAVIGATION --- */
    .nav-tabs-studio {
        border: none; gap: 20px;
    }
    .nav-tabs-studio .nav-link {
        border: none; padding: 0.5rem 0;
        color: var(--studio-text-muted);
        font-weight: 600; font-size: 0.9rem;
        position: relative; background: transparent;
    }
    .nav-tabs-studio .nav-link:hover { color: var(--bs-primary); }
    .nav-tabs-studio .nav-link.active { color: var(--bs-primary); }
    .nav-tabs-studio .nav-link.active::after {
        content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px;
        background: var(--bs-primary); border-radius: 10px;
    }

    /* --- TOOLBAR INTERNE (La nouveauté) --- */
    .tab-toolbar {
        padding: 1rem 1.5rem;
        background: var(--bs-body-bg); /* Contraste léger */
        border-bottom: 1px solid var(--studio-border);
        display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    }

    /* --- GRILLE CONTENU --- */
    .content-grid-item {
        display: grid;
        grid-template-columns: 70px 1fr 120px 50px; /* Image | Info | Stats | Actions */
        gap: 20px; padding: 14px 24px;
        border-bottom: 1px solid var(--studio-border);
        align-items: center; transition: background 0.2s;
    }
    .content-grid-item:last-child { border-bottom: none; }
    .content-grid-item:hover { background-color: var(--studio-hover); }

    /* --- ELEMENTS UI --- */
    .thumb-box {
        width: 100%; height: 50px; border-radius: 8px; overflow: hidden;
        background: var(--bs-secondary-bg); position: relative; border: 1px solid var(--studio-border);
    }
    .thumb-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
    .content-grid-item:hover .thumb-box img { transform: scale(1.1); }
    
    .item-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 2px; color: var(--bs-body-color); }
    .item-excerpt { font-size: 0.75rem; color: var(--studio-text-muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
    
    .meta-badge { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: var(--bs-tertiary-bg); color: var(--bs-body-color); display: inline-block; margin-bottom: 4px; }

    /* --- STATS VISUELLES --- */
    .stat-mini { font-size: 0.7rem; color: var(--studio-text-muted); display: flex; justify-content: space-between; margin-bottom: 2px; }
    .progress-mini { height: 3px; background: var(--studio-border); border-radius: 2px; overflow: hidden; }
    .progress-bar-mini { height: 100%; background: var(--bs-primary); border-radius: 2px; }

    /* --- ACTIONS --- */
    .btn-action {
        width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
        border: 1px solid var(--studio-border); color: var(--studio-text-muted); background: transparent; transition: 0.2s;
    }
    .btn-action:hover { border-color: var(--bs-primary); color: var(--bs-primary); background: var(--bs-primary-bg-subtle); }
    .btn-action.delete:hover { border-color: var(--bs-danger); color: var(--bs-danger); }

    /* SCROLLBAR */
    .custom-scroll::-webkit-scrollbar { width: 5px; }
    .custom-scroll::-webkit-scrollbar-thumb { background: var(--bs-border-color); border-radius: 10px; }






















































    /* Style pour les modules verrouillés */
.module-card.locked {
    filter: grayscale(1);
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none; /* Empêche le clic */
    position: relative;
}

.module-card.locked::after {
    content: "\f023"; /* Icône cadenas FontAwesome */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    font-size: 1.2rem;
}
    



















