
    
 /* BBSPB Top Bar Styles */

.navbar {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.navbar-brand {
    padding: 0;
    margin: 0;
}

.navbar-brand img {
    display: block;
}

.navbar {
    border-bottom: 3px solid #dc3545; /* rouge Bootstrap */
}












    /* bbspb-topbar-menu */
    .bbspb-topbar-menu{
      height: var(--bbspb-topbar-menu-h);
      background:#1f1f1f;
      border-bottom:3px solid #b30000; /* liseré rouge */
    }

    /* Layout */
    .app{
      /*display:flex;*/
      min-height: calc(100vh - var(--bbspb-topbar-menu-h));
      padding-top: var(--bbspb-topbar-menu-h);
    }

    /* Sidebar */
    .bbspb-sidebar{
      width: var(--sidebar-w);
      background:#f2f2f2;
      border-right:1px solid #cfcfcf;
      position: fixed;
      top: var(--bbspb-topbar-menu-h);
      left: 0;
      bottom: 0;
      display:flex;
      flex-direction:column;
    }

     .bbspb-sidebar-menu{ padding:12px 0; }
    .bbspb-sidebar .menu{
      padding: 18px 0;
      flex: 1 1 auto; 
    }

    /* Logo zone */
    .bbspb-sidebar .bbspb-sidebar-logo{
      flex: 0 0 90px;         /* hauteur FIXE */
      height: 90px;
      margin-top: auto;        /* sécurité */
      display: flex;
      align-items: flex-end;
      padding: 8px;
      border-top: 1px solid #d8d8d8;
    }

 
    .bbspb-sidebar .brand-spacer{
      height: 80px; /* zone vide en haut comme sur le rendu */
      background:#f2f2f2;
        display:flex;
        align-items:center;
        justify-content:center;
    }

     .bbspb-sidebar .brand-spacer img {
      height: 80px; /* zone vide en haut comme sur le rendu */
      margin-top:5px;
    }   

 /* BBSPB Module Menu Styles */
 
 .bbspb-module-menu-small{
      font-size: 13px;
      opacity: .85;
      letter-spacing: .2px;
      line-height: 1.1;
    }
    .bbspb-module-menu-title{
      font-size: 18px;
      font-weight: 800;
      letter-spacing: 1px;
      line-height: 1.1;
    }

    .bbspb-module-menu-card{
      background:#fff;
      border: 1px solid rgba(0,0,0,.08);
      border-radius: 6px;
      box-shadow: 0 10px 10px rgba(0,0,0,.14);
      padding: 30px 30px;
      width: 600px;  
      max-height: 80vh;          /* limit height to viewport */
      overflow-y: auto;          /* scroll if content exceeds max-height */
      z-index: 2000; 
    }   

    .bbspb-module-menu-tile{
      display:flex;
      flex-direction:column;
      align-items:center;
      text-align:center;
      text-decoration:none;
      color:inherit;
      border-radius:14px;
      padding:9px 5px;
      transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
      width:100%;
    }

    .bbspb-module-menu-tile:hover{
      background: rgba(0,0,0,.02);
      transform: translateY(-2px);
    }
.bbspb-module-menu-tile.disabled {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.5;
}
 
.bbspb-menu-breadcrumb,
.breadcrumb a,
.breadcrumb-item::before,
.breadcrumb-item ,
.breadcrumb a:hover,
.breadcrumb a:focus{
  color:#fff !important;
}

/* Supprimer tous les radius */
.bbspb-sidebar-accordion,
.bbspb-sidebar-accordion .accordion-item,
.bbspb-sidebar-accordion .accordion-button,
.bbspb-sidebar-accordion .accordion-collapse {
    border-radius: 0 !important;
}

/* En-têtes foncés */
.bbspb-sidebar-accordion-button{
  background-color: var(--mdb-dark) !important;
  color: #ffffff !important;
  font-weight: 500;
  padding: 8px 12px !important;
  font-size:0.9rem;
}

/* État ouvert */
.bbspb-sidebar-accordion-button:not(.collapsed){
  background-color: #1f1f1f !important;
  color: #ffffff !important;
  box-shadow: none;
}

/* Icône (chevron) en blanc */
.bbspb-sidebar-accordion-button::after{
  filter: brightness(0) invert(1);
}

/* Supprimer effet focus MDB */
.bbspb-sidebar-accordion-button:focus{
  box-shadow: none;
  border-color: transparent;
}


.bbspb-sidebar-menu-list{
  list-style: none;
  margin: 0;
  padding: 0;
}

.bbspb-sidebar-menu-list li{
  padding: 6px 12px;
  font-size: 0.85rem;            /* texte plus petit */
  transition: background .15s ease;
}

.bbspb-sidebar-menu-list li:hover{
  background-color: #f1f1f1;     /* gris clair */
}

.bbspb-sidebar-menu-list a{
  display: block;                /* toute la ligne cliquable */
  text-decoration: none;
  color: inherit;
}

.bbspb-sidebar-menu-list a:hover{
  color: inherit;                /* pas de bleu MDB */
}

/* Sidebar collapse styles */

:root {
    --sidebar-w: 260px;
    --sidebar-w-collapsed: 0px;
}

/* Sidebar */
.bbspb-sidebar {
    width: var(--sidebar-w);
    transition: width 0.25s ease-in-out;
    overflow: hidden;
    position: fixed;
    top: var(--bbspb-topbar-menu-h);
    left: 0;
    height: calc(100vh - var(--bbspb-topbar-menu-h));
    background: #fff;
    border-right: 1px solid #ddd;
    z-index: 1010;
}

/* Collapsed */
.bbspb-sidebar.collapsed {
    width: var(--sidebar-w-collapsed);
    border-right: none;
}

/* Main area shift */
.main {
    margin-left: var(--sidebar-w);
    transition: margin-left 0.25s ease-in-out;
}

body.sidebar-collapsed .main {
    margin-left: var(--sidebar-w-collapsed);
}

/* Toggle button (outside sidebar) */
.bbspb-sidebar-toggle {
    position: fixed;
    top: calc(var(--bbspb-topbar-menu-h) + 10px);
    left: calc(var(--sidebar-w));
    width: 38px;
    height: 38px;
    border-radius: 0px 6px 6px 0px;
    background: #7a0b0b;
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: left 0.25s ease-in-out, background 0.2s;
    z-index: 1040;
}

/* When collapsed → button moves to left edge */
body.sidebar-collapsed .bbspb-sidebar-toggle {
    left: 10px;
}

/* Ultra compact table */
.custom-compact-table.table-sm > :not(caption) > * > * {
    padding: 0.2rem 0.4rem !important;   /* .2rem vertical, .4rem horizontal */
}

.custom-compact-table.table-sm th,
.custom-compact-table.table-sm td {
    font-size: 0.875rem;                 /* slightly smaller text */
    vertical-align: middle;
}


.table-container {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    overflow: hidden;
}


.table th {
    background: #f8f9fb;
    color: #555;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .04em;
    
}

.table td {
    vertical-align: middle;
    padding: 16px 22px;
}

/* ==========================================
   Responsive scrollable button group
   ========================================== */
.btn-group-scrollable {
    display: flex;
    justify-content: center; /* centre les boutons */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 0px;
    padding: 4px 0;
    scrollbar-width: thin;           /* Firefox */
    scrollbar-color: #7a0b0b #f1f1f1;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* Chrome, Edge, Safari */
.btn-group-scrollable::-webkit-scrollbar {
    height: 6px;                     /* thin scrollbar */
    display: block;                  /* always show on wider screens */
}

.btn-group-scrollable::-webkit-scrollbar-thumb {
    background-color: #7a0b0b;
    border-radius: 10px;
}

.btn-group-scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

/* Buttons */
.btn-group-scrollable .btn {
    flex: 0 0 auto;
    white-space: nowrap;
    border-radius: 6px;
    min-width: 42px;
    padding: 8px 14px;
}

/* Active state */
.btn-group-scrollable .btn.active {
    background-color: #7a0b0b;
    border-color: #7a0b0b;
    box-shadow: 0 2px 8px rgba(122, 11, 11, 0.4);
}


/* ==========================================
   MOBILE OVERLAY MODE (no overlay, slide over)
   ========================================== */
@media (max-width: 768px) {

    /* Sidebar overlays the content */
    .bbspb-sidebar {
        position: fixed;
        left: calc(-1 * var(--sidebar-w)); /* hidden by default */
        width: var(--sidebar-w);
        transition: left 0.25s ease-in-out;
        border-right: none;
        box-shadow: 2px 0 8px rgba(0,0,0,0.15);
    }

    /* When the sidebar is expanded */
    .bbspb-sidebar:not(.collapsed) {
        left: 0;
    }

    /* The toggle button is positioned RELATIVE TO SIDEBAR */
    .bbspb-sidebar-toggle {
        position: fixed;
        top: calc(var(--bbspb-topbar-menu-h) + 10px);
        left: calc(var(--bbspb-sidebar-left, 0px) + var(--sidebar-w)); /* default for desktop */
        width: 38px;
        height: 38px;
        border-radius: 0 6px 6px 0;
        transition: left 0.25s ease-in-out;
    }

    /* MOBILE: Calculate toggle button based on sidebar's actual position */
    .bbspb-sidebar.collapsed + .bbspb-sidebar-toggle,
    body.sidebar-collapsed .bbspb-sidebar-toggle {
        left: 10px; /* sidebar hidden → button stays at left */
    }

    .bbspb-sidebar:not(.collapsed) + .bbspb-sidebar-toggle,
    body:not(.sidebar-collapsed) .bbspb-sidebar-toggle {
        left: calc(var(--sidebar-w)); /* sidebar visible → button sticks to its right edge */
    }

    /* Main content unchanged — overlay behavior */
    .main {
        margin-left: 0 !important;
    }

    /* Hide breadcrumb on mobile */
    .breadcrumb,
    .bbspb-breadcrumb,
    nav[aria-label="breadcrumb"],
    .breadcrumb-container,
    [class*="breadcrumb"] {
        display: none !important;
    }
}



/* End of sidebar collapse styles */


/* MENU MODULE RESPONSIVE STYLES */

@media (max-width: 768px) {
    .bbspb-module-menu-card {
        width: 90vw;       /* almost full viewport width */
        max-width: unset;  /* remove desktop max */
        padding: 15px;
    }

    .bbspb-module-menu-card .row {
        gap: 8px;          /* reduce spacing on mobile */
    }

    .bbspb-module-menu-tile {
        width: 100%;       /* make tiles full width on small screens */
        flex-direction: row;   /* horizontal layout if you want icon + label side by side */
        align-items: center;
        padding: 8px 12px;
    }

    .bbspb-module-menu-tile .icon-wrap {
        width: 40px;
        height: 40px;
        margin-right: 8px;  /* spacing from label */
    }

    .bbspb-module-menu-small,
    .bbspb-module-menu-title {
        font-size: 0.85rem;
        line-height: 1.1;
        margin-left: 5px;
    }
}

@media (min-width: 576px) and (max-width: 992px) {
    .bbspb-module-menu-card .row {
        justify-content: flex-start;
    }

    .bbspb-module-menu-tile {
        width: calc(50% - 10px); /* 2 per row with some gap */
    }
}

/* END OF MENU MODULE RESPONSIVE STYLES */



/* Small screens */
@media (max-width: 768px) {

    /* BREADCRUMB RESPONSIVE STYLES */
    .bbspb-menu-breadcrumb {
    display: none;   /* hide breadcrumb on small screens */
    }
    
    /* hide the name */
    #dropdown-user-menu-btn span:first-child {
        display: none;
    }

    /* Optional: adjust icon badge spacing */
    #dropdown-user-menu-btn span:last-child {
        margin-left: 0;   /* remove extra space when name is hidden */
    }
    /* END OF BREADCRUMB RESPONSIVE STYLES */


    .top-search {
        width: 180px !important;      /* smaller width on mobile */
        max-width: 70vw;   /* scale relative to viewport */
    }

    /* Optional: reduce padding inside input */
    .top-search .form-control {
        padding: 4px 8px;
        font-size: 0.85rem;
    }

    .top-search .form-label {
        font-size: 0.75rem;
    }
}
