/* ===========================================
   Réalisations - Intro section
   =========================================== */
.realisations-intro {
  max-width: 680px;
  margin-bottom: 2.5rem;
}
.realisations-intro__title {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--pbmit-heading-color);
  margin: 0 0 1rem;
}
.realisations-intro__desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #666;
  margin: 0;
}
@media (max-width: 767px) {
  .realisations-intro__title {
    font-size: 1.6rem;
  }
}


/* ===========================================
   Réalisations - Cards hover
   =========================================== */

/* Badge catégorie toujours visible */
.pbmit-portfolio-style-1 .pbmit-port-cat {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 3;
}
.pbmit-portfolio-style-1 .pbmit-port-cat .badge-cat {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(4px);
  color: #333;
  border: none;
}

/* Badge nombre de photos (galerie) */
.pbmit-portfolio-style-1 .badge-photos {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #80b927;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  border: none;
  vertical-align: middle;
}
.pbmit-portfolio-style-1 .pbmit-port-cat {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
}
.pbmit-portfolio-style-1 .badge-photos i {
  font-size: 12px;
}

/* Override overlay : gradient au lieu d'aplat vert */
.pbmit-portfolio-style-1 .pbminfotech-box-content {
  opacity: 1;
  transform: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.25) 40%, transparent 70%);
  border-radius: 5px;
  transition: background 0.4s ease;
}
.pbmit-portfolio-style-1:hover .pbminfotech-box-content {
  transform: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 75%);
}

/* Titre en bas */
.pbmit-portfolio-style-1 .pbminfotech-titlebox {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.pbmit-portfolio-style-1 .pbmit-portfolio-title {
  transform: translateY(5px);
  transition: transform 0.35s ease;
}
.pbmit-portfolio-style-1:hover .pbmit-portfolio-title {
  transform: translateY(0);
}
.pbmit-portfolio-style-1 .pbmit-portfolio-title,
.pbmit-portfolio-style-1 .pbmit-portfolio-title a {
  font-size: 18px;
  line-height: 24px;
}

/* Flèche */
.pbmit-project-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: #80b927;
  color: #FFF;
  font-size: 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.35s ease;
}
.pbmit-portfolio-style-1:hover .pbmit-project-arrow {
  opacity: 1;
  transform: translateY(0);
}

/* Override radius + hauteur fixe */
.pbmit-portfolio-style-1 .pbmit-featured-wrapper {
  border-radius: 5px;
  height: 280px;
}
.pbmit-portfolio-style-1 .pbmit-featured-wrapper img {
  border-radius: 5px;
  height: 100%;
  object-fit: cover;
}

/* Image hover zoom — plus subtil */
.pbmit-portfolio-style-1 .pbmit-featured-wrapper img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.pbmit-portfolio-style-1:hover .pbmit-featured-wrapper img {
  transform: scale(1.05);
}

/* Grid sizer (Isotope) */
.grid-sizer {
  height: 0;
  margin: 0;
  padding: 0;
  visibility: hidden;
}

/* ===========================================
   Card single (projet mono-image) — compact
   =========================================== */
.pbmit-portfolio-style-1.card-single .pbmit-featured-wrapper {
  height: 280px;
}
.pbmit-portfolio-style-1.card-single .pbminfotech-box-content {
  display: none;
}
.pbmit-portfolio-style-1.card-single .pbmit-port-cat .badge-cat {
  font-size: 10px;
  padding: 3px 8px;
}

/* Flèches lightbox Magnific Popup */
.mfp-arrow {
  z-index: 9999;
  opacity: 0.85;
}
.mfp-arrow:hover {
  opacity: 1;
}

/* ===========================================
   Modale Projet - Popup avec panneau latéral
   =========================================== */

.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  transition: opacity 0.3s ease;
  cursor: pointer;
}
.custom-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.custom-modal-wrapper {
  background: #fff;
  width: 100%;
  max-width: 1400px;
  height: 100%;
  max-height: 90vh;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: default;
  box-shadow: none;
}
.modal-body-content {
  flex: 1;
  overflow: hidden;
  height: 100%;
}
.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  font-size: 24px;
  color: #333;
  z-index: 10;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.close-modal:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Layout modale : panneau info gauche + galerie droite */
.project-modal-layout {
  display: flex;
  flex-direction: row;
  height: 100%;
}

/* --- Panneau latéral gauche --- */
.project-modal-layout .project-info-side {
  width: 360px;
  min-width: 360px;
  height: 100%;
  background: #fff;
  border-right: 1px solid #eee;
  flex-shrink: 0;
  overflow-y: auto;
  border-radius: 12px 0 0 12px;
}
.project-modal-layout .project-info-side .project-info-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
.project-modal-layout .project-info-side .project-info-top {
  flex: 1;
}
.project-modal-layout .project-info-side h3 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  color: var(--pbmit-heading-color);
  margin: 20px 0 15px;
  border: none;
  padding: 0;
}
.project-modal-layout .project-info-side .project-desc {
  margin-top: 0;
}
.project-modal-layout .project-info-side .project-desc,
.project-modal-layout .project-info-side .project-desc p {
  font-size: 14px;
  color: #666;
  line-height: 22px;
  margin: 0;
}

