/*
Theme Name: Paesi d'Aiacciu 2050
Theme URI: https://www.paesidaiacciu2050.corsica/
Author: Eliott & Markus
Description: Thème du projet de territoire Paesi d'Aiacciu 2050 (CAPA). Version 1 : reprise de la page d'accueil de la plateforme actuelle.
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: paesi
*/

:root {
	--encre: #0e2231; /* = Encre de la charte (un seul bleu nuit) */
	--creme: #fcf1da;
	--texte: #333333;
	--gris-fond: #f6f6f6;
	--bordure: #e3e3e3;
	--lien-hover: #0070ff;
	--font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-title: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
	/* Charte validée (Figma) */
	--font-brand: "roc-grotesk", "Roc Grotesk", "Host Grotesk", system-ui, sans-serif;
	--font-brand-text: "Host Grotesk", system-ui, sans-serif;
	--b-encre: #0e2231;
	--b-creme: #fcf1da;
	--b-corail: #ec7258;
	--b-lumiere: #ffdfa3;
	--b-maquis: #7c9869;
	--b-mer: #429696;
	/* Corail accessible pour les boutons (texte/icône blancs, RGAA) */
	--btn-icon: #c64a32;          /* = début de la pastille : carré et texte assortis (flèche blanche 4.7:1) */
	--btn-label-from: #c64a32;    /* texte blanc 4.7:1 */
	--btn-label-to: #b0402b;      /* texte blanc 5.6:1, moins brun */
	/* Échelle de transparences (Encre sur clair, Crème sur foncé) */
	--ink-text: rgba(14, 34, 49, .74);
	--ink-muted: rgba(14, 34, 49, .62);
	--ink-line: rgba(14, 34, 49, .08);
	--ink-fill: rgba(14, 34, 49, .06);
	--cream-text: rgba(252, 241, 218, .86);
	--cream-muted: rgba(252, 241, 218, .6);
	--cream-fill: rgba(252, 241, 218, .14);
	--cream-line: rgba(252, 241, 218, .12);
	--shadow-ink: 0 8px 24px rgba(6, 16, 24, .32);
	--container: 1170px;
	/* Grille commune (en-tête, sections, pied de page) */
	--gutter: clamp(20px, 4vw, 56px);
	--section-y: clamp(88px, 12vh, 144px); /* plus d'air entre les sections */
	/* Hauteur de l'en-tête au repos (réservée en haut des pages intérieures) */
	--header-h: 121px;
	--header-h-compact: 76px;
}

*,
*::before,
*::after { box-sizing: border-box; }

/* Fond du « canevas » (iOS Safari 26 : visible sous les barres flottantes, au-delà de la fin du document et
   pendant le rebond) : Encre, comme le pied de page en bas et le hero de l'accueil en haut. Sans lui, le fond
   blanc du <body> se propageait au canevas et une bande blanche apparaissait sous le pied de page. */
html { -webkit-text-size-adjust: 100%; background-color: var(--b-encre); }
/* Pages intérieures (en-tête Crème) : bande Crème au-dessus du document, visible seulement au rebond du haut */
body:not(.home)::before {
	content: "";
	position: absolute;
	top: -100vh;
	left: 0;
	right: 0;
	height: 100vh;
	background: var(--b-creme);
	pointer-events: none;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.428571;
	color: var(--texte);
	background: #fff;
}

img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--btn-label-from); color: #fff; }
html { scrollbar-color: rgba(14, 34, 49, .35) var(--b-creme); caret-color: var(--btn-label-from); }
.sec-title, .hero__title, .a-card__title, .footer__statement, .demarche__sub { text-wrap: balance; }
.sec-text, .footer__text, .a-card__excerpt { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--b-encre); outline-offset: 3px; border-radius: 4px; }
.hero :focus-visible, .site-header--overlay:not(.is-scrolled) :focus-visible, .site-footer :focus-visible, .main-nav.is-open :focus-visible, .a-card :focus-visible { outline-color: var(--b-creme); }

a { color: var(--encre); text-decoration: none; }
a:hover, a:focus { color: var(--lien-hover); }

h1, h2, h3, h4 {
	font-family: var(--font-title);
	font-weight: 400;
	line-height: 1.1;
	color: var(--encre);
	margin: 0 0 15px;
}

p { margin: 0 0 10px; }

/* Lignes découpées par SplitText (animations) */
.split-line { padding-bottom: .06em; margin-bottom: -.06em; }
/* Une ligne découpée ne doit jamais se rediviser : sur iOS 18 (WebKit), le `text-wrap: balance` hérité des titres
   s'appliquait à chaque ligne et la comprimait en colonne étroite pendant l'apparition. */
.split-line, .split-line-mask { white-space: nowrap; text-wrap: nowrap; }
/* Safari ≤ 18 (sans `text-wrap: pretty`) : avec `text-wrap: balance`, SplitText y mesure un mot par ligne
   (titres en colonne étroite pendant l'apparition). Ces navigateurs gardent le retour à la ligne normal, sans
   équilibrage : découpe juste et aucun saut en fin d'animation. iOS 26, Chrome : équilibrage conservé. */
@supports not (text-wrap: pretty) {
	* { text-wrap: wrap !important; }
	.split-line, .split-line-mask { text-wrap: nowrap !important; }
}

/* Conteneur commun : même bord gauche pour logo, hero, sections et pied de page */
.wrap {
	width: 100%;
	padding: 0 var(--gutter); /* pleine largeur, même marge que l'en-tête et le pied de page */
}

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 15px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	padding: 8px 12px;
	background: var(--b-creme);
	color: var(--b-encre);
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- En-tête ---------- */
.site-header {
	background: #fff;
	height: var(--header-h);
	display: flex;
	align-items: center;
	/* Fixe sur toutes les pages : masqué au défilement vers le bas, réaffiché
	   en version compacte au défilement vers le haut (voir main.js). */
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	transition: transform .35s cubic-bezier(.4, 0, .2, 1), height .35s cubic-bezier(.4, 0, .2, 1), background-color .3s ease, box-shadow .3s ease;
}
/* Pages intérieures : réserve la hauteur de l'en-tête au repos */
body:not(.home) { padding-top: var(--header-h); }
.admin-bar .site-header { top: 32px; }
.site-header.is-hidden { transform: translateY(-100%); }
.admin-bar .site-header.is-hidden { transform: translateY(calc(-100% - 32px)); }
.site-header__inner {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 32px;
	padding: 0 var(--gutter);
}
.site-header__logo { min-width: 0; }
/* object-fit : si la place manque, le logo rétrécit sans se déformer (le bouton menu, lui, ne rétrécit jamais) */
.site-header__logo img { width: auto; height: 88px; object-fit: contain; object-position: 0 50%; transition: height .35s cubic-bezier(.4, 0, .2, 1); }
.site-header .cta__icon { transition: transform .3s cubic-bezier(.4, 0, .2, 1), padding .35s ease, border-radius .35s ease, width .35s ease, height .35s ease; }
.site-header .cta__label { transition: background-position .3s ease, padding .35s ease, font-size .35s ease, height .35s ease; }
.site-header .nav-toggle { transition: width .35s ease, height .35s ease, border-radius .35s ease, background-color .3s ease, color .3s ease; }
.site-header .nav-toggle__bars span { transition: top .3s ease, left .35s ease, right .35s ease, transform .3s ease; }

/* En-tête compact (après défilement) */
.site-header.is-scrolled { height: var(--header-h-compact); }
.site-header.is-scrolled .site-header__logo img { height: 56px; }
.site-header.is-scrolled .cta--sm .cta__icon { padding: 10px; border-radius: 13px; }
.site-header.is-scrolled .cta--sm .cta__label { padding: 10px 18px; font-size: 15px; }
body:not(.home) .site-header.is-scrolled { box-shadow: 0 1px 0 var(--ink-line); }

