.realisations-container {
  margin-block: 40px;
}

.realisations-grid {
  column-count: 3;
  column-gap: 20px;
}

.realisation-item {
  break-inside: avoid;
  margin-bottom: 20px;
  width: 100%;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;

  cursor: pointer;
}

.realisation-item.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.realisation-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 10px;
  min-height: 350px;
}

.realisation-content {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.realisation-item:hover .realisation-content {
  transform: scaleX(1);
}

.realisation-image {
  overflow: hidden;
}

.realisation-title {
  color: var(--primary);
  font-size: 1.5rem;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 0;
}

.realisation-author {
  font-size: 0.9rem;
  margin-bottom: 15px;
  opacity: 0.7;
}

.realisation-author-label {
  font-style: italic;
  opacity: 0.7;
}

.realisation-description {
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.realisation-tags {
  display: flex;
  gap: 7px;
  font-size: 0.9rem;
  font-style: italic;
  opacity: 0.7;
}

.realisation-date {
  color: #999;
  font-size: 0.8rem;
  margin-top: 15px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.realisation-link {
  margin-top: 15px;
}

/* Filtres JavaScript */
.realisations-filters {
  margin-bottom: 30px;
  padding: 20px;
  background: var(--primary-dark);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: end;
  color: #fff;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}

.realisation-filter {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.realisation-filter:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.filter-actions {
  display: flex;
  align-items: end;
}

.btn-reset-filters {
  padding: 10px 20px;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.realisation-item.filtered-out {
  opacity: 0 !important;
  transform: scale(0.8) !important;
  pointer-events: none !important;
  display: none !important;
}

.realisation-item.filtered-in {
  opacity: 1 !important;
  transform: scale(1) !important;
  display: block !important;
}

/* Pagination supprimée - toutes les réalisations sont affichées sur la même page */

/* Styles pour la lightbox */
.realisation-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  max-width: 95%;
  max-height: 95%;
  background-color: transparent;
  border-radius: 8px;
  overflow: visible;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.lightbox-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image img {
  display: block;
  max-width: 100%;
  max-height: 95vh;
  width: auto;
  height: auto;
  border: 5px solid white;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.lightbox-info {
  position: absolute;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 20px;
  width: 100%;
  text-align: center;
  border-radius: 0 0 10px 10px;
  border: 5px solid #fff;
  border-top: none;
}

.lightbox-info .realisation-title {
  color: var(--primary);
  font-size: 1.5rem;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 0;
}

.lightbox-info .realisation-author {
  font-size: 0.9rem;
  margin-bottom: 0;
  opacity: 0.7;
}

.lightbox-info .realisation-description {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.lightbox-info .realisation-tags {
  display: flex;
  gap: 7px;
  font-size: 0.9rem;
  font-style: italic;
  opacity: 0.7;
  justify-content: center;
  flex-wrap: wrap;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.9);
}

@media (max-width: 1024px) {
  .realisations-grid {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .realisations-grid {
    column-count: 1;
    column-gap: 10px;
  }

  .realisation-item {
    margin-bottom: 10px;
  }

  .realisation-content {
    padding: 15px;
  }

  .realisation-title {
    font-size: 1.2rem;
  }

  .realisations-filters {
    padding: 15px;
  }

  .filter-item {
    display: block;
    margin-bottom: 15px;
  }
  .realisation-item {
    cursor: default;
  }

  .realisation-lightbox {
    display: none !important;
  }
}

/* Styles pour la page d'accueil */
.johnsteel-homepage-realisations {
  margin: 60px 0;
  padding: 40px 0;
}

.johnsteel-homepage-realisations .section-title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.5rem;
  font-weight: 600;
  color: #333;
}

/* Wrapper pour le marquee - masque le débordement */
.johnsteel-homepage-realisations .realisations-marquee-wrapper {
  overflow: hidden;
  width: 100%;
  position: relative;
  margin-top: 30px;
}

/* Container du marquee avec animation */
.johnsteel-homepage-realisations .realisations-marquee {
  display: flex;
  flex-direction: row;
  gap: 20px;
  width: fit-content;
  animation: marquee-scroll 60s linear infinite;
  will-change: transform;
}
.johnsteel-homepage-realisations .realisations-marquee .realisation-item {
  opacity: 1;
}

/* Animation du défilement */
@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.johnsteel-homepage-realisations p {
  font-size: 1.2rem;
}

.johnsteel-homepage-realisations .realisation-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  flex-shrink: 0;
  width: 400px;
  height: 300px;
  cursor: unset;
}

.johnsteel-homepage-realisations .realisation-image {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.johnsteel-homepage-realisations .realisation-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.johnsteel-homepage-realisations
  .realisation-item:hover
  .realisation-image
  img {
  transform: scale(1.1);
}

.johnsteel-homepage-realisations .realisation-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
  padding: 20px;
  color: white;
  text-decoration: none;
  transition: background 0.3s ease;
}

.johnsteel-homepage-realisations .realisation-overlay:hover {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
  text-decoration: none;
  color: white;
}

.johnsteel-homepage-realisations .realisation-overlay .realisation-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: white;
  text-transform: uppercase;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .johnsteel-homepage-realisations .realisation-item {
    width: 200px;
    height: 200px;
  }

  .johnsteel-homepage-realisations .realisations-marquee {
    gap: 15px;
    animation-duration: 40s;
  }

  .johnsteel-homepage-realisations .section-title {
    font-size: 2rem;
    margin-bottom: 30px;
  }

  .johnsteel-homepage-realisations .realisation-overlay {
    padding: 15px;
  }

  .johnsteel-homepage-realisations .realisation-overlay .realisation-title {
    font-size: 0.9rem;
  }
}
