/*
 * Connect Security Go - Barre de navigation améliorée
 * Ce fichier contient les styles spécifiques à la barre de navigation
 */

/* ===== HEADER ET NAVIGATION ===== */
header {
    background-color: rgba(22, 31, 59, 0.95);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    max-width: 1400px;
    padding: 0 15px;
    margin: 0 auto;
}

.logo {
    min-height: 80px;
    display: flex;
    align-items: center;
}

.logo img {
    height: 80px;
    width: auto;
    max-height: none;
    display: block;
}

nav {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: center;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.menu-toggle i {
    color: white;
    font-size: 1.5rem;
}

.menu {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: center;
    overflow-x: auto;
    gap: 8px;
}

.menu li {
    margin: 0 8px;
    flex-shrink: 0;
}

.menu a {
    color: white;
    font-weight: 500;
    position: relative;
    padding: 5px 8px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #9D835F;
    transition: all 0.3s ease;
}

.menu a:hover, .menu a.active {
    color: #9D835F;
}

.menu a:hover::after, .menu a.active::after {
    width: 100%;
}

.devis-btn {
    margin-left: 15px;
}

.btn-devis {
    background-color: #9D835F;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    text-decoration: none;
}

.btn-devis:hover {
    background-color: #b39b76;
    transform: translateY(-3px);
}

/* Header scrolled */
header.scrolled {
    background-color: rgba(22, 31, 59, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

header.scrolled .logo img {
    height: 70px;
}

header.scrolled .container {
    height: 70px;
}

/* Dropdown menu */
.menu li.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #161F3B;
    min-width: 200px;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    padding: 10px 0;
    margin-top: 10px;
}

.menu li.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 20px;
    width: 10px;
    height: 10px;
    background-color: #161F3B;
    transform: rotate(45deg);
}

.dropdown li {
    margin: 0;
    width: 100%;
}

.dropdown a {
    display: block;
    padding: 10px 20px;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.dropdown a:hover {
    background-color: rgba(157, 131, 95, 0.1);
    color: #9D835F;
    padding-left: 25px;
}

.dropdown a::after {
    display: none;
}

/* Mega menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #161F3B;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    padding: 30px;
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.menu li.has-mega-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-column h3 {
    color: #9D835F;
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mega-menu-column ul {
    display: block;
}

.mega-menu-column li {
    margin: 0;
    width: 100%;
}

.mega-menu-column a {
    display: block;
    padding: 8px 0;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.mega-menu-column a:hover {
    color: #9D835F;
    padding-left: 5px;
}

.mega-menu-column a::after {
    display: none;
}

.mega-menu-image {
    grid-column: span 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mega-menu-image img {
    max-width: 100%;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Tablettes et écrans moyens */
@media (max-width: 1200px) and (min-width: 993px) {
    .menu li {
        margin: 0 6px;
    }
    
    .menu a {
        padding: 5px 6px;
        font-size: 0.85rem;
    }
    
    .btn-devis {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

/* Mobile menu */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
        margin-right: 15px;
    }
    
    .menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: #161F3B;
        flex-direction: column;
        justify-content: flex-start;
        padding: 0;
        margin: 0;
        transition: all 0.3s ease;
        overflow-y: auto;
        border-top: none;
    }
    
    .menu.active {
        left: 0;
    }
    
    .menu li {
        margin: 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .menu li:first-child {
        border-top: none;
    }
    
    .menu a {
        display: block;
        padding: 15px 20px;
        font-size: 1.1rem;
        color: white;
        text-decoration: none;
    }
    
    .dropdown, .mega-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.2);
        box-shadow: none;
        margin-top: 0;
        padding: 10px 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown::before {
        display: none;
    }
    
    .menu li.has-dropdown:hover .dropdown,
    .menu li.has-mega-menu:hover .mega-menu {
        max-height: 500px;
    }
    
    .mega-menu {
        display: block;
        padding: 10px 0;
    }
    
    .mega-menu-column {
        margin-bottom: 20px;
    }
    
    .mega-menu-image {
        display: none;
    }
    
    .menu a:hover {
        background-color: rgba(157, 131, 95, 0.2);
        color: #9D835F;
    }
    
    .devis-btn {
        margin: 20px;
        text-align: center;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 20px;
    }
    
    .btn-devis {
        display: inline-block;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    header .container {
        padding: 0 15px;
    }
    
    .logo img {
        height: 60px;
    }
    
    header .container {
        height: 70px;
    }
    
    .menu {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    .btn-devis {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}