/* =========================
   Carte itinéraires - UI
   ========================= */

.it-app{
  width: 100%;
}

/* ---------- Filtres ---------- */
.it-filters{
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.it-filter-group{
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
}

.it-filter-legend{
  font-weight: 700;
  font-size: 14px;
}

.it-filter-select{
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  min-height: 42px;
  background: #fff;
  cursor: pointer;
}

.it-filter-select:focus{
  outline: none;
  border-color: orange;
  box-shadow: 0 0 0 2px rgba(255,165,0,0.2);
}

.it-reset{
  border: 1px solid #ddd;
  background: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .08s ease, background .12s ease, border-color .12s ease;
}

.it-reset:hover{
  background: #fafafa;
  border-color: #cfcfcf;
}

.it-reset:active{
  transform: scale(0.98);
}

.it-count{
  font-weight: 600;
  opacity: 0.8;
}

/* ---------- Layout ---------- */
.it-layout{
  display: flex;
  gap: 18px;
  align-items: stretch;
}

.it-map{
  flex: 0 0 60%;
  min-height: 650px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e6e6e6;
  background: #f6f6f6;
}

.it-list{
  flex: 1;
  max-height: 650px;
  overflow: auto;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

/* ---------- Items ---------- */
.it-item{
  border-bottom: 1px solid #f0f0f0;
  padding: 12px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .12s ease, transform .08s ease, box-shadow .12s ease;
}

.it-item:last-child{
  border-bottom: none;
}

.it-item:hover{
  background: #fafafa;
}

.it-item-thumb{
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  margin-bottom: 10px;
}

.it-item-title{
  font-size: 16px;
  margin: 0 0 6px 0;
  line-height: 1.25;
}

.it-item-meta{
  margin: 0 0 6px 0;
  font-size: 14px;
  opacity: 0.9;
}

.it-item-difficulty,
.it-item-season{
  margin: 0 0 6px 0;
  font-size: 13px;
  opacity: 0.85;
}

.it-item-link{
  display: inline-block;
  margin-top: 4px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.it-item-link:hover{
  border-bottom-color: currentColor;
}

/* ---------- États ---------- */
.it-item--active{
  background: #fff4e5;
  border-left: 4px solid orange;
  padding-left: 12px;
}

.it-item--selected{
  background: #fff0d6;
  border-left: 4px solid orange;
  padding-left: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

/* ---------- Popup Leaflet ---------- */
.it-popup{
  line-height: 1.35;
}

.it-popup-title{
  display: inline-block;
  margin-bottom: 4px;
}

.it-popup-meta{
  opacity: 0.9;
}

.it-popup-link{
  margin-top: 6px!important;
  display: inline-block;
  /* font-weight: 700;
  text-decoration: none; */
  background-color: #9FE9DD!important;
  font-family: "Gilroy", Sans-serif!important;
  font-weight: bold!important;
  fill: #092A4E!important;
  color: #092A4E!important;
  padding: 12px 24px!important;
  border-radius: 12px!important;
  transition: all 200ms ease-out;
}

.it-popup-link:hover{
  color:#FFFFFF!important;
  background-color: #9DAAB8!important;
}

.it-item-btn{
  margin-top: 6px!important;
  /* display: inline-block; */
  /* font-weight: 700;
  text-decoration: none; */
  background-color: #9FE9DD!important;
  font-family: "Gilroy", Sans-serif!important;
  font-weight: bold!important;
  fill: #092A4E!important;
  color: #092A4E!important;
  padding: 12px 24px!important;
  border-radius: 12px!important;
  position: relative; /* ✅ passe au-dessus du it-item-link overlay */
  z-index: 2;
  transition: all 200ms ease-out;
  width: fit-content;
}

.it-item-btn:hover{
  color:#FFFFFF!important;
  background-color: #9DAAB8!important;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px){
  .it-layout{
    flex-direction: column;
  }
  .it-map{
    flex: auto;
    min-height: 420px;
  }
  .it-list{
    max-height: none;
  }
  .it-filter-group{
    min-width: 160px;
  }
}

.page-id-1090 header, .page-id-1090 #wpadminbar, .page-id-1090 footer, .page-id-1090 .wpml-ls-statics-footer {
  display: none!important;
}

/* ---------- Popup thumb ---------- */
.it-popup-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  margin-bottom: 8px;
}

/* Optionnel : largeur min du popup pour que l'image soit lisible */
.leaflet-popup-content {
  min-width: 200px;
}
