/*
Theme Name: Hollande 2027 (flan)
Template: twentytwentyfive
Description: Thème enfant parodique. Affiche de campagne caramel, crème et tricolore, construite autour de la mascotte fournie.
Version: 1.1.0
Text Domain: hollande-flan
*/

:root {
	--hf-cream: #fff4dc;
	--hf-custard: #f6c453;
	--hf-peach: #ffe3d6;
	--hf-caramel: #9a4313;
	--hf-ink: #152043;
	--hf-bleu: #1d3aa8;
	--hf-rouge: #d7262e;
	--hf-white: #fffdf8;
	--hf-radius: 22px;
	--hf-display: var(--wp--preset--font-family--display);
	--hf-wrap: min(1180px, 100% - 2.5rem);
	--hf-prose: min(720px, 100% - 2.5rem);
	--hf-sec: clamp(4rem, 9vw, 7rem);
}

html { scroll-behavior: smooth; }
body { overflow-x: clip; }
img { height: auto; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.wp-site-blocks { padding: 0; }

.hf-wrap { width: var(--hf-wrap); margin-inline: auto !important; max-width: none !important; }
.hf-prose { width: var(--hf-prose); margin-inline: auto !important; max-width: none !important; }
.hf-tricolore { height: 8px; background: linear-gradient(90deg, var(--hf-bleu) 0 33.33%, var(--hf-white) 33.33% 66.66%, var(--hf-rouge) 66.66%); }

/* Boutons : ombre « affiche » */
.wp-block-button__link, .hf-btn {
	box-shadow: 4px 4px 0 var(--hf-ink);
	text-decoration: none;
	transition: translate .15s ease, box-shadow .15s ease;
}
.wp-block-button__link:hover, .hf-btn:hover { translate: -2px -2px; box-shadow: 6px 6px 0 var(--hf-ink); }
.wp-block-button.is-style-hf-alt .wp-block-button__link { background: var(--hf-white); color: var(--hf-ink); }
:focus-visible { outline: 3px solid var(--hf-bleu); outline-offset: 3px; }

/* ===== En-tête ===== */
/* Le bloc template-part enveloppe l'en-tête : c'est lui qui doit coller. */
.wp-site-blocks > :has(> .hf-top) { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-site-blocks > :has(> .hf-top) { top: var(--wp-admin--admin-bar--height, 32px); }
.hf-top { position: relative; background: var(--hf-cream); /* pas de backdrop-filter : il piégerait l'overlay du menu mobile */ border-bottom: 2px solid var(--hf-ink); }
.hf-top-in { padding-block: .5rem; gap: 1rem; }
.hf-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--hf-ink); font-family: var(--hf-display); font-size: 1.6rem; line-height: 1; white-space: nowrap; }
.hf-brand img { width: 54px; height: 54px; margin-block: -6px; transition: rotate .3s ease; }
.hf-brand:hover img { rotate: -8deg; }
.hf-brand span { color: var(--hf-rouge); }
.hf-nav { font-weight: 600; gap: 1.4rem; }
.hf-nav a { text-decoration: none; color: var(--hf-ink); }
.hf-nav .wp-block-navigation-item__content:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.hf-nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--hf-cream); padding: 2rem; }
.hf-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-family: var(--hf-display); font-size: 2.2rem; text-transform: uppercase; }
.hf-top .wp-block-buttons { flex-shrink: 0; }
@media (max-width: 600px) {
	.hf-brand { font-size: 1.3rem; }
	.hf-top .hf-cta { display: none; }
}

/* ===== Sections génériques ===== */
.hf-sec { padding-block: var(--hf-sec); margin: 0 !important; }
.hf-sec.is-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.hf-intro { font-size: 1.15rem; max-width: 56ch; }
.hf-bg-custard { background: var(--hf-custard); }
.hf-bg-bleu { background: var(--hf-bleu); color: var(--hf-white); }
.hf-bg-bleu h2, .hf-bg-bleu h3 { color: var(--hf-custard); }
.hf-bg-caramel { background: var(--hf-caramel); color: var(--hf-cream); }
.hf-bg-caramel h2 { color: var(--hf-cream); }
.hf-bg-ink { background: var(--hf-ink); color: var(--hf-cream); }

