/* BoGazon — blocks.css : styles de blocs V1 (charte brochure), front seulement : pages .bgt-content de l'ancien gabarit et
   blocs is-style-bgs-* hors écrans éditoriaux (ceux-ci ne chargent plus cette feuille, inc/editorial.php).
   04/10/2026 : plus chargée dans l'éditeur (add_editor_style → assets/gz/gz-tokens.css + gz-editor.css) ; les
   sélecteurs .is-root-container et la section « éditeur seulement » ont été retirés. Retrait progressif : voir
   bogazon-site/ARCHITECTURE.md, section « Charte ». */

:root { --bgt-filet: 1px solid var(--bgs-line); } /* filet gris (listes, tableaux, cartes) */

/* 1. Typographie du contenu */
.bgt-content :is(h1, h2, h3, h4, h5, h6):not(.bgs *),.bgt-content :is(h1, div:where(.gz-hx2), div:where(.gz-hx3), h4, h5, h6):not(.bgs *) { font-family: var(--bgs-font-display); color: inherit; line-height: var(--bgs-lh-tight); text-wrap: balance; overflow-wrap: break-word; }
.bgt-content :is(h1, h2):not(.bgs *),.bgt-content :is(h1, div:where(.gz-hx2)):not(.bgs *) { font-weight: var(--bgs-weight-display); text-transform: uppercase; letter-spacing: var(--bgs-tracking-display); line-height: 1.05; }
.bgt-content h1:not(.bgs *) { font-size: var(--bgs-fs-4xl); }
.bgt-content h2:not(.bgs *),.bgt-content div:where(.gz-hx2):not(.bgs *) { font-size: var(--bgs-fs-3xl); }
.bgt-content h3:not(.bgs *),.bgt-content div:where(.gz-hx3):not(.bgs *) { font-size: var(--bgs-fs-lg); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; line-height: 1.25; color: var(--bgs-brown); }
.bgt-content :is(h4, h5, h6):not(.bgs *) { font-size: var(--bgs-fs-base); font-weight: 600; }
.bgt-content > :is(h2, h3):not(:first-child):not(.bgs *),.bgt-content > :is(div:where(.gz-hx2), div:where(.gz-hx3)):not(:first-child):not(.bgs *) { margin-block-start: 2em; }
.bgt-content :is(h2, h3) + *:not(.bgs *),.bgt-content :is(div:where(.gz-hx2), div:where(.gz-hx3)) + *:not(.bgs *) { margin-block-start: .85rem; }
.bgt-content :is(strong, b):not(.bgs *) { font-weight: 600; }
.bgt-content a:not([class*="button"], .bgs-btn):not(.bgs *) { color: var(--bgs-green-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.bgt-content a:not([class*="button"], .bgs-btn):hover:not(.bgs *) { color: var(--bgs-green-deep); }
.bgt-content :is(ul, ol):not([class*="is-style-"], [class*="bgt-"], .wp-block-latest-posts, .products):not(.bgs *) { padding-inline-start: 1.3em; }
.bgt-content li + li:not(.bgs *) { margin-block-start: .35em; }
.bgt-content li:not(.bgs *)::marker { color: var(--bgs-green-text); }
.bgt-content blockquote:not([class*="is-style-"]):not(.bgs *) { margin-inline: 0; padding-left: 1.25rem; border-left: 4px solid var(--bgs-green); font-size: var(--bgs-fs-lg); }
.bgt-content :is(figcaption, .wp-element-caption):not(.bgs *) { margin-top: .5rem; font-size: var(--bgs-fs-xs); color: var(--bgs-ink-soft); }
.bgt-content .wp-block-table:not([class*="is-style-"]) :is(th, td):not(.bgs *) { padding: .5rem .75rem; border: var(--bgt-filet); text-align: left; }
.wp-block-table thead { border-bottom: 0; }
.wp-block-separator { border: 0; border-top: var(--bgt-filet); }
/* Aplats pleine largeur collés */
.bgt-content > .alignfull + .alignfull, .bgt-content > .alignfull:first-child { margin-block-start: 0; }

/* 2. Sections (core/group) */
.wp-block-group:is(.is-style-bgs-section, .is-style-bgs-section-alt, .is-style-bgs-section-dark, .is-style-bgs-diagonal) { position: relative; padding-block: var(--bgs-section-y); }
.wp-block-group:is(.is-style-bgs-section-alt, .is-style-bgs-diagonal):not(.has-background) { background: var(--bgs-green-pale); }
/* Colonne de texte calée à gauche de la grille large */
:is(.bgt-content, .wp-block-group.alignfull).is-layout-constrained > :not(.alignwide, .alignfull, .alignleft, .alignright, .aligncenter) { margin-left: max(0px, (100% - var(--wp--style--global--wide-size)) / 2) !important; margin-right: auto !important; }
.is-style-bgs-section-dark { overflow: hidden; color: var(--bgs-on-dark); }
.is-style-bgs-section-dark:not(.has-background) { background: var(--bgs-brown); }
.is-style-bgs-section-dark > * { position: relative; z-index: 1; }
.is-style-bgs-section-dark::after, .is-style-bgs-hero::after { content: ""; position: absolute; right: 0; bottom: 0; width: clamp(56px, 10vw, 150px); aspect-ratio: 1; background: var(--bgs-gradient-green); clip-path: polygon(100% 0, 100% 100%, 0 100%); pointer-events: none; }
.is-style-bgs-section-dark :is(h1, h2, h3, h4, h5, h6, p, li, figcaption, a:not([class*="button"], .bgs-btn)),.is-style-bgs-section-dark :is(h1, div:where(.gz-hx2), div:where(.gz-hx3), h4, h5, h6, p, li, figcaption, a:not([class*="button"], .bgs-btn)) { color: var(--bgs-on-dark) !important; }
.is-style-bgs-section-dark :focus-visible { outline-color: var(--bgs-focus-on-dark); }
.wp-block-group.is-style-bgs-diagonal { --bgt-diag: clamp(24px, 5vw, 72px); padding-bottom: calc(var(--bgs-section-y) + var(--bgt-diag)); clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--bgt-diag)), 0 100%); }
.wp-block-group.is-style-bgs-card { padding: clamp(1rem, 3vw, 1.5rem); border: var(--bgt-filet); border-radius: 8px; }
.is-style-bgs-card:not(.has-background) { background: var(--bgs-surface); }
.wp-block-group.is-style-bgs-card > * + * { margin-block-start: .75rem; }
/* Sommaire de guide (carte + bgs-toc) */
.bgs-toc :is(ul, ol) { margin: 0; padding: 0 !important; list-style: none; counter-reset: bgt-toc; }
.bgs-toc li { margin: 0 !important; border-bottom: var(--bgt-filet); }
.bgs-toc li:last-child { border-bottom: 0; }
.bgs-toc li a { display: flex; gap: .6em; padding: .55rem 0; font-weight: 600; text-decoration: none !important; color: var(--bgs-ink) !important; }
.bgs-toc li a::before { counter-increment: bgt-toc; content: counter(bgt-toc, decimal-leading-zero); color: var(--bgs-green-text); }
.bgs-toc li a:hover { color: var(--bgs-green-text) !important; }

