/* Kokoricoo — navigation espaces connectés (pro, simple) */
:root {
    --g-topnav-h: 56px;
    --g-nav-ink: #0a2540;
    --g-nav-accent: #0f766e;
    --g-nav-accent-soft: #ccfbf1;
    --g-nav-muted: #64748b;
    --g-nav-line: #e2e8f0;
    --g-nav-gold: #c9a227;
}

.g-topnav {
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--g-topnav-h);
    background: #fff;
    border-bottom: 1px solid var(--g-nav-line);
    box-shadow: 0 1px 0 rgba(10, 37, 64, .04);
    flex-shrink: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.g-topnav__inner {
    max-width: 1128px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: stretch;
    gap: .35rem;
    padding: 0 .75rem;
}
.g-topnav__burger {
    display: none;
    align-self: center;
    border: 0;
    background: transparent;
    color: var(--g-nav-muted);
    padding: .4rem;
    border-radius: 8px;
    cursor: pointer;
}
.g-topnav__burger:hover { background: #f1f5f9; color: var(--g-nav-ink); }
.g-topnav__brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: .35rem;
    text-decoration: none;
}
.g-topnav__logo {
    height: 40px;
    width: auto;
    max-width: 140px;
    display: block;
    object-fit: contain;
}
.g-topnav__logo-fb {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0a2540, #0f766e);
    color: #fff;
    font-weight: 800;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
}
.globalo-search-pill {
    position: relative;
    display: flex;
    align-items: center;
    align-self: center;
    width: 100%;
    max-width: 300px;
    min-width: 0;
    background: #f1f5f9;
    border: 1px solid transparent;
    border-radius: 999px;
    transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.globalo-search-pill:focus-within {
    background: #fff;
    border-color: rgba(15, 118, 110, 0.35);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.globalo-search-pill__ico,
.g-topnav__search-ico {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--g-nav-muted);
    pointer-events: none;
    flex-shrink: 0;
}
.globalo-search-pill input,
.g-topnav__search input {
    width: 100%;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    padding: 0 14px 0 36px;
    font: inherit;
    font-size: 0.875rem;
    color: var(--g-nav-ink);
    outline: none;
}
.globalo-search-pill input::placeholder,
.g-topnav__search input::placeholder {
    color: #94a3b8;
}
.g-topnav__search {
    margin-right: 0.5rem;
    width: 260px;
    max-width: 30vw;
}
.g-topnav__nav {
    display: flex;
    align-items: stretch;
    margin-left: auto;
    gap: 0;
}
.g-topnav__right {
    display: flex;
    align-items: stretch;
    margin-left: .25rem;
    padding-left: .65rem;
    border-left: 1px solid var(--g-nav-line);
    gap: .35rem;
}
.g-topnav__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: .2rem .45rem 0;
    color: var(--g-nav-muted);
    text-decoration: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    line-height: 1.1;
    transition: color .15s ease;
}
.g-topnav__item:hover { color: var(--g-nav-ink); }
.g-topnav__item.is-active { color: var(--g-nav-accent); font-weight: 600; }
.g-topnav__item.is-active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 3px;
    background: var(--g-nav-accent);
    border-radius: 3px 3px 0 0;
}
.g-topnav__ico {
    position: relative;
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
}
.g-topnav__avatar-sm {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}
.g-topnav__label {
    margin-top: 2px;
    font-size: .72rem;
    font-weight: 500;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.g-topnav__badge {
    position: absolute;
    top: -6px;
    right: -10px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}
.g-topnav__avatar,
.g-topnav__avatar-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}
.g-topnav__avatar {
    background: linear-gradient(135deg, #0a2540, #0f766e);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
}
.g-topnav__avatar img,
.g-topnav__avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}
.g-topnav__avatar-brand {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
    border-radius: 50%;
    background: #fff;
    box-sizing: border-box;
}
.g-topnav__premium {
    align-self: center;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 108px;
    max-width: 148px;
    margin-left: .35rem;
    padding: .38rem .7rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #c9a227 0%, #e8c547 100%);
    border: 1px solid rgba(180, 140, 20, .35);
    box-shadow: 0 2px 10px rgba(201, 162, 39, 0.35);
    color: #0a2540;
    text-decoration: none;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
}
.g-topnav__premium-kicker { display: none !important; }
.g-topnav__premium-label,
.g-topnav__premium-line {
    display: block;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #0a2540;
}
.g-topnav__premium-price {
    display: block;
    margin-top: .12rem;
    font-size: .68rem;
    font-weight: 700;
    color: #5c4810;
}
.g-topnav__premium:hover,
.g-topnav__premium.is-active {
    filter: brightness(1.04);
    text-decoration: none;
    color: #0a2540;
    box-shadow: 0 4px 14px rgba(201, 162, 39, 0.45);
}
.g-topnav__drop { position: relative; display: flex; }
.g-topnav__menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 268px;
    max-width: min(92vw, 320px);
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 14px;
    box-shadow:
        0 4px 6px rgba(15, 23, 42, 0.04),
        0 18px 40px rgba(10, 37, 64, 0.16);
    padding: 0;
    z-index: 280;
    overflow: hidden;
    animation: g-topnav-menu-in 0.16s ease-out;
}
@keyframes g-topnav-menu-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.g-topnav__menu[hidden] { display: none !important; animation: none; }
.g-topnav__menu--right { left: auto; right: 0; }
.g-topnav__menu-header {
    padding: 1rem 1.05rem 0.85rem;
    background: linear-gradient(165deg, #f0f9ff 0%, #fff 70%);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.g-topnav__menu-name {
    margin: 0;
    padding: 0;
    font-size: 0.9375rem;
    font-weight: 800;
    color: var(--g-nav-ink);
    border-bottom: none;
    line-height: 1.3;
}
.g-topnav__menu-hint {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #64748b;
    font-weight: 500;
}
.g-topnav__menu-body {
    padding: 0.35rem 0;
}
.g-topnav__menu-link {
    display: block;
    padding: 0.62rem 1.05rem;
    color: var(--g-nav-ink);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.12s ease, color 0.12s ease;
}
.g-topnav__menu-link:hover {
    background: rgba(29, 91, 184, 0.08);
    color: var(--g-nav-accent);
}
.g-topnav__menu-link--primary {
    color: var(--g-nav-accent);
    font-weight: 700;
}
.g-topnav__menu-link--muted {
    color: #64748b;
    font-weight: 600;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    margin-top: 0.25rem;
    padding-top: 0.75rem;
}
.g-topnav__menu-footer {
    padding: 0.65rem 1.05rem 0.85rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
}
.g-topnav__menu-footer-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 0.4rem;
}
.g-topnav__lang {
    display: flex;
    gap: 0.45rem;
}
.g-topnav__lang a {
    flex: 1;
    text-align: center;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}
