/* ========================================
   STYLES PAGE IMMOBILIER - SIMECO.CI
   ======================================== */

/* ===== FIX HEADER Z-INDEX ===== */
header {
  z-index: 9999 !important;
}

.topbar {
  position: relative;
  z-index: 9999;
}

.navbar {
  position: relative;
  z-index: 9999;
}

/* Assurer que le main content commence après le header */
main {
  position: relative;
  z-index: 1;
  padding-top: 140px;
}

/* ===== HERO SECTION ===== */
.immobilier-hero {
  min-height: 70vh;
  background: linear-gradient(135deg, rgba(8, 0, 84, 0.95), rgba(26, 26, 122, 0.9)),
              url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?w=1920&h=1080&fit=crop');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.immobilier-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}

.hero-search-box {
  background: #ffffff;
  backdrop-filter: none;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 100%;
  position: relative;
  z-index: 10;
}

/* ===== STATS BADGES ===== */
.stats-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat-badge {
  background: #ffffff;
  padding: 2rem 1.5rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  opacity: 1;
  position: relative;
  z-index: 10;
}

.stat-badge:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  border-color: #ff9100;
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 900;
  color: #ff9100;
  line-height: 1;
  margin-bottom: 0.75rem;
  opacity: 1;
  text-shadow: none;
}

.stat-label {
  font-size: 1rem;
  color: #080054;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 1;
}

/* ===== NAVIGATION TABS ===== */
.modules-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  border-bottom: 3px solid #e5e7eb;
  flex-wrap: wrap;
}

.module-tab {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #666;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  margin-bottom: -3px;
}

.module-tab:hover {
  color: #080054;
  background: rgba(8, 0, 84, 0.05);
}

.module-tab.active {
  color: #080054;
  border-bottom-color: #ff9100;
  background: rgba(255, 145, 0, 0.05);
}

.module-tab i {
  margin-right: 0.5rem;
}

/* ===== FILTRES ===== */
.filters-container {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 3rem;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filter-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #080054;
  margin-bottom: 0.5rem;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: #080054;
  box-shadow: 0 0 0 3px rgba(8, 0, 84, 0.1);
}

/* Styles pour les groupes de checkbox modernes */
.filter-group-checkbox {
  display: flex;
  flex-direction: column;
  grid-column: 1 / -1;
}

.filter-group-checkbox .checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: #080054;
  padding: 0.875rem 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(8, 0, 84, 0.15);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(8, 0, 84, 0.08);
}

.checkbox-label:hover {
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(8, 0, 84, 0.12);
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: #FFD700;
  border-radius: 4px;
}

.checkbox-label input[type="checkbox"]:checked + span {
  font-weight: 700;
  color: #080054;
}

.checkbox-label:has(input[type="checkbox"]:checked) {
  border-color: #FFD700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 255, 255, 0.95));
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.3);
}

.filter-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.btn-filter {
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 1rem;
}

.btn-filter-primary {
  background: linear-gradient(135deg, #080054, #1a1a7a);
  color: white;
}

.btn-filter-primary:hover {
  background: linear-gradient(135deg, #1a1a7a, #080054);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(8, 0, 84, 0.3);
}

.btn-filter-secondary {
  background: white;
  color: #080054;
  border: 2px solid #080054;
}

.btn-filter-secondary:hover {
  background: #080054;
  color: white;
}

/* ===== GRILLE DE BIENS ===== */
.properties-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}

.property-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

/* Boutons « Découvrir le programme / projet » (HTML injecté par JS — pas Tailwind) */
.property-card .btn-discover-project {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border: 2px solid #080054;
  border-radius: 0.5rem;
  background: #fff;
  color: #080054 !important;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.property-card .btn-discover-project i {
  color: inherit;
}

.property-card .btn-discover-project:hover,
.property-card .btn-discover-project:focus-visible {
  background: #080054;
  border-color: #080054;
  color: #fff !important;
}

.property-card .btn-discover-project:hover i,
.property-card .btn-discover-project:focus-visible i {
  color: #fff !important;
}

.property-card .btn-discover-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 1rem;
  margin-bottom: 0.5rem;
  color: #ff9100 !important;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}

.property-card .btn-discover-pdf:hover,
.property-card .btn-discover-pdf:focus-visible {
  color: #080054 !important;
  text-decoration: underline;
}

/* ===== CARTES AGENTS ===== */
.agents-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}

