.navbar {
    background-color: #ffffff;
}

.navbar-brand img {
    height: 32px;
}

.e-alise-logo {
    color: var(--edf-orange);
    font-weight: bold;
    font-size: 1.6rem;
    margin-left: 10px;
}

.structure-value-edf {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0070CE;
}

.navbar-nav .nav-link {
    padding: 0.6rem 1.2rem;
    color: var(--edf-blue);
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.navbar-nav .nav-link:hover {
    background-color: #F0F8FF;
    color: #0056b3;
}

.navbar-nav .nav-link.active {
    background-color: #2270b2  !important;
    color: #ffffff !important;
    border-radius: 2rem;
}

.navbar .btn-link,
.dropdown-toggle:not(.btn-primary):not(.btn-secondary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info) {
    color: #2270b2;
    font-size: 1rem;
    font-weight: 500;
}

.dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.dropdown-header {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: normal;
}

.dropdown-item {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.badge.bg-warning {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.8rem;
}

/* Le dropdown parent doit avoir position relative */
.dropdown {
    position: relative;
}

/* Les boutons dropdown de la navbar ne forcent plus de largeur minimale */
.navbar-nav .dropdown-toggle {
    white-space: nowrap;
}

/* Le menu deroulant a sa propre largeur minimale */
.dropdown-menu {
    min-width: 12rem;
    width: max-content;
    max-width: 20rem;
}

/* Pour le menu utilisateur spécifiquement */
#userDropdown + .dropdown-menu {
    min-width: 100%;
    width: max-content;
    max-width: 20rem;
}

/* S'assurer que le contenu du menu ne déborde pas */
.dropdown-menu .dropdown-header,
.dropdown-menu .dropdown-item-text {
    white-space: normal;
    word-wrap: break-word;
}

.dropdown-menu .dropdown-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-nav .nav-link,
.navbar .dropdown-toggle,
.text-primary {
    color: #2270b2;
}

.fw-medium {
    color: #2270b2;
}

/* =====================================================
   FOCUS VISIBLE POUR L'ACCESSIBILITÉ RGAA
   ===================================================== */

.navbar-nav .nav-link:focus-visible,
.navbar-brand:focus-visible,
.dropdown-item:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25);
    border-radius: 0.375rem;
    background-color: #e7f0ff;
    color: #0d6efd;
    z-index: 2;
}

/* Focus pour les autres éléments interactifs */
.navbar .btn-link:focus-visible,
.dropdown-toggle:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25);
    border-radius: 0.375rem;
    background-color: #e7f0ff;
    color: #0d6efd;
    z-index: 2;
}

/* Support pour les navigateurs plus anciens */
@supports not (selector(:focus-visible)) {
    .navbar-nav .nav-link:focus,
    .navbar .btn-link:focus,
    .dropdown-toggle:focus {
        outline: 2px solid #0d6efd;
        outline-offset: 2px;
        box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25);
        border-radius: 0.375rem;
        background-color: #e7f0ff;
        color: #0d6efd;
        z-index: 2;
    }

    .navbar-nav .nav-link.active:focus {
        outline: 2px solid #ffffff;
        outline-offset: 2px;
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
        background-color: #2270b2;
        color: #ffffff;
    }
}

/* =====================================================
   DROPDOWN AU SURVOL (pour le menu Liens)
   ===================================================== */

.dropdown-hover .dropdown-menu {
    display: none;
    top: 100%;
    left: 0;
    margin-top: 0;
    padding-top: 0.5rem;
}

/* Zone invisible pour connecter le lien au menu */
.dropdown-hover .dropdown-menu::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.dropdown-hover:hover > .dropdown-menu {
    display: block;
}

/* Ajustement pour le dropdown dans la pill */
.dropdown-hover .dropdown-toggle::after {
    margin-left: 0.3em;
    font-size: 0.7em;
}

