/* =========================================================
   Navigation commune — JournalCapture
   S'adapte automatiquement au thème de chaque page
   (clair "La ruche résiste" ou sombre "Suivi Frelons")
   grâce aux variables CSS définies dans chaque :root.
   ========================================================= */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 14px 20px;
    font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
}

/* Pilule flottante centrée : le fond ne couvre que le contenu */
.site-nav-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 10px 18px 6px;
    background: var(--card, #ffffff);
    border: 1px solid var(--border, #e8e2d4);
    border-radius: 20px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

/* La user-bar reste fixe en haut à droite (comportement d'origine) */
.site-nav {
    padding-right: 90px;
}

.site-nav-top {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    min-width: 0;
}

/* ---- Marque du site (lien vers l'accueil / hub) ---- */
.site-nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--yellow, #b8860b);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-nav-brand:hover {
    opacity: 0.85;
}

.site-nav-brand-emoji {
    font-size: 20px;
    display: inline-flex;
    align-items: center;
}

.site-nav-brand-emoji .universe-img {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    object-fit: cover;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ---- Onglets des deux univers ---- */
.site-nav-univers {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    background: var(--bg, #faf7f0);
    border: 1px solid var(--border, #e8e2d4);
    border-radius: 99px;
    padding: 3px;
    flex-shrink: 0;
}

.site-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted, #8a8578);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.site-nav-tab .universe-img {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    object-fit: cover;
    display: inline-block;
}

.site-nav-tab:hover {
    color: var(--yellow, #b8860b);
}

.site-nav-tab.active {
    background: var(--yellow, #b8860b);
    color: #ffffff;
    font-weight: 700;
}

.site-nav-tab.active:hover {
    color: #ffffff;
    opacity: 0.92;
}

/* ---- Liens de section selon l'univers actif ---- */
.site-nav-sections {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-nav-sections::-webkit-scrollbar {
    display: none;
}

.site-nav-sections a {
    color: var(--muted, #8a8578);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px 8px 0 0;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.site-nav-sections a:hover {
    color: var(--yellow, #b8860b);
    background: rgba(184, 134, 11, 0.06);
}

.site-nav-sections a.active {
    color: var(--yellow, #b8860b);
    border-bottom-color: var(--yellow, #b8860b);
}

/* ---- Responsive ---- */
@media (max-width: 720px) {
    .site-nav {
        padding: 8px 14px 0;
        padding-right: 14px;
    }
    .site-nav-brand {
        font-size: 14px;
    }
    .site-nav-tab {
        padding: 6px 10px;
        font-size: 12px;
    }
    .site-nav-univers {
        margin-left: 0;
    }
    .site-nav-top {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .site-nav-top {
        gap: 8px;
    }
    .site-nav-sections a {
        padding: 7px 10px;
        font-size: 12px;
    }
}