/* ========= Réinitialisation et Styles Globaux ========= */
 * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 1000;
}

header nav a {
  color: white;
  margin-left: 20px;
  text-decoration: none;
}

header h1 {
    font-size: 1.5rem;
    color: white;
}

nav a:hover {
    color: #EFBF9B;
}

.hero {
  position: relative;
  width: 100%;
  height: auto;
  background-color: #7D8491;
}

.hero-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

html, body {
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  background-color: #7D8491;
  scroll-behavior: smooth;
}

body {
  color: #fff;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: #7D8491;
}


/* ========= Carrousel 3D ========= */

#carrousel {
  padding-top: 10%; /* espace entre hero et carrousel */
  padding-bottom: 10%;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}


.icon-cards {
  position: relative;
  /* Utilisation des unités vw pour la responsivité */
  width: 50vw;
  height: 20vh;
  max-width: 380px;
  max-height: 250px;
  perspective: 250vh;
  transform-origin: center;
  margin-bottom: 2rem;
}
/* Contenu intérieur du carrousel */
.icon-cards__content {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-origin: center;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition: transform 0.8s cubic-bezier(0.40, 0, 0.175, 1);
}

/* ========= Chaque item (slide) du carrousel ========= */

.icon-cards__item {
  position: absolute;
  overflow: hidden;
  object-fit: cover;
  top: 50%;
  left: 50%;
  width: 60vw;
  height: 40vh;
  max-width: 600px;
  max-height: 400px;
  border-radius: 6px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Positionnement et couleurs pour chaque slide */
.icon-cards__item:nth-child(1) {
  background-image: url('../Images/qui-suis-je.jpg');
  background-size: cover;
  background-position: 0 -140px;
  transform: translate(-50%, -50%) rotateY(0deg) translateZ(35vw);
}
.icon-cards__item:nth-child(2) {
  background-image: url('../Images/Contact.png');
  background-size: cover;
  background-position: center;
  transform: translate(-50%, -50%) rotateY(120deg) translateZ(35vw);
}
.icon-cards__item:nth-child(3) {
  background-image: url('../Images/mes-projets.png');
  background-size: cover;
  background-position: center;
  transform: translate(-50%, -50%) rotateY(240deg) translateZ(35vw);
}


/*Hover*/

.icon-cards__item .card-text {
  position: relative;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.4s ease-in-out;
  color: #fff;
}

.icon-cards__item::after {
  content: "";
  top:0;
  left: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 0.4s ease-in-out;
  z-index: 1;
}

.icon-cards__item:hover::after {
  background-color: rgba(0, 0, 0, 0.5);
}

.icon-cards__item:hover .card-text {
  opacity: 1;
}

.icon-cards__item:nth-child(2):hover {
  position: absolute;
  z-index: 3;
  background-color: rgba(0, 0, 0, 0.5);
  transition: opacity 0.4s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.icon-cards__item:nth-child(3):hover {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.5);
  transition: opacity 0.4s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

/*CSS Navigation Carrousel*/

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  z-index: 5;
}
.carousel-control.prev { left: -200px; }
.carousel-control.next { right: -200px; }

.carousel-indicators {
  position: absolute;
  bottom: -30px;
  width: 100%;
  text-align: center;
  z-index: 5;
}
.carousel-indicators button {
  width: 10px;
  height: 10px;
  margin: 0 5px;
  background-color: #bbb;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.carousel-indicators .active {
  background-color: #fff;
}

footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid #C0C5C1;
}