/* =======================================================================
   Éco-Bac Navigation — Pastel Pills + Dropdown Submenus + Mobile Accordion
   ======================================================================= */

/* ── Pill base ─────────────────────────────────────────────────────────── */
.nav-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border-radius: 18px;
    border: 2px solid;
    font-weight: 800;
    font-size: 12px;
    line-height: 1;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    gap: 4px;
}

/* ── Pill colours ──────────────────────────────────────────────────────── */
.nav-pill-home { background:#ffffff; border-color:#6b7280; color:#4b5563; }
.nav-pill-home:hover { background:#f8fafc; border-color:#2563eb; color:#1d4ed8; }

.nav-pill-green  { background:#d4f8e8; border-color:#a8e6d6; color:#0d6d53; }
.nav-pill-green:hover  { background:#b8f2dd; border-color:#7dd5c8; color:#044d38; }

.nav-pill-blue   { background:#d9e8f7; border-color:#b3d4f5; color:#1e40af; }
.nav-pill-blue:hover   { background:#c1dff8; border-color:#93c5f0; color:#1e3a8a; }

.nav-pill-lavender { background:#f0e7f9; border-color:#e5d5f5; color:#6b21a8; }
.nav-pill-lavender:hover { background:#e8d8f8; border-color:#d9bef8; color:#5b1482; }

.nav-pill-peach  { background:#fce5d9; border-color:#f5cbb8; color:#c2410c; }
.nav-pill-peach:hover  { background:#fad8c9; border-color:#f0b8a0; color:#92260e; }

.nav-pill-yellow { background:#fef9d5; border-color:#fef3a8; color:#854d0e; }
.nav-pill-yellow:hover { background:#feefb3; border-color:#fde68a; color:#663c06; }

.nav-pill-rose   { background:#f5dce9; border-color:#f0c7e8; color:#9f1239; }
.nav-pill-rose:hover   { background:#f2cfe6; border-color:#ecb8e1; color:#831843; }

/* ── Chevron ───────────────────────────────────────────────────────────── */
.nav-chevron {
    font-size: 9px;
    transition: transform 0.2s ease;
    pointer-events: none;
}
.nav-item:hover .nav-chevron { transform: rotate(180deg); }

/* ── Dropdown wrapper ──────────────────────────────────────────────────── */
.nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* ── Dropdown panel ────────────────────────────────────────────────────── */
.nav-dropdown {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
    min-width: 215px;
    padding: 8px;
    z-index: 999;
    border: 1px solid rgba(0,0,0,0.06);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

/* invisible bridge so mouse can travel to dropdown without it closing */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ── Dropdown links ────────────────────────────────────────────────────── */
.nav-dropdown a {
    display: flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 10px;
    color: #374151;
    font-weight: 700;
    font-size: 12.5px;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
    white-space: nowrap;
}
.nav-dropdown a:hover { background: #f1f5f9; color: #2563eb; }

/* ── Mobile direct home link ──────────────────────────────────────────── */
.mob-home-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 12px;
    border: 2px solid #6b7280;
    background: #ffffff;
    color: #4b5563;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.mob-home-link:hover {
    border-color: #2563eb;
    color: #1d4ed8;
    background: #f8fafc;
}

/* ── Mobile Accordion ─────────────────────────────────────────────────── */
.mob-acc-item {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 4px;
}
.mob-acc-btn {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-weight: 800;
    font-size: 14px;
    color: #374151;
    background: #f8fafc;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.15s;
    font-family: Nunito, sans-serif;
}
.mob-acc-btn:hover { background: #f1f5f9; }
.mob-acc-icon { transition: transform 0.25s ease; font-size: 11px; }
.mob-acc-body {
    display: none;
    padding: 4px 8px 8px;
}
.mob-acc-body.open { display: block; }
.mob-acc-body a {
    display: flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 10px;
    color: #374151;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.mob-acc-body a:hover { background: #f1f5f9; color: #2563eb; }

/* ── Responsive: compact pills on medium screens ──────────────────────── */
@media (min-width: 768px) and (max-width: 1200px) {
    .nav-pill { padding: 0.4rem 0.6rem; font-size: 11px; }
}
