/*
 * detail-pages.css
 * Design system partagé : listing_detail + project_detail
 *
 * Utilise les variables CSS du thème TAKTAKimmo.
 * Compatible light mode, dark mode, mobile, tablet, desktop.
 *
 * Classes partagées :
 *   .dp-*  = detail-page (commune aux deux pages)
 *
 * Surcharge propre sans !important sauf là où Tailwind force la main.
 */

/* ─────────────────────────────────────────────────────────────
   0. VARIABLES LOCALES
─────────────────────────────────────────────────────────────── */
:root {
  --dp-radius-card:   0.875rem;   /* 14px */
  --dp-radius-badge:  999px;
  --dp-radius-btn:    0.5rem;     /* 8px  */
  --dp-gap-section:   2rem;       /* espacement entre blocs contenu */

  --dp-card-bg:       #ffffff;
  --dp-card-border:   rgba(148, 163, 184, 0.25);
  --dp-card-shadow:   0 4px 18px rgba(15, 23, 42, 0.07);

  --dp-text-main:     #0f172a;
  --dp-text-muted:    #64748b;
  --dp-text-soft:     #94a3b8;

  --dp-primary:       #1e3a8a;
  --dp-primary-hover: #1d4ed8;
  --dp-primary-light: #dbeafe;

  --dp-btn-height:    46px;
  --dp-btn-font:      0.875rem;   /* 14px */
  --dp-btn-weight:    600;
}

.dark {
  --dp-card-bg:       rgba(15, 23, 42, 0.94);
  --dp-card-border:   rgba(51, 65, 85, 0.45);
  --dp-card-shadow:   0 4px 18px rgba(2, 6, 23, 0.30);

  --dp-text-main:     #f1f5f9;
  --dp-text-muted:    #94a3b8;
  --dp-text-soft:     #64748b;

  --dp-primary:       #2563eb;
  --dp-primary-hover: #3b82f6;
  --dp-primary-light: rgba(37, 99, 235, 0.15);
}

/* ─────────────────────────────────────────────────────────────
   1. NAVBAR OPAQUE (commune aux deux pages)
─────────────────────────────────────────────────────────────── */
#topnav {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}
#topnav .navigation-menu > li > a,
#topnav .navigation-menu > li > a:hover,
#topnav .navigation-menu > li > a:focus {
  color: #0f172a !important;
  text-shadow: none !important;
}
#topnav .navigation-menu > li.active > a {
  color: #1d4ed8 !important;
}
#topnav .logo img { opacity: 1 !important; }

.dark #topnav {
  background: rgba(15, 23, 42, 0.96) !important;
  box-shadow: 0 4px 18px rgba(2, 6, 23, 0.45);
}
.dark #topnav .navigation-menu > li > a,
.dark #topnav .navigation-menu > li > a:hover,
.dark #topnav .navigation-menu > li > a:focus {
  color: #f8fafc !important;
}
.dark #topnav .navigation-menu > li.active > a {
  color: #93c5fd !important;
}

.dark #topnav.taktak-navbar-light .navigation-menu > li > a,
.dark #topnav.taktak-navbar-light .navigation-menu.nav-light > li > a,
.dark #topnav.taktak-navbar-light .navigation-menu > li > a.taktak-public-nav-link,
.dark #topnav.taktak-navbar-light .navigation-menu.nav-light > li > a.taktak-public-nav-link {
  color: #e2e8f0 !important;
  -webkit-text-fill-color: #e2e8f0 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.dark #topnav.taktak-navbar-light .navigation-menu > li:hover > a,
.dark #topnav.taktak-navbar-light .navigation-menu > li.active > a,
.dark #topnav.taktak-navbar-light .navigation-menu.nav-light > li:hover > a,
.dark #topnav.taktak-navbar-light .navigation-menu.nav-light > li.active > a,
.dark #topnav.taktak-navbar-light .navigation-menu > li:hover > a.taktak-public-nav-link,
.dark #topnav.taktak-navbar-light .navigation-menu.nav-light > li:hover > a.taktak-public-nav-link {
  color: #93c5fd !important;
  -webkit-text-fill-color: #93c5fd !important;
}

