/* ==========================================================================
   AMAP Capbreton · Labenne · Ondres — feuille de style du squelette
   Couleurs reprises du site WordPress d'origine et du logo :
   vert (Capbreton), bleu (Labenne), jaune (Ondres).
   ========================================================================== */

/* ---- Polices (hébergées localement) ---- */
@font-face {
	font-family: "Nunito";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/nunito-normal-400-800.woff2") format("woff2");
}
@font-face {
	font-family: "Nunito";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/nunito-italic-400.woff2") format("woff2");
}
@font-face {
	font-family: "Lato";
	font-weight: 900;
	font-display: swap;
	src: url("../fonts/lato-normal-900.woff2") format("woff2");
}

/* ---- Variables ---- */
:root {
	--vert: #a5d350;          /* bandeau de l'ancien site */
	--vert-clair: #eef7dc;
	--vert-fonce: #3d6b12;    /* texte sur fond clair (contraste AA) */
	--bleu: #0c71c3;          /* titres et liens de l'ancien site */
	--bleu-fonce: #0a4f8a;
	--bleu-clair: #e3f0fb;
	--jaune: #f7cd13;
	--jaune-fonce: #8a6a00;
	--jaune-clair: #fdf6d3;
	--encre: #1f2a1a;
	--gris: #5b6656;
	--gris-clair: #f5f7f2;
	--bord: #dfe6d6;
	--blanc: #fff;

	--police: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--police-chiffres: "Lato", var(--police);

	--rayon: 14px;
	--rayon-petit: 8px;
	--ombre: 0 6px 24px rgb(31 42 26 / 0.08);
	--ombre-forte: 0 12px 32px rgb(31 42 26 / 0.16);
	--largeur: 1180px;
	--largeur-texte: 46rem;
	--gouttiere: clamp(1rem, 4vw, 2rem);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; } /* ancres sous le bandeau fixe */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
	margin: 0;
	font-family: var(--police);
	font-size: 1.0625rem;
	line-height: 1.7;
	color: var(--encre);
	background: var(--blanc);
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--bleu); text-underline-offset: 0.18em; }
a:hover { color: var(--bleu-fonce); }
:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--bleu-fonce); margin: 0 0 0.6em; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p, ul, ol { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--bord); margin: 2rem 0; }

