/* Vignette */
.media-circle-view {
	position: relative;
	border-radius: 50%;
	width: 100%;
	min-width: 100%;
	height: 100%;
	text-decoration: none;
	display: inline-block;
	vertical-align: middle;
	background-size: cover;
	background-position: center center;
	vertical-align: middle;
}

.media-vignette-default {
	text-align: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-variant: small-caps;
	font-weight: bold;
	color: black;
	background-color: var(--background);
	line-height: 1;
	border: 1px solid var(--border);
	text-decoration: none !important;
}

/* La photo d'une personne, posée par UserUi::getVignette() à côté de ses initiales, qui ne se montrent qu'à la place
   d'une photo en échec (vignette.js). */
.media-vignette-image > .media-vignette-photo {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	object-fit: cover;
}

.media-vignette-image > .media-vignette-fallback {
	display: none;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	background-color: var(--media-vignette-color);
}

.media-vignette-image.media-vignette-failed > .media-vignette-photo {
	display: none;
}

.media-vignette-image.media-vignette-failed > .media-vignette-fallback {
	display: inline-flex;
}

.media-rectangle-view {
	position: relative;
	width: 100%;
	min-width: 100%;
	height: 100%;
	text-decoration: none;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	background-size: contain;
	background-position: center center;
	background-repeat: no-repeat;
	vertical-align: middle;
}

.media-banner-view {
	position: relative;
	width: 100%;
	min-width: 100%;
	height: 100%;
	text-decoration: none;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	vertical-align: middle;
}

.media-banner-view.media-amap-producer-photo-view {
	height: auto;
	aspect-ratio: 2;
}

.media-image-upload[data-type="amap-producer-photo"] {
	max-width: 24rem;
}

@media (max-width: 449px) {

	.media-image-upload[data-type="amap-producer-photo"] {
		max-width: none;
	}

}

/* Le dessin d'une structure sans logo (`StructureUi::getLogo()`), sur un fond éclairci de la couleur
   que --structure-logo-color reçoit en ligne. Le rayon est celui d'une icône d'application, en
   proportion du côté parce que le dessin se rend de 1,75 à 4,5 rem, et s'efface devant celui que
   l'appelant demande, un rond en particulier, d'où :where(). */
.structure-logo-default {
	--structure-logo-background: color-mix(in srgb, var(--structure-logo-color) 30%, white);
	background-color: var(--structure-logo-background);
}

:where(.structure-logo-default) {
	border-radius: 22%;
}

/* Dans une pastille, le fond déborde sur la marge intérieure qui protège un logo déposé
   (--space-xxs, component.css), et que la pastille rogne à son cercle. L'ombre est plus large que
   cette marge pour couvrir aussi les coins que le rayon du dessin laisse blancs. */
.util-icon-logo > .structure-logo-default {
	box-shadow: 0 0 0 var(--space-xs) var(--structure-logo-background);
}
