/* ==========================================================================
   Composant : Navbar — Logo séparé + Pill centrée
   Scope : global (toutes les pages)
   ========================================================================== */

/* ==========================================================================
   Logo fixe — aligné sur le bord gauche du conteneur 1200px
   ========================================================================== */

.lm80-nav-logo {
    position: fixed;
    top: 1rem;
    left: max(1rem, calc((100vw - 1200px) / 2));
    z-index: 100;
    display: block;
    text-decoration: none;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 100px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}

.lm80-nav-logo:hover {
    transform: scale(1.03);
}

.lm80-nav-logo.scrolled {
    opacity: 0;
    transform: scale(0.7);
    pointer-events: none;
}

.lm80-nav-logo img {
    height: 120px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* ==========================================================================
   Logo inline dans la pill (visible au scroll)
   ========================================================================== */

.lm80-nav-pill-logo {
    display: flex;
    align-items: center;
    width: 0;
    opacity: 0;
    overflow: hidden;
    flex-shrink: 0;
    text-decoration: none;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.lm80-nav-pill-logo img {
    height: 34px;
    width: auto;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
}

.lm80-nav.scrolled .lm80-nav-pill-logo {
    width: 34px;
    opacity: 1;
    margin-right: 0.5rem;
}

/* ==========================================================================
   Pill centrée (liens + CTA)
   ========================================================================== */

.lm80-nav {
    position: fixed;
    top: 2.8rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.5rem 0.5rem 1.2rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.lm80-nav.scrolled {
    top: 1rem;
    padding-left: 0.5rem;
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

/* ---- Separateur ---- */
.lm80-nav-sep {
    width: 1px;
    height: 20px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 0.2rem;
    flex-shrink: 0;
}

/* ---- Desktop links ---- */
.lm80-nav-links {
    display: flex;
    align-items: center;
}

.lm80-nav-menu {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lm80-nav-menu > li {
    position: relative;
}

.lm80-nav-menu > li > a {
    font-family: var(--lm80-font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.6);
    text-decoration: none;
    padding: 0.45rem 0.9rem;
    border-radius: 100px;
    white-space: nowrap;
    transition: all 0.3s ease;
    display: inline-block;
}

.lm80-nav-menu > li > a:hover {
    color: var(--lm80-primary);
    background: rgba(162, 78, 174, 0.06);
}

.lm80-nav-menu > li.current-menu-item > a,
.lm80-nav-menu > li.current_page_item > a {
    color: var(--lm80-primary);
    background: rgba(162, 78, 174, 0.08);
}

/* ---- Dropdown sous-menu ---- */
.lm80-nav-menu > li > .sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    z-index: 110;
}

.lm80-nav-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lm80-nav-menu > li > .sub-menu > li > a {
    display: block;
    font-family: var(--lm80-font-body);
    font-size: 0.85rem;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.7);
    text-decoration: none;
    padding: 8px 20px;
    margin: 0 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.lm80-nav-menu > li > .sub-menu > li > a:hover {
    color: var(--lm80-primary);
    background: rgba(162, 78, 174, 0.05);
}

/* ---- CTA Button ---- */
.lm80-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1.4rem;
    border-radius: 100px;
    font-family: var(--lm80-font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--lm80-primary), var(--lm80-primary-dark));
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(162, 78, 174, 0.3);
    flex-shrink: 0;
    cursor: pointer;
    border: none;
}

.lm80-nav-cta:hover {
    background: linear-gradient(135deg, var(--lm80-primary-dark), #6d28d9);
    box-shadow: 0 6px 25px rgba(162, 78, 174, 0.45);
    transform: translateY(-1px);
    color: #fff;
}

/* ==========================================================================
   Mobile : bar compacte à droite (transparent par défaut, pill au scroll)
   ========================================================================== */

.lm80-nav-mobile-bar {
    display: none;
    position: fixed;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 101;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: 100px;
    background: transparent;
    border: 1px solid transparent;
    /* Pill apparaît avec un délai — le logo arrive d'abord */
    transition: background 0.4s 0.15s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.4s 0.15s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.lm80-nav-mobile-bar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Mobile : logo (gros + centré → rejoint la pill au scroll)
   ========================================================================== */

.lm80-nav-mobile-logo {
    display: block;
    background: #fff;
    border-radius: 100px;
    flex-shrink: 0;
    line-height: 0;
    text-decoration: none;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transform: translateX(var(--lm80-logo-offset, 0)) scale(1);
    /* Retour au centre : ease-out doux */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lm80-nav-mobile-bar.scrolled .lm80-nav-mobile-logo {
    /* Spring easing : léger rebond à l'arrivée dans la pill */
    transform: translateX(0) scale(1);
    box-shadow: none;
    transition: transform 0.55s cubic-bezier(0.34, 1.4, 0.64, 1),
                box-shadow 0.3s 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.lm80-nav-mobile-logo img {
    height: 80px;
    width: auto;
    object-fit: contain;
    border-radius: 100px;
    display: block;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.lm80-nav-mobile-bar.scrolled .lm80-nav-mobile-logo img {
    height: 46px;
}

/* ==========================================================================
   Mobile : burger (dans la bar)
   ========================================================================== */

.lm80-nav-burger {
    display: none;
    border: none;
    cursor: pointer;
    height: 46px;
    padding: 0 1.4rem;
    border-radius: 100px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--lm80-primary), var(--lm80-primary-dark));
    box-shadow: 0 4px 20px rgba(162, 78, 174, 0.4);
    transition: all 0.3s ease;
    font-family: var(--lm80-font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #fff;
}

.lm80-nav-burger:hover {
    box-shadow: 0 6px 25px rgba(162, 78, 174, 0.5);
}

/* ==========================================================================
   Mobile : overlay + bottom sheet
   ========================================================================== */

.lm80-nav-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 97;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.lm80-nav-mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.lm80-nav-mobile {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 98;
    background: #0f0f11;
    border-radius: 24px 24px 0 0;
    padding: 0 1.8rem 2.5rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.4);
    flex-direction: column;
    max-height: 85vh;
    overflow-y: auto;
}

.lm80-nav-mobile.open {
    transform: translateY(0);
    pointer-events: auto;
}

.lm80-nav-mobile-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
    margin: 1rem auto 1.5rem;
}

.lm80-nav-mobile-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-bottom: 1.2rem;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lm80-nav-mobile-brand-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}

.lm80-nav-mobile-brand span {
    font-family: var(--lm80-font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.04em;
    color: #fafafa;
}

.lm80-nav-mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lm80-nav-mobile-menu > li > a {
    display: block;
    font-family: var(--lm80-font-body);
    font-size: 1.05rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    padding: 1rem 1rem;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.lm80-nav-mobile-menu > li > a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.lm80-nav-mobile-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1rem;
}

.lm80-nav-mobile-menu .sub-menu > li > a {
    display: block;
    font-family: var(--lm80-font-body);
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.lm80-nav-mobile-menu .sub-menu > li > a:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.04);
}

/* ---- Mobile : boutons CTA ---- */
.lm80-nav-mobile-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lm80-nav-mobile-btn-primary,
.lm80-nav-mobile-btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 1rem;
    border-radius: 14px;
    font-family: var(--lm80-font-body);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.lm80-nav-mobile-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--lm80-primary), var(--lm80-primary-dark));
    box-shadow: 0 4px 20px rgba(162, 78, 174, 0.35);
}

.lm80-nav-mobile-btn-whatsapp {
    color: #fff;
    background: #25d366;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .lm80-nav-logo {
        display: none;
    }

    .lm80-nav {
        display: none;
    }

    .lm80-nav-mobile-bar {
        display: flex;
    }

    .lm80-nav-burger {
        display: inline-flex;
    }

    .lm80-nav-mobile-overlay {
        display: block;
    }

    .lm80-nav-mobile {
        display: flex;
    }
}
