/*
Theme Name:        Fonds Plancher
Theme URI:         https://fondsplancher.org/
Author:            Fonds Plancher
Author URI:        https://fondsplancher.org/
Description:       Thème de blocs (Full Site Editing) conforme au Cahier de normes graphiques du Fonds Plancher v1.1 (novembre 2026) : palette charbon / or safran, Trebuchet MS (titres) et Arial (texte), logos officiels v1.1.
Version:           1.1.1
Requires at least: 6.6
Tested up to:      7.1
Requires PHP:      7.4
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       fonds-plancher

Les fichiers de marque (logos, mots-symbole) restent la propriété du Fonds
Plancher et ne peuvent être redistribués en dehors du présent thème sans
autorisation écrite.
*/

/* ------------------------------------------------------------------
   Styles de blocs du Fonds Plancher (choisis dans l'éditeur :
   bloc sélectionné → panneau de droite → « Styles »).
   Couleurs et polices : voir theme.json (normes v1.1).
------------------------------------------------------------------ */

:root {
	--fp-ligne: rgba(42, 42, 42, 0.12);
	--fp-ombre: 0 18px 50px -24px rgba(26, 26, 26, 0.45);
	--fp-ombre-legere: 0 8px 24px -16px rgba(26, 26, 26, 0.35);
}

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 90px; }

/* En-tête fixe en haut de l'écran */
.fp-entete {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--fp-ligne);
}
.admin-bar .fp-entete { top: 32px; }
@media (max-width: 782px) { .admin-bar .fp-entete { top: 46px; } }
.fp-entete .wp-block-navigation a:not(.wp-element-button) { text-decoration: none; }
.fp-entete .wp-block-navigation a:hover { color: var(--wp--preset--color--or-texte); }

/* Surtitre : petit intertitre en capitales, précédé d'un filet or */
.is-style-fp-surtitre {
	font-family: var(--wp--preset--font-family--titres);
	font-weight: 700;
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--wp--preset--color--or-texte);
	display: flex;
	align-items: center;
	gap: 0.6rem;
}
.is-style-fp-surtitre::before {
	content: "";
	width: 26px;
	height: 3px;
	background: var(--wp--preset--color--or-safran);
	flex: none;
}
.has-charbon-background-color .is-style-fp-surtitre,
.has-noir-profond-background-color .is-style-fp-surtitre {
	color: var(--wp--preset--color--or-safran);
}

/* Carte blanche */
.is-style-fp-carte {
	background: var(--wp--preset--color--blanc);
	color: var(--wp--preset--color--charbon);
	border: 1px solid var(--fp-ligne);
	border-radius: 16px;
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
	box-shadow: var(--fp-ombre-legere);
}
/* Carte avec filet or à gauche */
.is-style-fp-carte-filet {
	background: var(--wp--preset--color--blanc);
	color: var(--wp--preset--color--charbon);
	border: 1px solid var(--fp-ligne);
	border-left: 5px solid var(--wp--preset--color--or-safran);
	border-radius: 16px;
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
	box-shadow: var(--fp-ombre-legere);
}
/* Carte translucide sur fond charbon */
.is-style-fp-carte-sombre {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 18px;
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
}
/* Chiffre-clé : filet or à gauche */
.is-style-fp-chiffre {
	border-left: 3px solid var(--wp--preset--color--or-safran);
	padding-left: 1.25rem;
}
/* Chiffre-clé : filet or en haut, fond gris perle */
.is-style-fp-chiffre-haut {
	background: var(--wp--preset--color--gris-perle);
	border-top: 4px solid var(--wp--preset--color--or-safran);
	border-radius: 14px;
	padding: 1.1rem 1.1rem 1rem;
}
/* Encadré crème */
.is-style-fp-encadre {
	background: var(--wp--preset--color--creme);
	color: var(--wp--preset--color--charbon);
	border-radius: 12px;
	padding: 1rem 1.25rem;
}
/* Bandeau d'appel : charbon, filet or en haut */
.is-style-fp-appel {
	background: var(--wp--preset--color--charbon);
	color: var(--wp--preset--color--blanc);
	border-top: 6px solid var(--wp--preset--color--or-safran);
	border-radius: 24px;
	padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 5vw, 4rem);
	box-shadow: var(--fp-ombre);
}

