/* =====================================================================
   A.S.C.R — Menu principal (commun à toutes les pages)
   ===================================================================== */
:root {
    --nav-h: 64px;
    --nav-bg: rgba(17, 17, 17, 0.9);
    --nav-bg-solid: rgba(17, 17, 17, 0.97);
    --nav-line: rgba(255, 255, 255, 0.08);
    --nav-text: rgba(255, 255, 255, 0.72);
    --nav-text-strong: #ffffff;
    --nav-hover: rgba(255, 255, 255, 0.08);
    --nav-accent: #e32222;
    --nav-accent-dark: #c01d1d;
    --nav-radius: 999px;
    --nav-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--nav-line);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background: var(--nav-bg-solid);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* ---------- Logo ---------- */
.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-logo img {
    height: 34px;
    filter: brightness(0) invert(1);
    transition: opacity 0.2s ease;
}

.navbar-logo:hover img { opacity: 0.85; }

.navbar-logo span {
    color: var(--nav-text-strong);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ---------- Zone droite ---------- */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------- Liens ---------- */
.navbar-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navbar-links li a {
    position: relative;
    display: block;
    padding: 8px 16px;
    border-radius: var(--nav-radius);
    color: var(--nav-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    line-height: 1.4;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}

.navbar-links li a:hover {
    color: var(--nav-text-strong);
    background: var(--nav-hover);
}

/* Indicateur de section active : petit point rouge sous le lien */
.navbar-links li a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 1px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--nav-accent);
    transform: translateX(-50%) scale(0);
    transition: transform 0.25s var(--nav-ease);
}

.navbar-links li a.active { color: var(--nav-text-strong); }
.navbar-links li a.active::after { transform: translateX(-50%) scale(1); }

/* Bouton d'appel à l'action (vente) */
.navbar-links li a.nav-vente {
    margin-left: 8px;
    padding: 9px 20px;
    background: var(--nav-accent);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(227, 34, 34, 0.35);
    transition: background 0.2s ease, transform 0.2s var(--nav-ease), box-shadow 0.2s ease;
}

.navbar-links li a.nav-vente::after { display: none; }

.navbar-links li a.nav-vente:hover {
    background: var(--nav-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(227, 34, 34, 0.45);
}

/* ---------- Focus clavier ---------- */
.navbar a:focus-visible,
.navbar button:focus-visible,
.mobile-menu a:focus-visible {
    outline: 2px solid var(--nav-accent);
    outline-offset: 2px;
}

/* ---------- Sélecteur de langue ---------- */
.lang-switch { position: relative; }

.lang-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--nav-radius);
    background: rgba(255, 255, 255, 0.04);
    color: var(--nav-text);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.lang-switch-btn:hover,
.lang-switch.open .lang-switch-btn {
    color: var(--nav-text-strong);
    background: var(--nav-hover);
    border-color: rgba(255, 255, 255, 0.28);
}

.lang-switch-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.lang-switch-btn .lang-switch-chevron { width: 10px; height: 10px; transition: transform 0.25s var(--nav-ease); }
.lang-switch.open .lang-switch-chevron { transform: rotate(180deg); }

.lang-switch-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 170px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: rgba(24, 24, 24, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.18s ease, transform 0.25s var(--nav-ease), visibility 0.18s;
    z-index: 10001;
}

.lang-switch.open .lang-switch-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-switch-menu button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 9px;
    background: none;
    color: var(--nav-text);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-switch-menu button:hover { background: var(--nav-hover); color: var(--nav-text-strong); }

.lang-switch-menu button .lang-code {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
}

.lang-switch-menu button.active { color: var(--nav-text-strong); font-weight: 600; }
.lang-switch-menu button.active .lang-code { color: var(--nav-accent); }

/* ---------- Hamburger ---------- */
.hamburger {
    display: none;
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.hamburger:hover { background: var(--nav-hover); border-color: rgba(255, 255, 255, 0.28); }

.hamburger span {
    position: absolute;
    left: 50%;
    width: 16px;
    height: 2px;
    margin-left: -8px;
    border-radius: 2px;
    background: #ffffff;
    transition: transform 0.3s var(--nav-ease), opacity 0.2s ease;
}

.hamburger span:nth-child(1) { top: 13px; }
.hamburger span:nth-child(2) { top: 19px; }
.hamburger span:nth-child(3) { top: 25px; }

.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Menu mobile ---------- */
.mobile-menu {
    display: block;
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    background: var(--nav-bg-solid);
    border-top: 1px solid transparent;
    opacity: 0;
    transition: max-height 0.35s var(--nav-ease), opacity 0.25s ease, padding 0.35s var(--nav-ease), border-color 0.35s ease;
}

.mobile-menu.open {
    max-height: 420px;
    padding: 10px 16px 18px;
    border-top-color: var(--nav-line);
    opacity: 1;
}

.mobile-menu a {
    display: block;
    padding: 13px 14px;
    border-radius: 10px;
    color: var(--nav-text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.mobile-menu a:hover { background: var(--nav-hover); color: var(--nav-text-strong); }

.mobile-menu a.nav-vente {
    margin-top: 10px;
    background: var(--nav-accent);
    color: #ffffff;
    font-weight: 600;
    text-align: center;
    border-radius: var(--nav-radius);
}

.mobile-menu a.nav-vente:hover { background: var(--nav-accent-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .navbar-links { display: none; }
    .hamburger { display: block; }
}

@media (min-width: 901px) {
    .mobile-menu { display: none; }
}

@media (max-width: 768px) {
    .navbar-inner { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .navbar, .navbar *, .mobile-menu { transition: none !important; }
}
