/* =========================================================
   WPZ – Contenu Gutenberg Global
   ---------------------------------------------------------
   > À utiliser sur tous les contenus : articles, CPT, pages
   > Scope strict : .entry-content / .wp-block-post-content
   > Dépend des tokens globaux (app.css)
   ========================================================= */

/* ---------- Structure & rythme vertical ---------- */
:where(.entry-content, .wp-block-post-content){
  width: var(--wrap, min(1200px, 100% - 2rem));
  margin-inline: auto;
  color: var(--ink, #0f172a);
  font-size: 1rem;
  line-height: 1.65;
}
:where(.entry-content, .wp-block-post-content) > *:first-child{ margin-top: 0; }
:where(.entry-content, .wp-block-post-content) > *:last-child{ margin-bottom: 0; }

/* ---------- Titres ---------- */
:where(.entry-content, .wp-block-post-content) h1,
:where(.entry-content, .wp-block-post-content) h2,
:where(.entry-content, .wp-block-post-content) h3,
:where(.entry-content, .wp-block-post-content) h4,
:where(.entry-content, .wp-block-post-content) h5,
:where(.entry-content, .wp-block-post-content) h6{
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.15;
  margin: .3em 0 .6em;
}
:where(.entry-content, .wp-block-post-content) h1{ font-size: clamp(28px, 4.6vw, 44px); }
:where(.entry-content, .wp-block-post-content) h2{
  font-size: clamp(22px, 3.4vw, 32px);
  position: relative;
  padding-bottom: .25em;
  padding-top: 1.5rem;
}
:where(.entry-content, .wp-block-post-content) h2::after{
  content: "";
  display: block;
  height: 3px;
  width: 68px;
  margin-top: .45em;
  background: linear-gradient(90deg, var(--brand, #5CA174), transparent);
  border-radius: 99px;
}
:where(.entry-content, .wp-block-post-content) h3{ font-size: clamp(18px, 2.4vw, 24px); padding-top: 1rem;

}

/* ---------- Paragraphes ---------- */
:where(.entry-content, .wp-block-post-content) p{ margin: 0 0 1em; }
:where(.entry-content, .wp-block-post-content) .lead{
  font-size: clamp(18px, 2.2vw, 20px);
  color: var(--muted, #64748b);
}

/* ---------- Liens ---------- */
:where(.entry-content, .wp-block-post-content) a{
  color: var(--brand, #5CA174);
  text-decoration-color: color-mix(in oklab, var(--brand, #5CA174) 35%, transparent);
  text-underline-offset: 2px;
  transition: color .2s ease, text-decoration-color .2s ease;
}
:where(.entry-content, .wp-block-post-content) a:hover{
  text-decoration-color: color-mix(in oklab, var(--brand, #5CA174) 80%, transparent);
}

/* ---------- Listes ---------- */
:where(.entry-content, .wp-block-post-content) ul,
:where(.entry-content, .wp-block-post-content) ol{
  margin: 0 0 1em 1.2em;
  padding: 0;
}
:where(.entry-content, .wp-block-post-content) li{ margin: .35em 0; }
:where(.entry-content, .wp-block-post-content) ul li{
  list-style: none;
  position: relative;
  padding-left: 1.2em;
}
:where(.entry-content, .wp-block-post-content) ul li::before{
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: .55em;
  height: .55em;
  border-radius: 6px;
  background: color-mix(in oklab, var(--brand, #5CA174) 24%, #eaf3ee);
  border: 1px solid color-mix(in oklab, var(--brand, #5CA174) 36%, #dfe9e3);
}

/* ---------- Images / figures ---------- */
:where(.entry-content, .wp-block-post-content) figure{ margin: 18px 0; }
:where(.entry-content, .wp-block-post-content) img{
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}
:where(.entry-content, .wp-block-post-content) figcaption{
  color: var(--muted, #64748b);
  font-size: .95rem;
  margin-top: .4rem;
  text-align: center;
}

/* ---------- Alignements ---------- */
:where(.entry-content, .wp-block-post-content) .alignwide{ width: min(100%, 1200px); margin-inline: auto; }
:where(.entry-content, .wp-block-post-content) .alignfull{ width: 100%; margin: 0; border-radius: 0; }
:where(.entry-content, .wp-block-post-content) .alignleft{ float: left; margin: .25rem 1rem .7rem 0; max-width: 46%; }
:where(.entry-content, .wp-block-post-content) .alignright{ float: right; margin: .25rem 0 .7rem 1rem; max-width: 46%; }
@media (max-width: 820px){
  :where(.entry-content, .wp-block-post-content) .alignleft,
  :where(.entry-content, .wp-block-post-content) .alignright{ float: none; margin: 0 0 .8rem 0; max-width: 100%; }
}

/* ---------- Galeries ---------- */
:where(.entry-content, .wp-block-post-content) .wp-block-gallery{
  --gap: 10px;
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
:where(.entry-content, .wp-block-post-content) .wp-block-gallery .wp-block-image{ grid-column: span 6; }
:where(.entry-content, .wp-block-post-content) .wp-block-gallery .wp-block-image img{ border-radius: 12px; }
@media (max-width: 980px){
  :where(.entry-content, .wp-block-post-content) .wp-block-gallery .wp-block-image{ grid-column: span 12; }
}

/* ---------- Colonnes / Media & Text ---------- */
:where(.entry-content, .wp-block-post-content) .wp-block-columns{
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
:where(.entry-content, .wp-block-post-content) .wp-block-column{ grid-column: span 12; }
@media (min-width: 781px){
  :where(.entry-content, .wp-block-post-content) .wp-block-columns.is-layout-flex{ display: flex; gap: 16px; }
  :where(.entry-content, .wp-block-post-content) .wp-block-column{ flex: 1; }
}
@media (max-width: 780px){
  :where(.entry-content, .wp-block-post-content) .wp-block-columns{ grid-template-columns: 1fr; }
}
:where(.entry-content, .wp-block-post-content) .wp-block-media-text{
  display: grid; gap: 16px; align-items: center;
  grid-template-columns: 1fr 1fr;
}
:where(.entry-content, .wp-block-post-content) .wp-block-media-text__content{ padding: 0; }
@media (max-width: 980px){
  :where(.entry-content, .wp-block-post-content) .wp-block-media-text{ grid-template-columns: 1fr; }
}

/* ---------- Tableaux ---------- */
:where(.entry-content, .wp-block-post-content) .wp-block-table{ overflow-x: auto; border-radius: 12px; }
:where(.entry-content, .wp-block-post-content) table{
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2rem;
  border: 1px solid var(--soft-2, #E9EEF0);
  background: #fff;
  border-radius: 12px;
}
:where(.entry-content, .wp-block-post-content) thead th{ background: var(--soft, #F4F7F5); text-align: left; }
:where(.entry-content, .wp-block-post-content) th,
:where(.entry-content, .wp-block-post-content) td{
  padding: .7rem .8rem;
  border-top: 1px solid var(--soft-2, #E9EEF0);
}
:where(.entry-content, .wp-block-post-content) tbody tr:nth-child(odd){ background: #fafcfa; }
:where(.entry-content, .wp-block-post-content) caption{
  caption-side: bottom; padding: .5rem .6rem; color: var(--muted, #64748b); font-size: .95rem;
}

/* ---------- Citations ---------- */
:where(.entry-content, .wp-block-post-content) blockquote{
  margin: 1rem 0;
  padding: .85rem 1rem;
  border-left: 4px solid var(--brand, #5CA174);
  background: #f8fbf9;
  border-radius: 10px;
}
:where(.entry-content, .wp-block-post-content) blockquote cite{
  display: block; margin-top: .4rem; color: var(--muted, #64748b); font-style: normal;
}
:where(.entry-content, .wp-block-post-content) .wp-block-pullquote{
  border-top: 2px solid var(--brand, #5CA174);
  border-bottom: 2px solid var(--brand, #5CA174);
  padding: 1rem; text-align: center;
}

/* ---------- Boutons ---------- */
:where(.entry-content, .wp-block-post-content) .wp-block-buttons{
  display: flex; flex-wrap: wrap; gap: .6rem;
}
:where(.entry-content, .wp-block-post-content) .wp-block-button__link{
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .75rem 1.1rem; border-radius: 999px; font-weight: 700;
  background: var(--brand, #5CA174); color: #fff;
  border: 1px solid var(--brand, #5CA174);
  transition: transform .05s ease, filter .2s ease;
}
:where(.entry-content, .wp-block-post-content) .wp-block-button__link:hover{ filter: brightness(.98); }
:where(.entry-content, .wp-block-post-content) .is-style-outline .wp-block-button__link{
  background: transparent; color: var(--brand, #5CA174); border-color: var(--brand, #5CA174);
}

/* ---------- Fichiers ---------- */
:where(.entry-content, .wp-block-post-content) .wp-block-file{
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  padding: .65rem .8rem; border: 1px solid var(--soft-2, #E9EEF0); border-radius: 12px; background: #fff;
}
:where(.entry-content, .wp-block-post-content) .wp-block-file__button{
  background: var(--brand, #5CA174); color: #fff; border: 1px solid var(--brand, #5CA174);
  padding: .5rem .9rem; border-radius: 999px; font-weight: 700;
}

/* ---------- Video / Audio / Embeds ---------- */
:where(.entry-content, .wp-block-post-content) .wp-block-video,
:where(.entry-content, .wp-block-post-content) .wp-block-audio{
  margin: 1rem 0; border-radius: 12px; overflow: hidden; background: #00000008;
}
:where(.entry-content, .wp-block-post-content) .wp-block-video video{ width: 100%; height: auto; display: block; }
:where(.entry-content, .wp-block-post-content) .wp-block-embed__wrapper{
  position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 12px; background: #000;
}
:where(.entry-content, .wp-block-post-content) .wp-block-embed__wrapper iframe{
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* ---------- Code / Pre / Verse ---------- */
:where(.entry-content, .wp-block-post-content) pre,
:where(.entry-content, .wp-block-post-content) .wp-block-preformatted,
:where(.entry-content, .wp-block-post-content) .wp-block-code{
  font-family: var(--mono, ui-monospace, Menlo, Monaco, Consolas);
  background: #0b1b12; color: #e8fff1;
  padding: 1rem; border-radius: 12px; overflow: auto; font-size: .95em;
}
:where(.entry-content, .wp-block-post-content) .wp-block-verse{
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  white-space: pre-wrap;
}

/* ---------- Separator & Spacer ---------- */
:where(.entry-content, .wp-block-post-content) .wp-block-separator{
  border: none; border-top: 1px solid var(--soft-2, #E9EEF0);
  margin: 1.5rem 0;
}
:where(.entry-content, .wp-block-post-content) .wp-block-separator.is-style-wide{
  height: 1px; background: linear-gradient(90deg, transparent, var(--soft-2, #E9EEF0), transparent);
}
:where(.entry-content, .wp-block-post-content) .wp-block-spacer{ display: block; }

/* ---------- Détails / FAQ / Accordéon ---------- */
:where(.entry-content, .wp-block-post-content) details{
  border: 1px solid var(--soft-2, #E9EEF0);
  border-radius: 12px;
  padding: .6rem .8rem;
  background: #fff;
  margin: 0 0 .9rem;
}
:where(.entry-content, .wp-block-post-content) summary{ cursor: pointer; font-weight: 700; }
:where(.entry-content, .wp-block-post-content) details[open]{ box-shadow: var(--shadow, 0 10px 28px rgba(0,0,0,.06)); }

/* ---------- Yoast FAQ ---------- */
:where(.entry-content, .wp-block-post-content) .schema-faq{
  display: grid; gap: 12px; margin: 1rem 0 1.2rem;
}
:where(.entry-content, .wp-block-post-content) .schema-faq-section{
  border: 1px solid var(--soft-2,#E9EEF0);
  border-radius: 12px;
  background: #fff;
  padding: .85rem 1rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.04);
}
:where(.entry-content, .wp-block-post-content) .schema-faq-question{
  margin: 0; font-weight: 800; font-size: clamp(17px, 2.2vw, 18px);
  display: flex; align-items: center; gap: .6rem;
}
:where(.entry-content, .wp-block-post-content) .schema-faq-question::before{
  content: "?"; display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: color-mix(in oklab, var(--brand,#5CA174) 18%, #eaf3ee);
  border: 1px solid color-mix(in oklab, var(--brand,#5CA174) 28%, #dfe9e3);
  font-weight: 800; color: var(--brand,#5CA174); font-size: 13px;
}
:where(.entry-content, .wp-block-post-content) .schema-faq-answer{ margin-top: .55rem; color: var(--ink,#0f172a); }

/* ---------- Sécurité pour carrousels, sidebars, etc. ---------- */
.wpz-reco ul, .wpz-reco ol,
[class*="carousel"] ul, [class*="carousel"] ol,
.slick-slider ul, .slick-slider ol{
  list-style: none; padding: 0; margin: 0;
}