.main-nav { margin-left: auto; }
.main-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0 8px;
}
.main-nav a {
	display: block;
	padding: 20px 8px;
	font-family: var(--font-brand);
	font-size: 16px;
	line-height: 1.25;
	color: var(--texte);
}
.main-nav a:hover { color: var(--encre); }

/* Survol animé du menu (nav-hover.js) */
.main-nav > ul { position: relative; }
.nl { position: relative; display: inline-block; overflow: hidden; vertical-align: top; }
.nl-row { display: block; white-space: pre; }
.nl-row--clone { position: absolute; inset: 0; }
.nl-char { display: inline-block; }
.nav-dot {
	position: absolute;
	left: 0;
	bottom: 12px;
	width: 0;
	height: 2px;
	border-radius: 2px;
	background: var(--b-corail);
	pointer-events: none;
}
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { font-weight: 600; }

.main-nav__extra { display: none; }

/* Bouton menu : carré arrondi de la charte, deux barres qui deviennent une croix */
.nav-toggle {
	display: none;
	flex-shrink: 0;
	position: relative;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	border-radius: 16px;
	background: var(--ink-fill);
	color: var(--b-encre);
	cursor: pointer;
	transition: background-color .3s ease, color .3s ease;
}
.nav-toggle__bars { position: absolute; inset: 0; display: block; }
.nav-toggle__bars span {
	position: absolute;
	left: 15px;
	right: 15px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform .4s cubic-bezier(.7, 0, .2, 1), top .4s cubic-bezier(.7, 0, .2, 1);
}
.nav-toggle__bars span:first-child { top: 21px; }
.nav-toggle__bars span:last-child { top: 29px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:first-child { top: 25px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:last-child { top: 25px; transform: rotate(-45deg); }

/* ---------- En-tête transparent (accueil) ---------- */
.site-header__logo .logo-light { display: none; }
.site-header--overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	background: transparent;
}
.admin-bar .site-header--overlay { top: 32px; }
.site-header--overlay:not(.is-scrolled) .logo-dark { display: none; }
.site-header--overlay:not(.is-scrolled) .logo-light { display: block; }
.site-header--overlay:not(.is-scrolled) .main-nav a { color: var(--b-creme); }
.site-header--overlay:not(.is-scrolled) .main-nav a:hover { color: #fff; }
.site-header--overlay:not(.is-scrolled) .nav-toggle { color: var(--b-creme); background: var(--cream-fill); }
/* Accueil, en-tête transparent au repos : 142 px comme dans le Figma (logo à 27 px du haut) */
@media (min-width: 768px) {
	.site-header--overlay:not(.is-scrolled) { height: 142px; }
}
.site-header--overlay.is-scrolled {
	background: var(--b-creme);
	box-shadow: 0 1px 0 var(--ink-line);
}

/* ---------- Bandeau image ---------- */
.hero {
	background: var(--b-encre);
	overflow: hidden;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: flex-end;
	padding: 140px 0 25svh; /* Figma : bloc de texte posé à ~225 px du bas sur un écran de 900 px */
	text-align: left;
	color: #fff;
}
.hero { position: relative; isolation: isolate; }
/* ---------- Écran d'ouverture du site (Figma 35:613) ----------
   Au-dessus de tout (en-tête compris). Affiché seulement si html.paesi-intro (script en <head> de l'accueil) :
   jamais sans JavaScript, jamais en mouvement réduit, une fois par session. Le défilement est bloqué pendant.
   --open : 0 = hublot (pilule de la charte), 1 = plein écran, identique à la photo du hero (passage sans raccord). */
.site-intro {
	--open: 0;
	--ring: 10px;
	--pill-x: 39%;
	--pill-y: 19%;
	display: none;
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: var(--b-encre);
	overflow: hidden;
	cursor: pointer;
}
html.paesi-intro .site-intro { display: block; }
html.paesi-intro,
html.paesi-intro body { overflow: hidden; overscroll-behavior: none; }
html.paesi-intro { scrollbar-gutter: stable; }
.site-intro__photo {
	position: absolute;
	inset: 0;
	overflow: hidden;
	-webkit-clip-path: inset(
		calc((1 - var(--open)) * var(--pill-y)) calc((1 - var(--open)) * var(--pill-x))
		round calc((1 - var(--open)) * 999px)
	);
	clip-path: inset(
		calc((1 - var(--open)) * var(--pill-y)) calc((1 - var(--open)) * var(--pill-x))
		round calc((1 - var(--open)) * 999px)
	);
	/* iOS (WebKit) : l'image zoomée (GSAP scale) passe sur son propre calque et la découpe arrondie du parent
	   pouvait ne plus s'appliquer en cours d'animation (coins carrés, scintillement). Le parent devient lui aussi
	   un calque isolé : la découpe s'applique à tout son contenu. */
	isolation: isolate;
	transform: translateZ(0);
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	will-change: clip-path;
}
.site-intro__img {
	position: absolute;
	inset: -6%; /* même cadrage que .hero__bg-img */
	transform-origin: 50% 60%;
	transform: scale(1.45);
}
.site-intro__ring {
	position: absolute;
	/* 10 px autour du hublot, puis collé aux bords à l'ouverture */
	top: calc((1 - var(--open)) * (var(--pill-y) - var(--ring)));
	bottom: calc((1 - var(--open)) * (var(--pill-y) - var(--ring)));
	left: calc((1 - var(--open)) * (var(--pill-x) - var(--ring)));
	right: calc((1 - var(--open)) * (var(--pill-x) - var(--ring)));
	border-radius: calc((1 - var(--open)) * 999px);
	padding: 10px;
	background: linear-gradient(180deg, var(--b-lumiere) 0%, var(--b-corail) 38%, var(--b-corail) 60%, var(--b-maquis) 86%, var(--b-mer) 100%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	pointer-events: none;
	transform-origin: 50% 50%;
	box-shadow: 0 0 40px rgba(255, 223, 163, .35); /* halo Lumière pendant l'envol */
}
.site-intro__text {
	position: absolute;
	top: 50%;
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: clamp(28px, 3.6vw, 60px); /* 52 px à 1440 */
	line-height: 1;
	letter-spacing: -.01em;
	color: var(--b-creme);
	white-space: nowrap;
	pointer-events: none;
	/* Centrage vertical sans la propriété CSS `translate` : GSAP anime x/y sur ces textes et WebKit (iOS)
	   perd alors ce `translate` (texte décalé / coupé). line-height 1 → hauteur = 1em. */
	margin-top: -.5em;
}
/* État de départ = premier état du timeline GSAP : sinon anneau et textes s'affichent pleinement
   le temps que les scripts (différés) arrivent, puis disparaissent d'un coup avant d'entrer. */
.site-intro__ring,
.site-intro__text { opacity: 0; }
.site-intro__text--l { right: calc(100% - var(--pill-x) + 31px); }
.site-intro__text--r { left: calc(100% - var(--pill-x) + 40px); }
@media (max-width: 767px) {
	.site-intro { --pill-x: 22%; --pill-y: 24%; }
	/* Centrage horizontal par left/right + text-align (aucun `translate`, voir plus haut). */
	.site-intro__text { top: auto; margin-top: 0; left: 0; right: 0; text-align: center; font-size: 30px; }
	.site-intro__text--l { bottom: calc(100% - var(--pill-y) + 22px); }
	.site-intro__text--r { top: calc(100% - var(--pill-y) + 22px); }
}
.hero__bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
}
.hero__bg-img {
	position: absolute;
	inset: -6%; /* marge pour les déplacements sans laisser de bord visible */
	transform-origin: 50% 60%;
	transform: scale(1.06); /* = gsap.set d'animations.js : pas de saut de zoom à l'arrivée des scripts */
}
/* Avant animations.js (html.paesi-anim, posée en <head> de l'accueil) : éléments de l'apparition du hero masqués,
   sinon ils s'affichent puis disparaissent à l'arrivée des scripts différés (scintillement). */
html.paesi-anim :is(.site-header__logo, .site-header__cta, .nav-toggle, .main-nav > ul, .hero__meta > *, .hero__question, .hero__lead p, .hero__actions, .hero__corner, .hero__scroll-label) { visibility: hidden; }
/* Photo du hero et de l'écran d'ouverture : <picture> WebP (front-page.php), cadrée comme l'ancienne image de fond. */
.hero__bg-img img,
.site-intro__img img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 50% 50%;
}
.hero__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	/* Voiles du Figma : coin bas-droit assombri (texte de droite), Encre en haut et en bas, bord gauche. */
	background:
		linear-gradient(147.86deg, rgba(0, 0, 0, 0) 25.07%, rgba(0, 0, 0, .4) 71.89%),
		linear-gradient(180deg, rgba(14, 34, 49, .45) 0%, rgba(14, 34, 49, .06) 30%, rgba(14, 34, 49, .22) 52%, rgba(14, 34, 49, .78) 100%),
		linear-gradient(90deg, rgba(14, 34, 49, .4) 0%, rgba(14, 34, 49, 0) 55%);
	pointer-events: none;
}
@media (max-width: 767px) {
	/* Mobile : le texte occupe les deux tiers bas de l'écran. */
	.hero__bg::after { background: linear-gradient(180deg, rgba(14, 34, 49, .45) 0%, rgba(14, 34, 49, .12) 18%, rgba(14, 34, 49, .55) 38%, rgba(14, 34, 49, .82) 62%, rgba(14, 34, 49, .9) 100%); }
}

