/*
 * Pied de page : bandeau rouge pleine largeur, colonne de contenu de 1120 px (--hd-col, comme le header),
 * trois colonnes, ligne de copyright, puis une ligne blanche sur SPIP.
 * Les tailles suivent la même unité --u que le reste du site (1 u = 3,78 px à 1920 px).
 */
.pied {
	--u: min(3.7795276px, calc((100vw - var(--sbw, 0px)) / 296.34));
	/* sort du conteneur .page du thème pour occuper toute la largeur de la fenêtre */
	position: relative; box-sizing: border-box; clear: both;
	width: calc(100vw - var(--sbw, 0px)); max-width: none;
	margin: calc(10 * var(--u)) 0 0 calc(50% - (100vw - var(--sbw, 0px)) / 2);
	padding: 0; border: 0; background: #fff;
	font-family: 'Barlow Semi Condensed', sans-serif;
}
.pied__rouge { background: #1d1c1d; color: #fff; padding: calc(12 * var(--u)) 0 calc(9 * var(--u)); }
.pied__col { width: var(--hd-col, calc(296.34 * var(--u))); max-width: 100%; margin: 0 auto; }
.pied :where(h2, p, ul, li, address) { margin: 0; padding: 0; list-style: none; font-style: normal; }
.pied a, .pied a:visited { background: transparent; color: #fff; text-decoration: none; border: 0; }
.pied a:hover, .pied a:focus-visible, .pied a:active { background: transparent !important; color: #fff !important; text-decoration: underline; text-underline-offset: .2em; }

.pied__haut { display: grid; grid-template-columns: 1fr 1.25fr 1.4fr; gap: calc(14 * var(--u)); align-items: start; }
.pied .pied__titre { font-weight: 800; font-size: calc(6 * var(--u)); line-height: 1.15; text-transform: uppercase; letter-spacing: calc(.2 * var(--u)); margin-bottom: calc(4 * var(--u)); }
.pied__bloc { font-size: calc(4.6 * var(--u)); line-height: 1.4; }
.pied__bloc p + p, .pied__bloc address p { margin-top: calc(2.2 * var(--u)); }
.pied__rubriques > ul > li + li { margin-top: calc(1.6 * var(--u)); }
.pied__rubriques > ul > li > a { font-weight: 600; text-transform: uppercase; letter-spacing: calc(.15 * var(--u)); }
.pied__rubriques ul ul { margin: calc(.8 * var(--u)) 0 calc(1.8 * var(--u)) calc(3 * var(--u)); font-size: .92em; opacity: .92; }
.pied__coordonnees address { margin-top: calc(4 * var(--u)); }
.pied__coordonnees strong { font-weight: 700; text-transform: uppercase; letter-spacing: calc(.15 * var(--u)); }

/* Newsletter + adhésion */
.pied__form { margin-top: calc(3.4 * var(--u)); }
.pied__form-ligne { position: relative; display: flex; gap: calc(2 * var(--u)); }
.pied .pied__form input { flex: 1 1 auto; min-width: 0; box-sizing: border-box; height: calc(10 * var(--u)); margin: 0; padding: 0 calc(1 * var(--u)); border: 0; border-bottom: 2px solid #fff; border-radius: 0; background: transparent; color: #fff; font: inherit; font-size: calc(4.4 * var(--u)); transition: box-shadow .15s; }
.pied .pied__form input:focus { outline: none; box-shadow: 0 3px 0 0 var(--cgt-rouge, #c30c07); }
.pied .pied__form input::placeholder { color: rgba(255, 255, 255, .65); opacity: 1; }
.pied .pied__form button, .pied .pied__adherer {
	display: inline-flex; align-items: center; justify-content: center; gap: calc(2.4 * var(--u));
	box-sizing: border-box; height: calc(10 * var(--u)); margin: 0; padding: 0 calc(4.6 * var(--u)); border: 0; border-radius: 0; cursor: pointer;
	font: inherit; font-weight: 700; font-size: calc(4.6 * var(--u)); letter-spacing: calc(.2 * var(--u)); text-transform: uppercase; white-space: nowrap;
}

.pied .pied__form button { background: var(--cgt-rouge, #c30c07); color: #fff; }
.pied .pied__form button:hover, .pied .pied__form button:focus-visible { background: #fff; color: #1d1c1d; }
.pied__adhesion { margin-top: calc(9 * var(--u)); }
.pied .pied__adherer, .pied .pied__adherer:visited { background: #fff; color: var(--cgt-rouge, #c30c07); }
.pied .pied__adherer:hover, .pied .pied__adherer:focus-visible, .pied .pied__adherer:active { background: var(--cgt-rouge, #c30c07) !important; color: #fff !important; text-decoration: none; }
.pied__poing { transition: filter .15s; }
.pied .pied__adherer:hover .pied__poing, .pied .pied__adherer:focus-visible .pied__poing, .pied .pied__adherer:active .pied__poing { filter: brightness(0) invert(1); }
.pied__poing { display: block; flex: none; width: auto; height: calc(6.8 * var(--u)); max-width: none; }
.pied__adhesion { display: flex; flex-direction: column; align-items: flex-start; }
.pied__adhesion .pied__adherer { align-self: center; }

/* Ligne du bas */
.pied__bas { display: flex; align-items: center; gap: calc(8 * var(--u)); margin-top: calc(11 * var(--u)); padding-top: calc(5 * var(--u)); border-top: 1px solid rgba(255, 255, 255, .45); font-size: calc(4.2 * var(--u)); }
.pied__mentions + .pied__copyright::before { content: "|"; margin-right: calc(4 * var(--u)); opacity: .7; }
.pied__mentions { margin: 0 calc(-4 * var(--u)) 0 0 !important; }
.pied__copyright { margin-right: auto !important; }
.pied-reseaux { display: flex; flex-wrap: wrap; gap: calc(3 * var(--u)); margin: 0; }
.pied-reseau { display: block; width: calc(6.6 * var(--u)); height: calc(6.6 * var(--u)); }
.pied-reseau svg { display: block; width: 100%; height: 100%; max-width: none; }
.pied-reseau:not(.pied-reseau--rss) path { fill: #fff; }
.pied-reseau:hover, .pied-reseau:focus-visible { opacity: .8; text-decoration: none !important; }

/* Ligne blanche en dessous : texte noir centré sur une ligne */
.pied__spip { margin: 0; padding: calc(3 * var(--u)) calc(4 * var(--u)) calc(1.6 * var(--u)); background: #fff; color: #000; text-align: center; font-size: calc(4 * var(--u)); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pied .pied__spip a, .pied .pied__spip a:visited { color: var(--cgt-rouge, #c30c07); font-weight: 700; text-decoration: underline; }
.pied .pied__spip a:hover, .pied .pied__spip a:focus-visible { color: #000 !important; }

/* Compact (sous 900 px) : une colonne, tailles en pixels lisibles */
@media (max-width: 899.98px) {
	.pied { margin-top: 32px; }
	.pied__rouge { padding: 28px 0 22px; }
	.pied__col { width: auto; padding: 0 16px; }
	.pied__haut { grid-template-columns: 1fr; gap: 28px; }
	.pied .pied__titre { font-size: 24px; margin-bottom: 10px; }
	.pied__bloc { font-size: 17px; }
	.pied__bloc p + p, .pied__bloc address p { margin-top: 8px; }
	.pied__rubriques > ul > li + li { margin-top: 6px; }
	.pied__rubriques ul ul { margin: 3px 0 6px 12px; }
	.pied__coordonnees address { margin-top: 14px; }
	.pied__form { margin-top: 12px; gap: 8px; }
	.pied .pied__form input { height: 44px; padding: 0 4px; font-size: 17px; }
	.pied .pied__form button, .pied .pied__adherer { height: 44px; padding: 0 16px; font-size: 17px; gap: 10px; }
	.pied__adhesion { margin-top: 28px; }
	.pied__poing { height: 28px; }
	.pied__bas { flex-wrap: wrap; gap: 12px 20px; margin-top: 28px; padding-top: 18px; font-size: 15px; }
	.pied__mentions { margin: 0 -8px 0 0 !important; }
	.pied__mentions + .pied__copyright::before { margin-right: 8px; }
	.pied-reseaux { gap: 10px; }
	.pied-reseau { width: 28px; height: 28px; }
	.pied__spip { padding: 12px 16px 6px; font-size: 14px; white-space: normal; }
}

/* aucune marge sous la ligne blanche : le pied de page finit au bas de la fenêtre */
body:has(.pied) { padding-bottom: 0; }
.page:has(> .pied) { margin-bottom: 0; padding-bottom: 0; }

.pied__nl-rgpd { margin: calc(2 * var(--u)) 0 0; font-size: calc(3.6 * var(--u)); opacity: .8; }
.pied__nl-ok, .pied__nl-err { margin: calc(3.4 * var(--u)) 0 0; font-weight: 600; }
.pied__nl-err { color: #fff; background: var(--cgt-rouge, #c30c07); padding: calc(1.5 * var(--u)) calc(2.4 * var(--u)); }
.pied__form + .pied__nl-err, .pied__form .pied__nl-err { margin-top: calc(2 * var(--u)); }
