/* ========================================
   APPARTEMENTS HORIZON - SÉLECTION D'APPARTEMENT
   Basé sur le CSS qui fonctionne + couleurs du site
   ======================================== */

/* Smooth scroll global */
html {
  scroll-behavior: smooth;
}

/* ========================================
   PROGRESS TRACKER
   ======================================== */
.progress-tracker-vertical {
  position: fixed;
  top: 120px;
  right: 30px;
  z-index: 999;
  background: white;
  padding: 20px 12px;
  border-radius: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.progress-step-item {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
}

.progress-step-item:last-child {
  margin-bottom: 0;
}

.progress-step-item::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 38px;
  transform: translateX(-50%);
  width: 2px;
  height: 20px;
  background: #e0e0e0;
}

.progress-step-item:last-child::after {
  display: none;
}

.progress-step-item.completed::after {
  background: var(--ztc-bg-bg-4);
}

.progress-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e0e0e0;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin: 0 auto;
  transition: all 0.3s;
  font-size: 0.85rem;
}

.progress-step-item.active .progress-step-circle {
  background: var(--ztc-bg-bg-4);
  color: white;
  transform: scale(1.2);
  box-shadow: 0 0 0 3px rgba(139, 189, 189, 0.2);
}

.progress-step-item.completed .progress-step-circle {
  background: var(--ztc-bg-bg-4);
  color: white;
}

/* ========================================
   SECTIONS
   ======================================== */
.selection-section {
  padding: 80px 0;
  position: relative;
  min-height: 400px; /* Garde un espace minimum */
  transition: all 0.3s ease;
}

.selection-section.disabled {
  /* Ne pas utiliser display: none ni position: absolute */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  max-height: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  margin: 0;
}

.selection-section.disabled::before {
  display: none;
}

.section-header-custom {
  text-align: center;
  margin-bottom: 60px;
}

.section-number-badge {
  display: inline-block;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: var(--ztc-bg-bg-4);
  color: white;
  text-align: center;
  line-height: 55px;
  font-weight: bold;
  font-size: 1.6rem;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(139, 189, 189, 0.3);
}

.section-title-custom {
  font-family: var(--ztc-family-font1);
  font-size: 2.5rem;
  color: var(--ztc-text-text-7);
  margin-bottom: 15px;
}

.section-subtitle-custom {
  font-size: 1.15rem;
  color: var(--ztc-text-text-8);
  margin-bottom: 0;
}

/* ========================================
   BUILDING CARDS
   ======================================== */
.building-card-custom {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  background: white;
  border: 3px solid transparent;
  margin-bottom: 16px;
}

.building-card-custom:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(139, 189, 189, 0.25);
  border-color: var(--ztc-bg-bg-4);
}

.building-card-custom.selected {
  border-color: var(--ztc-bg-bg-4);
  box-shadow: 0 8px 30px rgba(139, 189, 189, 0.35);
  transform: translateY(-8px);
}

.building-card-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.building-badge-disponible,
.building-badge-indisponible,
.building-badge-date {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-family: var(--ztc-family-font2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.4s ease;
}

.building-badge-disponible {
  transition: all 0.4s;
  background: linear-gradient(135deg, var(--ztc-bg-bg-4) 0%, #6da8a8 100%);
  color: var(--brown);
}

.building-badge-disponible:hover {
  transition: all 0.3s ease;
  background: var(--brown);
  color: var(--beige);
}

.building-badge-indisponible {
  transition: all 0.4s;
  background: var(--brown);
  color: var(--beige);
}

.building-badge-indisponible:hover {
  transition: all 0.3s ease;
  background: linear-gradient(135deg, var(--ztc-bg-bg-4) 0%, #6da8a8 100%);
  color: var(--brown);
}

.building-badge-date {
  transition: all 0.4s;
  background: var(--brown);
  color: #6da8a8;
  border: 2px solid #6da8a8;
}

.building-badge-date:hover {
  transition: all 0.3s ease;
  background: #6da8a8;
  color: var(--brown);
  border: 2px solid var(--brown);
}

.building-card-content {
  padding: 25px;
}

.building-card-title {
  font-family: var(--ztc-family-font1);
  font-size: 1.8rem;
  color: var(--ztc-text-text-7);
  margin-bottom: 12px;
  font-weight: 600;
}

.building-card-address {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ztc-text-text-8);
  margin-bottom: 15px;
  font-size: 1rem;
}

.building-card-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.building-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ztc-text-text-7);
  font-size: 0.95rem;
  font-weight: 500;
}