/* Encoche bas-droite du hero + bouton « défiler » (même bouton icône que le CTA) */
.hero__corner {
	position: absolute;
	right: 0;
	bottom: 0;
	padding: 12px;
	background: var(--b-creme); /* = fond de la section suivante */
	border-top-left-radius: 32px;
}
.hero__corner::before,
.hero__corner::after {
	content: "";
	position: absolute;
	width: 28px;
	height: 28px;
	background: radial-gradient(circle at 0 0, transparent 27.5px, var(--b-creme) 28px);
}
.hero__corner::before { right: 0; top: -28px; }
.hero__corner::after { left: -28px; bottom: 0; }
.hero__scroll {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	border-radius: 20px;
	background: var(--btn-icon);
	overflow: hidden;
}
.hero__scroll img { width: 20px; height: 20px; transform: rotate(135deg); }
/* Effets de survol réservés aux souris : sur iOS, :hover reste collé après un toucher. */
.hero__scroll:focus-visible img { animation: paesi-arrow-down .55s cubic-bezier(.6, 0, .3, 1); }
@media (hover: hover) {
	.hero__scroll:hover img,
	.hero__scroll-label:hover ~ .hero__corner .hero__scroll img { animation: paesi-arrow-down .55s cubic-bezier(.6, 0, .3, 1); }
}
.hero__scroll:focus-visible { outline: 2px solid var(--b-encre); outline-offset: 3px; }
.hero__scroll-label {
	position: absolute;
	right: 124px; /* encoche (84px) + congé (28px) + 12px */
	bottom: 33px; /* centré sur le bouton */
	font-family: var(--font-brand);
	font-size: 16px;
	line-height: 18px;
	color: var(--b-creme);
	/* Survol : « bottom » et non translate/transform. GSAP anime transform à l'entrée, et WebKit ignore la
	   propriété CSS individuelle « translate » sur un élément dont GSAP écrit le transform. */
	transition: bottom .25s ease;
}
.hero__scroll-label:hover,
.hero__scroll-label:focus { color: #fff; bottom: 29px; }
#decouvrir { scroll-margin-top: 0; }
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}
/* Ligne d'en-tête : « PROJET DE TERRITOIRE | Paesi d’Aiacciu 2050 » (Figma 35:11) */
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
.hero__title,
.hero__name {
	font-family: var(--font-brand-text);
	font-weight: 400;
	font-size: 16px;
	line-height: 1.7;
	color: var(--cream-text);
	margin: 0;
}
.hero__title { text-transform: uppercase; }
.hero__sep { width: 1px; height: 16px; background: rgba(252, 241, 218, .5); }
/* Deux colonnes (Figma 35:17) : grande question + bouton à gauche, texte en deux paragraphes à droite */
.hero__cols { margin-top: 10px; }
.hero__question {
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: clamp(32px, 3.45vw, 52px); /* deux lignes exactement : « Quel Pays ajaccien » / « voulons-nous transmettre ? » */
	line-height: 1.08;
	color: var(--b-creme);
	margin: 0;
	padding-top: 10px;
}
.hero__lead {
	font-family: var(--font-brand-text);
	font-size: 18px;
	line-height: 1.2;
	color: var(--cream-text);
	max-width: 549px;
}
.hero__lead p { margin: 0 0 20px; text-wrap: pretty; }
.hero__lead p:last-child { margin-bottom: 0; }
.hero__actions { margin-top: 56px; }
@media (min-width: 992px) {
	.hero__cols {
		display: grid;
		grid-template-columns: minmax(0, 700fr) minmax(0, 508fr);
		grid-template-areas: "q lead" "cta lead";
		grid-template-rows: auto 1fr;
		column-gap: clamp(48px, 8.34vw, 120px);
		align-items: start;
	}
	.hero__question { grid-area: q; }
	.hero__question .title-line { white-space: nowrap; } /* 2e ligne d'un seul tenant sur grand écran */
	.hero__lead { grid-area: lead; padding-top: 28px; }
	.hero__actions { grid-area: cta; }
}
@media (max-width: 991px) {
	.hero__lead { margin-top: 20px; }
	.hero__actions { margin-top: 28px; }
}

/* CTA composé (charte) : carré icône corail + pastille dégradée */
.cta {
	display: inline-flex;
	align-items: stretch; /* la pastille texte prend toujours la hauteur du carré icône */
	text-decoration: none;
}
.cta__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	border-radius: 20px;
	background: var(--btn-icon);
	transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.cta__icon img { width: 20px; height: 20px; }
.cta__label {
	display: flex;
	align-items: center;
	padding: 20px;
	border-radius: 60px;
	background: linear-gradient(90deg, var(--btn-label-from), var(--btn-label-to));
	font-family: var(--font-brand);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.25;
	color: #fff;
	white-space: nowrap;
	transition: background-position .3s ease;
}
.cta--sm .cta__icon { padding: 14px; border-radius: 16px; }
.cta--sm .cta__label { padding: 14px 20px; }
.site-header__cta { flex-shrink: 0; position: relative; }
/* En-tête compact : boutons visuellement plus petits, zone tactile maintenue à 44 px */
.site-header__cta::after,
.nav-toggle::after { content: ""; position: absolute; inset: -3px 0; }
.cta:focus-visible .cta__icon { transform: rotate(45deg); }
@media (hover: hover) {
	.cta:hover .cta__icon { transform: rotate(45deg); }
}

