/* ======================================
   VARIABLES GLOBALES
   ====================================== */
   :root {
    /* Couleurs principales - From provided header.css */
    --justice-primary: #cc6e25;
    --justice-primary-dark: #b35f20;
    --justice-secondary: #1a3e72;
    --justice-accent: #d4af37;

    /* Couleurs neutres - From provided header.css */
    --justice-white: #ffffff;
    --justice-light: #f8f9fa;
    --justice-gray: #ced4da;
    --justice-dark: #343a40;

    /* Anciennes couleurs du header-dropdown.css, renommées pour éviter conflits */
    --legacy-white: #100606;
    /* Anciennement --white */
    --legacy-black: #000000;
    /* Anciennement --black */
    --legacy-white-transparent: rgba(255, 255, 255, 0.9);
    /* Anciennement --white-transparent */
    --legacy-black-transparent: rgba(0, 0, 0, 0.8);
    /* Anciennement --black-transparent */
    --legacy-gray-transparent: rgba(255, 255, 255, 0.7);
    /* Anciennement --gray-transparent */

    /* Espacements - From provided header.css */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;

    /* Ombres - From provided header.css */
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.15);

    /* Transitions - From provided header.css */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Bordures - From provided header.css */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;

    /* Effets spécifiques au dropdown - From header-dropdown.css */
    --blur: blur(12px);
    --glass-light: rgba(255, 255, 255, 0.1);
    --glass-dark: rgba(0, 0, 0, 0.2);
    --border: 1px solid rgba(255, 255, 255, 0.18);
    --glow: 0 0 15px rgba(204, 110, 37, 0.5);
    /* Utilise --justice-primary pour la cohérence */
    --bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Dimensions uniformes pour les cards du dropdown - From header-dropdown.css */
    --card-width: 400px !important;
    --card-height: auto;
    --card-padding: 0.3rem;
    --card-margin: 0.3rem;
}

/* ======================================
   ANIMATIONS
   ====================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInSoft {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes borderGrow {
    to {
        width: 80%;
    }
}

@keyframes softPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 5px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.fade-in {
    animation: fadeIn var(--transition-normal);
}

/* ======================================
   LAYOUT & CONTENEURS
   ====================================== */
.m_scrollable {
    max-height: 90vh;
    overflow-y: auto;
    padding-right: 15px;
}

/* ======================================
   LOGO
   ====================================== */
.logo {
    width: 60px;
    height: 60px;
}

._logo-img {
    width: 100%;
    height: 100%;
}

/* ======================================
   TOPBAR
   ====================================== */
.topbar {
    background: linear-gradient(135deg, var(--justice-primary), var(--justice-primary-dark));
    color: var(--justice-white);
    padding: 12px 0;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.topbar::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: url(\'data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" fill="%23cc6e25" opacity=".25"/></svg>\');
    background-size: cover;
}

.topbar .container {
    position: relative;
    z-index: 2;
}

.topbar-brand {
    display: flex;
    align-items: center;
}

.topbar-logo {
    height: 40px;
    width: auto;
    margin-right: 10px;
    border-radius: 4px;
}

.site-name {
    font-weight: 700;
    color: var(--justice-white);
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.top-link,
.top-contact {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.top-link li,
.top-contact li {
    margin-right: 25px;
    position: relative;
    padding: 5px 0;
}

.top-link a {
    color: var(--justice-light);
    text-decoration: none;
    transition: all var(--transition-normal);
    font-weight: 500;
    display: flex;
    align-items: center;
}

.top-link a:hover {
    color: var(--justice-white);
    transform: translateY(-2px);
}

.top-link a::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--justice-white);
    transition: width var(--transition-normal);
}

.top-link a:hover::before {
    width: 100%;
}

.top-contact i {
    margin-right: 8px;
    color: var(--justice-white);
    font-size: 15px;
    width: 20px;
    text-align: center;
}

.top-contact a {
    color: var(--justice-light);
    text-decoration: none;
    transition: all var(--transition-normal);
}

.top-contact a:hover {
    color: var(--justice-white);
    text-decoration: underline;
}

.top-link li:not(:last-child)::after,
.top-contact li:not(:last-child)::after {
    content: "|";
    position: absolute;
    right: -15px;
    color: rgba(255, 255, 255, 0.3);
}

/* ======================================
   HEADER SEARCH
   ====================================== */
.header-search {
    margin-left: 15px;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    padding-right: 40px;
    border: 1px solid var(--justice-gray);
    border-radius: 30px;
    font-size: 14px;
    transition: all var(--transition-normal);
    background-color: var(--justice-light);
}

.search-input:focus {
    outline: none;
    border-color: var(--justice-secondary);
    box-shadow: 0 0 0 2px rgba(26, 62, 114, 0.2);
    background-color: var(--justice-white);
}

.search-button {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    transition: color var(--transition-normal);
}

.search-button:hover {
    color: var(--justice-secondary);
}

/* ======================================
   NAVIGATION & DROPDOWN
   ====================================== */
.nav.menu li a.active {
    color: var(--justice-primary);
    font-weight: bold;
    text-transform: capitalize;
    border-bottom: 2px solid var(--justice-primary);
}

/* Conteneur principal du dropdown */
.nav-item-simple {
    position: relative;
    display: inline-block;
}

/* Lien principal du dropdown */
.nav-link-simple {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--justice-dark);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-normal);
    background: transparent;
}