/* ─────────────────────────────────────────────────────────────
   1.b LIGHTBOX ABOVE NAVBAR
─────────────────────────────────────────────────────────────── */
.tobii {
  z-index: 120000 !important;
}
.tobii__overlay {
  z-index: 120001 !important;
}
.tobii__slider {
  z-index: 120002 !important;
}
.tobii__counter {
  z-index: 120003 !important;
}
.tobii__close,
.tobii__next,
.tobii__prev {
  z-index: 120004 !important;
}

/* ─────────────────────────────────────────────────────────────
   2. GALERIE HERO (commune)
─────────────────────────────────────────────────────────────── */
.dp-gallery-main {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  max-height: 660px;
  background: #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}
.dp-gallery-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  max-height: 325px;
  background: #e2e8f0;
}
.dark .dp-gallery-main,
.dark .dp-gallery-thumb {
  background: #1e293b;
}
.dp-gallery-main img,
.dp-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.dp-gallery-main:hover img,
.dp-gallery-thumb:hover img {
  transform: scale(1.03);
}
.dp-gallery-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background 0.3s ease;
}
.dp-gallery-main:hover .dp-gallery-overlay,
.dp-gallery-thumb:hover .dp-gallery-overlay {
  background: rgba(15, 23, 42, 0.55);
}
.dp-gallery-camera {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 0;
  line-height: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.dp-gallery-main:hover .dp-gallery-camera,
.dp-gallery-thumb:hover .dp-gallery-camera {
  opacity: 1;
}

.dp-gallery-camera .dp-gallery-camera-logo {
  width: 3rem !important;
  height: 3rem !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(15, 23, 42, 0.35));
}

.dp-gallery-cam-btn .dp-gallery-camera-logo {
  width: 0.62rem !important;
  height: 0.62rem !important;
  max-width: none !important;
  max-height: none !important;
}

/* Badge statut sur la galerie principale du projet */
.dp-gallery-status {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.875rem;
  border-radius: var(--dp-radius-badge);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  z-index: 10;
}
.dp-gallery-cam-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}
/* Titre en overlay (projet uniquement) */
.dp-gallery-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(15,23,42,0.85) 0%, transparent 100%);
  z-index: 10;
}
.dp-gallery-title-overlay h1 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(15, 23, 42, 0.5);
  margin: 0;
}
.dp-gallery-title-overlay p {
  color: rgba(248,250,252,0.88);
  font-size: 0.875rem;
  margin: 0.35rem 0 0;
}
@media (min-width: 768px) {
  .dp-gallery-title-overlay h1 { font-size: 1.875rem; }
}

/* ─────────────────────────────────────────────────────────────
   3. LAYOUT PRINCIPAL (commune)
─────────────────────────────────────────────────────────────── */
.dp-section { margin-top: var(--dp-gap-section); }

/* ─────────────────────────────────────────────────────────────
   4. CARTE GÉNÉRIQUE (commune)
─────────────────────────────────────────────────────────────── */
.dp-card {
  background: var(--dp-card-bg);
  border: 1px solid var(--dp-card-border);
  border-radius: var(--dp-radius-card);
  box-shadow: var(--dp-card-shadow);
  padding: 1.5rem;
}
@media (max-width: 640px) {
  .dp-card { padding: 1.125rem; }
}

/* ─────────────────────────────────────────────────────────────
   5. TITRE DE SECTION (commune)
─────────────────────────────────────────────────────────────── */
.dp-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--dp-text-main);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--dp-primary-light);
}
.dark .dp-section-title {
  border-bottom-color: rgba(37, 99, 235, 0.2);
}
.dp-section-title .dp-section-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--dp-primary-light);
  color: var(--dp-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.dark .dp-section-title .dp-section-icon {
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
}

/* Header de section avec compteur */
.dp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--dp-primary-light);
}
.dark .dp-section-head { border-bottom-color: rgba(37, 99, 235, 0.2); }
.dp-section-head .dp-section-title { border: none; padding: 0; margin: 0; }
.dp-section-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dp-primary);
  background: var(--dp-primary-light);
  padding: 0.25rem 0.75rem;
  border-radius: var(--dp-radius-badge);
}
.dark .dp-section-count {
  background: rgba(37, 99, 235, 0.15);
  color: #93c5fd;
}

