.presentation{
  width: var(--width-content);
  justify-content: center;
}

.presentation article {
  display: flex;
  justify-content: left;
  align-items: flex-start;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 2dvh 6dvh;
}

.presentation section{
  width: auto;
  margin-right: 0;
}

.download {
  width: fit-content;
  display: flex;
  flex-direction: column;
}

header h2{
  margin-bottom: clamp(20px, 10dvh, 100px) !important;
}

/* Style pour le lien de l'adresse */
.presentation article h3 a {
  text-decoration: none;
  color: #0056b3;  /* Bleu plus foncé et plus agréable que le bleu par défaut */
}

/* Tooltip pour l'image du bâtiment */
.building-link {
  position: relative;
  display: inline-block;
}

.building-link::after {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 210px;
  background-color: white;
  border: 2px solid #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 2px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
  
  /* Image à l'intérieur du container */
  background-image: url('/images/Batiment.jpg');
  background-size: calc(100% - 16px) calc(100% - 16px);
  background-position: center;
  background-repeat: no-repeat;
  background-origin: content-box;
}

/* Flèche vers le bas du tooltip - collée au container */
.building-link::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 12px solid white;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1001;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.building-link:hover::after,
.building-link:hover::before {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 1050px) {

  .presentation article {
    max-height: min-content;
    gap: 0 6dvh;
  }

  h3 {
    width: auto;
  }

  /* Sur mobile et tablette, afficher l'image directement en-dessous du lien */  .building-link::after {
    position: static;
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 10px 0;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    background-size: cover;
  }

  .building-link::before {
    display: none; /* Masquer la flèche sur mobile et tablette */
  }

  .building-link:hover::after,
  .building-link:hover::before {
    opacity: 1; /* Garde la compatibilité */
  }
}