* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins';
  text-decoration: none;
  scroll-behavior: smooth;
  list-style: none;
  
}

header {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%); /* Correction ici */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5rem;
  background-color: rgba(0, 0, 0, 0.8); /* Correction du background */
  backdrop-filter: blur(8px);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 3rem;
  z-index: 1000;
}

/* Container de la liste déroulante */
.dropdown {
  position: relative;
  display: inline-block;
  margin-left: 1rem; /* Ajusté pour mieux s'intégrer */
}

/* Bouton avec uniquement le drapeau */
.dropbtn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Contenu de la liste déroulante */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: rgba(255, 255, 255, 0.9); /* Légère couleur de fond pour la visibilité */
  min-width: 50px;
  z-index: 1;
  border-radius: 8px;
  left: 50%; /* Centré sous le bouton du drapeau */
  transform: translateX(-50%); /* Ajustement pour que la liste soit bien centrée */
  top: 100%; /* Positionné juste en dessous du bouton */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); /* Légère ombre pour la liste */
}

/* Lien à l'intérieur de la liste déroulante */
.dropdown-content a {
  padding: 10px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Afficher la liste déroulante au hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Style pour les drapeaux */
.flag-icon {
  width: 30px;
  height: auto;
  transition: transform 0.3s ease;
}

/* Lien au survol */
.dropdown-content a:hover .flag-icon {
  transform: scale(1.1);
}

/* Cacher le drapeau déjà sélectionné */
.language-option.hidden {
  display: none;
}

/* Media queries pour petites tailles d'écran */
@media (max-width: 768px) {
  .dropdown {
      margin-left: 0;
  }
  .dropdown-content {
      left: 0; /* Correction pour mobile */
      transform: none; /* Pas besoin de centrer sur mobile */
      top: 100%;
      min-width: 100px; /* Taille plus grande pour un meilleur accès sur mobile */
  }
}


.logo {
  color: white;
  font-size: 1.3rem;
  font-weight: 600;
  text-wrap: nowrap;
  transition: 0.3s ease-in-out;

}

.logo:hover {
  transform: scale(1.1);
}

.nav-links{
  display: flex;
  gap: 2rem;
}

li a{
  position: relative;
  color: white;
  font-weight: 300;
}

li a::before{
  position: absolute;
  content: '';
  width: 0;
  left: 0;
  height: 5px;
  top: 25px;
  border-radius: 1rem;
  transition: 0.3s ease-in-out;
  background: linear-gradient(to right, rgb(0, 157, 255), rgb(255, 0, 255));

}

li a:hover::before{
  width: 100%;
}

.visit-btn{
  padding: 0.8rem 1.5rem;
  border-radius: 3rem;
  border: none;
  font-weight: 500;
  font-size: 1rem;
  color: white;
  cursor: pointer;
  text-wrap: nowrap;
  transition: 0.3s ease-in-out;
  background: linear-gradient(to right, rgb(0, 157, 255), rgb(255, 0, 255));

}

.visit-btn:hover{
  background: linear-gradient(to right, rgb(255, 0, 255), rgb(0, 157, 255));
  transform: scale(1.03);
}

#menu-icon{
  font-size: 2rem;
  display: none;
}

section{
  min-height: 100vh;
  padding: 8rem 12%;
  width: 100%;
  position: relative;
}

.about{
  display: flex;
  align-items: center;
  justify-content: center;
  
}

.about .about-container{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10rem;
}

.about img{
  width: 30vw;
  border-radius: 50%;
}