/* ─────────────────────────────────────────────────────────────
   6. INFOS CLÉS — CARTES MÉTA (commune)
─────────────────────────────────────────────────────────────── */
.dp-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.875rem;
}
.dp-meta-card {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.dark .dp-meta-card {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(51, 65, 85, 0.5);
}
.dp-meta-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dp-text-soft);
}
.dp-meta-value {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--dp-text-main);
  line-height: 1.25;
}
.dp-meta-unit {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--dp-text-muted);
}

/* ─────────────────────────────────────────────────────────────
   7. BADGES (commune)
─────────────────────────────────────────────────────────────── */
.dp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--dp-radius-badge);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
/* Promotion / boost */
.dp-badge-super { background: #d4a017; color: #fff8e1; border: 1px solid #e0b84f; }
.dp-badge-boost { background: #dbeafe; color: #1e40af; }
.dark .dp-badge-boost { background: rgba(37,99,235,0.18); color: #bfdbfe; }

/* Statut projet */
.dp-badge-published  { background: #dbeafe; color: #1d4ed8; }
.dp-badge-delivered  { background: #dcfce7; color: #166534; }
.dp-badge-draft      { background: #e2e8f0; color: #475569; }
.dark .dp-badge-published { background: rgba(59,130,246,0.18); color: #bfdbfe; }
.dark .dp-badge-delivered { background: rgba(34,197,94,0.2); color: #bbf7d0; }
.dark .dp-badge-draft     { background: rgba(148,163,184,0.18); color: #cbd5e1; }

/* Equip badges */
.dp-badge-equip {
  background: #f1f5f9;
  color: #475569;
}
.dark .dp-badge-equip {
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
}

/* Unités */
.dp-unit-available { background: #dcfce7; color: #166534; }
.dp-unit-reserved  { background: #fef3c7; color: #92400e; }
.dp-unit-sold      { background: #fee2e2; color: #991b1b; }
.dark .dp-unit-available { background: rgba(34,197,94,0.18); color: #bbf7d0; }
.dark .dp-unit-reserved  { background: rgba(245,158,11,0.16); color: #fde68a; }
.dark .dp-unit-sold      { background: rgba(239,68,68,0.16); color: #fecaca; }

/* ─────────────────────────────────────────────────────────────
   8. SIDEBAR / STICKY CONTAINER (commune)
─────────────────────────────────────────────────────────────── */
.dp-sidebar {
  /* position:sticky est géré sur le wrapper Tailwind (top-24) */
}
.dp-side-card {
  background: var(--dp-card-bg);
  border: 1px solid var(--dp-card-border);
  border-radius: var(--dp-radius-card);
  box-shadow: var(--dp-card-shadow);
  padding: 1.5rem;
}
@media (max-width: 640px) {
  .dp-side-card { padding: 1.125rem; }
}

/* ─────────────────────────────────────────────────────────────
   9. PRIX (commune)
─────────────────────────────────────────────────────────────── */
.dp-price-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dp-text-soft);
  margin-bottom: 0.35rem;
}
.dp-price-value {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--dp-text-main);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.dp-price-currency {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--dp-text-muted);
  margin-left: 0.25rem;
}
.dp-price-sub {
  font-size: 0.8rem;
  color: var(--dp-text-muted);
  margin-top: 0.35rem;
}

/* ─────────────────────────────────────────────────────────────
   10. BLOC ANNONCEUR / PROMOTEUR (commune)
─────────────────────────────────────────────────────────────── */
.dp-org-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.dp-org-logo {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.625rem;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid var(--dp-card-border);
  flex-shrink: 0;
  padding: 0.25rem;
}
.dark .dp-org-logo {
  background: rgba(30, 41, 59, 0.7);
}
.dp-org-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--dp-text-main);
  text-decoration: none;
  transition: color 0.2s;
}
.dp-org-name:hover { color: var(--dp-primary-hover); }
.dp-org-type {
  font-size: 0.75rem;
  color: var(--dp-text-muted);
  margin-top: 0.1rem;
}
.dp-org-city {
  font-size: 0.8125rem;
  color: var(--dp-text-soft);
  margin-top: 0.2rem;
}

/* ─────────────────────────────────────────────────────────────
   11. DÉTAILS LIST (sidebar "Détails") (commune)
─────────────────────────────────────────────────────────────── */
.dp-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--dp-card-border);
  font-size: 0.875rem;
}
.dp-detail-row:last-child { border-bottom: none; }
.dp-detail-key {
  color: var(--dp-text-soft);
  flex-shrink: 0;
}
.dp-detail-val {
  font-weight: 600;
  color: var(--dp-text-main);
  text-align: right;
}

/* ─────────────────────────────────────────────────────────────
   12. BOUTONS CTA (commune)
─────────────────────────────────────────────────────────────── */
.dp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: var(--dp-btn-height);
  font-size: var(--dp-btn-font);
  font-weight: var(--dp-btn-weight);
  border-radius: var(--dp-radius-btn);
  padding: 0 1.25rem;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
  cursor: pointer;
}
.dp-btn:hover { opacity: 0.92; }

.dp-cta-stack .dp-btn + .dp-btn {
  margin-top: 0.75rem;
}

/* Primaire */
.dp-btn-primary {
  background: var(--dp-primary);
  color: #fff;
  border: 1.5px solid var(--dp-primary);
}
.dp-btn-primary:hover {
  background: var(--dp-primary-hover);
  border-color: var(--dp-primary-hover);
  opacity: 1;
}

/* Outline slate (appeler, détails) */
.dp-btn-outline {
  background: transparent;
  color: var(--dp-text-main);
  border: 1.5px solid var(--dp-card-border);
}
.dp-btn-outline:hover {
  background: #f1f5f9;
  opacity: 1;
}
.dark .dp-btn-outline {
  border-color: rgba(71, 85, 105, 0.7);
  color: #e2e8f0;
}
.dark .dp-btn-outline:hover {
  background: rgba(30, 41, 59, 0.9);
}

/* Outline blue (promoteur, lien) */
.dp-btn-outline-blue {
  background: transparent;
  color: var(--dp-primary);
  border: 1.5px solid var(--dp-primary);
}
.dp-btn-outline-blue:hover {
  background: var(--dp-primary-light);
  opacity: 1;
}
.dark .dp-btn-outline-blue {
  color: #93c5fd;
  border-color: #3b82f6;
}
.dark .dp-btn-outline-blue:hover {
  background: rgba(37, 99, 235, 0.15);
}

/* WhatsApp outline */
.dp-btn-whatsapp {
  background: transparent;
  color: #16a34a;
  border: 1.5px solid #16a34a;
}
.dp-btn-whatsapp:hover {
  background: #f0fdf4;
  opacity: 1;
}
.dark .dp-btn-whatsapp {
  color: #4ade80;
  border-color: #4ade80;
}
.dark .dp-btn-whatsapp:hover {
  background: rgba(74, 222, 128, 0.1);
}

/* WhatsApp solid (conversion CTA) */
.dp-btn-whatsapp-solid {
  background: #16a34a;
  color: #fff;
  border: 1.5px solid #16a34a;
}
.dp-btn-whatsapp-solid:hover {
  background: #15803d;
  border-color: #15803d;
  opacity: 1;
}
.dark .dp-btn-whatsapp-solid {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}
.dark .dp-btn-whatsapp-solid:hover {
  background: #15803d;
  border-color: #15803d;
}

/* Submit form */
.dp-btn-submit {
  background: var(--dp-primary);
  color: #fff;
  border: 1.5px solid var(--dp-primary);
}
.dp-btn-submit:hover {
  background: var(--dp-primary-hover);
  border-color: var(--dp-primary-hover);
  opacity: 1;
}

/* ─────────────────────────────────────────────────────────────
   13. FORMULAIRE CONTACT (commune)
─────────────────────────────────────────────────────────────── */
.dp-input {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 0 0.875rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  border: 1.5px solid rgba(148, 163, 184, 0.5);
  background: #f8fafc;
  color: #0f172a;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.dp-input::placeholder { color: #94a3b8; }
.dp-input:focus {
  border-color: var(--dp-primary-hover);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.dark .dp-input {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(51, 65, 85, 0.9);
  color: #f1f5f9;
}
.dark .dp-input::placeholder { color: #64748b; }
.dark .dp-input:focus {
  border-color: #3b82f6;
}
textarea.dp-input {
  min-height: 100px;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  resize: vertical;
}

/* ─────────────────────────────────────────────────────────────
   14. PARTAGE (commune)
─────────────────────────────────────────────────────────────── */
.dp-share-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.dp-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 42px;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: 1px solid var(--dp-card-border);
  color: var(--dp-text-main);
  background: transparent;
  padding: 0 0.875rem;
  text-decoration: none;
  transition: background 0.2s;
  cursor: pointer;
  white-space: nowrap;
}
.dp-share-btn:hover {
  background: #f1f5f9;
}
.dark .dp-share-btn {
  border-color: rgba(71, 85, 105, 0.6);
  color: #e2e8f0;
}
.dark .dp-share-btn:hover {
  background: rgba(30, 41, 59, 0.85);
}
.dp-share-btn-wide {
  grid-column: 1 / -1;
  width: 100%;
}
@media (max-width: 640px) {
  .dp-share-grid { grid-template-columns: 1fr; }
  .dp-share-btn-wide { grid-column: auto; }
}

/* ─────────────────────────────────────────────────────────────
   15. ANNONCES SIMILAIRES / ÉLÉMENTS LIÉS (commune)
─────────────────────────────────────────────────────────────── */
.dp-related-card {
  background: var(--dp-card-bg);
  border: 1px solid var(--dp-card-border);
  border-radius: 0.875rem;
  overflow: hidden;
  box-shadow: var(--dp-card-shadow);
  transition: box-shadow 0.25s, transform 0.25s;
}
.dp-related-card:hover {
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px);
}
.dark .dp-related-card:hover {
  box-shadow: 0 6px 24px rgba(2, 6, 23, 0.4);
}
.dp-related-img {
  width: 100%;
  height: 11rem; /* 176px */
  object-fit: cover;
  display: block;
}
.dp-related-body {
  padding: 0.875rem 1rem;
}
.dp-related-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dp-text-main);
  text-decoration: none;
  line-height: 1.35;
  display: block;
}
.dp-related-title:hover { color: var(--dp-primary-hover); }
.dp-related-price {
  font-size: 0.875rem;
  color: var(--dp-text-muted);
  margin-top: 0.35rem;
}
.dp-related-meta {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.75rem;
  color: var(--dp-text-soft);
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.dp-similar-card-wrap .group {
  height: 100%;
}

.dp-similar-card-wrap .group > .relative img,
.dp-similar-card-wrap .group > .relative > a > img {
  height: 12rem !important;
}

.dp-similar-card-wrap .group > .p-5 {
  padding: 1rem;
}

.dp-similar-card-wrap .group .text-lg {
  font-size: 1rem;
  line-height: 1.4;
}

.dp-similar-card-wrap .group .mt-4.py-4 {
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

/* ─────────────────────────────────────────────────────────────
   16. CARTE LEAFLET (commune)
─────────────────────────────────────────────────────────────── */
.dp-map {
  height: 300px;
  border-radius: 0.875rem;
  overflow: hidden;
  border: 1px solid var(--dp-card-border);
}
@media (max-width: 767px) {
  .dp-map { height: 240px; }
}

/* ─────────────────────────────────────────────────────────────
   17. ÉTAT VIDE (commune)
─────────────────────────────────────────────────────────────── */
.dp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 1rem;
  color: var(--dp-text-soft);
  font-size: 0.875rem;
  text-align: center;
}
.dp-empty i { font-size: 2.25rem; opacity: 0.55; }

/* ─────────────────────────────────────────────────────────────
   18. STATISTIQUES INTERNES (listing + projet — propriétaire)
─────────────────────────────────────────────────────────────── */
.dp-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.dp-stat-card {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
}
.dark .dp-stat-card {
  background: rgba(30, 41, 59, 0.7);
}
.dp-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dp-text-soft);
  margin-bottom: 0.25rem;
}
.dp-stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--dp-text-main);
}

/* ─────────────────────────────────────────────────────────────
   19. UNITÉS PROJET (project_detail spécifique)
─────────────────────────────────────────────────────────────── */
.dp-unit-card {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.875rem;
  padding: 1.125rem;
}
.dark .dp-unit-card {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(51, 65, 85, 0.5);
}
.dp-unit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}
.dp-unit-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--dp-text-main);
}
.dp-unit-ref {
  font-size: 0.7rem;
  color: var(--dp-text-soft);
  margin-top: 0.15rem;
}
.dp-unit-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
}
.dp-unit-meta-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dp-text-soft);
  margin-bottom: 0.15rem;
}
.dp-unit-meta-val {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dp-text-main);
}

