@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap");

html {
  background: radial-gradient(ellipse at center, #2c2c54, #1a1a2e) no-repeat
    fixed;
  scroll-behavior: smooth;
}

body {
  font-family: "Playfair Display", serif;
  margin: 0;
  padding: 0;
  color: #d9d9d9;
  font-size: 17px;
  padding-top: 96px;
  padding-bottom: 65px;
  min-height: 100vh;
  box-sizing: border-box;
}

.content-box {
  background-color: rgba(13, 46, 32, 0.5);
  border: 1px solid #8e8db3;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

@media (hover: hover) {
  .content-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  }
}

main section {
  padding: 60px 20px;
  max-width: 800px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(142, 141, 179, 0.5);
  scroll-margin-top: 130px;
}

main section#reseaux {
  text-align: center;
}

main section:last-of-type {
  border-bottom: none;
}

main section h2 {
  text-align: center;
  font-size: 2em;
  margin-bottom: 20px;
  color: #ffffff;
}

main section p,
main section li {
  line-height: 1.7;
}

main section p {
  margin-bottom: 1em;
}

.lang-flag {
  height: 1.4em;
  width: auto;
  vertical-align: middle;
  margin-left: 5px;
  border: 1px solid rgba(217, 217, 217, 0.6);
  border-radius: 3px;
}

.tech-icon {
  height: 1.3em;
  width: auto;
  vertical-align: middle;
  margin: 0 3px;
  position: relative;
  top: -1px;
  border: 1px solid rgba(217, 217, 217, 0.6);
  border-radius: 3px;
}

.contact {
  margin: 20px;
  font-size: 1.2em;
  text-align: center;
}

.contact-item {
  margin-bottom: 15px;
}
.contact-item:last-child {
  margin-bottom: 0;
}

.contact .contact-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 400px;
  margin: 0 auto 15px auto;
}

.reseaux-box {
  text-align: left;
  gap: 15px;
  display: inline-block;
}

.competences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 20px;
  text-align: left;
}

.competence-category {
  background-color: rgba(13, 46, 32, 0.5);
  border: 1px solid #8e8db3;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

@media (hover: hover) {
  .competence-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  }
}

.competence-category h3 {
  color: #ffffff;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.3em;
  text-align: center;
}

.competence-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.competence-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1em;
  color: #d9d9d9;
}

.tech-icon,
.lang-flag {
  margin: 0;
}