/* ===== Hero d'accueil ===== */
.hf-hero { position: relative; overflow: clip; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); background: radial-gradient(120% 90% at 70% 40%, var(--hf-custard) 0 35%, transparent 70%), var(--hf-cream); }
.hf-hero .wp-block-columns { align-items: center !important; gap: 2rem; margin: 0; }
.hf-hero h1 { font-size: clamp(3.2rem, 6.6vw, 7.4rem); line-height: .88; margin: 0; overflow-wrap: normal; word-break: keep-all; hyphens: none; }
.hf-hero h1 em { font-style: normal; color: var(--hf-caramel); display: block; }
.hf-hero h1 strong { font-weight: 400; color: var(--hf-rouge); display: block; }
.hf-hero .hf-lead { font-size: clamp(1.15rem, 1.8vw, 1.4rem); max-width: 34ch; margin-block: 1.4rem 2rem; }
.hf-hero-img { position: relative; margin: 0 auto !important; width: min(100%, 620px); }
.hf-hero-img img { width: 100%; filter: drop-shadow(0 30px 30px rgb(94 34 8 / .35)); animation: hf-flotte 6s ease-in-out infinite; }
.hf-stamp { position: absolute; right: 4%; top: 4%; width: clamp(110px, 14vw, 150px); aspect-ratio: 1; border-radius: 50%; background: var(--hf-rouge); color: var(--hf-white); display: grid; place-content: center; text-align: center; font-family: var(--hf-display); font-size: clamp(1.1rem, 1.8vw, 1.45rem); line-height: 1; text-transform: uppercase; rotate: 12deg; border: 3px solid var(--hf-ink); box-shadow: 4px 4px 0 var(--hf-ink); margin: 0; }
.hf-stamp small { display: block; font-family: var(--wp--preset--font-family--body); text-transform: none; font-weight: 600; font-size: .72rem; margin-top: .3rem; }
@keyframes hf-flotte { 50% { translate: 0 -12px; rotate: -1.5deg; } }
@media (max-width: 781px) {
	.hf-hero h1 { font-size: clamp(3.2rem, 15vw, 5rem); }
	.hf-hero { text-align: center; }
	.hf-hero .wp-block-columns { flex-direction: column-reverse; gap: 0; }
	.hf-hero .hf-lead { margin-inline: auto; }
	.hf-hero .wp-block-buttons { justify-content: center; }
	.hf-hero-img { width: min(92%, 420px); margin-bottom: -14% !important; }
}

/* ===== Bandeau défilant ===== */
.hf-ticker { background: var(--hf-ink); color: var(--hf-custard); font-family: var(--hf-display); font-size: clamp(1.4rem, 3vw, 2.2rem); text-transform: uppercase; overflow: hidden; }
.hf-ticker .hf-track { display: flex; gap: 2.2rem; width: max-content; padding-block: .7rem; animation: hf-defile 28s linear infinite; }
.hf-ticker .hf-track span { display: flex; align-items: center; gap: 2.2rem; white-space: nowrap; }
.hf-ticker img { width: 44px; height: 44px; }
@keyframes hf-defile { to { translate: -50% 0; } }