/* ─────────────────────────────────────────────────────────────
   20. GALERIE SECONDAIRE (project_detail)
─────────────────────────────────────────────────────────────── */
.dp-secondary-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
@media (max-width: 640px) {
  .dp-secondary-gallery { grid-template-columns: repeat(2, 1fr); }
}
.dp-secondary-gallery-item {
  aspect-ratio: 4 / 3;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #e2e8f0;
  display: block;
}
.dark .dp-secondary-gallery-item { background: #1e293b; }
.dp-secondary-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.dp-secondary-gallery-item:hover img {
  transform: scale(1.05);
}

/* ─────────────────────────────────────────────────────────────
   21. STATS UNITÉS (mini-compteurs sidebar projet)
─────────────────────────────────────────────────────────────── */
.dp-unit-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
  margin: 1.125rem 0;
}
.dp-unit-stat {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.625rem 0.5rem;
  text-align: center;
}
.dark .dp-unit-stat { background: rgba(30, 41, 59, 0.7); }
.dp-unit-stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dp-text-soft);
}
.dp-unit-stat-value {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--dp-text-main);
  margin-top: 0.15rem;
}

/* ─────────────────────────────────────────────────────────────
   22. DIVIDER
─────────────────────────────────────────────────────────────── */
.dp-divider {
  border: none;
  border-top: 1px solid var(--dp-card-border);
  margin: 1.25rem 0;
}