.contact-button {
  background-color: transparent;
  color: white;
  border: 2px solid #8e8db3;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Playfair Display", serif;
  font-size: 1em;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.contact-button:hover {
  background-color: #8e8db3;
  color: #0d2e20;
}

.contact-form {
  max-width: 600px;
  margin: 10px auto;
  padding: 20px;
  background-color: rgba(13, 46, 32, 0.5);
  border-radius: 8px;
  border: 1px solid #8e8db3;
}

.contact-form h3 {
  text-align: center;
  margin-top: 0;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #d9d9d9;
  color: #1a1a2e;
  box-sizing: border-box;
}

.form-submit-container {
  text-align: center;
}

#confirmation-message {
  text-align: center;
  margin-top: 20px;
  color: #2a9d8f;
  font-size: 1.1em;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.accueil-button-container {
  text-align: center;
  margin: 30px 0;
}

.accueil-button-container button {
  background-color: transparent;
  color: white;
  border: 2px solid #8e8db3;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Playfair Display", serif;
  font-size: 1em;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.accueil-button-container button:hover {
  background-color: #8e8db3;
  color: #0d2e20;
}

.projects-list {
  list-style: none;
  padding: 0 20px;
  text-align: center;
  margin: 2em 0;
}

.projects-list li {
  background-color: rgba(13, 46, 32, 0.5);
  border: 1px solid #8e8db3;
  margin: 20px auto;
  padding: 20px;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  color: #d9d9d9;
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out,
    padding-bottom 0.5s ease-in-out;
  overflow: hidden;
}

.projects-list li.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.projects-list li.active {
  padding-bottom: 20px;
}

.projects-list li.active .project-details {
  max-height: 1000px;
  opacity: 1;
  margin-top: 20px;
}

.projects-list li.active .arrow-icon {
  transform: rotate(180deg);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.arrow-icon {
  color: #d9d9d9;
  transition: transform 0.4s ease;
  flex-shrink: 0;
  margin-left: 15px;
}

.projects-list li h3 {
  margin-top: 0;
  color: #ffffff;
}

.project-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.8s ease-in-out,
    opacity 0.8s ease-in-out,
    margin-top 0.8s ease-in-out;
}

.project-screenshot {
  max-width: 150px;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-top: 15px;
  margin-bottom: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.project-button {
  display: inline-block;
  margin-top: 15px;
  margin-right: 10px;
  background-color: transparent;
  color: white;
  border: 2px solid #8e8db3;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Playfair Display", serif;
  font-size: 0.9em;
  text-decoration: none;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.project-button:hover {
  background-color: #8e8db3;
  color: #0d2e20;
}

.project-button.disabled {
  background-color: #555;
  border-color: #777;
  color: #aaa;
  cursor: not-allowed;
  pointer-events: none;
}

.download-button-container {
  text-align: center;
  margin-top: 20px;
}

.download-button {
  display: inline-block;
  background-color: transparent;
  color: white;
  border: 2px solid #8e8db3;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Playfair Display", serif;
  font-size: 1.1em;
  text-decoration: none;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.download-button:hover {
  background-color: #8e8db3;
  color: #0d2e20;
}

.nav_button {
  margin-left: 500px;
  gap: 13px;
}

.nav_button button,
.nav_button a {
  background-color: transparent;
  color: white;
  border: 2px solid #8e8db3;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Playfair Display", serif;
  font-size: 1em;
  text-decoration: none;
  display: inline-block;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.nav_button button:hover,
.nav_button a:hover {
  background-color: #8e8db3;
  color: #0d2e20;
}

header {
  background-color: #0d2e20;
  color: white;
  padding: 7px 20px;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 3px solid #207a6f;
}

#menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

#menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: white;
  margin: 5px 0;
  transition: all 0.3s ease-in-out;
}

header nav {
  display: flex;
}

#profile-pic-container {
  width: 80px;
  height: 80px;
  perspective: 1000px;
  margin-right: 20px;
}

.profile-pic-flipper {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

#profile-pic-container:hover .profile-pic-flipper {
  transform: rotateY(180deg);
}

#profile-pic-front,
#profile-pic-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 50%;
  border: 3px solid #2a9d8f;
  object-fit: cover;
}

#profile-pic-back {
  transform: rotateY(180deg);
}

header h1 {
  margin: 0;
}

header h2 {
  margin: 0;
  font-weight: normal;
  font-size: 2em;
  margin-left: 350px;
}

footer {
  background-color: #0d2e20;
  color: white;
  text-align: center;
  padding: 2px 0;
  border-top: 2px solid #207a6f;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30px;
  z-index: 1000;
}

footer p {
  margin: 0;
  font-size: 0.9em;
}

footer p {
  margin: 0;
  font-size: 0.8em;
}

#scrollToTopBtn {
  position: fixed;
  bottom: 90px;
  right: 30px;
  z-index: 100;
  border: 2px solid #8e8db3;
  outline: none;
  background-color: transparent;
  color: white;
  cursor: pointer;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;

  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s,
    background-color 0.3s ease,
    color 0.3s ease;
}

#scrollToTopBtn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#scrollToTopBtn:active {
  transform: scale(0.9);
}

@media (max-width: 1920px) {



  .nav_button {
    position: relative;
    margin-left: 0;
    margin-top: 10px;
  }

  #menu-toggle {
    display: block;
    position: absolute;
    top: 20px;
    right: 65px;
  }

  #menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  #menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  #menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .nav_button {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 11rem;
    background-color: #0d2e20;
    position: absolute;
    top: 65px;
    right: 20px;
    padding: 10px 0;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #8e8db3;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition:
      opacity 0.3s ease,
      transform 0.3s ease,
      visibility 0.3s;
  }

  .nav_button.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  header {
    flex-direction: column;
    align-items: auto;
    position: static;
    padding: 10px 0 15px 0;
    padding-bottom: 15px;
    text-align: center;
  }

  header nav {
    width: 100%;
  }

  header h2 {
    margin-left: 0;
    font-size: 1.5em;
  }

  .nav_button {
    position: relative;
    margin-left: 0;
    margin-top: 10px;
  }

  #menu-toggle {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
  }

  #menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  #menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  #menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .nav_button {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 11rem;
    background-color: #0d2e20;
    position: absolute;
    top: 65px;
    right: 20px;
    padding: 10px 0;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #8e8db3;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition:
      opacity 0.3s ease,
      transform 0.3s ease,
      visibility 0.3s;
  }

  .nav_button.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  body {
    padding-top: 20px;
  }

  #scrollToTopBtn {
    bottom: 70px;
    right: 20px;
  }

  @media (hover: hover) and (pointer: fine) {
    #scrollToTopBtn:hover {
      background-color: #8e8db3;
      color: #0d2e20;
    }
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .nav_button {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav_button button,
  .nav_button a {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
  }

  .projects-list li {
    padding-left: 15px;
    padding-right: 15px;
  }

  .project-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .accueil-button-container {
    text-align: center;
    margin: 20px 0;
  }
}

@media (max-width: 768px) {
  header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  #profile-pic-container {
    perspective: 1000px;
  }

  .profile-pic-flipper {
    transform-style: preserve-3d;
    transition: transform 0.8s;
    position: relative;
    width: 100%;
    height: 100%;
  }

  #profile-pic-container:hover .profile-pic-flipper {
    transform: rotateY(180deg);
  }

  #profile-pic-front,
  #profile-pic-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  #profile-pic-back {
    transform: rotateY(180deg);
  }
}
