/**
 * ========================================
 * MAISONS CTL - THÈME CUSTOM
 * ========================================
 * 
 * Fichier : Header CSS
 * Description : Styles de l'en-tête du site avec navigation
 *               Header sticky + menu responsive + menu mobile overlay
 * 
 * Chemin : wp-content/themes/maisons-ctl-custom/assets/css/header.css
 * 
 * Version : 1.1.0
 * Date création : 01/10/2025 - 08:35
 * Dernière modification : 01/10/2025 - 10:15
 * 
 * Auteur : Claude Sonnet 4.5
 * 
 * Changelog :
 * - v1.1.0 (01/10/2025 - 10:15) : Optimisations visuelles
 *   • Logo réduit à 45px (au lieu de 60px)
 *   • Forçage du style sur .custom-logo (logo WordPress)
 *   • Gap menu réduit à 20px (au lieu de 30px)
 *   • Police menu réduite à 15px (au lieu de 16px)
 *   • Padding header réduit pour gagner de l'espace
 * - v1.0.0 (01/10/2025) : Création initiale
 * 
 * ========================================
 */

/* ============================================
   HEADER PRINCIPAL
   ============================================ */

.header-custom {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* ============================================
   LOGO
   ============================================ */

.header-logo a {
    display: block;
    line-height: 0;
}

.header-logo-img,
.header-logo .custom-logo,
.custom-logo-link img {
    height: 45px !important;
    width: auto !important;
    max-height: 45px !important;
    transition: transform 0.3s ease;
}

.header-logo a:hover .header-logo-img,
.header-logo a:hover .custom-logo {
    transform: scale(1.05);
}

/* ============================================
   NAVIGATION PRINCIPALE
   ============================================ */

.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-menu li {
    position: relative;
}

.header-menu a {
    color: #2C3E50;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 5px;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

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

.header-menu a:hover::after,
.header-menu .current-menu-item a::after {
    width: 100%;
}

.header-menu a:hover,
.header-menu .current-menu-item a {
    color: #E74C3C;
}

/* ============================================
   CONTACT HEADER (Téléphone + CTA)
   ============================================ */

.header-contact {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2C3E50;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.header-phone svg {
    color: #E74C3C;
    flex-shrink: 0;
}

.header-phone:hover {
    color: #E74C3C;
}

.header-cta {
    background-color: #E74C3C;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.3);
    white-space: nowrap;
}

.header-cta:hover {
    background-color: #C0392B;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
}

/* ============================================
   BOUTON MOBILE (HAMBURGER)
   ============================================ */

.header-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.hamburger-line {
    width: 28px;
    height: 3px;
    background-color: #2C3E50;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.header-mobile-toggle:hover .hamburger-line {
    background-color: #E74C3C;
}

/* ============================================
   MENU MOBILE OVERLAY
   ============================================ */

.header-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.header-mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: flex-end;
}

.mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #2C3E50;
}

.mobile-menu-nav {
    padding: 20px 0;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list li {
    border-bottom: 1px solid #ecf0f1;
}

.mobile-menu-list a {
    display: block;
    padding: 18px 25px;
    color: #2C3E50;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.mobile-menu-list a:hover,
.mobile-menu-list .current-menu-item a {
    background-color: #E74C3C;
    color: white;
    padding-left: 35px;
}

.mobile-menu-contact {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-menu-phone {
    display: block;
    text-align: center;
    padding: 15px;
    background-color: #ecf0f1;
    color: #2C3E50;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    font-size: 18px;
}

.mobile-menu-cta {
    display: block;
    text-align: center;
    padding: 15px;
    background-color: #E74C3C;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    font-size: 16px;
}

/* ============================================
   OVERLAY BACKDROP (quand menu mobile ouvert)
   ============================================ */

body.mobile-menu-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* ============================================
   RESPONSIVE - TABLETTE (768px - 1024px)
   ============================================ */

@media (max-width: 1024px) {
    .header-menu {
        gap: 15px;
    }

    .header-menu a {
        font-size: 14px;
    }

    .header-phone span {
        display: none;
    }
    
    .header-cta {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (< 768px)
   ============================================ */

@media (max-width: 768px) {
    .header-container {
        padding: 10px 15px;
    }

    .header-logo-img,
    .custom-logo {
        height: 40px !important;
        max-height: 40px !important;
    }

    .header-nav,
    .header-contact {
        display: none;
    }

    .header-mobile-toggle {
        display: flex;
    }
}