/* Flèche du bouton « défiler » : sort par le bas puis revient par le haut */
@keyframes paesi-arrow-down {
	0%   { transform: translateY(0) rotate(135deg); opacity: 1; }
	45%  { transform: translateY(26px) rotate(135deg); opacity: 0; }
	46%  { transform: translateY(-26px) rotate(135deg); opacity: 0; }
	100% { transform: translateY(0) rotate(135deg); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.hero__scroll img { animation: none !important; }
	.cta__icon, .a-card__btn img { transition: none !important; }
}
.cta:hover, .cta:focus { color: #fff; }
/* Toucher (iOS/Android) : pas de rectangle gris par-dessus les formes de la charte, un léger enfoncement à la place */
.cta, .nav-toggle, .hero__scroll, .a-card__link, .footer__res-item, .site-header__logo, .site-intro { -webkit-tap-highlight-color: transparent; }
.cta:active .cta__icon, .cta:active .cta__label, .hero__scroll:active, .nav-toggle:active,
.a-card:active .a-card__btn, .footer__res-item:active .footer__res-btn { filter: brightness(.9); }
.cta:focus-visible { outline: 2px solid var(--b-creme); outline-offset: 4px; border-radius: 60px; }
/* Sur fond Crème (en-tête des pages intérieures ou en-tête défilé de l'accueil), contour Encre. */
body:not(.home) .site-header .cta:focus-visible,
.site-header--overlay.is-scrolled .cta:focus-visible { outline-color: var(--b-encre); }


/* Bouton pilule (reprise du site actuel, utilisé dans la page La démarche) */
.cta-pill {
	display: inline-block;
	padding: 16px 45px;
	background: var(--encre);
	color: var(--creme) !important;
	border: 2px solid var(--encre);
	border-radius: 50px;
	font-size: 20px;
	font-weight: 600;
	text-align: center;
	transition: all .3s ease;
}
.cta-pill:hover, .cta-pill:focus {
	background: var(--creme);
	color: var(--encre) !important;
	transform: translateY(-4px) scale(1.04);
	box-shadow: 0 6px 18px rgba(18, 36, 51, .25);
}
.cta-pill__wrap { display: flex; justify-content: center; margin: 30px auto 0; }

/* ---------- Titres de section (accueil) ---------- */
.sec-title {
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: clamp(32px, 3.4vw, 48px);
	line-height: 1.05;
	letter-spacing: -.01em;
	color: var(--b-encre);
	margin: 0;
}
.sec-title span { display: block; }
.sec-title__muted { color: var(--ink-muted); }

/* ---------- Intro « Quel Pays ajaccien… » ---------- */
.demarche, .articles {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	padding: var(--section-y) 0;
}
.sec-text {
	font-family: var(--font-brand-text);
	font-size: 17px;
	line-height: 1.6;
	color: var(--ink-text);
	max-width: 58ch;
	margin: 20px 0 0;
}

/* ---------- La démarche : arche + deux textes + un bouton ---------- */
.demarche { background: var(--b-creme); overflow-x: clip; }
.demarche__grid {
	display: grid;
	grid-template-columns: auto minmax(0, 680px);
	justify-content: center; /* arche + texte forment un seul bloc centré */
	align-items: start; /* Figma : le texte part du haut de l'arche */
	gap: 48px clamp(56px, 7vw, 128px);
}
.demarche__media { height: min(76svh, 710px); width: auto; }
.demarche__body { max-width: 680px; padding-top: 21px; }
.demarche__sub {
	font-family: var(--font-brand);
	font-weight: 500;
	font-size: 22px;
	line-height: 1.25;
	color: var(--b-encre);
	margin: 44px 0 0;
}
.demarche__body .cta { margin-top: 40px; }
.demarche__body .sec-text { margin-top: 22px; }
/* Phrase d'ambition mise en avant : corps de titre, Encre plein (sans filet latéral) */
.demarche__ambition {
	position: relative;
	margin: 30px 0 8px;
	font-family: var(--font-brand);
	font-weight: 400;
	font-size: clamp(19px, 1.55vw, 23px);
	line-height: 1.42;
	color: var(--b-encre);
	max-width: 34em;
	text-wrap: pretty;
}

/* Arche photo = pilule de la charte (Figma 420×710, anneau dégradé Lumière → Corail → Maquis → Mer)
   L'anneau est dessiné autour de la zone visible : pendant l'ouverture (variables --rt / --rr animées en JS),
   il épouse toujours la photo au lieu d'être rogné. Valeurs par défaut = arche entièrement ouverte. */
.arch {
	--rt: 0%;   /* rognage haut  (ouverture de bas en haut) */
	--rr: 0%;   /* rognage droit (ouverture de gauche à droite) */
	--rl: 0%;   /* rognage gauche (ouverture depuis le centre avec --rr) */
	--ring-w: 10px;
	position: relative;
	overflow: hidden; /* le zoom GSAP de la photo ne doit pas élargir la page */
	margin: 0;
	aspect-ratio: 420 / 710;
}
.arch::before {
	content: "";
	position: absolute;
	z-index: 1;
	top: var(--rt);
	right: var(--rr);
	bottom: 0;
	left: var(--rl);
	border-radius: 999px;
	padding: var(--ring-w);
	background: linear-gradient(180deg, var(--b-lumiere) 0%, var(--b-corail) 38%, var(--b-corail) 60%, var(--b-maquis) 86%, var(--b-mer) 100%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	pointer-events: none;
}
.arch__window {
	position: absolute;
	display: block;
	top: calc(var(--rt) + var(--ring-w));
	right: calc(var(--rr) + var(--ring-w));
	bottom: var(--ring-w);
	left: calc(var(--rl) + var(--ring-w));
	border-radius: 999px;
	overflow: hidden; /* la photo bouge dans sa fenêtre : l'anneau reste entier */
	isolation: isolate;
}
.arch__window img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform-origin: 50% 50%;
}
/* Image servie en <picture> (WebP + JPEG) : l'<img> garde le dimensionnement ci-dessus. */
.arch__window picture,
.res-card__frame picture { display: contents; }
.arch__window::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(158deg, rgba(14, 34, 49, .2) 16%, rgba(14, 34, 49, 0) 45%);
	pointer-events: none;
}
/* ---------- Quatre objectifs (accueil) : section Encre plein écran ---------- */
.objectifs {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	padding: clamp(64px, 9vh, 81px) 0; /* Figma : 81 px, la section tient dans un écran */
	background:
		radial-gradient(55% 50% at 8% 100%, rgba(66, 150, 150, .14), rgba(66, 150, 150, 0) 70%),
		radial-gradient(45% 40% at 95% 0%, rgba(236, 114, 88, .08), rgba(236, 114, 88, 0) 70%),
		var(--b-encre);
	color: var(--b-creme);
}
.objectifs > .wrap { width: 100%; }
.objectifs__head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
	gap: 24px 96px;
	align-items: end;
}
.objectifs__title { color: var(--b-creme); }
.objectifs__title .sec-title__muted { color: var(--cream-muted); }
.objectifs__lead { font-family: var(--font-brand-text); font-size: 17px; line-height: 1.6; color: var(--cream-text); margin: 0; }

