/**
 * BELWATECH - Navigation Styles
 * =============================
 * Fichier CSS réutilisable pour le menu de navigation.
 * 
 * UTILISATION:
 * Inclure ce fichier dans votre page: <link rel="stylesheet" href="nav.css">
 * 
 * DÉPENDANCES:
 * - Police Inter (Google Fonts)
 * - Variables CSS :root définies dans votre page principale
 */

/* ============================================
   VARIABLES (si non définies ailleurs)
   ============================================ */
:root {
    --primary: #000000;
    --secondary: #1d1d1f;
    --accent: #E95420;
    --accent-hover: #FF6030;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --background: #ffffff;
    --background-alt: #f5f5f7;
    --border: #d2d2d7;
    --nav-height: 48px;
}

/* ============================================
   GLOBAL - Désactiver le rebond au scroll (iOS)
   ============================================ */
html, body {
    overscroll-behavior: none;
    overscroll-behavior-y: none;
}

/* ============================================
   GLOBAL - Désactiver le tap highlight gris
   ============================================ */
* {
    -webkit-tap-highlight-color: transparent;
}

a, button, [role="button"], .clickable,
input, select, textarea, label {
    -webkit-touch-callout: none;
}

/* ============================================
   NAVIGATION PRINCIPALE
   ============================================ */
nav#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: none;
    z-index: 1000;
}

nav#navbar.scrolled {
    background: rgba(255, 255, 255, 0.72);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
}

/* ============================================
   LOGO
   ============================================ */
.logo {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
    cursor: pointer;
    min-width: 200px;
}

.logo img {
    height: 32px;
    width: auto;
}

/* ============================================
   LIENS NAVIGATION DESKTOP
   ============================================ */
.nav-left {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-grow: 1;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #1d1d1f;
    font-size: 13px;
    font-weight: 400;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

/* ============================================
   STORE STATUS
   ============================================ */
.store-status {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
    white-space: nowrap;
    min-width: 200px;
    text-align: right;
}

/* ============================================
   CONTACT BUTTONS - Style Apple
   ============================================ */
.nav-contact-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 12px;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.contact-btn svg {
    width: 18px;
    height: 18px;
    color: white;
}

.contact-btn-phone {
    background: var(--accent);
}

.contact-btn-whatsapp {
    background: #25D366;
}

.contact-btn-mail {
    background: var(--accent);
}

/* Hover effects */
.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.contact-btn-phone:hover {
    background: var(--accent-hover);
}

.contact-btn-whatsapp:hover {
    background: #20BD5A;
}

.contact-btn-mail:hover {
    background: var(--accent-hover);
}

/* Tooltip - Style glass clair Apple */
.contact-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    color: var(--text-primary);
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 1002;
}

.contact-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Mobile contact buttons */
.mobile-contact-buttons {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 32px;
    padding: 24px 0;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.mobile-contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.mobile-contact-item:active .contact-btn {
    transform: scale(0.95);
}

.mobile-contact-item .contact-btn {
    width: 50px;
    height: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.mobile-contact-item .contact-btn svg {
    width: 24px;
    height: 24px;
}

.mobile-contact-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.mobile-contact-buttons .contact-btn::after {
    display: none;
}

/* ============================================
   DROPDOWN MENU - Style Apple
   ============================================ */
.dropdown {
    position: relative;
}

.dropdown-trigger {
    cursor: pointer;
    position: relative;
}

/* Invisible bridge to prevent gap */
.dropdown-trigger::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -20px;
    right: -20px;
    height: 20px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    padding: 8px;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    transition: background 0.2s ease;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: var(--text-primary) !important;
    white-space: nowrap;
    text-decoration: none;
}

.dropdown-item:hover {
    background: var(--background-alt);
    color: var(--accent) !important;
}

.dropdown-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.dropdown-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ============================================
   HAMBURGER MENU
   ============================================ */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

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

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

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

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

/* ============================================
   MOBILE MENU OVERLAY
   ============================================ */
.mobile-menu-overlay {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
    height: 0;
    overflow: hidden;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
    height: auto;
}

.mobile-menu {
    background: var(--background-alt);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 24px 22px;
    border-bottom: 1px solid var(--border);
}

.mobile-menu .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-menu .nav-links li {
    border-bottom: 1px solid var(--border);
    list-style: none;
}

.mobile-menu .nav-links li:last-child {
    border-bottom: none;
}

.mobile-menu .nav-links a {
    display: block;
    padding: 16px 0;
    font-size: 17px;
    font-weight: 400;
}

/* ============================================
   MOBILE DROPDOWN
   ============================================ */
.mobile-dropdown {
    border-bottom: 1px solid var(--border);
}

.mobile-dropdown-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    font-size: 17px;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-primary);
}

.mobile-dropdown-arrow {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.mobile-dropdown-trigger.active .mobile-dropdown-arrow {
    transform: rotate(90deg);
}

.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--background);
    margin: 0 -22px;
    padding: 0 22px;
}

.mobile-dropdown-content.active {
    max-height: 300px;
}

.mobile-dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 14px 16px !important;
    font-size: 15px !important;
    color: var(--text-secondary) !important;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
}

.mobile-dropdown-item:last-child {
    border-bottom: none;
}

.mobile-dropdown-item .dropdown-icon {
    font-size: 18px;
}

.mobile-dropdown-item .dropdown-icon-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
    .nav-left {
        margin: 0 auto;
        gap: 28px;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .nav-links a {
        font-size: 12px;
    }
    
    .nav-contact-buttons {
        gap: 8px;
        margin-right: 10px;
    }
    
    .contact-btn {
        width: 32px;
        height: 32px;
    }
    
    .contact-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 950px) {
    .nav-container {
        position: relative;
    }
    
    .logo {
        min-width: auto;
        z-index: 2;
    }
    
    .nav-left {
        display: none;
    }
    
    .nav-contact-buttons {
        display: none;
    }
    
    .hamburger {
        display: flex;
        z-index: 2;
    }
    
    .store-status {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 11px;
        min-width: auto;
        text-align: center;
        margin: 0;
    }
    
    .dropdown-menu {
        display: none !important;
    }
}
