/*
Theme Name: Harfang 2026
Description: Thème de blocs de L’Harfang, modèles visuels et charte alpine 2026.
Version: 1.2.0
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: harfang2026
Tags: full-site-editing, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, editor-style, wide-blocks
*/

/* Palette, typographies et styles de contenu : theme.json et assets/css/content.css. */
:root { --width-site: 1180px; --width-content: 760px; --gutter: clamp(1rem, 3vw, 2.5rem); }
.container { width: min(var(--width-site), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.site-main { min-height: 55vh; padding-block: clamp(3rem, 7vw, 6rem); }
.site-main > * { width: min(var(--width-site), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.site-main > .single-entry { width: 100%; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.screen-reader-text:focus { width: auto; height: auto; margin: 0; clip-path: none; white-space: normal; }
.skip-link:focus { position: fixed; top: 1rem; left: 1rem; z-index: 100000; padding: .75rem 1rem; background: #fff; color: var(--color-ink); }

/* Navigation commune. Les bannières sont rendues par les modèles de pages. */
.site-header { position: relative; z-index: 20; padding-block: 1.25rem; background: var(--color-ink); color: #fff; }
.header-inner { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; padding: 1rem 1.5rem; border: 1px solid rgb(255 255 255 / 70%); border-radius: 28px; background: var(--color-background); color: var(--color-ink); box-shadow: var(--shadow-soft); }
.site-branding { flex: 0 1 250px; min-width: 0; max-width: 100%; }
.site-title { display: inline-block; font-family: var(--font-display); font-weight: 650; font-size: clamp(1.25rem, 2.5vw, 1.75rem); line-height: 1.2; letter-spacing: -.035em; }
.site-title, .site-title:hover { color: var(--color-heritage); text-decoration: none; }
.site-description { max-width: 540px; margin: 1.5rem 0 0; color: #fff; font-size: clamp(1rem, 1.6vw, 1.125rem); line-height: 1.7; text-wrap: pretty; }
.custom-logo-link { display: inline-block; vertical-align: middle; }
.site-header .custom-logo-link { display: block; }
.custom-logo { display: block; width: auto; max-width: 100%; max-height: 90px; object-fit: contain; }
.header-eyebrow { display: flex; align-items: center; gap: .75rem; margin: 0; color: var(--color-glacier); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.header-eyebrow::before { content: ''; flex: 0 0 2rem; height: 2px; background: var(--color-action); }
.header-headline { max-width: 1000px; margin: 1.75rem 0 0; color: #fff; font-family: var(--font-display); font-size: clamp(3.25rem, 6vw, 6rem); font-weight: 650; line-height: 1.02; letter-spacing: -.045em; text-wrap: balance; }
.site-main > .page-banner { width: 100%; max-width: none; margin: 0; }
.page-banner { position: relative; isolation: isolate; display: grid; align-items: center; background: var(--color-ink); color: #fff; overflow: hidden; }
.page-banner::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgb(15 46 59 / 94%), rgb(15 46 59 / 76%) 55%, rgb(15 46 59 / 25%)); }
.page-banner-image { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.page-banner--home { min-height: clamp(500px, 45vw, 700px); }
.page-banner--home::before { opacity: .84; }
.page-banner--home .page-banner-content { padding-block: clamp(3rem, 6vw, 6rem); }
.page-banner-description { max-width: 620px; margin: 1.5rem 0 0; color: #fff; font-size: clamp(1rem, 1.6vw, 1.125rem); line-height: 1.7; }
.page-banner-actions { display: flex; flex-wrap: wrap; gap: .875rem; margin-top: 2rem; }
.page-banner--simple { min-height: 240px; }
.page-banner--simple .page-banner-content { padding-block: clamp(2rem, 4vw, 3.5rem); }
.page-banner-tagline { margin: 1rem 0 0; color: #fff; font: 650 clamp(1.75rem, 3.5vw, 3.25rem)/1.15 var(--font-display); letter-spacing: -.035em; text-wrap: balance; }
.menu { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; padding: 0; margin: 0; list-style: none; }
.menu li { position: relative; }
.menu a { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem .875rem; border-radius: var(--radius-pill); font-size: .875rem; font-weight: 700; color: inherit; text-decoration: none; }
.menu a:hover, .menu .current-menu-item > a, .menu .current_page_item > a, .menu .current-menu-ancestor > a { background: rgb(255 255 255 / 12%); color: var(--color-glacier); text-decoration: underline; text-underline-offset: .35em; }
.site-navigation > .menu > li > a:hover,
.site-navigation > .menu > .current-menu-item > a,
.site-navigation > .menu > .current_page_item > a,
.site-navigation > .menu > .current-menu-ancestor > a { background: var(--color-heritage); color: var(--color-brand); }
.menu .sub-menu, .menu .children { margin: 0; padding: .5rem 0 .5rem 1rem; list-style: none; }
.menu-toggle, .submenu-toggle { min-width: 44px; min-height: 44px; padding: .5rem .75rem; border: 1px solid currentColor; background: transparent; color: inherit; font-size: .875rem; }
.menu-toggle:hover, .submenu-toggle:hover { background: var(--color-ink); color: #fff; transform: none; }
.submenu-toggle { padding: .25rem; vertical-align: middle; border: 0; }
.submenu-toggle::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -4px; }
.submenu-toggle[aria-expanded='true']::after { transform: rotate(225deg); margin-top: 4px; }
.navigation-ready .menu > li > .sub-menu, .navigation-ready .menu > li > .children { position: absolute; top: calc(100% + .5rem); inset-inline-end: 0; width: min(280px, 80vw); max-height: 65vh; overflow: auto; padding: .75rem; border: 1px solid #526168; border-radius: 18px; background: var(--color-ink); color: #fff; box-shadow: var(--shadow-lift); }
.site-navigation:not(.navigation-ready) .sub-menu, .site-navigation:not(.navigation-ready) .children { border-radius: 12px; background: var(--color-ink); color: #fff; }
.navigation-ready .sub-menu a, .navigation-ready .children a { max-width: calc(100% - 48px); }

/* Titres, listes et cartes éditoriales. */
.page-header { max-width: var(--width-content); margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.page-header::before, .single-entry > .entry-header::before { content: ''; display: block; width: 48px; height: 3px; margin-bottom: 1.5rem; background: var(--color-action); }
.page-header h1, .entry-header h1 { color: var(--color-brand); margin-top: 0; }
.archive-description { color: var(--color-muted); }
.posts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; }
.post-card { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; padding: 1.75rem; border: 1px solid var(--color-border); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-soft); }
.post-card h2 { margin-block: 1rem; font-size: 1.875rem; }
.post-card h2 a { color: var(--color-brand); text-decoration: none; }
.post-card h2 a:hover { text-decoration: underline; }
.post-card > p { color: var(--color-muted); }
.post-card > .read-more { margin-top: auto; padding-top: .75rem; color: var(--color-ink); font-weight: 800; }
.post-thumbnail { display: block; width: 100%; margin-bottom: 1.5rem; }
.post-thumbnail img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; }
.entry-meta, .entry-footer { color: var(--color-muted); font-size: .875rem; }
.sticky { border-top: 4px solid var(--color-nature); }
.entry-header { margin-bottom: 2.5rem; }
.single-entry > .entry-header, .single-entry > .entry-footer, .comments-area, .post-navigation { width: min(var(--width-content), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.featured-image { display: block; width: min(var(--width-site), calc(100% - var(--gutter) * 2)); max-height: 650px; object-fit: cover; border-radius: var(--radius-card); margin: 0 auto 3rem; }
/* Keep wide blocks inside the container; no viewport-width scrollbar overflow. */
.entry-content { display: flow-root; }
.home .entry-content { background-color: var(--color-ink, #0f2e3b); }
.single-entry .entry-content > :where(:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright)) { max-width: min(var(--width-content), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.single-entry .entry-content > .alignwide { width: min(var(--width-site), calc(100% - var(--gutter) * 2)); max-width: none; margin-inline: auto; }
.single-entry .entry-content > .alignfull { width: 100%; max-width: none; margin-inline: 0; }
.single-entry .entry-content > * { margin-bottom: 1.5rem; }
.single-entry .entry-content > .alignleft { margin-inline-start: max(var(--gutter), calc((100% - var(--width-content)) / 2)); }
.single-entry .entry-content > .alignright { margin-inline-end: max(var(--gutter), calc((100% - var(--width-content)) / 2)); }

/* Pages : canevas libre, chaque section choisit sa largeur et ses espacements. */
body.page .site-main { padding-block: 0; }
.site-main > .page-entry { width: 100%; max-width: none; margin: 0; }
.page-entry-header { padding-block: clamp(2rem, 5vw, 4rem); }
.page-entry-header h1 { margin: 0; color: var(--color-brand); }
.page-featured-image { display: block; width: 100%; height: auto; margin: 0; }
.page-content { width: 100%; max-width: none; margin: 0; padding: 0; }
.page-content > .alignwide { max-width: var(--width-site); margin-inline: auto; }
.page-content > .alignfull { max-width: none; margin-inline: 0; }
.page-entry > .page-links { margin-block: 2rem; }
body.page .comments-area { margin-bottom: 3rem; }
.entry-footer { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }
.entry-footer a { display: inline-block; margin-bottom: .5rem; }
.navigation, .page-links { margin-top: 3rem; }
.nav-links { display: flex; flex-wrap: wrap; gap: .75rem; }
.post-navigation .nav-links { justify-content: space-between; }
.post-navigation .nav-links > div { flex: 1 1 240px; }
.post-navigation a { display: block; height: 100%; padding: 1.5rem; border: 1px solid var(--color-border); border-radius: 18px; background: #fff; }
.page-numbers, .post-page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: .5rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: #fff; color: var(--color-ink); }
.page-numbers.current, .post-page-numbers.current { background: var(--color-ink); color: #fff; }
.no-results { max-width: var(--width-content); padding: clamp(1.5rem, 5vw, 3rem); border: 1px solid var(--color-border); border-radius: var(--radius-card); background: #fff; }
.error404 .site-main > .search-form { max-width: var(--width-content); margin-block: 2rem; }

/* Commentaires et réponses. */
.comments-area { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--color-border); }
.comment-list { padding: 0; list-style: none; }
.comment-list .children { padding-inline-start: clamp(.75rem, 3vw, 2rem); list-style: none; }
.comment-body { margin-bottom: 1.5rem; padding: clamp(1rem, 3vw, 1.75rem); border: 1px solid var(--color-border); border-radius: 18px; background: #fff; }
.comment-meta { margin-bottom: 1rem; font-size: .875rem; color: var(--color-muted); }
.comment-author .avatar { vertical-align: middle; border-radius: 50%; margin-inline-end: .5rem; }
.bypostauthor > .comment-body { border-inline-start: 4px solid var(--color-nature); }
.comment-form label { display: block; margin-bottom: .5rem; }
.comment-form input:not([type='checkbox']):not([type='submit']) { width: 100%; }
.comment-form-cookies-consent label { display: inline; }
.comment-reply-title small { display: block; margin-top: .75rem; font-family: var(--font-body); font-size: .875rem; }

/* Pied de page : contact, accès pratiques et signature de la marque. */
.site-footer { padding-block: clamp(2.5rem, 5vw, 4.5rem) 1.5rem; background: #351000; color: #fff; }
.footer-contact { display: flex; align-items: center; justify-content: space-between; gap: 2rem 3rem; margin-bottom: clamp(3rem, 6vw, 5rem); padding: clamp(1.5rem, 4vw, 3rem); border-radius: 28px; background: var(--color-heritage); color: #351000; }
.footer-contact-copy { max-width: 690px; }
.footer-eyebrow { margin: 0 0 1rem; font: 800 .75rem/1.5 var(--font-body); letter-spacing: .12em; text-transform: uppercase; }
.footer-contact h2 { margin: 0; color: #351000; font: 650 clamp(2rem, 3.5vw, 3.25rem)/1.1 var(--font-display); letter-spacing: -.035em; text-wrap: balance; }
.footer-contact-copy > p:last-child { max-width: 590px; margin: 1rem 0 0; }
.footer-contact-button { flex-shrink: 0; gap: 1rem; }
.footer-contact-button span { font-size: 1.375rem; line-height: 1; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); gap: 2.5rem clamp(2rem, 5vw, 5rem); align-items: start; }
.footer-brand .footer-eyebrow { color: #e6d7cd; }
.harfang-footer-logo { width: min(300px, 100%); margin: 0 0 1.5rem; }
.harfang-footer-logo a { display: block; }
.harfang-footer-logo img { display: block; width: 100%; height: auto; border-radius: 0; }
.footer-title, .footer-title:hover { display: inline-block; max-width: 600px; font-family: var(--font-display); font-size: clamp(2.25rem, 3.5vw, 3.5rem); line-height: 1.08; letter-spacing: -.045em; font-weight: 650; color: var(--color-heritage); text-decoration: none; }
.footer-description { max-width: 360px; color: #e6d7cd; margin: 1.25rem 0 0; font-size: .9375rem; }
.footer-location { display: flex; gap: .625rem; align-items: center; margin: 1.5rem 0 0; color: var(--color-heritage); font-size: .8125rem; font-weight: 700; }
.footer-location span { font-size: 1.5rem; color: var(--color-glacier); }
.footer-nav-title { margin: 0 0 1rem; color: var(--color-heritage); font: 800 .875rem/1.5 var(--font-body); letter-spacing: .01em; }
.footer-links, .footer-legal { margin: 0; padding: 0; list-style: none; }
.footer-links { display: grid; gap: .125rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding-block: .5rem; color: #e6d7cd; font-size: .9375rem; text-decoration: none; text-underline-offset: .3em; }
.footer-links a:hover, .footer-links .current-menu-item > a, .footer-links .current_page_item > a { color: #fff; text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 2rem; margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.25rem; border-top: 1px solid #775746; color: #e6d7cd; font-size: .8125rem; }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.footer-legal a { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; color: inherit; text-decoration: none; }
.footer-legal a:hover { color: #fff; text-decoration: underline; }
.site-footer a:focus-visible { outline-color: var(--color-heritage); box-shadow: 0 0 0 4px #351000; }
.footer-contact a:focus-visible { outline-color: #351000; box-shadow: 0 0 0 4px var(--color-heritage); }

@media (max-width: 900px) {
	.header-inner { gap: 1rem; border-radius: 24px; }
	.site-branding { flex: 0 1 250px; max-width: calc(100% - 90px); }
	.site-navigation { width: 100%; }
	.site-navigation .menu { display: block; }
	.site-navigation .menu a { min-height: 48px; }
	.navigation-ready .menu > li > .sub-menu, .navigation-ready .menu > li > .children { position: static; width: 100%; max-height: none; border: 0; border-inline-start: 2px solid #526168; border-radius: 0; box-shadow: none; }
	.footer-contact { align-items: start; flex-direction: column; }
	.footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
	.site-header { padding-block: 1rem; }
	.page-banner--home { min-height: 460px; }
	.page-banner--simple { min-height: 190px; }
	.page-banner-image { object-position: 62% center; }
	.page-banner::before { background: linear-gradient(90deg, rgb(15 46 59 / 90%), rgb(15 46 59 / 66%)); }
	.header-headline { font-size: clamp(2.5rem, 10vw, 3.75rem); }
	.header-eyebrow { font-size: .6875rem; letter-spacing: .1em; }
	.header-inner { padding: 1rem; }
	.footer-inner { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
	.footer-contact { border-radius: 20px; }
	.footer-contact-button { width: 100%; }
	.footer-bottom { align-items: start; flex-direction: column; }
	.post-card { padding: 1.5rem; }
	.single-entry .entry-content > .alignleft, .single-entry .entry-content > .alignright { max-width: calc(100% - var(--gutter) * 2); margin-inline: auto; }
}
@media print {
	.site-header, .site-footer, .comment-respond, .navigation, .skip-link { display: none; }
	body { background: #fff; color: #000; }
	.site-main { width: 100%; padding: 0; }
	.post-card, .comment-body { box-shadow: none; break-inside: avoid; }
}
