@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@700&display=swap");

/* Base */
* {
  box-sizing: border-box !important;
}
html,
body {
  background: transparent !important;
}
body {
  font-family: "Cinzel", serif;
  background: #f8f8f8;
  margin: 0;
  padding: 0;
}

/* ===== Stepper / Header ===== */
#builder-header {
  max-width: 1200px;
  margin: 36px auto 0;
  padding: 0 0 18px 0;
}
.stepper {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 12px;
  gap: 12px;
  transition: opacity 0.2s;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
  position: relative;
  opacity: 0.5;
  background: transparent;
  transition: opacity 0.2s, box-shadow 0.15s, background 0.15s, color 0.15s,
    cursor 0.15s;
}
.step .step-icon {
  font-size: 2.1rem;
  background: none;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1;
}
.step .step-title {
  font-weight: 700;
  font-size: 1.11rem;
  text-align: center;
  color: #ffffff;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step.completed {
  opacity: 0.85;
}
.step.completed .step-title::after {
  content: " ✔️";
  font-size: 1rem;
  margin-left: 4px;
  color: #ffffff;
}
.step.active {
  opacity: 1;
}
.step.active .step-title {
  color: #178a4b;
  background: linear-gradient(90deg, #b8ffd4 50%, #f5fff9 100%);
  border-radius: 8px;
  padding: 3px 16px;
  font-size: 1.19rem;
  font-weight: 900;
  text-shadow: 0 1px 6px #81ebad25;
  border-bottom: 3px solid #1abc5b;
}
.stepper-line {
  width: 100%;
  height: 3px;
  background: #eaf3ec;
  border-radius: 2px;
  position: relative;
}
.stepper-progress {
  position: absolute;
  inset: 0 auto auto 0;
  height: 100%;
  background: linear-gradient(90deg, #1abc5b, #2fd684);
  border-radius: 2px;
  width: 20%;
  transition: width 0.35s;
}

/* ===== Layout ===== */
#builder-content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 55vh;
  width: 100%;
}
.step-form {
  max-width: 720px;
  width: 100%;
  margin: 38px auto 0;
  padding: 28px 0 46px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.step-heading {
  font-size: 2.15rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: #ffffff;
  text-align: center;
  letter-spacing: 0.02em;
  width: 100%;
}
.form-group {
  margin-bottom: 26px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.form-label {
  font-weight: 700;
  font-size: 1.11rem;
  margin-bottom: 9px;
  color: #ffffff;
  letter-spacing: 0.01em;
  text-align: center;
  width: 100%;
}

/* ===== Inputs & Buttons ===== */
input[type="number"],
input[type="date"],
input[type="text"] {
  border: 1.4px solid #b9cdbf;
  border-radius: 7px;
  padding: 12px 18px;
  margin-top: 4px;
  font-size: 1.06rem;
  background: #f7f7f7;
  width: 85%;
  outline: none;
  font-family: inherit;
  transition: border 0.16s;
  font-weight: 500;
  text-align: center;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
input[type="number"]:focus,
input[type="date"]:focus,
input[type="text"]:focus {
  border: 1.6px solid #1abc5b;
  background: #fff;
}
.duration-info {
  font-size: 1.07rem;
  margin-top: 12px;
  color: #249d60;
  font-weight: 600;
  text-align: center;
  width: 100%;
}

.next-btn {
  background: linear-gradient(90deg, #1abc5b 70%, #43e0a3 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 16px 56px;
  font-size: 1.16rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: box-shadow 0.18s, background 0.21s;
  box-shadow: 0 3px 12px #1abc5b11;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  display: inline-block;
}
.next-btn:hover,
.next-btn:focus {
  background: linear-gradient(90deg, #159e4b 70%, #35cc90 100%);
  box-shadow: 0 6px 18px #1abc5b19;
}

/* ===== Polaroid Gallery ===== */
.polaroid-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 54px 56px;
  justify-items: center;
  margin: 30px 0 24px;
  max-width: 980px;
  width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
}
.polaroid-select {
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: 0 8px 36px #0001, 0 2px 14px #1abc5b07;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: box-shadow 0.18s, border 0.18s, transform 0.23s;
  position: relative;
}
.polaroid-select:nth-child(1) {
  transform: rotate(-4.5deg);
}
.polaroid-select:nth-child(2) {
  transform: rotate(2.3deg);
}
.polaroid-select:nth-child(3) {
  transform: rotate(-3.1deg);
}
.polaroid-select:nth-child(4) {
  transform: rotate(1.2deg);
}
.polaroid-select:nth-child(5) {
  transform: rotate(-2.6deg);
}
.polaroid-select:nth-child(6) {
  transform: rotate(3.8deg);
}

.polaroid-select img {
  width: 210px;
  height: auto;
  display: block;
  background: #fff;
  border: none;
  box-shadow: none;
  transition: filter 0.12s;
  z-index: 1;
  max-width: 100%;
}
.polaroid-select.selected {
  border: 1.5px solid #18bc5c !important;
  box-shadow: 0 8px 36px #0001, 0 2px 14px #1abc5b07;
  transform: none !important;
}
.polaroid-select.selected img {
  filter: brightness(1.08);
}

/* ===== Select Cards (Bali buttons) ===== */
.select-cards {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
  justify-content: center;
  width: 100%;
}
.select-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 2.2px solid #e4e9e7;
  border-radius: 22px;
  background: #fff;
  cursor: pointer;
  font-size: 1.18rem;
  font-family: inherit;
  transition: border 0.18s, box-shadow 0.17s, background 0.16s, color 0.18s;
  opacity: 0.98;
  font-weight: 600;
  letter-spacing: 0.01em;
  user-select: none;
  min-width: 116px;
}
.select-card.selected {
  background: linear-gradient(90deg, #51c68c 0%, #3be16b 100%);
  color: #fff;
  border-color: #2ebe5b;
  box-shadow: 0 2px 10px #2ebe5b23;
}
#baliChooseBtnRow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 22px auto 24px;
  width: 100%;
  max-width: 510px;
}
#baliChooseBtnRow .select-cards {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  width: auto;
}

/* ===== Accommodation ===== */
.accommodation-gallery {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  margin: 26px 0 24px;
  width: 100%;
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}
.accommodation-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 36px #0001, 0 2px 14px #1abc5b07;
  border: 3px solid transparent;
  cursor: pointer;
  transition: border 0.17s, box-shadow 0.19s, transform 0.16s;
  width: 240px;
  max-width: 94vw;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.accommodation-card.selected {
  border: 3px solid #1abc5b;
  box-shadow: 0 8px 36px #1abc5b18;
  transform: scale(1.045) translateY(-2px);
}
.accommodation-card img {
  width: 100%;
  max-height: 142px;
  object-fit: cover;
  border-radius: 16px 16px 0 0;
  background: #eaeaea;
}
.accommodation-label {
  font-size: 1.13rem;
  font-weight: 700;
  color: #165135;
  text-align: center;
  margin: 18px 0 2px;
}
.accommodation-price {
  font-size: 1.03rem;
  color: #188a51;
  font-weight: 600;
  text-align: center;
  margin: 0 0 20px;
  letter-spacing: 0.02em;
}

/* ===== Activities ===== */
.activity-types-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  margin: 28px 0 14px;
}
.activity-type-card {
  background: #fff;
  color: #168e51;
  border: 2px solid #e6eee8;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 18px 46px;
  border-radius: 18px;
  box-shadow: 0 3px 18px #1abc5b13;
  cursor: pointer;
  transition: border 0.16s, box-shadow 0.18s, background 0.19s;
  min-width: 280px;
  max-width: 420px;
  text-align: center;
}
.activity-type-card.completed {
  background: #eafbf1;
  border-color: #1abc5b;
  color: #1abc5b;
  opacity: 0.72;
  pointer-events: none;
}

.activity-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 34px;
  justify-items: center;
  margin: 8px 0 4px;
  width: 100%;
  max-width: 800px;
}

/* ===== Map (Bali) ===== */
.region.selected {
  stroke: #1abc5b !important;
  stroke-width: 13px !important;
  filter: drop-shadow(0 0 13px #18bc5c66);
  outline: none;
}

.bali-map-full-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
  background: transparent;
  box-sizing: border-box;
  padding: 0;
  position: relative; /* parent du tooltip si besoin */
}
.bali-map-container {
  width: 100% !important;
  max-width: 1200px !important;
  min-width: 0 !important;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  height: auto !important;
  padding: 0 !important;
}
.bali-map-container svg {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  display: block !important;
  background: transparent !important;
  box-sizing: border-box !important;
}

/* Tooltip global */
#map-tooltip {
  position: fixed;
  pointer-events: none;
  background: rgba(35, 35, 35, 0.92);
  color: #fff;
  padding: 6px 15px;
  border-radius: 8px;
  font-family: "Cinzel", serif;
  font-size: 1.05em;
  font-weight: 700;
  z-index: 99999;
  box-shadow: 0 2px 8px #0002;
  display: none;
  left: 0;
  top: 0;
  transform: translate(-50%, -120%);
}

