/* ========= MENU PRINCIPAL AD2T (optimisé) ========= */

/* 1. Cacher les flèches / liens dropdown séparés */
#mainMenu .dropdown-toggle,
#mainMenu .dropdown-toggle .caret {
    display: none !important;
}

/* 2. Style des VRAIS boutons de menu (on exclut .dropdown-toggle) */
#mainMenu .nav > li > a:not(.dropdown-toggle) {
    background-color: #569AB8;          /* bleu normal */
    color: #fff !important;
    padding: 0 32px;                    /* largeur des cases */
    height: 70px;                       /* même hauteur pour tous */
    display: flex;                      /* centrage vertical + horizontal */
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    white-space: normal;                /* 1 ou 2 lignes ok */
    border-radius: 0;
    margin: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* 3. Survol */
#mainMenu .nav > li > a:not(.dropdown-toggle):hover,
#mainMenu .nav > li > a:not(.dropdown-toggle):focus {
    background-color: #bfbfbf;          /* gris au survol */
    color: #000 !important;
}

/* 4. ONGLET ACTIF – forçage global (peu importe la classe utilisée) */
#mainMenu .nav li[class*="active"] > a:not(.dropdown-toggle),
#mainMenu .nav li[class*="current"] > a:not(.dropdown-toggle),
#mainMenu .nav li[class*="selected"] > a:not(.dropdown-toggle),
#mainMenu .nav a.active:not(.dropdown-toggle),
#mainMenu .nav a.current:not(.dropdown-toggle),
#mainMenu .nav a.selected:not(.dropdown-toggle),
#mainMenu .nav a[aria-current="page"]:not(.dropdown-toggle),
#mainMenu .nav a[aria-current="true"]:not(.dropdown-toggle),
#mainMenu .nav li > a:not(.dropdown-toggle).is-active,
#mainMenu .nav li > a:not(.dropdown-toggle).is-current {
    background-color: #0A3243 !important;   /* bleu foncé */
    color: #fff !important;
}

/* 5. Items avec sous-menu : le lien principal prend toute la largeur */
#mainMenu li.menu-type-separator > a.child-link {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
}

/* 6. Style des SOUS-MENUS */
#mainMenu .dropdown-menu {
    background-color: #ffffff;
    border-radius: 4px;
    margin-top: 5px;
}

#mainMenu .dropdown-menu li a {
    background: #ffffff;
    color: #000 !important;
    padding: 10px 16px;
}

#mainMenu .dropdown-menu li a:hover {
    background: #eeeeee;
}
