@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap");

* {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  scroll-behavior: smooth;
  box-sizing: border-box;
}

body {
  background: linear-gradient(180deg, #0a3269, #501929);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Scrollbar */
*::-webkit-scrollbar {
  width: 10px;
}

*::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #0a3269, #2d264d, #3c2141, #4a1b35, #501929);
}

*::-webkit-scrollbar-thumb {
  background-color: #adadad;
  border-radius: 5px;
  border: 5px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: #7e7c7c;
}

/* ===================
   HEADER / NAVIGATION
=================== */
.nav {
  width: 100%;
  position: relative;
  z-index: 9;
  background-position: center;
  background-size: cover;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6% 3%;
  animation: slide-top 1500ms linear;
}

.nav-links {
  flex: 1;
  text-align: center;
}

.nav-links ul {
  list-style: none;
  padding: 0;
}

.nav-links ul li {
  display: inline-block;
  padding: 6px 12px;
}

.nav-links ul li a {
  color: whitesmoke;
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  transition: color 0.3s;
}

.nav-links ul li a:hover {
  color: #417ec5;
}

.nav-links ul li::after {
  content: "";
  width: 0%;
  height: 1.5px;
  background: whitesmoke;
  display: block;
  margin: auto;
  transition: 0.4s;
}

.nav-links ul li:hover::after {
  width: 100%;
}

@keyframes slide-top {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* Bouton hamburger pour mobile */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 10px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: whitesmoke;
  margin: 3px 0;
  transition: 0.3s;
}

.hamburger a {
  text-decoration: none; /* enlève le soulignement */
}

.hamburger a:hover,
.hamburger a:focus,
.hamburger a:active {
  text-decoration: none; /* même au survol ou au clic */
}

/* ===================
   BOUTON SCROLL TOP
=================== */
.go-top-btn {
  position: fixed;
  bottom: 35px;
  right: 35px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: none;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s, transform 0.3s;
  animation: fade-inout 3s;
  background: linear-gradient(180deg, #3d6192, #963f57);
  z-index: 999;
}

.go-top-btn:hover {
  transform: translateY(-5px);
}

.go-top-btn img {
  width: 30px;
  height: 40px;
  filter: invert(1);
}

@keyframes fade-inout {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* ===================
   SECTION ACCUEIL
=================== */
.homepage {
  margin-top: 10%;
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
}

.HomePage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.HomePage img {
  width: 150px;
}

.HomePage h1 {
  font-size: 3em;
  color: whitesmoke;
}

.HomePage p {
  color: whitesmoke;
  font-size: 16px;
  font-weight: normal;
  width: 80%;
}

.HomePage .button {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  width: 100%;
}

.HomePage button {
  transition: 0.3s linear;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
  width: auto;
  padding: 12.8px 19.2px;
  border-radius: 15px;
  font-size: 18px;
  border: none;
  background-color: #417ec5;
  color: whitesmoke;
  cursor: pointer;
}

.HomePage button:hover {
  transform: scale(1.1);
  background-color: #2d5a8f;
}

/* ===================
   SECTION À PROPOS
=================== */
.about {
  width: 92%;
  margin: 1% auto;
  padding: 15px;
  color: whitesmoke;
  border-radius: 7.5px;
}

.about-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.about-container img {
  width: 350px;
  border-radius: 7.5px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.about-text {
  flex: 1;
}

.about h1 {
  font-size: 18px;
  margin-bottom: 15px;
}

.about p {
  font-size: 16.5px;
  line-height: 1.6;
}

/* ===================
   SECTION PROJETS
=================== */
.projects {
  width: 92%;
  margin: 1% 0;
}

.ProjetClass {
  animation: fade-inout 4s;
}

.projects-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.projects-container h1 {
  font-size: 30px;
  color: whitesmoke;
}

.projects-links {
  width: 100%;
}

.projects-links ul {
        margin-top: 10px;
  list-style: none;
  text-align: center;
  padding: 0;
}

.projects-links ul li {
  display: inline-block;
  padding: 6px 12px;
  font-size: 19px;
  color: whitesmoke;
  cursor: pointer;
  transition: color 0.3s;
}

.projects-links ul li:hover {
  color: #417ec5;
}

.projects-links .ProjetClass {
  display: none;
  animation: fade-inout 4s;
  color: whitesmoke;
  margin-top: 15px;
  padding: 20px;
}

.projects-links .ProjetClass h1 {
  text-align: center;
  margin: 5% 0 20px 0;
}

.projects-links .ProjetClass p {
  text-align: center;
  margin-bottom: 30px;
  line-height: 1.6;
}

.projects-links .icons-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  margin-bottom: 20px;
}

.projects-links i {
  font-size: 25px;
  margin: 2px 2px;
  transition: 0.2s linear;
}

.projects-links i:hover {
  transform: scale(1.2);
}

/* Couleurs des icônes */
.projects-links .fa-html5 { color: orange; }
.projects-links .fa-css3-alt { color: #5e5edf; }
.projects-links .fa-php { color: #831bb3; }
.projects-links .fa-js { color: yellow; }
.projects-links .fa-database { color: #00b100; }
.projects-links .fa-java { color: #fc2828; font-size: 30px; }
.projects-links .fa-react { color: #61dafb; }

/* Images des projets */
.projects-links img {
  width: 30%;
  margin: 25px;
  transition: 0.2s linear;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.projects-links img:hover {
  transform: scale(1.1);
}

.projects-links .center-image {
  display: block;
  margin: 25px auto;
}

/* Projet 5 styles spéciaux */
.projects-links #div5 h1 {
  color: #551a8b;
  margin-top: 5%;
}

.projects-links #div5 h1 a {
  color: inherit;
  text-decoration: none;
}

.projects-links #div5 p {
  text-align: center;
  font-size: 15pt;
}

/* Popup des images */
.popup-img {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  z-index: 1000;
}

.popup-img span {
  position: absolute;
  top: 0;
  right: 10px;
  font-size: 40px;
  font-weight: bolder;
  color: #fff;
  cursor: pointer;
  z-index: 100;
}

.popup-img img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1.5px solid #fff;
  border-radius: 3.75px;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* ===================
   SECTION COMPÉTENCES
=================== */
.skills {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
}

.skills-container {
  height: auto;
}

.skills-container h1 {
  color: whitesmoke;
  font-size: 30px;
  text-align: center;
  margin-bottom: 20px;
}

.skills-icons {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.skills-row {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 15px 30px;
}

.skill-item img {
  height: 50px;
  margin: 2.5px 0;
  transition: 0.2s linear;
}

.skill-item img:hover {
  transform: scale(1.2);
}

.skill-item span {
  text-align: center;
  font-weight: 500;
  font-size: 14.25px;
  color: whitesmoke;
}

/* ===================
   SECTION CONTACT
=================== */

@media screen and (min-width: 1025px) {

    .projects-links .ProjetClass h1 {
  text-align: center;
  margin: 1% 0 20px 0;
}

.projects-container h1 {
margin-top: -50px;
  font-size: 30px;
  color: whitesmoke;
}
.contact-form {
  display: flex;
  justify-content: space-between; /* Espace entre texte et formulaire */
  align-items: flex-start;
  width: 100%;
  gap: 50px;
}

.contact-text {
  flex: 1; /* prend la moitié gauche */
  max-width: 50%;
}

.contact-right {
  flex: 1;
  max-width: 50%;
  display: flex;
  justify-content: flex-start; /* aligne à gauche dans la colonne */
  align-items: center;
  padding-left: 400px; /* décale le form vers la droite */
}

.contact-form form {
  width: 100%;
  max-width: 400px;
}
}

.contact {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 95%;
  margin: 0;
}

.contact-container h1 {
  color: whitesmoke;
  font-size: 30px;
  text-align: center;
}

.contact-form {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  margin-right: 100px;
  gap: 50px;
}

.contact-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 50%;
}

.contact-text h2 {
  color: whitesmoke;
  margin-bottom: 2%;
  margin-left: 100px;
  width: 50%;
}

.contact-text p {
  color: whitesmoke;
  margin-left: 100px;
  width: 50%;
  line-height: 1.6;
  text-align: left;
}

.contact-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 150px;
  margin-left: 50px;
}

.contact-icon img {
  width: 37.5px;
  margin-right: 7.5px;
  transition: 0.2s linear;
}

.contact-icon img:hover {
  transform: scale(1.1);
}

.contact-right {
  display: flex;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.contact-form form {
  width: 100%;
  max-width: 400px;
}

.contact-form label {
  font-size: 13.5px;
  margin-left: 3.75px;
  color: whitesmoke;
}

.contact-form input {
  padding: 9px 15px;
  margin: 7.5px 0 30px 0;
  height: 37.5px;
  width: 330px;
  border: none;
  border-radius: 10px;
  box-shadow: 2px 1.5px 4px rgba(0, 0, 0, 0.2);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus {
  outline: none;
  border: 2px solid #f0d;
  box-shadow: 0 0 7.5px rgba(212, 0, 255, 0.8);
}

.text-area {
  display: block;
  margin-top: 7.5px;
  height: 150px;
  width: 350px;
  padding: 9px 15px;
  font-size: 14px;
  resize: none;
  overflow: hidden;
  overflow-wrap: break-word;
  border: none;
  border-radius: 10px;
  box-shadow: 2px 1.5px 4px rgba(0, 0, 0, 0.2);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form textarea:focus {
  outline: none;
  border: 2px solid #f0d;
  box-shadow: 0 0 7.5px rgba(212, 0, 255, 0.8);
}

.contact-form button {
  margin: 18.75px 3.75px 0 3.75px;
  padding: 0.8em 1.4em;
  border-radius: 15px;
  font-size: 12px;
  background-color: #5e2294;
  color: whitesmoke;
  border: none;
  cursor: pointer;
  transition: 0.3s linear;
  box-shadow: 2px 1.5px 4px rgba(0, 0, 0, 0.2);
}

.contact-form button:hover {
  transform: scale(1.1);
  background-color: #592b85;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #999;
  font-style: italic;
  margin-top: 50px;
}

/* ===================
   FOOTER
=================== */
.footer {
  width: 100%;
  text-align: center;
}

footer p {
  color: whitesmoke;
  margin-bottom: 30px;
  text-align: center;
}

/* ===================
   SÉPARATEURS HR
=================== */
hr {
  width: 95%;
  margin: 4% auto;
  height: 1px;
  border: none;
  background-color: #ccc;
}

hr.invisible {
  width: 55%;
  height: 0.75px;
  background-color: transparent;
}

/* ===================
   MEDIA QUERIES RESPONSIVE
=================== */

/* Mobile et tablettes (1024px et moins) */
@media screen and (max-width: 1024px) {
  /* Navigation mobile */
  .hamburger {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: linear-gradient(180deg, #0a3269, #501929);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transition: left 0.3s ease;
    z-index: 8;
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-links ul {
    flex-direction: column;
    width: 100%;
    padding-top: 50px;
  }
  
  .nav-links ul li {
    display: block;
    width: 100%;
    text-align: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-links ul li a {
    font-size: 16px;
  }
  
  /* Animation hamburger */
  .hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }
  
  /* Accueil */
  .homepage {
    margin-top: 5%;
    padding: 0 15px;
  }
  
  .HomePage h1 {
    font-size: 2em;
  }
  
  .HomePage p {
    font-size: 16px;
    width: 95%;
  }
  
  .HomePage button {
    font-size: 16px;
    padding: 12px 24px;
  }
  
  /* À propos */
  .about {
    width: 95%;
    padding: 20px 15px;
  }
  
  .about-container {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
  
  .about-container img {
    width: 280px;
  }
  
  .about h1 {
    font-size: 24px;
  }
  
  .about p {
    font-size: 16px;
  }
  
  /* Projets */
  .projects {
    width: 95%;
  }
  
  .projects-container h1 {
    font-size: 24px;
  }
  
  .projects-links ul li {
    display: block;
    margin: 10px 0;
    font-size: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
  }
  
  .projects-links img {
    width: 80%;
    margin: 15px auto;
    display: block;
  }
  
  .projects-links .ProjetClass {
    padding: 15px;
  }
  
  .projects-links .ProjetClass h1 {
    font-size: 22px;
  }
  
  .projects-links .ProjetClass p {
    font-size: 16px;
  }
  
  .projects-links .icons-container {
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .projects-links i {
    font-size: 30px;
  }
  
  /* Compétences */
  .skills-container h1 {
    font-size: 24px;
  }
  
  .skills-row {
    justify-content: center;
    gap: 10px;
  }
  
  .skill-item {
    margin: 8px 15px;
    min-width: 80px;
  }
  
  .skill-item img {
    height: 40px;
  }
  
  .skill-item span {
    font-size: 12px;
  }
  
  /* Contact */
  .contact {
    width: 100%;
  }
  
  .contact-container h1 {
    font-size: 24px;
  }
  
  .contact-form {
    flex-direction: column;
    gap: 30px;
    margin: 0;
    padding: 0 20px;
    align-items: center;
  }
  
  .contact-text {
    width: 100%;
    text-align: center;
  }
  
  .contact-text h2,
  .contact-text p {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }
  
  .contact-icon {
    width: 100%;
    margin-left: 0;
    flex-direction: row;
    margin-bottom: 30px;
  }
  
  .contact-form input,
  .text-area {
    width: 100%;
    max-width: 100%;
  }
  
  .contact-form button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
  }
  
  /* Éléments utilitaires */
  .go-top-btn {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  
  .popup-img img {
    max-width: 95%;
    max-height: 80%;
  }
  
  .popup-img span {
    font-size: 35px;
    right: 15px;
    top: 15px;
  }
}