/* ===== Glass container (optimisé perfs) ===== */
/* Fallback simple et léger */
.glass-container {
  background: rgba(20, 20, 20, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  padding: 32px 40px;
  transition: background 0.2s ease, box-shadow 0.3s ease;
  max-width: 1200px;
  margin: 36px auto 0;
}
/* Si support du blur, on l’active mais plus soft (moins de jank) */
@supports (
  (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))
) {
  .glass-container {
    background: rgba(20, 20, 20, 0.26);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    backdrop-filter: blur(8px) saturate(160%);
    /* ⚠️ pas d’animation sur backdrop-filter (coûteux) */
  }
  .glass-container:hover {
    background: rgba(30, 30, 30, 0.3);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
  }
}

/* ===== Contact textarea ===== */
#contactMessage {
  width: 85%;
  min-height: 80px;
  resize: vertical;
  padding: 15px 18px;
  border-radius: 7px;
  border: 1.4px solid #b9cdbf;
  background: #f7f7f7;
  font-size: 1.06rem;
  font-family: "Montserrat", Arial, sans-serif;
  color: #444;
  margin: 18px 0 0;
  box-sizing: border-box;
  transition: border 0.2s;
}
#contactMessage:focus {
  border-color: #24e39d;
  outline: none;
  background: #fff;
}
.form-label[for="contactMessage"] {
  font-size: 1.15em;
  font-weight: 600;
  color: #fff;
  margin: 18px 0 6px;
  letter-spacing: 0.04em;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  #builder-header {
    max-width: 98vw;
  }
  .step-form {
    max-width: 93vw;
  }
}
@media (max-width: 1000px) {
  .polaroid-gallery {
    grid-template-columns: repeat(2, 1fr);
    max-width: 540px;
    gap: 34px 20px;
  }
  .polaroid-select img {
    width: 145px;
  }
  .bali-map-container {
    max-width: 98vw !important;
  }
}
@media (max-width: 900px) {
  .accommodation-gallery {
    gap: 20px;
    max-width: 640px;
  }
  .accommodation-card {
    width: 160px;
  }
  .accommodation-card img {
    max-height: 90px;
  }
  .activity-gallery {
    grid-template-columns: repeat(2, 1fr);
    max-width: 420px;
    gap: 24px 20px;
  }
  .activity-select {
    width: 160px;
  }
  .activity-select img {
    width: 140px;
    height: 80px;
  }
}
@media (max-width: 800px) {
  #builder-header {
    margin: 18px 0 8px;
  }
  .stepper {
    gap: 0;
  }
  .step {
    min-width: 70px;
  }
  .step .step-icon {
    font-size: 1.08rem;
  }
  .step .step-title {
    font-size: 0.98rem;
  }
  .step-form {
    max-width: 99vw;
    padding: 6px 0 20px;
  }
  input[type="number"],
  input[type="date"],
  input[type="text"] {
    width: 99%;
    font-size: 1rem;
  }
  .glass-container {
    max-width: 99vw;
    padding: 12px 2vw;
  }
}
@media (max-width: 650px) {
  .bali-btn-row {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
}
@media (max-width: 600px) {
  .polaroid-gallery {
    grid-template-columns: 1fr;
    max-width: 210px;
    gap: 18px 0;
  }
  .polaroid-select img {
    width: 120px;
  }

  .activity-types-list {
    gap: 10px;
  }
  .activity-type-card {
    min-width: 99vw;
    max-width: 99vw;
    font-size: 1rem;
    padding: 14px 8px;
  }
  .activity-gallery {
    grid-template-columns: 1fr;
    max-width: 220px;
    gap: 16px 0;
  }

  html,
  body {
    overflow-x: hidden !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }
  .glass-container {
    padding: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }
  .accommodation-gallery {
    flex-direction: column !important;
    gap: 14px !important;
    max-width: 100vw !important;
    width: 100vw !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }
  .accommodation-card {
    width: 95vw !important;
    max-width: 99vw !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }
  #map-tooltip {
    font-size: 13px;
    padding: 7px 12px;
  }
}
/* === ACTIVITIES — centrage & grilles responsives === */

