h2 {
	letter-spacing: 0.5px;
}

#formation-phare {
	font-family: 'Baloo2',Helvetica, Arial, sans serif;
	width: 80%;
	margin-left: 10%;
	clear: both;
	float: left;
	margin-bottom: 50px;
	margin-top: 15px;
}


.gallery {
  position: relative;
  width: 90%;
  max-width: 800px;
  height: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  perspective: 1500px; /* Profondeur */
  margin: auto;
}

.image-container {
  position: relative;
  width: calc(33% - 10px);
  height: 200px;
  text-decoration: none;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.3);
  transform-origin: center;
  transform: translateY(150%) rotateY(90deg) scale(0.8);
  opacity: 0;
  transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1), opacity 1s ease-in-out;
}

.image-container.large {
  width: calc(66% - 10px);
  height: 400px;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-container + .tooltip {
display: none; /* Caché par défaut */ 
}
.image-container:hover + .tooltip {
display: flex; /* Apparaît au survol */ 
}

a {
  opacity: 1;
}
a:hover img {
  opacity: 0.75;
}

.text {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  background: rgba(240, 240, 240, 0.8);
  color: #DA0710;
  text-align: center;
  padding: 10px;
  font-size: 15px;
  font-weight: bold;
}

/* Animation d'apparition fluide */
.image-container.appear {
  transform: translateY(0) rotateY(0) scale(1);
  opacity: 1;
}


.tooltip {
  font-family: "Baloo2", helvetica, arial, sans-serif;
  position: absolute; /* Important pour le positionnement par rapport à l'image */
  color: white;
  border-radius: 15px;
  font-size: 15px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0s linear 0.3s, transform 0.3s ease-in-out;
  z-index: 10; 
  white-space: nowrap;
}

.image-container:hover + .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0); 
}

.image-container + .tooltip {
  left: 0%;
  top: 0%;
  background-color: #333; 
  opacity: 0.2;
  z-index: 1000;
  height: 250px; 
  width: 140px;
  color: #FFF;
  white-space: wrap;
  text-align: justify;
  font-family: "Baloo2", helvetica, arial, sans-serif;
  font-size: 15px;
}

#tooltip-0 {
  left: -357px;
  top: 66px;
  height: 242px;
  width: 363px;
  background-color: rgba(33, 44, 33, 0.7);
  padding: 10px;
} 
#tooltip-1 {
  left: 795px;
  top: 0px;
  height: 200px;
  width: 333px;
  padding: 10px;
  background-color: rgba(33, 44, 33, 0.7);
} 

#tooltip-2 {
  left: -347px;
  top: 414px;
  height: 200px;
  width: 353px;
  background-color: rgba(33, 44, 33, 0.7);
  padding: 10px;
}
#tooltip-3 {
  left: 795px;
  top: 481px;
  height: 252px;
  width: 363px;
  padding: 10px;
  background-color: rgba(33, 44, 33, 0.7);
} 
#tooltip-4 {
  left: -144px;
  top: 830px;
  height: 200px;
  width: 282px;
  background-color: rgba(33, 44, 33, 0.7);
  padding: 10px;
}
#tooltip-5 {
  left: 663px;
  top: 830px;
  height: 200px;
  width: 333px;
  padding: 10px;
  background-color: rgba(33, 44, 33, 0.7);
} 
#tooltip-6 {
  left: -317px;
  top: 1121px;
  height: 242px;
  width: 323px;
  background-color: rgba(33, 44, 33, 0.7);
  padding: 10px;
} 
#tooltip-7 {
  left: 795px;
  top: 1045px;
  height: 200px;
  width: 343px;
  padding: 10px;
  background-color: rgba(33, 44, 33, 0.7);
} 
#tooltip-8 {
  left: -276px;
  top: 1459px;
  height: 200px;
  width: 282px;
  background-color: rgba(33, 44, 33, 0.7);
  padding: 10px;
}
#tooltip-9 {
  left: 795px;
  top: 1540px;
  height: 252px;
  width: 363px;
  padding: 10px;
  background-color: rgba(33, 44, 33, 0.7);
} 
#tooltip-10 {
  left: -185px;
  top: 1875px;
  height: 200px;
  width: 323px;
  background-color: rgba(33, 44, 33, 0.7);
  padding: 10px;
}
#tooltip-11 {
  left: 663px;
  top: 1875px;
  height: 200px;
  width: 333px;
  padding: 10px;
  background-color: rgba(33, 44, 33, 0.7);
} 