/* Info bottom : compteur */
.project-modal-layout .project-info-side .project-info-bottom {
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid #e5e5e5;
}

/* Compteur */
.project-modal-layout .gallery-counter {
  font-size: 13px;
  color: #999;
  font-weight: 500;
  letter-spacing: 1px;
}

/* Badges dans modale */
.modal-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.modal-categories .badge-cat {
  background: #80b927;
  color: #fff;
  border: none;
  font-size: 11px;
}

/* --- Galerie droite --- */
.project-modal-layout .project-gallery-side {
  flex: 1;
  height: 100%;
  background: #f5f5f5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border-radius: 0 12px 12px 0;
}
.project-modal-layout .project-gallery-side .project-gallery-swiper {
  width: 100%;
  height: 100%;
}
.project-modal-layout .project-gallery-side .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-modal-layout .project-gallery-side .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: default;
}
.project-modal-layout .project-gallery-side .swiper-button-prev,
.project-modal-layout .project-gallery-side .swiper-button-next {
  position: absolute;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  transition: background 0.3s;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
}
.project-modal-layout .project-gallery-side .swiper-button-prev {
  left: 15px;
  transform: translateY(-50%) rotate(180deg);
}
.project-modal-layout .project-gallery-side .swiper-button-next {
  right: 15px;
}
.project-modal-layout .project-gallery-side .swiper-button-prev:hover,
.project-modal-layout .project-gallery-side .swiper-button-next:hover {
  background: rgba(0, 0, 0, 0.5);
}
.project-modal-layout .project-gallery-side .swiper-button-prev::after,
.project-modal-layout .project-gallery-side .swiper-button-next::after {
  font-size: 18px;
}

/* Badges dans grille */
.badge-cat {
  display: inline-block;
  background-color: #f1f1f1;
  color: #333;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 3px;
  margin-bottom: 3px;
  border: 1px solid #e0e0e0;
}

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 991px) {
  .custom-modal-overlay {
    padding: 20px;
  }
  .project-modal-layout {
    flex-direction: column;
  }
  .project-modal-layout .project-info-side {
    width: 100%;
    min-width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #eee;
    border-radius: 12px 12px 0 0;
  }
  .project-modal-layout .project-gallery-side {
    border-radius: 0 0 12px 12px;
  }
  .project-modal-layout .project-info-side .project-info-inner {
    padding: 25px 25px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
  }
  .project-modal-layout .project-info-side .project-info-top {
    flex: 1;
    min-width: 0;
  }
  .project-modal-layout .project-info-side h3 {
    margin: 8px 0 5px;
    font-size: 20px;
    line-height: 26px;
  }
  .project-modal-layout .project-info-side .project-info-bottom {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
  }
  .project-modal-layout .project-gallery-side {
    flex: 1;
    min-height: 0;
  }
  .project-modal-layout .project-gallery-side .swiper-button-prev,
  .project-modal-layout .project-gallery-side .swiper-button-next {
    width: 36px;
    height: 36px;
  }
  .project-modal-layout .project-gallery-side .swiper-button-prev::after,
  .project-modal-layout .project-gallery-side .swiper-button-next::after {
    font-size: 14px;
  }
}
@media (max-width: 767px) {
  /* Fullscreen modal on mobile */
  .custom-modal-overlay {
    padding: 0;
  }
  .custom-modal-wrapper {
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }
  .close-modal {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    z-index: 20;
  }
  .project-modal-layout {
    flex-direction: column;
    height: 100%;
  }
  /* Gallery on top: ~60% of screen */
  .project-modal-layout .project-gallery-side {
    flex: none;
    height: 55vh;
    min-height: 250px;
    border-radius: 0;
    border-right: none;
  }
  .project-modal-layout .project-gallery-side .swiper-button-prev,
  .project-modal-layout .project-gallery-side .swiper-button-next {
    width: 36px;
    height: 36px;
  }
  .project-modal-layout .project-gallery-side .swiper-button-prev::after,
  .project-modal-layout .project-gallery-side .swiper-button-next::after {
    font-size: 14px;
  }
  /* Info below: scrollable */
  .project-modal-layout .project-info-side {
    width: 100%;
    min-width: 100%;
    height: auto;
    flex: 1;
    overflow-y: auto;
    border-right: none;
    border-bottom: none;
    border-radius: 0;
    order: 2;
  }
  .project-modal-layout .project-gallery-side {
    order: 1;
  }
  .project-modal-layout .project-info-side .project-info-inner {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
  }
  .project-modal-layout .project-info-side h3 {
    font-size: 20px;
    line-height: 26px;
    margin: 8px 0 5px;
  }
  .project-modal-layout .project-info-side .project-desc,
  .project-modal-layout .project-info-side .project-desc p {
    font-size: 13px;
  }
  .project-modal-layout .project-info-side .project-info-bottom {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
  }
  .project-modal-layout .gallery-counter {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 5;
  }
  .pbmit-portfolio-style-1 .pbmit-portfolio-title,
  .pbmit-portfolio-style-1 .pbmit-portfolio-title a {
    font-size: 15px;
    line-height: 20px;
  }
}
