/*
 Theme Name:   Objectif Neuroinclusion Child
 Theme URI:    https://objectifneuroinclusion.org
 Description: Child theme for Astra
 Author:       RichT
 Template:     astra
 Version:      1.0.0
*/

/* === Single post custom layout (ni-*) === */
/* === Single post custom layout (ni-*) === */
.ni-company-wrap { margin: .25rem 0 .75rem; }
.ni-pill {
  display:inline-block;
  padding:.25rem .6rem;
  border-radius:999px;
  background:#E7F1FF;
  color:#0044AA;
  font-size:.85rem;
  line-height:1.1;
  text-decoration:none;
}
.ni-company { background:#EAF8F1; color:#0F7A4A; }
.ni-category { background:#F4F1FF; color:#4A2AAF; }
.ni-tag { background:#FFF4E5; color:#9A5800; }

.ni-title { margin:.25rem 0 .5rem; font-size:clamp(1.9rem, 4vw, 2.6rem); }
.ni-meta { display:flex; gap:.9rem; flex-wrap:wrap; color:#666; font-size:.92rem; margin-bottom:1rem; }

.ni-featured img { width:100%; height:auto; border-radius:8px; }
.ni-content { margin-top:1.25rem; }
.ni-section-title { font-size:1.15rem; margin:1.75rem 0 .5rem; }

.ni-tag-list { list-style:none; margin:0; padding:0; display:flex; gap:.5rem; flex-wrap:wrap; }
.ni-related ul { list-style:none; margin:.5rem 0 0; padding:0; }
.ni-related li { margin:.25rem 0; }
.ni-nav-label { font-size:.8rem; color:#777; display:block; }
.ni-nav-title { font-weight:600; }

/* === FIXED: BANNER APPLIES ONLY TO POSTS === */
.single-post #masthead .ast-primary-header-bar {
    background-image: url('https://objectifneuroinclusion.org/wp-content/themes/objectifneuroinclusion-ressources/assets/banner.jpg') !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: top center !important;

    min-height: 400px !important;

    display: flex !important;
    align-items: flex-start !important;
    padding-top: 20px !important;

    position: relative;
    z-index: 1;
}

/* Overlay */
.single-post #masthead .ast-primary-header-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    pointer-events: none;
    z-index: 0;
}

.single-post #masthead .ast-primary-header-bar > * {
    position: relative;
    z-index: 2;
}
/* === Make menu text white on posts (banner header) === */
.single-post #masthead .main-header-menu > li > a,
.single-post #masthead .ast-primary-header-bar .menu-link,
.single-post #masthead .ast-primary-header-bar a,
.single-post #masthead .trp-menu-ls-label,
.single-post #masthead .ast-custom-button {
    color: #ffffff !important;
}

/* Hover and active colors */
.single-post #masthead .main-header-menu > li > a:hover,
.single-post #masthead .main-header-menu > li.current-menu-item > a {
    color: #f0f0f0 !important;
}

/* Mobile menu icon (hamburger) white too */
.single-post #masthead .ast-mobile-svg,
.single-post #masthead .menu-toggle .mobile-menu-toggle-icon {
    color: #ffffff !important;
    fill: #ffffff !important;
}
/* === Fixed overlay title INSIDE header banner — POSTS only === */
.single-post #masthead .ast-primary-header-bar {
  position: relative; /* ensure a positioning context */
}

/* CENTERED TITLE INSIDE HEADER BANNER — POSTS ONLY */
.single-post #masthead .ast-primary-header-bar::after {
    content: "Vous aider à créer le changement";
    position: absolute;

    /* Center horizontally */
    left: 50%;
    transform: translateX(-50%);

    /* Place near bottom (adjust as you like) */
    bottom: 100px;

    /* Text style */
    color: #ffffff;
    font: inherit;             /* site default font */
    font-weight: 500;          /* improves readability */
    line-height: 1.2;
    font-size: clamp(28px, 4vw, 56px);

    /* Readability */
    text-align: center;
    text-shadow: 0 2px 6px rgba(0,0,0,.35);

    /* Prevent blocking menu hover */
    pointer-events: none;

    /* Ensure it sits above overlay */
    z-index: 3;
}

/* If your banner has a dark overlay, keep the text above it */
.single-post #masthead .ast-primary-header-bar::before {
  z-index: 1; /* your existing gradient overlay */
}
/* === FIX WHITE BARS ON PAGES (TRANSPARENT HEADER RESET) === */

/* Remove any leftover padding or spacing Astra adds for transparent header */
.page #masthead,
.page .ast-primary-header-bar,
.page .ast-main-header-wrap.main-header-bar-wrap {
    min-height: auto !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    background: transparent !important;
}

/* Reset Astra Transparent Header content offset */
.page .site-content,
.page .ast-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Fix small gaps created by Astra JS offset */
.page #content,
.page .content-area {
    margin-top: 0 !important;
}
/* === Pill button under post title === */
.ni-back-pill {
    margin: 1rem auto 1.5rem;
    text-align: left;
}

.ni-back-pill-link {
    display: inline-block;
    padding: 0.45rem 1.2rem;
    background: #EAF8F1; /* soft green background */
    color: #0F7A4A;      /* deep green text */
    font-weight: 600;
    border-radius: 999px; /* pill shape */
    text-decoration: none !important;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.ni-back-pill-link:hover {
    background: #0F7A4A;
    color: #ffffff;
}