.info-box{
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.info-box h3{
  font-size: 1.0rem;
  font-weight: 500;
  opacity: 0.0;
}

.info-box h1{
  font-size: 4rem;
  font-weight: 600;
}

.info-box span {
  background: linear-gradient(to right, rgb(255, 0, 255), rgb(0, 157, 255));
  background-clip: text;
  color: transparent;
  font-size: 2rem;
}

.info-box p {
  background: black;
  background-clip: text;
  color: transparent;
  font-size: 1rem;
}

.info-box a {
  background: black;
  background-clip: text;
  color: transparent;
  font-size: 1rem;
}


.btn-group{
  display: flex;
  gap: 1rem;
}

.btn {
  border-radius: 3rem;
  padding: 0.5rem 1.5rem;
  border: 2px solid black;
  cursor: pointer;
  font-weight: 500;
  text-wrap: nowrap;
  transition: 0.2s ease-in-out;
}

.btn:hover{
  background-color: black;
  color: white;
}

.socials {
  display: flex;
  gap: 2rem;
}

.socials i{
  font-size: 2.5rem;
  cursor: pointer;
  transition: 0.2s ease-in-out;
}

.socials i:hover{
  transform: scale(1.1)
}

.section-title{
  text-align: center;
  font-size: 4rem;
  font-weight: 600;
  margin-bottom: 3rem;
}

.experience-info{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5rem;

}

.experience img{
  width: 24vw;
  border-radius: 3rem;
}

.grid{
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 2rem;
}

.grid-card{
  border: 2px solid black;
  border-radius: 3rem;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: baseline;
  justify-content: left;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.grid-card:hover{
  transform: scale(1.02);
  background-color: black;
  color: white;
}

.grid-card img {
  width: auto; /* Laisser l'image occuper toute la largeur de la carte */
  height: auto; /* Conserver les proportions de l'image */
  max-width: 390px; /* Taille maximale pour éviter que l'image ne soit trop grande */
  object-fit: contain; /* Assure que l'image garde ses proportions sans être coupée */
  margin-bottom: 1.5rem; /* Espace sous l'image */
  transition: transform 0.3s ease-in-out;
  border-radius: 0;
}


.grid-card span {
  font-size: 1.5rem;
  font-weight: 500;
  background: linear-gradient(to right, #009dff, #ff00ff);
  background-clip: text;
  color: transparent;
}

::-webkit-scrollbar{
  width: 20px;
}

::-webkit-scrollbar-track{
  background-color: rgb(219, 219, 219);
}

::-webkit-scrollbar-thumb{
  background: linear-gradient(to bottom, #009dff, #ff00ff)

}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

.projects-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  border: 2px solid black;
  border-radius: 1rem;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.projects-card img {
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: 0.5rem;
  object-fit: cover;
}

.projects-card:hover {
  background-color: black;
  color: white;
  transform: scale(1.02);
}


.projects-card:hover .btn{
  border: 2px solid white;
  color: white;
}

.projects-card:hover .btn:hover{
  border: 2px solid white;
  background-color: white;
  color: black;
}

.projects-card h3 {
  font-size: 2rem;
  font-weight: 500;
}

.input-box{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2rem;
  margin-top: 5rem;
}

.input-box input{
  position: relative;
  border-radius: 3rem;
  border: 2px solid black;
  padding: 2rem 8rem;
  font-size: 3rem;
}

.input-box input::placeholder{
  font-size: 3rem;
}

.input{
  position: relative;
}

.input i{
  position: absolute;
  font-size: 4rem;
  top: 50%;
  left: 10px;
  transform: translate(50%, -50%);
}

footer{
  bottom: 0;
  left: 0;
  height: 10rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

footer ul{
  display: flex;
  align-items: center;
  gap: 3rem;
}

footer ul li a{
  color: black;
  font-weight: 600;
}

.copyright{
  font-size: 300;
  margin-top: 2rem;
}

/* Skills Section */
.skills-section {
  padding: 50px;
  text-align: center;
  background-color: #fff;
}

.skills-section h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: #333;
}

/* Skill Category */
.skills-category {
  margin-bottom: 50px;
}

.skills-category h3 {
  font-size: 2rem;
  margin-bottom: 34px;
  color: #555;
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Flexible grid */
  gap: 20px;
  justify-items: center; /* Center items horizontally */
}

/* Skill Items (Uniform Image Size) */
.skill-item img {
  width: 80px; /* Same size for all logos */
  height: 80px;
  object-fit: contain; /* Ensures the logo fits within the box */
  transition: transform 0.3s ease-in-out;
}

/* Hover Effect on Logos */
.skill-item img:hover {
  transform: scale(1.1); /* Zoom effect on hover */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .skills-grid {
      grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* Smaller logos on mobile */
      gap: 15px;
  }

  .skills-section h2 {
      font-size: 2rem; /* Smaller title on mobile */
  }

  .skills-category h3 {
      font-size: 1.5rem;
  }

  .skill-item img {
      width: 60px;
      height: 60px; /* Smaller logos on mobile */
  }
}

@media(max-width:1280px){
  header{
    padding: 1rem 2rem;
    gap: 2rem;
  }

  .about .about-container{
    gap: 3rem;
  }

  .experience-info{
    flex-direction: column;
  }

  .input-box input{
    padding: 2rem 5rem;
    font-size: 2.5rem;
  }

  .input input::placeholder{
    font-size: 2.5rem;
  }

  .input-box i{
    font-size: 2.5 rem;
  }

}

@media(max-width:768px){
  header{
    gap: 1rem;
    padding: 1rem 1rem;
  }

  header .logo{
    font-size: 1rem;;
  }

  header .visit-btn{
    display: none;
  }
  .about-container {
    flex-direction: column;
  }
  .input-box input{
    padding: 1rem 2rem;
    font-size: 1.8 rem;
  }

  .input-box input::placeholder{
    font-size: 1.5rem;
  }

  .input-box i{
    display: none;
  }

  .grid{
    grid-template-columns: repeat(1,1fr);
  }
  
  .experience-info img{
    width: 70vw;
  }
}

time {
  display: block;
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 8px;
}

.contact-section {
  padding: 8rem 12%;
  background-color: white;
  text-align: center;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.form-group label {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  padding: 1rem;
  border: 2px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #009dff;
  outline: none;
}

.submit-btn {
  padding: 1rem 2rem;
  background-color: #000000;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: white;
  color: black;
  border: 1px solid white;
  border-color: black;
}

.formations { font-family: Helvetica; }

.formations div {
  width: 300px;
  margin: auto;
}

.formations p {
  border-top: 2px dashed;
  border-color: rgb(0, 0, 0) !important;
  margin:0; padding: 30px;
  counter-increment: section;
  position: relative;
}



.formations p:nth-child(even):before {
  content: counter(section);
  right: 100%; 
  margin-right: -20px;
  position: absolute;
  border-radius: 50%;
  padding: 10px;
  height: 20px;
  width: 20px;
  background-color: rgb(0, 0, 0);
  text-align:center;
  color: white;
  font-size: 110%;
}

.formations p:nth-child(odd):before {
  content: counter(section);
  left: 100%; 
  margin-left: -20px;
  position: absolute;
  border-radius: 50%;
  padding: 10px;
  height: 20px;
  width: 20px;
  background-color: rgb(0, 0, 0);
  text-align:center;
  color: white;
  font-size: 110%;
}



.formations p:nth-child(even) {
  border-left: 2px dashed;
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
  margin-right: 30px; 
  padding-right: 0;
}

.formations p:nth-child(odd) {
  border-right: 2px dashed;
  border-top-right-radius: 30px;
  border-bottom-right-radius: 30px;
  margin-left: 30px; 
  padding-left: 0;
}

.formations p:first-child {
  border-top: 0;
  border-top-right-radius:0;
  border-top-left-radius:0;
}

.formations p:last-child {
  border-bottom-right-radius:0;
  border-bottom-left-radius:0;
}

/* Popup container, hidden by default */
.popup {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
}

/* Popup content */
.popup-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 400px;
  text-align: center;
  border-radius: 10px;
  position: relative;
}

/* Close button */
.close {
  position: absolute;
  top: 10px;
  right: 20px;
  color: #000;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

/* Close button on hover */
.close:hover {
  color: #ff0000;
}








@keyframes scaleAnimation {
  0% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.25);
  }
  100% {
    transform: translateX(-50%) scale(1);
  }
}

@media(max-width:600px){
  header #menu-icon{
    display: block;
  }

  .nav-links{
    position: absolute;
    top: 100%;
    margin-top: 1rem;
    width: 100%;
    padding: 1rem;
    color: white;
    display: flex;
    flex-direction: column;
    text-align: center;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 3rem;
    display: none;
  }

  .nav-links li{
    margin-top: 1.5rem;
    padding: 1rem;
  }

  .nav-links.active{
    display: block;
  }

  header{
    padding: 1rem 5rem;
    gap: 8rem;
  }

  header .logo{
    font-size: 1.5rem;
  }

  .about-container img{
    width: 80vw;
  }
  
  .input-box input{
    padding: 0.5rem 3rem;
    width: 80%;
    font-size: 1.5rem;
  }

  
  .input-box input::placeholder{
    font-size: 1.5rem;
  }

  footer ul{
    gap: 1rem;
  }
  
  
}