/* Styles spécifiques à la page Voyages avec Mapbox */

body {
  font-family: "Georgia", serif;
  background-color: var(--off-white);
  color: var(--charcoal);
  line-height: 1.6;
}

/* HEADER */
.voyages-header {
  padding: 8rem 2rem 4rem;
  text-align: center;
  background: linear-gradient(135deg, var(--cream) 0%, var(--off-white) 100%);
}

.voyages-header__title {
  font-size: 3.5rem;
  font-weight: 300;
  letter-spacing: 3px;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.voyages-header__subtitle {
  font-size: 1.2rem;
  color: var(--rust);
  font-style: italic;
}

/* CONTENEUR PRINCIPAL */
.voyages {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

/* CARTE MAPBOX */
.map-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
  padding: 2rem;
  position: relative;
  transform: rotate(-0.3deg);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.map-card:hover {
  transform: rotate(0deg);
}

.map-card::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -8px;
  right: 8px;
  bottom: 8px;
  border: 2px solid var(--rust);
  border-radius: 10px;
  z-index: -1;
}

.map-card__title {
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  color: var(--charcoal);
}

.map-card__hint {
  color: #666;
  font-style: italic;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

/* CONTENEUR DE LA CARTE */
.map-container {
  width: 100%;
  height: 600px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  border: 2px solid var(--cream);
}

/* PERSONNALISATION DES CONTRÔLES MAPBOX */
.mapboxgl-ctrl-group {
  background: white !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.mapboxgl-ctrl-group button {
  width: 35px !important;
  height: 35px !important;
}

.mapboxgl-ctrl-group button:hover {
  background-color: var(--cream) !important;
}

/* STYLE DES POPUPS */
.mapboxgl-popup-content {
  background: white;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  font-family: "Georgia", serif;
  color: var(--charcoal);
}

.mapboxgl-popup-content h3 {
  margin: 0 0 0.5rem 0;
  color: var(--rust);
  font-size: 1.1rem;
  font-weight: 400;
}

.mapboxgl-popup-content p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.mapboxgl-popup-close-button {
  font-size: 1.5rem;
  color: var(--charcoal);
  padding: 0 0.5rem;
}

.mapboxgl-popup-close-button:hover {
  background-color: var(--cream);
  color: var(--rust);
}

.mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
  border-color: white transparent transparent transparent;
}

/* RESPONSIVE */
@media (max-width: 968px) {
  .navbar {
    padding: 1rem 1.5rem;
  }

  .navbar__list {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .voyages-header {
    padding: 7rem 1.5rem 3rem;
  }

  .voyages-header__title {
    font-size: 2.5rem;
  }

  .voyages-header__subtitle {
    font-size: 1rem;
  }

  .voyages {
    padding: 3rem 1rem 4rem;
  }

  .map-card {
    padding: 1.5rem;
  }

  .map-card__title {
    font-size: 1.5rem;
  }

  .map-card__hint {
    font-size: 0.9rem;
  }

  .map-container {
    height: 450px;
  }
}

@media (max-width: 480px) {
  .voyages-header__title {
    font-size: 2rem;
  }

  .map-container {
    height: 350px;
  }

  .mapboxgl-ctrl-group button {
    width: 30px !important;
    height: 30px !important;
  }
}

/* MODAL POUR LES PAYS */
.country-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 2000;
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.country-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.country-modal__content {
  background: white;
  border-radius: 12px;
  max-width: 900px;
  width: 90%;
  max-height: 85vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.country-modal.active .country-modal__content {
  transform: scale(1);
}

.country-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--charcoal);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.country-modal__close:hover {
  background: var(--rust);
  color: white;
  transform: rotate(90deg);
}

.country-modal__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow-y: auto;
  max-height: 85vh;
}

.country-modal__image {
  width: 100%;
  height: 100%;
  min-height: 400px;
  object-fit: cover;
  display: block;
}

.country-modal__info {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.country-modal__title {
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--rust);
  margin-bottom: 1.5rem;
  letter-spacing: 2px;
}

.country-modal__date {
  font-size: 1rem;
  color: #555;
  font-style: italic;
  margin-bottom: 1rem;
}

.country-modal__description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--charcoal);
  margin-bottom: 2rem;
  text-align: justify;
}

.country-modal__tags {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.country-modal__tags .tag {
  background: var(--cream);
  color: var(--charcoal);
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid var(--mustard);
  font-family: "Courier New", monospace;
}

/* RESPONSIVE MODAL */
@media (max-width: 968px) {
  .country-modal__body {
    grid-template-columns: 1fr;
  }

  .country-modal__image {
    min-height: 300px;
    max-height: 300px;
  }

  .country-modal__info {
    padding: 2rem;
  }

  .country-modal__title {
    font-size: 2rem;
  }

  .country-modal__description {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .country-modal__content {
    width: 95%;
  }

  .country-modal__info {
    padding: 1.5rem;
  }

  .country-modal__title {
    font-size: 1.7rem;
  }

  .country-modal__close {
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
  }
}
