/**
 * Cartes.
 *
 * « Domaines d'activités » : un visuel en niveaux de gris sur une carte
 * blanche ombrée. « Mes outils » : une photo coiffant un bandeau blanc où le
 * titre est écrit en Grey Qo.
 */

.tdf-carte {
	height: 100%;
}

/*
 * Le visuel garde les proportions de la maquette quelle que soit la largeur de
 * colonne, et passe en niveaux de gris — même quand on y dépose une photo en
 * couleur depuis l'éditeur.
 */
.tdf-carte__visuel {
	aspect-ratio: 363 / 403;
	min-height: 0 !important;
}

.tdf-carte__visuel .wp-block-cover__image-background {
	filter: grayscale( 1 );
}

.tdf-carte__texte {
	flex-grow: 1;
}

.tdf-carte__texte h3 {
	font-size: var( --wp--preset--font-size--medium );
}

.tdf-carte__texte p {
	font-size: var( --wp--preset--font-size--medium );
	line-height: 1.4;
}

/* Deux cartes par ligne sur tablette, plutôt qu'une colonne interminable. */
@media ( min-width: 600px ) and ( max-width: 1100px ) {
	.tdf-cartes.wp-block-columns {
		flex-wrap: wrap !important;
	}

	.tdf-cartes.wp-block-columns > .wp-block-column {
		flex-basis: calc( 50% - var( --wp--preset--spacing--40 ) / 2 ) !important;
		flex-grow: 0;
	}
}

/* -------------------------------------------------------------------
 * Mes outils
 * ------------------------------------------------------------------- */

.tdf-outil {
	box-shadow: var( --wp--preset--shadow--carte );
}

.tdf-outil__image,
.tdf-outil__image img {
	margin: 0;
	width: 100%;
}

.tdf-outil__image img {
	aspect-ratio: 719 / 580;
	object-fit: cover;
}

.tdf-outil__titre {
	font-family: var( --wp--preset--font-family--manuscrite );
	font-size: var( --wp--preset--font-size--titre );
	font-weight: 400;
	margin: 0;
	padding-block: 0.6em 0.5em;
}