.wrap { width: min(100% - 2 * var(--gouttiere), var(--largeur)); margin-inline: auto; }
.wrap-texte { width: min(100% - 2 * var(--gouttiere), var(--largeur-texte)); margin-inline: auto; }
.visuellement-cache {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
	position: absolute; left: 1rem; top: -4rem; z-index: 100;
	background: var(--bleu-fonce); color: #fff; padding: 0.6rem 1rem; border-radius: var(--rayon-petit);
}
.skip:focus { top: 1rem; color: #fff; }

/* ---- Boutons ---- */
.bouton {
	display: inline-flex; align-items: center; gap: 0.5em;
	padding: 0.7em 1.4em;
	border-radius: 999px;
	border: 2px solid transparent;
	background: var(--bleu); color: #fff;
	font-weight: 700; text-decoration: none; line-height: 1.2;
	transition: transform 0.15s, background-color 0.15s, box-shadow 0.15s;
	cursor: pointer;
}
.bouton:hover { background: var(--bleu-fonce); color: #fff; transform: translateY(-1px); box-shadow: var(--ombre); }
.bouton--vert { background: var(--vert); color: var(--encre); }
.bouton--vert:hover { background: #93c23b; color: var(--encre); }
.bouton--jaune { background: var(--jaune); color: var(--encre); }
.bouton--jaune:hover { background: #e9bd00; color: var(--encre); }
.bouton--clair { background: #fff; color: var(--bleu-fonce); }
.bouton--clair:hover { background: var(--bleu-clair); color: var(--bleu-fonce); }
.bouton--contour { background: transparent; border-color: currentColor; color: var(--bleu); }
.bouton--contour:hover { background: var(--bleu); border-color: var(--bleu); color: #fff; }
.bouton--petit { padding: 0.45em 1em; font-size: 0.92rem; }
.boutons { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---- En-tête ---- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--vert);
	box-shadow: 0 2px 12px rgb(31 42 26 / 0.12);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--encre); margin-right: auto; }
.brand img { width: 60px; height: 60px; background: #fff; border-radius: 50%; padding: 3px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-nom { font-weight: 800; font-size: 1.35rem; letter-spacing: 0.04em; color: var(--bleu-fonce); }
.brand-lieux { font-size: 0.85rem; font-weight: 700; color: var(--encre); }

.site-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.25rem; }
.site-nav li { position: relative; }
.site-nav a {
	display: block; padding: 0.55rem 0.8rem; border-radius: var(--rayon-petit);
	color: var(--bleu-fonce); font-weight: 700; text-decoration: none; letter-spacing: 0.02em;
}
.site-nav a:hover, .site-nav a[aria-current], .site-nav .on > a { background: rgb(255 255 255 / 0.55); color: var(--bleu-fonce); }
.site-nav .nav-contact { background: var(--bleu); color: #fff; margin-left: 0.4rem; }
.site-nav .nav-contact:hover, .site-nav .nav-contact[aria-current] { background: var(--bleu-fonce); color: #fff; }
.nav-bouton {
	display: none; margin-left: auto;
	border: 0; border-radius: var(--rayon-petit); background: rgb(255 255 255 / 0.6);
	color: var(--bleu-fonce); font: inherit; font-weight: 800; padding: 0.55rem 0.9rem; cursor: pointer;
	align-items: center; gap: 0.5rem;
}
.nav-bouton-icone, .nav-bouton-icone::before, .nav-bouton-icone::after {
	display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
	transition: transform 0.2s;
}
.nav-bouton-icone::before, .nav-bouton-icone::after { content: ""; position: absolute; left: 0; }
.nav-bouton-icone::before { top: -6px; }
.nav-bouton-icone::after { top: 6px; }
.nav-bouton[aria-expanded="true"] .nav-bouton-icone { background: transparent; }
.nav-bouton[aria-expanded="true"] .nav-bouton-icone::before { transform: translateY(6px) rotate(45deg); }
.nav-bouton[aria-expanded="true"] .nav-bouton-icone::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 64em) {
	.js .nav-bouton { display: inline-flex; }
	.header-inner { flex-wrap: wrap; }
	.js .site-nav { display: none; flex-basis: 100%; padding-bottom: 1rem; }
	.js .site-nav.ouvert { display: block; max-height: calc(100vh - 76px); overflow-y: auto; overscroll-behavior: contain; }
	.site-nav > ul { flex-direction: column; align-items: stretch; gap: 0.15rem; }
	.site-nav .nav-contact { margin: 0.4rem 0 0; text-align: center; }
}
@media (max-width: 30em) {
	.brand img { width: 48px; height: 48px; }
	.brand-nom { font-size: 1.15rem; }
	.brand-lieux { font-size: 0.75rem; }
}

/* ---- Sections ---- */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--grise { background: var(--gris-clair); }
.section--verte { background: var(--vert-clair); }
.section-titre { text-align: center; margin-bottom: 0.4em; }
.section-intro { text-align: center; color: var(--gris); max-width: 42rem; margin: 0 auto 2rem; }
.section-pied { text-align: center; margin-top: 2rem; }

/* ---- Accueil : hero ---- */
.hero { position: relative; isolation: isolate; color: #fff; min-height: clamp(26rem, 70vh, 38rem); display: flex; align-items: flex-end; }
.hero-image, .hero-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(180deg, rgb(10 40 60 / 0.05) 20%, rgb(10 40 60 / 0.72) 100%);
}
.hero-contenu { padding-block: 3rem; }
.hero-surtitre {
	display: inline-block; background: var(--vert); color: var(--encre); font-weight: 800;
	padding: 0.25em 0.9em; border-radius: 999px; font-size: 0.95rem; margin-bottom: 1rem;
}
.hero h1 { color: #fff; max-width: 18em; margin-bottom: 0.4em; text-shadow: 0 2px 16px rgb(0 0 0 / 0.3); }
.hero p { font-size: 1.2rem; max-width: 36em; text-shadow: 0 1px 8px rgb(0 0 0 / 0.4); }

/* ---- Accueil : présentation ---- */
.presentation { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.presentation-texte .chapo { font-size: 1.15rem; }
.presentation-image img { border-radius: var(--rayon); }
@media (max-width: 52em) { .presentation { grid-template-columns: 1fr; } }

/* ---- Chiffres clés ---- */
.chiffres { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: center; }
.chiffre-nombre { display: block; font-family: var(--police-chiffres); font-weight: 900; font-size: clamp(2.4rem, 1.4rem + 4vw, 5rem); line-height: 1; }
.chiffre-libelle { display: block; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gris); margin-top: 0.4rem; }
.chiffres li:nth-child(1) .chiffre-nombre { color: #d9a900; }
.chiffres li:nth-child(2) .chiffre-nombre { color: var(--bleu); }
.chiffres li:nth-child(3) .chiffre-nombre { color: #7fae2a; }
@media (max-width: 36em) { .chiffres { gap: 0.5rem; } .chiffre-libelle { font-size: 0.72rem; letter-spacing: 0.04em; } }

/* ---- Cartes (antennes, articles, producteurs) ---- */
.grille { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); }
.grille--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.carte {
	position: relative; display: flex; flex-direction: column;
	background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon);
	overflow: hidden; box-shadow: var(--ombre);
	transition: transform 0.2s, box-shadow 0.2s;
}
.carte:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); }
.carte-image { aspect-ratio: 3 / 2; background: var(--vert-clair); overflow: hidden; }
.carte-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carte-corps { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.carte-titre { font-size: 1.15rem; margin: 0; }
.carte-titre a { color: var(--bleu-fonce); text-decoration: none; }
.carte-titre a::after { content: ""; position: absolute; inset: 0; } /* toute la carte est cliquable */
.carte-sous-titre { font-weight: 700; color: var(--vert-fonce); font-size: 0.95rem; margin: 0; }
.carte-texte { color: var(--gris); font-size: 0.97rem; margin: 0; }
.carte-meta { margin-top: auto; padding-top: 0.5rem; }

/* antennes : couleur du logo AMAP (ordre alphabétique : Capbreton, Labenne, Ondres) */
.antenne { text-align: center; border-top: 6px solid var(--couleur, var(--vert)); }
.antenne .carte-image { aspect-ratio: auto; background: none; padding: 1.5rem 1.5rem 0; }
.antenne .carte-image img { width: 150px; height: 150px; object-fit: contain; margin: 0 auto; }
.antenne .carte-corps { align-items: center; }
.antenne .bouton { position: relative; z-index: 1; margin-top: 0.6rem; }
.antenne--1 { --couleur: var(--vert); }
.antenne--2 { --couleur: #1e8ced; }
.antenne--3 { --couleur: var(--jaune); }
.antenne--1 .bouton { background: var(--vert); color: var(--encre); }
.antenne--3 .bouton { background: var(--jaune); color: var(--encre); }

/* étiquettes (mots-clés) */
.etiquettes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.etiquettes > li { display: flex; margin: 0 !important; }
.etiquette {
	display: inline-block; padding: 0.15em 0.7em; border-radius: 999px;
	background: var(--vert-clair); color: var(--vert-fonce); font-size: 0.85rem; font-weight: 700; text-decoration: none;
}
a.etiquette:hover { background: var(--vert); color: var(--encre); }
.etiquette--bleue { background: var(--bleu-clair); color: var(--bleu-fonce); }
.etiquette--jaune { background: var(--jaune-clair); color: var(--jaune-fonce); }
.carte .etiquettes { position: relative; z-index: 1; }

/* ---- Liens utiles (tuiles) ---- */
.tuiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.tuile {
	display: flex; flex-direction: column; gap: 0.3rem; padding: 1.4rem 1.5rem;
	border-radius: var(--rayon); text-decoration: none; color: var(--encre);
	background: #fff; border: 1px solid var(--bord); box-shadow: var(--ombre);
	transition: transform 0.2s, box-shadow 0.2s;
}
.tuile:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); color: var(--encre); }
.tuile strong { color: var(--bleu-fonce); font-size: 1.15rem; }
.tuile span { color: var(--gris); font-size: 0.95rem; }

/* ---- Bandeau de page (rubriques, articles) ---- */
.bandeau { background: var(--vert-clair); padding-block: clamp(1.75rem, 4vw, 3rem); border-bottom: 1px solid var(--bord); }
.bandeau h1 { margin-bottom: 0.2em; }
.bandeau .sous-titre { font-size: 1.2rem; font-weight: 700; color: var(--vert-fonce); margin: 0; }
.bandeau .intro { color: var(--gris); max-width: 46rem; margin: 0.5rem 0 0; }
.ariane { font-size: 0.9rem; margin-bottom: 0.6rem; color: var(--gris); }
.ariane ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; }
.ariane li + li::before { content: "›"; margin-right: 0.3rem; color: var(--gris); }
.ariane a { color: var(--gris); }

/* ---- Contenu rédactionnel (raccourcis SPIP) ---- */
.contenu { padding-block: clamp(2rem, 5vw, 3.5rem); }
.texte { overflow-wrap: break-word; }
.texte .spip_logo, .texte img { border-radius: var(--rayon-petit); }
.chapo { font-size: 1.15rem; font-weight: 600; color: var(--encre); }
.texte h2, .texte .h3, .texte h3.spip { font-size: 1.45rem; margin-top: 1.8em; color: var(--bleu-fonce); }
.texte ul.spip { padding-left: 1.2em; }
.texte ul.spip li::marker { color: var(--vert-fonce); }
.texte blockquote { margin: 1.5em 0; padding: 0.8em 1.2em; border-left: 4px solid var(--vert); background: var(--gris-clair); border-radius: 0 var(--rayon-petit) var(--rayon-petit) 0; }
.texte table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.texte th, .texte td { border: 1px solid var(--bord); padding: 0.4em 0.7em; }
.texte .spip_doc_inner, .texte figure { max-width: 100%; }
.texte .spip_documents_center { text-align: center; margin-block: 1.5em; }
.texte .spip_documents_center img { margin-inline: auto; }
.texte iframe { max-width: 100%; border: 0; border-radius: var(--rayon-petit); }
.texte a[href^="mailto:"] { overflow-wrap: anywhere; }
.texte .spip_out::after, .texte a.spip_out::after { content: " ↗"; font-size: 0.8em; }
.texte .gis_map, .texte [id^="map"] { border-radius: var(--rayon); }
.ps { margin-top: 2rem; padding: 1.25rem 1.5rem; background: var(--gris-clair); border-radius: var(--rayon); }
.notes { font-size: 0.9rem; color: var(--gris); border-top: 1px solid var(--bord); margin-top: 2rem; padding-top: 1rem; }

/* mise en page article + colonne latérale */
.colonnes { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.colonnes--simple { grid-template-columns: minmax(0, var(--largeur-texte)); justify-content: center; }
@media (max-width: 60em) { .colonnes { grid-template-columns: minmax(0, 1fr); } }
.aside { display: flex; flex-direction: column; gap: 1.25rem; }
.encart { background: var(--gris-clair); border-radius: var(--rayon); padding: 1.25rem 1.4rem; }
.encart h2 { font-size: 1.1rem; margin-bottom: 0.7rem; color: var(--bleu-fonce); }
.encart ul { list-style: none; padding: 0; margin: 0; }
.encart li + li { margin-top: 0.35rem; }
.encart--contact { background: var(--bleu-clair); }
.encart--contact .ps-texte { line-height: 1.6; }
.encart .gis_map, .encart [id^="map"] { border-radius: var(--rayon-petit); }
.logo-article { margin: 0 0 1.5rem; }
.logo-article img { border-radius: var(--rayon); width: 100%; max-height: 32rem; object-fit: cover; }
.logo-article--contain img { width: auto; max-height: 16rem; object-fit: contain; }

/* portfolio */
.portfolio { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.portfolio a { display: block; border-radius: var(--rayon-petit); overflow: hidden; aspect-ratio: 1; }
.portfolio img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.portfolio a:hover img { transform: scale(1.05); }
.documents-joints { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.documents-joints a { display: inline-flex; gap: 0.5em; align-items: center; font-weight: 700; }
.documents-joints small { color: var(--gris); font-weight: 400; }

/* ---- Producteurs : carte + filtres ---- */
.carte-producteurs { border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); margin-bottom: 2.5rem; }
.filtres { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.75rem; }
.filtres-ligne { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.filtres-libelle { font-weight: 800; color: var(--gris); margin-right: 0.4rem; font-size: 0.95rem; }
.filtre {
	border: 2px solid var(--bord); background: #fff; color: var(--encre);
	border-radius: 999px; padding: 0.25em 0.85em; font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer;
}
.filtre:hover { border-color: var(--vert); }
.filtre[aria-pressed="true"] { background: var(--vert); border-color: var(--vert); color: var(--encre); }
.filtres-compte { color: var(--gris); font-size: 0.95rem; margin: 0 0 1rem; }
.producteur[hidden] { display: none; }

/* ---- Pagination ---- */
.pagination { margin-top: 2rem; text-align: center; }
.pagination .pages a, .pagination .pages strong, .pagination .pages span {
	display: inline-block; min-width: 2.2em; padding: 0.3em 0.6em; margin: 0.1em; border-radius: var(--rayon-petit);
}
.pagination .pages .on { background: var(--bleu); color: #fff; }

/* ---- Pied de page ---- */
.site-footer { background: #17324a; color: #d7e3ee; margin-top: auto; font-size: 0.97rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--jaune); }
.footer-grille { display: grid; gap: 2rem; grid-template-columns: 1.3fr 1fr 1fr 1fr; padding-block: 3rem 2rem; }
.footer-grille h2 { color: #fff; font-size: 1.05rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.8rem; }
.footer-grille ul { list-style: none; padding: 0; margin: 0; }
.footer-grille li + li { margin-top: 0.45rem; }
.footer-marque img { width: 84px; height: 84px; background: #fff; border-radius: 50%; padding: 4px; }
.footer-marque p { margin-top: 0.8rem; }
.footer-antenne strong { display: block; color: #fff; }
.footer-antenne small { color: #b5c6d6; }
.footer-bas { border-top: 1px solid rgb(255 255 255 / 0.12); padding-block: 1.1rem; font-size: 0.88rem; color: #b5c6d6; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
@media (max-width: 60em) { .footer-grille { grid-template-columns: 1fr 1fr; } }
@media (max-width: 36em) { .footer-grille { grid-template-columns: 1fr; } }

/* ---- Divers SPIP ---- */
.spip_doc_titre, .spip_doc_descriptif { font-size: 0.9rem; color: var(--gris); }
.reponse_formulaire { padding: 0.8em 1em; border-radius: var(--rayon-petit); background: var(--vert-clair); }
.reponse_formulaire_erreur { background: #fde8e6; }
.carte-image--vide { display: grid; place-items: center; }
.carte-image--vide img { width: 38%; height: auto; object-fit: contain; opacity: 0.9; }

/* ---- Vidéos (plugin oEmbed) : pleine largeur du texte ---- */
.texte .oembed, .texte .spip_document_video, .texte figure.spip_document { max-width: 100% !important; margin: 1.5em 0 !important; margin-inline: 0 !important; }
.texte .oembed .rwd-video-container { border-radius: var(--rayon); overflow: hidden; }
.texte .spip_document_video figcaption, .texte .spip_document_video .spip_doc_legende { padding-inline: 0; font-size: 0.9rem; color: var(--gris); }
.texte .spip_doc_inner { margin: 0; }
.texte .oembed.oe-video { max-width: 100% !important; padding: 0; border: 0; background: none; }
