/**
 * YC Gallery — grille maçonnerie + lightbox.
 * Valeurs calquées sur le rendu des galeries de yvanchabre.com.
 */

/* ---------------------------------------------------------------- Grille */

.ycg-wrapper {
	position: relative;
}

.ycg-gallery {
	position: relative;
	min-height: 150px;
}

.ycg-gallery * {
	box-sizing: border-box !important;
}

.ycg-masonry {
	position: relative;
	width: 100%;
	min-height: 200px;
	overflow: hidden;
	z-index: 2;
}

.ycg-header {
	position: relative;
	width: 100%;
}

.ycg-content {
	position: relative;
	overflow: hidden;
	width: 100%;
}

.ycg-column {
	position: relative;
	float: left;
}

.ycg-thumb {
	position: relative;
	margin: 0;
	transition: opacity 0.45s, background-color 1s;
}

/* Sans JS : tout est visible. Avec JS : apparition en fondu échelonnée. */
.ycg-js .ycg-thumb {
	opacity: 0;
}

.ycg-js .ycg-thumb.ycg-shown {
	opacity: 1;
}

.ycg-thumb.ycg-pending {
	display: none;
}

.ycg-thumb-pad {
	width: 100%;
}

.ycg-item-wrap {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: inherit;
}

.ycg-item-wrap img {
	display: block;
	border: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	max-height: none !important;
	max-width: none !important;
	min-height: 0 !important;
	min-width: 0 !important;
	width: 100% !important;
	height: auto !important;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	transition: transform 0.7s ease;
}

.ycg-hover {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	opacity: 0;
	transition: opacity 0.6s;
	cursor: pointer;
}

.ycg-thumb.hover .ycg-hover,
.ycg-item-wrap:hover .ycg-hover {
	opacity: 1;
}

.ycg-thumb.hover img,
.ycg-item-wrap:hover img {
	transform: scale(1.1);
}

.ycg-thumb-title {
	position: absolute;
	bottom: 0;
	left: 0;
	transition: 0.5s;
	opacity: 1;
	line-height: 1.15;
	font-weight: 300;
	display: block;
	text-align: left;
	margin: 0 0 10px 10px;
	padding: 5px 10px;
	pointer-events: none;
}

/* -------------------------------------------------------------- Lightbox */

.ycg-lb {
	direction: ltr;
	position: fixed;
	z-index: 99999;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	visibility: hidden;
	opacity: 0;
	-ms-touch-action: none;
	touch-action: none;
	-webkit-text-size-adjust: 100%;
	font-family: Arial, Helvetica, sans-serif;
	transition: opacity 0.4s ease, visibility 0.4s ease;
}

.ycg-lb * {
	box-sizing: border-box !important;
	line-height: 1.4;
}

.ycg-lb.ycg-lb-on {
	pointer-events: auto;
	visibility: visible;
	opacity: 1;
}

.ycg-lb-bg {
	width: 100%;
	height: 100%;
	will-change: opacity;
	transform: translateZ(0);
}

.ycg-lb-bg.ycg-lb-bg-off {
	transition: opacity 300ms;
	opacity: 0;
}

