/* ============================================================
   DAR KOUTOUBIA — Page Quartiers
   ============================================================ */

/* ---------- Hero ---------- */

.q-hero {
  background: var(--bordeaux);
  padding: 130px var(--gutter) 0;
}
.q-hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-bottom: 48px;
}
.q-hero .breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivoire-faint);
  margin-bottom: 24px;
}
.q-hero .breadcrumb a { transition: color 0.3s ease; }
.q-hero .breadcrumb a:hover { color: var(--cuivre-hl); }
.q-hero .breadcrumb svg { width: 12px; height: 12px; stroke: var(--ivoire-faint); fill: none; stroke-width: 2; }
.q-hero h1 { font-size: clamp(32px, 4vw, 52px); margin-bottom: 12px; }

/* ---------- Map section ---------- */

.map-section {
  padding: clamp(40px, 5vw, 64px) var(--gutter);
  background: var(--noir-deep);
}
.map-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

.map-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

/* SVG Map */
.map-container {
  position: relative;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(198, 139, 89, 0.04) 0px,
      rgba(198, 139, 89, 0.04) 1px,
      transparent 1px,
      transparent 12px
    ),
    linear-gradient(160deg, #1C0B10 0%, #120709 100%);
  border: 1px solid var(--line-soft);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.map-pin {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 5;
  transition: z-index 0s;
}
.map-pin:hover { z-index: 20; }

.map-pin-dot {
  width: 18px; height: 18px;
  border: 2px solid var(--cuivre);
  background: var(--bordeaux);
  border-radius: 50%;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.map-pin:hover .map-pin-dot,
.map-pin.is-active .map-pin-dot {
  background: var(--cuivre);
  transform: scale(1.3);
  box-shadow: 0 0 0 6px rgba(198, 139, 89, 0.2);
}

.map-pin-label {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivoire-dim);
  white-space: nowrap;
  transition: color 0.3s ease;
}
.map-pin:hover .map-pin-label,
.map-pin.is-active .map-pin-label { color: var(--cuivre-hl); }

/* Tooltip */
.map-tooltip {
  position: absolute;
  bottom: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) scale(0.92);
  background: rgba(44, 10, 19, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  padding: 20px 22px;
  min-width: 240px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 30;
}
.map-pin:hover .map-tooltip,
.map-pin.is-active .map-tooltip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
}
.map-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: rgba(44, 10, 19, 0.96);
}

.tt-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}
.tt-vibe {
  font-size: 12.5px;
  color: var(--cuivre);
  margin-bottom: 12px;
  font-style: italic;
}
.tt-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  font-size: 12.5px;
}
.tt-stat-label { color: var(--ivoire-faint); }
.tt-stat-val { font-weight: 500; color: var(--cuivre-hl); text-align: right; }
.tt-cta {
  display: block;
  margin-top: 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cuivre);
  transition: color 0.3s ease;
}
.tt-cta:hover { color: var(--cuivre-hl); }

/* Sidebar nav */
.map-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line-soft);
}
.map-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background 0.3s ease;
  background: transparent;
  border-left: 3px solid transparent;
  text-align: left;
  width: 100%;
  font-family: inherit;
  color: inherit;
}
.map-nav-item:last-child { border-bottom: none; }
.map-nav-item:hover { background: rgba(198, 139, 89, 0.06); }
.map-nav-item.is-active {
  background: rgba(198, 139, 89, 0.1);
  border-left-color: var(--cuivre);
}
.map-nav-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}
.map-nav-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cuivre);
  letter-spacing: 0.06em;
}
.map-nav-vibe {
  font-size: 12px;
  color: var(--ivoire-faint);
  margin-top: 2px;
}
.map-nav-arrow {
  width: 16px; height: 16px;
  stroke: var(--cuivre);
  fill: none;
  stroke-width: 1.6;
  flex: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.map-nav-item:hover .map-nav-arrow,
.map-nav-item.is-active .map-nav-arrow { opacity: 1; }

/* ---------- Quartier detail cards ---------- */

.quartiers-section {
  padding: var(--section-pad) var(--gutter);
}
.quartiers-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

.q-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line-soft);
  margin-bottom: 32px;
  scroll-margin-top: 80px;
}
.q-card:last-child { margin-bottom: 0; }

.q-card-visual {
  position: relative;
  min-height: 400px;
}
.q-card-visual .ph { position: absolute; inset: 0; }

.q-card-body {
  padding: clamp(28px, 3vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--bordeaux-deep);
}
.q-card-body .eyebrow { font-size: 10px; }
.q-card-body h2 { font-size: clamp(24px, 2.8vw, 34px); }
.q-card-body p { color: var(--ivoire-dim); font-size: 15.5px; }

.q-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.q-stat { display: flex; flex-direction: column; gap: 3px; }
.q-stat strong {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--cuivre-hl);
}
.q-stat span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ivoire-faint);
}

.q-card-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
  flex-wrap: wrap;
}
.q-card-actions .btn { font-size: 11px; padding: 12px 20px; }

/* Alternating layout */
.q-card:nth-child(even) { direction: rtl; }
.q-card:nth-child(even) > * { direction: ltr; }

/* ---------- FAQ section ---------- */

.q-faq {
  padding: var(--section-pad) var(--gutter);
  background: var(--ivoire);
  color: var(--bordeaux);
}
.q-faq-inner {
  max-width: 860px;
  margin: 0 auto;
}
.q-faq h2 { font-size: clamp(26px, 3vw, 38px); margin-bottom: 36px; text-align: center; }

.faq-item { border-bottom: 1px solid rgba(58, 14, 26, 0.18); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 4px;
  font-family: var(--font-display);
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 600;
  transition: color 0.3s ease;
}
.faq-item summary:hover { color: var(--terracotta); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 24px;
  color: var(--terracotta);
  flex: none;
  transition: transform 0.3s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer {
  padding: 0 4px 22px;
  max-width: 66ch;
  color: rgba(58, 14, 26, 0.72);
  font-size: 15.5px;
  line-height: 1.7;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-nav { flex-direction: row; flex-wrap: wrap; }
  .map-nav-item { flex: 1 1 calc(50% - 1px); border-bottom: 1px solid var(--line-soft); }
  .q-card { grid-template-columns: 1fr; }
  .q-card-visual { min-height: 280px; }
  .q-card:nth-child(even) { direction: ltr; }
}

@media (max-width: 640px) {
  .q-hero { padding-top: 100px; }
  .map-nav-item { flex: 1 1 100%; }
  .q-stats { grid-template-columns: 1fr; }
  .q-card-actions { flex-direction: column; }
  .q-card-actions .btn { width: 100%; justify-content: center; }
}