/* Liste à coches or */
.is-style-fp-coches { list-style: none; padding-left: 0; }
.is-style-fp-coches li { position: relative; padding-left: 2.1rem; margin-bottom: 0.6rem; }
.is-style-fp-coches li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0.15em;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: 50%;
	background: var(--wp--preset--color--or-safran);
	color: var(--wp--preset--color--noir-profond);
	font-size: 0.75rem;
	font-weight: 700;
	display: grid;
	place-items: center;
}
/* Liste à puces or */
.is-style-fp-puces { list-style: none; padding-left: 0; }
.is-style-fp-puces li { position: relative; padding-left: 1.1rem; margin-bottom: 0.5rem; }
.is-style-fp-puces li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.6em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--wp--preset--color--or-safran);
}

/* Tableau « fiche » : libellé à gauche, valeur en gras à droite */
.is-style-fp-fiche table { border-collapse: collapse; width: 100%; }
.is-style-fp-fiche td,
.is-style-fp-fiche th { border: 0; border-bottom: 1px solid var(--fp-ligne); padding: 0.7rem 0; vertical-align: top; }
.is-style-fp-fiche tr:last-child td { border-bottom: 0; }
.is-style-fp-fiche td:last-child { font-weight: 700; text-align: right; padding-left: 1rem; }
.is-style-fp-fiche td:first-child { color: var(--wp--preset--color--gris-moyen); }
.has-charbon-background-color .is-style-fp-fiche td,
.is-style-fp-carte-sombre .is-style-fp-fiche td { border-bottom-color: rgba(255, 255, 255, 0.14); }
.has-charbon-background-color .is-style-fp-fiche td:first-child,
.is-style-fp-carte-sombre .is-style-fp-fiche td:first-child { color: rgba(255, 255, 255, 0.75); }
.has-charbon-background-color .is-style-fp-fiche td:last-child,
.is-style-fp-carte-sombre .is-style-fp-fiche td:last-child { color: var(--wp--preset--color--or-safran); }

/* Image dans une carte blanche ombrée */
.is-style-fp-image-carte img {
	background: var(--wp--preset--color--blanc);
	border: 1px solid var(--fp-ligne);
	border-radius: 20px;
	padding: clamp(0.75rem, 2vw, 1.5rem);
	box-shadow: var(--fp-ombre);
}

/* Liens dans les sections foncées */
.has-charbon-background-color a:where(:not(.wp-element-button)),
.has-noir-profond-background-color a:where(:not(.wp-element-button)) {
	color: inherit;
}
.has-charbon-background-color a:where(:not(.wp-element-button)):hover,
.has-noir-profond-background-color a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--or-safran);
}
/* Sur fond foncé, le texte en gras ressort en or safran */
.has-charbon-background-color p strong { color: var(--wp--preset--color--or-safran); }

/* Logos des membres : hauteur uniforme */
.fp-logos .wp-block-image img {
	max-height: 72px;
	width: auto;
	max-width: 150px;
	object-fit: contain;
	margin-inline: auto;
}

/* Cartes d'actualités (bloc Requête) */
.fp-actualites .wp-block-post-template > li { display: flex; }
.fp-actualites .wp-block-post-template > li > .wp-block-group { flex: 1; }
.fp-actualites .wp-block-post-terms a { text-decoration: none; }

/* Pied de page */
.fp-pied a { text-decoration: none; }
.fp-pied .wp-block-list { list-style: none; padding-left: 0; }
.fp-pied .wp-block-list li { margin-bottom: 0.55rem; }

/* Cartes blanches posées sur une section foncée : on revient aux couleurs claires */
.is-style-fp-carte p strong,
.is-style-fp-encadre p strong { color: inherit; }
.is-style-fp-carte .is-style-fp-fiche td { border-bottom-color: var(--fp-ligne); }
.is-style-fp-carte .is-style-fp-fiche td:first-child { color: var(--wp--preset--color--gris-moyen); }
.is-style-fp-carte .is-style-fp-fiche td:last-child { color: var(--wp--preset--color--charbon); }
.is-style-fp-carte .is-style-fp-surtitre { color: var(--wp--preset--color--or-texte); }
.is-style-fp-carte a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--or-texte); }
.has-charbon-background-color figcaption { color: rgba(255, 255, 255, 0.75); }
.has-charbon-background-color .wp-block-button.is-style-outline .wp-block-button__link { color: var(--wp--preset--color--blanc); }


