/* ============================================================
   Bloc Réalisations — filtres chips + grille 3 colonnes
   Valeurs identiques à la maquette (real-filters, real-grid, etc.)
   ============================================================ */

.sm-realisations { /* wrapper */ }

/* -------- Filtres (chips) -------- */
.sm-real-filters-section {
	padding: 28px 0 56px;
}
.sm-real-filters-container {
	max-width: var(--sm-col-max, 1280px);
	margin: 0 auto;
	padding-left: var(--sm-pad-x, clamp(20px, 4vw, 56px));
	padding-right: var(--sm-pad-x, clamp(20px, 4vw, 56px));
}
.sm-real-filters {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
}
.sm-real-filter-chip {
	appearance: none;
	background: transparent;
	border: 1px solid var(--sm-line);
	color: var(--sm-fg);
	padding: 10px 18px;
	font-family: var(--sm-font-display);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	transition: background .2s var(--sm-ease), color .2s var(--sm-ease), border-color .2s var(--sm-ease);
}
.sm-real-filter-chip:hover {
	border-color: color-mix(in oklab, var(--sm-fg) 30%, transparent);
}
.sm-real-filter-chip.is-active {
	background: var(--sm-fg);
	color: var(--sm-bg);
	border-color: var(--sm-fg);
}
.sm-real-filter-chip .count {
	font-family: var(--sm-font-mono);
	font-size: 11px;
	font-weight: 500;
	background: color-mix(in oklab, var(--sm-bg) 25%, transparent);
	padding: 1px 6px;
	border-radius: 999px;
	letter-spacing: 0;
}

/* -------- Galerie / Grid -------- */
.sm-real-gallery {
	padding: 0 0 90px;
}
.sm-real-gallery-container {
	max-width: var(--sm-col-max, 1280px);
	margin: 0 auto;
	padding-left: var(--sm-pad-x, clamp(20px, 4vw, 56px));
	padding-right: var(--sm-pad-x, clamp(20px, 4vw, 56px));
}
.sm-real-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
.sm-real-card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	cursor: pointer;
	transition: transform .35s var(--sm-ease);
}
.sm-real-card:hover {
	transform: translateY(-4px);
}
.sm-real-card.is-hidden {
	display: none;
}
.sm-real-card-img {
	position: relative;
	overflow: hidden;
	border-radius: 4px;
	aspect-ratio: 1;
	background: var(--sm-bg-2);
}
.sm-real-card-img img,
.sm-real-card-img__inner {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.sm-real-card-meta {
	display: flex;
	justify-content: space-between;
	font-family: var(--sm-font-mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--sm-fg-mute);
}
.sm-real-card-meta .year {
	color: var(--sm-accent);
}
.sm-real-card-title {
	font-family: var(--sm-font-display);
	font-size: 22px;
	text-transform: uppercase;
	margin: 0;
	line-height: 1.1;
	color: var(--sm-fg);
	letter-spacing: 0.02em;
}
.sm-real-empty {
	text-align: center;
	font-style: italic;
	color: var(--sm-fg-mute);
	padding: 60px 0;
}

@media (max-width: 1024px) {
	.sm-real-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.sm-real-grid { grid-template-columns: 1fr; }
}

/* -------- Badge type média (auto-détecté depuis post_content) -------- */
.sm-real-card-img { position: relative; }
.sm-real-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--sm-font-mono);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #fff;
	background: var(--sm-accent);
	padding: 5px 10px;
	border-radius: 999px;
}

a.sm-real-card {
	text-decoration: none;
	color: inherit;
}

/* -------- Pagination "Voir plus" -------- */
.sm-real-loadmore-wrap {
	display: flex;
	justify-content: center;
	margin-top: 56px;
}
.sm-real-loadmore {
	cursor: pointer;
}
.sm-real-card.is-paginated-hidden,
.sm-real-card.is-filtered-out {
	display: none;
}

/* -------- Modal lightbox -------- */
.sm-real-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
}
.sm-real-modal[hidden] { display: none; }
.sm-real-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 20, 15, 0.78);
	backdrop-filter: blur(4px);
	cursor: pointer;
}
.sm-real-modal__panel {
	position: relative;
	background: var(--sm-bg);
	max-width: 1100px;
	width: calc(100% - 40px);
	max-height: 92vh;
	overflow-y: auto;
	border-radius: 6px;
	box-shadow: 0 30px 80px rgba(0,0,0,0.4);
	padding: clamp(24px, 4vw, 56px);
	animation: smRealModalIn .35s var(--sm-ease);
}
@keyframes smRealModalIn {
	from { opacity: 0; transform: translateY(20px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
.sm-real-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	background: transparent;
	border: 1px solid var(--sm-line);
	border-radius: 999px;
	color: var(--sm-fg);
	cursor: pointer;
	transition: background .2s var(--sm-ease), border-color .2s;
}
.sm-real-modal__close:hover {
	background: var(--sm-bg-2);
	border-color: var(--sm-fg);
}
.sm-real-modal__head {
	margin-bottom: 32px;
}
.sm-real-modal__meta {
	display: flex;
	gap: 16px;
	font-family: var(--sm-font-mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--sm-fg-mute);
	margin-bottom: 12px;
}
.sm-real-modal__meta .year { color: var(--sm-accent); }
.sm-real-modal__title {
	font-family: var(--sm-font-display);
	font-weight: 700;
	font-size: clamp(28px, 4vw, 48px);
	line-height: 1.05;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: var(--sm-fg);
	margin: 0;
}
.sm-real-modal__content > * + * { margin-top: 24px; }
.sm-real-modal__content img { max-width: 100%; height: auto; display: block; }
.sm-real-modal__content .wp-block-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sm-real-modal__content .wp-block-gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; border-radius: 4px; }

/* Custom scrollbar */
.sm-real-modal__panel::-webkit-scrollbar { width: 8px; }
.sm-real-modal__panel::-webkit-scrollbar-thumb { background: var(--sm-fg-mute); border-radius: 4px; }
