/* 
  Styles pour la page activité
  Avec section de compétences et carte MapLibre en noir et blanc
*/

/* Styles pour la section de compétences */
.competences-section {
  width: 100%;
  margin-bottom: 3%;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.competences-container {
  display: flex;
  width: 100%;
  padding: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Styles pour la colonne accordéon (gauche) */
.competences-accordion {
  width: 40%;
  padding-left: 4%;
  padding-right: 3%;
  display: flex;
  flex-direction: column;
}

.competences-title-container {
  padding-top: 2rem;
}

.competences-title {
  font-size: 2.2vw;
  font-weight: 400;
  margin: 0;
  text-transform: uppercase;
}

/* Les styles d'accordéon ont été déplacés vers assets/css/components/accordion-custom.css */

/* Styles pour la colonne iframe (droite) */
.competences-iframe {
  width: 60%;
  position: relative;
  padding-left: 2rem;
  padding-right: 5rem;
}

/* Les styles spécifiques à l'iframe ont été déplacés vers assets/css/templates/activite-iframe.css */

/* Styles pour le conteneur principal */
.activite-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Styles pour les titres */
.activite-title {
  font-size: clamp(0.5rem, 0.7rem + 3vw, 2.5rem);
  font-weight: 400;
  margin-bottom: 1rem;
  text-align: center;
}

.activite-subtitle {
  font-size: clamp(0.5rem, 0.4rem + 3vw, 1.5rem);
  font-weight: 400;
  margin-bottom: 3rem;
  text-align: center;
}

/* Style pour la carte Leaflet */
#map {
  width: 93%;
  height: 90vh;
  margin-bottom: 3rem;
}

/* Filtre noir et blanc pour les tuiles de la carte Leaflet */
.leaflet-tile-pane {
  filter: grayscale(100%) contrast(1.1) !important;
  -webkit-filter: grayscale(100%) contrast(1.1) !important;
}

/* Filtre noir et blanc spécifique pour iOS */
@supports (-webkit-touch-callout: none) {
  .leaflet-tile-pane {
    filter: grayscale(1) contrast(1.1) !important;
    -webkit-filter: grayscale(1) contrast(1.1) !important;
  }
}

/* Style pour les marqueurs personnalisés Leaflet */
.custom-leaflet-marker {
  cursor: pointer;
  width: 18px !important;
  height: 18px !important;
}

.custom-leaflet-marker svg {
  width: 100%;
  height: 100%;
}

/* Assurer que les marqueurs sont visibles sur iOS */
.custom-leaflet-marker svg circle {
  stroke: black !important;
  stroke-width: 5 !important;
  fill: white !important;
}

/* Styles pour les clusters de marqueurs */
.marker-cluster {
  background-clip: padding-box;
  border-radius: 50%;
}
.marker-cluster div {
  width: 100%;
  height: 100%;
  margin-left: 0;
  margin-top: 0;
  text-align: center;
  border-radius: 50%;
  color: white;
  font-weight: bold;
  background-color: black;
  display: flex;
  align-items: center;
  justify-content: center;
}
.marker-cluster span {
  line-height: normal;
}

.marker-cluster-small {
  background-color: rgba(0, 0, 0, 0.6);
}
.marker-cluster-medium {
  background-color: rgba(0, 0, 0, 0.7);
}
.marker-cluster-large {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Styles pour les pop-ups personnalisées avec Leaflet */
.leaflet-popup-content-wrapper {
  border-radius: 0;
  padding: 0;
}

.leaflet-popup-content {
  margin: 0;
  font-family: 'Victor Mono', monospace;
}

.leaflet-popup-tip-container {
  display: none; /* Masquer la flèche du popup */
}

/* Style pour le lien d'attribution OpenStreetMap */
.leaflet-control-attribution a {
  color: rgb(61, 61, 61) !important;
}

.square-popup .leaflet-popup-content {
  overflow: hidden;
  width: 250px !important;
}

.custom-popup {
  width: 250px;
  display: block;
  text-decoration: none !important;
  color: inherit;
  user-select: none;
}

.popup-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.popup-image img {
  width: 100%;
  height: 100%;
  display: block; /* Empêche les espaces sous l'image */
  object-fit: cover; /* Assure que l'image couvre la zone sans la déformer */
  object-fit: cover;
}

.popup-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: white;
}

.popup-title {
  color: black;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.popup-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-arrow svg {
  transition: transform 0.2s ease;
}

/* Responsive */
@media (max-width: 768px) {
  /* Styles responsifs pour la section de compétences */
  .competences-section {
    height: auto;
  }
  
  .competences-container {
    flex-direction: column;
  }
  
  .competences-accordion {
    width: 100%;
    padding: 1.5rem;
  }
  
  .competences-iframe {
    width: 100%;
    height: 45vh;
    margin-top: 2rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .competences-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .accordion-header h3 {
    font-size: 0.9rem;
  }
  
  .accordion-content p {
    font-size: 0.8rem;
  }

  .activite-container {
    align-items: start;
  }
  
  /* Styles responsifs pour la section carte */
  .activite-title {
    text-align: left;
    margin-bottom: 0.2rem;
  }
  
  .activite-subtitle {
    text-align: left;
  }
  
  #map {
    height: 70vh;
    width: 100%;
  }
}