.ycg-lb-content {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* Slider */

.ycg-lb-slider {
	position: absolute;
	overflow: hidden;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
}

.ycg-lb-wrap {
	position: absolute;
	user-select: none;
	width: 100%;
	top: 0;
	bottom: 0;
}

.ycg-lb-page {
	position: absolute;
	display: block;
	transform: translate3d(0, 0, 0);
	width: 100%;
	top: 0;
	bottom: 0;
	left: 0;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	overflow: hidden;
	-moz-user-select: none;
	-ms-user-select: none;
	touch-action: none;
}

.ycg-lb-page-inner {
	position: absolute;
	display: block;
	left: 0;
	top: 0;
	bottom: 0;
	width: 100%;
	overflow: hidden;
	transform: translate3d(0, 0, 0);
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	transform-origin: left top;
	user-select: none;
	touch-action: none;
}

.ycg-lb-page-inner img {
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	position: absolute !important;
	display: block !important;
	border: none !important;
	max-width: none !important;
	opacity: 0;
	padding: 0 !important;
	margin: 0 !important;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.ycg-lb-page-inner img.ycg-protect {
	-webkit-touch-callout: none;
}

.ycg-lb-page-inner img.ycg-loaded {
	transition: 0.35s ease-out;
	opacity: 1;
}

/* Préchargeur (roue de 8 points) */

.ycg-lb-preloader {
	min-height: inherit;
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	overflow: hidden;
	z-index: 100;
	pointer-events: none;
}

.ycg-lb-preloader .ycg-lb-preloader-dot {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 8px;
	height: 8px;
	margin: -4px;
	border-radius: 50%;
}

.ycg-lb-preloader .ycg-lb-preloader-spin {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 36px;
	height: 36px;
	margin: -18px;
	animation: 1s ycg-spinner linear infinite;
}

.ycg-lb-preloader .ycg-lb-preloader-point {
	position: absolute;
	left: 50%;
	top: 50%;
	margin: -4px;
	width: 8px;
	height: 8px;
	border-radius: 100%;
}

@keyframes ycg-spinner {
	0% { transform: rotate(-360deg); }
	100% { transform: rotate(0deg); }
}

/* Flèches : dessin et couleurs dans ycg-arrows.css (feuille partagée avec
   le héro du thème — handle `ycg-arrows`, dépendance de `ycg`). Ici seulement
   ce qui est propre à la lightbox. */

.ycg-lb.ycg-lb-mini .ycg-lb-arrow {
	display: none;
}

/* Bandeau haut : compteur + fermeture */

.ycg-lb-header {
	position: absolute;
	padding: 5px;
	left: 0;
	top: 0;
	user-select: none;
	width: 100%;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	transform: translateY(-100%);
	transition: transform 0.4s ease-out;
}

.ycg-lb-header * {
	user-select: none;
	-moz-user-select: none;
	-webkit-user-select: none;
}

.ycg-lb-header.ycg-lb-show {
	transform: translateY(0%);
}

.ycg-lb-counter {
	position: relative;
	flex: none;
	min-height: 20px;
	padding: 0 10px;
	max-width: 100%;
	font-size: 14px;
	line-height: 22px;
	font-weight: 400;
	color: #fff;
	font-family: monospace;
}

.ycg-lb-counter span {
	position: relative;
	display: inline-block;
}

.ycg-lb-counter .ycg-lb-counter-sep {
	padding: 0 3px;
	opacity: 0.7;
}

.ycg-lb-space {
	flex: auto;
}

.ycg-lb-btn {
	position: relative;
	padding: 9px;
	width: 38px;
	height: 38px;
	margin: 2px;
	cursor: pointer;
	transition: background-color 0.2s, transform 0.4s ease-out;
	border-radius: 2px;
	flex: none;
}

.ycg-lb-btn svg {
	width: 100%;
	height: 100%;
	fill: inherit;
	display: block;
	pointer-events: none;
	transition: fill 0.2s;
}

/* Bandeau bas : titre / légende */

.ycg-lb-footer {
	position: absolute;
	max-height: 44vh;
	left: 0;
	bottom: 0;
	width: 100%;
	transform: translateY(100%);
	transition: transform 0.4s ease-out;
}

.ycg-lb-footer.ycg-lb-show {
	transform: translateY(0%);
}

.ycg-lb-informer {
	position: relative;
	width: 100%;
	padding: 30px 20px 10px;
	color: #fff;
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
}

.ycg-lb-informer-inner {
	position: relative;
	width: 800px;
	max-width: 100%;
	margin: auto;
	text-align: center;
	text-shadow: rgba(0, 0, 0, 0.4) 1px 1px 5px;
}

.ycg-lb-informer-title {
	display: inline-block;
	padding: 0 10px;
	position: relative;
}

.ycg-lb-informer-caption {
	position: relative;
}

/* Infobulle de protection (clic droit) */

.ycg-lb-hint {
	position: absolute;
	display: inline-block;
	padding: 5px 10px;
	font-size: 12px;
	line-height: normal;
	background-color: rgba(0, 0, 0, 0.8);
	color: #fff;
	transform: translateY(-100%);
	border-radius: 2px;
	transition: 0.4s;
	white-space: nowrap;
	pointer-events: none;
	z-index: 101;
}
