/* -----------------------------------------------------
   LAYOUT GLOBAL
----------------------------------------------------- */
#intranet-wrapper {
    display: flex;
    width: 100%;
    margin-top: 80px;
    font-family: 'Segoe UI', Roboto, sans-serif;
    color: #222;
}


/* -----------------------------------------------------
   SIDEBAR
----------------------------------------------------- */
#intranet-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: #f7f7f7;
    padding: 20px 0;
    border-right: 1px solid #e4e4e4;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 1000;
}

/* Collapse */
#intranet-wrapper.collapsed #intranet-sidebar {
    transform: translateX(-240px);
}


/* -----------------------------------------------------
   NAVIGATION DE LA SIDEBAR
----------------------------------------------------- */
.sidebar-nav {
    margin-top: 80px;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover {
    background: #ececec;
}

.sidebar-nav a.current {
    font-weight: 600;
    background: #fff;
    border-left-color: #E5141C;
    color: #E5141C;
}


/* -----------------------------------------------------
   BOUTON DE RÉTRACTATION
----------------------------------------------------- */
#sidebar-toggle {
    position: fixed;
    left: 250px;
    bottom: 20px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.3s ease, left 0.3s ease;
    z-index: 1100;
}

#intranet-wrapper.collapsed #sidebar-toggle {
    left: 20px;
    transform: rotate(180deg);
}


/* -----------------------------------------------------
   CONTENU PRINCIPAL
----------------------------------------------------- */
#intranet-content {
    margin-left: 240px;
    padding: 30px;
    width: calc(100% - 240px);
    background: #fff;
    min-height: 100vh;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

#intranet-wrapper.collapsed #intranet-content {
    margin-left: 0;
    width: 100%;
}


/* -----------------------------------------------------
   HEADER DU CONTENU
----------------------------------------------------- */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e6e6e6;
}

.greeting {
    font-size: 20px;
    font-weight: 600;
}


/* -----------------------------------------------------
   MENU PROFIL (Dropdown)
----------------------------------------------------- */
.profile-menu {
    position: relative;
    user-select: none;
}

#profile-toggle {
    cursor: pointer;
    padding: 8px 12px;
    background: #f2f2f2;
    border-radius: 8px;
    transition: background 0.2s ease;
}

#profile-toggle:hover {
    background: #e8e8e8;
}

.arrow {
    border: solid #333;
    border-width: 0 1.5px 1.5px 0;
    padding: 3px;
    margin-left: 6px;
    display: inline-block;
    transform: rotate(45deg);
}


/* Dropdown */
#profile-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 160px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
    display: none;
    padding: 6px 0;
}

#profile-dropdown.open {
    display: block;
}

#profile-dropdown li {
    list-style: none;
}

#profile-dropdown li a {
    display: block;
    padding: 10px 14px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.2s ease;
}

#profile-dropdown li a:hover {
    background: #f5f5f5;
}


/* -----------------------------------------------------
   CONTENU INTERNE DES PAGES
----------------------------------------------------- */
.content-body {
    padding-top: 10px;
}

.content-body h1,
.content-body h2 {
    font-weight: 600;
    margin-top: 0;
}

.content-body p {
    line-height: 1.6;
}



/* -----------------------------------------------------
   MOBILE
----------------------------------------------------- */
@media (max-width: 900px) {
    #intranet-sidebar {
        transform: translateX(-240px);
    }

    #intranet-wrapper.collapsed #intranet-sidebar {
        transform: translateX(0);
    }

    #sidebar-toggle {
        left: 20px;
    }

    #intranet-content,
    #intranet-wrapper.collapsed #intranet-content {
        margin-left: 0;
        width: 100%;
    }
}
