/*
Theme Name: Horizon Vert
Description: Déclinaison éditable de Twenty Twenty-Five pour le site Horizon Vert de Lucie Mauzé.
Author: Horizon Vert
Template: twentytwentyfive
Version: 1.3.6
Requires at least: 6.7
Requires PHP: 7.2
Text Domain: horizon-vert
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
html { scroll-behavior: auto; }
body { margin: 0; }
.wp-site-blocks { padding-top: 0; }
.hv-header { min-height: 84px; padding-top: 22px; padding-bottom: 22px; }
.hv-header .wp-block-navigation__container { gap: 32px; }
.hv-header .wp-block-navigation-item__content { padding: 4px 0; }
.hv-header .wp-block-navigation__submenu-container { min-width: 180px; padding: 12px; border: 1px solid #eadbd4; }
.hv-header .wp-block-navigation__submenu-container .wp-block-navigation-item { width: 100%; }
.hv-header .current-menu-item > a { color: #4d190a; }
.hv-main { min-height: 60vh; padding-top: 68px; }
.hv-home { padding-top: 64px; }
.hv-home-columns { gap: 40px; align-items: flex-start; }
.hv-home-copy { text-align: center; }
.hv-welcome { color: #973b0c; margin-bottom: 40px; }
.hv-home-title { font-size: clamp(36px, 3.37vw, 48.4px); font-weight: 700; color: #973b0c; line-height: 1.3; max-width: 600px; margin: 0 auto; }
.hv-title-rule { width: 68px; border: 0; border-top: 4px solid #7c0f00; margin: 12px auto 32px; }
.hv-intro { position: relative; padding: 0 18px 0 64px; margin: 0; text-align: center; }
.hv-intro::before { content: "«"; position: absolute; left: 12px; top: -18px; color: #ffd5c9; font: 72px Georgia, serif; }
.hv-intro p { margin: 0; }
.hv-newsletter { margin-top: 72px; text-align: left; }
.hv-newsletter-note { font-size: 14px; color: #8c2f12; }
.hv-hero-image { margin: 0; }
.hv-hero-image img { width: 100%; height: auto; display: block; }
.hv-page-title { text-align: center; margin-bottom: 42px; }
.hv-footer { padding-top: 100px; padding-bottom: 48px; text-align: center; font-size: 14px; }
.hv-resource-query .wp-block-post-template { list-style: none; padding: 0; }
.hv-resource-query .wp-block-post { border-bottom: 1px solid #eadbd4; padding-bottom: 32px; margin-bottom: 32px; }
.hv-resource-query .wp-block-post-title a { text-decoration: none; }
.hv-resource-query .wp-block-post-title a:hover { text-decoration: underline; }
.wp-block-post-content img { max-width: 100%; height: auto; }
.wp-block-button__link:hover { background: #6c2913; color: white; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #7c0f00; outline-offset: 4px; }
.wp-block-navigation a:hover { text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 781px) {
 .hv-home-columns { gap: 36px; }
 .hv-home, .hv-main { padding-top: 32px; }
 .hv-welcome { margin-bottom: 28px; }
 .hv-intro { padding-left: 30px; padding-right: 8px; font-size: 25px; }
 .hv-intro::before { left: -4px; font-size: 52px; }
 .hv-newsletter { margin-top: 36px; }
 .hv-hero-image { max-width: 560px; margin-inline: auto; }
 .hv-footer { padding-top: 60px; }
}
@media (max-width: 599px) {
 .hv-header { min-height: 64px; padding-block: 16px; }
 .hv-header .wp-block-navigation__responsive-container.is-menu-open { padding: 28px; }
 .hv-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: flex-start; gap: 24px; }
 .hv-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { border: none; padding: 12px 0 0 20px; }
 .hv-page-title { font-size: 36px; }
}
.hv-resource-list .hv-resource-item { padding-block: 24px; margin-top: 0; border-bottom: 1px solid #eadbd4; gap: 32px; }
.hv-resource-item h2 { margin-top: 0; }
.hv-resource-item h2 a { text-decoration: none; }
.hv-resource-item h2 a:hover { text-decoration: underline; }
.hv-resource-item img { width: 100%; height: auto; }

/* Layout measurements from the original Horizon Vert pages. */
.hv-header { box-sizing: border-box; width: calc(100% - 80px); max-width: 1360px; margin-inline: auto; }
.wp-block-columns.hv-home-columns { gap: 40px; }
.hv-main { padding-top: 20px; }
.hv-page-title { font-weight: 700; margin-top: 0; margin-bottom: 0; }
.wp-site-blocks hr.wp-block-separator.hv-title-rule { border: 0; border-top: 4px solid #7c0f00; width: 68px; margin: 12px auto 32px; }
.wp-block-columns.hv-about { max-width: 1200px; gap: 40px; }
.hv-resource-grid { gap: 32px; border-top: 1px solid #d4d4d4; padding-top: 44px; padding-bottom: 40px; }
.hv-resource-grid h3 { font-size: 21px; font-weight: 700; color: #4d190a; line-height: 1.3; min-height: 48px; margin-top: 0; }
.hv-resource-grid p { font-size: 15.6px; line-height: 1.52; }
.hv-resource-icon { float: left; width: 40px; height: 40px; margin: 0 16px 8px 0; }
.hv-resource-icon img { width: 40px; height: 40px; }
.hv-resource-item .wp-block-image img { width: 100%; aspect-ratio: 1.43; object-fit: cover; }
.hv-date { font-size: 14px; }
@media (min-width: 782px) { .hv-home-columns > .wp-block-column:last-child { margin-top: -104px; } }
@media (max-width: 781px) { .hv-header { width: calc(100% - 40px); } .hv-resource-grid { gap: 32px; padding-block: 32px; } }

/* Imported articles keep readable wrapping on small screens. */
.wp-block-post-content { overflow-wrap: anywhere; }
.wp-block-post-content li { margin-block: .35em; }
.wp-block-post-content figcaption { font-size: 14px; text-align: center; }
.wp-block-post-content .wp-block-button__link { white-space: normal; }
.hv-resource-query .wp-block-post-featured-image img { width: 100%; object-fit: cover; }

/* The language selector stays visible beside the mobile navigation toggle. */
.hv-header { gap: 28px; }
.hv-language-switcher { flex-shrink: 0; font-size: 14px; }
.hv-language-switcher ul { display: flex; gap: 12px; list-style: none; padding: 0; margin: 0; }
.hv-language-switcher a { display: inline-block; padding-block: 8px; text-decoration: none; }
.hv-language-switcher a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 599px) { .hv-header { gap: 24px; } }

/* Document links, 24/09/2026: uploaded files and "Encadré avec un lien" share one rounded card. */
.wp-block-file, .hv-document { box-sizing: border-box; border: 1px solid #e4c9bd; border-radius: 16px; background: #fbf4f0; padding: 18px 22px; gap: 12px 20px; }
.wp-block-file { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.wp-block-file.wp-block-file:not(.wp-element-button) { font-size: 1em; }
.wp-block-file .wp-block-file__embed { flex-basis: 100%; border-radius: 10px; margin: 0; }
.wp-block-file > a:not(.wp-block-file__button), .wp-block-file__content-wrapper > a:not(.wp-block-file__button), .hv-document .hv-document-title { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 700; color: #4d190a; text-decoration: none; }
.wp-block-file > a:not(.wp-block-file__button)::before, .wp-block-file__content-wrapper > a:not(.wp-block-file__button)::before, .hv-document .hv-document-title::before { content: ""; flex: 0 0 22px; height: 26px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 26'%3E%3Cpath d='M3 1h11l7 7v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1z' fill='%23fff' stroke='%2393432d' stroke-width='1.5'/%3E%3Cpath d='M14 1v7h7' fill='none' stroke='%2393432d' stroke-width='1.5'/%3E%3Cpath d='M6 14h10M6 18h10' stroke='%2393432d' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.wp-block-file .wp-block-file__button.wp-block-file__button, .hv-document .wp-block-button__link { margin: 0; border-radius: 8px; background: #93432d; color: #fff; font-size: 16px; padding: 10px 20px; text-decoration: none; }
.hv-document .wp-block-buttons { margin: 0; }
/* Editor markup wraps the file name and button. */
.wp-block-file .wp-block-file__content-wrapper { display: flex; flex: 1; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }

/* Bold text must stand out (Lucie, 24/09/2026) without changing colour (26/09/2026): real extra-bold face. */
.wp-block-post-content :is(strong, b), .editor-styles-wrapper :is(strong, b) { font-weight: 800; color: inherit; }
.wp-block-post-content a :is(strong, b), .editor-styles-wrapper a :is(strong, b) { color: inherit; }

/* Section lists (Lucie, 26/09/2026): an article without an image is not pushed right by an empty image column. */
.hv-resource-item:not(:has(.wp-block-post-featured-image)) > .wp-block-column:first-child { display: none; }
.hv-resource-item:not(:has(.wp-block-post-featured-image)) > .wp-block-column:last-child { flex-basis: 100% !important; text-align: center; }
.hv-resource-item:not(:has(.wp-block-post-featured-image)) .wp-block-post-excerpt__more-text { text-align: center; }

/* Refonte 1.3.0 (26/09/2026) : option 1 « Éditorial », ligne des rubriques de l’option 3, grande newsletter.
   Mise en page, couleurs et tailles sont réglées dans les blocs ; ces règles ajoutent seulement ce que les blocs ne savent pas faire. */
.wp-site-blocks .hv-header { width: auto; max-width: none; min-height: 0; margin-inline: 0; padding-inline: max(20px, calc((100% - 1360px) / 2)); gap: 28px; }
.hv-header .wp-block-site-logo img, .hv-footer .wp-block-site-logo img { display: block; }
.hv-header .wp-block-site-title { margin: 0; white-space: nowrap; }
.hv-header .wp-block-site-title a, .hv-footer .wp-block-site-title a { text-decoration: none; }
.hv-header .wp-block-navigation-item__content { padding: 4px 0; }
@media (min-width: 600px) { .hv-header .hv-nav-button > .wp-block-navigation-item__content { border: 1.5px solid currentColor; border-radius: 8px; padding: 10px 18px; } }
.hv-home { padding-top: 0; }
.hv-hero .wp-block-image.alignright { float: none; margin: 0 0 0 auto; }
.hv-hero .wp-block-image img { height: auto; }
.hv-hero h1, .hv-hero h2, .hv-newsletter-band h2 { overflow-wrap: normal; word-break: normal; }
.hv-featured .wp-block-post-template, .hv-latest .wp-block-post-template { margin: 0; padding: 0; }
.hv-featured .wp-block-post-title a, .hv-latest .wp-block-post-title a, .hv-horizon h3 a { text-decoration: none; }
.hv-featured .wp-block-post-title a:hover, .hv-latest .wp-block-post-title a:hover, .hv-horizon h3 a:hover { text-decoration: underline; }
.hv-featured-item:not(:has(.wp-block-post-featured-image)) > .wp-block-column:first-child { display: none; }
.hv-featured-item:not(:has(.wp-block-post-featured-image)) > .wp-block-column:last-child { flex-basis: 100% !important; padding-left: 0 !important; }
.hv-latest .wp-block-post { margin: 0; }
.hv-latest-item { margin-block: 0 !important; }
.hv-horizon > .wp-block-columns { position: relative; padding-top: 44px; }
.hv-horizon > .wp-block-columns::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--wp--preset--color--heading); }
.hv-horizon > .wp-block-columns > .wp-block-column { position: relative; }
.hv-horizon > .wp-block-columns > .wp-block-column::before { content: ""; position: absolute; top: -44px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--wp--preset--color--heading); }
.hv-horizon h3 { margin-bottom: 8px; }
.hv-newsletter-band .wp-block-heading { margin-top: 0; }
.wp-block-horizon-newsletter.is-style-bandeau .hv-newsletter-card { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; }
.wp-block-horizon-newsletter.is-style-bandeau .hv-newsletter-card .hv-newsletter-privacy, .wp-block-horizon-newsletter.is-style-bandeau .hv-newsletter-result { color: inherit; }
.wp-block-horizon-newsletter.is-style-bandeau .hv-newsletter-form input:not([type=checkbox]):not([type=hidden]), .wp-block-horizon-newsletter.is-style-bandeau .hv-newsletter-form select { background: transparent; color: inherit; border-color: currentColor; }
.wp-block-horizon-newsletter.is-style-bandeau .hv-newsletter-form select option { color: #4d190a; }
.wp-block-horizon-newsletter.is-style-bandeau .hv-newsletter-form button { background: var(--wp--preset--color--cream); color: var(--wp--preset--color--button); font-weight: 800; }
.wp-block-horizon-newsletter.is-style-bandeau .hv-newsletter-status { border-color: currentColor; }
.wp-block-horizon-newsletter.is-style-sans-titre .hv-newsletter-card > p:first-child { margin-top: 0; }
.hv-footer { padding-top: 40px; text-align: left; }
.hv-footer p { margin: 0; }
.hv-resource-item:not(:has(.wp-block-post-featured-image)) > .wp-block-column:last-child > * { max-width: 860px; margin-inline: auto; }
@media (max-width: 781px) {
 .hv-hero .wp-block-image.alignright { margin: 8px 0 0; }
 .hv-hero .wp-block-image img { width: 160px !important; }
 .hv-featured-item > .wp-block-column:last-child { padding-left: 0 !important; }
 .hv-latest-item { gap: 6px !important; }
 .hv-horizon > .wp-block-columns { padding-top: 0; }
 .hv-horizon > .wp-block-columns::before, .hv-horizon > .wp-block-columns > .wp-block-column::before { display: none; }
 .hv-horizon > .wp-block-columns > .wp-block-column { border-top: 1px solid var(--wp--preset--color--line); padding-top: 18px; }
 .hv-newsletter-band > .wp-block-columns { gap: 32px !important; }
 .hv-featured, .hv-latest { padding-bottom: 56px !important; }
 .hv-hero { padding-top: 48px !important; }
}

/* Compact menu under 1280 px since Ressources is back in the menu (28/09/2026): the six entries no longer wrap and the logo keeps its place. */
.hv-header .hv-brand { flex-shrink: 0; }
@media (min-width: 600px) and (max-width: 1279px) {
 .hv-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
 .hv-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
 .hv-header .wp-block-navigation { margin-left: auto; }
}
.hv-header .wp-block-navigation__responsive-container.is-menu-open .hv-nav-button > .wp-block-navigation-item__content { border: 0; padding: 4px 0; }
.hv-header .wp-block-navigation__responsive-container.is-menu-open { padding: 28px 40px; }
.hv-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 22px; font-size: 20px; }