/* Apparition discrète au défilement (assets/apparition.js) */
.fp-apparition { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fp-apparition.fp-visible { opacity: 1; transform: none; }
.fp-apparition .fp-apparition { transform: translateY(16px); }
@media (prefers-reduced-motion: reduce) { .fp-apparition { opacity: 1; transform: none; transition: none; } }

/* ---- Fidélité à la page d'origine (novembre 2026) ---- */

/* Héros : pastille « 30 M$ » posée sur le schéma */
.fp-hero-figure { position: relative; }
.fp-hero-figure .fp-badge { position: absolute; left: -22px; bottom: 28px; max-width: 240px; margin: 0; box-shadow: var(--fp-ombre); z-index: 2; }
@media (max-width: 900px) { .fp-hero-figure .fp-badge { position: static; max-width: none; margin-top: 1rem; } }

/* Cartes d'actualités */
.fp-carte-actu { padding: 22px 24px !important; }
.fp-carte-actu .wp-block-post-excerpt { flex: 1; }
.fp-actualites .wp-block-post-template > li > .fp-carte-actu { display: flex; flex-direction: column; min-height: 300px; }
.fp-actualites .wp-block-post-excerpt__more-text { margin-top: auto; }
.fp-date { font-family: var(--wp--preset--font-family--titres); font-weight: 700; font-size: 0.95rem; color: var(--wp--preset--color--charbon); margin: 0; }
.fp-date:empty { display: none; }

/* Lignes à pastille, icône ou numéro */
.fp-ligne > .wp-block-group { flex: 1; }
.fp-icone { flex: none; margin: 0 !important; }
.fp-icone img { width: 42px; height: 42px; border-radius: 10px; }
.fp-pastille, .fp-numero {
	flex: none; display: grid; place-items: center; margin: 0 !important;
	font-family: var(--wp--preset--font-family--titres); font-weight: 700;
}
.fp-pastille { width: 38px; height: 38px; border-radius: 50%; background: var(--wp--preset--color--charbon); color: var(--wp--preset--color--or-safran); }
.fp-numero { width: 34px; height: 34px; border-radius: 9px; background: var(--wp--preset--color--creme); color: var(--wp--preset--color--or-texte); }

/* Citation : demi-surlignage crème */
.fp-citation mark { background: linear-gradient(transparent 60%, var(--wp--preset--color--creme) 60%) !important; color: inherit; }

/* Sections foncées : texte légèrement atténué, mots-clés en or */
.fp-sombre :where(p, li):not(.is-style-fp-carte *):not(.is-style-fp-surtitre) { color: rgba(255, 255, 255, 0.86); }
.fp-sombre :where(h2, h3, h4):not(.is-style-fp-carte *) { color: var(--wp--preset--color--blanc); }
.fp-sombre :where(strong, b):not(.is-style-fp-carte *) { color: var(--wp--preset--color--or-safran) !important; }
.fp-sombre :where(a strong, strong a) { color: var(--wp--preset--color--or-safran); }

/* « Un PRRIMM pour votre ville » : mots en gras dorés */
.fp-gras-or p strong { color: var(--wp--preset--color--or-texte); }

/* Ligne de temps */
.fp-ligne-temps { position: relative; }
.fp-jalon { position: relative; padding: 2.2rem 1.3rem 0.5rem 0; }
.fp-jalon::before { content: ""; position: absolute; top: 7px; left: 0; right: 0; height: 2px; background: var(--fp-ligne); }
.fp-jalon::after {
	content: ""; position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%;
	background: var(--wp--preset--color--or-safran); border: 3px solid var(--wp--preset--color--blanc); box-shadow: 0 0 0 2px var(--wp--preset--color--or-safran); box-sizing: border-box;
}
.fp-jalon-avenir::after { background: var(--wp--preset--color--blanc); box-shadow: 0 0 0 2px var(--wp--preset--color--or-fonce); }
