/* ========================================
   MENU SUPPORT - BASE
======================================== */

.menu-support-container {
    position: relative;
    overflow: hidden;
}

.support-menu-list,
.support-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.support-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    position: relative;
}

.support-item.expanded > .support-submenu {
    max-height: none;
}

/* ========================================
   ITEMS
======================================== */

.support-item {
    position: relative;
    border-bottom: 1px solid #e0e0e0;
}

.support-item:last-child > .support-item-link {
    border-bottom: none;
}

.support-item-link {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.support-item:not(.has-children) .support-item-link {
    cursor: default;
}

/* Si l'item a un lien <a>, tout le conteneur est cliquable sauf le lien */
.support-item.has-children .support-item-link {
    cursor: pointer;
}

.support-item-text {
    flex: 1;
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.support-item-text:hover {
    text-decoration: none;
}

/* ========================================
   LIGNE D'INDENTATION (pseudo-élément ::before)
   UNIQUEMENT sur le niveau survolé directement
======================================== */

/* Créer le pseudo-élément pour la barre */
.menu-support-container.show-indent-line .support-item.has-children.expanded > .support-submenu::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #2196F3;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 1;
}

/* Afficher la barre au survol du submenu */
.menu-support-container.show-indent-line .support-item.has-children.expanded > .support-submenu:hover::before {
    opacity: 1;
}

/* Alternative sans :has() pour meilleure compatibilité */
/* Cacher les barres des parents en ajoutant une classe via JS si nécessaire */

/* ========================================
   TOGGLE ICON
======================================== */

.support-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    width: 20px;
}

.support-toggle-icon .icon-expanded {
    display: none;
}

.support-toggle-icon .icon-collapsed {
    display: inline-block;
}

.support-item.expanded > .support-item-link .support-toggle-icon .icon-collapsed {
    display: none;
}

.support-item.expanded > .support-item-link .support-toggle-icon .icon-expanded {
    display: inline-block;
}

/* Flèche invisible pour les items sans enfants (pour l'alignement) */
.support-item:not(.has-children) > .support-item-link .support-toggle-icon {
    opacity: 0;
    pointer-events: none;
}

/* ========================================
   ITEM ICON
======================================== */

.support-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ========================================
   INDENTATION VISUELLE
======================================== */

.support-item.level-1 > .support-item-link {
    background-color: transparent;
}

.support-item.level-2 > .support-item-link {
    background-color: rgba(0, 0, 0, 0.02);
}

.support-item.level-3 > .support-item-link {
    background-color: rgba(0, 0, 0, 0.04);
}

.support-item.level-4 > .support-item-link {
    background-color: rgba(0, 0, 0, 0.06);
}

.support-item.level-5 > .support-item-link {
    background-color: rgba(0, 0, 0, 0.08);
}

/* ========================================
   HOVER STATES
======================================== */

.support-item.level-1 > .support-item-link:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.support-item.level-2 > .support-item-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.support-item.level-3 > .support-item-link:hover {
    background-color: rgba(0, 0, 0, 0.07);
}

.support-item.level-4 > .support-item-link:hover {
    background-color: rgba(0, 0, 0, 0.09);
}

.support-item.level-5 > .support-item-link:hover {
    background-color: rgba(0, 0, 0, 0.11);
}

/* ========================================
   ACTIVE STATE
======================================== */

.support-item.active > .support-item-link {
    font-weight: 600;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 768px) {
    .menu-support-container {
        width: 100% !important;
    }
}

/* ========================================
   UTILITIES
======================================== */

.menu-support-container * {
    box-sizing: border-box;
}

/* Cacher la barre des parents quand un enfant est survolé (géré par JS) */
.menu-support-container.show-indent-line .support-submenu.child-hovered::before {
    opacity: 0 !important;
}