/**
Theme Name: Astra Child
Author: Thibaut Soufflet
Author URI: https://thibautsoufflet.fr/
Description: Thème enfant du thème Astra
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-child
Template: astra
*/

.wp-block-table {
	box-shadow: inherit !important;
}

/* Table of content */
.wp-block-uagb-table-of-contents ol.uagb-toc__list {
	margin-left: 0;
}

/* Astra sticky header CSS*/
.site-header {
 top: 0;
 position: sticky;
}

.sidebar-main {
	max-height: 100% !important;
}


@media (max-width: 781px) {
  .inverse-mobile {
    flex-direction: column-reverse;
  }
}

/* MENU PRINCIPAL */
ul.main-header-menu li.wp-block-button a.menu-link {
	border: none !important;
	background-color: #4E7E68 !important;
	color: #FFFFFF !important;
	font-family: inherit;
	font-weight: 600;
	line-height: 1.2em;
	padding: 15px 20px !important;
	height: inherit;
}

ul.main-header-menu li.wp-block-button a.menu-link:hover {
	background-color: #5c977a !important;
	color: #FFFFFF !important;
}
@media (max-width: 921px) {
   .ast-builder-menu-mobile .main-navigation .menu-item.current-menu-item > .menu-link, 
   .ast-builder-menu-mobile .main-navigation .inline-on-mobile .menu-item.current-menu-item > .ast-menu-toggle, 
   .ast-builder-menu-mobile .main-navigation .menu-item.current-menu-ancestor > .menu-link, 
   .ast-builder-menu-mobile .main-navigation .menu-item.current-menu-ancestor > .ast-menu-toggle {
    color: #4E7E68;
    background: transparent;
  }
}

/* WIDGETS FOOTER */
section.widget_block .wp-block-group .wp-block-uagb-image--align-none {
	justify-content: inherit;
}
@media screen and (max-width: 767px) {
  section.widget_block {
    text-align: center;
  }
  section.widget_block .wp-block-group {
    justify-content: center;
  }
  .site-footer-primary-section-3 {
    margin-top: 30px;
  }
}
  .footer-widget-area ul.wp-block-list li {
    padding: 5px 0;
  }


/* BLOG */
.blog article .ast-article-inner {
	border-radius: 0;
	padding: 0;
	box-shadow: inherit !important;
}
.blog article .ast-article-inner h2.entry-title a {
  color: #004AAD;
}
.blog article .ast-article-inner .ast-blog-single-element a.ast-button {
	color: #4e7e68;
	background: #e8f0eb;
}
.blog article .ast-article-inner header.entry-header .entry-meta,
.blog article .ast-article-inner header.entry-header .entry-meta * {
	color: #1e293b;
}

.blog article .ast-article-inner header.entry-header .entry-meta a:hover {
	color: #4e7e68;
}
.single-post article .ast-single-related-posts-container h2.ast-related-posts-title {
	color: #004AAD;
}
.single-post article .ast-single-related-posts-container .ast-related-posts-wrapper article h3 a {
	color: #004AAD;
}

/* SEARCH RESULTS */
.search-results article {
	margin-bottom: 2.5em;
}

.search-results article .ast-article-inner {
	border-radius: 0;
	padding: 0;
	box-shadow: inherit !important;
}
.search-results article .ast-article-inner .post-thumb-img-content{
	margin-left: 0 !important;
  	margin-right: 0 !important;
}
.search-results article .ast-article-inner .ast-blog-single-element a.ast-button {
	color: #4e7e68;
	background: #e8f0eb;
}
.search-results article .ast-article-inner header.entry-header .entry-meta,
.search-results article .ast-article-inner header.entry-header .entry-meta * {
	color: #1e293b;
}
.search-results article .ast-article-inner header.entry-header .entry-meta a:hover {
	color: #4e7e68;
}

/* CUSTOM SCROLL SLIDER BASED ON COLUMNS BLOCK - .is-not-stacked-on-mobile.custom-scroll-slider */
.wp-block-columns.is-not-stacked-on-mobile.custom-scroll-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory; /* Forces strict horizontal alignment */
    scroll-behavior: smooth;       /* Smooths keyboard/anchor navigation */
    -webkit-overflow-scrolling: touch; /* Optimizes physics for iOS devices */
    gap: 20px;                     /* Adjusts spacing between your slides */
    padding: 10px 0;
    @media (min-width: 992px) {
      cursor: grab;
    }
}

/* Hide native scrollbars if you prefer a clean look */
.wp-block-columns.is-not-stacked-on-mobile.custom-scroll-slider::-webkit-scrollbar {
    display: none;
}
.wp-block-columns.is-not-stacked-on-mobile.custom-scroll-slider {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.custom-scroll-slider.is-dragging {
  cursor: grabbing;
  user-select: none; /* évite de sélectionner le texte pendant le drag */
}

/* 2. The Individual Sliding Blocks */
.wp-block-columns.is-not-stacked-on-mobile > .custom-slider-item {
    flex: 0 0 75%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    @media (min-width: 992px) {
        flex: 0 0 calc((100% - (2 * 20px)) / 3); /* 3 items pile affichés, gaps déduits */
    }
}


.slider-wrapper {
  position: relative;
}

.slider-arrow {
  display: none; /* masqué par défaut : mobile et tablette */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: #4E7E68;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-size: 18px;
  padding: inherit;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.slider-arrow:hover {
  background: #5c977a;
}

.slider-arrow-prev {
  left: -25px;
}

.slider-arrow-next {
  right: -25px;
}

/* Flèches visibles uniquement à partir de 992px */
@media (min-width: 992px) {
  .slider-arrow {
    display: flex;
  }
}