.agent-card {
  transition: all 0.3s ease;
}

.agent-card:hover {
  transform: translateY(-5px);
}

/* ===== CARTES LOTISSEMENTS ===== */
.lotissements-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}

.lotissement-card {
  transition: all 0.3s ease;
}

.lotissement-card:hover {
  transform: translateY(-5px);
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
  overflow-y: auto;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== CARTE INTERACTIVE ===== */
#map-container {
  width: 100%;
  height: 500px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

/* Styles pour les marqueurs Leaflet personnalisés */
.custom-marker {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 0;
}

.leaflet-popup-content {
  margin: 15px;
  min-width: 250px;
}

.leaflet-popup-tip {
  background: white;
}

.leaflet-container {
  font-family: 'Inter', sans-serif;
}

/* Boutons de contrôle Leaflet */
.leaflet-control-zoom a {
  background: #080054 !important;
  color: white !important;
  border: none !important;
}

.leaflet-control-zoom a:hover {
  background: #ff9100 !important;
}

/* Marqueur animation au hover */
.leaflet-marker-icon:hover {
  z-index: 1000 !important;
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

/* ===== SECTION POURQUOI SIMECO ===== */
.why-simeco {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 4rem 0;
  margin: 4rem 0;
}

.why-cards {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.why-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.why-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.why-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #080054, #1a1a7a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #ff9100;
}

.why-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #080054;
  margin-bottom: 1rem;
}

.why-description {
  color: #666;
  line-height: 1.6;
}

/* ===== CTA FINAL ===== */
.cta-final {
  background: linear-gradient(135deg, #080054, #1a1a7a);
  color: white;
  padding: 4rem 0;
  margin-top: 4rem;
}

.cta-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.cta-image {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cta-form {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-form input,
.cta-form textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.cta-form input:focus,
.cta-form textarea:focus {
  outline: none;
  border-color: #ff9100;
  background: white;
}

.cta-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.cta-btn {
  padding: 1rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.cta-btn-whatsapp {
  background: #25D366;
  color: white;
}

.cta-btn-whatsapp:hover {
  background: #20ba5a;
  transform: translateY(-2px);
}

.cta-btn-phone {
  background: #ff9100;
  color: white;
}

.cta-btn-phone:hover {
  background: #e68200;
  transform: translateY(-2px);
}

/* ===== ANIMATIONS ===== */
@keyframes animate-slide-in {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes animate-slide-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

.animate-slide-in {
  animation: animate-slide-in 0.3s ease;
}

.animate-slide-out {
  animation: animate-slide-out 0.3s ease;
}

/* ===== RESPONSIVE DESIGN ===== */

/* MOBILE PETIT (0-480px) */
@media (max-width: 480px) {
  main {
    padding-top: 120px;
  }

  .immobilier-hero {
    min-height: 50vh;
    background-attachment: scroll;
  }

  .immobilier-hero h1 {
    font-size: 2rem !important;
  }

  .immobilier-hero p {
    font-size: 1rem !important;
  }

  .hero-search-box {
    padding: 1rem;
    margin: 0 0.5rem;
  }

  .stats-badges {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-badge {
    padding: 1.5rem 1rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  .modules-tabs {
    flex-direction: column;
    gap: 0.5rem;
    border-bottom: none;
  }

  .module-tab {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    text-align: left;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0;
  }

  .module-tab.active {
    border-color: #ff9100;
  }

  .filters-container {
    padding: 1rem;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .filter-group label {
    font-size: 0.85rem;
  }

  .filter-actions {
    flex-direction: column;
  }

  .btn-filter {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .properties-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .property-card img {
    height: 200px;
  }

  .agents-grid {
    grid-template-columns: 1fr;
  }

  .lotissements-grid {
    grid-template-columns: 1fr;
  }

  .why-cards {
    grid-template-columns: 1fr;
  }

  .why-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .why-title {
    font-size: 1.25rem;
  }

  .cta-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cta-image {
    display: none;
  }

  .cta-buttons {
    grid-template-columns: 1fr;
  }

  #map-container {
    height: 300px;
  }

  .modal-content {
    padding: 1rem;
    max-width: 95vw;
  }

  .modal-content h2 {
    font-size: 1.5rem;
  }
}

/* MOBILE (481px - 650px) */
@media (min-width: 481px) and (max-width: 650px) {
  main {
    padding-top: 130px;
  }

  .immobilier-hero {
    min-height: 60vh;
  }

  .immobilier-hero h1 {
    font-size: 2.5rem !important;
  }

  .hero-search-box {
    padding: 1.5rem;
  }

  .stats-badges {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .stat-badge {
    padding: 1.5rem 1rem;
  }

  .stat-number {
    font-size: 2.8rem;
  }

  .stat-label {
    font-size: 0.9rem;
  }

  .modules-tabs {
    gap: 0.5rem;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .module-tab {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    white-space: nowrap;
  }

  .filters-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .properties-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .property-card img {
    height: 220px;
  }

  .agents-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lotissements-grid {
    grid-template-columns: 1fr;
  }

  .why-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-grid {
    grid-template-columns: 1fr;
  }

  .cta-image {
    max-height: 300px;
  }

  #map-container {
    height: 400px;
  }

  .modal-content {
    max-width: 90vw;
    padding: 1.5rem;
  }
}

/* TABLETTE (651px - 1024px) */
@media (min-width: 651px) and (max-width: 1024px) {
  main {
    padding-top: 140px;
  }
  
  /* Optimisation du header pour tablette */
  .logo {
    display: block !important;
    margin-left: 0;
    flex-shrink: 0;
  }
  
  .logo img {
    max-width: 120px !important;
    height: auto !important;
    display: block !important;
  }
  
  .nav-content {
    padding: 12px 0;
    gap: 0.75rem;
  }
  
  .nav-menu {
    gap: 0.75rem !important;
    flex-wrap: nowrap;
  }
  
  .nav-link {
    font-size: 16px !important;
    padding: 8px 10px !important;
  }
  
  .contact-btn {
    font-size: 16px !important;
    padding: 10px 16px !important;
  }
  
  .language-dropdown {
    font-size: 12px !important;
    padding: 6px 8px !important;
  }
  
  .language-dropdown .flag {
    width: 18px !important;
    height: 14px !important;
  }
  
  .language-dropdown span {
    font-size: 11px !important;
  }

  .immobilier-hero {
    min-height: 65vh;
  }

  .immobilier-hero h1 {
    font-size: 3rem !important;
  }

  .hero-search-box {
    padding: 1.75rem;
  }

  .stats-badges {
    grid-template-columns: repeat(3, 1fr);
  }

  .stat-number {
    font-size: 3rem;
  }

  .stat-label {
    font-size: 0.95rem;
  }

  .modules-tabs {
    justify-content: center;
    flex-wrap: wrap;
  }

  .module-tab {
    padding: 1rem 1.75rem;
  }

  .filters-container {
    padding: 1.75rem;
  }

  .filters-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .properties-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }

  .agents-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lotissements-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  #map-container {
    height: 450px;
  }

  .modal-content {
    max-width: 85vw;
  }
}

/* DESKTOP (1025px et plus) */
@media (min-width: 1025px) {
  main {
    padding-top: 140px;
  }

  .immobilier-hero {
    min-height: 70vh;
  }

  .immobilier-hero h1 {
    font-size: 4rem !important;
  }

  .hero-search-box {
    padding: 2rem;
  }

  .stats-badges {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .stat-badge {
    padding: 2.5rem 2rem;
  }

  .stat-number {
    font-size: 4rem;
  }

  .stat-label {
    font-size: 1.1rem;
  }

  .filters-container {
    padding: 2rem;
  }

  .filters-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }

  .properties-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .agents-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .lotissements-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .why-cards {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }

  .cta-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  #map-container {
    height: 500px;
  }

  .modal-content {
    max-width: 900px;
  }
}

/* ===== SCROLLBAR CUSTOM ===== */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #080054;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #ff9100;
}

/* ===== BADGES ET TAGS ===== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-success {
  background: #10b981;
  color: white;
}

.badge-warning {
  background: #f59e0b;
  color: white;
}

.badge-info {
  background: #3b82f6;
  color: white;
}

/* ===== LOADING STATE ===== */
.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(8, 0, 84, 0.1);
  border-top-color: #080054;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== UTILITIES ===== */
.hidden {
  display: none !important;
}

.text-brand-primary {
  color: #080054 !important;
}

.text-brand-accent {
  color: #ff9100 !important;
}

.bg-brand-primary {
  background-color: #080054 !important;
}

.bg-brand-accent {
  background-color: #ff9100 !important;
}