/* 3. Bandeau de page (core/cover bgs-hero) */
.wp-block-cover.is-style-bgs-hero { --bgt-diag: clamp(20px, 4vw, 56px); min-height: clamp(340px, 52vh, 560px); align-items: flex-end; padding: var(--bgs-section-y) var(--wp--style--root--padding-right, 16px) calc(3rem + var(--bgt-diag)) var(--wp--style--root--padding-left, 16px); color: var(--bgs-on-dark); clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--bgt-diag)), 0 100%); }
.is-style-bgs-hero .wp-block-cover__background { background: linear-gradient(90deg, rgba(29, 42, 14, .86), rgba(29, 42, 14, .62) 55%, rgba(29, 42, 14, .3)) !important; opacity: 1 !important; }
.is-style-bgs-hero::after { z-index: 1; bottom: var(--bgt-diag); }
.is-style-bgs-hero .wp-block-cover__inner-container { width: 100%; max-width: var(--bgs-container); color: var(--bgs-on-dark); }
.is-style-bgs-hero .wp-block-cover__inner-container > * { max-width: 46rem; margin-left: 0 !important; margin-right: auto !important; }
.is-style-bgs-hero :is(h1, h2, p, li),.is-style-bgs-hero :is(h1, div:where(.gz-hx2), p, li) { color: var(--bgs-on-dark) !important; }
.is-style-bgs-hero p:not([class*="eyebrow"]) { font-size: var(--bgs-fs-lg); }
.is-style-bgs-hero :is(.is-style-bgs-secondary, .is-style-outline) > .wp-block-button__link { background: transparent; border-color: var(--bgs-on-dark); color: var(--bgs-on-dark); }
.is-style-bgs-hero :focus-visible { outline-color: var(--bgs-focus-on-dark); }

