/* --- NAVIGATION --- */
#main-menu {
    min-height: 60px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    min-height: 60px;
    box-sizing: border-box;
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-links {
    display: flex;
    align-items: center;
    gap: 0;
}

.menu-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    margin-left: 30px;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: color 0.3s;
}
/* Survol : or sombre comme dans la charte graphique (lisibilité) */
.menu-links a:hover { color: var(--accent-hover, #b8926a); }

/* Audit = lien simple (pas bouton) */
.nav-audit {
    background: none !important;
    padding: 0 !important;
}
.nav-audit:hover { color: var(--accent-hover, #b8926a); }

/* Dropdown Gestion optimisée */
.nav-dropdown {
    position: relative;
    margin-left: 30px;
}
.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
}
.nav-dropdown-trigger:hover { color: var(--accent-hover, #b8926a); }
.nav-dropdown-trigger .ph-caret-down {
    font-size: 0.75rem;
    transition: transform 0.25s;
}
.nav-dropdown.open .nav-dropdown-trigger .ph-caret-down { transform: rotate(180deg); }

.nav-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    min-width: 220px;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border-radius: 4px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
    z-index: 100;
}
.nav-dropdown.open .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dropdown-panel a {
    display: block;
    margin: 0;
    padding: 12px 20px;
    font-size: 0.85rem;
    border-radius: 0;
    border-left: 3px solid transparent;
}
.nav-dropdown-panel a:hover {
    background: var(--bg-light);
    border-left-color: var(--accent);
}

.btn-contact {
    background-color: var(--primary);
    color: white !important;
    padding: 12px 25px;
    border-radius: 2px;
    transition: background-color 0.3s, color 0.3s;
}
.menu-links .btn-contact:hover {
    background-color: var(--accent);
    color: #fff !important;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    padding: 10px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.hamburger:hover {
    background: rgba(0, 0, 0, 0.1);
}
.hamburger:focus {
    outline: 2px solid var(--primary, #0a2e38);
    outline-offset: 2px;
}

.hamburger span {
    width: 24px;
    height: 3px;
    background-color: var(--text-dark);
    transition: all 0.3s ease;
    display: block;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    padding-top: 70px;
    overflow-y: auto;
    box-sizing: border-box;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    display: block;
    padding: 20px 30px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
    -webkit-tap-highlight-color: transparent;
}
.mobile-menu a:hover {
    background: var(--bg-light);
    color: var(--accent-hover, #b8926a);
}

.mobile-menu .btn-contact {
    background-color: var(--primary);
    color: white !important;
    margin: 20px 30px;
    padding: 15px 25px;
    border-radius: 2px;
    text-align: center;
    border-bottom: none;
    transition: background-color 0.3s, color 0.3s;
}
.mobile-menu .btn-contact:hover {
    background-color: var(--accent);
    color: #fff !important;
}

.mobile-menu .mobile-menu-label {
    display: block;
    padding: 12px 30px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 700;
    border-bottom: 1px solid #eee;
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.menu-overlay.active {
    display: block;
}

/* Responsive — mobile */
@media (max-width: 768px) {
    nav {
        padding: 12px max(1rem, env(safe-area-inset-right)) 12px max(1rem, env(safe-area-inset-left));
        min-height: 56px;
        align-items: center;
    }
    .logo {
        font-size: 0.8rem;
        letter-spacing: 0.08em;
        gap: 6px;
        flex: 1;
        min-width: 0;
        line-height: 1.25;
    }
    .logo .ph-house-line {
        font-size: 1rem;
        flex-shrink: 0;
    }
    .menu-links { display: none; }
    .hamburger {
        display: flex;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        padding: 10px;
    }
    .mobile-menu {
        display: block;
        width: min(85%, 300px);
        padding-top: 64px;
        padding-left: max(1.25rem, env(safe-area-inset-left));
        padding-right: max(1.25rem, env(safe-area-inset-right));
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
    .mobile-menu a {
        padding: 14px 0;
        font-size: 0.95rem;
        letter-spacing: 0.03em;
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }
    .mobile-menu .mobile-menu-label {
        padding: 10px 0 6px;
        font-size: 0.75rem;
        letter-spacing: 0.08em;
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }
    .mobile-menu .btn-contact {
        margin: 20px 0 0;
        padding: 14px 20px;
        font-size: 0.9rem;
    }
}

/* Très petit écran : logo plus court visuellement */
@media (max-width: 380px) {
    nav .logo { font-size: 0.75rem; letter-spacing: 0.06em; }
}
