
/* ✅ L’overlay ne s’active que sur mobile */
@media (max-width: 900px) {
#crm-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4); /* semi-transparent */
  z-index: 998; /* juste derrière la sidebar (qui est 999) */
  display: none;
}

#crm-sidebar-overlay.active {
  display: block;
}
}



#crm-sidebar-overlay.active {
    display: block;
}

/* Header principal */
.crm-header-main {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #0a1f44;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Header inversé quand menu est à gauche */
.crm-header-main.menu-left {
    flex-direction: row-reverse;
}

.crm-header-title {
    font-size: 1.2rem;
    margin: 0;
}

.crm-header-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

/* Sidebar */
.crm-header-sidebar {
    position: fixed;
    top: 60px;
    /* en dessous du header */
    width: 250px;
    height: calc(100% - 60px);
    background: #fff;
    overflow-y: auto;
    z-index: 999;
    display: none;
    /* caché par défaut */
}

/* Position droite/gauche */
.crm-header-sidebar.right {
    right: 0;
    border-left: 1px solid #ddd;
    box-shadow: -2px 0 6px rgba(0, 0, 0, 0.1);
}

.crm-header-sidebar.left {
    left: 0;
    border-right: 1px solid #ddd;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
}

/* Quand ouvert */
.crm-header-sidebar.crm-header-open {
    display: block;
}

/* Menu */
.crm-header-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.crm-header-menu-item {
    border-bottom: 1px solid #f0f0f0;
}

.crm-header-menu-item a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
}

.crm-header-menu-item a:hover {
    background: #f5f6fa;
}

/* Sous-menus */
.crm-header-has-submenu>a::after {
    content: "▼";
    float: right;
    font-size: 0.8rem;
}

.crm-header-has-submenu.crm-header-open>a::after {
    transform: rotate(-180deg);
}

.crm-header-submenu {
    display: none;
    background: #fafafa;
}

.crm-header-has-submenu.crm-header-open .crm-header-submenu {
    display: block;
}

.crm-header-submenu li a {
    padding: 12px 35px;
    font-size: 0.9rem;
}

/* Bloc infos utilisateur */
.crm-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

.crm-header-avatar {
    font-size: 1.6rem;
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crm-header-details {
    display: flex;
    flex-direction: column;
}

.crm-header-email {
    font-weight: 600;
    font-size: 12px;
    color: #333;
    font-family: "Montserrat", sans-serif;
}

.crm-header-role {
    font-size: 12px;
    color: #666;
}

/* Responsive */
@media (max-width: 900px) {
    .crm-header-sidebar {
        width: 220px;
    }

    .crm-header-avatar {
        display: none;
    }
}

/* Footer */
.crm-footer {
    width: 100%;
    text-align: center;
    padding: 15px 20px;
    background: #fff;
    border-top: 1px solid #ddd;
    color: #555;
    font-size: 14px;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 100;
}