/* 4. Images : hexagone, diagonale */
.wp-block-image.is-style-bgs-hexagon { max-width: min(100%, 360px); }
.wp-block-image.is-style-bgs-hexagon img { display: block; width: 100%; height: auto; aspect-ratio: .866 / 1; object-fit: cover; clip-path: var(--bgs-hexagon-pointe); }
.is-style-bgs-hexagon figcaption { text-align: center; }
.wp-block-image.is-style-bgs-diagonal img { display: block; width: 100%; clip-path: var(--bgs-diagonal); }

/* 5. Cartes avec icône (core/columns bgs-infobox) */
.is-style-bgs-infobox > .wp-block-column { padding: 1.5rem; border: var(--bgt-filet); border-top: 4px solid var(--bgs-green); border-radius: 4px; color: var(--bgs-ink); }
.is-style-bgs-infobox > .wp-block-column:not(.has-background) { background: var(--bgs-surface); }
.is-style-bgs-infobox > .wp-block-column > * { margin-block: 0; }
.is-style-bgs-infobox > .wp-block-column > * + * { margin-block-start: .6rem; }
.is-style-bgs-infobox .wp-block-image img { width: auto; max-width: 60px; max-height: 60px; object-fit: contain; }
.is-style-bgs-infobox .wp-block-image img[src$=".svg"] { width: 48px; filter: invert(36%) sepia(62%) saturate(1032%) hue-rotate(54deg) brightness(88%) contrast(91%); }
.is-style-bgs-infobox :is(h3, h4),.is-style-bgs-infobox :is(div:where(.gz-hx3), h4) { font-size: var(--bgs-fs-base); color: var(--bgs-brown) !important; }
.is-style-bgs-infobox :is(p, li) { font-size: var(--bgs-fs-sm); color: var(--bgs-ink-soft) !important; }

/* 6. FAQ (core/details bgs-faq) */
.wp-block-details.is-style-bgs-faq { padding: 0; border-bottom: var(--bgt-filet); }
:not(.is-style-bgs-faq) + .is-style-bgs-faq, .is-style-bgs-faq:first-child { border-top: var(--bgt-filet); }
.bgt-content .is-style-bgs-faq + .is-style-bgs-faq, .is-style-bgs-faq + .is-style-bgs-faq { margin-block-start: 0; }
.is-style-bgs-faq > summary { position: relative; display: block; min-height: 44px; padding: 1rem 2.75rem 1rem 0; list-style: none; cursor: pointer; font-weight: 600; line-height: 1.4; }
.is-style-bgs-faq > summary::-webkit-details-marker { display: none; }
.is-style-bgs-faq > summary::after { content: ""; position: absolute; right: .25rem; top: 50%; width: 1.5rem; height: 1.5rem; margin-top: -.75rem; background: var(--bgs-green-text); mask: url(../img/plus.svg) center / contain no-repeat; transition: transform var(--bgs-dur); }
.is-style-bgs-faq[open] > summary::after { transform: rotate(45deg); }
.is-style-bgs-faq > summary:hover { color: var(--bgs-green-text); }
.is-style-bgs-faq > :not(summary) { margin: 0 0 1rem; max-width: 68ch; }
.is-style-bgs-section-dark .is-style-bgs-faq { border-color: var(--bgs-on-dark-line); }

