/**
 * GB — Réalisations (galerie). Design « premium industriel » GB Couverture.
 * Thème cible : Mediverse.
 * Version: 2.0.1
 */

.gb-ga.gb-ga :where(h1, h2, h3, h4, h5, h6, p) { margin: 0; padding: 0; letter-spacing: normal; text-transform: none; }
.gb-ga.gb-ga :where(a, button, input, select, textarea, label) { text-transform: none; letter-spacing: normal; }
.gb-ga [hidden] { display: none !important; }
.gb-ga * { min-width: 0; }
.gb-ga figure { margin: 0; }

.gb-ga {
	--gb-ga-cols: 4;
	--gb-ga-gap: 18px;
	--gb-ga-radius: 24px;
	--gb-ga-or: #10529c;
	--gb-ga-or-clair: #4a86cc;
	--gb-ga-encre: #1e2a4b;
	--gb-ga-gris: #5a6a8a;
	--gb-ga-blanc: #ffffff;
	--gb-ga-creme: #eef4fb;
	--gb-ga-filet: rgba(16, 82, 156, 0.32);
	--gb-ga-ease: cubic-bezier(0.22, 0.7, 0.25, 1);
	overflow-x: clip;
	color: var(--gb-ga-encre);
}

/* ---- En-tête + filtres pilule ---- */
.gb-ga__entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.gb-ga .gb-ga__surtitre {
	display: inline-flex;
	margin-bottom: 10px;
	padding: 9px 24px;
	color: #ffffff;
	background: linear-gradient(135deg, #10529c, #1e2a4b);
	border-radius: 999px;
	box-shadow: 0 12px 26px -14px rgba(16, 82, 156, 0.7);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.gb-ga .gb-ga__titre {
	position: relative;
	padding-bottom: 14px;
	font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2.1rem);
	font-weight: 800;
}
.gb-ga .gb-ga__titre::after { content: ''; position: absolute; left: 0; bottom: 0; width: 58px; height: 4px; border-radius: 2px; background: #ca1e1e; }
.gb-ga__filtres { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.gb-ga__filtre {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 20px;
	border: 1px solid var(--gb-ga-filet);
	border-radius: 999px;
	background: var(--gb-ga-blanc);
	color: var(--gb-ga-encre);
	font-weight: 600;
	cursor: pointer;
	transition: all 220ms var(--gb-ga-ease);
}
.gb-ga__filtre:hover { border-color: var(--gb-ga-or); color: var(--gb-ga-or); }
.gb-ga__filtre.is-active {
	background: linear-gradient(135deg, #10529c, #1e2a4b);
	border-color: transparent;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
	color: #ffffff;
}
.gb-ga__filtre:focus-visible { outline: 2px solid var(--gb-ga-or); outline-offset: 3px; }
.gb-ga__filtre-n {
	padding: 2px 9px;
	border-radius: 999px;
	background: rgba(16, 82, 156, 0.12);
	font-size: 0.76rem;
	font-weight: 700;
}
.gb-ga__filtre.is-active .gb-ga__filtre-n { background: rgba(255, 255, 255, 0.2); }

/* ---- Grille mosaïque asymétrique ---- */
.gb-ga__piste { display: grid; grid-template-columns: repeat(var(--gb-ga-cols), minmax(0, 1fr)); gap: var(--gb-ga-gap); grid-auto-flow: dense; }
.gb-ga--grille .gb-ga__item:first-child { grid-column: span 2; grid-row: span 2; }
.gb-ga--mosaique .gb-ga__piste { display: block; column-count: var(--gb-ga-cols); column-gap: var(--gb-ga-gap); }
.gb-ga--mosaique .gb-ga__item { break-inside: avoid; margin-bottom: var(--gb-ga-gap); }
.gb-ga--carrousel .gb-ga__piste {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding-bottom: 6px;
}
.gb-ga--carrousel .gb-ga__piste::-webkit-scrollbar { display: none; }
.gb-ga--carrousel .gb-ga__item {
	flex: 0 0 calc((100% - (var(--gb-ga-cols) - 1) * var(--gb-ga-gap)) / var(--gb-ga-cols));
	scroll-snap-align: start;
}
.gb-ga__piste:focus-visible { outline: 2px solid var(--gb-ga-or); outline-offset: 4px; border-radius: var(--gb-ga-radius); }

/* ---- Tuile ---- */
.gb-ga__item { min-width: 0; }
.gb-ga__cadre {
	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
	padding: 0;
	border: 1px solid var(--gb-ga-filet);
	border-radius: var(--gb-ga-radius);
	box-shadow: 0 22px 44px -30px rgba(30, 42, 75, 0.35);
	background: var(--gb-ga-creme);
	cursor: pointer;
	transition: transform 260ms var(--gb-ga-ease), box-shadow 260ms var(--gb-ga-ease);
}
div.gb-ga__cadre { cursor: default; }
.gb-ga__cadre:hover { transform: translateY(-4px); box-shadow: 0 30px 54px -28px rgba(16, 82, 156, 0.45); }
.gb-ga__cadre:focus-visible { outline: 2px solid var(--gb-ga-or); outline-offset: 3px; }
.gb-ga__img { width: 100%; height: 100%; min-height: 100%; max-width: none; object-fit: cover; display: block; aspect-ratio: 4 / 3; transition: transform 700ms var(--gb-ga-ease); }
.gb-ga--r-1-1 .gb-ga__img { aspect-ratio: 1 / 1; }
.gb-ga--r-3-2 .gb-ga__img { aspect-ratio: 3 / 2; }
.gb-ga--r-16-9 .gb-ga__img { aspect-ratio: 16 / 9; }
.gb-ga--r-3-4 .gb-ga__img { aspect-ratio: 3 / 4; }
.gb-ga--r-auto .gb-ga__img { aspect-ratio: auto; height: auto; min-height: 0; }
.gb-ga--mosaique .gb-ga__img { aspect-ratio: auto; height: auto; min-height: 0; }
.gb-ga--zoom .gb-ga__cadre:hover .gb-ga__img { transform: scale(1.07); }

/* Légende sur voile dégradé montant */
.gb-ga__voile {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	background: linear-gradient(135deg, rgba(16, 82, 156, 0.78), rgba(30, 42, 75, 0.88));
	opacity: 0;
	transition: opacity 320ms var(--gb-ga-ease);
}
.gb-ga__voile-corps {
	width: 100%;
	padding: 18px 20px;
	transform: translateY(16px);
	transition: transform 360ms var(--gb-ga-ease);
}
.gb-ga__cadre:hover .gb-ga__voile,
.gb-ga__cadre:focus-visible .gb-ga__voile { opacity: 1; }
.gb-ga__cadre:hover .gb-ga__voile-corps,
.gb-ga__cadre:focus-visible .gb-ga__voile-corps { transform: none; }
.gb-ga__voile .gb-ga__legende {
	position: relative;
	display: block;
	padding-bottom: 10px;
	margin-bottom: 6px;
	color: #ffffff;
	font-weight: 800;
	overflow-wrap: anywhere;
}
.gb-ga__voile .gb-ga__legende::after { content: ''; position: absolute; left: 0; bottom: 0; width: 38px; height: 3px; border-radius: 2px; background: #ca1e1e; }
.gb-ga__voile .gb-ga__lieu { display: block; color: #d7e4f6; font-size: 0.88rem; }
.gb-ga__loupe {
	position: absolute;
	top: 14px;
	right: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: #ffffff;
	background: rgba(255, 255, 255, 0.18);
	border-radius: 50%;
}
.gb-ga__loupe i, .gb-ga__loupe svg { line-height: 1 !important; vertical-align: middle; }
.gb-ga__sous { padding: 12px 4px 0; }
.gb-ga__sous .gb-ga__legende { font-weight: 700; overflow-wrap: anywhere; }
.gb-ga__sous .gb-ga__lieu { color: var(--gb-ga-gris); font-size: 0.88rem; }

/* ---- Pilotage carrousel ---- */
.gb-ga__pilotage { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.gb-ga__puces { display: flex; gap: 8px; }
.gb-ga__puces button { width: 26px; height: 6px; padding: 0; border: 0; border-radius: 3px; background: var(--gb-ga-filet); cursor: pointer; transition: all 240ms var(--gb-ga-ease); }
.gb-ga__puces button.is-active, .gb-ga__puces button[aria-selected='true'] { width: 42px; background: linear-gradient(90deg, #10529c, #1e2a4b); }
.gb-ga__puces button:focus-visible { outline: 2px solid var(--gb-ga-or); outline-offset: 3px; }
.gb-ga__fleches { display: flex; gap: 10px; }
.gb-ga__fleche {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 47px;
	border: 0;
	color: #ffffff;
	background: linear-gradient(135deg, #10529c, #1e2a4b);
	border-radius: 50%;
	cursor: pointer;
	transition: opacity 220ms var(--gb-ga-ease), transform 220ms var(--gb-ga-ease);
}
.gb-ga__fleche:hover { transform: translateY(-2px); }
.gb-ga__fleche:disabled { opacity: 0.35; cursor: default; transform: none; }
.gb-ga__fleche:focus-visible { outline: 2px solid var(--gb-ga-or); outline-offset: 3px; }
.gb-ga__fleche i, .gb-ga__fleche svg { line-height: 1 !important; vertical-align: middle; }

/* ---- Visionneuse ---- */
.gb-gav { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; }
.gb-gav[hidden] { display: none !important; }
.gb-gav__voile { position: absolute; inset: 0; background: rgba(20, 29, 54, 0.92); cursor: pointer; }
.gb-gav__panneau {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(1100px, calc(100% - 32px));
	max-height: calc(100dvh - 32px);
	padding: 18px;
	background: #1e2a4b;
	border: 1px solid rgba(141, 180, 232, 0.3);
	border-radius: 24px;
	box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}
.gb-gav__barre { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.gb-gav .gb-gav__compteur { color: #d7e4f6; font-weight: 700; }
.gb-gav__sur { color: #8db4e8; padding: 0 2px; }
.gb-gav__fermer {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 0;
	color: #ffffff;
	background: #ca1e1e;
	border-radius: 50%;
	cursor: pointer;
}
.gb-gav__fermer:focus-visible { outline: 2px solid #8db4e8; outline-offset: 3px; }
.gb-gav__fermer i, .gb-gav__fermer svg { line-height: 1 !important; vertical-align: middle; }
.gb-gav__scene { display: flex; align-items: center; gap: 14px; min-height: 0; }
.gb-gav__cadre { position: relative; flex: 1 1 auto; min-width: 0; border-radius: 16px; overflow: hidden; background: #141d36; }
.gb-gav__img { width: 100%; max-height: min(64dvh, 640px); object-fit: contain; display: block; }
.gb-gav__attente {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 34px;
	height: 34px;
	margin: -17px 0 0 -17px;
	border: 3px solid rgba(255, 255, 255, 0.25);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: gb-gav-tour 800ms linear infinite;
}
@keyframes gb-gav-tour { to { transform: rotate(360deg); } }
.gb-gav__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border: 0;
	color: #ffffff;
	background: linear-gradient(135deg, #10529c, #1e2a4b);
	border-radius: 50%;
	cursor: pointer;
	transition: transform 220ms var(--gb-ga-ease), opacity 220ms var(--gb-ga-ease);
}
.gb-gav__nav:hover { transform: translateY(-2px); }
.gb-gav__nav:disabled { opacity: 0.35; cursor: default; transform: none; }
.gb-gav__nav:focus-visible { outline: 2px solid #8db4e8; outline-offset: 3px; }
.gb-gav__nav i, .gb-gav__nav svg { line-height: 1 !important; vertical-align: middle; }
.gb-gav__pied { margin-top: 12px; }
.gb-gav .gb-gav__legende { color: #ffffff; font-weight: 700; overflow-wrap: anywhere; }
.gb-gav .gb-gav__lieu { color: #9db4d8; font-size: 0.9rem; }
.gb-gav__vignettes { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.gb-gav__vignettes button {
	flex: 0 0 auto;
	width: 58px;
	height: 58px;
	padding: 0;
	border: 0;
	overflow: hidden;
	border-radius: 50%;
	cursor: pointer;
	opacity: 0.5;
	transition: opacity 220ms var(--gb-ga-ease);
}
.gb-gav__vignettes button.is-active, .gb-gav__vignettes button[aria-selected='true'] { opacity: 1; }
.gb-gav__vignettes button:focus-visible { outline: 2px solid #8db4e8; outline-offset: 2px; }
.gb-gav__vignettes img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Responsive ---- */
@media (max-width: 1024px) { .gb-ga__piste { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gb-ga--mosaique .gb-ga__piste { column-count: 3; } }
@media (max-width: 780px) {
	.gb-ga__piste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gb-ga--mosaique .gb-ga__piste { column-count: 2; }
	.gb-ga--carrousel .gb-ga__item { flex-basis: calc((100% - var(--gb-ga-gap)) / 2); }
	.gb-gav__nav { display: none; }
}
@media (max-width: 520px) {
	.gb-ga__piste { grid-template-columns: minmax(0, 1fr); }
	.gb-ga--grille .gb-ga__item:first-child { grid-column: auto; grid-row: auto; }
	.gb-ga--mosaique .gb-ga__piste { column-count: 1; }
	.gb-ga--carrousel .gb-ga__item { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.gb-ga__img, .gb-ga__cadre, .gb-ga__voile, .gb-ga__voile-corps { transition: none; }
	.gb-gav__attente { animation: none; }
}
