/*
Theme Name:   Astra Jardin
Theme URI:    https://github.com/
Description:  Thème enfant Astra — univers jardin & potager. Couleurs vertes, homepage personnalisable via Customizer.
Author:       Custom
Author URI:   https://github.com/
Template:     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-jardin
*/

/* ============================================================
   VARIABLES COULEURS — Palette Jardin / Potager
   ============================================================ */
:root {
    /* Verts principaux */
    --jd-dark:      #1a2e0a;   /* Très foncé — header, footer */
    --jd-primary:   #3d6b1a;   /* Vert forêt — boutons, liens */
    --jd-accent:    #6aaa35;   /* Vert vif — badges, hover */
    --jd-light:     #8fc44a;   /* Vert clair — highlights */
    --jd-pale:      #e4f0d0;   /* Vert très pâle — fonds alternés */

    /* Neutres chauds */
    --jd-cream:     #faf7f2;   /* Fond crème */
    --jd-white:     #ffffff;
    --jd-earth:     #7a5e2a;   /* Brun terre */
    --jd-earth-light: #b58b3e; /* Brun doré */

    /* Textes */
    --jd-text:      #2d3a1e;   /* Texte foncé teinté vert */
    --jd-muted:     #5a6b4a;   /* Texte secondaire */
    --jd-heading:   #1a2e0a;   /* Titres — alias de dark, overridé par le panel */

    /* Feature dark panel */
    --jd-panel:     #1e3a0d;

    /* Composantes RGB de --jd-dark (pour rgba() dans les overlays) */
    --jd-dark-rgb:  26, 46, 10;

    /* Secondaire (alias injecté dynamiquement) */
    --jd-secondary: #1a2e0a;

    /* Rayon */
    --jd-radius:    6px;

    /* Container */
    --jd-max-width: 1200px;
}

/* ============================================================
   ASTRA — HEADER (fond blanc)
   ============================================================ */

/* Fond header blanc */
#masthead,
.ast-primary-header-bar,
.main-header-bar,
.ast-mobile-header-wrap {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e4ead8 !important;
}

/* Top bar (si activée dans Astra) */
#ast-hf-custom-header-1,
.ast-above-header-bar {
    background-color: #f5f7f0 !important;
    border-bottom: 1px solid #e4ead8 !important;
}

/* Logo texte vert foncé */
.site-title a,
.ast-site-identity .site-title a {
    color: var(--jd-dark) !important;
}

/* Liens nav foncés */
.ast-builder-layout-element .menu-item a,
.main-navigation .menu-item a,
#site-navigation .nav-link,
.ast-nav-menu > .menu-item > .menu-link {
    color: var(--jd-text) !important;
}
.ast-nav-menu > .menu-item > .menu-link:hover,
.ast-nav-menu > .menu-item.current-menu-item > .menu-link {
    color: var(--jd-primary) !important;
}

/* Sous-menus */
.ast-nav-menu .sub-menu {
    background: #ffffff !important;
    border-top: 2px solid var(--jd-accent) !important;
    box-shadow: 0 6px 24px rgba(0,0,0,.10) !important;
}
.ast-nav-menu .sub-menu .menu-item a {
    color: var(--jd-text) !important;
}
.ast-nav-menu .sub-menu .menu-item a:hover {
    color: var(--jd-primary) !important;
    background: var(--jd-pale) !important;
}

/* Bouton CTA header */
.ast-builder-menu .ast-custom-button,
.ast-builder-menu .ast-nav-btn a,
.header-main-layout-1 .ast-custom-button-wrap a,
.ast-header-custom-item a.ast-button-component,
[data-section="section-hb-button-1"] a {
    background-color: var(--jd-primary) !important;
    border-color: var(--jd-primary) !important;
    color: #fff !important;
    border-radius: var(--jd-radius) !important;
}
[data-section="section-hb-button-1"] a:hover {
    background-color: var(--jd-accent) !important;
    border-color: var(--jd-accent) !important;
}

