/* Navigation publique — espacement des onglets */
.ul-header-nav-wrapper .ul-header-nav {
    gap: clamp(18px, 1.45vw, 30px);
    flex-wrap: nowrap;
}
.ul-header-nav-wrapper .ul-header-nav > a,
.ul-header-nav-wrapper .ul-header-nav > .ul-nav-item-disabled {
    white-space: nowrap;
    font-size: clamp(1rem, 0.92rem + 0.28vw, 1.125rem);
    letter-spacing: -0.01em;
}

/* Desktop — trait du bas au survol (50 % de la largeur du lien) */
@media screen and (min-width: 992px) {
    .ul-header-nav-wrapper .ul-header-nav > a {
        position: relative;
        display: inline-flex;
        align-items: center;
        text-decoration: none;
    }
    .ul-header-nav-wrapper .ul-header-nav > a::after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: 0;
        width: 50%;
        height: 2px;
        border-radius: 2px;
        background: var(--ul-secondary, #86c71f);
        transform: translateX(-50%) scaleX(0);
        transform-origin: center;
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: none;
    }
    .ul-header-nav-wrapper .ul-header-nav > a:hover::after,
    .ul-header-nav-wrapper .ul-header-nav > a:focus-visible::after,
    .ul-header-nav-wrapper .ul-header-nav > a.is-nav-active::after {
        transform: translateX(-50%) scaleX(1);
    }
    .ul-header-nav-wrapper .ul-header-nav > a:hover,
    .ul-header-nav-wrapper .ul-header-nav > a:focus-visible,
    .ul-header-nav-wrapper .ul-header-nav > a.is-nav-active {
        color: var(--ul-secondary, #86c71f) !important;
    }
    .ul-header-bottom.sticky .ul-header-nav-wrapper .ul-header-nav > a.is-nav-active {
        color: var(--ul-secondary, #86c71f) !important;
    }
    .ul-header-bottom.sticky .ul-header-nav-wrapper .ul-header-nav > a::after {
        background: var(--ul-secondary, #86c71f);
    }
    .ul-header-bottom.sticky .ul-header-nav-wrapper .ul-header-nav > a:hover,
    .ul-header-bottom.sticky .ul-header-nav-wrapper .ul-header-nav > a.is-nav-active:hover {
        color: var(--ul-secondary, #86c71f) !important;
    }
}

/* Remplace les flaticon cassés du header par Bootstrap Icons */
.ul-header-nav .has-sub-menu > a::after {
    display: none !important;
}
.ul-submenu-chevron {
    font-size: 0.7em;
    margin-left: 0.35rem;
    opacity: 0.85;
    vertical-align: 0.1em;
    display: inline-block;
    transition: transform 0.25s ease;
}
.ul-header-nav .has-sub-menu:hover .ul-submenu-chevron,
.ul-header-nav .has-sub-menu.active .ul-submenu-chevron {
    transform: rotate(180deg);
}
.ul-header-actions .bi,
.ul-header-nav .bi {
    font-size: 1.15rem;
    line-height: 1;
    vertical-align: middle;
}
.ul-header-search-opener .bi {
    font-size: 1.25rem;
    color: inherit;
}
.ul-header-sidebar-opener .bi {
    font-size: 1.95rem;
    color: inherit;
    font-weight: 700;
    line-height: 1;
    -webkit-text-stroke: 0.7px currentColor;
    paint-order: stroke fill;
}
.dropdown-item .bi {
    font-size: 1rem;
    color: var(--ul-primary, #009734);
    flex-shrink: 0;
}
.ul-header-user-dropdown-btn .ul-header-user-name {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    transition: color 0.2s ease;
}
.ul-header-user-dropdown-btn .bi-chevron-down {
    font-size: 0.75rem;
    color: #fff;
    transition: color 0.2s ease;
}

/* Sticky (fond blanc) — nom + icônes en noir */
.ul-header-bottom.sticky .ul-header-user-dropdown-btn .ul-header-user-name,
.ul-header-bottom.sticky .ul-header-user-dropdown-btn .bi-chevron-down {
    color: var(--ul-black, #1a2420);
}
.ul-header-bottom.sticky .header-notif-btn,
.ul-header-bottom.sticky .header-notif-btn .bi-bell,
.ul-header-bottom.sticky .header-notif-bell {
    color: var(--ul-black, #1a2420);
}
.ul-header-bottom.sticky .header-notif-btn:hover {
    background: rgba(0, 151, 52, 0.08);
}

/* Onglet navigation désactivé (ex. Donations — bientôt) */
.ul-header-nav .ul-nav-item-disabled {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #9ca3af !important;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.72;
    font-weight: 600;
    user-select: none;
}
.ul-nav-item-disabled__badge {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: #e5e7eb;
    color: #6b7280;
    line-height: 1.15;
}

/* Footer — lien désactivé (ex. Donations) */
.ul-footer-link-disabled {
    display: block;
    color: #9ca3af;
    font-weight: 600;
    cursor: default;
    pointer-events: none;
}
.ul-footer-link-disabled small {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 0.25rem;
    opacity: 0.85;
}
.ul-footer-newsletter-lead {
    font-size: clamp(13px, 0.84vw, 15px);
    line-height: 1.55;
    margin-bottom: 0.85rem;
    color: rgba(255, 255, 255, 0.92);
}

.ul-footer-cms-txt {
    font-size: clamp(13px, 0.84vw, 15px);
    line-height: 1.55;
    margin-bottom: 0.85rem;
    color: rgba(255, 255, 255, 0.92);
}

/* Menu mobile (sidebar) — mêmes entrées que la nav desktop */
@media screen and (max-width: 991px) {
    .ul-sidebar .ul-header-nav {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        padding: 0.35rem 0.85rem;
        width: 100%;
        border: none;
    }

    .ul-sidebar .ul-header-nav > * {
        line-height: 1.25;
        padding: 0;
        border-bottom: none;
    }

    .ul-sidebar .ul-header-nav .ul-nav-item-disabled {
        display: flex;
        width: 100%;
        padding: 0.85rem 1rem;
        border-bottom: none;
        border-radius: 12px;
        color: #9ca3af !important;
        line-height: 1.2;
    }

    .ul-sidebar .ul-header-nav .lang-switcher {
        width: 100%;
        margin-top: 0.5rem;
        padding-top: 0.65rem;
        border-top: 1px solid rgba(20, 36, 28, 0.08);
    }

    .ul-sidebar .ul-header-nav .lang-switcher > a {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 0.85rem 1rem;
        border-radius: 12px;
        color: #14241c;
        font-weight: 600;
        background: rgba(0, 149, 62, 0.06);
    }

    .ul-sidebar .ul-header-nav > a {
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
        padding: 0.9rem 1rem;
        border-radius: 12px;
        border-bottom: none;
        font-size: 1.05rem;
        font-weight: 600;
        color: #14241c !important;
        line-height: 1.25;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .ul-sidebar .ul-header-nav > a::after {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%) scaleY(0);
        width: 3px;
        height: 55%;
        border-radius: 0 3px 3px 0;
        background: #00953e;
        transition: transform 0.22s ease;
    }

    .ul-sidebar .ul-header-nav > a:hover {
        color: var(--ul-secondary, #86c71f) !important;
        background: rgba(134, 199, 31, 0.1);
    }

    .ul-sidebar .ul-header-nav > a:hover::after,
    .ul-sidebar .ul-header-nav > a.is-nav-active::after {
        transform: translateY(-50%) scaleY(1);
        background: var(--ul-secondary, #86c71f);
    }

    .ul-sidebar .ul-header-nav > a.is-nav-active {
        color: var(--ul-secondary, #86c71f) !important;
        font-weight: 800;
        background: rgba(134, 199, 31, 0.12);
    }

    .ul-sidebar-cta-wrap {
        padding: 0;
        margin: 0 0 1rem;
    }

    .ul-sidebar.active .ul-sidebar-cta-wrap,
    .ul-sidebar .ul-sidebar-cta-wrap {
        display: block;
    }

    .ul-nav-mobile-cta {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        margin: 0 0 0.55rem;
        padding: 0.9rem 1.25rem;
        border-radius: 14px;
        font-weight: 800;
        font-size: 0.95rem;
        line-height: 1.2;
        text-align: center;
        color: #fff !important;
        background: linear-gradient(135deg, #007a2f 0%, #00b050 100%);
        box-shadow: 0 8px 22px rgba(0, 149, 62, 0.28);
        border: none;
    }

    .ul-nav-mobile-cta:hover {
        color: #fff !important;
        filter: brightness(1.05);
    }

    .ul-nav-mobile-cta--outline {
        margin-top: 0;
        margin-bottom: 0;
        background: #fff;
        color: #14241c !important;
        border: 1px solid rgba(20, 36, 28, 0.14);
        box-shadow: none;
    }

    .ul-nav-mobile-cta--outline:hover {
        color: #009734 !important;
        border-color: #00b050;
    }
}

/* Masquer le CTA dans la barre desktop */
@media screen and (min-width: 992px) {
    .ul-nav-mobile-cta {
        display: none !important;
    }
}

/* Bouton profil — avatar + layout */
.ul-header-user-dropdown-btn {
    background: none;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ul-header-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--ul-primary, #009734);
    flex-shrink: 0;
}
img.ul-header-user-avatar {
    display: block;
}
span.ul-header-user-avatar,
.ul-header-user-avatar.user-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Mobile phone — header : logo | notif + profil + hamburger (sans recherche) */
@media screen and (max-width: 991px) {
    .ul-header-bottom-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
    }

    .ul-header-bottom {
        padding-top: 8px !important;
        padding-bottom: 8px;
        overflow: visible;
    }

    .ul-header-bottom-wrapper.ul-header-container,
    .ul-header .ul-header-bottom-wrapper {
        align-items: center;
    }

    .ul-header .logo-container {
        flex: 0 1 auto;
        min-width: 0;
        height: auto;
        min-height: 52px;
        align-self: center;
        margin-top: 0;
        display: flex;
        align-items: center;
    }

    .ul-header .logo-container::after {
        --logo-halo-top: 0px;
        --logo-halo-bottom: 0px;
        --logo-halo-left: clamp(8px, 1.5vw, 12px);
        --logo-halo-right: clamp(8px, 1.5vw, 12px);
        top: 0;
        bottom: 0;
    }

    .ul-header .logo-container .logo {
        display: block;
        max-height: 3.35rem;
        width: auto;
        max-width: min(176px, 48vw);
        object-fit: contain;
        object-position: left center;
    }

    .ul-header-nav-wrapper {
        display: none;
    }

    .ul-header-actions {
        margin-left: auto;
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        align-self: center;
        gap: 10px;
        min-width: 0;
        padding-top: 0;
        height: 44px;
    }

    .ul-header-search-opener {
        display: none !important;
    }

    .ul-header-user-dropdown-btn.dropdown-toggle::after {
        display: none !important;
    }

    .ul-header-user-avatar {
        width: 36px;
        height: 36px;
    }

    .ul-header-sidebar-opener {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 1.95rem;
    }

    .ul-header-actions .header-notif-btn {
        width: 36px;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media screen and (max-width: 575px) {
    .ul-header-bottom-wrapper {
        gap: 8px;
        padding-inline: 2px;
    }

    .ul-header-bottom {
        padding-top: 6px !important;
        padding-bottom: 6px;
    }

    .ul-header-actions {
        gap: 8px;
        padding-top: 0;
        height: 42px;
    }

    .ul-header .logo-container {
        min-height: 48px;
        height: auto;
    }

    .ul-header .logo-container::after {
        --logo-halo-top: 0px;
        --logo-halo-bottom: 0px;
        --logo-halo-left: 6px;
        --logo-halo-right: 6px;
        top: 0;
        bottom: 0;
    }

    .ul-header .logo-container .logo {
        max-height: 3.1rem;
        max-width: min(164px, 46vw);
    }

    .ul-header-user-avatar {
        width: 34px;
        height: 34px;
    }

    .ul-header-sidebar-opener {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }
}

/* Logo Alliance — écran de chargement (styles principaux dans style.css) */
.preloader-logo {
    max-height: 64px;
    width: auto;
    max-width: min(220px, 72vw);
    object-fit: contain;
}
