/* BureauChat V6.6.7 — navigation UI validée */

.sidebar{
    width:272px;
    min-width:272px;
    height:100vh;
    max-height:100vh;
    overflow:hidden;
    display:flex;
    flex-direction:column;
}

.sidebar .brand{
    flex:0 0 auto;
    padding:18px 18px 14px;
}

.sidebar nav{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    padding:8px 14px 20px;
}

.sidebar-bottom{
    flex:0 0 auto;
    padding:10px 14px 16px;
    border-top:1px solid rgba(255,255,255,.14);
}

/* Liens simples */
.sidebar .bc-nav-link{
    display:grid !important;
    grid-template-columns:42px minmax(0,1fr);
    align-items:center;
    gap:12px;
    min-height:54px;
    margin:4px 0 !important;
    padding:7px 10px !important;
    border-radius:14px !important;
    color:inherit !important;
    background:transparent !important;
    font-weight:500;
    transition:background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.sidebar .bc-nav-link:hover{
    background:rgba(255,255,255,.075) !important;
}

.sidebar .bc-nav-link.active{
    background:linear-gradient(135deg,rgba(40,132,255,.92),rgba(18,105,232,.96)) !important;
    box-shadow:0 8px 20px rgba(0,45,115,.18);
}

.bc-nav-icon{
    width:38px;
    height:38px;
    display:grid;
    place-items:center;
    border-radius:11px;
    background:rgba(255,255,255,.075);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.05);
    font-size:17px;
}

.bc-nav-link.active .bc-nav-icon{
    background:rgba(255,255,255,.14);
}

/* Cartes de catégorie */
.bc-module-group{
    margin:12px 0;
    padding:0;
    border:1px solid rgba(115,190,255,.34);
    border-radius:18px;
    background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(25,104,194,.12));
    overflow:hidden;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.018);
}

.bc-module-card{
    width:100%;
    border:0;
    background:transparent;
    color:inherit;
    font:inherit;
    display:grid;
    grid-template-columns:48px minmax(0,1fr) 34px;
    align-items:center;
    gap:12px;
    padding:14px 14px 12px;
    cursor:pointer;
    text-align:left;
}

.bc-module-card:hover{
    background:rgba(255,255,255,.045);
}

.bc-module-card-icon{
    width:46px;
    height:46px;
    display:grid;
    place-items:center;
    border-radius:13px;
    background:linear-gradient(145deg,rgba(50,137,239,.38),rgba(255,255,255,.08));
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.09);
    font-size:20px;
}

.bc-module-card-copy{
    display:grid;
    min-width:0;
    gap:2px;
}

.bc-module-card-copy strong{
    font-size:1rem;
    font-weight:700;
    line-height:1.15;
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
}

.bc-module-card-copy small{
    font-size:.76rem;
    color:rgba(255,255,255,.64);
}

.bc-module-card-chevron{
    width:32px;
    height:32px;
    display:grid;
    place-items:center;
    border-radius:10px;
    background:rgba(255,255,255,.065);
    font-size:17px;
    opacity:.92;
    transform:rotate(0deg);
    transition:transform .18s ease;
}

.bc-module-group:not(.is-open) .bc-module-card-chevron{
    transform:rotate(-90deg);
}

/* Sous-modules directement lisibles comme dans la maquette validée */
.bc-module-panel{
    display:none;
    margin:0 14px 12px;
    padding:0;
    border-top:1px solid rgba(255,255,255,.10);
}

.bc-module-group.is-open .bc-module-panel{
    display:block;
}

.bc-module-item{
    display:grid !important;
    grid-template-columns:38px minmax(0,1fr);
    align-items:center;
    gap:10px;
    min-height:54px;
    margin:0 !important;
    padding:8px 4px !important;
    border-radius:0 !important;
    border-bottom:1px solid rgba(255,255,255,.075);
    background:transparent !important;
    color:inherit !important;
}

.bc-module-item:last-child{
    border-bottom:0;
}

.bc-module-item:hover{
    background:rgba(255,255,255,.045) !important;
}

.bc-module-item.active{
    background:rgba(38,130,247,.18) !important;
}

.bc-module-item-icon{
    width:36px;
    height:36px;
    display:grid;
    place-items:center;
    border-radius:10px;
    background:rgba(47,133,238,.24);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);
    font-size:15px;
}

.bc-module-item > span:last-child{
    display:block;
    min-width:0;
}

.bc-module-item strong{
    display:block;
    font-size:.94rem;
    font-weight:550;
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
}

.bc-module-item small{
    display:none;
}

/* Suppression de tout ancien rendu Zoho dans la navigation */
.sidebar a[href*="route=zoho"],
.settings-nav a[href*="tab=zoho"]{
    display:none !important;
}

@media(max-width:900px){
    .sidebar{
        width:min(86vw,290px);
        min-width:min(86vw,290px);
    }
    .sidebar nav{
        padding-left:12px;
        padding-right:12px;
    }
}

@media(max-width:560px){
    .bc-module-group{border-radius:16px}
    .bc-module-card{grid-template-columns:44px minmax(0,1fr) 32px;padding:12px}
    .bc-module-card-icon{width:42px;height:42px}
}