/* Icône recherche */
.ast-search-icon svg path,
.ast-header-search-wrap .ast-search-icon path {
    stroke: var(--jd-text) !important;
}

/* Icônes sociales dans le header */
.ast-builder-grid-row .ast-builder-layout-element svg path,
.ast-builder-grid-row .ast-builder-layout-element svg circle {
    fill: var(--jd-text) !important;
    stroke: var(--jd-text) !important;
}

/* Mobile menu hamburger */
.menu-toggle,
button.menu-toggle {
    color: var(--jd-dark) !important;
}
.ast-mobile-header-wrap .main-header-bar {
    border-bottom: 1px solid #e4ead8 !important;
}

/* Sticky header */
.ast-sticky-active #masthead,
.ast-sticky-active .ast-primary-header-bar {
    background-color: #ffffff !important;
    box-shadow: 0 2px 16px rgba(0,0,0,.08) !important;
}

/* ============================================================
   ASTRA — HOMEPAGE FULL WIDTH RESET
   ============================================================ */
.home #content.site-content {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
}
.home .ast-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Supprime le rectangle blanc (breadcrumbs, page-header, espaces parasites) */
.home .ast-breadcrumbs-wrapper,
.home .breadcrumb-trail,
.home .breadcrumbs,
.home .ast-page-header,
.home .entry-header,
.home .page-header,
.home .ast-above-header-bar,
.home #content > .ast-container > *:not(#primary) {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Supprime toute bordure visible sur les wrappers */
.home #content.site-content,
.home #content > .ast-container {
    border: none !important;
    outline: none !important;
}
.home #primary.content-area {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}
.home main#main.site-main {
    padding: 0 !important;
    margin: 0 !important;
}

/* ============================================================
   ASTRA — FOOTER
   ============================================================ */

/* Fond vert foncé sur TOUS les éléments du footer */
#colophon,
.site-footer,
.ast-footer-overlay,
.footer-adv-overlay,
.ast-footer-widget-area,
.ast-footer-widget-area .ast-container,
.ast-small-footer,
.ast-small-footer-wrap,
.ast-small-footer .ast-container,
.site-footer .ast-small-footer-section,
.site-footer .ast-footer-copyright,
footer.site-footer * {
    background-color: var(--jd-dark) !important;
}

#colophon,
.site-footer {
    color: rgba(255,255,255,.75) !important;
    position: relative;
}

/* Vague au-dessus du footer */
#colophon::before {
    content: '';
    position: absolute;
    top: -45px;
    left: -2%;
    width: 104%;
    height: 90px;
    background: var(--jd-dark);
    border-radius: 50% 50% 0 0 / 60% 60% 0 0;
    pointer-events: none;
}

.site-footer .ast-footer-widget-area,
.ast-footer-widget-area {
    border-top: none !important;
    padding-top: 50px;
}

/* Liens footer — blancs bien visibles */
.site-footer a,
#colophon a,
.ast-small-footer a,
.ast-footer-widget-area a {
    color: rgba(255,255,255,.82) !important;
    text-decoration: none !important;
}
.site-footer a:hover,
#colophon a:hover,
.ast-small-footer a:hover,
.ast-footer-widget-area a:hover {
    color: var(--jd-accent) !important;
    text-decoration: underline !important;
}

/* Texte générique dans le footer */
.site-footer p,
.site-footer span,
.site-footer li,
.site-footer .widget-title,
.ast-small-footer,
.ast-footer-copyright {
    color: rgba(255,255,255,.7) !important;
}

/* Titres des widgets footer */
.site-footer .widget-title {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    margin-bottom: 14px !important;
}

/* Barre copyright */
.ast-small-footer,
.site-footer .ast-small-footer-section {
    border-top: 1px solid rgba(255,255,255,.12) !important;
    padding: 14px 0 !important;
}
.ast-small-footer .ast-copyright-text,
.ast-small-footer .ast-footer-copyright {
    color: rgba(255,255,255,.5) !important;
}

