/* --------- CORRIGE l'ouverture des sous-menus au bord droit --------- */
/* Marche avec Bootstrap 5 */

.dropdown-menu .dropdown-menu {
    left: 100%;        /* Par défaut, s'ouvre à droite */
    right: auto;
    top: 0;
}

.dropdown-menu.dropdown-menu-end .dropdown-menu {
    /* Par défaut, s'ouvre à droite du menu parent */
    left: auto;
    right: 100%;
    top: 0;
}

/* Si le menu est trop près du bord droit (moins de 250px),
   force l'ouverture à gauche */
@media (min-width: 576px) {
    .dropdown-menu .dropdown-menu {
        /* Par défaut : s'ouvre à droite */
        left: 100%;
        right: auto;
    }
    .dropdown-menu .dropdown-menu.dropdown-menu-reverse {
        /* Forcée à gauche si besoin */
        left: auto !important;
        right: 100% !important;
    }
}

.dropdown-menu .dropdown-menu._waiting-position {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Notifications */
#notif-container {
    pointer-events: none;
}
.notif-flash {
    pointer-events: auto;
    background: #242e39;
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 32px #0031;
    font-size: 1.04em;
    padding: 1.1em 1.8em 1.1em 1.3em;
    margin-bottom: 14px;
    min-width: 260px;
    max-width: 390px;
    opacity: 0;
    transform: translateY(-18px) scale(0.98);
    transition: opacity 0.22s, transform 0.3s;
    position: relative;
    overflow: hidden;
}
.notif-flash.notif-show {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.notif-flash.notif-success { background: linear-gradient(90deg, #12db65, #0b9856 70%); color: #fff; }
.notif-flash.notif-error   { background: linear-gradient(90deg, #e64e4e, #991414 70%); color: #fff; }
.notif-flash.notif-info    { background: linear-gradient(90deg, #3c7fff, #0e2e68 70%); color: #fff; }
.notif-flash .notif-close {
    position: absolute;
    right: 14px;
    top: 10px;
    color: #fff;
    background: none;
    border: none;
    font-size: 1.5em;
    line-height: 1;
    opacity: 0.72;
    cursor: pointer;
    transition: opacity 0.18s;
    z-index: 2;
}
.notif-flash .notif-close:hover { opacity: 1; }

.user-identity-ellipsis {
    color: #006cc5; /* blanc pour dark */
}

.modal .modal-body {
    padding: 1rem;
}
