/* ============================================================
   ASTRO LMS — BARRE DE NAVIGATION
   Shortcode [alms_nav]
   ============================================================ */

.alms-nav {
    background: white;
    border-bottom: 1px solid #d4e5dc;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 16px rgba(90,125,110,.07);
}
.alms-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* ── Logo ─────────────────────────────────────── */
.alms-nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}
.alms-nav-logo img {
    height: 36px;
    width: auto;
    display: block;
}
.alms-nav-logo-text {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.15rem;
    color: #5a7d6e;
    font-style: italic;
}

/* ── Liens centraux ──────────────────────────── */
.alms-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}
.alms-nav-link {
    padding: 8px 18px;
    border-radius: 50px;
    font-size: .875rem;
    font-weight: 500;
    color: #5a5a5a;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}
.alms-nav-link:hover {
    background: #edf5f0;
    color: #5a7d6e;
}
.alms-nav-link.active {
    background: #d4e5dc;
    color: #5a7d6e;
    font-weight: 600;
}

/* ── Droite (avatar + burger) ────────────────── */
.alms-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Bouton connexion (non connecté) */
.alms-nav-btn-login {
    padding: 8px 18px;
    border-radius: 50px;
    background: #7a9e8e;
    color: white;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}
.alms-nav-btn-login:hover {
    background: #5a7d6e;
    transform: translateY(-1px);
}

/* ── Avatar ──────────────────────────────────── */
.alms-nav-avatar-wrap { position: relative; }
.alms-nav-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4e5dc, #f5e8e8);
    border: 2px solid #d4e5dc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    color: #5a7d6e;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}
.alms-nav-avatar:hover,
.alms-nav-avatar-wrap.open .alms-nav-avatar {
    border-color: #7a9e8e;
    box-shadow: 0 0 0 3px rgba(122,158,142,.15);
}

/* ── Menu déroulant avatar ───────────────────── */
.alms-nav-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(90,125,110,.18);
    border: 1px solid #d4e5dc;
    min-width: 200px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: all .2s cubic-bezier(.4,0,.2,1);
    z-index: 1000;
}
.alms-nav-avatar-wrap.open .alms-nav-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.alms-nav-menu-head {
    padding: 14px 16px;
    border-bottom: 1px solid #ede6d8;
}
.alms-nav-menu-head strong {
    display: block;
    font-size: .875rem;
    color: #2e2e2e;
    margin-bottom: 2px;
}
.alms-nav-menu-head small {
    font-size: .75rem;
    color: #8a8a8a;
}
.alms-nav-menu-item {
    display: block;
    padding: 11px 16px;
    font-size: .875rem;
    color: #5a5a5a;
    text-decoration: none;
    transition: background .15s;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}
.alms-nav-menu-item:hover {
    background: #edf5f0;
    color: #5a7d6e;
}
.alms-nav-menu-sep {
    height: 1px;
    background: #ede6d8;
    margin: 4px 0;
}
.alms-nav-menu-logout:hover {
    background: #fdf0ee !important;
    color: #c0392b !important;
}

/* ── Burger mobile ───────────────────────────── */
.alms-nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background .2s;
}
.alms-nav-burger:hover { background: #edf5f0; }
.alms-nav-burger span {
    display: block;
    height: 2px;
    background: #5a7d6e;
    border-radius: 2px;
    transition: all .25s;
    transform-origin: center;
}
/* Animation burger → croix */
.alms-nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.alms-nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.alms-nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Menu mobile ─────────────────────────────── */
.alms-nav-mobile {
    display: none;
    flex-direction: column;
    background: white;
    border-top: 1px solid #d4e5dc;
    padding: 8px 0 12px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s cubic-bezier(.4,0,.2,1);
}
.alms-nav-mobile.open {
    max-height: 400px;
}
.alms-nav-mobile-link {
    display: block;
    padding: 12px 24px;
    font-size: .9rem;
    color: #5a5a5a;
    text-decoration: none;
    transition: background .15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}
.alms-nav-mobile-link:hover { background: #edf5f0; color: #5a7d6e; }
.alms-nav-mobile-sep { height: 1px; background: #ede6d8; margin: 6px 16px; }
.alms-nav-mobile-logout:hover { background: #fdf0ee !important; color: #c0392b !important; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 640px) {
    .alms-nav-links { display: none; }
    .alms-nav-burger { display: flex; }
    .alms-nav-mobile { display: flex; }
    .alms-nav-btn-login { display: none; } /* affiché dans le menu mobile */
    .alms-nav-inner { padding: 0 16px; }
}
