/* Centre Sahélien pour la Biodiversité - page « Formations » v2 (12 nov. 2026), préfixe .csb-fv-
   Reprend la maquette claude/maquettes/formations-v2.html avec les polices et variables du thème. Chargé après csb.css et csb-anime.css.
   Les apparitions (data-rv) sont gérées par assets/js/csb-anime.js ; ce fichier ne cache rien par lui-même.
   Ne pas modifier csb-formation.css ni csb-formations.css (encore utilisés si les pages de filière sont réactivées). */

main.csb-fv {
	--fv-foret: #004540; --fv-vegetal: #23734A; --fv-mil: #FFE175; --fv-encre: #16231A;
	--fv-texte: rgba(22, 35, 26, .82); --fv-doux: rgba(22, 35, 26, .66); --fv-trait: rgba(0, 69, 64, .14); --fv-pale: #EEF4EF;
	--fv-titre: var(--csb-font-titre, Georgia, serif); --fv-sans: var(--csb-font-texte, system-ui, sans-serif);
	--fv-ease: cubic-bezier(.2, .7, .2, 1);
	font-family: var(--fv-sans); color: var(--fv-encre);
}
main.csb-fv *, main.csb-fv *::before, main.csb-fv *::after { box-sizing: border-box; }
main.csb-fv img { display: block; max-width: 100%; }
.csb-fv-wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* --- Titres et paragraphes : spécificité renforcée (le thème style h1 à h3, p, ul, a) --- */
body main.csb-fv :is(h1, h2, h3):not(#csb) { font-family: var(--fv-titre); font-weight: 700; line-height: 1.15; margin: 0; color: var(--fv-encre); text-transform: none; letter-spacing: normal; }
body main.csb-fv h2:not(#csb) { font-size: clamp(28px, 22px + 1.4vw, 40px); letter-spacing: -.01em; }
body main.csb-fv p:not(#csb) { margin: 0; text-align: left; hyphens: none; max-width: none; }
body main.csb-fv :is(ul, ol, dl):not(#csb) { margin: 0; padding: 0; list-style: none; }
body main.csb-fv :is(dd):not(#csb) { margin: 0; }
main.csb-fv :focus-visible { outline: 3px solid var(--fv-foret); outline-offset: 3px; border-radius: 4px; }

/* --- Boutons et liens --- */
.csb-fv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 100px; font: inherit; font-size: 15px; font-weight: 700; line-height: 1; text-decoration: none; cursor: pointer; transition: background-color .25s ease, color .25s ease, transform .25s ease; }
body main.csb-fv .csb-fv-btn-mil:not(#csb) { background: var(--fv-mil); color: var(--fv-foret); }
body main.csb-fv .csb-fv-btn-mil:hover:not(#csb) { background: #FFD84A; color: var(--fv-foret); }
body main.csb-fv .csb-fv-btn-ligne:not(#csb) { background: transparent; color: var(--fv-foret); box-shadow: inset 0 0 0 1.5px var(--fv-foret); }
body main.csb-fv .csb-fv-btn-ligne:hover:not(#csb) { background: var(--fv-foret); color: #fff; }
body main.csb-fv .csb-fv-lien:not(#csb) { display: inline-block; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--fv-foret); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; line-height: 44px; cursor: pointer; }
body main.csb-fv .csb-fv-lien.is-clair:not(#csb) { color: #fff; }

/* --- 1. Bandeau : photo pleine largeur ; dégradé forêt à gauche seulement (de bas en haut sur mobile) --- */
.csb-fv-bandeau { position: relative; overflow: hidden; background: var(--fv-foret); color: #fff; isolation: isolate; }
.csb-fv-fond { position: absolute; inset: 0; z-index: -2; }
.csb-fv-fond picture, .csb-fv-fond img { width: 100%; height: 100%; }
.csb-fv-fond img { object-fit: cover; object-position: 70% 40%; }
.csb-fv-bandeau::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 52, 48, .94) 0%, rgba(0, 52, 48, .86) 34%, rgba(0, 52, 48, .35) 62%, rgba(0, 52, 48, 0) 82%); }
.csb-fv-bandeau-int { display: flex; align-items: center; min-height: min(620px, 78vh); }
.csb-fv-bandeau-texte { max-width: 600px; padding: 72px 0; }
.csb-fv-ariane { margin-bottom: 28px; font-size: 13.5px; color: rgba(255, 255, 255, .78); }
.csb-fv-ariane a { color: #fff; }
body main.csb-fv .csb-fv-bandeau h1:not(#csb) { max-width: 14ch; font-size: clamp(36px, 26px + 2.4vw, 60px); letter-spacing: -.02em; color: #fff; }
body main.csb-fv .csb-fv-bandeau-phrase:not(#csb) { margin-top: 18px; max-width: 44ch; font-size: 18px; line-height: 1.6; color: rgba(255, 255, 255, .88); }
.csb-fv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 30px; }

/* --- 2. Apprendre en pratiquant --- */
.csb-fv-intro { padding: 88px 0 72px; background: #fff; }
.csb-fv-intro-grille { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 72px; }
.csb-fv-intro-texte h2 { margin-bottom: 22px; }
body main.csb-fv .csb-fv-intro-texte p:not(#csb) { max-width: 58ch; font-size: 18px; line-height: 1.65; color: var(--fv-texte); }
body main.csb-fv .csb-fv-intro-texte p + p:not(#csb) { margin-top: 16px; }
body main.csb-fv .csb-fv-faits-titre:not(#csb) { margin-bottom: 12px; font-size: 15px; font-weight: 700; color: var(--fv-doux); }
.csb-fv-faits { border-top: 1px solid var(--fv-trait); }
.csb-fv-faits > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--fv-trait); }
body main.csb-fv .csb-fv-faits dt:not(#csb) { font-size: 15px; font-weight: 700; color: var(--fv-foret); }
body main.csb-fv .csb-fv-faits dd:not(#csb) { font-size: 15px; color: var(--fv-texte); }

/* --- 3. Les filières : index en lignes --- */
.csb-fv-filieres { padding: 24px 0 96px; background: #fff; }
.csb-fv-sec-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
body main.csb-fv .csb-fv-sec-tete p:not(#csb) { max-width: 46ch; color: var(--fv-texte); }
.csb-fv-trait { display: block; height: 1.5px; background: var(--fv-foret); transform-origin: 0 50%; }
.csb-fv-liste { border-top: 0; }
.csb-fv-filiere { position: relative; display: grid; grid-template-columns: 260px minmax(0, 1fr) auto; gap: 36px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--fv-trait); }
.csb-fv-filiere::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--fv-foret); transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--fv-ease); }
.csb-fv-filiere-photo { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; background: var(--fv-pale); }
.csb-fv-filiere-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--fv-ease); }
body main.csb-fv .csb-fv-filiere h3:not(#csb) { font-size: clamp(24px, 20px + .9vw, 32px); }
.csb-fv-filiere h3 button { all: unset; cursor: pointer; }
main.csb-fv .csb-fv-filiere h3 button:focus-visible { outline: 3px solid var(--fv-foret); outline-offset: 4px; border-radius: 4px; }
body main.csb-fv .csb-fv-filiere-accroche:not(#csb) { margin-top: 8px; max-width: 56ch; color: var(--fv-texte); }
.csb-fv-themes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
body main.csb-fv ul.csb-fv-themes:not(#csb) { margin-top: 14px; }
.csb-fv-themes li { padding: 4px 11px; border-radius: 6px; background: var(--fv-pale); font-size: 13.5px; font-weight: 600; color: var(--fv-foret); }
body main.csb-fv .csb-fv-session:not(#csb) { margin-top: 12px; font-size: 14px; color: var(--fv-doux); }
.csb-fv-session strong { color: var(--fv-vegetal); }
.csb-fv-session-statut.is-passe { color: var(--fv-doux); }
.csb-fv-filiere-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; white-space: nowrap; }

/* --- 4. Calendrier des sessions --- */
.csb-fv-calendrier { padding: 88px 0; background: var(--fv-pale); }
.csb-fv-cal-grille { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; }
body main.csb-fv .csb-fv-cal-gauche p:not(#csb) { margin-top: 14px; max-width: 36ch; color: var(--fv-texte); }
.csb-fv-cal-gauche .csb-fv-lien { margin-top: 20px; }
.csb-fv-rdv { border-top: 1.5px solid var(--fv-foret); }
.csb-fv-rdv li { display: grid; grid-template-columns: 170px minmax(0, 1fr) 110px; gap: 24px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--fv-trait); }
.csb-fv-rdv time { font-weight: 700; color: var(--fv-foret); font-variant-numeric: tabular-nums; }
body main.csb-fv .csb-fv-rdv h3:not(#csb) { font-family: var(--fv-sans); font-size: 16.5px; font-weight: 700; line-height: 1.4; }
body main.csb-fv .csb-fv-public:not(#csb) { margin-top: 4px; font-size: 14px; color: var(--fv-doux); }
.csb-fv-statut { justify-self: end; padding: 3px 10px; border-radius: 100px; background: var(--fv-mil); font-size: 12.5px; font-weight: 700; color: var(--fv-foret); white-space: nowrap; }
.csb-fv-statut.is-passe { background: none; box-shadow: inset 0 0 0 1px rgba(0, 69, 64, .25); color: var(--fv-doux); }
/* Pastille « En cours » : le point grossit une seule fois */
.csb-fv-statut.is-en-cours::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--fv-vegetal); vertical-align: middle; animation: csbFvPouls 1.6s ease .6s 1; }
@keyframes csbFvPouls { 0% { box-shadow: 0 0 0 0 rgba(35, 115, 74, .6); } 100% { box-shadow: 0 0 0 8px rgba(35, 115, 74, 0); } }

/* --- 5. D'autres thèmes déjà abordés --- */
.csb-fv-autres { padding: 80px 0; background: var(--fv-foret); color: #fff; }
.csb-fv-autres-grille { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; }
body main.csb-fv .csb-fv-autres h2:not(#csb) { color: #fff; }
body main.csb-fv .csb-fv-autres-tete p:not(#csb) { margin-top: 14px; max-width: 36ch; color: rgba(255, 255, 255, .82); }
body main.csb-fv ul.csb-fv-autres-liste:not(#csb) { columns: 2; column-gap: 48px; }
.csb-fv-autres-liste li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .18); font-weight: 600; break-inside: avoid; }
.csb-fv-autres-liste li span { font-weight: 400; font-size: 14px; color: rgba(255, 255, 255, .72); white-space: nowrap; }

/* --- 6. Comment se déroule une formation --- */
.csb-fv-etapes { padding: 88px 0; background: #fff; }
body main.csb-fv ol.csb-fv-etapes-liste:not(#csb) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 36px; counter-reset: etape; }
.csb-fv-etapes-liste li { counter-increment: etape; margin-right: 32px; padding: 0 32px 0 0; border-right: 1px solid var(--fv-trait); }
.csb-fv-etapes-liste li:last-child { margin-right: 0; border-right: 0; }
.csb-fv-etapes-liste li::before { content: counter(etape); display: block; margin-bottom: 14px; font-family: var(--fv-titre); font-size: 44px; font-weight: 700; line-height: 1; color: var(--fv-foret); }
body main.csb-fv .csb-fv-etapes-liste h3:not(#csb) { margin-bottom: 8px; font-family: var(--fv-sans); font-size: 18px; }
body main.csb-fv .csb-fv-etapes-liste p:not(#csb) { color: var(--fv-texte); }
.csb-fv-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 40px; }

/* --- 7. FAQ --- */
.csb-fv-faq { padding: 0 0 96px; background: #fff; }
.csb-fv-faq-grille { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; padding-top: 80px; border-top: 1px solid var(--fv-trait); }
.csb-fv-faq details { border-bottom: 1px solid var(--fv-trait); }
.csb-fv-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 14px 0; font-size: 16.5px; font-weight: 700; cursor: pointer; list-style: none; }
.csb-fv-faq summary::-webkit-details-marker { display: none; }
.csb-fv-faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--fv-foret); }
.csb-fv-faq details[open] summary::after { content: "−"; }
body main.csb-fv .csb-fv-faq details p:not(#csb) { padding: 0 0 20px; max-width: 62ch; color: var(--fv-texte); }
.csb-fv-faq details[open] > p { animation: csbFvFaq .35s var(--fv-ease); }
@keyframes csbFvFaq { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* --- Fiche de formation : panneau latéral (ordinateur), feuille plein écran (mobile) --- */
dialog.csb-fv-fiche { margin: 0 0 0 auto; padding: 0; border: 0; width: min(640px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; background: #fff; color: var(--fv-encre, #16231A); box-shadow: -24px 0 60px rgba(0, 30, 25, .18); overflow: hidden; }
dialog.csb-fv-fiche::backdrop { background: rgba(0, 30, 26, .55); }
dialog.csb-fv-fiche[open] { animation: csbFvEntree .38s cubic-bezier(.2, .7, .2, 1); }
@keyframes csbFvEntree { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes csbFvMonte { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
html.csb-fiche-ouverte { overflow: hidden; }
.csb-fv-fiche-int { display: flex; flex-direction: column; height: 100%; }
.csb-fv-fiche-defil { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.csb-fv-fiche-photo { position: relative; aspect-ratio: 2 / 1; background: var(--fv-pale); }
.csb-fv-fiche-photo img { width: 100%; height: 100%; object-fit: cover; }
.csb-fv-fermer { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--fv-foret); font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.csb-fv-fiche-corps { padding: 30px 36px 36px; }
body main.csb-fv .csb-fv-fiche-corps h2:not(#csb) { font-size: clamp(28px, 24px + 1vw, 36px); }
body main.csb-fv .csb-fv-fiche-accroche:not(#csb) { margin-top: 10px; font-size: 17.5px; color: var(--fv-texte); }
body main.csb-fv .csb-fv-fiche-corps h3:not(#csb) { margin: 30px 0 12px; font-family: var(--fv-sans); font-size: 16px; font-weight: 700; color: var(--fv-foret); }
body main.csb-fv .csb-fv-txt:not(#csb) { color: var(--fv-texte); line-height: 1.65; }
.csb-fv-infos { margin-top: 24px; border-top: 1px solid var(--fv-trait); }
.csb-fv-infos > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--fv-trait); font-size: 15px; }
body main.csb-fv .csb-fv-infos dt:not(#csb) { font-weight: 600; color: var(--fv-doux); }
body main.csb-fv .csb-fv-infos dd:not(#csb) { font-weight: 600; }
.csb-fv-pratique li { position: relative; padding: 8px 0 8px 22px; border-bottom: 1px dashed var(--fv-trait); color: var(--fv-texte); }
.csb-fv-pratique li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 8px; height: 8px; border-radius: 2px; background: var(--fv-mil); box-shadow: inset 0 0 0 1.5px var(--fv-foret); }
body main.csb-fv ol.csb-fv-deroule:not(#csb) { counter-reset: etapefiche; }
.csb-fv-deroule li { counter-increment: etapefiche; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 10px 0; }
.csb-fv-deroule li::before { content: counter(etapefiche); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--fv-foret); color: #fff; font-size: 13.5px; font-weight: 700; }
.csb-fv-deroule strong { display: block; }
.csb-fv-deroule span { font-size: 15px; color: var(--fv-texte); }
body main.csb-fv .csb-fv-note:not(#csb) { margin-top: 22px; padding-left: 12px; border-left: 2px solid var(--fv-mil); font-size: 13.5px; color: var(--fv-doux); }
.csb-fv-fiche-pied { display: flex; align-items: center; gap: 14px; padding: 16px 36px; border-top: 1px solid var(--fv-trait); background: #fff; }
.csb-fv-fiche-pied .csb-fv-btn { flex: 1; }

/* Sans JavaScript (ou sans <dialog>) : les fiches s'affichent à la suite, sous la liste */
html:not(.csb-fiches-js) dialog.csb-fv-fiche { display: block; position: static; width: auto; max-width: none; height: auto; max-height: none; margin: 0; box-shadow: none; border-top: 1px solid var(--fv-trait); overflow: visible; }
html:not(.csb-fiches-js) .csb-fv-fiche-int { height: auto; }
html:not(.csb-fiches-js) .csb-fv-fiche-defil { overflow: visible; }
html:not(.csb-fiches-js) .csb-fv-fermer { display: none; }

/* --- Animations propres à cette page (les apparitions sont dans csb-anime.css / csb-anime.js) --- */
.csb-js .csb-fv-bandeau .csb-fv-fond img { transform: scale(1.08); transition: transform 1.8s var(--fv-ease); }
.csb-js .csb-fv-bandeau.pret .csb-fv-fond img { transform: none; }
.csb-fv-fond { will-change: auto; }
.csb-fv-lien { background-image: linear-gradient(currentColor, currentColor); background-size: 0 1.5px; background-repeat: no-repeat; background-position: 0 calc(100% - 8px); transition: background-size .35s ease; }
@media (hover: hover) {
	.csb-fv-btn:hover { transform: translateY(-2px); }
	.csb-fv-lien:hover { background-size: 100% 1.5px; text-decoration-color: transparent; }
	.csb-fv-filiere:hover::after { transform: scaleX(1); }
	.csb-fv-filiere:hover .csb-fv-filiere-photo img { transform: scale(1.04); }
}

/* --- Responsive --- */
@media (max-width: 991px) {
	.csb-fv-bandeau-int { align-items: flex-end; min-height: 560px; }
	.csb-fv-bandeau::before { background: linear-gradient(0deg, rgba(0, 52, 48, .95) 0%, rgba(0, 52, 48, .82) 45%, rgba(0, 52, 48, .2) 80%, rgba(0, 52, 48, .05) 100%); }
	.csb-fv-bandeau-texte { padding: 48px 0 44px; }
	.csb-fv-intro-grille, .csb-fv-cal-grille, .csb-fv-autres-grille, .csb-fv-faq-grille { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.csb-fv-filiere { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
	.csb-fv-filiere-actions { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; gap: 20px; }
}
@media (max-width: 640px) {
	.csb-fv-intro { padding: 56px 0 40px; }
	.csb-fv-sec-tete { flex-direction: column; align-items: flex-start; }
	.csb-fv-filiere { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 24px 0; }
	.csb-fv-filiere-actions { grid-column: 1; flex-wrap: wrap; }
	.csb-fv-filiere-actions .csb-fv-btn { flex: 1; }
	.csb-fv-rdv li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
	.csb-fv-rdv li > div { grid-column: 1 / -1; grid-row: 2; }
	.csb-fv-rdv .csb-fv-statut { grid-row: 1; grid-column: 2; }
	body main.csb-fv ul.csb-fv-autres-liste:not(#csb) { columns: 1; }
	body main.csb-fv ol.csb-fv-etapes-liste:not(#csb) { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.csb-fv-etapes-liste li { margin-right: 0; padding: 0 0 24px; border-right: 0; border-bottom: 1px solid var(--fv-trait); }
	.csb-fv-faits > div, .csb-fv-infos > div { grid-template-columns: 120px minmax(0, 1fr); }
	dialog.csb-fv-fiche { width: 100vw; margin: 0; }
	dialog.csb-fv-fiche[open] { animation-name: csbFvMonte; }
	.csb-fv-fiche-corps { padding: 24px 20px 28px; }
	.csb-fv-fiche-pied { padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); }
	.csb-fv-faq-grille { padding-top: 56px; }
	.csb-fv-faq, .csb-fv-etapes, .csb-fv-calendrier { padding-bottom: 64px; }
}

@media (prefers-reduced-motion: reduce) {
	.csb-js .csb-fv-bandeau .csb-fv-fond img { transform: none; transition: none; }
	dialog.csb-fv-fiche[open], .csb-fv-faq details[open] > p { animation: none; }
	.csb-fv-statut.is-en-cours::before { animation: none; }
	.csb-fv-btn, .csb-fv-lien, .csb-fv-filiere::after, .csb-fv-filiere-photo img { transition: none; }
	.csb-fv-btn:hover, .csb-fv-filiere:hover .csb-fv-filiere-photo img { transform: none; }
}

/* Nom de la filière : un bouton qui garde la taille et la police du titre (le thème style button) */
body main.csb-fv .csb-fv-filiere h3 button:not(#csb) { display: inline; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; text-decoration: none; }
body main.csb-fv .csb-fv-filiere h3 button:hover:not(#csb) { color: var(--fv-foret); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--fv-mil); }

/* Les blocs qui glissent latéralement (side-l, side-r) ne créent jamais de défilement horizontal pendant l'animation */
main.csb-fv > section { overflow-x: clip; }
