/*
 * Correl — harmonisation visuelle (V5.2)
 * Chargé en DERNIER : c'est la référence unique pour
 *   1. le bandeau (fil d'Ariane + hero) : un seul dégradé continu,
 *   2. la largeur du contenu : même bord gauche partout,
 *   3. les espaces verticaux.
 * Pour ajuster le rendu, modifiez uniquement les variables ci-dessous.
 */
:root {
  --correl-band-top: #e3eada;     /* haut du bandeau (fil d'Ariane) */
  --correl-band-mid: #ecf0e3;     /* milieu du bandeau */
  --correl-page-bg:  #fbf9f1;     /* fond de page, fin du dégradé */
  --correl-wrap:     1120px;      /* largeur unique du contenu */
  --correl-gutter:   24px;        /* marge de sécurité sur les côtés */
  --correl-space-s:  20px;
  --correl-space-m:  28px;
  --correl-space-l:  44px;
}

/* ---------- 0. Astra ne doit plus encadrer ces pages ---------- */
body.single-post #content,
body.single-post #content > .ast-container,
body.page-template-page-correl #content,
body.page-template-page-correl #content > .ast-container,
body.page-template-page #content > .ast-container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.single-post article.correl-article,
body.single-post article.ast-article-single,
body.page-template-page-correl article.correl-article {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
body.single-post,
body.page-template-page-correl {
  background: var(--correl-page-bg);
}
/* même fond que la fin du dégradé : plus de ligne visible entre le bandeau et le texte */
body.single-post .correl-page,
body.page-template-page-correl .correl-page,
body.single-post .correl-article,
body.page-template-page-correl .correl-article {
  background: var(--correl-page-bg) !important;
}
body.single-post .site-content,
body.single-post .ast-separate-container .site-main,
body.single-post #primary,
body.page-template-page-correl #primary {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ---------- 1. Largeur unique : fil d'Ariane, hero, contenu ---------- */
body.single-post .correl-shell,
body.page-template-page-correl .correl-shell,
body.single-post .correl-page .correl-shell,
body.page-template-page-correl .correl-page .correl-shell,
body.single-post .correl-breadcrumb.correl-shell,
body.page-template-page-correl .correl-breadcrumb.correl-shell {
  width: min(var(--correl-wrap), calc(100% - 2 * var(--correl-gutter))) !important;
  max-width: none !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
  box-sizing: border-box;
}

/* ---------- 2. Bandeau continu : fil d'Ariane + hero ---------- */
body.single-post .correl-breadcrumb,
body.page-template-page-correl .correl-breadcrumb {
  position: relative;
  margin: 0 !important;
  padding-block: 14px 10px !important;
  background: none !important;
}
/* bande pleine largeur derrière le fil d'Ariane, même couleur que le haut du hero */
body.single-post .correl-breadcrumb::before,
body.page-template-page-correl .correl-breadcrumb::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0; bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--correl-band-top);
  pointer-events: none;
}

body.single-post .correl-guide-hero,
body.page-template-page-correl .correl-guide-hero {
  position: relative;
  width: 100% !important;
  margin: 0 !important;
  padding: clamp(18px, 2.4vw, 34px) 0 clamp(34px, 4.5vw, 60px) !important;
  /* un seul dégradé vertical : même teinte que le fil d'Ariane en haut,
     fond de page en bas -> aucune cassure */
  background: linear-gradient(
    to bottom,
    var(--correl-band-top) 0%,
    var(--correl-band-mid) 45%,
    var(--correl-page-bg) 100%
  ) !important;
  overflow: hidden;
}
/* on supprime les décors qui créaient des taches et des cassures */
body.single-post .correl-guide-hero::after,
body.page-template-page-correl .correl-guide-hero::after { display: none !important; }
body.single-post .correl-guide-hero::before,
body.page-template-page-correl .correl-guide-hero::before {
  right: 2%; top: -30%; opacity: .55;
}

body.single-post .correl-guide-hero__grid,
body.page-template-page-correl .correl-guide-hero__grid {
  gap: clamp(28px, 4vw, 56px) !important;
}
body.single-post .correl-guide-hero h1,
body.page-template-page-correl .correl-guide-hero h1 {
  font-size: clamp(1.9rem, 3vw, 2.8rem) !important;
  line-height: 1.12 !important;
}
body.single-post .correl-chapo,
body.page-template-page-correl .correl-chapo { margin-top: 14px; }

/* ---------- 3. Espaces verticaux resserrés ---------- */
body.single-post .correl-layout,
body.page-template-page-correl .correl-layout {
  padding-top: var(--correl-space-m) !important;
  padding-bottom: clamp(40px, 6vw, 72px) !important;
  gap: clamp(24px, 3vw, 44px) !important;
}
body.single-post .correl-content > *,
body.page-template-page-correl .correl-content > * {
  margin-top: var(--correl-space-m);
}
body.single-post .correl-content > h2,
body.page-template-page-correl .correl-content > h2 {
  margin-top: var(--correl-space-l);
}
body.single-post .correl-content > h3,
body.page-template-page-correl .correl-content > h3 {
  margin-top: var(--correl-space-m);
}
body.single-post .correl-content > *:first-child,
body.page-template-page-correl .correl-content > *:first-child { margin-top: 0; }
body.single-post .correl-section,
body.page-template-page-correl .correl-section { margin-bottom: var(--correl-space-l); }

