/* HBC Éditeur : affichage des blocs (visiteurs et éditeur). Couleurs du thème (--hbc-*) avec valeurs de secours. */

.hbc-editeur-content > * + *,
.hbc-ed-canvas .hbc-blk + * {
	margin-top: 1.25rem;
}

.hbc-blk--heading {
	margin: 1.75rem 0 0;
	color: var(--hbc-navy, #161D4F);
}

h2.hbc-blk--heading {
	font-size: clamp(1.4rem, 2.6vw, 1.85rem);
}

h3.hbc-blk--heading {
	font-size: clamp(1.15rem, 2vw, 1.35rem);
}

.hbc-editeur-content > .hbc-blk--heading:first-child {
	margin-top: 0;
}

.hbc-blk--text p,
.hbc-blk__body p {
	margin: 0 0 0.9rem;
}

.hbc-blk--text > :last-child,
.hbc-blk__body > :last-child {
	margin-bottom: 0;
}

/* Image */
.hbc-blk--image {
	margin: 0;
}

.hbc-blk--image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 1rem;
}

.hbc-blk--image.hbc-blk--normal {
	max-width: 42rem;
	margin-inline: auto;
}

.hbc-blk--image figcaption {
	margin-top: 0.5rem;
	color: var(--hbc-muted, #4A5068);
	font-size: 0.85rem;
	text-align: center;
}

/* Image + texte */
.hbc-blk--image-text {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(1rem, 3vw, 2rem);
}

.hbc-blk--image-text.hbc-blk--media-right .hbc-blk__media {
	order: 2;
}

.hbc-blk__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 1rem;
}

/* Galerie */
.hbc-blk--gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
	gap: 0.6rem;
}

.hbc-blk--gallery a,
.hbc-blk--gallery .hbc-ed-gallery-item {
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border-radius: 0.75rem;
	background: var(--hbc-bg, #E4E7EF);
}

.hbc-blk--gallery img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 200ms ease;
}

.hbc-blk--gallery a:hover img {
	transform: scale(1.04);
}

/* Bouton */
.hbc-blk--button {
	margin-block: 1.5rem;
}

.hbc-entry-content .hbc-blk--button a.hbc-button--blue {
	color: #fff;
}

/* Encadré */
.hbc-blk--notice {
	border: 1px solid rgb(43 59 176 / 20%);
	border-left: 4px solid var(--hbc-blue, #2B3BB0);
	border-radius: 0 0.9rem 0.9rem 0;
	background: rgb(43 59 176 / 6%);
	padding: 0.9rem 1.2rem;
}

.hbc-blk--notice.hbc-blk--warning {
	border-color: rgb(184 138 50 / 35%);
	border-left-color: var(--hbc-draw, #B88A32);
	background: rgb(184 138 50 / 9%);
}

/* Citation */
.hbc-blk--quote {
	margin: 1.5rem 0;
	border: 0;
	border-left: 4px solid var(--hbc-accent, #8C9AEC);
	padding: 0.4rem 0 0.4rem 1.25rem;
	color: var(--hbc-navy, #161D4F);
	font-size: 1.15rem;
	font-style: italic;
}

.hbc-blk--quote cite {
	display: block;
	margin-top: 0.5rem;
	color: var(--hbc-muted, #4A5068);
	font-size: 0.9rem;
	font-style: normal;
	font-weight: 700;
}

.hbc-blk--quote cite::before {
	content: "— ";
}

/* Vidéo */
.hbc-blk--video {
	overflow: hidden;
	aspect-ratio: 16 / 9;
	border-radius: 1rem;
	background: #000;
}

.hbc-blk--video iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Séparateur */
.hbc-blk--separator {
	height: 0;
	margin-block: 2rem;
	border: 0;
	border-top: 2px solid var(--hbc-border, #C9CFDD);
}

@media (max-width: 620px) {
	.hbc-blk--image-text {
		grid-template-columns: 1fr;
	}

	.hbc-blk--image-text.hbc-blk--media-right .hbc-blk__media {
		order: 0;
	}
}

/* ---------- Aperçu par lien de validation ---------- */

.hbc-review-banner {
	margin-bottom: 1.5rem;
	border: 1px solid rgb(184 138 50 / 40%);
	border-radius: 0.9rem;
	background: rgb(184 138 50 / 12%);
	padding: 0.8rem 1.1rem;
	color: var(--hbc-ink, #1B2147);
	font-size: 0.92rem;
}

.hbc-review {
	margin-top: 2.5rem;
	border: 1px solid var(--hbc-border, #C9CFDD);
	border-top: 3px solid var(--hbc-blue, #2B3BB0);
	border-radius: 0 0 1rem 1rem;
	background: #fff;
	padding: 1.25rem 1.4rem;
}

.hbc-review h2 {
	margin: 0 0 0.4rem;
	font-size: 1.3rem;
}

.hbc-review label {
	display: block;
	font-weight: 700;
}

.hbc-review input[type="text"],
.hbc-review textarea {
	box-sizing: border-box;
	width: 100%;
	margin-top: 0.3rem;
	border: 1px solid var(--hbc-border, #C9CFDD);
	border-radius: 0.6rem;
	padding: 0.55rem 0.75rem;
	font: inherit;
	font-weight: 400;
}

.hbc-review__choice {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 0.75rem 0;
	border: 0;
	padding: 0;
}

.hbc-review__choice legend {
	margin-bottom: 0.35rem;
	font-weight: 700;
}

.hbc-review__choice label {
	font-weight: 600;
}

.hbc-review__status {
	color: var(--hbc-muted, #4A5068);
}

/* Bouton flottant « Modifier cette page » (personnes autorisées) */
.hbc-editeur-fab {
	position: fixed;
	z-index: 90;
	right: 1rem;
	bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
	border-radius: 999px;
	background: var(--hbc-navy, #161D4F);
	padding: 0.7rem 1.1rem;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 800;
	text-decoration: none;
	box-shadow: 0 0.6rem 1.4rem rgb(22 29 79 / 30%);
}

.hbc-editeur-fab:hover {
	background: var(--hbc-blue, #2B3BB0);
	color: #fff;
}