.tooltip a, .tooltip a:hover {
	color: #FFF;
	text-decoration: none;
}


#formateurs-exceptions #formation-phare h2 {
  font-family: 'Aquatico', Helvetica, Arial, sans-serif;
  position: relative;
  text-align: center;
  color: #DA0710;
  padding: 0;
  font-size: 21px;
}


/* Responsivité */
@media (min-width: 1500px) {
  .tooltip {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out;
	z-index: 1000;
  }
  
  .image-container:hover + .tooltip {
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 1499px) {

  .image-container + .tooltip {
	display: none; 
  }
  .image-container:hover + .tooltip {
	display: flex;
  }
  
  .image-container {
    position: relative;
    overflow: hidden;
  }

  .tooltip {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    background: rgba(33, 44, 33, 0.95);
    color: white;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
    pointer-events: none;
  }

  .image-container:hover .text {
    opacity: 0;
  }

  .image-container:hover + .tooltip {
    opacity: 1;
    visibility: visible;
  }
  
  #tooltip-0 {
    left: 7px;
    top: 77px;
  } 
  #tooltip-1 {
    left: 540px;
    top: 0px;
  } 

  #tooltip-2 {
	left: -91px;
	top: 415px;
  }
  #tooltip-3 {
    left: 430px;
    top: 491px;
  } 
  #tooltip-4 {
    left: 111px;
  }
  #tooltip-5 {
    left: 408px;
  } 
  #tooltip-6 {
    left: 7px;
    top: 1131px;
  } 
  #tooltip-7 {
    left: 540px;
  } 
  #tooltip-8 {
    left: -21px;
  }
  #tooltip-9 {
    left: 430px;
    top: 1540px;
  } 
  #tooltip-10 {
    left: 70px;
  }
  #tooltip-11 {
    left: 408px;
  } 
}


@media (max-width: 1086px) {
  #formation-phare {
    width: 100%;
    margin-left: 0%;
  }
  .image-container.large {
    width: calc(380px - 10px);
    height: 400px;
  }
  .image-container {
    width: calc(260px - 10px);
    height: 200px;
  }
  #tooltip-0 {
    left: 87px;
  } 
  #tooltip-1 {
    left: 468px;
  } 
  #tooltip-2 {
	left: -20px;
  }
  #tooltip-3 {
	left: 350px;
  } 
  #tooltip-4 {
	left: 111px;
  }
  #tooltip-5 {
	left: 408px;
  } 
  #tooltip-6 {
	left: 87px;
	width: 363px;
  } 
  #tooltip-7 {
	left: 468px;
  } 
  #tooltip-8 {
	left: 51px;
	top: 1459px;
  }
  #tooltip-9 {
	left: 351px;
  } 
  #tooltip-10 {
	left: 70px;
  }
  #tooltip-11 {
	left: 408px;
  } 
}

@media (max-width: 858px) {
  #tooltip-0 {
    left: 70px;
  } 
  #tooltip-1 {
    left: 452px;
  } 
  #tooltip-2 {
	left: -35px;
  }
  #tooltip-3 {
	left: 335px;
  } 
  #tooltip-4 {
	left: 95px;
  }
  #tooltip-5 {
	left: 391px;
  } 
  #tooltip-6 {
	left: 70px;
	width: 363px;
  } 
  #tooltip-7 {
	left: 452px;
  } 
  #tooltip-8 {
	left: 35px;
	top: 1460px;
  }
  #tooltip-9 {
	left: 335px;
  } 
  #tooltip-10 {
	left: 55px;
  }
  #tooltip-11 {
	left: 391px;
  } 
}