/* Colonnes ouvertes séparées par de fins filets (pas de cartes) */
.objectifs__grid {
	list-style: none;
	margin: clamp(40px, 7vh, 63px) 0 0; /* Figma : 63 px */
	padding: 0;
	display: grid;
	--og: clamp(32px, 4vw, 72px); /* gouttière entre colonnes (reprise par les traits de liaison) */
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 48px var(--og);
}
/* Sous-grille : pictogrammes, titres et textes alignés d'une colonne à l'autre, même si un titre passe sur deux lignes */
.objectif {
	--draw: 1; /* trait de liaison dessiné (animé de 0 à 1 en JS) */
	position: relative;
	padding: 4px 0 8px;
	display: grid;
	grid-row: span 3;
	grid-template-rows: subgrid;
	row-gap: 0;
	align-content: start;
}
/* Trait pointillé qui relie un hublot au suivant : les quatre objectifs forment un même cap */
.objectif:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 52px; /* centre du hublot (4 px + 96 / 2) */
	left: calc(72px + 14px);
	width: calc(100% + var(--og) - 72px - 28px);
	height: 0;
	border-top: 1px dashed rgba(252, 241, 218, .3);
	transform: scaleX(var(--draw));
	transform-origin: 0 50%;
	pointer-events: none;
}
/* Mini hublot : la pilule de la charte, anneau dégradé, pictogramme Crème */
.objectif__mark {
	position: relative;
	display: grid;
	place-items: center;
	width: 72px;
	height: 96px;
	margin: 0 0 32px;
	border-radius: 999px;
	background: rgba(252, 241, 218, .04);
	/* « translate » (pas « transform ») : le survol ne se bat pas avec l'animation GSAP (scale) */
	transition: background-color .35s ease, translate .35s cubic-bezier(.4, 0, .2, 1);
}
.objectif__mark::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 999px;
	padding: 2px;
	background: linear-gradient(180deg, var(--b-lumiere) 0%, var(--b-corail) 45%, var(--b-maquis) 80%, var(--b-mer) 100%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.objectif__icon {
	width: 40px;
	height: 40px;
	fill: none;
	stroke: var(--b-creme);
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.objectif__icon .accent { stroke: var(--b-lumiere); }
@media (hover: hover) {
	.objectif:hover .objectif__mark { background: rgba(252, 241, 218, .1); translate: 0 -4px; }
}
.objectif__title {
	font-family: var(--font-brand);
	font-weight: 500;
	font-size: clamp(22px, 1.9vw, 27px);
	line-height: 1.15;
	color: var(--b-creme);
	margin: 0 0 14px;
	text-wrap: balance;
}
.objectif__text {
	font-family: var(--font-brand-text);
	font-size: 16px;
	line-height: 1.55;
	color: var(--cream-text);
	margin: 0;
	max-width: 32ch;
	text-wrap: pretty;
}

/* Invitation : panneau doux à bord dégradé, bouton accolé au texte */
.objectifs__invite {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px 48px;
	margin-top: clamp(40px, 7vh, 63px); /* Figma : 63 px */
	padding: clamp(28px, 2.5vw, 36px) clamp(24px, 2.8vw, 40px);
	border-radius: 28px;
	/* « Notre ambition » : dégradé de la charte (Lumière → Corail → Sable → Mer, Figma 35:118) posé SOUS le texte.
	   Opacités du Figma × 0,55 : texte Crème lisible partout (≥ 4,5:1), bouton Corail intact. */
	background:
		linear-gradient(141.24deg, rgba(255, 223, 163, .3) 6.17%, rgba(246, 174, 129, .275) 23.7%, rgba(236, 114, 88, .25) 41.24%, rgba(162, 130, 115, .22) 67.53%, rgba(66, 150, 150, .19) 93.83%),
		rgba(252, 241, 218, .05);
}
.objectifs__invite-title {
	font-family: var(--font-brand);
	font-weight: 500;
	font-size: clamp(22px, 2vw, 28px);
	line-height: 1.2;
	margin: 0 0 8px;
}
.objectifs__invite-text { font-family: var(--font-brand-text); font-size: 16px; line-height: 1.55; color: var(--cream-text); max-width: 624px; margin: 0; }
.objectifs__invite .cta { flex-shrink: 0; }

/* Écrans bas (portables 768–820 px de haut) : la section tient dans un écran */
@media (min-width: 992px) and (max-height: 820px) {
	.objectifs__grid, .objectifs__invite { margin-top: 36px; }
	.objectif__mark { width: 64px; height: 84px; margin-bottom: 22px; }
	.objectif:not(:last-child)::after { top: 46px; left: calc(64px + 14px); width: calc(100% + var(--og) - 64px - 28px); }
	.objectifs__invite { padding-block: 22px; }
}
@media (max-width: 991px) {
	.objectifs__head { grid-template-columns: 1fr; }
	.objectifs__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
	.objectif:nth-child(even)::after { display: none; }
}
@media (max-width: 767px) {
	.objectifs__grid { grid-template-columns: 1fr; row-gap: 0; }
	.objectifs__grid { gap: 28px; }
	.objectif {
		display: grid;
		grid-template-columns: 56px 1fr;
		grid-row: auto;
		grid-template-rows: auto auto;
		gap: 4px 18px;
		padding: 0;
	}
	/* Liaison verticale d'un hublot au suivant */
	.objectif:nth-child(even)::after { display: block; }
	.objectif:not(:last-child)::after {
		top: calc(74px + 10px);
		left: 28px;
		width: 0;
		height: calc(100% + 28px - 74px - 20px);
		border-top: 0;
		border-left: 1px dashed rgba(252, 241, 218, .3);
		transform: scaleY(var(--draw));
		transform-origin: 50% 0;
	}
	.objectif__mark { width: 56px; height: 74px; margin: 0; grid-row: span 2; }
	.objectif__icon { width: 32px; height: 32px; }
	.objectif__title { font-size: 20px; margin: 0; align-self: end; }
	.objectif__text { max-width: none; }
	.objectifs__invite { flex-direction: column; align-items: stretch; }
	.objectifs__invite .cta { align-self: flex-end; }
}

/* ---------- Pages intérieures : fond Crème + introduction partagée (template-parts/page-hero.php) ---------- */
body:not(.home) { background: var(--b-creme); color: var(--b-encre); }
body:not(.home) .site-header { background: var(--b-creme); }
.page-hero { background: var(--b-creme); padding: clamp(72px, 12vh, 140px) 0 clamp(48px, 8vh, 96px); }
.page-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px clamp(48px, 7vw, 128px); align-items: center; }
.page-hero--image .page-hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.page-hero__title { font-size: clamp(40px, 5vw, 72px); }
.page-hero__lead { font-size: 19px; max-width: 60ch; margin-top: 28px; }
.page-hero__text { max-width: 60ch; margin-top: 18px; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }
.page-hero__media.arch { height: min(64svh, 600px); width: auto; justify-self: end; }
.page-hero__wide { margin: 0; aspect-ratio: 4 / 3; border-radius: 28px; overflow: hidden; }
.page-hero__wide .arch__window { border-radius: 28px; }
@media (max-width: 767px) {
	.page-hero { padding: 48px 0 40px; }
	.page-hero--image .page-hero__grid { grid-template-columns: 1fr; }
	.page-hero__media.arch { width: 100%; height: auto; aspect-ratio: 2 / 1; justify-self: stretch; }
	.page-hero__lead { font-size: 17px; }
}

/* ---------- Actualités ---------- */
.section-news {
	background: var(--gris-fond);
	padding: 45px 0 60px;
	border-top: 1px solid var(--bordure);
}
.section-news h2 { font-size: 30px; margin-bottom: 20px; }
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.news-card {
	display: flex;
	gap: 25px;
	background: #fff;
	border: 1px solid var(--bordure);
	padding: 15px;
}
.news-card__img { flex: 0 0 225px; }
.news-card__img img { width: 225px; height: 150px; object-fit: cover; }
.news-card__title { font-size: 24px; margin: 0 0 6px; }
.news-card__title a { color: var(--encre); }
.news-card__meta { color: #707070; margin: 0 0 4px; }
.news-card__meta a { color: var(--encre); }
.news-card__excerpt { margin: 0; }

/* ---------- Articles (accueil) ---------- */
.articles {
	--a-bg: #f2e4cd; /* Crème teinté de Sable (charte) */
	background: var(--a-bg);
	color: var(--b-encre);
}
.articles__head {
	display: grid;
	grid-template-columns: 1fr minmax(0, 360px);
	gap: 24px 96px;
	align-items: end;
	margin-bottom: 44px;
}
.articles__aside { justify-self: end; } /* bouton aligné sur le bord droit des cartes */
.articles__aside .sec-text { margin: 0 0 28px; font-size: 16px; }
.articles__more { display: none; margin-top: 32px; }

.articles__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.55fr);
	gap: 20px;
}