/* ============================================================
   GLOBAL — ÉLÉMENTS RÉCURRENTS
   ============================================================ */

/* Liens */
a { color: var(--jd-primary); }
a:hover { color: var(--jd-accent); }

/* Boutons WordPress */
.wp-block-button__link,
.woocommerce a.button,
.button.alt {
    background-color: var(--jd-primary) !important;
    border-color: var(--jd-primary) !important;
    color: #fff !important;
    border-radius: var(--jd-radius) !important;
}
.wp-block-button__link:hover {
    background-color: var(--jd-accent) !important;
}

/* Sélection de texte */
::selection {
    background: var(--jd-pale);
    color: var(--jd-dark);
}

/* Scrollbar (Chrome) */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--jd-accent); border-radius: 3px; }

/* ============================================================
   STRETCH LINK — Cartes archive / catégorie (Astra)
   Le <a> reste UNIQUEMENT sur le titre (.entry-title a).
   Son ::after couvre tout l'article pour le rendre cliquable.
   ============================================================ */

/* Conteneur position:relative nécessaire */
.ast-article-post,
.type-post.status-publish {
    position: relative;
}

/* ★ Le ::after du titre couvre toute la carte */
.ast-article-post .entry-title a::after,
.type-post .entry-title a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    cursor: pointer;
}

/* Image : neutralise le <a> qu'Astra génère autour de la miniature */
.ast-article-post .post-thumb-img-content a,
.ast-article-post .ast-blog-featured-section a,
.type-post .post-thumb-img-content a {
    pointer-events: none;   /* non cliquable — le ::after du titre prime */
    position: relative;
    z-index: 1;
    display: block;
    cursor: pointer;        /* reste un curseur pointer pour l'UX visuel */
}

/* Éléments au-dessus du stretch (restent interactifs) */
.ast-article-post .ast-post-categories a,
.ast-article-post .entry-footer a,
.ast-article-post .ast-read-more,
.ast-article-post .post-author a {
    position: relative;
    z-index: 3;
}

/* ============================================================
   PAGES CATÉGORIE / ARCHIVE / TAG — nettoyage
   ============================================================ */

/* Supprime la barre breadcrumb colorée sous le header
   (div.main-header-bar.ast-header-breadcrumb visible dans l'inspecteur) */
.category .ast-header-breadcrumb,
.category .main-header-bar.ast-header-breadcrumb,
.archive  .ast-header-breadcrumb,
.archive  .main-header-bar.ast-header-breadcrumb,
.tag      .ast-header-breadcrumb,
.tag      .main-header-bar.ast-header-breadcrumb,
.search   .ast-header-breadcrumb,
.search   .main-header-bar.ast-header-breadcrumb {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Supprime aussi les breadcrumbs textuels dans le contenu */
.category .ast-breadcrumbs-wrapper,
.archive  .ast-breadcrumbs-wrapper,
.tag      .ast-breadcrumbs-wrapper,
.search   .ast-breadcrumbs-wrapper {
    display: none !important;
}

/* En-tête catégorie / archive — structure de base
   L'image de fond et l'overlay sont injectés dynamiquement via PHP/JS.
   Ces règles fournissent le cadre de base (padding, texte centré). */
.category .page-header,
.category .ast-archive-header,
.archive  .page-header,
.archive  .ast-archive-header,
.tag      .page-header,
.tag      .ast-archive-header {
    text-align: center !important;
    padding: 60px 20px !important;
    position: relative !important;
}

/* Titre H1 — centré */
.category .page-header .page-title,
.category .ast-archive-title,
.archive  .page-header .page-title,
.archive  .ast-archive-title,
.tag      .page-header .page-title,
.tag      .ast-archive-title {
    text-align: center !important;
    font-size: clamp(1.8rem, 3vw, 2.6rem) !important;
    color: var(--jd-heading) !important;
    font-weight: 800 !important;
    margin: 0 !important;
}
