@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,500;0,700;0,800;1,200;1,300&display=swap");

:root {
  --var-back: #451952;
  --var-secondary: rgb(144, 110, 181);
  --var-bg: #ebe4d1;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--var-back);
  background-attachment: fixed;
  padding: 1rem;
  box-shadow: 0 2px 10px grey;
  position: sticky;
  top: 0;
  z-index: 100;
}

header nav ul {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4rem;
  list-style: none;
}

header label {
  font-size: 20px;
  font-weight: 800;
}

header label a {
  color: white;
  text-decoration: none;
  text-transform: capitalize;
}

header label a span {
  animation: lelo 3s infinite;
}

@keyframes lelo {
  0% {
    color: rgb(255, 255, 255);
  }

  30% {
    color: red;
  }

  60% {
    color: rgb(255, 255, 255);
  }

  100% {
    color: red;
  }
}

header nav ul a {
  font-size: 16px;
  text-transform: capitalize;
  color: white;
  text-decoration: none;
  font-weight: 800;
  position: relative;
}

header nav ul a:hover {
  color: rgba(255, 255, 255, 0.823);
}

header nav ul a::after {
  content: "";
  height: 3px;
  top: -10px;
  left: 0;
  border-radius: 5px;
  width: 0%;
  position: absolute;
  color: red;
  transition: all 0.1s ease-in;
}

header nav ul a:hover::after {
  width: 100%;
  background: rgba(255, 0, 0, 0.679);
}

header nav ul a::before {
  content: "";
  height: 3px;
  width: 0px;
  border-radius: 5px;
  bottom: -10px;
  position: absolute;
  transition: all 0.6s ease-in;
}

header nav ul a:hover:before {
  width: 100%;
  background: white;
}

header button {
  outline-color: none;
  padding: 0.3rem 1rem;
  border-radius: 5px;
  gap: 1rem;
  border: 2px solid white;
  transition: 0.6s ease-in;
}

header button a {
  font-size: 16px;
  text-transform: capitalize;
  color: var(--var-back);
  text-decoration: none;
  font-weight: 600;
}

header button:hover a {
  color: white;
}

header button:hover {
  transform: scale(1.1);
  background: var(--var-back);
}

/* Main Content */
main {
  background: var(--var-bg);
  padding: 0.2rem;
}

/* Section 1 */
.section1 {
  height: 40vh;
  background: white;
  border-radius: 10px;
}

.section1 .container1 {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.2rem;
}

.section1 .container1 .images {
  width: 200px;
  height: 100px;
  position: relative;
}

.section1 .container1 .images img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: logo 1s ease-in infinite;
}

@keyframes logo {
  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1.1);
  }
}

.section1 .container1 .containerText {
  width: 80%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 1rem;
}

.section1 .container1 .containerText h2 {
  font-weight: 600;
  color: var(--var-back);
  margin: 1rem;
}

.section1 .container1 .containerText p {
  text-align: center;
  font-size: 16px;
  color: gray;
}