/* 7. Fiche technique (core/table bgs-spec) */
.wp-block-table.is-style-bgs-spec table { width: 100%; table-layout: auto; border-collapse: collapse; border: 1px solid var(--bgs-green); background: var(--bgs-surface); font-size: var(--bgs-fs-sm); }
.wp-block-table.is-style-bgs-spec :is(table, .has-fixed-layout) :is(th, td) { min-width: 8rem; word-break: normal; overflow-wrap: normal; hyphens: auto; padding: .55rem .8rem; border: 1px solid var(--bgs-green-pale); text-align: left; vertical-align: top; color: var(--bgs-ink) !important; }
.is-style-bgs-spec thead th { background: var(--bgs-green); border-color: var(--bgs-green); color: var(--bgs-on-green) !important; font-size: var(--bgs-fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.is-style-bgs-spec tbody tr:nth-child(even) { background: var(--bgs-surface-alt); }
.is-style-bgs-spec tbody :is(th, td):first-child { font-weight: 600; }

/* 8. Boutons (bgs-open--<cible> : interface du plugin) */
.wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 2px solid transparent; text-decoration: none; text-align: center; }
.is-style-bgs-primary > .wp-block-button__link { background-color: var(--bgs-green); border-color: var(--bgs-green); color: var(--bgs-on-green); }
.is-style-bgs-primary > .wp-block-button__link:hover { background-color: var(--bgs-green-light); border-color: var(--bgs-green-light); color: var(--bgs-on-green); }
.is-style-bgs-secondary > .wp-block-button__link { background-color: var(--bgs-brown); border-color: var(--bgs-brown); color: var(--bgs-on-dark); }
.is-style-bgs-secondary > .wp-block-button__link:hover { background-color: var(--bgs-brown-soft); border-color: var(--bgs-brown-soft); color: var(--bgs-on-dark); }
.is-style-outline > .wp-block-button__link { background: transparent; border-color: currentColor; color: var(--bgs-green-text); }
.is-style-bgs-section-dark .is-style-bgs-secondary > .wp-block-button__link { background: var(--bgs-surface); border-color: var(--bgs-surface); color: var(--bgs-brown); }
.is-style-bgs-section-dark .is-style-outline > .wp-block-button__link { color: var(--bgs-on-dark); }
.wp-block-button__link:focus-visible { outline: 3px solid var(--bgs-focus); outline-offset: 2px; }

/* 9. Listes à coches */
ul.is-style-bgs-check { padding-inline-start: 0; list-style: none; }
.is-style-bgs-check > li { position: relative; padding-inline-start: 1.9em; }
.is-style-bgs-check > li + li { margin-block-start: .5em; }
.is-style-bgs-check > li::before { content: ""; position: absolute; left: 0; top: .2em; width: 1.25em; height: 1.25em; background: var(--bgs-green-text); mask: url(../img/check.svg) center / contain no-repeat; }
.is-style-bgs-section-dark .is-style-bgs-check > li::before { background: var(--bgs-green-light); }

/* 10. Sur-titres */
:is(.bgt-content, .bgt-main) :is(.is-style-bgs-eyebrow, .bgs-eyebrow, .bgt-eyebrow), .is-style-bgs-eyebrow { font-family: var(--bgs-font); font-size: var(--bgs-fs-xs); font-weight: 600; line-height: 1.3; text-transform: uppercase; letter-spacing: .06em; color: var(--bgs-green-text); }
.bgt-content :is(.is-style-bgs-eyebrow, .bgs-eyebrow) + * { margin-block-start: .5rem !important; }
:is(.is-style-bgs-section-dark, .is-style-bgs-hero) :is(.is-style-bgs-eyebrow, .bgs-eyebrow) { color: var(--bgs-green-light) !important; }

/* 11. Témoignage */
.wp-block-quote.is-style-bgs-testimonial { position: relative; margin-inline: 0; padding: 3rem 1.5rem 1.5rem; border: 0; border-radius: 8px; background: var(--bgs-green-pale); }
.is-style-bgs-testimonial::before { content: "\201C"; position: absolute; top: .1rem; left: 1.5rem; font-size: 4.5rem; font-weight: 700; line-height: 1; color: var(--bgs-green-display); }
.is-style-bgs-testimonial p { font-size: var(--bgs-fs-lg); font-weight: 500; line-height: 1.5; color: var(--bgs-ink) !important; }
.is-style-bgs-testimonial cite { display: block; margin-top: 1rem; font-size: var(--bgs-fs-xs); font-style: normal; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--bgs-brown) !important; }