/* ===== Cartes ===== */
.hf-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1.5rem; }
.hf-card { position: relative; background: var(--hf-white); color: var(--hf-ink); border: 2px solid var(--hf-ink); border-radius: var(--hf-radius); padding: 1.8rem 1.6rem 1.6rem; box-shadow: 6px 6px 0 var(--hf-ink); overflow: hidden; margin: 0 !important; }
.hf-card > * { position: relative; z-index: 1; }
.hf-card h3 { margin: .4rem 0 .6rem; max-width: 14ch; }
.hf-card p { margin: 0; max-width: 36ch; }
.hf-card .hf-n { font-family: var(--hf-display); font-size: 3.2rem; line-height: 1; color: var(--hf-rouge); margin: 0; }
.hf-grid > .hf-card:nth-child(3n+2) { background: var(--hf-custard); }
.hf-grid > .hf-card:nth-child(3n) { background: var(--hf-peach); }
.hf-card .hf-peek { position: absolute !important; z-index: 0; width: 118px; right: -22px; bottom: -26px; margin: 0; rotate: -14deg; transition: rotate .3s ease, translate .3s ease; }
.hf-card:hover .hf-peek { rotate: -4deg; translate: -6px -8px; }
.hf-grid > .hf-card:nth-child(even) .hf-peek { rotate: 12deg; }
.hf-grid > .hf-card:nth-child(even):hover .hf-peek { rotate: 2deg; }
.hf-card.has-peek { padding-bottom: 4.5rem; }
.hf-card .wp-block-buttons { margin-top: 1.2rem; }

/* ===== Moi président ===== */
.hf-moi .wp-block-columns { align-items: center !important; gap: 3rem; }
.hf-moi ol, .hf-moi ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.hf-moi li { font-size: clamp(1.1rem, 1.7vw, 1.3rem); padding: 1rem 1.2rem; border-radius: 16px; background: rgb(255 255 255 / .08); border: 1.5px solid rgb(255 255 255 / .25); }
.hf-moi li strong { font-family: var(--hf-display); font-weight: 400; text-transform: uppercase; color: var(--hf-custard); margin-right: .35rem; }
.hf-moi .hf-big { rotate: -6deg; max-width: 460px; margin-inline: auto; }
.hf-moi .hf-big img { filter: drop-shadow(0 24px 30px rgb(0 0 0 / .35)); }

/* ===== Manifeste ===== */
.hf-manif { text-align: center; }
.hf-manif .hf-quote { margin: 0 auto; max-width: 20ch; font-family: var(--hf-display); text-transform: uppercase; font-size: clamp(2.4rem, 6.5vw, 5.4rem); line-height: .98; }
.hf-manif .hf-quote em { font-style: normal; color: var(--hf-custard); }
.hf-manif .hf-cite { margin-top: 1.5rem; font-weight: 600; opacity: .85; }
.hf-duo { display: flex !important; justify-content: center; gap: clamp(1rem, 6vw, 5rem); margin-bottom: 2rem !important; }
.hf-duo figure { width: clamp(90px, 14vw, 150px); margin: 0; }
.hf-duo figure:first-child img { scale: -1 1; rotate: 8deg; }
.hf-duo figure:last-child img { rotate: 8deg; }