/* Le bloc ajouté après chaque type (culture, adventure, etc.) est centré */
.activity-category-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center; /* centre tout le contenu */
  text-align: center;
  margin: 0 0 24px 0;
}

.activity-category-block .form-label {
  width: 100%;
  text-align: center;
}

/* Range les 2 boutons ("I'm interested…" / "Let me choose") bien au centre */
.activity-category-block .select-cards {
  width: auto;
  justify-content: center;
}

/* Galerie d’activités : grille fluide et centrée */
.activity-gallery {
  /* grille auto-fit qui remplit la ligne, et se replie en 2/1 colonnes selon largeur */
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px 24px;
  width: min(980px, 100%); /* largeur max mais reste responsive */
  margin: 10px auto 4px; /* centre la grille dans la page */
  justify-items: center; /* centre chaque carte dans sa cellule */
}

/* Cartes d’activité : on clippe l’image avec un border-radius sur le parent */
.activity-select {
  width: 100%;
  max-width: 300px; /* taille max par carte */
  border-radius: 18px;
  overflow: hidden; /* indispensable pour arrondir l’image */
  background: #fff;
}

/* Image arrondie + taille homogène (recadrage) */
.activity-select img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 3; /* ratio stable (proche de tes 200x120) */
  object-fit: cover; /* recadre proprement */
  border-radius: 0; /* l’arrondi vient du parent */
}

