/* ===================================================================
   ONG VISION CITOYENNE — renovation.css
   Comparateur avant/après (accueil + projets) et section
   « Le chantier en images » de la page Projets.
   =================================================================== */

/* ===== COMPARATEUR AVANT / APRÈS ===== */
.ba {
  --pos: 50%;
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  background: var(--blue-950);
  box-shadow: var(--shadow-lg);
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.ba--wide { aspect-ratio: 16 / 9; }
.ba-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 2;
  width: 3px;
  margin-left: -1.5px;
  background: #fff;
  box-shadow: 0 0 14px rgba(0, 0, 0, .35);
  pointer-events: none;
}
.ba-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d3b7a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E") center / 22px no-repeat;
  box-shadow: 0 6px 18px rgba(10, 25, 41, .3);
  transition: transform .2s var(--ease);
}
.ba:hover .ba-handle::after,
.ba.is-dragging .ba-handle::after { transform: translate(-50%, -50%) scale(1.08); }
.ba:focus-within .ba-handle::after { box-shadow: 0 0 0 4px var(--yellow), 0 6px 18px rgba(10, 25, 41, .3); }
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.ba-tag {
  position: absolute;
  top: 12px;
  z-index: 3;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--head);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .9px;
  text-transform: uppercase;
  pointer-events: none;
}
.ba-tag--before { left: 12px; background: rgba(10, 25, 41, .82); color: #fff; }
.ba-tag--after { right: 12px; background: var(--yellow); color: var(--blue-950); }
.ba-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 0;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
}
.ba-hint svg { width: 18px; height: 18px; color: var(--gold); }

/* ===== LE CHANTIER EN IMAGES (page Projets) ===== */
.chantier {
  background: linear-gradient(180deg, #fff 0%, var(--section-alt-bg) 100%);
  padding: 64px 0;
}
.chantier .section-head { max-width: 760px; }
.chantier-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.chantier-steps li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid rgba(197, 211, 228, .8);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink);
}
.chantier-steps b {
  font-family: var(--head);
  font-weight: 800;
  color: var(--blue-700);
}
.ba-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 44px;
}
.ba-card { margin: 0; }
.ba-card--wide {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}
.ba-card figcaption {
  margin-top: 12px;
  text-align: center;
}
.ba-card figcaption strong {
  display: block;
  font-family: var(--head);
  font-size: 1rem;
  color: var(--ink);
}
.ba-card figcaption span {
  font-size: .85rem;
  color: var(--muted);
}
.chantier-gallery-head {
  margin: 0 0 14px;
  text-align: center;
  font-family: var(--head);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
}
.chantier .gal-filters { justify-content: center; }
.chantier-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}
.real-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 12px;
  font-family: var(--head);
  font-size: .88rem;
  font-weight: 700;
  color: var(--blue-700);
  text-decoration: none;
}
.real-more:hover,
.real-more:focus-visible { text-decoration: underline; }

/* ===== PROJET PILOTE PASEA HAMBOL (page Projets) ===== */
.pasea {
  background: #fff;
  padding: 64px 0;
}
.pasea-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 44px;
  align-items: center;
  margin-bottom: 52px;
}
.pasea-intro .section-tag { background: #dcfce7; color: #15803d; }
.pasea-intro h2 {
  margin: 6px 0 14px;
  font-family: var(--head);
  font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.5px;
  color: var(--ink);
}
.pasea-lead {
  margin: 0 0 12px;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink);
}
.pasea-role {
  margin: 0 0 20px;
  padding-left: 14px;
  border-left: 3px solid var(--gold);
  font-size: .93rem;
  line-height: 1.6;
  color: var(--muted);
}
.pasea-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.pasea-stats li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 14px 12px;
  background: var(--blue-50);
  border: 1px solid rgba(197, 211, 228, .8);
  border-radius: var(--radius);
}
.pasea-stats strong {
  font-family: var(--head);
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  color: var(--blue-700);
}
.pasea-stats span {
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--muted);
}
.pasea-zones {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: .86rem;
  font-weight: 600;
  color: var(--blue-900);
}
.pasea-zones svg { flex: none; width: 18px; height: 18px; color: var(--gold); }
.pasea-cover {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.pasea-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pasea-cover figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 18px 14px;
  background: linear-gradient(0deg, rgba(5, 29, 61, .88), transparent);
  color: #fff;
  font-size: .86rem;
  font-weight: 600;
}
.pasea-subtitle {
  margin: 0 0 22px;
  text-align: center;
  font-family: var(--head);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
}
.pasea-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 52px;
  padding: 0;
  list-style: none;
}
.pasea-step {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid rgba(197, 211, 228, .7);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.pasea-step:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pasea-step img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.pasea-step-body {
  position: relative;
  padding: 18px 16px 18px;
}
.pasea-step-num {
  position: absolute;
  top: -22px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-family: var(--head);
  font-size: .88rem;
  font-weight: 800;
  box-shadow: var(--shadow);
}
.pasea-step h4 {
  margin: 0 0 6px;
  font-family: var(--head);
  font-size: 1rem;
  color: var(--ink);
}
.pasea-step p {
  margin: 0;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--muted);
}

@media (max-width: 1024px) {
  .pasea-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .pasea-hero { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  .pasea { padding: 44px 0; }
  .pasea-steps { grid-template-columns: 1fr; margin-bottom: 36px; }
  .pasea-stats { gap: 8px; }
  .pasea-stats li { padding: 10px; }
  .pasea-stats strong { font-size: 1.5rem; }
  .pasea-stats span { font-size: .72rem; }
}

@media (max-width: 768px) {
  .chantier { padding: 44px 0; }
  .ba-grid { grid-template-columns: 1fr; gap: 20px; margin-bottom: 32px; }
  .ba-handle::after { width: 40px; height: 40px; background-size: 20px; }
  .chantier-steps li { font-size: .78rem; padding: 6px 12px; }
}
