/* ═══════════════════════════════════════════════════════════
   PROJETS — galerie avant/après
════════════════════════════════════════════════════════════ */

.page-hero {
  position: relative;
  padding-top: 120px;
  padding-bottom: 60px;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26,26,26,0.85) 0%,
    rgba(44,95,46,0.6) 100%
  );
}
.projets-hero {
  background: url('https://images.unsplash.com/photo-1502920917128-1aa500764cbd?w=1600&q=80') center/cover no-repeat;
}

/* Filtres */
.filter-bar {
  background: #fff;
  border-bottom: 1px solid #ece7dd;
}
.filter-btn {
  background: transparent;
  border: 1.5px solid #d8d4ca;
  color: var(--text-muted);
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
}
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Carte projet */
.project-card {
  background: #fff;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(0,0,0,0.16);
}

/* Curseur Avant/Après */
.ba-slider {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: #1a1a1a;
  user-select: none;
}
.ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ba-img.ba-after { z-index: 1; }
.ba-img.ba-before {
  z-index: 2;
  clip-path: inset(0 50% 0 0);
}
.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--accent);
  z-index: 3;
  pointer-events: none;
  transform: translateX(-50%);
}
.ba-divider i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  appearance: none;
  background: transparent;
  outline: none;
  z-index: 4;
  cursor: ew-resize;
  margin: 0;
}
.ba-range::-webkit-slider-thumb {
  appearance: none;
  width: 36px;
  height: 100%;
  background: transparent;
  cursor: ew-resize;
}
.ba-range::-moz-range-thumb {
  width: 36px;
  height: 100%;
  background: transparent;
  border: 0;
  cursor: ew-resize;
}
.ba-label {
  position: absolute;
  top: 0.75rem;
  z-index: 3;
  background: rgba(26,26,26,0.7);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ba-label-before { left: 0.75rem; }
.ba-label-after  { right: 0.75rem; }

/* Info bloc */
.project-info {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-info .badge-tag {
  align-self: flex-start;
  background: rgba(106,176,76,0.12);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: 1rem;
  margin-bottom: 0.6rem;
}
.project-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0 0 0.5rem 0;
}
.project-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.project-specs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.project-specs li {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.project-specs i { color: var(--accent); }

/* Hidden state for filtering */
.proj-item.hidden { display: none !important; }

@media (max-width: 768px) {
  .ba-slider { height: 220px; }
}
