/**
 * Header Block - Frontend Styles
 * Styles complémentaires pour le bloc header Helebor en frontend
 * Reproduit exactement le comportement de header_style.css pour ACF
 * 
 * @package WPDashboard
 */

/* ========================
   GLOBAL: MASQUER TOUS LES LOGOS PAR DÉFAUT + Z-INDEX
======================== */
.wp-dashboard-header-block .logo-white,
.wp-dashboard-header-block .logo-color,
.wp-dashboard-header-block .logo-black {
    display: none !important;
    z-index: 99 !important;
    position: relative !important;
}

/* LOGO CONTAINER : assure la pile correcte */
.wp-dashboard-header-block .logo-container {
    z-index: 99 !important;
    position: relative !important;
}

/* BOUTONS : toujours au-dessus, jamais masqués */
.wp-dashboard-header-block .btn-filled,
.wp-dashboard-header-block .btn-border {
    z-index: 99 !important;
    position: relative !important;
}

/* HEADER : full width, fixed position comme ACF */
.wp-dashboard-header-block {
    position: fixed !important;
    z-index: 100 !important;
    width: 100% !important;
    transition: all 0.2s ease;
    top: 0;
    left: 0;
    background: transparent;
}

/* ========================
   AFFICHAGE DU BON LOGO PAR VARIANTE (état initial, sans scroll)
======================== */
.wp-dashboard-header-block.header-variant-clair .logo-color {
    display: block !important;
}
.wp-dashboard-header-block.header-variant-fonce .logo-white {
    display: block !important;
}
.wp-dashboard-header-block.header-variant-noir .logo-black {
    display: block !important;
}

/* ========================
   HEADER TRANSPARENT : style de base selon la variante
======================== */
.wp-dashboard-header-block.header-variant-clair {
    background: transparent;
}
.wp-dashboard-header-block.header-variant-clair .header-nav a {
    color: #000;
}
.wp-dashboard-header-block.header-variant-fonce {
    background: transparent;
}
.wp-dashboard-header-block.header-variant-fonce .header-nav a {
    color: #fff;
}
.wp-dashboard-header-block.header-variant-noir {
    background: transparent;
}
.wp-dashboard-header-block.header-variant-noir .header-nav a {
    color: #000;
}

/* ========================
   AU SCROLL : header blanc, logo couleur pour tous, textes noirs
======================== */
.wp-dashboard-header-block.scrolled {
    background: #fff !important;
}
.wp-dashboard-header-block.scrolled .header-nav a {
    color: #000 !important;
}
.wp-dashboard-header-block.scrolled .logo-white,
.wp-dashboard-header-block.scrolled .logo-black {
    display: none !important;
}
.wp-dashboard-header-block.scrolled .logo-color {
    display: block !important;
}

/* ========================
   CONTAINER PRINCIPAL : Full width sans max-width
======================== */
.wp-dashboard-header-block .header-container {
    width: 100%;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 57px;
    min-height: 80px;
    box-sizing: border-box;
}

/* Zone logo gauche */
.wp-dashboard-header-block .header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.wp-dashboard-header-block .logo-container {
    position: relative;
    height: 50px;
    min-width: 120px;
}

.wp-dashboard-header-block .logo-container .logo-link {
    display: block;
    height: 100%;
    text-decoration: none;
}

.wp-dashboard-header-block .logo-container img {
    height: 100%;
    width: auto;
    max-width: none;
}

/* ========================
   NAVIGATION CENTRALE : Typographie Noto Sans Light 16px
======================== */
.wp-dashboard-header-block .header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.wp-dashboard-header-block .nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
    align-items: center;
}

.wp-dashboard-header-block .nav-menu li {
    margin: 0;
}

.wp-dashboard-header-block .nav-menu a {
    text-decoration: none;
    font-family: 'Noto Sans', sans-serif;
    font-size: 16px;
    font-weight: 300; /* Light */
    transition: all 0.3s ease;
    position: relative;
    display: block;
    padding-bottom: 4px;
}

