/* MT Tableaux — galerie publique */
.mt-galerie {
	display: grid;
	gap: 22px;
	margin: 0 0 30px;
}
.mt-cols-1 { grid-template-columns: 1fr; }
.mt-cols-2 { grid-template-columns: repeat(2, 1fr); }
.mt-cols-3 { grid-template-columns: repeat(3, 1fr); }
.mt-cols-4 { grid-template-columns: repeat(4, 1fr); }
.mt-cols-5 { grid-template-columns: repeat(5, 1fr); }
.mt-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 980px) {
	.mt-cols-3, .mt-cols-4, .mt-cols-5, .mt-cols-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.mt-galerie { grid-template-columns: 1fr; }
}

.mt-item {
	position: relative;
	margin: 0;
	cursor: pointer;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	background: #fff;
}
.mt-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}
.mt-item img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
}
.mt-item figcaption {
	padding: 10px 14px 12px;
}
.mt-item-titre {
	display: block;
	font-weight: 600;
	font-size: 1rem;
}
.mt-item-dims {
	display: block;
	font-size: 0.85rem;
	color: #777;
	margin-top: 2px;
}
.mt-badge-vendu {
	position: absolute;
	top: 12px;
	left: 12px;
	background: #b32d2e;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 3px;
	z-index: 2;
}

/* ------- Placeholder animé pendant le chargement ------- */
@keyframes mt-shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}
.mt-item img,
.mt-ligne-photo img {
	background: linear-gradient(100deg, #ececec 40%, #f8f8f8 50%, #ececec 60%);
	background-size: 200% 100%;
	animation: mt-shimmer 1.6s linear infinite;
}
.mt-item img.mt-loaded,
.mt-ligne-photo img.mt-loaded {
	background: none;
	animation: none;
}

/* Luminosité réglable par galerie : [mt_galerie luminosite="115"] */
.mt-liste .mt-ligne-photo img,
.mt-galerie .mt-item img {
	filter: brightness(var(--mt-lum, 100%));
}

/* ------- Style « liste » : photo / texte alternés ------- */
.mt-liste {
	margin: 0 0 30px;
}
.mt-ligne {
	display: flex;
	gap: 52px;
	align-items: center;
	margin-bottom: 90px;
	cursor: pointer;
}
.mt-ligne:nth-child(even) {
	flex-direction: row-reverse;
}
.mt-ligne:nth-child(even) .mt-ligne-infos {
	text-align: right;
}
.mt-ligne:nth-child(even) .mt-ligne-technique::after {
	margin-left: auto;
}
.mt-ligne-photo {
	position: relative;
	flex: 0 0 46%;
	max-width: 480px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 14px 34px rgba(0, 0, 0, 0.14);
	transition: box-shadow 0.4s ease, transform 0.4s ease;
}
.mt-ligne:hover .mt-ligne-photo {
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), 0 22px 48px rgba(0, 0, 0, 0.2);
	transform: translateY(-4px);
}
.mt-ligne-photo img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.6s ease;
}
.mt-ligne:hover .mt-ligne-photo img {
	transform: scale(1.035);
}
.mt-ligne-infos {
	flex: 1;
	min-width: 0;
}
.mt-ligne-titre {
	margin: 0 0 6px;
	font-size: 2rem;
	font-weight: 300;
	letter-spacing: 0.015em;
	line-height: 1.2;
}
.mt-ligne-technique {
	display: block;
	font-size: 0.78rem;
	font-style: normal;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: #999;
	margin-bottom: 26px;
}
.mt-ligne-technique::after {
	content: '';
	display: block;
	width: 44px;
	height: 1px;
	background: #cfcfcf;
	margin-top: 18px;
}
.mt-ligne-meta {
	margin: 0 0 8px;
	font-size: 0.92rem;
	color: #666;
	letter-spacing: 0.02em;
}
.mt-ligne-prix {
	margin-top: 16px;
	font-size: 1.05rem;
	color: #333;
	font-weight: 600;
}
.mt-ligne-vendu {
	display: inline-block;
	margin-top: 16px;
	color: #a8323e;
	font-weight: 600;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	border: 1px solid rgba(168, 50, 62, 0.4);
	padding: 5px 14px;
	border-radius: 2px;
}

/* Apparition douce au défilement */
.mt-ligne,
.mt-item {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}
.mt-ligne.mt-visible,
.mt-item.mt-visible {
	opacity: 1;
	transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
	.mt-ligne,
	.mt-item {
		opacity: 1;
		transform: none;
		transition: none;
	}
	.mt-ligne-photo img {
		transition: none;
	}
}

