/* ===============================
   GRID
=============================== */
.myd-realisations-grid {
	display: grid;
	gap: 2rem;
}

/* ===============================
   CARD
=============================== */
.myd-realisation-item {
	position: relative;
	background: #fff;
	border-radius: 20px;
	overflow: hidden;
	transition: all .4s ease;
	box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.myd-realisation-item:hover {
	transform: translateY(-6px);
	box-shadow: 0 20px 50px rgba(0,0,0,.12);
}

/* IMAGE */
.myd-realisation-item img {
	width: 100%;
	height: auto;
	display: block;
}

/* CONTENT */
.myd-realisation-item h3 {
	font-size: 1.25rem;
	font-weight: 600;
	margin: 1.2rem 1.5rem .4rem;
}

.myd-realisation-subtitle {
	font-size: .95rem;
	color: #6b7280;
	margin: 0 1.5rem 1rem;
}

/* YEAR */
.myd-realisation-item .year {
	position: absolute;
	top: 16px;
	right: 16px;
	background: rgba(0,0,0,.75);
	color: #fff;
	font-size: .75rem;
	padding: .35rem .6rem;
	border-radius: 999px;
}

/* TAGS */
.myd-realisation-item .tags {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	padding: 0 1.5rem 1rem;
}

.myd-realisation-item .tags span {
	font-size: .75rem;
	background: #f1f5f9;
	padding: .3rem .6rem;
	border-radius: 999px;
}

/* LINK */
.myd-realisation-link {
	display: block;
	margin: 0 1.5rem 1.5rem;
	font-weight: 500;
	color: #2563eb;
	text-decoration: none;
}

.myd-realisation-link:hover {
	text-decoration: underline;
}















/* ===============================
   FILTRES
=============================== */

.myd-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 40px;
}

/* bouton par défaut */
.myd-filter {
	background: #ffffff;
	border: 2px solid #e5e7eb;
	color: #111827;
	padding: 10px 18px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all .25s ease;
}

/* hover */
.myd-filter:hover {
	background: linear-gradient(135deg, #6366f1, #7c3aed);
	color: #ffffff;
	border-color: transparent;
	box-shadow: 0 6px 18px rgba(99,102,241,.35);
}

/* actif */
.myd-filter.active {
	background: linear-gradient(135deg, #6366f1, #7c3aed);
	color: #ffffff;
	border-color: transparent;
	box-shadow: 0 8px 20px rgba(99,102,241,.45);
}

/* bouton Tous */
.myd-filter[data-filter="*"] {
	font-weight: 600;
}

.myd-filter[data-filter="*"].active {
	background: #111827;
	color: #ffffff;
	box-shadow: 0 8px 20px rgba(0,0,0,.35);
}



/* ===============================
   GRID
=============================== */

.myd-realisations-grid {
	display: grid;
	grid-template-columns: repeat(var(--myd-cols-desktop), 1fr);
	gap: 2rem;
	width: 100%;
}

@media (max-width: 1024px) {
	.myd-realisations-grid {
		grid-template-columns: repeat(var(--myd-cols-tablet), 1fr);
	}
}

@media (max-width: 767px) {
	.myd-realisations-grid {
		grid-template-columns: repeat(var(--myd-cols-mobile), 1fr);
	}
}


.myd-card {
	background: #ffffff;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0,0,0,.06);
	cursor: pointer;
	transition: transform .35s ease, box-shadow .35s ease;
}

/* .myd-card {
	transition:
		opacity .35s ease,
		transform .35s ease;
} */

/* carte masquée = hors du layout */
.myd-card.is-hidden {
	opacity: 0;
	transform: scale(0.95);
	pointer-events: none;
	display: none;
}


.myd-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 18px 40px rgba(0,0,0,.12);
}


/* ===============================
   CARD HEIGHT CONSISTANTE
=============================== */

.myd-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.myd-card-content {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 20px;
}



/* ===============================
   MEDIA
=============================== */
.myd-card-media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10; /* ajuste ici si besoin */
	overflow: hidden;
	border-radius: 16px 16px 0 0;
	background: #f3f4f6;
}

.myd-card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.myd-card-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.55);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity .3s ease;
}

.myd-card:hover .myd-card-overlay {
	opacity: 1;
}

.myd-card-button {
	background: linear-gradient(135deg, #2563eb, #7c3aed);
	color: #ffffff;
	padding: .9rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}





/* ===============================
   CONTENT
=============================== */

.myd-card-content {
	padding: 1.4rem;
}

.myd-card-title {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: .4rem;
}

.myd-card-subtitle {
	font-size: .95rem;
	color: #6b7280;
	line-height: 1.5;
}

/* ===============================
   TAGS
=============================== */

.myd-card-tags {
	margin-top: .75rem;
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
}

.myd-tag {
	font-size: .75rem;
	padding: .25rem .6rem;
	border-radius: 999px;
	background: #eef2ff;
	color: #4338ca;
}

/* ===============================
   YEAR
=============================== */

.myd-card-year {
	position: absolute;
	top: 12px;
	left: 12px;
	background: rgba(0,0,0,.7);
	color: #ffffff;
	font-size: .75rem;
	padding: .25rem .6rem;
	border-radius: 6px;
}

/* ===============================
   LIGHTBOX
=============================== */

#myd-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.9);
	display: none;
	z-index: 9999;
}

