/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.ib-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: white;
    border-right: 1px solid #e5e7eb;
    padding: 80px 24px 32px 24px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden; 
    box-sizing: border-box;
    transition: width 0.3s ease, padding 0.3s ease;
}

/* Logo */
.ib-sidebar__logo {
    position: fixed;  
    top: 0;
    left: 0;
    width: 280px;  
    background: white;
    z-index: 10;
    padding: 26px 24px 16px 24px; 
    text-align: center;
    border-right: 1px solid #e5e7eb; 
    box-sizing: border-box;
    transition: width 0.3s ease, padding 0.3s ease;
}

.ib-sidebar__logo-img {
    width: 140px;
    height: auto;
}

/* Petit logo caché par défaut */
.ib-sidebar__logo-img-small {
    display: none;
    width: 33px !important;
    height: auto;
}

.ib-sidebar__logo-text {
    font-size: 24px;
    font-weight: 700;
}

.ib-sidebar__logo-text--primary {
    color: #2563eb;
}

.ib-sidebar__logo-text--secondary {
    color: #f97316;
}

/* ========== TOGGLE BUTTON - MODERNE ========== */
.ib-sidebar__toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 11;
    padding: 0;
}

.ib-sidebar__toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.ib-sidebar__toggle-icon {
    width: 20px !important;
    height: 20px !important;
    stroke: #8e8ea0 !important;
    stroke-width: 1.5 !important;
    transition: transform 0.3s ease;
    display: block !important;
    fill: none;
}

/* SIDEBAR COLLAPSED - LOGO DEVIENT LE TOGGLE */
.ib-sidebar.collapsed .ib-sidebar__logo {
    width: 70px !important;
    padding: 20px 8px !important;
    cursor: pointer;
}

.ib-sidebar.collapsed .ib-sidebar__logo-img {
    display: none;
}

.ib-sidebar.collapsed .ib-sidebar__logo-img-small {
    display: block !important;
    margin: 0 auto;
    cursor: pointer;
}

.ib-sidebar.collapsed .ib-sidebar__toggle-btn {
    display: none !important;
}

/* Boutons d'action */
.ib-sidebar__actions {
	margin-top:12px;
    padding-top: 26px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: center;
    transition: all 0.3s ease;
}

.ib-sidebar__btn-new {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    background: #000;
    color: white;
    border: none;
    padding: 12px 2px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
}

.ib-sidebar__btn-new:hover {
    background: #2d2d2d !important;
    transform: scale(1.02);
    color: white!important;
}

