@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

body {
    font-family: "Poppins", sans-serif;
    background-color: #f8f9fc;
    overflow-x: hidden;
}

:root {
    --color1: #b7410e;
    --color2: #6c3483;
    --linear-gradient: linear-gradient(135deg, #b7410e, #6c3483);
    --linear-gradient2: linear-gradient(135deg, #d66768, #efc655);
    --bg-color2: #f2f4f7;
    --primary-color: #4e73df;
    --secondary-color: #f8f9fc;
    --accent-color: #2e59d9;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 80px;
    --transition-speed: 0.3s;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    background: white;
    color: white;
    position: fixed;
    transition: all var(--transition-speed) ease;
    z-index: 1000;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    flex-shrink: 0;
    padding: 0rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.separator {
    border: 0.5px solid black;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .nav-link span,
.sidebar.collapsed .radio-name,
.sidebar.collapsed .logo-text {
    display: none;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
}

.sidebar.collapsed .logo-container {
    padding: 1rem 0rem;
}

.logo-container {
    padding: 1rem 0rem 0.5rem 0rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-speed) ease;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: all var(--transition-speed) ease;
}

.sidebar.collapsed .logo-img {
    width: 30px;
    height: 30px;
}

.radio-name {
    color: black;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    transition: all var(--transition-speed) ease;
}

.nav-link {
    color: black;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    margin: 0.25rem 0;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

/* Sous-menu masqué par défaut */
.submenu {
    display: none;
    transition: all 0.3s ease;
}

.has-submenu.open .submenu {
    display: block;
}

/* En mode réduit, masquer texte et chevron */
#sidebar.collapsed > .sidebar-menu .nav > .nav-link span,
#sidebar.collapsed > .sidebar-menu .nav > .nav-item > .submenu-toggle span,
#sidebar.collapsed > .sidebar-menu .nav > .nav-item > .submenu-toggle .bi-chevron-down {
    display: none;
}

#sidebar.collapsed .nav-link i {
    text-align: center;
    margin: 0 auto;
    display: block;
}

/* Important: positionner les parents pour dropdown */
#sidebar.collapsed .nav-item.has-submenu {
    position: relative;
}

/* Initialement cacher les sous-menus */
#sidebar.collapsed .nav-item.has-submenu > .submenu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%; /* Afficher à droite de l'icône */
    min-width: 200px;
    background: white;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
    border-radius: 0.5rem;
    z-index: 9999;
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Afficher au hover */
#sidebar.collapsed .nav-item.has-submenu:hover > .submenu {
    display: block;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    left: 70%!important;
}

/* Correction pour que le sous-menu ne soit pas coupé par le conteneur parent */
#sidebar.collapsed {
    overflow: visible !important;
}

#sidebar.collapsed .sidebar-menu {
    overflow: visible !important;
}

#sidebar.collapsed .nav {
    overflow: visible !important;
}

#sidebar.collapsed .nav-item.has-submenu {
    overflow: visible !important;
}



.nav-link:focus {
    color: black!important;
}

.accordion-button:focus {
    z-index: 3;
    border-color: transparent!important;
    outline: 0;
    box-shadow:none!important;
}