.building-feature-item i {
  color: var(--ztc-bg-bg-4);
}

/* ========================================
   FLOOR CARDS
   ======================================== */
.floor-card-custom {
  background: white;
  padding: 35px 25px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  border: 3px solid #e0e0e0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  margin-bottom: 16px;
}

.floor-card-custom:hover {
  border-color: var(--ztc-bg-bg-4);
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(139, 189, 189, 0.25);
}

.floor-card-custom.selected {
  background: var(--ztc-bg-bg-4);
  color: white;
  border-color: var(--ztc-bg-bg-4);
  transform: translateY(-8px);
}

.floor-icon-large {
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: var(--ztc-bg-bg-4);
}

.floor-card-custom.selected .floor-icon-large {
  color: white;
}

.floor-card-custom h4 {
  font-family: var(--ztc-family-font1);
  font-size: 2rem;
  margin-bottom: 10px;
}

.floor-card-custom p {
  font-size: 1rem;
  color: var(--ztc-text-text-8);
  margin: 0;
}

.floor-card-custom.selected p {
  color: rgba(255,255,255,0.9);
}

/* ========================================
   FLOOR PLAN
   ======================================== */
.floor-plan-box {
  background: white;
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 60px;
}

.floor-plan-box h3 {
  font-family: var(--ztc-family-font1);
  font-size: 2rem;
  color: var(--ztc-text-text-7);
  margin-bottom: 30px;
  text-align: center;
}

.floor-plan-image-wrapper {
  position: relative;
  border-radius: 12px;
  background: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
}

.floor-plan-image-wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   APARTMENT CARDS
   ======================================== */
.apartment-card-custom {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border: 3px solid transparent;
  height: 100%;
  position: relative;
  margin-bottom: 16px;
}

.apartment-card-custom:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(139, 189, 189, 0.25);
  border-color: var(--ztc-bg-bg-4);
}

.apartment-card-custom.selected {
  border-color: var(--ztc-bg-bg-4);
  box-shadow: 0 8px 30px rgba(139, 189, 189, 0.35);
  transform: translateY(-8px);
}

