/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Template: astra
Author: Brainstorm Force
Author URI: https://wpastra.com/about/?utm_source=theme_preview&utm_medium=author_link&utm_campaign=astra_theme
Description: The Astra WordPress theme is lightning-fast and highly customizable. It has over 1 million downloads and the only theme in the world with 6,000+ five-star reviews! It’s ideal for professional web designers, solopreneurs, small businesses, eCommerce, membership sites and any type of website. It offers special features and templates so it works perfectly with all page builders like Spectra, Elementor, Beaver Builder, etc. Fast performance, clean code, mobile-first design and schema markup are all built-in, making the theme exceptionally SEO-friendly. It’s fully compatible with WooCommerce, SureCart and other eCommerce plugins and comes with lots of store-friendly features and templates. Astra also provides expert support for free users. A dedicated team of fully trained WordPress experts are on hand to help with every aspect of the theme. Try the live demo of Astra: https://zipwp.org/themes/astra/
Tags: custom-menu,custom-logo,entertainment,one-column,two-columns,left-sidebar,e-commerce,right-sidebar,custom-colors,editor-style,featured-images,full-width-template,microformats,post-formats,rtl-language-support,theme-options,threaded-comments,translation-ready,blog
Version: 4.11.17.1765625457
Updated: 2025-12-13 11:30:57

*/
/* Conteneur général du menu latéral */
aside .menu-histoire {
  background: #f5f5f5;
  border-radius: 6px;
  padding: 0.75rem 0.75rem 0.5rem;
  border: 1px solid #ddd;
}

/* Niveau 1 : entrées principales */
aside .menu-histoire > li {
  margin-bottom: .4rem;
}

/* Liens principaux */
aside .menu-histoire > li > a {
  display: block;
  padding: .3rem .4rem;
  font-weight: 600;
  text-decoration: none;
  color: #222;
}

/* Sous-menu */
aside .menu-histoire .sub-menu {
  list-style: none;
  margin: .2rem 0 .4rem 0.5rem;
  padding-left: .4rem;
  border-left: 2px solid #ddd;
}

/* Liens de sous-menu */
aside .menu-histoire .sub-menu a {
  display: block;
  padding: .15rem 0;
  font-size: .9rem;
  color: #555;
  text-decoration: none;
}

/* Survol */
aside .menu-histoire a:hover {
  color: #0056b3;
}

/* Rendre le bloc bien collé quand on scrolle */
aside .sticky-top {
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

add_filter('nav_menu_link_attributes', function ($atts, $item) {

    // On récupère ce que tu as mis dans "Attribut de titre"
    $hash = isset($item->attr_title) ? trim($item->attr_title) : '';

    // Si c'est une ancre (commence par #), on l'ajoute à l'URL de la page
    if ($hash !== '' && str_starts_with($hash, '#') && !empty($atts['href'])) {
        // enlève un éventuel # déjà présent
        $atts['href'] = preg_replace('~#.*$~', '', $atts['href']) . $hash;

        // Optionnel : éviter d'avoir un tooltip (title) = "#Ch4-A"
        unset($atts['title']);
    }

    return $atts;
}, 10, 2);

/* Masquer le titre dans le header Velora pour les Voyages */
.single-voyages .page-header,
.single-voyages .entry-header,
.single-voyages .hero-title {
    display: none !important;
}