.sidebar-menu h2.accordion-header {
    margin: 0.25rem 0.5rem!important;
    color: black;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-menu .accordion-item {
    padding-top: 4px!important;
    padding-bottom: 4px!important;
}

.nav-link:hover {
    color: white !important;
    background: var(--linear-gradient);
    transform: translateX(5px);
}

.nav-link.active {
    color: white !important;
    background: var(--linear-gradient);
    font-weight: 600;
}

.nav-link i {
    font-size: 1.1rem;
    margin-right: 0.75rem;
    min-width: 20px;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0;
}

/* Main Content Styles */
.main-content {
    margin-left: var(--sidebar-width);
    transition: all var(--transition-speed) ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (min-width: 960px) {
    .sidebar.collapsed ~ .main-content {
        margin-left: var(--sidebar-collapsed-width);
    }
}


.topbar {
    background: var(--linear-gradient);
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.content-wrapper {
    flex: 1;
    background-color: var(--secondary-color);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Mobile Menu Styles */
.mobile-navbar {
    display: none;
    background: white;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

/* Notification Styles */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.65rem;
    padding: 0.25rem 0.4rem;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    transition: all 0.2s;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-unread {
    background-color: rgba(78, 115, 223, 0.05);
}

/* Footer Styles */
.footer {
    background: var(--linear-gradient);
    margin-top: auto;
    box-shadow: 0 -0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1100;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-navbar {
        display: flex;
    }

    .topbar {
        display: none;
    }
}

/* Card Styles */
.dashboard-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem 0 rgba(58, 59, 69, 0.2);
}

/* Gradient Background */
.gradient-bg {
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--accent-color) 100%
    );
}

/* Custom Toggle Button */
.sidebar-toggle {
    background: transparent;
    border: none;
    color: #6c757d;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.text-color1 {
    color: var(--color1);
}

.card-radio {
    background: rgba(219, 222, 250, 0.18);
}

.bg-color2 {
    background: var(--bg-color2);
}

.bg-linear-gradient {
    background: var(--linear-gradient);
}

.bg-linear-gradient2 {
    background: var(--linear-gradient2);
}

.text-gradient {
    background: var(--linear-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.gradient-btn {
    background: var(--linear-gradient);
    border-radius: 10px;
    color: white;
    padding: 10px 25px;
    text-decoration: none;
    border: none !important;
}

.gradient-btn:hover {
    background: transparent;
    color: var(--color1);
    text-decoration: none;
    border: 1px solid var(--color1) !important;
}

.gradient-outline {
    background: transparent;
    border: 1px solid var(--color1);
    border-radius: 10px;
    color: var(--color1);
    padding: 10px 25px;
    text-decoration: none;
}

.hero {
    position: relative;
    background-image: url("../images/bg-1.png");
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    color: white;
    z-index: 1;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.63);
    z-index: -1;
}

.hero-text h1 {
    font-weight: 700;
    font-size: 5rem;
}

.hero-text p {
    width: 500px;
    font-size: 1.2rem;
}

.img-pod-mus {
    object-fit: cover;
}

.progress-gradient {
    background: var(--linear-gradient2);
}

.comment-box {
    padding: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ccc;
}

.reply-box {
    border: 1px solid #b7410e !important;
    border-radius: 10px;
    padding: 15px;
}

.reply-textarea {
    border: none;
    outline: none;
    width: 100%;
    resize: none;
    min-height: 60px;
}

.formatting-buttons i {
    cursor: pointer;
    margin-right: 10px;
}

.select2-container--default .select2-selection--single {
    border: 1px solid !important;
    border-radius: 0.5rem !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    top: 15px !important;
}

.gradient-btn2 {
    background: var(--linear-gradient2);
    border-radius: 10px;
    color: white;
    padding: 10px 25px;
    text-decoration: none;
}

.main-content-card {
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: 5rem;
    text-align: center;
    color: #6c757d;
}

.main-content-card img {
    width: 150px;
}

.mobile-navbar.sticky {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background 0.3s, box-shadow 0.3s;
}

body.sticky-navbar-padding {
    padding-top: 56px;
}

.navbar-toggler:focus {
    box-shadow: none !important;
}

.mobile-menu {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 1050;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#sidebar-wrapper {
    position: sticky;
    top: 1rem;
    height: calc(100vh - 12rem);
    background: white;
    transition: all 0.3s ease;
    z-index: 998;
    display: flex;
    flex-direction: column;
}

/* Animation pour le collapse */
.sidebar-collapse {
    transition: all 0.3s ease;
}

/* Styles pour mobile */
@media (max-width: 991.98px) {
    #sidebar-wrapper {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 1035;
        margin: 0;
    }

    #sidebar-wrapper.show {
        left: 0;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .content-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1030;
        display: none;
    }
}

/* Styles pour les éléments de liste */
.list-group-item {
    border-left: 0;
    border-right: 0;
    padding: 1rem 1.5rem;
}

.list-group-item.active {
    background-color: #f8f9fa;
    color: #0d6efd;
    border-color: rgba(0, 0, 0, 0.125);
}

.list-group-item:hover:not(.active) {
    background-color: #f8f9fa;
}

.list-group-flush {
    flex-grow: 1;
    overflow-y: auto;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


.timeline-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    position: relative;
}

.timeline-step {
    text-align: center;
    width: 33%;
}

.timeline-step .circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin: 0 auto;
    transition: .3s;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
}

.timeline-step.active .circle {
    background: #0ea5e9;
    border-color: #0ea5e9;
    box-shadow: 0 0 10px rgba(14,165,233,0.6);
}

.timeline-step p {
    font-size: .85rem;
    margin-top: 6px;
    color: #333;
}