/* ===== Encart CTA ===== */
.hf-box { display: grid !important; grid-template-columns: auto 1fr; gap: 2.5rem; align-items: center; background: var(--hf-white); border: 3px solid var(--hf-ink); border-radius: 32px; padding: clamp(1.8rem, 4vw, 3rem); box-shadow: 10px 10px 0 var(--hf-rouge); }
.hf-box > figure { width: clamp(160px, 22vw, 260px); margin: 0; }
.hf-box h2 { margin: 0; }
@media (max-width: 700px) {
	.hf-box { grid-template-columns: 1fr; text-align: center; }
	.hf-box > figure { margin-inline: auto; }
	.hf-box .wp-block-buttons, .hf-box .hf-share { justify-content: center; }
}
.hf-share { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.hf-share a { display: inline-block; padding: .55rem 1rem; border-radius: 999px; border: 2px solid var(--hf-ink); background: var(--hf-cream); color: var(--hf-ink); font-weight: 700; text-decoration: none; }
.hf-share a:hover { background: var(--hf-custard); }

/* ===== En-tête des pages intérieures ===== */
.hf-pagehero { position: relative; overflow: clip; background: radial-gradient(90% 120% at 85% 50%, var(--hf-custard) 0 30%, transparent 65%), var(--hf-cream); border-bottom: 2px solid var(--hf-ink); padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.hf-pagehero .hf-wrap { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem; }
.hf-pagehero h1 { margin: 0; max-width: 16ch; }
.hf-pagehero .hf-eyeimg { width: clamp(120px, 20vw, 240px); rotate: 6deg; filter: drop-shadow(0 18px 20px rgb(94 34 8 / .3)); }
@media (max-width: 600px) { .hf-pagehero .hf-wrap { grid-template-columns: 1fr; } .hf-pagehero .hf-eyeimg { width: 130px; justify-self: end; margin-top: -1rem; } }

/* ===== Texte long (articles, pages légales) ===== */
.hf-article { padding-block: clamp(2.5rem, 5vw, 4rem) var(--hf-sec); }
.hf-article .wp-block-post-content, .hf-prose { font-size: 1.125rem; line-height: 1.7; }
.hf-article .wp-block-post-content > *, .hf-prose > * { max-width: 68ch; }
.hf-article h2, .hf-prose h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-top: 2.5rem; }
.hf-article h3, .hf-prose h3 { margin-top: 2rem; }
.hf-meta > * { margin: 0 !important; }
.hf-meta { align-items: baseline; font-weight: 600; color: var(--hf-caramel); display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.hf-meta a { color: inherit; }
.hf-single-title { margin-block: .5rem 1.5rem; }
.hf-single-img { background: var(--hf-custard); border: 2px solid var(--hf-ink); border-radius: var(--hf-radius); box-shadow: 6px 6px 0 var(--hf-ink); overflow: hidden; margin-bottom: 2rem; }
.hf-single-img img { width: min(70%, 420px); margin-inline: auto; display: block; padding-block: 1.5rem; }
.hf-article .wp-block-post-content blockquote { border-left: 6px solid var(--hf-rouge); margin-inline: 0; padding: .5rem 0 .5rem 1.4rem; font-size: 1.3rem; font-weight: 600; }

/* ===== Liste d'articles ===== */
.hf-cards { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
.hf-postcard { display: flex !important; flex-direction: column; height: 100%; padding: 0 !important; }
.hf-postcard .wp-block-post-featured-image { background: var(--hf-custard); margin: 0; border-bottom: 2px solid var(--hf-ink); aspect-ratio: 16 / 10; display: grid; place-items: center; }
.hf-postcard .wp-block-post-featured-image img { width: 62% !important; height: auto !important; object-fit: contain; transition: rotate .3s ease, scale .3s ease; }
.hf-postcard:hover .wp-block-post-featured-image img { rotate: -4deg; scale: 1.05; }
.hf-postcard .hf-pc-body { padding: 1.3rem 1.4rem 1.5rem; display: grid; gap: .6rem; }
.hf-postcard .wp-block-post-title { font-size: 1.6rem; margin: 0; }
.hf-postcard .wp-block-post-title a { color: var(--hf-ink); text-decoration: none; }
.hf-postcard .wp-block-post-title a:hover { color: var(--hf-rouge); }
.hf-postcard .wp-block-post-date { font-weight: 600; color: var(--hf-caramel); font-size: .95rem; }
.hf-postcard .wp-block-post-excerpt__excerpt { margin: 0; }
.hf-postcard .wp-block-post-excerpt__more-text { display: none; }
.wp-block-query-pagination { margin-top: 2.5rem; font-weight: 700; gap: 1rem; }

/* ===== Formulaire de contact ===== */
.hf-form { display: grid; gap: .4rem; margin-block: 1.5rem; scroll-margin-top: 100px; }
.hf-form p { margin: 0 0 .8rem; }
.hf-form label { font-weight: 700; display: block; margin-bottom: .4rem; }
.hf-form label span { font-weight: 400; opacity: .7; }
.hf-form input, .hf-form textarea { font: inherit; width: 100%; padding: .85rem 1.1rem; border-radius: 16px; border: 2px solid var(--hf-ink); background: var(--hf-white); color: var(--hf-ink); }
.hf-form input:focus-visible, .hf-form textarea:focus-visible { outline: 3px solid var(--hf-bleu); outline-offset: 2px; }
.hf-submit { font: inherit; font-weight: 800; cursor: pointer; background: var(--hf-rouge); color: var(--hf-white); border: 2px solid var(--hf-ink); border-radius: 999px; padding: .8rem 1.6rem; }
.hf-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hf-notice { padding: 1rem 1.2rem; border-radius: 16px; border: 2px solid var(--hf-ink); font-weight: 700; }
.hf-notice.is-ok { background: var(--hf-custard); }
.hf-notice.is-err { background: var(--hf-peach); }

/* ===== Pied de page ===== */
.hf-foot { background: var(--hf-ink); color: var(--hf-cream); padding-block: 3.5rem 2rem; }
.hf-foot a { color: var(--hf-cream); }
.hf-foot .hf-brand { color: var(--hf-cream); font-size: 2rem; }
.hf-foot .hf-brand img { width: 96px; height: 96px; }
.hf-foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.hf-foot h2 { font-size: 1.3rem; color: var(--hf-custard); margin: 0 0 .8rem; }
.hf-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.hf-foot ul a { text-decoration: none; }
.hf-foot ul a:hover { text-decoration: underline; }
.hf-foot .hf-legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgb(255 244 220 / .2); font-size: .92rem; opacity: .85; }
@media (max-width: 760px) { .hf-foot-cols { grid-template-columns: 1fr 1fr; } .hf-foot-cols > :first-child { grid-column: 1 / -1; } }

/* ===== 404 ===== */
.hf-404 { text-align: center; }
.hf-404 img { width: min(70%, 360px); margin: 0 auto 1rem; animation: hf-flotte 6s ease-in-out infinite; }

/* ===== Apparitions au scroll : décoratif, sans repli ===== */
@media (prefers-reduced-motion: no-preference) {
	@supports ((animation-timeline: view()) and (animation-range: entry)) {
		@keyframes hf-monte { from { opacity: 0; translate: 0 40px; } }
		.hf-reveal, .hf-grid > .hf-card, .hf-moi li, .hf-cards > li {
			animation: hf-monte auto ease-out backwards;
			animation-timeline: view();
			animation-range: entry 0% entry 60%;
		}
	}
}
@media (prefers-reduced-motion: reduce) {
	.hf-hero-img img, .hf-ticker .hf-track, .hf-404 img { animation: none; }
}

/* ===== Version sans images (2026-11-28) : typographie seule ===== */
.hf-hero { padding-block: clamp(3.5rem, 9vw, 7.5rem); }
.hf-hero h1 { font-size: clamp(3.6rem, 12vw, 11rem); line-height: .86; }
.hf-hero h1 em, .hf-hero h1 strong { display: inline; }
.hf-hero h1 em::before { content: " "; }
.hf-hero h1 strong::before { content: " "; }
.hf-hero .hf-lead { max-width: 42ch; font-size: clamp(1.2rem, 2vw, 1.5rem); }
.hf-ticker b { color: var(--hf-rouge); font-weight: 400; }
.hf-brand { gap: 0; }
.hf-brand span { margin-left: .3em; }
.hf-box { grid-template-columns: 1fr; text-align: left; }
.hf-postcard .hf-pc-body { padding: 1.6rem 1.5rem 1.7rem; }
.hf-moi .hf-prose { width: min(860px, 100%); }
@media (max-width: 781px) {
	.hf-hero { text-align: left; }
	.hf-hero .wp-block-buttons { justify-content: flex-start; }
	.hf-hero h1 { font-size: clamp(2.8rem, 15vw, 5.5rem); }
}
