/* ======================================================
   mg-porcelaine — Styles spécifiques au formulaire porcelaine
   Hérite de photo-laser.css (mg-pl-* classes)
   ====================================================== */

/* Le formulaire porcelaine est plus large que photo-laser (8 formats + grilles cadre) */
.mg-porcelaine-wrap {
	max-width: 1100px;
}

/* ---- Forme : cercle ---- */
.mg-pc-format-cercle {
	width: 60px;
	height: 60px;
	border-radius: 50%;
}

/* ---- Forme : cœur (caractère Unicode) ---- */
.mg-pc-format-coeur {
	display: block;
	font-size: 44px;
	line-height: 1;
	color: #8c8f94;
	transition: color 0.15s;
}

.mg-pl-format-card.is-selected .mg-pc-format-coeur {
	color: #2271b1;
}

/* Cartes format plus compactes pour tenir 4 par rangée confortablement */
.mg-porcelaine-wrap .mg-pl-format-card {
	min-width: 110px;
	padding: 14px 18px;
}

/* ---- Indicateur visuel "avec cadre" ---- */
.mg-pc-format-avec-cadre {
	outline: 3px solid #8c8f94;
	outline-offset: 3px;
}

.mg-pl-format-card.is-selected .mg-pc-format-avec-cadre {
	outline-color: #2271b1;
}

.mg-pc-format-coeur-cadre {
	display: block;
	font-size: 44px;
	line-height: 1;
	color: #8c8f94;
	transition: color 0.15s;
	text-shadow: 0 0 0 3px #8c8f94;
	-webkit-text-stroke: 3px #8c8f94;
}

.mg-pl-format-card.is-selected .mg-pc-format-coeur-cadre {
	color: #2271b1;
	-webkit-text-stroke-color: #2271b1;
}

/* ---- Panneaux de dimension ---- */
.mg-pc-dim-panel {
	margin-top: 12px;
}

.mg-pc-dim-img {
	margin-top: 12px;
	text-align: center;
}

.mg-pc-dim-img img {
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}

/* ---- Grille sous-sélecteurs "avec cadre" ---- */
.mg-pc-cadre-grid {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 16px;
	margin-top: 8px;
}

.mg-pc-cadre-grid--2col {
	grid-template-columns: repeat( 2, 1fr );
}

.mg-pc-cadre-col p {
	font-size: 13px;
	margin-bottom: 6px;
}

.mg-pc-cadre-col select {
	width: 100%;
}

/* ---- Cartes image (orientation, cadrage, coloration, bordure, bg) ---- */
.mg-pc-img-group {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 8px;
}

.mg-pc-img-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 12px 10px;
	border: 2px solid #dcdcde;
	border-radius: 8px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	text-align: center;
	min-width: 90px;
	transition: border-color 0.15s, background 0.15s;
	user-select: none;
}

.mg-pc-img-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.mg-pc-img-card img {
	display: block;
	width: 74px;
	height: 87px;
	object-fit: cover;
	border-radius: 4px;
}

/* Orientation : images carrées */
#mg-pc-orientation-group .mg-pc-img-card img {
	width: 90px;
	height: 90px;
}

.mg-pc-img-card:hover,
.mg-pc-img-card.is-selected {
	border-color: #2271b1;
	background: #f0f6fc;
}

/* Groupe invalide */
.mg-pc-img-group--invalid .mg-pc-img-card {
	border-color: #d63638;
}

/* ---- Cartes arrière-plan (images paysage) ---- */
.mg-pc-bg-card img {
	width: 80px;
	height: 56px;
	object-fit: cover;
}

/* ---- Texte surcharge (bordure or) ---- */
.mg-pc-surcharge {
	display: block;
	font-weight: 400;
	font-size: 11px;
	color: #646970;
	font-style: normal;
}

/* ---- Responsive ---- */
@media ( max-width: 900px ) {
	.mg-pc-cadre-grid {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( max-width: 640px ) {
	.mg-pc-cadre-grid,
	.mg-pc-cadre-grid--2col {
		grid-template-columns: 1fr;
	}

	.mg-pc-img-card {
		min-width: 70px;
	}
}