.apartment-card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.apartment-badge-disponible,
.apartment-badge-indisponible,
.apartment-badge-date {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 14px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.85rem;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  font-family: var(--ztc-family-font2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.apartment-badge-disponible {
  background: linear-gradient(135deg, var(--ztc-bg-bg-4) 0%, #6da8a8 100%);
  color: white;
}

.apartment-badge-indisponible {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.apartment-badge-date {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  font-size: 0.8rem;
  text-transform: none;
  max-width: 180px;
  text-align: center;
}

.building-card-custom:hover .building-badge-disponible,
.building-card-custom:hover .building-badge-indisponible,
.building-card-custom:hover .building-badge-date,
.apartment-card-custom:hover .apartment-badge-disponible,
.apartment-card-custom:hover .apartment-badge-indisponible,
.apartment-card-custom:hover .apartment-badge-date {
  transform: scale(1.05);
}

@keyframes pulse {
  0% {
    box-shadow: 0 2px 6px rgba(139, 189, 189, 0.3);
  }
  50% {
    box-shadow: 0 2px 12px rgba(139, 189, 189, 0.6);
  }
  100% {
    box-shadow: 0 2px 6px rgba(139, 189, 189, 0.3);
  }
}

.apartment-badge-disponible {
  animation: pulse 2s ease-in-out infinite;
}

.apartment-card-content {
  padding: 25px;
}

.apartment-card-number {
  font-family: var(--ztc-family-font1);
  font-size: 1.5rem;
  color: var(--ztc-text-text-7);
  margin-bottom: 8px;
  font-weight: 600;
}

.apartment-card-description {
  color: var(--ztc-text-text-8);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.apartment-card-specs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.apartment-spec-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ztc-text-text-7);
  font-size: 0.95rem;
}

.apartment-spec-row i {
  color: var(--ztc-bg-bg-4);
  width: 20px;
}

.apartment-card-price {
  font-family: var(--ztc-family-font1);
  font-size: 2rem;
  color: var(--ztc-text-text-7);
  font-weight: 700;
  margin: 0;
}

/* ========================================
   DETAIL BOXES
   ======================================== */
.detail-box-custom {
  background: var(--beige);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  margin-bottom: 20px;
  transition: all 0.3s;
}

.detail-box-custom:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.detail-box-custom i {
  font-size: 3rem;
  color: var(--ztc-bg-bg-4);
  margin-bottom: 15px;
}

.detail-box-custom h5 {
  font-family: var(--ztc-family-font1);
  font-size: 1.3rem;
  color: var(--ztc-text-text-7);
  margin-bottom: 10px;
}

.detail-box-custom p {
  color: var(--ztc-text-text-8);
  font-size: 1.1rem;
  margin: 0;
}

/* ========================================
   SUMMARY BOX
   ======================================== */
.summary-card {
  background: linear-gradient(135deg, rgba(139, 189, 189, 0.1), rgba(139, 189, 189, 0.05));
  border-left: 5px solid var(--ztc-bg-bg-4);
  padding: 35px;
  border-radius: 12px;
  margin-bottom: 50px;
}

.summary-card h4 {
  font-family: var(--ztc-family-font1);
  font-size: 2rem;
  color: var(--ztc-text-text-7);
  margin-bottom: 25px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-label {
  font-weight: 600;
  color: var(--ztc-text-text-7);
  font-size: 1.05rem;
}

.summary-value {
  color: var(--ztc-text-text-8);
  text-align: right;
  font-size: 1.05rem;
}

/* ========================================
   FORM
   ======================================== */
.form-wrapper {
  background: white;
  padding: 50px 45px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.form-section-heading {
  font-family: var(--ztc-family-font1);
  font-size: 2.2rem;
  color: var(--ztc-text-text-7);
  margin-bottom: 35px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--beige);
}

.form-label-custom {
  display: block;
  margin-bottom: 10px;
  color: var(--ztc-text-text-7);
  font-weight: 600;
  font-size: 1rem;
}

.form-input-custom {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s;
  font-family: var(--ztc-family-font2);
}

.form-input-custom:focus {
  border-color: var(--ztc-bg-bg-4);
  box-shadow: 0 0 0 3px rgba(139, 189, 189, 0.1);
  outline: none;
}

.form-input-custom.readonly {
  background: var(--beige);
  cursor: not-allowed;
}

.form-group-custom {
  margin-bottom: 25px;
}

textarea.form-input-custom {
  resize: vertical;
  min-height: 120px;
}

/* ========================================
   GALLERY
   ======================================== */
.apartment-detail-gallery {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 40px;
  height: 500px;
}

.apartment-detail-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========================================
   SUCCESS
   ======================================== */
.success-wrapper {
  background: white;
  padding: 80px 40px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.success-icon-circle {
  width: 110px;
  height: 110px;
  background: var(--ztc-bg-bg-4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 35px;
  animation: scaleIn 0.5s ease;
}

.success-icon-circle i {
  font-size: 3.5rem;
  color: white;
}

@keyframes scaleIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.success-wrapper h2 {
  font-family: var(--ztc-family-font1);
  font-size: 3rem;
  color: var(--ztc-bg-bg-4);
  margin-bottom: 20px;
}

.success-wrapper p {
  font-size: 1.2rem;
  color: var(--ztc-text-text-8);
  margin-bottom: 15px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .progress-tracker-vertical {
    display: none;
  }

  .section-title-custom {
    font-size: 2rem;
  }

  .form-wrapper {
    padding: 30px 20px;
  }

  .building-card-image,
  .apartment-card-image {
    height: 220px;
  }

  .building-badge-disponible,
  .building-badge-indisponible,
  .building-badge-date {
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .building-badge-date {
    font-size: 0.75rem;
  }

  .apartment-badge-disponible,
  .apartment-badge-indisponible,
  .apartment-badge-date {
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    font-size: 0.75rem;
  }

  .apartment-badge-date {
    font-size: 0.7rem;
    max-width: 150px;
  }
}

/* Apartment Images Grid */
.apartment-images-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}

.apartment-image-box {
  background: var(--ztc-bg-bg-3);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.apartment-image-box .image-box-title {
  background: var(--ztc-bg-bg-4);
  color: var(--ztc-text-text-1);
  padding: 15px 20px;
  margin: 0;
  font-family: var(--ztc-family-font1);
  font-size: 1.1rem;
  font-weight: 600;
}

.apartment-image-box .image-box-title i {
  margin-right: 8px;
  color: var(--ztc-bg-bg-5);
}

.apartment-image-box img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .apartment-images-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .apartment-image-box img {
    height: 300px;
  }
}

.footer2-section-area{
  margin-top: -10px !important;
}

@media (max-width: 768px) {
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.nice-select{
height: 55px !important;
line-height: 27px !important;
}

.building-card-custom.is-empty {
  opacity: 0.75;
}

.building-card-custom.is-empty .building-card-image {
  filter: grayscale(0.6);
}

.alert-available {
  background-color: #6da8a8;
  border-color: #6da8a8;
  color: #ffffff;
  font-weight: 600;
  text-align: center;
}

/*------------------MODAL---------------------------*/
/* Modal pour agrandir les images */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.98);
  animation: fadeIn 0.3s ease;
  overflow: hidden;
}

.image-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  animation: zoomIn 0.3s ease;
  overflow: hidden;
}

.image-modal-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 90vh;
  cursor: grab;
  transition: transform 0.1s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.image-modal-content img.dragging {
  cursor: grabbing;
}

.image-modal-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #333;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #ddd;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.image-modal-close:hover,
.image-modal-close:focus {
  background: rgba(240, 240, 240, 1);
  transform: scale(1.1);
  border-color: #999;
}

.image-modal-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 15px 20px;
  text-align: center;
  font-size: 1.1rem;
  border-top: 2px solid #e0e0e0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* Contrôles de zoom */
.image-modal-controls {
  position: absolute;
  top: 20px;
  left: 35px;
  z-index: 10000;
  display: flex;
  gap: 10px;
  flex-direction: column;
}

.zoom-control-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #ddd;
  color: #333;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  user-select: none;
}

.zoom-control-btn:hover {
  background: rgba(240, 240, 240, 1);
  transform: scale(1.1);
  border-color: #999;
}

.zoom-control-btn:active {
  transform: scale(0.95);
}

.zoom-level-indicator {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #ddd;
  color: #333;
  padding: 8px 15px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  min-width: 50px;
}

/* Curseur pour indiquer que l'image est cliquable */
.apartment-image-box img {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.apartment-image-box img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.apartment-image-box {
  position: relative;
}

/*.apartment-image-box::after {
  content: '\f00e';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}*/

.apartment-image-box:hover::after {
  opacity: 1;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .image-modal-close {
    top: 10px;
    right: 10px;
    font-size: 30px;
    width: 40px;
    height: 40px;
  }
  
  .image-modal-controls {
    top: 10px;
    left: 10px;
    gap: 8px;
  }
  
  .zoom-control-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .zoom-level-indicator {
    font-size: 12px;
    padding: 6px 12px;
    min-width: 40px;
  }
  
  .image-modal-content {
    max-width: 95%;
  }
}

/* Conteneur pour les visites virtuelles */
.virtual-tour-container {
  width: 100%;
  height: 100%;
  min-height: 400px;
  background: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.virtual-tour-container iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
  border-radius: 8px;
  margin-bottom: 5px;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
  .virtual-tour-container {
    min-height: 300px;
  }
  
}

.virtual-tour-container {
  position: relative;
}

.virtual-tour-container iframe {
  width: 100%;
  height: 350px;
  border-radius: 12px;
}

/* Overlay caché desktop */
.virtual-tour-overlay {
  display: none;
}

/* Mobile seulement */
@media (max-width: 768px) {
  .virtual-tour-overlay {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 5;
  }
}
