/* ============================================================
   RÉALISATIONS — carte, filtres, grille, page chantier
   Prolonge n2.css : mêmes variables, mêmes rayons, mêmes ombres.
   ============================================================ */

/* ---------- Barre de filtres ---------- */
.rea-filtres {
  position: sticky; top: 52px; z-index: 40;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid rgba(0,0,0,.07);
  padding: .85rem 0;
}
.rea-filtres-inner {
  width: min(1180px, 92vw); margin-inline: auto;
  display: flex; gap: .6rem; align-items: center; flex-wrap: wrap;
}
.rea-search {
  flex: 1 1 220px; min-width: 180px;
  border: 1.5px solid #e3e3e8; border-radius: 980px;
  padding: .6em 1.1em .6em 2.4em; font: inherit; font-size: .93rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat .85em center / 16px;
  transition: border-color .2s, box-shadow .2s;
}
.rea-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.rea-select {
  border: 1.5px solid #e3e3e8; border-radius: 980px;
  padding: .6em 2em .6em 1em; font: inherit; font-size: .9rem; font-weight: 600;
  color: var(--ink-soft); background: #fff; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7em center; background-size: 14px;
  transition: border-color .2s, color .2s;
}
.rea-select:hover { border-color: #cfcfd6; }
.rea-select.is-actif { border-color: var(--accent); color: var(--accent); }
.rea-reset {
  border: 0; background: none; cursor: pointer; font: inherit;
  font-size: .88rem; font-weight: 600; color: var(--ink-muted);
  padding: .5em .8em; border-radius: 980px;
}
.rea-reset:hover { color: var(--ink); background: var(--paper-alt); }
.rea-compte { margin-left: auto; font-size: .88rem; color: var(--ink-muted); font-weight: 600; }

/* tiroir de filtres sur mobile */
.rea-filtres-toggle { display: none; }
@media (max-width: 767px) {
  .rea-filtres-toggle {
    display: inline-flex; align-items: center; gap: .4rem;
    border: 1.5px solid #e3e3e8; border-radius: 980px; background: #fff;
    padding: .6em 1.1em; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  }
  .rea-filtres-groupe { display: none; width: 100%; gap: .5rem; flex-wrap: wrap; }
  .rea-filtres.is-ouvert .rea-filtres-groupe { display: flex; }
  .rea-select { flex: 1 1 45%; }
}
@media (min-width: 768px) { .rea-filtres-groupe { display: contents; } }

/* ---------- Carte ---------- */
.rea-carte-wrap {
  position: relative; border-radius: var(--radius-l); overflow: hidden;
  box-shadow: var(--shadow-card); background: var(--paper-alt);
}
#rea-carte { height: clamp(340px, 52vh, 560px); width: 100%; }
.rea-legende {
  position: absolute; left: 12px; bottom: 12px; z-index: 500;
  background: rgba(255,255,255,.95); border-radius: 14px;
  padding: .7rem .9rem; box-shadow: 0 4px 16px rgba(0,0,0,.14);
  display: flex; flex-direction: column; gap: .35rem; font-size: .8rem;
}
.rea-legende span { display: flex; align-items: center; gap: .45rem; color: var(--ink-soft); }
.rea-legende i { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
@media (max-width: 600px) { .rea-legende { display: none; } }

/* pin personnalisé */
.rea-pin {
  width: 26px; height: 26px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  transition: transform .2s var(--ease-out);
}
.rea-pin.is-actif { transform: rotate(-45deg) scale(1.35); z-index: 999; }
.rea-cluster {
  background: var(--accent); color: #fff; border: 3px solid #fff;
  border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: .85rem; box-shadow: 0 2px 8px rgba(0,0,0,.28);
}

/* popup Leaflet, alignée sur la charte */
.leaflet-popup-content-wrapper { border-radius: 16px; padding: 0; overflow: hidden; box-shadow: var(--shadow-float); }
.leaflet-popup-content { margin: 0; width: 250px !important; }
.leaflet-popup-tip { box-shadow: none; }
.rea-popup img { width: 100%; height: 130px; object-fit: cover; display: block; }
.rea-popup-txt { padding: .85rem 1rem 1rem; }
.rea-popup-cat { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.rea-popup h3 { margin: .3rem 0 .2rem; font-size: .98rem; line-height: 1.3; letter-spacing: -.01em; }
.rea-popup p { margin: 0 0 .7rem; font-size: .84rem; color: var(--ink-muted); }
.rea-popup a { font-size: .86rem; font-weight: 650; color: var(--accent); }

/* ---------- Grille des réalisations ---------- */
.rea-grille { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 680px)  { .rea-grille { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1020px) { .rea-grille { grid-template-columns: repeat(3, 1fr); } }

.rea-carte-item {
  display: flex; flex-direction: column;
  background: #fff; border-radius: var(--radius-l); overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.rea-carte-item:hover, .rea-carte-item.is-survol {
  transform: translateY(-6px); box-shadow: var(--shadow-float);
}
.rea-carte-item.is-masque { display: none; }
.rea-vignette { aspect-ratio: 16 / 10; background-size: cover; background-position: center; background-color: var(--paper-alt); }
.rea-corps { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.rea-badge {
  align-self: flex-start; border-radius: 980px; padding: .25em .8em;
  font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: #fff; margin-bottom: .7rem;
}
.rea-carte-item h3 { margin: 0 0 .35rem; font-size: 1.08rem; letter-spacing: -.015em; line-height: 1.3; }
.rea-meta { font-size: .84rem; color: var(--ink-muted); margin: 0 0 .6rem; }
.rea-carte-item p.rea-extrait { margin: 0 0 1rem; font-size: .93rem; color: var(--ink-soft); line-height: 1.55; }
.rea-carte-item .btn-ghost { margin-top: auto; align-self: flex-start; }

.rea-vide {
  grid-column: 1 / -1; text-align: center; padding: 3rem 1rem;
  color: var(--ink-muted);
}

/* ---------- Page d'un chantier ---------- */
.rea-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(320px, 46vh, 480px);
  display: grid; align-content: end;
  padding: clamp(1.6rem, 5vw, 3rem) 0;
  background-size: cover; background-position: center;
  color: #fff;
}
.rea-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(8,10,12,.82) 0%, rgba(8,10,12,.35) 55%, rgba(8,10,12,.2) 100%);
}
.rea-hero .crumbs, .rea-hero .crumbs a { color: rgba(255,255,255,.8); }
.rea-hero h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); margin: .3rem 0 .6rem; }
.rea-hero-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.rea-hero-meta span {
  background: rgba(255,255,255,.16); backdrop-filter: blur(6px);
  border-radius: 980px; padding: .4em 1em; font-size: .86rem; font-weight: 600;
}

/* galeries avant / pendant / après */
.rea-galerie { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .rea-galerie { grid-template-columns: repeat(3, 1fr); } }
.rea-galerie figure { margin: 0; }
.rea-galerie img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-m); box-shadow: var(--shadow-card);
}
.rea-galerie figcaption {
  margin-top: .5rem; font-size: .8rem; font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-muted);
}

/* liste de résultats */
.rea-resultats { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.rea-resultats li {
  display: flex; gap: .7rem; align-items: flex-start;
  background: var(--accent-soft); border-radius: var(--radius-m);
  padding: .8em 1.1em; font-size: .97rem; color: var(--ink);
}
.rea-resultats li::before { content: "✓"; color: var(--accent); font-weight: 800; flex-shrink: 0; }

/* carte de localisation (commune uniquement) */
#rea-carte-commune { height: 300px; border-radius: var(--radius-l); box-shadow: var(--shadow-card); }
.rea-commune-note { font-size: .82rem; color: var(--ink-muted); margin-top: .7rem; }
