@media (max-width: 767.98px) {
    .pe-action-bar {
        display: none;
        position: fixed;
        left: 0;
        right: 0;
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
        z-index: 921;
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
        background: #0047FF;
        box-shadow: 0 -4px 20px rgba(0, 71, 255, 0.25);
    }

    body.pe-page-home .pe-action-bar {
        display: grid;
    }

    body.pe-page-home.pe-has-bottom-nav {
        padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px));
    }

    body.pe-has-bottom-nav:not(.pe-page-home) {
        padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }

    .pe-action-bar__btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-height: 52px;
        padding: 8px 6px;
        color: #fff;
        text-decoration: none;
        font-size: 11px;
        font-weight: 800;
        border-right: 1px solid rgba(255, 255, 255, 0.18);
        -webkit-tap-highlight-color: transparent;
    }

    .pe-action-bar__btn:last-child {
        border-right: none;
    }

    .pe-action-bar__btn i {
        font-size: 20px;
        line-height: 1;
        color: #fff;
    }

    .pe-action-bar__btn:active {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Barre de navigation mobile — fixe en bas */
.pe-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 920;
    background: #fff;
    border-top: 1px solid rgba(20, 45, 111, 0.08);
    box-shadow: 0 -4px 20px rgba(20, 45, 111, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.pe-bottom-nav__inner {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    max-width: 520px;
    margin: 0 auto;
    padding: 8px 4px 10px;
}

.pe-bottom-nav__link {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 2px 4px;
    min-height: 52px;
    text-decoration: none;
    color: #8a96ad;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s ease;
}

.pe-bottom-nav__label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.pe-bottom-nav__icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.pe-bottom-nav__link.is-active {
    color: #142D6F;
}

.pe-bottom-nav__link.is-active .pe-bottom-nav__icon {
    color: #142D6F;
    background: rgba(163, 189, 255, 0.38);
}

.pe-bottom-nav__link:active {
    color: #142D6F;
}

.pe-bottom-nav__link:active .pe-bottom-nav__icon {
    transform: scale(0.94);
}

@media (max-width: 380px) {
    .pe-bottom-nav__label {
        font-size: 9px;
    }

    .pe-bottom-nav__icon {
        font-size: 18px;
    }
}

@media (min-width: 768px) {
    .pe-bottom-nav,
    .pe-action-bar {
        display: none !important;
    }
}
