/* ========================================
   MENU.CSS - Styles du menu Gardez la Pêche
   À inclure sur toutes les pages du site
   ======================================== */

/* Navigation */
nav {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    z-index: 1001;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Hamburger Animation */
.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);
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 999;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ========================================
   DROPDOWN MENU STYLES
   ======================================== */

/* Container du dropdown */
.dropdown {
    position: relative;
}

/* Lien principal avec flèche */
.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.dropdown-arrow {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
}

/* Rotation de la flèche quand ouvert */
.dropdown.active .dropdown-arrow,
.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Menu déroulant - DESKTOP */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    min-width: 280px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1002;
    list-style: none;
}

/* Affichage au survol - DESKTOP */
@media (min-width: 769px) {
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
    }
}

/* Items du dropdown */
.dropdown-menu li {
    padding: 0;
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.7rem 1.2rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    padding-left: 1.5rem;
}

/* Scrollbar personnalisée pour le dropdown */
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* ========================================
   RESPONSIVE - TABLETTES (≤1024px)
   ======================================== */
@media (max-width: 1024px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 0.95rem;
    }
}

/* ========================================
   RESPONSIVE - MOBILE (≤768px)
   ======================================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--white);
        width: 80%;
        max-width: 320px;
        height: 100vh;
        text-align: left;
        padding: 100px 2rem 2rem;
        gap: 1rem;
        transition: right 0.35s ease;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        padding: 1.5rem 0;
        border-bottom: 1px solid var(--bg-light);
    }

    .nav-links a {
        font-size: 1.2rem;
        display: block;
        padding: 1rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .nav-container {
        padding: 1rem 1.5rem;
    }

    /* DROPDOWN - VERSION MOBILE */
    .dropdown {
        position: relative;
    }
    
    .dropdown-toggle {
        justify-content: space-between;
        width: 100%;
    }
    
    .dropdown-arrow {
        font-size: 0.7rem;
        margin-left: auto;
    }
    
    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        background: var(--bg-light);
        max-height: 0;
        overflow: hidden;
        padding: 0;
        opacity: 1;
        visibility: visible;
        transition: max-height 0.4s ease, padding 0.3s ease;
        margin: 0;
        width: 100%;
    }
    
    /* Ouverture au clic sur mobile */
    .dropdown.active .dropdown-menu {
        max-height: 500px;
        padding: 0.5rem 0;
        overflow-y: auto;
    }
    
    .dropdown-menu li {
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .dropdown-menu li:last-child {
        border-bottom: none;
    }
    
    .dropdown-menu a {
        padding: 0.8rem 1.5rem 0.8rem 2rem;
        font-size: 1rem;
    }
    
    .dropdown-menu a:hover {
        padding-left: 2.3rem;
    }
    
    /* Empêcher le hover sur mobile */
    .dropdown:hover .dropdown-menu {
        max-height: 0;
        padding: 0;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 500px;
        padding: 0.5rem 0;
    }
}

/* ========================================
   RESPONSIVE - PETITS SMARTPHONES (≤480px)
   ======================================== */
@media (max-width: 480px) {
    .logo {
        font-size: 1.1rem;
    }

    .nav-container {
        padding: 0.8rem 1rem;
    }

    .dropdown-menu a {
        font-size: 0.95rem;
        padding: 0.7rem 1.2rem 0.7rem 1.8rem;
    }
}

/* ========================================
   RESPONSIVE - TRÈS PETITS ÉCRANS (≤320px)
   ======================================== */
@media (max-width: 320px) {
    .logo {
        font-size: 1rem;
    }
}