/**
* Theme Name: BuddyX Child
* Description: This is a child theme of BuddyX, generated by Merlin WP.
* Author: <a href="https://github.com/vapvarun/buddyx">wbcomdesigns,vapvarun</a>
* Template: buddyx
* Version: 4.5.8
*/


/* IMPORTANT : page d'accueil */
// Charger CSS et JS de la landing page
function geneasphere_landing_assets() {
    if (is_page_template('page-landing-geneasphere.php')) {
        // CSS
        wp_enqueue_style(
            'landing-css',
            get_stylesheet_directory_uri() . '/css/landing.css',
            array(),
            '1.0'
        );

        // JS
        wp_enqueue_script(
            'landing-js',
            get_stylesheet_directory_uri() . '/js/landing.js',
            array('jquery'), // ou [] si pas besoin de jQuery
            '1.0',
            true // charge avant </body>
        );
    }
}
add_action('wp_enqueue_scripts', 'geneasphere_landing_assets');




/* ==========================================
   FORCER LA HAUTEUR DU CONTENEUR DE RECHERCHE YOUZIFY
   ============================================================ */

/* 1️⃣ Conteneur principal – on neutralise min‑/max‑height */
.youzify-search-landing-image-container,
.youzify-search-landing-image-container.youzify-search-landing-image-container {
    min-height: 0 !important;          /* annule le min‑height de 200px */
    max-height: none !important;       /* supprime le max‑height de 360px */
   height: 200px !important;          /* hauteur fixe que tu veux (desktop) */
}

/* 2️⃣ Image de fond (ou <img>) – on garde le ratio */
.youzify-search-landing-image,
.youzify-search-landing-image img {
   width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;      /* couvre tout le conteneur sans étirer */
    background-size: cover !important;
    background-position: center center !important;
}

/* 3️⃣ Variante mobile – hauteur plus petite */
@media (max-width: 768px) {
    .youzify-search-landing-image-container {
      height: 180px !important;      /* hauteur mobile */
  }
}

/* 4️⃣ Si le thème ajoute un wrapper (ex. BuddyX, Astra, etc.) */
.youzify-page .youzify-search-landing-image-container,
.buddyx .youzify-search-landing-image-container,
.ast-header-break-point .youzify-search-landing-image-container {
    min-height: 0 !important;
    max-height: none !important;
  height: 200px !important;
}


/* Masquer la navigation secondaire du groupe, quel que soit le thème */
#subnav.item-list-tabs.no-ajax[aria-label="Navigation secondaire de groupe"][role="navigation"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Fallback – au cas où un attribut changerait légèrement */
#subnav.item-list-tabs.no-ajax {
    display: none !important;
}




/* Supprimer l’espace laissé par les icônes */
.youzify-settings-menu .youzify-icon {
    width: auto !important;      /* pas de largeur fixe */
    margin-right: 0 !important;  /* pas de marge */
    display: inline-block;       /* ou inline-flex si besoin */
}

/* Aligner le texte à gauche */
.youzify-settings-menu a {
    justify-content: flex-start !important;
    display: flex !important;    /* assure un alignement correct */
    align-items: center;         /* vertical centré */
    gap: 0.5em;                  /* petit espace entre éventuel icon (vide) et texte */
}

/* Supprimer padding inutile */
.youzify-settings-menu a .youzify-button-title {
    padding: 0 !important;
}




/* Widgets vides - style attrayant */
div.youzify-left-sidebar div.youzify-widget.youzify-empty-widget,
div.youzify-right-sidebar div.youzify-widget.youzify-empty-widget {
    display: flex !important;
    align-items: center !important;
    min-height: 80px !important;
    border: 1px dashed #ccc !important;
    background-color: #f9f9f9 !important;
    padding: 10px 15px !important;
    margin-bottom: 15px !important;
    color: #555 !important;
    font-style: italic !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

div.youzify-left-sidebar div.youzify-widget.youzify-empty-widget:hover,
div.youzify-right-sidebar div.youzify-widget.youzify-empty-widget:hover {
    background-color: #fff8e1 !important;
    border-color: #ffcc00 !important;
    transform: translateX(5px) !important;
}

div.youzify-left-sidebar div.youzify-widget.youzify-empty-widget a.youzify-widget-link,
div.youzify-right-sidebar div.youzify-widget.youzify-empty-widget a.youzify-widget-link {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    text-decoration: none !important;
    color: inherit !important;
}

/* Icône avant le titre */
div.youzify-left-sidebar div.youzify-widget.youzify-empty-widget .youzify-widget-title::before,
div.youzify-right-sidebar div.youzify-widget.youzify-empty-widget .youzify-widget-title::before {
    content: "\f0f0" !important;
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
    margin-right: 10px !important;
    color: #ff9900 !important;
}



/* Cache immédiatement les boutons Youzify sur les pages ciblées,
   avant même que JavaScript ne s’exécute */
body.yz-hide-head-buttons .youzify-head-buttons {
    display: none !important;
}





/* Hover gris sur les liens du menu profil utilisateur */
.youzify-settings-menu a:hover {
    background-color: rgba(0,0,0,0.05) !important;
}



/* Header par-dessus photo de profil */
.youzify-profile-header,
.buddypress-wrap .profile-header {
    position: relative;
    z-index: 1;
}