#myd-lightbox.active {
	display: flex;
	align-items: center;
	justify-content: center;
}

.myd-lightbox-content img {
	max-width: 90vw;
	max-height: 90vh;
}

.myd-close,
.myd-nav {
	position: absolute;
	background: none;
	border: none;
	color: #ffffff;
	font-size: 3rem;
	cursor: pointer;
}

.myd-close { top: 20px; right: 30px; }
.myd-nav.prev { left: 30px; }
.myd-nav.next { right: 30px; }













/* ===============================
   LIGHTBOX FULLSCREEN
=============================== */

#myd-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(15, 15, 20, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease;
}

#myd-lightbox.active {
	opacity: 1;
	pointer-events: auto;
}

/* Contenu */
.myd-lightbox-content {
	max-width: 90vw;
	max-height: 85vh;
	background: #fff;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(0,0,0,.35);
	transform: scale(.95);
	transition: transform 0.35s ease;
}

#myd-lightbox.active .myd-lightbox-content {
	transform: scale(1);
}

/* Image */
.myd-lightbox-content img {
	width: 100%;
	height: auto;
	display: block;
}

/* Boutons */
.myd-close {
	position: absolute;
	top: 30px;
	right: 40px;
	font-size: 36px;
	color: #fff;
	background: none;
	border: none;
	cursor: pointer;
}

.myd-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	font-size: 60px;
	color: #fff;
	background: none;
	border: none;
	cursor: pointer;
	padding: 10px;
}

.myd-nav.prev { left: 30px; }
.myd-nav.next { right: 30px; }

/* Mobile */
@media (max-width: 768px) {
	.myd-nav {
		font-size: 42px;
	}
}



/* ===============================
   LIGHTBOX CASE STUDY
=============================== */

.myd-lightbox-inner {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 40px;
	max-width: 1100px;
	padding:3%;
}

.myd-lightbox-media {
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: 16px;
	overflow: hidden;
	background: #f2f3f7;
	display: flex;
	align-items: center;
	justify-content: center;
}

.myd-lightbox-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.myd-lightbox-text {
	color: #1a1a1a;
}

.myd-lightbox-year {
	display: inline-block;
	background: #6c5ce7;
	color: #fff;
	font-size: 13px;
	padding: 6px 12px;
	border-radius: 999px;
	margin-bottom: 16px;
}

.myd-lightbox-text h2 {
	font-size: 28px;
	margin-bottom: 14px;
}

.myd-lightbox-text p {
	font-size: 16px;
	line-height: 1.7;
	color: #555;
	margin-bottom: 20px;
}

.myd-lightbox-tags {
	margin-bottom: 24px;
}

.myd-lightbox-tags .myd-tag {
	background: #eef0ff;
	color: #6c5ce7;
	margin-right: 8px;
}

/* Bouton */
.myd-lightbox-btn {
	display: inline-block;
	padding: 14px 26px;
	background: linear-gradient(135deg, #6c5ce7, #8e7bff);
	color: #fff;
	border-radius: 999px;
	font-weight: 600;
	text-decoration: none;
	transition: transform .25s ease, box-shadow .25s ease;
}

.myd-lightbox-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(108,92,231,.35);
}

/* Responsive */
@media (max-width: 900px) {
	.myd-lightbox-inner {
		grid-template-columns: 1fr;
	}
}



/* ===============================
   CARD → FULLSCREEN TRANSITION
=============================== */

.myd-transition-clone {
	position: fixed;
	z-index: 9999;
	object-fit: cover;
	transition: all 0.45s cubic-bezier(.4,0,.2,1);
	border-radius: 12px;
}

.myd-no-scroll {
	overflow: hidden;
}


/* ===============================
   LIGHTBOX NAVIGATION
=============================== */

#myd-lightbox .myd-nav {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	z-index: 9999;

	width: 44px;
	height: 44px;
	border-radius: 50%;

	background: rgba(0,0,0,0.65);
	color: #fff;

	display: flex;
	align-items: center;
	justify-content: center;

	font-size: 28px;
	cursor: pointer;
	border: none;
}

#myd-lightbox .myd-nav.prev {
	left: 16px;
}

#myd-lightbox .myd-nav.next {
	right: 16px;
}

#myd-lightbox .myd-nav:hover {
	background: rgba(0,0,0,0.85);
}



/* ===============================
   LOAD MORE BUTTON
=============================== */

.myd-load-more {
	margin: 40px auto 0;
	display: block;

	padding: 14px 28px;
	border-radius: 999px;

	background: linear-gradient(135deg, #2563eb, #7c3aed);
	color: #fff;

	font-weight: 600;
	font-size: 15px;
	border: none;
	cursor: pointer;

	transition: transform .2s ease, box-shadow .2s ease;
}

.myd-load-more:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 30px rgba(0,0,0,.15);
}




/* ===============================
   FILTER BUTTONS
=============================== */

.myd-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 32px;
}

.myd-filter {
	padding: 10px 18px;
	border-radius: 999px;

	background: #fff;
	color: #222;

	border: 2px solid #e5e7eb;
	cursor: pointer;

	font-weight: 500;
	transition: all .25s ease;
}

.myd-filter:hover {
	background: #f3f4f6;
}

.myd-filter.active {
	background: linear-gradient(135deg, #2563eb, #7c3aed);
	color: #fff;
	border-color: transparent;
}
