/* Baguès Collections — recherche (loupe de l'en-tête + panneau plein écran graphique) */

/* --- Bouton loupe dans l'en-tête (à côté de En / Fr) --- */
.gp-search-btn {
	display: inline-flex; align-items: center; justify-content: center;
	background: none; border: none; padding: 0; margin: 0; cursor: pointer; color: inherit;
	transition: opacity 0.2s;
}
.gp-search-btn:hover, .gp-search-btn:focus { background: transparent; opacity: 0.5; }
.gp-search-btn .gp-icon { width: 18px; height: 18px; }

/* --- Panneau plein écran --- */
html.bgc-search-lock { overflow: hidden; }

.bgc-search {
	position: fixed; inset: 0; z-index: 10002; /* au-dessus de l'en-tête (9999), du menu mobile (10000) et du tiroir filtres (10001) */
	background: #fff; overflow-y: auto; -webkit-overflow-scrolling: touch;
	opacity: 0; transition: opacity 0.2s ease;
	font-family: 'Manrope', sans-serif; color: #1a1a1a;
}
.bgc-search[hidden] { display: none; }
.bgc-search.is-open { opacity: 1; }
.bgc-search a { color: #1a1a1a; text-decoration: none; }

.bgc-search-inner { position: relative; max-width: 1440px; margin: 0 auto; padding: 96px 56px 60px; box-sizing: border-box; }

.bgc-search-close {
	position: absolute; top: 22px; right: 48px; width: 44px; height: 44px; padding: 0;
	background: none; border: none; cursor: pointer; font-size: 34px; line-height: 1; color: #1a1a1a;
}
.bgc-search-close:hover, .bgc-search-close:focus { background: none; opacity: 0.5; }

.bgc-search-form { margin: 0 0 30px; max-width: 640px; }
.bgc-search-input {
	display: block; width: 100%; box-sizing: border-box; padding: 6px 0 10px; margin: 0;
	background: none; border: none; border-bottom: 1px solid #1a1a1a; border-radius: 0; box-shadow: none; outline: none;
	font-family: 'Janson Text LT Std', 'Cormorant Garamond', serif; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; color: #1a1a1a;
	-webkit-appearance: none; appearance: none;
}
.bgc-search-input::placeholder { color: #b9b4aa; }
.bgc-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.bgc-search-input:focus { border-bottom-color: #1a1a1a; box-shadow: none; }

.bgc-search-title {
	margin: 0 0 16px; font-family: 'Manrope', sans-serif; font-size: 11px !important; font-weight: 500;
	letter-spacing: 0.18em; text-transform: uppercase; color: #6b6760;
}
.bgc-search-group { margin-bottom: 40px; }

/* Photos (ratio des fiches 1400 × 1700) */
.bgc-search-photo { display: block; position: relative; overflow: hidden; background: linear-gradient(160deg, #e4ded3, #c9bfae); }
.bgc-search-photo.is-portrait { aspect-ratio: 1400 / 1700; }
.bgc-search-photo.is-wide { aspect-ratio: 6 / 5; }
.bgc-search-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
@media (hover: hover) and (pointer: fine) {
	.bgc-search-tile:hover .bgc-search-photo img,
	.bgc-search-card:hover .bgc-search-photo img { transform: scale(1.04); }
}

/* À l'ouverture : types en vignettes */
.bgc-search-types { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 16px; }
.bgc-search-tile { display: block; }
.bgc-search-tile-cap { display: flex; justify-content: flex-start; align-items: baseline; gap: 8px; margin-top: 10px; }
.bgc-search-tile-name { font-family: 'Janson Text LT Std', 'Cormorant Garamond', serif; font-size: 22px; line-height: 1.2; }
.bgc-search-tile-count { font-size: 11px; color: #6b6760; }

/* Tuile large (résultats) : légende sur la photo */
.bgc-search-tile.is-large { position: relative; }
.bgc-search-tile.is-large .bgc-search-tile-cap {
	position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 40px 22px 18px; color: #fff; justify-content: flex-start;
	background: linear-gradient(0deg, rgba(26, 26, 26, 0.62), rgba(26, 26, 26, 0));
}
.bgc-search-tile.is-large .bgc-search-tile-name { font-size: 34px; }
.bgc-search-tile.is-large .bgc-search-tile-count { font-size: 12px; letter-spacing: 0.08em; color: #fff; }
.bgc-search-tile.is-large .bgc-search-tile-count::after { content: ''; }

/* Pastilles styles / matières */
.bgc-search-chipcols { display: flex; gap: 80px; }
.bgc-search-chipcols > .bgc-search-group { flex: 1; min-width: 0; }
.bgc-search-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.bgc-search-chip { border: 1px solid #cfcac1; padding: 10px 18px; font-size: 14px; border-radius: 2px; transition: border-color 0.2s; }
.bgc-search-chip:hover { border-color: #1a1a1a; }

/* Résultats : colonne catégories + grille de références */
.bgc-search-layout { display: flex; gap: 56px; align-items: flex-start; }
.bgc-search-side { width: 360px; flex-shrink: 0; display: flex; flex-direction: column; gap: 28px; }
.bgc-search-main { flex: 1; min-width: 0; }
.bgc-search-layout.is-single { flex-direction: column; gap: 24px; }
.bgc-search-layout.is-single .bgc-search-side { width: 100%; max-width: 360px; }

.bgc-search-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid #dcd8d0; }
.bgc-search-list li { border-bottom: 1px solid #dcd8d0; }
.bgc-search-row { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; font-size: 15px; }
.bgc-search-row-group { margin-left: 8px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #6b6760; }
.bgc-search-row-count { font-size: 12px; color: #6b6760; }
.bgc-search-row:hover .bgc-search-row-name { opacity: 0.55; }

.bgc-search-mainhead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; min-height: 18px; }
.bgc-search-mainhead .bgc-search-title { margin: 0; }
.bgc-search-all { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; border-bottom: 1px solid #1a1a1a; padding-bottom: 2px; margin-left: auto; }
.bgc-search-all:hover { opacity: 0.6; }

.bgc-search-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
.bgc-search-card { display: block; }
.bgc-search-card-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 10px; }
.bgc-search-card-ref { font-size: 13px; letter-spacing: 0.04em; }
.bgc-search-card-type { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #6b6760; }

.bgc-search-empty { color: #6b6760; font-size: 15px; }

/* Barre du bas (mobile uniquement) */
.bgc-search-bar { display: none; }

@media (max-width: 1100px) {
	.bgc-search-types { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.bgc-search-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.bgc-search-layout { gap: 36px; }
	.bgc-search-side { width: 280px; }
}

@media (max-width: 800px) {
	.bgc-search-inner { padding: 76px 20px 110px; }
	.bgc-search-form { max-width: none; }
	.bgc-search-input { font-size: 22px; }
	.bgc-search-close { top: 10px; right: 10px; }
	.bgc-search-form { margin-bottom: 20px; }
	.bgc-search-types { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
	.bgc-search-chipcols { flex-direction: column; gap: 0; }
	.bgc-search-chip { padding: 9px 14px; font-size: 13px; }

	.bgc-search-layout { flex-direction: column; align-items: stretch; gap: 22px; }
	.bgc-search-side, .bgc-search-layout.is-single .bgc-search-side { width: 100%; max-width: none; gap: 16px; }
	.bgc-search-tile.is-large .bgc-search-photo { aspect-ratio: 13 / 6; }
	.bgc-search-tile.is-large .bgc-search-tile-name { font-size: 28px; }
	.bgc-search-mainhead .bgc-search-all { display: none; }
	.bgc-search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }

	.bgc-search-bar {
		display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1; box-sizing: border-box;
		padding: 14px 20px calc(22px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e6e2da;
	}
	.bgc-search-cta {
		display: flex; align-items: center; justify-content: center; height: 48px; background: #1a1a1a; color: #fff !important;
		font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
	}
}