/* Carte « bento » : photo pleine carte, texte en haut, encoche bas-droite */
.a-card {
	position: relative;
	min-height: clamp(400px, 58svh, 540px);
	border-radius: 24px;
	overflow: hidden;
	background: var(--b-encre);
	isolation: isolate;
	transition: transform .7s cubic-bezier(.16, 1, .3, 1);
}
.a-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: -2;
	transition: transform .9s cubic-bezier(.16, 1, .3, 1);
}
/* Zoom d'entrée de l'accueil (GSAP anime --img-s sur la carte, jamais le transform de l'image), indépendant
   du zoom de survol. Limité à l'accueil : la page Actualités anime le transform de ces mêmes images, et
   WebKit ne combine pas la propriété « scale » avec un transform écrit par GSAP. */
.articles .a-card__img { scale: var(--img-s, 1); }
.a-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(180deg, rgba(14, 34, 49, .94) 0%, rgba(14, 34, 49, .82) 26%, rgba(14, 34, 49, .45) 46%, rgba(14, 34, 49, 0) 66%),
		linear-gradient(0deg, rgba(14, 34, 49, .45) 0%, rgba(14, 34, 49, 0) 30%);
}
/* Survol : la carte se soulève, la photo s'approfondit */
@media (hover: hover) {
	.a-card:hover .a-card__img { transform: scale(1.06); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.a-card:hover { transform: translateY(-6px); }
}

.a-card__body { padding: 28px 28px 0; max-width: 360px; } /* même mesure de texte sur toutes les cartes */
.a-card__title {
	font-family: var(--font-brand);
	font-weight: 600;
	font-size: 21px;
	line-height: 1.22;
	margin: 0 0 10px;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 5; /* titres complets (3 lignes coupaient « …sur l’avenir du… ») */
	line-clamp: 5;
	overflow: hidden;
}
.a-card__link { color: var(--b-creme); }
.a-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
/* Pendant l'entrée animée du texte (transform posé par GSAP sur .a-card__body), le corps devient le bloc conteneur
   de la zone cliquable : elle rétrécissait au corps puis revenait à la carte entière, ce que Chrome compte comme
   un décalage de mise en page (CLS 0,22 sur /actualites/). Masquée le temps de l'effet, elle réapparaît à la
   taille de la carte. Le titre reste cliquable pendant l'effet. Accueil : animations.js anime le titre lui-même. */
.a-card__body[style*="transform"] .a-card__link::after,
.a-card__title[style*="transform"] .a-card__link::after { display: none; }
.a-card__link:hover, .a-card__link:focus { color: var(--b-creme); }
.a-card:focus-within { outline: 3px solid var(--b-encre); outline-offset: 3px; }
.a-card__link:focus { outline: none; }
.a-card__excerpt {
	font-family: var(--font-brand-text);
	font-size: 15px;
	line-height: 1.4;
	color: var(--cream-text);
	margin: 0;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

.a-card__tags {
	position: absolute;
	left: 24px;
	bottom: 24px;
	right: 110px;
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.a-card__tags li {
	font-family: var(--font-brand);
	font-size: 12px;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: .02em;
	padding: 7px 11px;
	border-radius: 999px;
	background: rgba(252, 241, 218, .92);
	color: var(--b-encre);
}

/* Encoche bas-droite : bloc couleur du fond + deux congés concaves */
.a-card__corner {
	position: absolute;
	right: -1px; /* recouvre le pixel anticrénelé du bord arrondi (sinon un filet de photo apparaît) */
	bottom: -1px;
	z-index: 2;
	padding: 10px 1px 1px 10px;
	background: var(--a-bg);
	border-top-left-radius: 28px;
	pointer-events: none;
}
.a-card__corner::before,
.a-card__corner::after {
	content: "";
	position: absolute;
	width: 24px;
	height: 24px;
	background: radial-gradient(circle at 0 0, transparent 23.5px, var(--a-bg) 24px);
}
.a-card__corner::before { right: 0; top: -24px; }
.a-card__corner::after { left: -24px; bottom: 0; }
/* Même bouton icône que le CTA du hero (.cta__icon) */
.a-card__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	border-radius: 20px;
	background: var(--btn-icon);
	overflow: hidden;
}
.a-card__btn img { width: 20px; height: 20px; }
.a-card__btn img { transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
.a-card:focus-within .a-card__btn img { transform: rotate(45deg); }
@media (hover: hover) {
	.a-card:hover .a-card__btn img { transform: rotate(45deg); }
}

@media (max-width: 991px) {
	.articles__head { grid-template-columns: 1fr; }
	.articles__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.a-card:nth-child(3n) { grid-column: 1 / -1; }
	.a-card { min-height: 460px; }
}
@media (max-width: 640px) {
	.articles__grid { grid-template-columns: 1fr; gap: 16px; }
	.a-card { min-height: 420px; }
	.a-card__body { padding: 22px 22px 0; }
	/* Colonne étroite : 3 lignes coupaient le titre (« …construire l’avenir du ») ; la carte a la place pour 4 */
	.a-card__title { -webkit-line-clamp: 5; line-clamp: 5; }
}

/* ---------- Pied de page : plein écran, minimal ---------- */
.site-footer {
	--f-muted: var(--cream-muted);
	--f-line: var(--cream-line);
	position: relative;
	display: flex; /* hauteur naturelle, comme le Figma (829 px à 1440) */
	background:
		radial-gradient(60% 55% at 92% 8%, rgba(252, 241, 218, .07), rgba(252, 241, 218, 0) 70%),
		var(--b-encre);
	color: var(--b-creme);
	font-family: var(--font-brand-text);
	overflow: hidden;
}
.site-footer a { color: var(--b-creme); transition: color .2s ease, border-color .2s ease; } /* pas de transition d'opacité : GSAP anime l'opacité de « Site officiel de la CAPA » (sinon il restait masqué) */
.footer__wrap {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: clamp(28px, 4.5vh, 64px);
	padding: clamp(48px, 8vh, 112px) var(--gutter) 8px;
}

/* Haut : déclaration + liens */
.footer__main {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: 48px;
	align-items: start;
}
.footer__statement {
	font-family: var(--font-brand);
	font-weight: 500;
	font-size: clamp(30px, 3.2vw, 48px);
	line-height: 1.08;
	letter-spacing: -.01em;
	max-width: 747px; /* Figma : deux lignes, « Quel Pays ajaccien / voulons-nous transmettre ? » */
	margin: 0 0 22px;
}
.footer__text {
	max-width: 821px;
	font-size: 16px;
	line-height: 1.5;
	color: var(--f-muted);
	margin: 0 0 20px;
}
@media (min-width: 992px) {
	/* Figma : le texte déborde légèrement la colonne (821 px pour une colonne de 747 px) */
	.footer__text { width: min(821px, calc(100% + 75px)); max-width: none; }
}
.footer__ext {
	font-family: var(--font-brand);
	font-size: 15px;
	border-bottom: 1px solid var(--f-line);
	padding: 8px 0 2px; /* zone cliquable plus haute, soulignement inchangé */
}
.footer__ext:hover { border-color: var(--b-creme); }

.footer__nav {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
	justify-self: end;
	width: min(100%, 220px);
}
.footer__label {
	font-family: var(--font-brand);
	font-size: 13px;
	color: var(--f-muted);
	margin: 0 0 18px;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { margin: 0 0 10px; }
.footer__col a { font-family: var(--font-brand); font-size: 15px; line-height: 1.3; }
.footer__col a:hover { color: var(--f-muted); }
/* Zone cliquable agrandie sans changer la mise en page (liens en ligne) */
.footer__col a, .footer__credits a { padding-block: 6px; }

/* Milieu : ressources (cartes douces + bouton icône de la charte) */
.footer__res { margin-top: auto; }
.footer__res-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}
.footer__res-item {
	display: flex;
	align-items: center;
	gap: 20px;
	height: 100%;
	padding: 14px 16px 14px 14px;
	border-radius: 20px;
	background: rgba(252, 241, 218, .04);
	border: 1px solid var(--f-line);
	transition: background-color .3s ease, border-color .3s ease, transform .3s cubic-bezier(.4, 0, .2, 1);
}
.footer__res-item:focus-visible {
	background: rgba(252, 241, 218, .08);
	border-color: rgba(252, 241, 218, .22);
	transform: translateY(-2px);
}
@media (hover: hover) {
	.footer__res-item:hover {
		background: rgba(252, 241, 218, .08);
		border-color: rgba(252, 241, 218, .22);
		transform: translateY(-2px);
	}
	.footer__res-item:hover .footer__res-cover img { transform: scale(1.06); }
	.footer__res-item:hover .footer__res-btn { transform: rotate(45deg); }
}
.footer__res-item:focus-visible { outline: 2px solid var(--b-creme); outline-offset: 3px; }
.footer__res-cover {
	flex: 0 0 64px;
	aspect-ratio: 3 / 4;
	border-radius: 10px;
	overflow: hidden;
	background: var(--f-line);
	box-shadow: var(--shadow-ink);
}
.footer__res-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.footer__res-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.footer__res-type {
	align-self: flex-start;
	font-family: var(--font-brand);
	font-size: 11px;
	line-height: 1;
	letter-spacing: .04em;
	padding: 5px 8px;
	border-radius: 999px;
	color: var(--b-creme);
	background: rgba(252, 241, 218, .1);
	margin-bottom: 4px;
}
.footer__res-title { font-family: var(--font-brand); font-weight: 500; font-size: 16px; line-height: 1.25; }
.footer__res-sub { font-size: 14px; line-height: 1.35; color: var(--f-muted); }
/* Bouton icône = .cta__icon (version compacte), rotation au survol */
.footer__res-btn {
	flex-shrink: 0;
	align-self: flex-start;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px;
	border-radius: 16px;
	background: var(--btn-icon);
	transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.footer__res-btn img { width: 20px; height: 20px; }
.footer__res-item:focus-visible .footer__res-btn { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) {
	.footer__res-item, .footer__res-btn, .footer__res-cover img { transition: none; }
}

/* Bas : barre + logotype */
.footer__bar {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 16px 24px;
	padding: 16px 0;
	border-top: 1px solid var(--f-line);
	font-size: 13px;
}
.footer__signature { margin: 0; font-family: var(--font-brand); }
.footer__paesi-top { display: block; width: auto; height: clamp(84px, 7vw, 108px); margin: 0 0 32px; }
.footer__capa-logo { width: 72px; height: auto; flex-shrink: 0; }
.footer__brand { display: flex; align-items: center; gap: 16px; }
.footer__paesi-logo { width: auto; height: 44px; flex-shrink: 0; }
.footer__credits a { text-decoration: underline; text-underline-offset: 3px; }
.footer__credit { margin-left: 14px; }
.footer__credits { margin: 0; justify-self: end; color: var(--f-muted); }
.footer__credits a { color: var(--f-muted); }
.footer__credits a:hover { color: var(--b-creme); }


@media (max-width: 991px) {
	.footer__main { grid-template-columns: 1fr; }
	.footer__nav { justify-self: start; }
	.footer__res-list { grid-template-columns: 1fr; gap: 12px; }
	.footer__bar { grid-template-columns: 1fr; }
	.footer__credits { justify-self: start; }
	.footer__credit { display: block; margin: 6px 0 0; }
}
@media (max-width: 991px), (pointer: coarse) {
	/* Cibles tactiles ≥ 44px (tablettes comprises, iPad à l'horizontale aussi) */
	.footer__col li { margin: 0; }
	.footer__col a, .footer__ext, .footer__credits a { display: inline-flex; align-items: center; min-height: 44px; }
	.footer__ext { gap: .3em; } /* en flex, l'espace avant la flèche disparaissait (« CAPA↗ ») */
}
@media (max-width: 640px) {
	.footer__col a { font-size: 16px; }
}

/* ---------- Contenus (articles, pages) ---------- */
.page-header-band {
	background: var(--encre);
	color: var(--creme);
	padding: 40px 0;
}
.page-header-band h1 { color: var(--creme); font-size: 40px; margin: 0; }
.page-header-band .entry-meta { margin: 10px 0 0; opacity: .85; }
.page-header-band .entry-meta a { color: var(--creme); text-decoration: underline; }
.entry { padding: 40px 0 60px; }
.entry-content { max-width: 800px; font-size: 16px; line-height: 1.6; }
.entry-content h2, .entry-content h3 { margin-top: 30px; }
.entry-content h3 { font-size: 24px; }
.entry-thumb { margin-bottom: 30px; }
.entry-thumb img { width: 100%; max-height: 480px; object-fit: cover; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.demarche__grid { grid-template-columns: 1fr; }
	.demarche__media { height: auto; width: min(100%, 320px); justify-self: center; }
}
/* ---------- Menu plein écran (mobile et tablette) ----------
   Jusqu'à 991 px : les quatre liens ne tiennent pas sur une ligne à côté du logo et du bouton
   (ils passaient sur deux lignes entre 768 et 991 px, et sur un téléphone à l'horizontale). */
@media (max-width: 991px) {
	.site-header__inner { gap: 12px; }
	.site-header__logo { margin-right: auto; position: relative; z-index: 2; }
	/* Ordre : logo, « Je donne mon avis » (avec texte), bouton menu */
	.site-header__cta { order: 2; position: relative; z-index: 2; }
	.nav-toggle { order: 3; display: block; position: relative; z-index: 2; }

	/* Panneau plein écran */
	.main-nav {
		position: fixed;
		inset: 0;
		z-index: 1;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		gap: 40px;
		margin: 0;
		padding: calc(var(--header-h) + 34px) var(--gutter) calc(32px + env(safe-area-inset-bottom));
		overscroll-behavior: contain; /* le défilement du panneau ne se propage pas à la page */
		background:
			radial-gradient(70% 45% at 90% 0%, rgba(252, 241, 218, .08), rgba(252, 241, 218, 0) 70%),
			var(--b-encre);
		overflow-y: auto;
		visibility: hidden;
		clip-path: inset(0 0 100% 0);
		transition: clip-path .6s cubic-bezier(.7, 0, .2, 1), visibility 0s linear .6s;
	}
	.main-nav.is-open {
		visibility: visible;
		clip-path: inset(0 0 0 0);
		transition: clip-path .6s cubic-bezier(.7, 0, .2, 1), visibility 0s;
	}
	.main-nav ul { flex-direction: column; gap: 0; justify-content: flex-start; }
	.main-nav li {
		opacity: 0;
		transform: translateY(24px);
		transition: opacity .5s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
	}
	.main-nav.is-open li { opacity: 1; transform: none; }
	.main-nav.is-open li:nth-child(1) { transition-delay: .18s; }
	.main-nav.is-open li:nth-child(2) { transition-delay: .24s; }
	.main-nav.is-open li:nth-child(3) { transition-delay: .30s; }
	.main-nav.is-open li:nth-child(4) { transition-delay: .36s; }
	.main-nav.is-open li:nth-child(5) { transition-delay: .42s; }
	.main-nav a,
	.site-header--overlay:not(.is-scrolled) .main-nav a {
		display: block;
		padding: 10px 0;
		font-family: var(--font-brand);
		font-weight: 500;
		font-size: clamp(32px, 9vw, 44px);
		line-height: 1.1;
		letter-spacing: -.01em;
		color: var(--b-creme);
		border: 0;
	}
	.main-nav a:hover, .main-nav a:focus-visible { color: #fff; text-decoration: none; }
	.main-nav .current-menu-item > a,
	.main-nav .current_page_item > a { font-weight: 600; }
	.main-nav .current-menu-item > a::after,
	.main-nav .current_page_item > a::after {
		content: "";
		display: inline-block;
		width: 10px;
		height: 10px;
		margin-left: 12px;
		vertical-align: middle;
		border-radius: 50%;
		background: var(--b-corail);
	}
	.main-nav__extra {
		display: flex;
		flex-direction: column;
		gap: 24px;
		opacity: 0;
		transition: opacity .5s ease .45s;
	}
	.main-nav.is-open .main-nav__extra { opacity: 1; }
	.main-nav__signature { margin: 0; font-family: var(--font-brand); font-size: 14px; line-height: 1.4; color: var(--b-creme); }

	/* En-tête quand le menu est ouvert : logo clair, bouton clair, pas de fond */
	.site-header.menu-open { background: transparent; box-shadow: none; transform: none; }
	.site-header.menu-open .logo-dark { display: none; }
	.site-header.menu-open .logo-light { display: block; }
	.site-header.menu-open .nav-toggle { color: var(--b-creme); background: var(--cream-fill); }
	html.is-menu-open { overflow: hidden; }
}
@media (max-width: 991px) and (prefers-reduced-motion: reduce) {
	.main-nav, .main-nav.is-open, .main-nav li, .main-nav__extra { transition: none !important; }
	.main-nav li { transform: none; }
}
@media (max-width: 767px) {
	:root { --header-h: 86px; --header-h-compact: 64px; }
	.site-header.is-scrolled .site-header__logo img { height: 42px; }
	.site-header.is-scrolled .site-header__cta .cta__icon { width: 38px; height: 38px; padding: 0; border-radius: 12px; }
	.site-header.is-scrolled .site-header__cta .cta__label { height: 38px; padding: 0 14px; font-size: 13px; }
	.site-header.is-scrolled .nav-toggle { width: 38px; height: 38px; border-radius: 12px; }
	.site-header.is-scrolled .nav-toggle__bars span { left: 11px; right: 11px; }
	.site-header.is-scrolled .nav-toggle__bars span:first-child { top: 14px; }
	.site-header.is-scrolled .nav-toggle__bars span:last-child { top: 22px; }
	.site-header.is-scrolled .nav-toggle[aria-expanded="true"] .nav-toggle__bars span { top: 18px; }
	.site-header__inner { padding: 14px var(--gutter); gap: 8px; }
	.site-header__logo img { height: 58px; }
	.site-header__cta .cta__icon { width: 44px; height: 44px; padding: 0; border-radius: 14px; }
	.site-header__cta .cta__label { height: 44px; padding: 0 16px; font-size: 14px; }
	.nav-toggle { width: 44px; height: 44px; border-radius: 14px; }
	.nav-toggle__bars span { left: 13px; right: 13px; }
	.nav-toggle__bars span:first-child { top: 17px; }
	.nav-toggle__bars span:last-child { top: 25px; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:first-child,
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:last-child { top: 21px; }
	/* Actualités : bouton sous les cartes */
	.articles__aside .cta { display: none; }
	.articles__aside .sec-text { margin-bottom: 0; }
	.articles__more { display: flex; justify-content: flex-end; }
	/* Boutons de section alignés à droite sur mobile */
	.demarche__body .cta { display: flex; width: fit-content; margin-left: auto; }
	.demarche__ambition { font-size: 18px; margin-top: 26px; }
	/* Démarche : arche pleine largeur, plus courte */
	.demarche__media { width: 100%; height: auto; aspect-ratio: 2 / 1; justify-self: stretch; }
	.admin-bar .site-header, .admin-bar .site-header--overlay { top: 46px; }
	.admin-bar .site-header.is-hidden { transform: translateY(calc(-100% - 46px)); }

	.hero { padding: 110px 0 110px; }
	.hero__scroll-label { display: none; }
	.hero__title, .hero__name { font-size: 13px; }
	.hero__meta { column-gap: 12px; }
	.hero__question { font-size: 30px; text-wrap: wrap; } /* pas de coupure au trait d'union de « voulons-nous » */
	.hero__lead { font-size: 16px; line-height: 1.4; margin-top: 14px; } /* corps de texte ≥ 16 px */
	.hero__lead p { margin-bottom: 12px; }
	.hero__actions { margin-top: 20px; }
	.section-news h2 { font-size: 26px; }
	.sec-text { font-size: 16px; }
	.news-card { flex-direction: column; }
	.news-card__img, .news-card__img img { width: 100%; flex-basis: auto; height: auto; }
}

/* Petits téléphones : logo + « Je donne mon avis » + bouton menu doivent tenir sur une ligne
   (jusqu'ici le bouton menu était écrasé à 27 px de large à 320 px, 41 px à 390 px). */
@media (max-width: 419px) {
	.site-header__inner { gap: 6px; }
	.site-header__logo img { height: 46px; }
	.site-header__cta .cta__icon { width: 40px; }
	.site-header__cta .cta__label { padding: 0 12px; font-size: 13px; }
	.site-header.is-scrolled .site-header__cta .cta__label { padding: 0 12px; }
}
@media (max-width: 359px) {
	/* « PROJET DE TERRITOIRE | Paesi d’Aiacciu 2050 » ne tient pas sur une ligne : deux lignes, sans filet orphelin */
	.hero__sep { display: none; }
	.hero__meta { row-gap: 0; }
	/* 320 px : la pastille texte reste, le carré flèche s'efface (la pastille est déjà le bouton) */
	.site-header__cta .cta__icon { display: none; }
	.site-header__logo img { height: 44px; }
}
/* Téléphone à l'horizontale : en-tête compact (142 px prenaient plus d'un tiers de l'écran) */
@media (max-width: 991px) and (max-height: 500px) and (orientation: landscape) {
	:root { --header-h: 86px; --header-h-compact: 64px; }
	.site-header--overlay:not(.is-scrolled) { height: var(--header-h); }
	.site-header__logo img { height: 58px; }
	.site-header.is-scrolled .site-header__logo img { height: 42px; }
	.site-header__inner { padding-block: 14px; }
	.main-nav a,
	.site-header--overlay:not(.is-scrolled) .main-nav a { font-size: 28px; padding: 8px 0; }
	.main-nav { padding-top: calc(var(--header-h) + 12px); gap: 20px; }
	.hero { padding-top: 110px; padding-bottom: 72px; }
}

/* ---------- Accueil : grille des actualités selon le nombre d'articles (1 / 2 / 3 max par ligne) ---------- */
.articles__grid:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.articles__grid:has(> :only-child) > .a-card { min-height: clamp(420px, 60svh, 560px); }
.articles__grid:has(> :only-child) .a-card__body { max-width: 640px; }
.articles__grid:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.articles__grid:has(> :nth-child(4)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.articles__grid:has(> :only-child) > .a-card:nth-child(n),
.articles__grid:has(> :nth-child(2):last-child) > .a-card:nth-child(n) { grid-column: auto; }
@media (max-width: 640px) {
	.articles__grid:has(> :nth-child(2):last-child) { grid-template-columns: minmax(0, 1fr); }
}

/* Graisse « gras » de la charte = semi-gras (600), y compris pour strong/b */
strong, b { font-weight: 600; }
.nowrap { white-space: nowrap; }