@media (max-width: 828px) {
  #tooltip-0 {
    left: 47px;
  } 
  #tooltip-1 {
    left: 427px;
  } 
  #tooltip-2 {
	left: -19px;
	width: 313px;
  }
  #tooltip-3 {
	left: 312px;
  } 
  #tooltip-4 {
	left: 71px;
  }
  #tooltip-5 {
	left: 367px;
  } 
  #tooltip-6 {
	left: 47px; 
  } 
  #tooltip-7 {
	left: 427px; 
	width: 323px;
  } 
  #tooltip-8 {
  	left: 11px; 
  }
  #tooltip-9 {
	left: 312px;
  } 
  #tooltip-10 {
	left: 32px;
  }
  #tooltip-11 {
	left: 367px;
  } 
}

@media (max-width: 777px) {
  #tooltip-0 {
    left: 29px;
  } 
  #tooltip-1 {
    left: 407px;
	width: 313px;
  } 
  #tooltip-2 {
	left: -35px;
	width: 313px;
  }
  #tooltip-3 {
	left: 294px;
  } 
  #tooltip-4 {
	left: 53px;
  }
  #tooltip-5 {
	left: 350px;
  } 
  #tooltip-6 {
	left: 29px; 
  } 
  #tooltip-7 {
	left: 407px; 
	width: 313px;
  } 
  #tooltip-8 {
  	left: -7px;
  }
  #tooltip-9 {
	left: 293px;
  } 
  #tooltip-10 {
	left: 12px;
  }
  #tooltip-11 {
	left: 350px;
  } 
}

@media (prefers-reduced-motion: reduce) {
  .image-container {
    transition: none;
  }
}

Animation
.image-container.appear {
  transform: translateY(0) rotateY(0) scale(1);
  opacity: 1;
}

@media (max-width: 720px) {
  figure.effect-apollo2 h1 {
    margin-top: 15px;
  }	
  .gallery {
    grid-template-columns: 1fr;
    gap: 15px;
	width: 100%;
    align-items: center;
    flex-direction: column
  }

  .image-container.large {
    grid-column: span 1;
    width: calc(420px - 10px);
    height: 400px;
  }
  .image-container {
    width: calc(420px - 10px);
    height: 400px;
  }

  .tooltip {
    left: 50% !important;
    transform: translateX(-50%) translateY(20px) !important;
    height: 400px;
	width: 320px;
  }

  .image-container:hover .tooltip,
  .image-container:focus-within .tooltip {
    transform: translateX(-50%) translateY(0) !important;
  }

  #tooltip-0 {
    left: 393px;
	top: -20px;
	width: 410px;
	height:400px;
  } 
  #tooltip-1 {
    left: 393px;
	top: 395px;
	width: 410px;
	height:400px;
  } 
  #tooltip-2 {
	left: 393px;
	top: 810px;
	width: 410px;
	height:400px;
  }
  #tooltip-3 {
	left: 393px;
	top: 1225px;
	width: 410px;
	height:400px;
  } 
  #tooltip-4 {
	left: 393px;
	top: 1640px; 
	width: 410px;
	height:400px;
  }
  #tooltip-5 {
	left: 393px;
	top: 2055px;
	width: 410px;
	height:400px;
  } 
  #tooltip-6 {
	left: 393px;
	top: 2470px;
	width: 410px;
	height:400px;
  } 
  #tooltip-7 {
	left: 393px;
	top: 2885px;
	width: 410px;
	height:400px;
  } 
  #tooltip-8 {
	left: 393px;
	top: 3300px;
	width: 410px;
	height:400px;
  }
  #tooltip-9 {
	left: 393px;
	top: 3715px;
	width: 410px;
	height:400px;
  } 
  #tooltip-10 {
	left: 393px;
	top: 4130px;
	width: 410px;
	height:400px;
  }
  #tooltip-11 {
	left: 393px;
	top: 4545px;
	width: 410px;
	height:400px;
  }
  #formateurs-exceptions #pre-footer {
    margin-top: 5px;
  }
}

@media (max-width: 555px) {
  figure.effect-apollo2 h1 {
    margin-top: -24px;
  }	
}

