/* ============================================
   STYLES.CSS - AdLucem Homepage (Optimisé)
   ============================================ */

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable; /* réserve l'espace de la scrollbar pour éviter décalage */
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    overflow-x: hidden;
    max-width: 100vw;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    height: auto;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    gap: 2rem;
}

.nav-brand .logo {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #000;
    text-decoration: none;
}

.logo-img {
    height: 43px;
    width: auto;
    display: block;
}

.logo-icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
    color: #4a90e2;
    display: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
}

.nav-menu-left {
    flex: 1;
    justify-content: flex-start;
}

.nav-menu-right {
    margin-left: auto;
    justify-content: flex-end;
}

/* Contact visible uniquement dans le burger mobile */
.nav-item-mobile-only {
    display: none;
}

.nav-menu a {
    text-decoration: none;
    color: #666;
    font-weight: 400;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-menu a:hover {
    color: #4a90e2;
}

/* Menu déroulant */
.nav-item-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 0;
    padding: 2rem;
    min-width: 850px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    gap: 2rem;
}

.nav-item-dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-column {
    flex: 1;
    min-width: 140px;
}

.dropdown-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
    white-space: nowrap;
}

.dropdown-item {
    display: block;
    padding: 0.5rem 0;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.dropdown-item:hover {
    color: #4a90e2;
    padding-left: 0.5rem;
}

.configurateur-btn {
    background: #000;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-decoration: none;
}

.configurateur-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    cursor: pointer;
    z-index: 1100;
    position: relative;
}

.burger-menu span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
    position: absolute;
}

.burger-menu span:nth-child(1) {
    top: 10px;
}

.burger-menu span:nth-child(2) {
    top: 17px;
}

.burger-menu span:nth-child(3) {
    top: 24px;
}

.burger-menu.active span:nth-child(1) {
    top: 17px;
    transform: rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    top: 17px;
    transform: rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================
   HOMEPAGE STYLES
   ============================================ */
/* Les styles de la homepage (video-banner, home-blocks, 
   matieres-section) sont dans home-scroll.css pour 
   le scroll fullpage. Les styles ci-dessous sont des 
   fallbacks pour le mode non-fullpage. */

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background-color: #fff;
    color: #333;
    margin-top: auto;
}

.footer-pictos {
    background-color: #fff;
    padding: 25px 40px;
    border-bottom: 1px solid #000;
}

.footer-pictos-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

.picto-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.picto-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 12px;
}

.picto-item span {
    font-size: 12px;
    color: #333;
    line-height: 1.5;
}

.footer-main {
    padding: 50px 40px;
    border-bottom: 0.5px solid #ccc;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr 1fr 1.2fr;
    gap: 40px;
    align-items: start;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-nav-col .footer-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav-col .footer-nav-links li {
    margin-bottom: 12px;
}

.footer-nav-col .footer-nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-nav-col .footer-nav-links a:hover {
    text-decoration: underline;
}

.footer-nav-col .footer-nav-links a strong {
    font-weight: 600;
}

.footer-logo-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 10px;
}

.footer-brand-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.footer-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-address {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}

.footer-social-icons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.footer-social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-social-icons img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.footer-social-icons a:hover img {
    opacity: 0.7;
}

