* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  direction: rtl;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.filter-btn.active {
  background-color: #0284c7;
  color: white;
}

.tab-btn {
  color: #9ca3af;
  border-color: transparent;
  transition: color 0.2s;
}

.tab-btn:hover {
  color: #4b5563;
}

.tab-btn.active,
.tab-btn.active:hover {
  color: #0284c7;
  border-color: #0284c7;
}

#adminMobileMenu .tab-btn {
  color: #cbd5e1;
  text-align: start;
}

#adminMobileMenu .tab-btn:hover {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.15);
}

#adminMobileMenu .tab-btn.active,
#adminMobileMenu .tab-btn.active:hover {
  color: #ffffff;
  background: #0284c7;
  border-color: transparent;
}

#algeriaMap .wilaya {
  fill: #e2e8f0;
  stroke: #cbd5e1;
  stroke-width: 0.6;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.2s;
}

#algeriaMap .wilaya:hover,
#algeriaMap .wilaya:focus {
  fill: #93c5fd;
  outline: none;
}

#algeriaMap .wilaya.has-projects {
  fill: #0284c7;
  stroke: #075985;
  stroke-width: 1;
}

#algeriaMap .wilaya.has-projects:hover,
#algeriaMap .wilaya.has-projects:focus {
  fill: #0369a1;
}

.marker-dot {
  fill: #0ea5e9;
  cursor: pointer;
  transition: r 0.2s;
}

.marker-dot:hover {
  r: 7;
  fill: #0284c7;
}

.modal-overlay {
  background: rgba(0, 0, 0, 0.5);
  z-index: 50;
}

.pick-cell.border-marine-600 {
  border-color: #0284c7;
}

.pick-cell.border-marine-600:hover {
  border-color: #0284c7;
}

#map {
  min-height: 500px;
}

#algeriaMap {
  width: 100%;
  height: auto;
  max-width: 900px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  #map {
    min-height: 0;
  }

  #algeriaMap {
    max-width: 100%;
  }
}

@media (min-width: 769px) {
  #wilayaZoomButtons {
    flex-wrap: wrap;
  }
}

/* ===== Map zoom bar ===== */
.wilaya-zoom-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.wilaya-zoom-chip:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
}

.wilaya-zoom-chip.active {
  background: #0284c7;
  color: #fff;
  border-color: #0284c7;
}

.wilaya-zoom-chip .chip-count {
  background: #0284c7;
  color: #fff;
  border-radius: 9999px;
  font-size: 0.65rem;
  padding: 0 0.35rem;
  line-height: 1.25rem;
}

.wilaya-zoom-chip.active .chip-count {
  background: #fff;
  color: #0284c7;
}

/* ===== Interactive map ===== */
.map-tooltip {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  background: #0f172a;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.45;
  padding: 0.4rem 0.7rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  max-width: 240px;
  transform: translate(-50%, -115%);
}
.map-tooltip strong {
  color: #fff;
}
.map-tooltip .map-tooltip-count {
  color: #5eead4;
}
.map-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #0f172a;
}

.map-empty-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  color: #475569;
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  animation: mapHintIn 0.25s ease;
}
@keyframes mapHintIn {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* ===== Live chat widget (Messenger style) ===== */
.chat-launcher {
  position: fixed;
  right: 1.5rem;
  bottom: 10rem;
  z-index: 70;
  width: 60px;
  height: 60px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -5px rgba(13, 148, 136, 0.45), 0 4px 10px -4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.chat-launcher:hover {
  transform: scale(1.08);
  box-shadow: 0 16px 32px -8px rgba(13, 148, 136, 0.55);
}
.chat-launcher:active {
  transform: scale(0.95);
}

.chat-launcher-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 15px;
  height: 15px;
  border-radius: 9999px;
  background-color: #9ca3af;
  border: 2.5px solid #fff;
  transition: background-color 0.2s ease;
}
.chat-launcher-dot.online {
  background-color: #22c55e;
}

.chat-panel {
  position: fixed;
  right: 1.5rem;
  bottom: 6.5rem;
  z-index: 70;
  width: 360px;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 8.5rem);
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.35), 0 8px 24px -8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@supports (height: 100dvh) {
  .chat-panel {
    max-height: calc(100dvh - 8.5rem);
  }
}
.chat-panel.is-open {
  animation: chatPanelIn 0.25s ease;
}
@keyframes chatPanelIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chat-header {
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: #fff;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
}
.chat-title {
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.25;
}
.chat-status {
  font-size: 0.7rem;
  color: #99f6e4;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.chat-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: #9ca3af;
  display: inline-block;
  transition: background-color 0.2s ease;
}
.chat-online-dot.online {
  background-color: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2);
}
.chat-close {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  color: #ccfbf1;
  transition: background 0.15s ease;
  cursor: pointer;
}
.chat-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.chat-identity {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  background: #fafafa;
  flex-shrink: 0;
}
.chat-input-field {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.chat-input-field:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.chat-contact-float {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 68;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
#chatPanel:not(.hidden) ~ .chat-contact-float {
  display: none;
}
.chat-contact-btn {
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 22px -6px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.chat-contact-btn:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 14px 26px -8px rgba(0, 0, 0, 0.4);
}
.chat-contact-btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
}
.chat-contact-btn-phone {
  background: linear-gradient(135deg, #0ea5e9, #0369a1);
}

.chat-messages {
  flex: 1;
  min-height: 160px;
  height: 320px;
  overflow-y: auto;
  padding: 0.9rem 1rem;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-composer {
  border-top: 1px solid #e5e7eb;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  flex-shrink: 0;
}
.chat-composer-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  outline: none;
  background: #f9fafb;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.chat-composer-input:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
  background: #fff;
}
.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, filter 0.15s ease;
  flex-shrink: 0;
  cursor: pointer;
}
.chat-send-btn:hover {
  filter: brightness(1.1);
}
.chat-send-btn:active {
  transform: scale(0.92);
}
.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


@media screen and  (max-width: 760px) {
  .nav-logo-img {
    width: 200px !important;
    height: 60px !important;
  }
  .chat-launcher {
    right: 1.25rem;
    bottom: 8.5rem;
    width: 56px;
    height: 56px;
  }
  .chat-contact-float {
    right: 1.25rem;
    bottom: 1.25rem;
    gap: 0.625rem;
  }
  .chat-contact-btn {
    width: 48px;
    height: 48px;
  }
  .chat-panel {
    right: 1rem;
    left: 1rem;
    width: auto;
    max-width: none;
    bottom: 5.25rem;
    max-height: calc(100vh - 6.75rem);
    height: calc(100vh - 6.75rem);
    border-radius: 1rem;
  }
  @supports (height: 100dvh) {
    .chat-panel {
      max-height: calc(100dvh - 6.75rem);
      height: calc(100dvh - 6.75rem);
    }
  }
  .chat-messages {
    height: auto;
  }
}