@media (max-width: 434px) {
  figure.effect-apollo2 h1 {
    margin-top: -21px;
  }	
  .grid2 figure h1 span {
    font-size: 18px;
  }
  figure.effect-apollo2 p {
    display: none;
  }  
  .image-container.large {
	width: calc(320px - 10px);
	height: 400px;
  }
  .image-container {
	width: calc(320px - 10px);
	height: 400px;
  }
  #tooltip-0 {
    left: 393px;
	top: -20px;
	width: 313px;
  } 
  #tooltip-1 {
    left: 393px;
	top: 395px;
	width: 313px;
  } 
  #tooltip-2 {
	left: 393px;
	top: 810px;
	width: 313px;
  }
  #tooltip-3 {
	left: 393px;
	top: 1225px;
	width: 313px;
  } 
  #tooltip-4 {
	left: 393px;
	top: 1640px; 
	width: 313px;
  }
  #tooltip-5 {
	left: 393px;
	top: 2055px;
	width: 313px;
  } 
  #tooltip-6 {
	left: 393px;
	top: 2470px;
	width: 313px;
  } 
  #tooltip-7 {
	left: 393px;
	top: 2885px;
	width: 313px;
  } 
  #tooltip-8 {
	left: 393px;
	top: 3300px;
	width: 313px;
  }
  #tooltip-9 {
	left: 393px;
	top: 3715px;
	width: 313px;
  } 
  #tooltip-10 {
	left: 393px;
	top: 4130px;
	width: 313px;
  }
  #tooltip-11 {
	left: 393px;
	top: 4545px;
	width: 313px;
  } 
}

@media (max-width: 414px) {
  figure.effect-apollo2 h1 {
    margin-top: -10px;
  }	
}

@media (max-width: 393px) {
  figure.effect-apollo2 h1 {
    margin-top: 4px;
  }	
  figure.effect-apollo2 p {
    display: none;
  }
  .gallery {
    width: 100%;
	margin-left: 6%;
  }
  .image-container.large {
    width: calc(320px - 10px);
  }
  .image-container {
    width: calc(320px - 10px);
  }
  #tooltip-0,
  #tooltip-1,
  #tooltip-2,
  #tooltip-3,
  #tooltip-4,
  #tooltip-5,
  #tooltip-6,
  #tooltip-7,
  #tooltip-8,
  #tooltip-9,
  #tooltip-10,
  #tooltip-11 {
	width: 316px;
  } 
}
@media (max-width: 384px) {
  .image-container.large,
  .image-container  {
	  margin-left: -4px;
  }
@media (max-width: 363px) {
  figure.effect-apollo2 h1 {
    margin-top: -34px;
  }		
  .gallery {
	margin-left: 5.5%;
  }
  .image-container.large,
  .image-container  {
	margin-left: 0px;
    width: calc(312px - 10px);
  }
  #tooltip-0,
  #tooltip-1,
  #tooltip-2,
  #tooltip-3,
  #tooltip-4,
  #tooltip-5,
  #tooltip-6,
  #tooltip-7,
  #tooltip-8,
  #tooltip-9,
  #tooltip-10,
  #tooltip-11 {
	width: 302px;
  } 
}

@media (max-width: 344px) {
  .image-container.large,
  .image-container  {
	margin-left: -3px;
    width: calc(280px - 10px);
  }
  #tooltip-0,
  #tooltip-1,
  #tooltip-2,
  #tooltip-3,
  #tooltip-4,
  #tooltip-5,
  #tooltip-6,
  #tooltip-7,
  #tooltip-8,
  #tooltip-9,
  #tooltip-10,
  #tooltip-11 {
	width: 280px;
  } 
}

@media (max-width: 303px) {
  .image-container.large,
  .image-container  {
	margin-left: 3px;
    width: calc(252px - 10px);
  }
  #tooltip-0,
  #tooltip-1,
  #tooltip-2,
  #tooltip-3,
  #tooltip-4,
  #tooltip-5,
  #tooltip-6,
  #tooltip-7,
  #tooltip-8,
  #tooltip-9,
  #tooltip-10,
  #tooltip-11 {
	margin-left: 1px;
	width: 244px;
  } 
}


/* Accessibilité */
.accessible-mode .image-container:focus {
  outline: 2px solid dodgerblue !important;
  outline-offset: 3px;
}

.accessible-mode .tooltip {
  visibility: visible;
  opacity: 1;
  font-size: 16px;
}