.section2 {
  margin: 2rem 4rem;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.section2 .textGalery {
  margin: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  color: var(--var-back);
}

.section2 .imgGalery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.section2 .imgGalery .coverImage {
  width: 270px;
  height: 330px;
  border-radius: 10px;
  position: relative;
  transition: all 0.8s ease-in;
}

.section2 .imgGalery .coverImage img {
  height: 100%;
  width: 100%;
  border-radius: 10px;
  position: absolute;
}

.section2 .imgGalery .coverImage::before {
  content: "";
  height: 0%;
  width: 0%;
  bottom: -100px;
  left: 0px;
  border-radius: 5px;
  z-index: 50;
  position: absolute;
}

.section2 .imgGalery .coverImage:hover::before {
  bottom: 0px;
  transform: translateY(0);
  height: 100%;
  width: 100%;
  background: rgba(105, 3, 206, 0.562);
  transform: scale(1.1);
}

.section3 {
  background-color: red;
  width: 100%;
  height: auto;
  padding: 1rem;
  background: var(--var-back);
  border-radius: 10px;
}

.section3 .container2 {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 1rem;
}

.section3 .container2 .about {
  width: 350px;
  padding: 2rem;
}

.section3 .container2 .about h2 {
  font-weight: 600;
  color: white;
  margin-bottom: 20px;
}

.section3 .container2 .about p {
  font-size: 16px;
  color: whitesmoke;
}

.section3 .forms {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.section3 .forms h2 {
  margin-top: 10px;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.section3 .forms form {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.section3 .forms form input,
textarea {
  width: 110%;
  padding: 0.8rem 2.5rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  outline: none;
  border: 1px solid wheat;
}

.section3 .forms form input:focus,
textarea:focus {
  border: 1px solid var(--var-bg);
}

.section3 .forms form textarea {
  height: 100px;
}

.section3 .forms form button {
  width: 110%;
  outline-color: none;
  padding: 0.5rem 2rem;
  border-radius: 5px;
  gap: 1.2rem;
  border: 2px solid white;
  transition: 0.2s ease-in;
}

.section3 .forms form button a {
  font-size: 16px;
  text-transform: capitalize;
  color: var(--var-back);
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}

.section3 .forms form button:hover a {
  color: var(--var-bg);
}

.section3 .forms form button:hover {
  background: var(--var-back);
  transform: scale(1);
}

.section4 {
  position: fixed;
  right: 0;
  bottom: 30%;
  background: var(--var-back);
  padding: 1rem 0.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.section4 i {
  padding: 0.5rem;
  background: var(--var-bg);
}

.section4 i:hover {
  background: gray;
}

footer {
  height: 20vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  color: gray;
}

/* Ajout des media queries pour différentes tailles d'écran */
@media screen and (max-width: 920px) {
  .section2 .imgGalery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  /* Ajouter des styles pour les écrans jusqu'à 768px de large */
  header nav ul {
    display: none;
  }

  header label a {
    font-size: 18px;
  }

  .section1 {
    height: auto;
  }

  .section1 .container1 {
    flex-direction: column-reverse;
  }

  .section2 .imgGalery {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  footer {
    height: auto;
    padding: 1rem;
    text-align: center;
  }
}

@media screen and (max-width: 560px) {
  .section2 .imgGalery {
    grid-template-columns: repeat(1, 1fr);
  }

  .section3 .container2 {
    flex-direction: column;
  }

  .section3 {
    height: auto;
  }
}

/* page blog */

.containerBlog1 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.containerBlog1 .container {
  display: flex;
  flex-direction: column;
  justify-items: center;
  align-items: center;
  margin-right: 5px;
}

.containerBlog1 .container .images {
  width: 300px;
  height: 240px;
}

.containerBlog1 .container .images img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  box-shadow: 2px 3px 10px gray;
}

.containerBlog1 .container .containerText {
  display: flex;
  flex-direction: column;
  justify-items: center;
  align-items: center;
}

.containerBlog1 .container .containerText h2 {
  font-weight: 600;
  color: var(--var-back);
  margin: 10px;
  text-align: center;
}

.containerBlog1 .container .containerText p {
  color: var(--var-back);
  text-align: center;
  color: gray;
}

@media screen and (max-width: 970px) {
  .containerBlog1 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 650px) {
  .containerBlog1 {
    grid-template-columns: repeat(1, 1fr);
  }

  .containerBlog1 .container .images {
    width: 260px;
    height: 220px;
  }
}

/* page projet  */

.sectionProjet {
  background: var(--var-back);
  border-radius: 10px;
}

.sectionProjet .containerProjet {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.sectionProjet .containerProjet .about {
  width: 350px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sectionProjet .containerProjet .about h2 {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin: 20px;
}

.sectionProjet .containerProjet .about img {
  width: 300px;
  height: 320px;
  border-radius: 10px;
}

.sectionProjet .containerProjet .about p {
  margin: 25px;
  text-align: center;
  font-size: 16px;
  color: whitesmoke;
}

.sectionProjet .forms {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.sectionProjet .forms h2 {
  text-align: center;
  margin: 20px;
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.sectionProjet .forms form {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.sectionProjet .forms form input,
textarea {
  width: 110%;
  padding: 0.8rem 3rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  outline: none;
  border: 1px solid wheat;
}

.sectionProjet .forms form input:focus,
textarea:focus {
  border: 1px solid var(--var-bg);
}

.sectionProjet .forms form textarea {
  height: 200px;
}

.sectionProjet .forms form button {
  width: 110%;
  outline-color: none;
  padding: 0.5rem 2rem;
  border-radius: 5px;
  gap: 1.2rem;
  border: 2px solid white;
  transition: 0.2s ease-in;
}

.sectionProjet .forms form button a {
  font-size: 16px;
  text-transform: capitalize;
  color: var(--var-back);
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}

.sectionProjet .forms form button:hover a {
  color: var(--var-bg);
}

.sectionProjet .forms form button:hover {
  background: var(--var-back);
  transform: scale(1);
}

@media screen and (max-width: 650px) {
  /* Ajouter des styles pour les écrans jusqu'à 480px de large */
  .sectionProjet .containerProjet .about img {
    width: 250px;
    height: auto;
  }

  /* pour la page projet  */
  .sectionProjet .containerProjet {
    flex-direction: column;
  }
}

/* Ajoutez les propriétés d'animation pour votre section */
.animate {
  opacity: 0;
  /* La section est initialement invisible */
  transform: translateY(20px);
  /* Décalage initial */
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* Lorsque la section devient visible, appliquez cette animation */
.animate.active {
  opacity: 1;
  transform: translateY(0);
}

/* Animation initiale */
.animate-initial {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* Animation lorsqu'elle est dans la vue */
.animate-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Lorsque l'élément devient invisible, annulez l'animation */
.animate-initial:not(.visible) {
  opacity: 0;
  transform: translateY(20px);
}

/* Ainmmssssssssssssssssssssss */
/* [data-animation="lelo"]{
    opacity: 1;
    transform: translateY(100%);
    transition:  .6s ease-in 0.3;

} */

[data-animation="lelo1"] {
  opacity: 0;
  transform: translateY(100%);
  transition: 0.6s ease-in 0.3s;

  --opacity: 1;
  --transform: translateY(0);
}

[data-animation="lelo2"] {
  opacity: 0;
  transform: translate(100%);
  transition: 0.6s ease-in 0.3s;

  --opacity: 1;
  --transform: translate(0);
}

[data-animation="lelo3"] {
  opacity: 0;
  transform: translateX(-100%);
  transition: 0.6s ease-in 0.3s;

  --opacity: 1;
  --transform: perspective(0);
}

[data-animation="lelo4"] {
  opacity: 0;
  transform: translateX(100%);
  transition: 0.6s ease-in 0.3s;

  --opacity: 1;
  --transform: scale(1);
}

[data-animation="lelo5"] {
  opacity: 0;
  transform: translateY(100%);
  transition: 0.6s ease-in 0.3s;

  --opacity: 1;
  --transform: translateY(0);
}

.unset {
  opacity: var(--opacity);
  transform: var(--transform);
}
