﻿.custom-navbar.main-nav {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 6px 18px -10px rgba(0,0,0,0.18);
    border-radius: 14px;
    padding-top: 2px;
    padding-bottom: 2px;
    min-height: 54px;
}

.custom-navbar .navbar-nav .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    font-size: 0.92rem;
    padding: 0.55rem 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    position: relative; /* for pseudo-element highlight */
    overflow: visible;
    transform: translateZ(0); /* promote to its own layer */
    will-change: transform, opacity;
    transition: transform 220ms cubic-bezier(.2,.9,.25,1), color 180ms ease;
}

    /* create an animatable highlight using ::before to avoid repainting background */
    .custom-navbar .navbar-nav .nav-link::before {
        content: "";
        position: absolute;
        inset: 6% 6%; /* small inset to create soft rounded highlight */
        left: 6%;
        right: 6%;
        top: 8%;
        bottom: 8%;
        background: rgba(188,112,164,0.10); /* pale pink */
        border-radius: 8px;
        opacity: 0;
        transform-origin: left center;
        transform: scaleX(0.92) translateZ(0);
        transition: opacity 220ms cubic-bezier(.2,.9,.25,1), transform 260ms cubic-bezier(.2,.9,.25,1);
        pointer-events: none;
        z-index: 0;
    }

    /* keep the text above the highlight */
    .custom-navbar .navbar-nav .nav-link > * {
        position: relative;
        z-index: 1;
    }

    /* smoother hover/focus effect */
    .custom-navbar .navbar-nav .nav-link:hover,
    .custom-navbar .navbar-nav .nav-link:focus {
        color: #222;
        transform: translateX(6px) translateZ(0); /* slightly more visible motion, still subtle */
    }

        .custom-navbar .navbar-nav .nav-link:hover::before,
        .custom-navbar .navbar-nav .nav-link:focus::before {
            opacity: 1;
            transform: scaleX(1) translateZ(0);
        }

    /* reduce motion for keyboard focus but keep clear outline */
    .custom-navbar .navbar-nav .nav-link:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(188,112,164,0.12);
    }

/* Dropdown item hover: same flavour but quicker */
.custom-navbar .dropdown-menu .dropdown-item {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.73rem;
    position: relative;
    transition: transform 180ms cubic-bezier(.2,.9,.25,1), background 180ms ease;
    will-change: transform, background-color;
}

    .custom-navbar .dropdown-menu .dropdown-item:hover {
        transform: translateX(4px);
        background: rgba(188,112,164,0.12);
        color: #222;
    }

/* admin drawer links reuse same behaviour */
.drawer-groups .group a {
    transition: transform 200ms cubic-bezier(.2,.9,.25,1), background 180ms ease;
    will-change: transform, background-color;
}

    .drawer-groups .group a:hover {
        transform: translateX(4px);
        background: rgba(188,112,164,0.10);
    }

/* subtle motion reduction on small screens */
@media (max-width: 720px) {
    .custom-navbar .navbar-nav .nav-link {
        transition-duration: 160ms;
    }

        .custom-navbar .navbar-nav .nav-link:hover {
            transform: translateX(3px);
        }
}
/* === Nav ajustements search & admin drawer === */

/* Conteneur flex pour éviter que le formulaire s'étire trop */
.nav-flex {
    display: flex;
    align-items: stretch;
}

.custom-navbar .main-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 1 auto;
    margin-right: 1rem;
}

.custom-navbar .nav-link-admin {
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0.55rem 0.85rem;
}

    .custom-navbar .nav-link-admin:focus-visible {
        outline: 2px solid var(--gin-primary);
        outline-offset: 2px;
    }

/* Recherche : ne déborde pas et peut rétrécir */
.custom-navbar .nav-search {
    flex: 0 1 clamp(240px, 32vw, 480px);
    display: flex;
    justify-content: flex-end;
}

    .custom-navbar .nav-search .search-wrapper {
        display: flex;
        align-items: stretch;
        width: 100%;
        gap: 6px;
    }

    .custom-navbar .nav-search .search-input {
        flex: 1 1 auto;
        min-width: 0;
        /* supprime éventuellement les largeurs imposées ailleurs */
        width: 100% !important;
    }

    .custom-navbar .nav-search .btn-search {
        white-space: nowrap;
    }

/* ADMIN DRAWER */
.admin-drawer-layer {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: .25s ease;
    z-index: 1600;
}

    .admin-drawer-layer.open {
        opacity: 1;
        pointer-events: auto;
    }

.admin-drawer {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(50vw, 640px);
    max-width: 640px;
    background: #ffffff;
    border-left: 1px solid rgba(0,0,0,0.08);
    box-shadow: -8px 0 28px -10px rgba(0,0,0,0.25);
    padding: 22px 28px 30px;
    display: flex;
    flex-direction: column;
    transform: translateX(40px);
    opacity: 0;
    transition: .28s cubic-bezier(.4,.2,.2,1);
}

.admin-drawer-layer.open .admin-drawer {
    transform: translateX(0);
    opacity: 1;
}

.drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

    .drawer-head h5 {
        font-weight: 700;
        font-size: 1rem;
        letter-spacing: .4px;
        background: linear-gradient(120deg,var(--gin-primary,#BC70A4),var(--gin-secondary,#BFD641));
        -webkit-background-clip: text;
        color: transparent;
        margin: 0;
    }

.close-drawer-btn {
    background: none;
    border: none;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
    color: #444;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background .15s;
}

    .close-drawer-btn:hover {
        background: rgba(0,0,0,0.06);
    }

.drawer-groups {
    overflow-y: auto;
    display: grid;
    gap: 18px 26px;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    padding-right: 6px;
}

    .drawer-groups .group h6 {
        font-size: .63rem;
        letter-spacing: .15em;
        text-transform: uppercase;
        font-weight: 700;
        margin: 0 0 8px;
        color: #777;
    }

    .drawer-groups .group a {
        display: block;
        text-decoration: none;
        font-size: .78rem;
        padding: 6px 8px;
        border-radius: 8px;
        font-weight: 500;
        color: #222;
        transition: background .15s, transform .15s;
    }

        .drawer-groups .group a:hover {
            background: rgba(188,112,164,0.12);
            transform: translateX(3px);
        }

/* Mobile : pleine largeur si écran étroit */
@media (max-width: 720px) {
    .admin-drawer {
        width: 100%;
        max-width: none;
    }

    .drawer-groups {
        grid-template-columns: repeat(auto-fill, minmax(140px,1fr));
    }
}

.nav-badge-new {
    position: absolute;
    top: -2px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #BC70A4, #BFD641);
    color: #111;
    font-size: 0.65rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 6px rgba(191, 214, 65, 0.6);
}
.nav-novelties {
    position: relative;
}

.novelty-dot {
    position: absolute;
    top: -2px; /* remonte le point */
    right: 3px; /* le décale à droite du mot */
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ff3b8d; /* ton joli rose */
    box-shadow: 0 0 0 2px white; /* petit halo propre */
}