@media (max-width: 700px) {
	.mt-ligne,
	.mt-ligne:nth-child(even) {
		flex-direction: column;
		gap: 16px;
		margin-bottom: 48px;
	}
	.mt-ligne:nth-child(even) .mt-ligne-infos {
		text-align: left;
	}
	.mt-ligne-photo {
		flex: none;
		max-width: 100%;
	}
}

/* ------- Lightbox ------- */
.mt-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(15, 15, 15, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.mt-lightbox[hidden] { display: none; }

.mt-lightbox-inner {
	display: flex;
	gap: 28px;
	max-width: 1100px;
	max-height: 90vh;
	width: 100%;
}
.mt-lightbox-photo {
	flex: 1 1 60%;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
}
.mt-lightbox-photo img {
	max-width: 100%;
	max-height: 85vh;
	object-fit: contain;
	border-radius: 4px;
}
.mt-lightbox-infos {
	flex: 0 0 300px;
	color: #f2f2f2;
	overflow-y: auto;
	align-self: center;
	max-height: 85vh;
}
.mt-lightbox-infos h3 {
	color: #fff;
	margin: 0 0 10px;
	font-size: 1.4rem;
}
.mt-lightbox-meta {
	font-size: 0.9rem;
	color: #ccc;
	margin-bottom: 14px;
	line-height: 1.7;
}
.mt-lightbox-desc {
	font-size: 0.95rem;
	line-height: 1.6;
}
.mt-lightbox-statut-vendu {
	display: inline-block;
	background: #b32d2e;
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 3px 9px;
	border-radius: 3px;
	margin-bottom: 12px;
}
.mt-lightbox-prix {
	font-weight: 700;
	color: #fff;
	font-size: 1.1rem;
	margin-top: 10px;
}

/* ------- Partage réseaux sociaux ------- */
.mt-share {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}
.mt-share-label {
	font-size: 0.85rem;
	color: #bbb;
	margin-right: 4px;
}
.mt-share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.2s, transform 0.15s;
}
.mt-share-btn:hover {
	background: rgba(255, 255, 255, 0.32);
	transform: scale(1.1);
	color: #fff;
}
.mt-share-btn svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}
.mt-share-copied {
	font-size: 0.8rem;
	color: #7fd48a;
}

/* Bouton de partage sur chaque œuvre */
.mt-share-trigger {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 3;
	width: 34px;
	height: 34px;
	border: none;
	border-radius: 50%;
	background: rgba(20, 20, 20, 0.55);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.65;
	transition: opacity 0.2s, background 0.2s, transform 0.15s;
}
.mt-item:hover .mt-share-trigger,
.mt-ligne:hover .mt-share-trigger {
	opacity: 1;
}
.mt-share-trigger:hover {
	background: rgba(20, 20, 20, 0.85);
	transform: scale(1.1);
}
.mt-share-trigger svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

/* Mini-menu de partage ancré sous le bouton */
.mt-share-pop {
	position: absolute;
	top: 50px;
	right: 10px;
	z-index: 4;
	background: rgba(20, 20, 20, 0.92);
	border-radius: 24px;
	padding: 8px 12px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.mt-share-pop .mt-share {
	margin: 0;
	padding: 0;
	border: none;
	flex-wrap: nowrap;
}
.mt-share-pop .mt-share-label {
	display: none;
}

.mt-lightbox-close {
	position: absolute;
	top: 16px;
	right: 20px;
	background: none;
	border: none;
	color: #fff;
	font-size: 38px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.8;
}
.mt-lightbox-close:hover { opacity: 1; }

.mt-lightbox-prev,
.mt-lightbox-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.12);
	border: none;
	color: #fff;
	font-size: 26px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.2s;
}
.mt-lightbox-prev:hover,
.mt-lightbox-next:hover { background: rgba(255, 255, 255, 0.28); }
.mt-lightbox-prev { left: 8px; }
.mt-lightbox-next { right: 8px; }

.mt-lightbox-compteur {
	position: absolute;
	bottom: 8px;
	left: 50%;
	transform: translateX(-50%);
	color: #ddd;
	font-size: 0.8rem;
	background: rgba(0, 0, 0, 0.45);
	padding: 2px 10px;
	border-radius: 10px;
}

@media (max-width: 820px) {
	.mt-lightbox-inner {
		flex-direction: column;
		overflow-y: auto;
	}
	.mt-lightbox-photo img { max-height: 55vh; }
	.mt-lightbox-infos {
		flex: none;
		max-height: none;
		align-self: stretch;
	}
}