.nav-link-simple:hover {
    color: var(--justice-primary);
}

.nav-item-simple.active .nav-link-simple {
    color: var(--justice-primary);
    background-color: rgba(204, 110, 37, 0.1);
    /* Utilise --justice-primary */
}

/* Flèche du dropdown */
.arrow-simple {
    font-size: 0.75rem;
    transition: var(--transition-normal);
    opacity: 0.7;
}

.nav-item-simple:hover .arrow-simple {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--justice-primary);
}

/* Menu déroulant */
.dropdown-simple {
    position: absolute;
    z-index: 90000;
    background: var(--justice-white);
    border: 1px solid var(--justice-gray);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    min-width: 220px;
    max-width: 400px;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow-y: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast), max-height var(--transition-normal);
}

.nav-item-simple:hover .dropdown-simple,
.nav-item-simple:focus-within .dropdown-simple {
    opacity: 0.8;
    visibility: visible;
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-simple::-webkit-scrollbar {
    width: 4px;
}

.dropdown-simple::-webkit-scrollbar-track {
    background: var(--justice-light);
    border-radius: 10px;
}

.dropdown-simple::-webkit-scrollbar-thumb {
    background: var(--justice-gray);
    border-radius: 10px;
    transition: var(--transition-normal);
}

.dropdown-simple::-webkit-scrollbar-thumb:hover {
    background: var(--justice-dark);
}

.nav-item-simple:hover .dropdown-simple {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    max-height: 400px;
    overflow-y: auto;
}

.nav-item-simple:hover::after {
    content: \'\';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--justice-primary);
    transform: translateX(-50%);
    box-shadow: var(--glow);
    animation: borderGrow var(--transition-normal) forwards;
}

/* Sections du dropdown */
.section-simple {
    margin: var(--card-margin);
    padding: var(--card-padding);
    background: var(--legacy-gray-transparent);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: var(--border);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    position: relative;
    overflow: visible;
    width: var(--card-width);
    height: var(--card-height);
    min-height: 30px;
    max-height: auto !important;
}

.section-simple:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.section-simple::before {
    content: \'\';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius-sm);
    background: linear-gradient(90deg, transparent, var(--glass-light), transparent);
    transform: translateX(-100%);
    transition: var(--transition-normal);
}

.section-simple:hover::before {
    transform: translateX(100%);
    transition: 0.7s;
}

/* En-tête de section */
.section-header {
    padding: 0.2rem var(--space-md);
    border-bottom: 1px solid var(--justice-light);
    margin-bottom: 0.2rem;
}

.section-header::after {
    content: \'\';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 30%;
    height: 1px;
    background: var(--justice-accent);
    box-shadow: var(--glow);
    transition: var(--transition-normal);
}

.section-simple:hover .section-header::after {
    width: 100%;
}

.section-name {
    color: var(--justice-dark);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Liste des institutions */
.institutions-list {
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
}

.institutions-list::-webkit-scrollbar {
    width: 3px;
}

.institutions-list::-webkit-scrollbar-track {
    background: transparent;
}

.institutions-list::-webkit-scrollbar-thumb {
    background: var(--justice-gray);
    border-radius: 3px;
}

.institution-simple {
    margin: 0;
    padding: 0;
    position: relative;
    width: 100%;
}

.institution-link-simple {
    display: block;
    color: var(--justice-dark);
    background: none;
    font-size: 0.95rem;
    padding: 0.4rem var(--space-md);
    border-left: 3px solid transparent;
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    white-space: normal;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.institution-link-simple:hover,
.institution-link-simple:focus {
    background: var(--justice-light);
    color: var(--justice-primary-dark);
    border-left: 3px solid var(--justice-primary-dark);
    outline: none;
}

.institution-link-simple.active {
    color: var(--justice-primary-dark);
    border-left: 3px solid var(--justice-primary-dark);
    background: var(--justice-light);
    font-weight: 600;
}

.institution-link-simple.active::after {
    content: \'\';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 60%;
    background: var(--justice-accent);
    box-shadow: var(--glow);
    animation: softPulse 2s infinite;
}

.dropdown-simple .section-simple {
    opacity: 0;
    animation: fadeInSoft var(--transition-normal) ease forwards;
}

.nav-item-simple:hover .dropdown-simple .section-simple:nth-child(1) {
    animation-delay: 0.05s;
}

.nav-item-simple:hover .dropdown-simple .section-simple:nth-child(2) {
    animation-delay: 0.1s;
}

.nav-item-simple:hover .dropdown-simple .section-simple:nth-child(3) {
    animation-delay: 0.15s;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Centrer sans ajouter d’espace automatique */
    align-items: center;
    width: 50px;
    height: 55px;
    border: 1px solid var(--justice-primary);
    border-color: white;
    border-radius: 5px;
    cursor: pointer;
    z-index: 100001;
    /* margin-left: auto;
    margin-right: 10px; */
    padding: 20px;
    margin-right: 15px;
    gap: 4px;
    /* ESPACE VERTICAL CONTRÔLÉ ENTRE LES BARRES */
}

.burger {
    width: 40px;
    height: 4px;
    background: var(--justice-white) !important;
    border-radius: 2px;
    transition: all var(--transition-normal);
}

/* ======================================
   SIDEBAR
   ====================================== */
.sidebar {
    padding: var(--space-lg);
    background: var(--justice-white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-xl);
    border-left: 4px solid var(--justice-primary);
    position: sticky;
    min-height: 90vh;
}

.sidebar h4 {
    margin-bottom: var(--space-lg);
    font-size: 1.25rem;
    color: var(--justice-primary);
    font-weight: 600;
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--justice-accent);
    display: flex;
    align-items: center;
}

.sidebar h4 i {
    margin-right: var(--space-sm);
    color: var(--justice-accent);
}

.sidebar .list-group {
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.sidebar .list-group-item {
    border: none;
    padding: var(--space-md) var(--space-lg);
    background: transparent;
    transition: all var(--transition-normal);
    margin-bottom: var(--space-xs);
    position: relative;
}

.sidebar .list-group-item:not(.active):hover {
    background-color: rgba(205, 212, 223, 0.05);
    transform: translateX(5px);
}

.sidebar .list-group-item.active {
    background: linear-gradient(135deg, var(--justice-primary), var(--justice-primary-dark));
    color: var(--justice-white);
    box-shadow: var(--shadow-sm);
}

.sidebar .list-group-item.active:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--justice-accent);
}

.sidebar .list-group-item i {
    margin-right: 12px;
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

.sidebar .list-group-item a {
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.sidebar .list-group-item.active a {
    color: var(--justice-white);
}

.sidebar .submenu {
    margin-left: 20px;
    border-left: 2px solid rgba(212, 175, 55, 0.3);
}

.sidebar .submenu .list-group-item {
    padding: 8px 0;
    font-size: 0.9rem;
}

/* CACHER le menu-toggle par défaut */
.menu-toggle {
    display: none;
}

@media (min-width: 992px) {
.m_btn_assistance_mobile{
    display: none;
}

}

/* Responsive adjustments for mobile menu */
@media (max-width: 991px) {
    .menu-toggle {
        display: flex;
        width: 100%;
        margin-left: 10px !important;
        padding-left: 20px;
        color: white;
        /* border: none; */

        /* Show burger icon on mobile */
        order: 2;
        /* Ensure it\'s visible and correctly positioned */
    }

    .m_btn_assistance_tab{
            padding-bottom: 10px !important;
    }



.m_desktop{
    display: none;
}

    .topbar .container .row {
        justify-content: space-between;
        /* Distribute items */
        align-items: center;
    }

    .topbar-brand {
        order: 1;
    }

    .top-contact {
        display: none;
        /* Hide top contact on small screens */
    }

    .main-menu {
        display: none;
        /* Hidden by default */
        position: absolute;
        top: 100%;
        /* Position below the header */
        left: 0;
        width: 100%;
        background-color: var(--justice-white);
        /* Or any suitable background */
        box-shadow: var(--shadow-md);
        z-index: 9999;
        /* Ensure it\'s above other content */
        padding: 15px 0;
        border-top: 1px solid var(--justice-gray);
        overflow-y: auto;
        max-height: calc(100vh - 60px);
        /* Adjust based on topbar height */
    }

    .main-menu.open {
        display: block;
        /* Show menu when \'open\' class is present */
    }

    .main-menu .navigation {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-menu .nav.menu {
        flex-direction: column;
        width: 100%;
    }

    .main-menu .nav.menu li {
        width: 100%;
        text-align: left;
        margin: 0;
    }

    .main-menu .nav.menu li a {
        padding: 10px 20px;
        display: block;
        width: 100%;
        border-bottom: 1px solid var(--justice-light);
    }

    .main-menu .nav.menu li:last-child a {
        border-bottom: none;
    }

    /* Burger icon animation */
    /*.menu-toggle.open .burger:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }*/

    /*.menu-toggle.open .burger:nth-child(2) {
        opacity: 0;
    }*/

   /* .menu-toggle.open .burger:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }*/

    /* Adjust dropdown for mobile */
    .nav-item-simple .dropdown-simple {
        position: static;
        /* Allow dropdown to flow naturally */
        width: 100%;
        max-width: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: var(--justice-light);
        padding-left: 20px;
    }

    .nav-item-simple:hover .dropdown-simple,
    .nav-item-simple:focus-within .dropdown-simple {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
        /* Adjust as needed */
    }

    .section-simple {
        width: auto;
        /* Remove fixed width */
        margin: 5px 0;
    }

    .section-simple .section-header {
        padding: 0.2rem 0;
    }

    .institution-link-simple {
        padding: 0.4rem 0;
    }

    .header-search {
        margin-left: 0;
        padding: 10px 20px;
        border-top: 1px solid var(--justice-light);
    }
}

.top-buttons {
    display: flex;
    justify-content: flex-end;
    /* Aligne à droite */
    align-items: center;
    gap: 10px;
    width: 100%;
}

.btn-assistance,
.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--justice-white);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #fcfcfc;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.btn-assistance {
    background-color: var(--justice-primary);
}

.btn-contact {
    background-color: var(--justice-primary);
}

.m_top_menu{
    background-color: red !important;
    display: flex;
    justify-content: space-between !important;

    /* align-items: center; */
}

.btn-assistance:hover,
.btn-contact:hover {
    background-color: #c85320;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* Empiler verticalement sur mobile */
@media (max-width: 768px) {
    .top-buttons {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }

    .btn-assistance,
    .btn-contact {
        width: auto;
        max-width: 280px;
        justify-content: center;
        padding: 10px 20px;
    }

    .dropdown-simple{
        /* background-color: red !important; */
        margin-left: 150px !important;
    }

.menu-toggle{
    margin-left: 10px;
    padding: 10px;;

}

.site-name{
    font-size: 14px !important;
}

    .btn-assistance,
    .btn-contact {
        width: 100%;
        font-size: 12px !important;
}

.m_cherche{
    display: none;
}

.m_btn_assistance_mobile{
    font-size: 13px !important;
    font-weight: 500;
}





}

