/* --- Header Layout --- */
.site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: transform 0.3s ease;
    /* Smooth slide up/down */
}

.site-header.header-hidden {
    transform: translateY(-100%);
    /* Hide completely */
}

/* Top Bar (Dark strip) */
.header-top {
    background-color: #333;
    /* Dark grey */
    color: #ccc;
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px solid #444;
}

.header-top .container {
    display: flex;
    justify-content: flex-end;
    gap: 30px;
}

.header-top a {
    color: #ddd;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.2s;
    font-size: 0.8rem;
}

.header-top a:hover {
    color: white;
}

/* Main Header (Logo, Search, Actions) */
.header-main {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.header-main .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.logo-img {
    height: 120px;
    /* Default height */
    width: auto;
    max-height: none;
    transition: height 0.3s ease;
    /* Smooth shrink */
}

/* Scrolled State - Shadow only */
.site-header.scrolled {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 1400px) {
    .logo-img {
        height: 90px;
        /* Smaller default on laptops */
    }

    .header-main {
        padding: 10px 0;
    }
}

/* Search Bar */
.header-search {
    flex: 1;
    max-width: 600px;
    position: relative;
    margin: 0 var(--spacing-lg);
}

.search-form {
    display: flex;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-family: inherit;
}

.search-btn {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 700;
}

.search-btn:hover {
    background-color: var(--color-primary-dark);
}

/* User Actions (Account, Cart) */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.8rem;
    font-weight: 600;
}

.action-icon {
    font-size: 1.2rem;
    margin-bottom: 2px;
    color: var(--color-secondary);
}

.cart-count {
    background: var(--color-primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 10px;
    position: absolute;
    top: -5px;
    right: -5px;
}

/* Main Navigation (Bottom strip) */
.main-nav-bar {
    background: white;
    padding: 0;
    border-bottom: 1px solid #eee;
}

.main-nav-bar .container ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.main-nav-bar a {
    text-decoration: none;
    color: var(--color-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    display: block;
    padding: 15px 0;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.main-nav-bar a:hover,
.main-nav-bar a.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* ... previous code ... */

/* Generic Dropdown Menu Styles */
.nav-item-dropdown {
    position: relative;
    padding-right: 20px;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Rayons specific can just be an alias or extension if needed, but nav-item-dropdown covers it now */
/* .nav-rayons specific styles if needed in future */

.nav-item-dropdown>a {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Slight increase for better spacing */
    cursor: pointer;
    height: 100%;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-secondary);
}

.nav-item-dropdown>a span {
    font-size: 1.2rem;
    line-height: 1;
    color: var(--color-primary);
    /* Making icons Green to match branding */
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 250px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
    z-index: 1001;
    border-top: 3px solid var(--color-primary);
}

/* Show on hover OR when class 'open' is present */
.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown.open .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease;
}

.dropdown-menu a {
    padding: 12px 20px;
    border-bottom: 1px solid #f9f9f9;
    font-size: 0.9rem;
    color: var(--color-text);
    text-transform: none;
    display: block;
    width: 100%;
    font-weight: normal;
    /* Reset font weight for items */
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: var(--color-primary);
    border-bottom-color: #f9f9f9;
}

/* Footer (Existing) */
.site-footer {
    background-color: #333;
    /* Dark footer */
    color: #fff;
    padding: var(--spacing-xl) 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    /* Force 4 columns on large screens */
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xl);
    text-align: center;
}

@media (max-width: 900px) {
    .footer-grid {
        /* Revert to auto-fit or stack on mobile */
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        text-align: left;
        /* Optional: keep left on mobile if better for readability */
    }
}

.footer-col h4 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-col p {
    color: white;
    /* Ensure text is white */
    opacity: 0.8;
    /* Slight opacity for better hierarchy, or remove if user wants pure white */
}

.footer-col a {
    color: white;
    /* Changed from #ccc to white */
    text-decoration: none;
    transition: color 0.3s ease;
    opacity: 0.8;
}

.footer-col a:hover {
    color: white;
    opacity: 1;
}

.footer-col a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--color-primary);
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-3px);
}

.social-icons svg {
    width: 20px;
    height: 20px;
}

/* SPA Views */
.spa-view {
    display: none;
    animation: fadeIn 0.5s ease;
}

.spa-view.active-view {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Offset for Fixed Header */
#qui-sommes-nous,
#expertise,
#notre-histoire,
#equipe-femat,
#presse,
#le-groupe {
    scroll-margin-top: 180px;
    /* Header height (approx 130px) + buffer */
}