/* ─────────────────────────────────────────────────────────────
   23. PROMO BANNER (bloc interne promo visible propriétaire)
─────────────────────────────────────────────────────────────── */
.dp-promo-banner {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.875rem;
  padding: 1rem 1.125rem;
  margin-bottom: 1.125rem;
}
.dark .dp-promo-banner {
  background: rgba(30, 41, 59, 0.65);
  border-color: rgba(51, 65, 85, 0.5);
}

/* ─────────────────────────────────────────────────────────────
   24. VIDEO embed (project)
─────────────────────────────────────────────────────────────── */
.dp-video-wrap {
  aspect-ratio: 16 / 9;
  border-radius: 0.875rem;
  overflow: hidden;
  border: 1px solid var(--dp-card-border);
  background: #020617;
}
.dp-video-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* ─────────────────────────────────────────────────────────────
   25. RESPONSIVE MOBILE (< 768px)
─────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .dp-gallery-main { max-height: 260px; }
  .dp-gallery-thumb { max-height: 130px; }
  .dp-gallery-title-overlay h1 { font-size: 1.25rem; }
  .dp-meta-grid { grid-template-columns: repeat(2, 1fr); }
  .dp-price-value { font-size: 1.375rem; }
  .dp-secondary-gallery { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
}

/* ─────────────────────────────────────────────────────────────
   26. PAGINATION (commune)
─────────────────────────────────────────────────────────────── */
.dp-pagination {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.dp-pagination a,
.dp-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dp-text-main);
  border: 1px solid var(--dp-card-border);
  padding: 0 0.5rem;
  text-decoration: none;
  transition: background 0.2s;
}
.dp-pagination a:hover { background: #f1f5f9; }
.dark .dp-pagination a {
  color: #e2e8f0;
  border-color: rgba(71, 85, 105, 0.6);
}
.dark .dp-pagination a:hover { background: rgba(30, 41, 59, 0.85); }
.dp-pagination .dp-pagination-current {
  background: var(--dp-primary);
  color: #fff;
  border-color: var(--dp-primary);
}

/* ─────────────────────────────────────────────────────────────
   À proximité — NearbyPlaces (.np-*)
   ───────────────────────────────────────────────────────────── */

/* ── Group card ── */
.np-group {
  border: 0;
  background: transparent;
  overflow: visible;
}
.dark .np-group {
  background: transparent;
}

/* ── Category header ── */
.np-cat-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0 0 0.75rem;
  background: transparent;
}
.dark .np-cat-header {
  background: transparent;
}
.np-cat-icon {
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
}
.np-cat-name {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0;
}
.dark .np-cat-name {
  color: #f1f5f9;
}
.np-cat-count {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

/* ── Items list ── */
.np-list {
  list-style: none;
  margin: 0;
  padding: 0.6rem 0.85rem;
  border-radius: 0.9rem;
  background: #f5f9ff;
}
.dark .np-list {
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(51, 65, 85, 0.55);
}
.np-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.2rem 0;
  transition: color 0.12s;
}
.np-item:not(.np-item-more):not(:last-child) {
  border-bottom: 0;
}
.dark .np-item:not(.np-item-more):not(:last-child) {
  border-bottom-color: transparent;
}
.np-item:hover {
  background: transparent;
}
.dark .np-item:hover {
  background: transparent;
}
.np-item-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
}
.np-item-name {
  flex: 1;
  font-size: 0.9rem;
  color: #475569;
  min-width: 0;
}
.dark .np-item-name {
  color: #e2e8f0;
}
.np-item-distance {
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  background: transparent;
  padding: 0;
  border-radius: 0;
  white-space: nowrap;
}
.dark .np-item-distance {
  color: #93c5fd;
  background: transparent;
}
.np-item-more {
  padding: 0.45rem 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
  font-style: italic;
}
.dark .np-item-more {
  color: #94a3b8;
}

