/* ── Bottom navigation mobile ────────────────────────────────────────────── */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: stretch;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    height: 60px;
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: content-box;
    overflow: visible;
}

/* Chaque onglet */
.bn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px 4px;
    border: none;
    background: transparent;
    list-style: none;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.bn-item.active {
    color: #6c5ce7;
}

.bn-item:active {
    color: #6c5ce7;
}

.bn-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.bn-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

/* Onglet "Plus" — details/summary */
.bn-more-wrap {
    flex: 1;
    position: relative;
    overflow: visible;
}

.bn-more-wrap > summary {
    height: 100%;
    width: 100%;
}

.bn-more-wrap > summary::-webkit-details-marker { display: none; }

/* Panneau "Plus" qui s'ouvre vers le haut */
.bn-more-panel {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    width: 180px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.14);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bn-more-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
}

.bn-more-link:last-child {
    border-bottom: none;
}

.bn-more-link:active {
    background: #f8fafc;
}

/* Desktop nav : cachée sur mobile */
.desktop-nav { display: none; }

@media (max-width: 699px) {
    main { padding-bottom: 72px; }
}

/* Desktop : bottom nav cachée, barre de nav dans le header */
@media (min-width: 700px) {
    .bottom-nav { display: none; }

    .desktop-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.15rem;
        padding: 0.4rem 0 0.25rem;
        border-top: 1px solid #f0f0f0;
        margin-top: 0.4rem;
    }

    .dn-link {
        padding: 0.3rem 0.7rem;
        border-radius: 8px;
        font-size: 0.82rem;
        font-weight: 500;
        color: #555;
        text-decoration: none;
        transition: background 0.12s, color 0.12s;
        white-space: nowrap;
    }

    .dn-link:hover { background: #f4f4f8; color: #333; }

    .dn-link.active {
        background: #ede9fe;
        color: #6c5ce7;
        font-weight: 700;
    }
}