/* 12. Derniers articles en cartes */
.wp-block-latest-posts.wp-block-latest-posts__list { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin: 0; padding: 0; list-style: none; }
.wp-block-latest-posts__list li { position: relative; display: flex; flex-direction: column; gap: .4rem; width: auto !important; margin: 0 !important; padding-bottom: 1rem; border-bottom: var(--bgt-filet); }
.wp-block-latest-posts__featured-image { margin: 0; }
.wp-block-latest-posts__featured-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.wp-block-latest-posts a.wp-block-latest-posts__post-title { font-size: var(--bgs-fs-lg); font-weight: 600; line-height: 1.3; color: var(--bgs-ink) !important; text-decoration: none !important; }
.wp-block-latest-posts__post-title::after { content: ""; position: absolute; inset: 0; }
.wp-block-latest-posts__post-title:hover { color: var(--bgs-green-text) !important; }
.wp-block-latest-posts__post-date, .wp-block-latest-posts__post-excerpt { margin: 0; font-size: var(--bgs-fs-sm); color: var(--bgs-ink-soft); }

/* Contenus reconstruits (H1 long : inc/blocks.php) */
.bgt-content h1.is-long-title { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); }
.is-style-bgs-hero .wp-block-cover__inner-container > h1.is-long-title { max-width: 60rem; }
.bgt-content .bgs-lead { font-size: var(--bgs-fs-lg); font-weight: 500; line-height: 1.5; }
.bgt-content p.bgs-stat { margin: 0; font-size: var(--bgs-fs-3xl) !important; line-height: 1; color: var(--bgs-green-display) !important; }
.bgt-content .bgs-card-title { font-size: var(--bgs-fs-lg); line-height: 1.3; color: var(--bgs-brown); }
.bgs-guide-nav a[aria-current] { box-shadow: inset 4px 0 var(--bgs-green); padding-left: .75rem !important; background: var(--bgs-green-pale); color: var(--bgs-green-deep) !important; }

/* 13. Modèles : étapes, chiffres clés, hexagones */
ol.bgt-steps { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); margin: 0; padding: 0; list-style: none; counter-reset: bgt-step; }
ol.bgt-steps > li { position: relative; margin: 0; padding-top: 4.25rem; counter-increment: bgt-step; }
ol.bgt-steps > li::before { content: counter(bgt-step); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 3.2rem; aspect-ratio: .866 / 1; background: var(--bgs-gradient-green); clip-path: var(--bgs-hexagon-pointe); color: var(--bgs-on-green); font-size: var(--bgs-fs-xl); font-weight: 700; }
ol.bgt-steps strong:first-child { display: block; margin-bottom: .3rem; text-transform: uppercase; color: var(--bgs-brown); }
.bgt-stats { text-align: center; }
.bgt-stats .bgt-stat__value { margin: 0; font-size: var(--bgs-fs-3xl); line-height: 1; color: var(--bgs-green-display); }
.bgt-stats .bgt-stat__label { margin-block-start: .5rem !important; font-size: var(--bgs-fs-sm); font-weight: 600; text-transform: uppercase; color: var(--bgs-brown); }
.is-style-bgs-section-dark .bgt-stats p { color: var(--bgs-on-dark) !important; }
.bgt-hexagons { justify-content: center; }
.bgt-hexagons .wp-block-image.is-style-bgs-hexagon { max-width: none; }
@media (min-width: 782px) { .bgt-hexagons > .wp-block-image:nth-child(even) { transform: translateY(28%); } .bgt-hexagons { padding-bottom: 9%; } }