.wp-dashboard-header-block .nav-menu a:hover {
    opacity: 0.7;
}

/* Indicateur de page active sous le label */
.wp-dashboard-header-block .nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: currentColor;
    border-radius: 1px;
}

/* ========================
   BOUTONS D'ACTION : Typographie Noto Sans Regular 12px
======================== */
.wp-dashboard-header-block .header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-shrink: 0;
}

/* BOUTON OUTLINE (ex : Agir avec nous) */
.wp-dashboard-header-block .btn-border {
    background-color: transparent !important;
    border: 2px solid;
    border-radius: 10px;
    text-decoration: none;
    font-family: 'Noto Sans', sans-serif;
    font-size: 12px;
    font-weight: 400; /* Regular */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

/* BOUTON PLEIN (ex : Faire un don) */
.wp-dashboard-header-block .btn-filled {
    border: none;
    border-radius: 10px;
    text-decoration: none;
    font-family: 'Noto Sans', sans-serif;
    font-size: 12px;
    font-weight: 400; /* Regular */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

/* ========================
   VARIANTES DE COULEUR DES BOUTONS PAR HEADER (avant scroll)
======================== */

/* CLAIR & NOIR : boutons noirs */
.wp-dashboard-header-block.header-variant-clair .btn-border,
.wp-dashboard-header-block.header-variant-noir .btn-border {
    background: transparent !important;
    color: #000 !important;
    border-color: #000 !important;
}
.wp-dashboard-header-block.header-variant-clair .btn-filled,
.wp-dashboard-header-block.header-variant-noir .btn-filled {
    background: #000 !important;
    color: #fff !important;
}

/* FONCÉ : boutons blancs */
.wp-dashboard-header-block.header-variant-fonce .btn-border {
    background: transparent !important;
    color: #fff !important;
    border-color: #fff !important;
}
.wp-dashboard-header-block.header-variant-fonce .btn-filled {
    background: #fff !important;
    color: #000 !important;
}

/* AU SCROLL : boutons inversés pour toutes variantes */
.wp-dashboard-header-block.scrolled .btn-border {
    background-color: #fff !important;
    color: #000 !important;
    border: 2px solid #000 !important;
}
.wp-dashboard-header-block.scrolled .btn-filled {
    background-color: #000 !important;
    color: #fff !important;
}

/* Menu burger au scroll - toujours noir */
.wp-dashboard-header-block.scrolled .mobile-menu-toggle {
    color: #000 !important;
}

/* ========================
   HOVER EFFECTS
======================== */
.wp-dashboard-header-block .btn-border:hover {
    background-color: rgb(0, 0, 0) !important;
    color: #fff !important;
}
.wp-dashboard-header-block .btn-filled:hover {
    opacity: 0.9;
}

/* ========================
   RESPONSIVE DESIGN + VERSION MOBILE FIGMA
======================== */

/* Menu burger - caché par défaut */
.wp-dashboard-header-block .mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.wp-dashboard-header-block .mobile-menu-toggle svg {
    width: 18px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

/* Menu mobile overlay - caché par défaut */
.wp-dashboard-header-block .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgb(255, 255, 255);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.wp-dashboard-header-block .mobile-menu.open {
    opacity: 1;
    visibility: visible;
}

.wp-dashboard-header-block .mobile-menu-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.wp-dashboard-header-block .mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    padding-bottom: 30px;
}

.wp-dashboard-header-block .mobile-menu-close {
    background: none;
    border: none;
    color: #000;
    cursor: pointer;
    padding: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 20px;
    right: 20px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.wp-dashboard-header-block .mobile-menu-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.wp-dashboard-header-block .mobile-menu-close svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2px;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wp-dashboard-header-block .mobile-menu-nav {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 80px 40px 40px 40px;
}

.wp-dashboard-header-block .mobile-menu-nav .nav-menu {
    flex-direction: column;
    gap: 20px;
    text-align: left;
    width: 100%;
}

.wp-dashboard-header-block .mobile-menu-nav .nav-menu a {
    color: #000000 !important;
    font-size: 16px;
    font-weight: 300;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: block;
    width: 100%;
}

.wp-dashboard-header-block .mobile-menu-nav .nav-menu a:hover {
    color: #333 !important;
    background-color: rgba(0, 0, 0, 0.05);
    padding-left: 10px;
}

.wp-dashboard-header-block .mobile-menu-nav .nav-menu a.active {
    color: #000000 !important;
    font-weight: 500;
    position: relative;
}

.wp-dashboard-header-block .mobile-menu-nav .nav-menu a.active::after {
    content: '';
    position: absolute;
    background-color: #000000;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
}

@media (max-width: 1200px) {
    .wp-dashboard-header-block .header-container {
        padding: 0 32px;
    }
    
    .wp-dashboard-header-block .nav-menu {
        gap: 24px;
    }
}

@media (max-width: 992px) {
    .wp-dashboard-header-block .nav-menu {
        gap: 20px;
    }
    
    .wp-dashboard-header-block .header-actions {
        gap: 12px;
    }
}

/* Version mobile selon le design Figma - à partir de 768px */
@media (max-width: 768px) {
    .wp-dashboard-header-block .header-container {
        padding: 20px 22px;
        min-height: 70px;
        /* Structure mobile : Logo | Espace | Bouton Don | Menu Burger */
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
    }
    
    /* Logo à gauche */
    .wp-dashboard-header-block .header-left {
        flex-shrink: 0;
    }
    
    .wp-dashboard-header-block .logo-container {
        min-width: 100px;
        height: 40px;
    }
    
    /* Navigation cachée sur mobile - remplacée par menu burger */
    .wp-dashboard-header-block .header-nav {
        display: none;
    }
    
    /* Actions au centre - seulement le bouton "Faire un don" */
    .wp-dashboard-header-block .header-actions {
        flex: 1;
        display: flex;
        justify-content: center;
        gap: 0;
    }
    
    /* Cacher le bouton border sur mobile, garder seulement "Faire un don" */
    .wp-dashboard-header-block .btn-border {
        display: none;
    }
    
    .wp-dashboard-header-block .btn-filled {
        padding: 12px 16px;
        font-size: 12px;
        font-weight: 500;
        min-width: 102px;
        height: 40px;
        border-radius: 6px;
    }
    
    /* Menu burger à droite - plus gros et cliquable */
    .wp-dashboard-header-block .mobile-menu-toggle {
        display: flex;
        flex-shrink: 0;
        color: inherit;
        width: 32px;
        height: 32px;
        padding: 4px;
    }
    
    .wp-dashboard-header-block .mobile-menu-toggle svg {
        width: 24px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .wp-dashboard-header-block .header-container {
        padding: 20px 16px;
        min-height: 60px;
        gap: 12px;
    }
    
    .wp-dashboard-header-block .logo-container {
        min-width: 80px;
        height: 35px;
    }
    
    .wp-dashboard-header-block .btn-filled {
        padding: 10px 14px;
        font-size: 11px;
        min-width: 90px;
        height: 36px;
    }
    
    .wp-dashboard-header-block .mobile-menu-toggle {
        width: 20px;
        height: 20px;
    }
    
    .wp-dashboard-header-block .mobile-menu-toggle svg {
        width: 16px;
        height: 12px;
    }
}

/* ========================
   ADAPTATION POUR LE THÈME FSE
======================== */
.wp-site-blocks .wp-dashboard-header-block {
    margin-bottom: 0;
}

/* Compensation pour le header fixe */
body.has-wp-dashboard-header-block {
    padding-top: 80px;
}

@media (max-width: 768px) {
    body.has-wp-dashboard-header-block {
        padding-top: 70px;
    }
}

@media (max-width: 480px) {
    body.has-wp-dashboard-header-block {
        padding-top: 60px;
    }
} 