/* =========================================================
   Compléments aux blocs Gutenberg (chargé sur le site ET dans l'éditeur).
   Couleurs, tailles, espacements et boutons : theme.json + réglages des blocs.
   Ici uniquement ce que Gutenberg ne sait pas faire seul.
   ========================================================= */

/* Les marges entre blocs viennent de Gutenberg (blockGap) : on neutralise
   le padding-bottom que le thème Havnor met sur tous les titres/paragraphes. */
:is(.wp-block-group, .wp-block-column, .wp-block-cover__inner-container) > :is(p, h1, h2, h3, h4, h5, h6, ul, ol) {
	padding-bottom: 0;
}
.wp-block-list li + li { margin-top: 6px; }

/* Le thème force la couleur des paragraphes : on laisse la couleur
   choisie sur le bloc parent (Colonne, Groupe…) s'appliquer. */
.has-text-color p { color: inherit; }

/* Image avec un ratio choisi dans l'éditeur : toute la largeur disponible. */
.wp-block-image img[style*="aspect-ratio"] { width: 100%; }

/* ---------- Boutons : survol ---------- */
.wp-block-button__link,
.fmbc-form input[type="submit"] {
	transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.wp-block-button__link:hover,
.fmbc-form input[type="submit"]:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 24px -10px rgba(25, 50, 89, .55);
}
/* Le thème colore tous les a:hover/a:focus en bleu marine, ce qui écrase
   la couleur de survol du theme.json : on la réimpose sur les boutons. */
.wp-block-button__link:hover,
.wp-block-button__link:focus {
	color: var(--wp--preset--color--blanc);
}
.wp-block-button__link:active,
.fmbc-form input[type="submit"]:active {
	transform: translateY(0);
	box-shadow: none;
}
.wp-block-button__link:focus-visible,
.fmbc-form input[type="submit"]:focus-visible {
	outline: 2px solid #005892;
	outline-offset: 3px;
}

/* Style de bouton « Clair » (sur image ou fond sombre) */
.wp-block-button.is-style-fmbc-light .wp-block-button__link {
	background: #fff;
	color: #193259;
	border: 2px solid #fff;
}
.wp-block-button.is-style-fmbc-light .wp-block-button__link:hover,
.wp-block-button.is-style-fmbc-light .wp-block-button__link:focus {
	background: transparent;
	color: #fff;
	box-shadow: 0 12px 24px -10px rgba(0, 0, 0, .6);
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-button__link, .fmbc-form input[type="submit"] { transition: none; }
	.wp-block-button__link:hover, .fmbc-form input[type="submit"]:hover { transform: none; }
}

/* ---------- Notre solution : icône au-dessus de chaque colonne ---------- */
.fmbc-icon::before {
	display: block;
	margin-bottom: 20px;
	font-family: FontAwesome; font-size: 50px; line-height: 1;
	color: #005892; text-align: center;
}
.fmbc-icon-innovation::before { content: "\f039"; }
.fmbc-icon-utilisateurs::before { content: "\f200"; }
.fmbc-icon-dossier::before { content: "\f07b"; }
@media (min-width: 782px) {
	/* Flèche entre les colonnes, centrée dans l'espacement.
	   --fmbc-gap doit correspondre à l'espacement horizontal du bloc Colonnes (XL). */
	.fmbc-solutions { --fmbc-gap: var(--wp--preset--spacing--60); }
	.fmbc-solutions > .fmbc-icon { position: relative; }
	.fmbc-solutions > .fmbc-icon:not(:last-child)::after {
		content: ""; position: absolute; top: 50%;
		right: calc(var(--fmbc-gap) / -2 - 9px);
		width: 18px; height: 34px; margin-top: -17px;
		background: url(/wp-content/uploads/2019/03/Fleches.svg) no-repeat center / contain;
	}
}

/* ---------- Contact : icône e-mail ---------- */
.fmbc-contact-label { position: relative; padding-left: 70px; }
.fmbc-contact-label::before {
	content: "\e63b"; font-family: 'Pe-icon-7-stroke';
	position: absolute; left: 0; top: 50%; transform: translateY(-50%);
	font-size: 52px; line-height: 1; font-weight: 400;
}
.fmbc-contact-label a { color: #333; text-decoration: none; }
.fmbc-contact-label a:hover { color: #005892; text-decoration: underline; }

/* ---------- Logos clients : carrousel (Owl Carousel, chargé par le thème) ---------- */
.fmbc-clients .wp-block-gallery.owl-carousel { display: block; position: relative; padding: 0 40px; }
.fmbc-clients .owl-carousel figure.wp-block-image { width: auto !important; margin: 0 !important; display: flex !important; justify-content: center; }
.fmbc-clients .wp-block-image img { width: 100% !important; max-width: 150px; height: auto !important; aspect-ratio: 1; object-fit: contain; transition: transform .25s ease; }
.fmbc-clients .wp-block-image a:hover img { transform: scale(1.05); }
.fmbc-clients .owl-nav > * {
	position: absolute; top: 50%; width: 18px; height: 34px; margin-top: -17px; padding: 0;
	font-size: 0; border: 0; opacity: .6; transition: opacity .2s;
	background: url(/wp-content/uploads/2019/03/Fleches_left.svg) no-repeat center / contain !important;
}
.fmbc-clients .owl-nav > *:hover { opacity: 1; }
/* Le thème ajoute déjà une flèche Font Awesome sur tous les carrousels Owl : on ne garde que la nôtre. */
.fmbc-clients .owl-carousel .owl-prev::before,
.fmbc-clients .owl-carousel .owl-next::before { content: none; }
.fmbc-clients .owl-nav .owl-prev { left: 0; }
.fmbc-clients .owl-nav .owl-next { right: 0; background-image: url(/wp-content/uploads/2019/03/Fleches-right.svg) !important; }

/* ---------- Formulaire de contact (CF7) ---------- */
.fmbc-form label { display: block; color: #005994; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.fmbc-form input[type="text"], .fmbc-form input[type="email"], .fmbc-form input[type="tel"], .fmbc-form textarea {
	width: 100% !important; margin-top: 6px;
	background: #fff; border: 0; border-bottom: 3px solid #005994 !important; border-radius: 0 !important;
	transition: border-color .2s, box-shadow .2s;
}
.fmbc-form input:focus, .fmbc-form textarea:focus { outline: none; border-bottom-color: #193259 !important; box-shadow: 0 6px 14px -10px rgba(25, 50, 89, .6); }
.fmbc-form .wpcf7-acceptance label { display: inline; font-size: 13px; letter-spacing: 0; text-transform: none; }
.fmbc-form input[type="submit"] {
	display: block; margin: 20px auto 0;
	background: #005892; color: #fff; border: 0; border-radius: 0; font-size: 16px; font-weight: 600; text-transform: uppercase;
}
.fmbc-form input[type="submit"]:hover { background: #193259; }

/* ---------- Animations (Animations for Blocks / AOS) ---------- */
/* Visiteurs ayant demandé moins de mouvement : contenu affiché directement. */
@media (prefers-reduced-motion: reduce) {
	[data-aos] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Vidéo popup : même hauteur que la colonne voisine (colonnes côte à côte uniquement) ---------- */
@media (min-width: 782px) {
	.home .wp-block-column:has(> .wp-block-getwid-video-popup.has-image) { align-self: stretch; display: flex; flex-direction: column; }
	.home .wp-block-getwid-video-popup.has-image,
	.home .has-image .wp-block-getwid-video-popup__link { flex: 1; display: flex; flex-direction: column; }
	.home .has-image .wp-block-getwid-video-popup__wrapper { flex: 1; min-height: 0; }
}