/* Titre sous l’image : centré, espace correct */
.activity-select span {
  display: block;
  padding: 8px 10px 14px;
  text-align: center;
}

/* Petits écrans : colonnes réduites / pleine largeur */
@media (max-width: 600px) {
  .activity-gallery {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 16px;
  }
  .activity-select {
    max-width: 95vw;
  }
}

/* Centrage des blocs de boutons au-dessus de la galerie (screenshoot 1) */
.activities-buttons,
.culture-buttons,
.contact-method-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Centrage des champs (screenshoot 2) */
#builder-content select,
#builder-content textarea,
#builder-content input[type="text"],
#builder-content input[type="number"],
#builder-content input[type="email"],
#builder-content input[type="tel"] {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
#contact-step .form-control {
  width: 85%;
  display: block;
  margin: 0 auto 15px auto;
  border-radius: 7px;
  border: 1.4px solid #b9cdbf;
  background: #f7f7f7;
  font-size: 1.06rem;
  padding: 12px 18px;
}

#contactMessage.form-control {
  min-height: 92px;
  padding: 13px 16px;
  resize: vertical;
}
/* Confirmation summary */
.confirm-card {
  margin: 22px auto 0;
  max-width: 900px;
  width: 95%;
  background: #ffffff14;
  border: 1px solid #ffffff26;
  border-radius: 18px;
  padding: 18px 20px;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.confirm-card h4 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  font-weight: 800;
}
.confirm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 22px;
}
.confirm-row {
  background: #ffffff12;
  border: 1px solid #ffffff24;
  border-radius: 12px;
  padding: 10px 12px;
}
.confirm-label {
  display: block;
  font-weight: 800;
  opacity: 0.9;
  margin-bottom: 4px;
}
.confirm-value {
  line-height: 1.4;
}
@media (max-width: 700px) {
  .confirm-grid {
    grid-template-columns: 1fr;
  }
}
/* --- Grille d'activités --- */
.activity-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