.footer-newsletter {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-newsletter span {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.footer-newsletter input {
    padding: 10px 15px;
    border: 1px solid #999;
    background-color: transparent;
    font-size: 13px;
    color: #333;
    border-radius: 0;
}

.footer-newsletter input::placeholder {
    color: #777;
}

.footer-newsletter input:focus {
    outline: none;
    border-color: #333;
}

.footer-bottom {
    background-color: #fff;
    padding: 15px 40px;
}

.footer-bottom-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-bottom a,
.footer-bottom span {
    color: #666;
    font-size: 12px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #000;
}

.footer-copyright {
    color: #666;
}

/* ============================================
   ANIMATIONS
   ============================================ */

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE - TABLETTES
   ============================================ */

@media (max-width: 1024px) {
    .nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-menu-left,
    .nav-menu-right {
        display: none !important;
    }
    
    .burger-menu {
        display: flex !important;
        order: 3;
    }

    /* Menu mobile plein écran */
    .nav-menu-left.active {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        padding: 80px 30px 40px;
        gap: 0;
        z-index: 1050;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Cacher nav-menu-right en mobile, tout est dans left */
    .nav-menu-right.active {
        display: none !important;
    }

    /* Liens principaux */
    .nav-menu-left.active > li {
        border-bottom: 1px solid #eee;
    }

    .nav-menu-left.active > li > a {
        display: block;
        font-size: 1rem;
        font-weight: 500;
        color: #333;
        padding: 16px 0;
        letter-spacing: 0.3px;
    }

    /* Sous-menus cachés par défaut */
    .nav-menu-left.active .dropdown-menu {
        display: none;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        min-width: auto;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding: 0 0 10px 15px;
        border-left: 2px solid #ddd;
        border-radius: 0;
        background: transparent;
        margin: 0;
    }

    /* Sous-menus ouverts */
    .nav-item-dropdown.mobile-open > .dropdown-menu {
        display: flex !important;
    }

    /* Flèche pour indiquer sous-menu */
    .nav-menu-left.active .nav-item-dropdown > a::after {
        content: '+';
        float: right;
        font-size: 1.2rem;
        font-weight: 300;
        color: #999;
        transition: transform 0.3s ease;
    }

    .nav-menu-left.active .nav-item-dropdown.mobile-open > a::after {
        content: '−';
    }

    .dropdown-column {
        min-width: auto;
        width: 100%;
    }

    .dropdown-title {
        font-size: 0.85rem;
        font-weight: 600;
        color: #333;
        margin: 10px 0 5px;
        padding-bottom: 5px;
        border-bottom: none;
    }

    .dropdown-item {
        font-size: 0.85rem;
        padding: 8px 0;
        display: block;
        color: #666;
        line-height: 1.3;
    }

    .dropdown-item:hover {
        color: #000;
        padding-left: 5px;
    }

    .nav-item-mobile-only {
        display: none;
    }

    .nav-menu-left.active .nav-item-mobile-only {
        display: block;
        border-bottom: 1px solid #eee;
    }

    .nav-menu-left.active .nav-item-mobile-only a {
        font-size: 1rem;
        font-weight: 500;
        color: #333;
    }
    
    .configurateur-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    /* Footer responsive */
    .footer-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .footer-logo-col {
        grid-column: 1 / -1;
        order: -1;
        margin-bottom: 20px;
    }
    
    .footer-pictos-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .picto-item {
        flex: 0 1 45%;
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 768px) {
    /* Note: Les styles homepage (video-banner, home-blocks, 
       matieres-section) sont dans home-scroll.css */
    
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .header {
        padding: 0.5rem;
    }
    
    .nav {
        padding: 0.5rem;
        position: relative;
    }
    
    .logo-text {
        font-size: 1rem;
    }

    .logo-img {
        height: 34px;
    }
    
    .burger-menu {
        display: flex !important;
        z-index: 1100;
    }

    /* Footer mobile */
    .footer-pictos {
        padding: 20px;
    }
    
    .footer-pictos-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .picto-item {
        flex: none;
        width: 100%;
        max-width: 280px;
    }
    
    .footer-main {
        padding: 40px 20px;
    }
    
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }
    
    .footer-logo-col {
        grid-column: 1 / -1;
    }
    
    .footer-social-col {
        grid-column: 1 / -1;
    }
    
    .footer-bottom {
        padding: 15px 20px;
    }
    
    .footer-bottom-container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* ============================================
   RESPONSIVE - PETITS MOBILES
   ============================================ */

@media (max-width: 480px) {
    .configurateur-btn {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        display: none;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-social-col {
        grid-column: span 1;
    }
}

/* ============================================
   ACCESSIBILITÉ
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