/* Icône du bouton New */
.ib-sidebar__btn-new svg {
   width: 16px;
    height: 16px;
    flex-shrink: 0; /* L'icône garde sa taille */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Texte du bouton New avec transition */
.ib-sidebar__btn-new span {
   display: inline-block;
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    overflow: hidden;
    max-width: 200px;
    line-height: 1.4;
/*     margin-left: 18px;  */
}

.ib-sidebar__btn-search {
    width: 44px;
    height: 40px;
    display: none;
    background: #000;
    padding: 3px 12px!important;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ib-sidebar__btn-search:hover {
    background: #2d2d2d !important;
    transform: scale(1.05);
    color: white!important;
}

/* MODE COLLAPSED - CACHE NEW QUESTION, MONTRE SEARCH */
.ib-sidebar.collapsed .ib-sidebar__btn-new {
    display: none !important;
}

.ib-sidebar.collapsed .ib-sidebar__btn-search {
    display: flex !important;
    width: 44px;
    height: 44px;
	margin: 0 auto;           
    align-items: center;     
    justify-content: center;  
}

.ib-sidebar.collapsed .ib-sidebar__actions {
    justify-content: center;
}

.ib-sidebar__icon {
    width: 18px;
    height: 18px;
}

/* Spacer */
.ib-sidebar__spacer {
    flex: 1;
}

/* Menu en bas */
.ib-sidebar__nav {
    margin-bottom: 24px;
}

.ib-sidebar__menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ib-sidebar__menu-item {
    margin-bottom: 4px;
}

/* ========== MENU LINK - ICÔNES FIXES EN ABSOLUTE ========== */
.ib-sidebar__menu-link {
    display: flex;
    align-items: center;
    padding: 12px 16px 12px 50px;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: background 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 42px;
}

.ib-sidebar__menu-link:hover {
    background: #f3f4f6;
}

/* L'icône en POSITION ABSOLUTE - elle reste VRAIMENT fixe */
.ib-sidebar__menu-link svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    pointer-events: none;
}

/* Le texte avec transition smooth */
.ib-sidebar__menu-link span {
    display: inline-block;
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.4s ease, transform 0.4s ease, max-width 0.4s ease;
    white-space: nowrap;
    overflow: hidden;
    max-width: 200px;
    line-height: 1.4;
}

/* Menu en mode collapsed - icônes NE BOUGENT PAS */
.ib-sidebar.collapsed .ib-sidebar__menu-link {
    padding: 12px 16px 12px 50px;
}

.ib-sidebar.collapsed .ib-sidebar__menu-link svg {
    left: 16px;
}

/* Le texte disparaît en smooth */
.ib-sidebar.collapsed .ib-sidebar__menu-link span {
    opacity: 0;
    transform: translateX(-20px);
    max-width: 0;
}

/* Boutons Partner/Login */
.ib-sidebar__action-buttons {
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ib-sidebar__bottom-btn {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    color: #111827 !important;
    position: relative;
    text-decoration: none;
    overflow: hidden;
    min-height: 48px;
}

.ib-sidebar__bottom-btn:last-child {
    margin-bottom: 0;
}

.ib-sidebar__bottom-btn:hover {
    background: #f9fafb !important;
    border-color: #d1d5db !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Icône FIXE en absolute - décalée à gauche du centre */
.ib-sidebar__bottom-btn svg {
    position: absolute;
	
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin-left: -40px;
    width: 18px;
    height: 18px;
    pointer-events: none;
    transition: margin-left 0.4s ease, left 0.4s ease;
}

/* Texte du bouton avec transition SMOOTH */
.ib-sidebar__bottom-btn span {
    display: inline-block;
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.4s ease, transform 0.4s ease, max-width 0.4s ease, margin-left 0.4s ease;
    white-space: nowrap;
    overflow: hidden;
    max-width: 200px;
    line-height: 1;
    margin: 0;
    padding: 0;
    margin-left: 40px;
}

/* Boutons en mode collapsed */
.ib-sidebar.collapsed .ib-sidebar__bottom-btn {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    margin-left: auto;
    margin-right: auto;
    min-width: 48px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ib-sidebar.collapsed .ib-sidebar__bottom-btn svg {
    left: 50%;
    margin-left: 0;
    transform: translate(-50%, -50%);
}

/* Le texte disparaît en SMOOTH comme le menu */
.ib-sidebar.collapsed .ib-sidebar__bottom-btn span {
    opacity: 0;
    transform: translateX(-20px);
    max-width: 0;
    margin-left: 0;
}

/* ========== SIDEBAR COLLAPSED ========== */
.ib-sidebar.collapsed {
    width: 70px !important;
    padding: 80px 8px 32px 8px !important;
}

/* Mobile */
.ib-sidebar-toggle {
    display: none;
}

.ib-sidebar-overlay {
    display: none;
}

/* ============================================
   RÉDUCTION SIDEBAR MAC DESKTOP UNIQUEMENT
   ============================================ */
@media only screen 
  and (min-width: 1024px) 
  and (-webkit-min-device-pixel-ratio: 2),
  only screen 
  and (min-width: 1024px) 
  and (min-resolution: 192dpi) {
    
    /* Sidebar principale */
    .ib-sidebar,
    body .ib-sidebar,
    html .ib-sidebar {
        width: 260px !important;
        max-width: 260px !important;
    }
    
    /* Logo fixe */
    .ib-sidebar__logo,
    body .ib-sidebar__logo,
    html .ib-sidebar__logo {
        width: 260px !important;
        max-width: 260px !important;
    }
    
    /* Logo image */
/*     .ib-sidebar__logo-img,
    body .ib-sidebar__logo-img,
    html .ib-sidebar__logo-img {
        width: 160px !important;
        max-width: 160px !important;
    }
     */
    /* Main content ajusté */
    .ib-main-content,
    body .ib-main-content,
    html .ib-main-content {
       /* margin-left: 260px !important;*/
    }
    
    /* Sidebar container ajusté */
    .ib-sidebar-container,
    body .ib-sidebar-container,
    html .ib-sidebar-container {
        width: 250px !important;
        max-width: 250px !important;
    }
    
  
}