.g-topnav__lang a:hover {
    border-color: var(--g-nav-accent);
    color: var(--g-nav-accent);
    background: #fff;
}
.g-topnav__lang a.is-on {
    background: var(--g-nav-accent);
    border-color: var(--g-nav-accent);
    color: #fff;
}
.g-topnav__item--btn[aria-expanded="true"] {
    color: var(--g-nav-accent);
}
.g-topnav__item--btn[aria-expanded="true"] .g-topnav__avatar {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--g-nav-accent);
}
/* Legacy liens menus sans classe link */
.g-topnav__menu a:not(.g-topnav__menu-link):not(.g-topnav__lang a) {
    display: block;
    padding: 0.62rem 1.05rem;
    color: var(--g-nav-ink);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
}
.g-topnav__menu a:not(.g-topnav__menu-link):not(.g-topnav__lang a):hover {
    background: rgba(29, 91, 184, 0.08);
    color: var(--g-nav-accent);
}

.layout-desktop.layout-desktop--linkedin .header-desktop { display: none !important; }
.layout-desktop.layout-desktop--linkedin { --g-topnav-h: 56px; }
.layout-desktop.layout-desktop--linkedin .main-desktop { padding-top: 0; }

.g-topnav--site .g-topnav__inner { max-width: 1280px; gap: .2rem; }
.g-topnav--site .g-topnav__item { min-width: 58px; padding: .15rem .28rem 0; flex-shrink: 0; }
.g-topnav--site .g-topnav__label { font-size: .68rem; }

@media (max-width: 991px) {
    .g-topnav__burger { display: inline-flex; }
    .g-topnav__premium { display: none; }
    .g-topnav__right { padding-left: .25rem; margin-left: 0; border-left: 0; }
    .g-topnav__drop--desktop { display: none; }
    .layout-desktop.layout-desktop--linkedin .g-topnav__burger { display: none; }
}

/* Mobile / tablette étroite : barre basse simple (plus de clone LinkedIn) */
@media (max-width: 768px) {
    :root { --g-topnav-h: 52px; --g-bottom-nav-h: 64px; }

    .layout-dashboard--topnav {
        padding-bottom: calc(var(--g-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    }
    .layout-dashboard--topnav .dashboard-main {
        padding-bottom: 1rem;
    }

    .g-topnav {
        position: sticky;
        top: 0;
        height: auto;
        min-height: var(--g-topnav-h);
        background: #fff;
        border-bottom: 1px solid #e0dfdc;
        box-shadow: none;
        padding-top: env(safe-area-inset-top, 0px);
    }
    .g-topnav__inner {
        height: var(--g-topnav-h);
        padding: 0 .85rem;
        gap: .65rem;
        max-width: none;
    }
    .g-topnav__burger {
        display: inline-flex;
        color: #404040;
    }
    .g-topnav__burger:hover { background: rgba(0,0,0,.05); color: #191919; }
    .g-topnav__logo { height: 34px; }
    .g-topnav__logo-fb { width: 32px; height: 32px; }

    .g-topnav__search {
        display: flex !important;
        flex: 1;
        max-width: none;
        width: auto;
        margin: 0;
    }
    .globalo-search-pill {
        max-width: none;
        background: #edf3f8;
        border-radius: 6px;
        border-color: transparent;
    }
    .globalo-search-pill:focus-within {
        background: #fff;
        border-color: var(--g-nav-accent);
        box-shadow: 0 0 0 1px var(--g-nav-accent);
    }
    .globalo-search-pill__ico { color: #404040; }
    .globalo-search-pill input { color: #191919; height: 34px; }
    .globalo-search-pill input::placeholder { color: #666; }

    .g-topnav__nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 220;
        margin: 0;
        height: calc(var(--g-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
        padding: 0 .35rem env(safe-area-inset-bottom, 0px);
        background: #fff;
        border-top: 1px solid #e0dfdc;
        box-shadow: none;
        justify-content: space-around;
        align-items: stretch;
    }
    .g-topnav__item {
        flex: 1;
        min-width: 0;
        max-width: 96px;
        padding: .3rem .15rem 0;
        color: #666;
    }
    .g-topnav__item.is-active {
        color: #191919;
        font-weight: 700;
    }
    .g-topnav__item.is-active::after {
        top: 0;
        bottom: auto;
        left: 22%;
        right: 22%;
        height: 2px;
        border-radius: 0 0 2px 2px;
        background: #191919;
    }
    .g-topnav__label {
        font-size: 11px;
        font-weight: 500;
    }
    .g-topnav__right { display: none; }
}

@media (max-width: 640px) {
    .g-topnav__label { font-size: .58rem; }
}