/* ── "Voir tout" pill button (in section header) ── */
.np-see-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2563eb;
  background: transparent;
  padding: 0;
  border-radius: 0;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}
.np-see-all-btn:hover {
  color: #1d4ed8;
}
.dark .np-see-all-btn {
  color: #93c5fd;
  background: transparent;
}
.dark .np-see-all-btn:hover {
  color: #bfdbfe;
}

/* ── "Voir tous" footer text button ── */
.np-btn-all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  font-weight: 500;
  color: #15803d;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
  padding: 0.25rem 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.np-btn-all:hover { color: #166534; }
.dark .np-btn-all { color: #4ade80; }
.dark .np-btn-all:hover { color: #86efac; }

/* ── Modal shell ── */
.np-modal-box {
  position: relative;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 42rem;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.dark .np-modal-box {
  background: #0f172a;
  border: 1px solid rgba(51, 65, 85, 0.75);
  box-shadow: 0 28px 60px rgba(2, 6, 23, 0.72);
}
.np-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  background: #ffffff;
}
.dark .np-modal-header {
  border-color: rgba(51, 65, 85, 0.6);
  background: rgba(15, 23, 42, 0.98);
}
.np-modal-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
}
.dark .np-modal-title {
  color: #f8fafc;
}
.np-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.np-modal-close:hover {
  background: #f1f5f9;
  color: #334155;
}
.dark .np-modal-close { color: #64748b; }
.dark .np-modal-close:hover {
  background: rgba(30, 41, 59, 0.8);
  color: #f1f5f9;
}
.np-modal-body {
  overflow-y: auto;
  padding: 1.25rem;
  background: #ffffff;
  flex: 1;
}
.dark .np-modal-body {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.98));
}

@media (max-width: 639px) {
  .np-modal-box { max-height: 92vh; }
  .np-modal-header { padding: 0.875rem 1rem; }
  .np-modal-body { padding: 0.875rem; }
}
