/* Conseils harmonisés Soulatgé V1.0.1.
 * Exclusivement les pages de conseils identifiées des sites SEL, Répar’Café et Verdouble Durable.
 * Ne modifie jamais le portail principal ni les autres pages.
 */
body.shc-conseils-page {
  --shc-ink: #1b3247;
  --shc-subtle: #526579;
  --shc-border: #dbe3de;
  --shc-shell: #fbf8f2;
  --shc-blue: #e9f1fa;
  --shc-sage: #edf4eb;
  --shc-green: #eaf4ed;
  --shc-peach: #faf0e7;
  --shc-sand: #f7f0e4;
  background: var(--shc-shell);
  color: var(--shc-ink);
}
/* Le modèle Twenty Twenty-Five du portail avait un menu automatique des pages. */
/* SEL / Répar : masquer le menu WordPress automatique, pas l’en-tête du site VD. */
body.shc-site-sel .wp-site-blocks > header,
body.shc-site-sel .wp-site-blocks > .wp-block-template-part:first-child,
body.shc-site-sel .wp-site-blocks > header.wp-block-template-part,
body.shc-site-sel .wp-site-blocks .wp-block-navigation,
body.shc-site-sel .wp-site-blocks .wp-block-post-title,
body.shc-site-repar .wp-site-blocks > header,
body.shc-site-repar .wp-site-blocks > .wp-block-template-part:first-child,
body.shc-site-repar .wp-site-blocks > header.wp-block-template-part,
body.shc-site-repar .wp-site-blocks .wp-block-navigation,
body.shc-site-repar .wp-site-blocks .wp-block-post-title {
  display: none !important;
}
body.shc-conseils-page .wp-site-blocks { padding-top: 0 !important; }
body.shc-conseils-page .wp-site-blocks > main {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
body.shc-conseils-page .wp-site-blocks .wp-block-post-content {
  margin-top: 0 !important;
  max-width: 1160px !important;
  padding-top: 0 !important;
}
body.shc-conseils-page .wp-site-blocks .wp-block-post-content > .shc-topbar,
body.shc-conseils-page .wp-site-blocks .wp-block-post-content > .shc-page {
  max-width: 1080px !important;
  width: min(100%, 1080px);
  box-sizing: border-box;
}
body.shc-conseils-page .shc-topbar,
body.shc-conseils-page .shc-page,
body.shc-conseils-page .shc-page * { box-sizing: border-box; }
body.shc-conseils-page .shc-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 auto 20px !important;
  padding: 14px 14px 16px;
  border-bottom: 1px solid var(--shc-border);
}
body.shc-conseils-page .shc-home-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 8px;
}
body.shc-conseils-page .shc-home-link img {
  display: block;
  width: auto;
  max-width: 210px;
  max-height: 88px;
  object-fit: contain;
}
body.shc-conseils-page .shc-topbar-caption {
  color: var(--shc-subtle);
  font-size: .86rem;
  font-weight: 650;
  letter-spacing: .035em;
}
body.shc-conseils-page .shc-home-link:focus-visible,
body.shc-conseils-page .shc-page a:focus-visible {
  outline: 3px solid #206b7c;
  outline-offset: 4px;
}
body.shc-conseils-page .shc-page {
  padding: 6px 14px 50px;
  margin: 0 auto;
}
/* En-tête de l'index */
body.shc-conseils-page .shc-index-intro {
  max-width: 875px;
  margin: 0 0 30px;
}
body.shc-conseils-page .shc-kicker {
  margin: 0 0 9px;
  color: #477258;
  font-size: .75rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .15em;
}
body.shc-conseils-page .shc-index-intro h1 {
  margin: 0 0 15px;
  font-weight: 650;
  letter-spacing: -.025em;
  font-size: clamp(2.1rem, 4.1vw, 3.25rem);
  line-height: 1.13;
  color: var(--shc-ink);
}
body.shc-conseils-page .shc-index-intro > p:last-child {
  max-width: 765px;
  margin: 0;
  font-size: clamp(1rem, 1.7vw, 1.16rem);
  line-height: 1.65;
  color: var(--shc-subtle);
}
/* Cartes index — 2 colonnes, hauteur et espacement harmonisés */
body.shc-conseils-page .shc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
body.shc-conseils-page .shc-card {
  --shc-card-bg: var(--shc-blue);
  --shc-card-line: #bed2e9;
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0;
  padding: 24px 25px 22px;
  border: 1px solid var(--shc-card-line);
  border-radius: 19px;
  background: var(--shc-card-bg);
  box-shadow: 0 4px 16px rgba(27,50,71,.045);
  color: var(--shc-ink);
  text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease;
}
body.shc-conseils-page a.shc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(27,50,71,.11);
}
body.shc-conseils-page .shc-tone-blue { --shc-card-bg: var(--shc-blue); --shc-card-line: #bed2e9; }
body.shc-conseils-page .shc-tone-sage { --shc-card-bg: var(--shc-sage); --shc-card-line: #bfd7c0; }
body.shc-conseils-page .shc-tone-green { --shc-card-bg: var(--shc-green); --shc-card-line: #b9d9ca; }
body.shc-conseils-page .shc-tone-peach { --shc-card-bg: var(--shc-peach); --shc-card-line: #edd4c6; }
body.shc-conseils-page .shc-tone-sand { --shc-card-bg: var(--shc-sand); --shc-card-line: #e7d9ba; }
body.shc-conseils-page .shc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
body.shc-conseils-page .shc-card-topic {
  display: inline-block;
  padding: 6px 11px;
  font-weight: 750;
  font-size: .74rem;
  color: #244c56;
  background: rgba(255,255,255,.64);
  border-radius: 999px;
  line-height: 1.35;
}
body.shc-conseils-page .shc-card-num {
  opacity: .56;
  font-size: .85rem;
  font-weight: 800;
}
body.shc-conseils-page .shc-card h2 {
  margin: 0 0 11px;
  font-size: clamp(1.25rem, 2vw, 1.58rem);
  font-weight: 680;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--shc-ink);
}
body.shc-conseils-page .shc-card > p {
  margin: 0 0 20px;
  font-size: 1rem;
  line-height: 1.55;
  color: #42586b;
}
body.shc-conseils-page .shc-card-action {
  margin-top: auto;
  font-size: .95rem;
  font-weight: 750;
  color: #164e61;
}
body.shc-conseils-page .shc-card-unavailable { opacity: .8; }
body.shc-conseils-page .shc-vd-footer {
  margin: 23px 0 0;
  padding: 16px 20px;
  border: 1px solid var(--shc-border);
  border-radius: 14px;
  background: #fff;
  font-size: .97rem;
  line-height: 1.55;
  color: var(--shc-subtle);
}
body.shc-conseils-page .shc-vd-footer a { color: #1c5761; font-weight: 700; }
/* Fiches — même teinte que leur carte correspondante. */
body.shc-conseils-page .shc-page-detail { padding-top: 0; }
body.shc-conseils-page .shc-crumb { margin: 3px 0 20px; }
body.shc-conseils-page .shc-crumb a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #366174;
  font-size: .94rem;
  font-weight: 700;
}
body.shc-conseils-page .shc-crumb a:hover { text-decoration: underline; }
body.shc-conseils-page .shc-detail-hero {
  border-radius: 19px;
  background: var(--shc-card-bg);
  border: 1px solid var(--shc-card-line);
  padding: clamp(24px, 4vw, 40px);
  margin: 0 0 22px;
}
body.shc-conseils-page .shc-detail-hero h1 {
  margin: 0 0 16px;
  color: var(--shc-ink);
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  font-weight: 660;
  line-height: 1.18;
  letter-spacing: -.02em;
}
body.shc-conseils-page .shc-detail-hero > p:last-child {
  margin: 0;
  max-width: 820px;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #465c6b;
}
body.shc-conseils-page .shc-detail-body {
  padding: clamp(22px, 3.6vw, 39px);
  border: 1px solid #e0e4dd;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(27,50,71,.035);
  color: var(--shc-ink);
  font-size: clamp(1rem, 1.6vw, 1.085rem);
  line-height: 1.7;
  overflow-wrap: anywhere;
}
body.shc-conseils-page .shc-detail-body > *:first-child,
body.shc-conseils-page .shc-detail-body > .wp-block-group > *:first-child { margin-top: 0 !important; }
body.shc-conseils-page .shc-detail-body > *:last-child,
body.shc-conseils-page .shc-detail-body > .wp-block-group > *:last-child { margin-bottom: 0 !important; }
body.shc-conseils-page .shc-detail-body p,
body.shc-conseils-page .shc-detail-body li { color: #334b61; }
body.shc-conseils-page .shc-detail-body h2,
body.shc-conseils-page .shc-detail-body h3 {
  margin-top: 1.35em;
  margin-bottom: .5em;
  line-height: 1.3;
  color: var(--shc-ink);
  font-weight: 700;
}
body.shc-conseils-page .shc-detail-body h2 { font-size: clamp(1.3rem, 2.1vw, 1.6rem); }
body.shc-conseils-page .shc-detail-body h3 { font-size: clamp(1.15rem, 1.75vw, 1.35rem); }
body.shc-conseils-page .shc-detail-body a { color: #195f72; text-underline-offset: 3px; }
body.shc-conseils-page .shc-detail-body ul,
body.shc-conseils-page .shc-detail-body ol { padding-left: 1.45rem; }
body.shc-conseils-page .shc-detail-body .wp-block-group {
  max-width: 100%;
  margin-top: 0;
  margin-bottom: 0;
}
body.shc-conseils-page .shc-detail-body table { max-width: 100%; display: block; overflow-x: auto; }
body.shc-conseils-page .shc-bottom-nav {
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
body.shc-conseils-page .shc-bottom-nav a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 11px 16px;
  border: 1px solid var(--shc-border);
  border-radius: 11px;
  background: #fff;
  color: #1c5268;
  font-size: .95rem;
  font-weight: 740;
}
body.shc-conseils-page .shc-bottom-nav a:hover {
  border-color: #a3bac5;
  background: #f4f9f7;
}
@media (max-width: 760px) {
  body.shc-conseils-page .shc-grid { grid-template-columns: 1fr; gap: 14px; }
  body.shc-conseils-page .shc-topbar { padding: 14px 10px; }
  body.shc-conseils-page .shc-topbar-caption { display: none; }
  body.shc-conseils-page .shc-home-link img { max-width: 175px; max-height: 75px; }
  body.shc-conseils-page .shc-page { padding-left: 10px; padding-right: 10px; }
  body.shc-conseils-page .shc-card { padding: 22px; }
  body.shc-conseils-page .shc-detail-hero { padding: 24px; }
  body.shc-conseils-page .shc-detail-body { padding: 22px; }
  body.shc-conseils-page .shc-bottom-nav a { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  body.shc-conseils-page .shc-card { transition: none; }
}

/* Ajustements spécifiques aux pages Verdouble Durable, sans modifier les autres pages VD. */
body.shc-site-vd header.site-header,
body.shc-site-vd header.vd-header,
body.shc-site-vd #masthead,
body.shc-site-vd .vd-site-header,
body.shc-site-vd .site-header {
  display: none !important;
}
body.shc-site-vd .shc-vd-page { padding-top: 4px; }
body.shc-site-vd .shc-vd-topics { margin-bottom: 22px; }
body.shc-site-vd .shc-vd-topics .shc-card { min-height: 195px; }
body.shc-site-vd .shc-vd-body { max-width: 1080px; }
body.shc-site-vd .shc-vd-body > * { max-width: 100%; }
body.shc-site-vd .shc-vd-body h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--shc-ink);
}
body.shc-site-vd .shc-vd-body h2,
body.shc-site-vd .shc-vd-body h3 {
  scroll-margin-top: 24px;
}
body.shc-site-vd .shc-vd-body h2 {
  padding: 12px 16px;
  border-radius: 12px;
  background: #edf4eb;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}
body.shc-site-vd .shc-vd-body h3 {
  padding: 10px 14px;
  border-left: 4px solid #53856b;
  background: #f5f8f5;
  border-radius: 0 10px 10px 0;
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
}
body.shc-site-vd .shc-vd-body a { overflow-wrap: anywhere; }
body.shc-site-vd .shc-anchor { position: relative; top: -16px; }
body.shc-site-sel .shc-home-link .shc-brand-fallback { color: #1f5278; }
body.shc-site-repar .shc-home-link .shc-brand-fallback { color: #bc6a31; }
body.shc-site-vd .shc-home-link .shc-brand-fallback { color: #397451; }


/* VD V1.0.1 : ne plus dupliquer le texte de Sobriété ou le logo de l’en-tête.
 * Les vraies fiches du SEL / Répar sont affichées en cartes locales après Voisins Watt. */
body.shc-site-vd .shc-vd-page { max-width: 1100px; padding-top: 0; }
body.shc-site-vd .shc-vd-original { min-width: 0; color: var(--shc-ink); }
body.shc-site-vd .shc-vd-original h1,
body.shc-site-vd .shc-vd-original h2,
body.shc-site-vd .shc-vd-original h3 { color: var(--shc-ink); }
body.shc-site-vd .shc-vd-original .wp-block-group,
body.shc-site-vd .shc-vd-original .wp-block-columns { max-width: 100%; }
body.shc-site-vd .shc-vd-guides { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--shc-border); }
body.shc-site-vd .shc-vd-guides .shc-index-intro { margin-bottom: 23px; }
body.shc-site-vd .shc-vd-guides .shc-index-intro h2 { font-size: clamp(1.7rem,3.1vw,2.35rem); font-weight: 700; color: var(--shc-ink); margin: 0 0 9px; }
body.shc-site-vd .shc-vd-guides .shc-index-intro > p:last-child { color: var(--shc-subtle); font-size: 1.05rem; line-height: 1.55; }
body.shc-site-vd .shc-vd-guides .shc-card h3 { margin: 0 0 11px; font-size: clamp(1.2rem, 2vw, 1.52rem); font-weight: 680; line-height: 1.25; color: var(--shc-ink); }
body.shc-site-vd .shc-vd-all { margin: 20px 0 0; text-align: right; }
body.shc-site-vd .shc-vd-all a { color: #164e61; font-weight: 750; text-decoration: underline; }
body.shc-site-vd .shc-vd-admin-tip { padding: 12px 16px; border-left: 4px solid #dfb66a; background: #fff7e7; }
body.shc-site-vd .shc-vd-admin-tip a { text-decoration: underline; }

/* Le titre des pages VD provient du contenu conservé (ou du repli unique) ;
 * la ligne de titre automatique du thème ne doit pas le répéter. */
body.shc-site-vd .wp-site-blocks .wp-block-post-title { display: none !important; }
body.shc-site-vd .shc-vd-page-title { margin: 0 0 1.1rem; font-size: clamp(2rem, 4vw, 3.2rem); }
