/*
 * Réglages des blocs de l'accueil faits dans l'éditeur (inc/blocs-gutenberg.php), chargés après les feuilles d'origine.
 * Sans réglage, aucune de ces règles ne change le rendu d'origine.
 */

/* Couleur de texte choisie : elle s'applique aussi aux titres, textes et liens du bloc (qui ont leur propre couleur dans
   les feuilles d'origine), sauf aux boutons. :not(#upv) donne la priorité sur les règles « #home … ». */
.upv-bloc.has-text-color:not(#upv):not(#upv) :is(h1, h2, h3, p, a, span, strong, em, time, blockquote, li):not(.btn) {
	color: inherit;
}

/* Cartes : couleur et taille de l'icône (police iupv_…, blanche !important à l'origine) */
.blue_block.upv-bloc:before {
	color: var(--upv-icone-couleur, #fff) !important;
}

.blue_block.upv-bloc[style*="--upv-icone-taille"]:before {
	font-size: var(--upv-icone-taille);
	height: auto;
	line-height: 1;
	margin-top: 0;
	-webkit-transform: translateY(-50%);
	transform: translateY(-50%);
}

/* Cartes : image à la place de l'icône */
.blue_block .upv-icone {
	position: absolute;
	left: 10px;
	top: 50%;
	width: var(--upv-icone-taille, 50px);
	height: auto;
	-webkit-transform: translateY(-50%);
	transform: translateY(-50%);
}

@media only screen and (min-width: 1024px) {
	.blue_block .upv-icone {
		width: var(--upv-icone-taille, 75px);
	}
}

/* Citation : image de fond et opacité */
.testi_block.upv-bloc:before {
	background-image: var(--upv-fond, url(../images/bg1.jpg));
	opacity: var(--upv-fond-opacite, .2);
}

/*
 * Blocs natifs de WordPress (paragraphes, images, colonnes…). La feuille commune de WordPress n'est pas chargée
 * (inc/setup.php) : en voici les règles utiles, plus les alignements et l'espacement des blocs dans le cadre .wysiwyg,
 * comme les paragraphes du site. Chaque bloc charge sa propre feuille quand il est utilisé.
 */
.has-text-align-left {
	text-align: left;
}

.has-text-align-center {
	text-align: center;
}

.has-text-align-right {
	text-align: right;
}

.has-text-align-justify {
	text-align: justify;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	word-wrap: normal !important;
}

html :where([style*="border-width"]) {
	border-style: solid;
}

html :where(img[class*="wp-image-"]) {
	height: auto;
	max-width: 100%;
}

.alignleft {
	float: left;
	margin: 0 20px 10px 0;
}

.alignright {
	float: right;
	margin: 0 0 10px 20px;
}

.aligncenter {
	clear: both;
	margin-left: auto;
	margin-right: auto;
}

.wysiwyg figure,
.wysiwyg .wp-block-columns,
.wysiwyg .wp-block-buttons,
.wysiwyg .wp-block-group.has-background,
.wysiwyg .wp-block-separator {
	margin: 20px 0 0;
}

.wysiwyg figure.alignleft {
	margin: 20px 20px 10px 0;
}

.wysiwyg figure.alignright {
	margin: 20px 0 10px 20px;
}

.wysiwyg figcaption {
	font-size: 11px;
	color: #9FADC0;
	margin-top: 5px;
}

.wysiwyg .wp-block-columns + p,
.wysiwyg figure + p {
	margin-top: 20px;
}

@media only screen and (min-width: 768px) {
	.wysiwyg figure,
	.wysiwyg .wp-block-columns,
	.wysiwyg .wp-block-buttons,
	.wysiwyg .wp-block-group.has-background,
	.wysiwyg .wp-block-separator,
	.wysiwyg .wp-block-columns + p,
	.wysiwyg figure + p {
		margin-top: 30px;
	}

	.wysiwyg figure.alignleft,
	.wysiwyg figure.alignright {
		margin-top: 30px;
	}
}

/* Bouton natif : comme les boutons .btn du site */
.wp-block-button__link {
	display: inline-block;
	box-sizing: border-box;
	padding: 12px 30px;
	background-color: #2CD7D2;
	color: #fff;
	font-size: 14px;
	line-height: 21px;
	font-weight: 700;
	text-align: center;
	text-decoration: none !important;
	border-radius: 5px;
	transition: color .2s, background-color .2s;
}

.wysiwyg .wp-block-button__link {
	color: #fff;
}

.wp-block-button__link:hover {
	background-color: #000078;
}

/* Carrousel : diapositives ajoutées automatiquement (dernières publications, upv_diapos_auto). Leurs images n'ont pas le
   format 1600 × 560 des diapositives saisies : elles couvrent tout le cadre, recadrées au centre, sans déformation. */
.carousel_entry .img img.upv-auto {
	height: 100%;
	-o-object-fit: cover;
	object-fit: cover;
}
