/* ============================================================
   STYLES DE BLOC — charges en front ET dans l'editeur Gutenberg,
   pour que « Carte », « Encadre », « Numero »... se voient a l'ecriture.
   Variables redeclarees ici : l'editeur ne charge pas main.css.
   ============================================================ */
:root {
	--cbdx-vert-foret: #14512f;
	--cbdx-vert-feuille: #2f9e51;
	--cbdx-vert-feuille-hover: #268043;
	--cbdx-vert-pale: #e8f4e2;
	--cbdx-bordure-champ: #e2e8e0;
}

/* --- Chapô : le paragraphe d'introduction -------------------- */
.is-style-chapo {
	font-size: clamp(18px, 2.6vw, 21px);
	line-height: 1.65;
	color: var(--cbdx-vert-foret);
	font-weight: 500;
	margin-bottom: 30px;
}

/* --- Sommaire automatique ------------------------------------ */
.cbdx-toc {
	background: var(--cbdx-vert-pale, #e8f4e2);
	border-radius: 18px;
	padding: 24px 28px 22px;
	margin: 0 0 44px;
}
.cbdx-toc__title {
	font-family: "Bricolage Grotesque", sans-serif;
	font-weight: 700; font-size: 13px; letter-spacing: .09em; text-transform: uppercase;
	color: var(--cbdx-vert-foret); margin: 0 0 14px;
}
.cbdx-toc__list {
	list-style: none; margin: 0; padding: 0;
	counter-reset: cbdxtoc;
	columns: 2; column-gap: 34px;
}
.cbdx-toc__list li {
	counter-increment: cbdxtoc;
	break-inside: avoid;
	margin: 0 0 9px; padding-left: 28px; position: relative;
	font-size: 15px; line-height: 1.45;
}
.cbdx-toc__list li::before {
	content: counter(cbdxtoc);
	position: absolute; left: 0; top: 1px;
	width: 20px; height: 20px; border-radius: 50%;
	background: #fff; color: var(--cbdx-vert-foret);
	font-size: 11px; font-weight: 700;
	display: flex; align-items: center; justify-content: center;
}
.cbdx-toc__list a { color: var(--cbdx-vert-foret); text-decoration: none; font-weight: 500; }
.cbdx-toc__list a:hover { text-decoration: underline; }

/* --- Style de bloc « Carte » --------------------------------- */
.is-style-carte {
	background: #fff;
	border: 1px solid var(--cbdx-bordure-champ, #e2e8e0);
	border-radius: 18px;
	padding: 26px 26px 8px;
	box-shadow: 0 2px 10px rgba(20, 81, 47, .05);
	height: 100%;
}
.is-style-carte > :last-child { margin-bottom: 18px; }
.is-style-carte h3 { margin-top: 0; }

/* --- Style de bloc « Encadré vert » -------------------------- */
.is-style-encadre {
	background: var(--cbdx-vert-pale, #e8f4e2);
	border-left: 4px solid var(--cbdx-vert-feuille);
	border-radius: 0 14px 14px 0;
	padding: 22px 26px 4px;
	margin: 28px 0;
}
.is-style-encadre > :last-child { margin-bottom: 22px; }

/* --- Style de bloc « Encadré d'avertissement » --------------- */
.is-style-alerte {
	background: #fdf6e7;
	border-left: 4px solid #d99b2b;
	border-radius: 0 14px 14px 0;
	padding: 22px 26px 4px;
	margin: 28px 0;
}
.is-style-alerte > :last-child { margin-bottom: 22px; }
.is-style-alerte strong { color: #8a5c05; }

/* --- Style de bloc « Numéro d'étape » ------------------------ */
.is-style-numero {
	font-family: "Bricolage Grotesque", sans-serif;
	font-weight: 800; font-size: 15px; color: #fff;
	background: var(--cbdx-vert-feuille);
	width: 34px; height: 34px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	margin: 0 0 14px;
}

/* --- Colonnes en cartes -------------------------------------- */
.wp-block-columns { margin: 8px 0 30px; gap: 20px; }
.is-style-cartes .wp-block-column {
	background: #fff;
	border: 1px solid var(--cbdx-bordure-champ, #e2e8e0);
	border-radius: 18px;
	padding: 24px 22px 6px;
	box-shadow: 0 2px 10px rgba(20, 81, 47, .05);
}
.is-style-cartes .wp-block-column > :last-child { margin-bottom: 18px; }
.is-style-cartes h3 { margin-top: 0; font-size: 17px; }

/* --- Liste à coches ------------------------------------------ */
.is-style-liste-check { list-style: none; padding-left: 0; }
.is-style-liste-check li {
	position: relative; padding-left: 32px; margin-bottom: 12px;
}
.is-style-liste-check li::before {
	content: ""; position: absolute; left: 0; top: 6px;
	width: 18px; height: 18px; border-radius: 50%;
	background: var(--cbdx-vert-pale, #e8f4e2);
	box-shadow: inset 0 0 0 2px var(--cbdx-vert-feuille);
}
.is-style-liste-check li::after {
	content: ""; position: absolute; left: 6px; top: 10px;
	width: 6px; height: 3px;
	border-left: 2px solid var(--cbdx-vert-feuille);
	border-bottom: 2px solid var(--cbdx-vert-feuille);
	transform: rotate(-45deg);
}

/* --- Questions dépliables (bloc natif « Détails ») ------------ */
.wp-block-details {
	background: #fff;
	border: 1px solid var(--cbdx-bordure-champ, #e2e8e0);
	border-radius: 14px;
	padding: 0 22px;
	margin: 0 0 12px;
}
.wp-block-details summary {
	cursor: pointer; list-style: none;
	font-family: "Bricolage Grotesque", sans-serif;
	font-weight: 700; font-size: 16px; color: var(--cbdx-vert-foret);
	padding: 18px 30px 18px 0; position: relative;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: ""; position: absolute; right: 4px; top: 50%;
	width: 9px; height: 9px; margin-top: -6px;
	border-right: 2px solid var(--cbdx-vert-feuille);
	border-bottom: 2px solid var(--cbdx-vert-feuille);
	transform: rotate(45deg); transition: transform .2s ease;
}
.wp-block-details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.wp-block-details[open] summary { border-bottom: 1px solid var(--cbdx-bordure-champ, #e2e8e0); }
.wp-block-details > :not(summary) { margin-top: 16px; }
.wp-block-details > :last-child { margin-bottom: 18px; }

/* --- Séparateur ---------------------------------------------- */
.wp-block-separator {
	border: 0; height: 1px; background: var(--cbdx-bordure-champ, #e2e8e0);
	margin: 40px 0;
}

/* --- Bouton de fin de page ----------------------------------- */
.wp-block-buttons { margin: 26px 0 10px; }
.wp-block-button__link {
	background: var(--cbdx-vert-feuille); color: #fff;
	border-radius: 999px; padding: 14px 28px;
	font-weight: 700; text-decoration: none; font-size: 15px;
	display: inline-block;
}
.wp-block-button__link:hover { background: var(--cbdx-vert-feuille-hover); }

@media (max-width: 720px) {
	.cbdx-toc__list { columns: 1; }
	.cbdx-toc { padding: 20px 22px 18px; }
	> h2 { margin-top: 42px; }
}