/* --- Carte individuelle d'activité --- */
.activity-select {
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.activity-select img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
  border-radius: 12px; /* Arrondi de l'image */
}

.activity-select span {
  display: block;
  padding: 6px 4px;
  font-size: 0.95rem;
}

/* Effet au survol */
.activity-select:hover {
  transform: translateY(-2px);
}

/* --- Carte sélectionnée --- */
.activity-select.selected {
  border-color: #1abc5b; /* Vert */
  box-shadow: 0 8px 20px rgba(26, 188, 91, 0.25);
}
/* === Sub‑themes (under each category) === */
.subtheme-block {
  width: 100%;
  max-width: 980px;
  margin: 14px auto 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.subtheme-block .subtheme-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: #ffffff;
  letter-spacing: 0.02em;
  margin: 6px 0 10px;
  text-transform: uppercase;
  opacity: 0.95;
}

/* Row of sub‑theme chips (reuse your select-card) */
.subtheme-toggles {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 10px;
}

.subtheme-toggles .select-card {
  padding: 10px 16px;
  font-size: 0.98rem;
  min-width: auto;
}

/* Activity grid just under the chosen sub‑theme */
.subtheme-block .activity-gallery {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 18px 20px;
  width: 100%;
  max-width: 980px;
  margin: 8px auto 0;
  justify-items: center;
}

/* Activity card look (matches your style) */
.subtheme-block .activity-select {
  background: #fff;
  border: 2px solid transparent;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  max-width: 220px;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.subtheme-block .activity-select img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.subtheme-block .activity-select span {
  display: block;
  padding: 10px 8px 12px;
  font-size: 1rem;
  color: #206b44;
  font-weight: 700;
}

/* Selected = green frame like your cards */
.subtheme-block .activity-select.selected {
  border-color: #1abc5b;
  box-shadow: 0 8px 20px rgba(26, 188, 91, 0.22);
  transform: translateY(-2px);
}

/* Responsive to match your breakpoints */
@media (max-width: 900px) {
  .subtheme-block .activity-gallery {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
    max-width: 640px;
    gap: 16px 16px;
  }
  .subtheme-block .activity-select {
    max-width: 200px;
  }
  .subtheme-block .activity-select img {
    height: 110px;
  }
}

@media (max-width: 600px) {
  .subtheme-block .activity-gallery {
    grid-template-columns: 1fr;
    max-width: 95vw;
    gap: 14px;
  }
  .subtheme-toggles .select-card {
    min-width: 99vw;
    max-width: 99vw;
  }
}
.activity-type-card {
  display: inline-block;
  padding: 12px 20px;
  margin: 8px;
  border: 2px solid #ccc;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 16px;
  text-align: center;
}

.activity-type-card:hover {
  border-color: #58a05a;
}

.activity-type-card.selected {
  border-color: #58a05a;
  background-color: #e7f7e7;
  box-shadow: 0 0 8px rgba(88, 160, 90, 0.4);
}
