/*
 * Menu responsive — surcharge main.css
 * Version: 5.0 — Final
 * Date: 27 février 2026
 */

/* Reset nav styles from main.css */
nav { display: flex; align-items: center; }
nav ul { display: flex; list-style: none; padding: 0; margin: 0; align-items: center; flex-wrap: nowrap; }
nav li { margin: 0 !important; margin-left: 0 !important; }

nav a {
    display: block;
    padding: 0.5rem 0.55rem;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 600;
    color: #2c3e50;
    transition: color 0.25s ease;
    position: relative;
}
nav a:hover { color: #e9b44c; }
nav a.active { color: #e9b44c; }
nav a::after {
    content: '';
    position: absolute;
    width: 0; height: 2px;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    background-color: #e9b44c;
    transition: width 0.25s ease;
    border-radius: 1px;
}
nav a:hover::after, nav a.active::after { width: 60%; }

/* Logo */
.logo { height: 65px; width: auto; }

/* Header */
header { padding: 0.5rem 1rem; }
.header-container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

/* Hamburger - hidden desktop */
.mobile-menu-button {
    display: none;
    background: none; border: none;
    cursor: pointer; font-size: 1.5rem;
    color: #4a7c59; padding: 0.3rem;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

/* Hide dropdown menus (legacy) */
.dropdown-menu, .has-dropdown > ul.dropdown-menu { display: none !important; }
.has-dropdown > a::after { display: none !important; }

/* Large desktop */
@media (min-width: 1201px) {
    nav a { font-size: 0.9rem; padding: 0.5rem 0.65rem; }
}

/* Tablet (901-1200) */
@media (max-width: 1200px) {
    nav a { font-size: 0.8rem; padding: 0.45rem 0.25rem; }
    .logo { height: 55px; }
}

/* Mobile (<=900) */
@media (max-width: 900px) {
    .header-container { position: relative; }
    .mobile-menu-button { display: block; }
    .logo { height: 55px; }
    nav > ul {
        display: none !important;
        position: absolute;
        top: 100%; right: 0; left: 0;
        background: white;
        flex-direction: column;
        padding: 0.5rem 0;
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
        border-radius: 0 0 10px 10px;
        z-index: 1100;
        gap: 0;
        max-height: 80vh;
        overflow-y: auto;
    }
    nav > ul.mobile-menu-active { display: flex !important; }
    nav li { border-bottom: 1px solid #f0f0f0; }
    nav li:last-child { border-bottom: none; }
    nav a { padding: 0.8rem 1.5rem; font-size: 0.95rem; white-space: normal; }
    nav a::after { display: none; }
    nav a.active { background-color: #f0f7ee; }
}

/* Small mobile */
@media (max-width: 480px) {
    .logo { height: 45px; }
    header { padding: 0.4rem 0.5rem; }
    nav a { padding: 0.7rem 1rem; font-size: 0.9rem; }
}