/* ---------- 4. Blocs de fin de page ---------- */
body.single-post .correl-associations,
body.single-post .correl-related-posts {
  padding-block: 8px 40px !important;
}

/* ---------- 5. Encart « parcours actuel » (CV) ---------- */
.correl-current-path {
  margin: 0 0 var(--correl-space-l);
  padding: 24px 28px;
  border: 1px solid var(--correl-border);
  border-radius: 20px;
  background: linear-gradient(125deg, #e9efe0, var(--correl-page-bg));
}
.correl-current-path > :first-child { margin-top: 0; }
.correl-current-path > :last-child  { margin-bottom: 0; }

/* ---------- 6. Mobile ---------- */
@media (max-width: 720px) {
  :root { --correl-gutter: 18px; --correl-space-l: 34px; --correl-space-m: 22px; }
  body.single-post .correl-guide-hero,
  body.page-template-page-correl .correl-guide-hero {
    padding-bottom: 32px !important;
  }
}

body.single-post, body.page-template-page-correl { overflow-x: clip; }


/* CORREL V7 — ruban éditorial unifié, sans barre ajoutée. */
:root{--correl-editorial-ink:#174b38;--correl-editorial-muted:#577264;--correl-editorial-bg:#f8f6ee;--correl-editorial-sage:#e5ecdf;}
body:not(.home) .correl-breadcrumb.correl-shell{
 position:relative!important;z-index:1;isolation:isolate;box-sizing:border-box;
 display:flex!important;flex-wrap:wrap;align-items:center;gap:10px;
 width:min(var(--correl-wrap,1120px),calc(100% - 48px))!important;
 margin:0 auto!important;padding:23px 0 10px!important;
 background:transparent!important;border:0!important;border-radius:0!important;
 box-shadow:none!important;font-family:inherit!important;
 font-size:clamp(.82rem,.95vw,.91rem)!important;letter-spacing:.015em;
 font-weight:500!important;line-height:1.5!important;color:var(--correl-editorial-muted)!important;
}
body:not(.home) .correl-breadcrumb.correl-shell::before{
 content:""!important;position:absolute!important;z-index:-1!important;
 top:0!important;bottom:-110px!important;left:50%!important;
 width:100vw!important;transform:translateX(-50%)!important;
 background:linear-gradient(115deg,#e5ecdf 0%,#edf1e6 52%,#f5f3e9 100%)!important;
 border:0!important;pointer-events:none!important;
}
body:not(.home) .correl-breadcrumb a,body:not(.home) .correl-breadcrumb a:visited{
 color:#225741!important;text-decoration:none!important;font:inherit!important;
 font-weight:600!important;transition:color .18s ease;
}
body:not(.home) .correl-breadcrumb a:hover,body:not(.home) .correl-breadcrumb a:focus-visible{
 color:#0b3e2b!important;text-decoration:underline!important;text-underline-offset:4px;
}
body:not(.home) .correl-breadcrumb [aria-current="page"]{color:#526b5d!important;font-weight:500!important}
body:not(.home) .correl-breadcrumb > span[aria-hidden="true"]{color:#9caf9d!important}
/* Supprimer les bandes vides héritées des styles de catégories. */
body.category #content,body.category #content>.ast-container,
body.archive #content,body.archive #content>.ast-container{
 margin-top:0!important;padding-top:0!important;
}
body.category .correl-archive,body.archive .correl-archive,
body.category .correl-archive .correl-page-hero,body.archive .correl-archive .correl-page-hero{
 background:linear-gradient(115deg,#e5ecdf 0%,#edf1e6 52%,#f5f3e9 100%)!important;
}
body.category .correl-archive .correl-page-hero,body.archive .correl-archive .correl-page-hero{
 padding:clamp(24px,3.5vw,46px) 0 clamp(32px,4vw,54px)!important;
 margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;
}
body.category .correl-page-hero h1,body.archive .correl-page-hero h1{
 color:#124b35!important;letter-spacing:-.035em!important;line-height:1.08!important;
 font-size:clamp(2.45rem,4.3vw,4.4rem)!important;font-weight:750!important;
}
body.category .correl-page-hero__description,body.archive .correl-page-hero__description{
 max-width:760px!important;color:#536f61!important;font-size:clamp(1rem,1.3vw,1.12rem)!important;
 line-height:1.8!important;margin-top:18px!important;
}
body.category .correl-archive>.correl-section,body.archive .correl-archive>.correl-section{
 background:var(--correl-editorial-bg)!important;padding-top:clamp(28px,4vw,54px)!important;
}
/* Articles, guides et fiches : le même fond et la même typographie de titrage. */
body.single-post .correl-guide-hero,body.page-template-page-correl .correl-guide-hero,
body.single-post .correl-single__header,body.page-template-page-correl .correl-page-hero{
 background:linear-gradient(115deg,#e5ecdf 0%,#edf1e6 52%,#f5f3e9 100%)!important;
 border:0!important;box-shadow:none!important;
}
body.single-post .correl-guide-hero h1,body.page-template-page-correl .correl-guide-hero h1,
body.single-post .correl-single__header h1,body.page-template-page-correl .correl-page-hero h1{
 color:#124b35!important;letter-spacing:-.032em!important;line-height:1.13!important;
}
@media(max-width:700px){body:not(.home) .correl-breadcrumb.correl-shell{padding-top:16px!important;padding-bottom:7px!important;gap:7px}}
