/* ==============================================
   PRIM'ISOL â€” GALERIE.CSS
   Sommaire :
   1) Filtres de catÃ©gorie
   2) Grille de photos
   3) Slider avant / aprÃ¨s
   ============================================== */


/* ==============================================
   1) Filtres de catÃ©gorie
   ============================================== */
   .filter-btn {
    border: 2px solid #e2e6ea;
    background: #fff;
    color: #5F656F;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 22px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.25s ease;
  }
  .filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
  }
  .filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
  }
  
  @media (max-width: 575.98px) {
    .gallery-filters {
      padding-bottom: 60px;
    }
  }
  
  
  /* ==============================================
     2) Grille de photos
     ============================================== */
  .gallery-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  .gallery-item.gallery-item-hidden {
    display: none;
  }
  
  .gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(2, 36, 91, 0.08);
  }
  .gallery-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
  }
  .gallery-card:hover img {
    transform: scale(1.08);
  }
  
  .gallery-card-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px;
    background: linear-gradient(to top, rgba(2, 36, 91, 0.85) 0%, rgba(2, 36, 91, 0) 100%);
    display: flex;
    flex-direction: column;
    color: #fff;
  }
  .gallery-card-tag {
    font-weight: 700;
    font-size: 0.95rem;
  }
  .gallery-card-location {
    font-size: 0.8rem;
    opacity: 0.85;
  }
  
  
  /* ==============================================
     3) Slider avant / aprÃ¨s
     ============================================== */
  .before-after-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(2, 36, 91, 0.1);
    cursor: ew-resize;
    user-select: none;
    -webkit-user-select: none;
  }
  
  .ba-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
  .ba-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
  }
  
  /* L'image "aprÃ¨s" est rÃ©vÃ©lÃ©e par-dessus l'image "avant",
     et on coupe sa largeur visible via clip-path selon la position du curseur.
     Elle est rÃ©vÃ©lÃ©e cÃ´tÃ© DROIT (cohÃ©rent avec le label "AprÃ¨s" Ã  droite). */
  .ba-before {
    z-index: 1;
  }
  .ba-after {
    z-index: 2;
    clip-path: inset(0 0 0 50%); /* dÃ©part Ã  50% par dÃ©faut : visible seulement Ã  droite */
  }
  
  .ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 0;
    z-index: 3;
    pointer-events: none;
  }
  .ba-handle::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -1px;
    width: 3px;
    background: #fff;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
  }
  .ba-handle-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  }
  
  .ba-label {
    position: absolute;
    top: 14px;
    z-index: 4;
    background: rgba(2, 36, 91, 0.75);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 50px;
    pointer-events: none;
  }
  .ba-label-before { left: 14px; }
  .ba-label-after { right: 14px; }