/* variables */
:root {
  --primary-color: #008b85;
  --secondary-color: #c74d00;
  --accent-color: #fee7b3;
  --background-color: #f3f4f6;
  --text-color: #333333;
  --white: #ffffff;
  --button-hover-color: #e06f28;
  --button-text-color: #111111;
}

/* base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Funnel Sans', sans-serif;
  color: var(--text-color);
  background-color: var(--primary-color);
  line-height: 1.6;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* typo titres */
h1, h2, h3 {
  font-family: 'Delius', cursive;
  color: var(--secondary-color);
  font-size: 2rem;
}

/* header et navigation */
header {
  width: 100%;
  background: var(--primary-color);
  box-shadow: none;
  padding: 10px 0;
}

header nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

header nav ul li {
  margin: 10px 0;
}

header nav ul li a {
  text-decoration: none;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
  font-size: 1.1rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

header nav ul li a:hover {
  color: var(--secondary-color);
  transform: scale(1.1);
}

/* navbar*/
.navbar {
  position: fixed;
  width: 100%;
  top: 0;
  background-color: var(--primary-color);
  padding: 1rem 2rem;
  box-shadow: none;
  transition: all 0.3s ease-in-out;
  z-index: 1000;
}

/* effet au scroll */
.navbar.scrolled {
  background-color: #00b7af; 
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(0); 
  padding: 0.8rem 1.5rem; 
}

/* masque la nav bar de navigation */
.nav-list {
  position: absolute;
  top: 60px;
  left: 0;
  width: 100%;
  background-color: #00b7af;
  padding: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease-in-out, height 0.3s ease-in-out, visibility 0.3s ease-in-out;
  opacity: 0;
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

/* affiche le menu quand il est activer */
.nav-list.open {
  opacity: 1;
  visibility: visible;
  height: auto;
  padding: 1rem 0;
  background-color: var(--primary-color);
}

.nav-list li {
  text-align: center;
}

.nav-list li a {
  font-size: 1.2rem;
  display: block;
  padding: 0.5rem 0;
}

/* bouton afficher/masquer la nav bar */
.menu-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
}

/* bouton des liens sociaux */
.about-buttons {
  display: flex;
  flex-wrap: wrap; 
  justify-content: center;
  gap: 15px; 
}

.about-buttons a {
  flex: 1 1 45px; 
  max-width: 60px; 
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* section about */
.about-text h2 {
  font-size: 2.5rem;
}

.about-container {
  display: flex;
  justify-content: center; 
  align-items: center;
  text-align: center;
  flex-direction: column;
  padding: 20px;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 30px; 
}

/* section à propos */
.about-hidden {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-in-out, transform 1s ease-in-out;
  text-align: center;
  padding: 50px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.about-hidden.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-section {
  padding: 4rem 2rem;
  text-align: center;
  background-color: var(--accent-color);
}

.about-title {
  font-size: 2.5rem; 
  text-align: center;
  margin-bottom: 3rem; 
}

.about-wrapper {
  display: flex;
  flex-direction: column; 
  align-items: center;
  text-align: center;
  gap: 2rem;
}

/* logo cercle */
.about-logo {
  width: 90%; 
  max-width: 320px;
}

.about-img {
  width: 100%;
  height: auto;
}

/* texte à propos */
.about-text-container {
  width: 95%;
  text-align: left;
  font-size: 1rem;
  line-height: 1.7;
  max-width: 700px; 
}

/* espacement pour les paragraphes */
.about-text-container p {
  margin-bottom: 1.5rem; 
}

/* flèches + texte */
.scroll-indicator {
  text-align: center;
  font-size: 1.2rem;
  color: var(--secondary-color);
  font-weight: bold;
  margin-top: 50px;
  cursor: pointer;
}

.scroll-indicator .arrows {
  font-size: 2rem;
  animation: bounce 1.5s infinite;
  will-change: transform;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* section */
section {
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  background-color: var(--accent-color);
}

/* home section*/
#home {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 5rem 2rem;
  position: relative;
}

#home h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--white);
}

#home .home-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.home-photo {
  width: 150px;
  height: auto;
  border-radius: 30%;
  border: 4px solid var(--secondary-color);
}

/* wave effet */
#home::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 80px;
  background: url('../assets/wave.svg') repeat-x;
  background-size: cover;
  z-index: 1;
}

#home::after {
  bottom: -20px;
}

/* projets */
#projects .projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

#projects .project {
  background: var(--white);
  padding: 2rem;
  margin: 1.5rem auto;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #f9ebcc;
}

#projects .project img {
  width: 100%;
  height: auto;
  margin: 0 auto 1rem;
  display: block;
  border-radius: 8px;
}

#projects .project:hover {
  transform: translateY(-10px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#projects .project h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

#projects .project a {
  color: var(--white);
  background-color: var(--secondary-color);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  margin: 1rem;
  border-radius: 5px;
  transition: background-color 0.3s, transform 0.3s;
}

#projects .project a:hover {
  background-color: var(--button-hover-color);
  transform: scale(1.05);
}

/* contact */
#contact {
  position: relative;
  padding-top: 6rem;
}

#contact-container {
  background: var(--primary-color);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 20px;
  flex-wrap: wrap;
}

#contact-form,
#faq-section {
  width: 48%;
  min-width: 300px;
}

#contact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-width: 800px;
  margin: 0 auto;
  padding: 15px;
  background-color: var(--accent-color);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  color: var(--text-color);
}

#contact-form h2,
#faq-section h2 {
  font-size: 24px;
  margin: 20px 0 15px;
}

#contact-form label {
  display: block;
  margin: 5px 0 3px;
  text-align: left;
}

#contact-form input,
#contact-form textarea {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid var(--primary-color);
  border-radius: 5px;
  font-size: 14px;
  resize: none;
}

#contact-form button {
  width: auto;
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  padding: 8px 30px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  margin: 5px auto;
  display: block;
}

#contact-form button:hover {
  background-color: var(--button-hover-color);
  transform: translateY(-2px);
}

/* FAQ */
#faq-section {
  font-size: 1.5rem;
}

.faq-item {
  margin-bottom: 10px;
}

.faq-question {
  width: 100%;
  padding: 10px 15px;
  background-color: #ffffff;
  color: #006666;
  border: 2px solid #008a83;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.3s;
}

.faq-question:hover {
  background-color: #008a83;
  color: #fee7b3;
}

.faq-answer {
  margin-top: 5px;
  padding: 10px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  color: #333;
}

/* lien sociaux */
#social-icons {
  display: flex;
  justify-content: center; 
  gap: 15px; 
  margin-top: 20px;
  width: 100%; 
}

#social-icons a {
  text-decoration: none;
  font-size: 1.8rem; 
  color: white; 
  transition: color 0.3s ease, transform 0.3s ease;
}

#social-icons a:hover {
  color: var(--secondary-color);
  transform: scale(1.2);
}

/* skills */
#skills {
  padding: 4rem 2rem;
  background-color: var(--accent-color);
  text-align: center;
}

#skills h2 {
  font-family: 'Delius', cursive;
  color: var(--secondary-color);
  margin-bottom: 2rem;
  font-size: 2rem;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.skill i {
  font-size: 3rem;
  color: var(--primary-color);
  transition: color 0.3s ease, transform 0.3s ease;
}

.skill p {
  font-family: 'Funnel Sans', sans-serif;
  color: var(--text-color);
  font-size: 1.2rem;
  font-weight: bold;
}

.skill:hover {
  transform: scale(1.1);
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

.skill:hover i {
  color: var(--secondary-color);
  transform: rotate(10deg);
}

/* details  */
#details {
  background-color: var(--accent-color);
  padding: 4rem 2rem;
  text-align: center;
  border-radius: 8px;
}

#technologies {
  background-color: var(--accent-color);
  padding: 4rem 2rem;
}

#technologies .skills-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

/* features  */
#features {
  background-color: var(--accent-color);
  padding: 4rem 2rem;
  text-align: center;
}

#features ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 600px;
  text-align: center;
}

#features ul li {
  font-size: 1.2rem;
  margin: 1rem 0;
  color: var(--text-color);
  position: relative;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* footer */
footer {
  text-align: center;
  padding: 1rem 0;
  background: var(--secondary-color);
  color: var(--white);
}

footer p {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
}

footer p .contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

footer p i {
  font-size: 1.5rem;
  color: var(--white);
}

footer p i.email {
  color: var(--primary-color);
}

footer p i.phone {
  color: var(--secondary-color);
}

/* buttons */
.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
  padding: 0.8rem 2rem;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s, transform 0.3s;
  display: inline-block;
  width: auto;  
}

.links {
  background-color: var(--accent-color); 
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
}

.btn-primary:hover {
  background-color: var(--button-hover-color);
  transform: scale(1.05);
}

/* link hover effet */
a {
  position: relative;
  display: inline-block;
}

a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: width 0.3s;
}

a:hover::after {
  width: 100%;
}

/* animations */
.fade-in-content {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.fade-in-content.fade-in-left {
  transform: translateX(-50px);
}

.fade-in-content.fade-in-right {
  transform: translateX(50px);
}

.fade-in-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* media queries */
@media (min-width: 768px) {
  header nav ul {
    flex-direction: row;
    justify-content: space-around;
  }

  .navbar {
    padding: 0.5rem 1rem; 
    font-size: 0.9rem; 
  }
  
  main {
    margin-top: 6rem; 
  }

  .menu-toggle {
    display: none;
  }
  
  .nav-list {
    display: flex !important; 
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    flex-direction: row;
    position: static;
    background: none;
    box-shadow: none;
    justify-content: space-around;
  }

  .nav-list.open {
    display: flex;
  }

  #home h1 {
    font-size: 4rem;
  }

  .about-container {
    text-align: left; 
  }

  .about-content {
    flex-direction: row;
    justify-content: space-between; 
    align-items: center;
    width: 80%;
    margin: 0 auto;
    padding: 50px 0;
  }

  .about-text {
    flex: 1;
    text-align: left;
  }

  .about-text p {
    flex: 1;
    text-align: left;
    font-size: 1.5rem;
  }

  .about-text h2 {
    flex: 1;
    text-align: left;
    font-size: 3rem;
  }
  
  .about-buttons {
    flex: 1;
    display: flex;
    justify-content: flex-end; 
    gap: 15px;
    color: var(--white);
  }

  #social-icons {
    justify-content: flex-end; 
    padding-right: 20px; 
  }

  footer p {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  footer p .contact-item {
    flex-direction: row;
  }
}

@media (max-width: 1080px) {

  #contact-form {
    grid-template-columns: 1fr;
    width: 100%;
    padding: 15px;
  }
  
  #contact-container {
    flex-direction: column;
    align-items: center;
  }
  
  #faq-section {
    width: 100%;
    margin-top: 20px;
  }

  #contact-form textarea {
    grid-column: 1;
  }
  
  #contact-form button {
    grid-column: 1;
  }
}

@media (min-width: 1024px) {  
  .about-wrapper {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    text-align: left;
  }

  /* taille du cercle */
  .about-logo {
    width: 45%; 
    max-width: 500px; 
  }

  .about-img {
    width: 100%;
    height: auto;
  }

  /* texte */
  .about-text-container {
    width: 50%;
    font-size: 1.2rem; 
    margin-bottom: 1.5rem; 
    line-height: 1.7; 
    padding-right: 3rem; 
    max-width: 650px;
  }

  /* titre */
  .about-title {
    font-size: 2.8rem; 
    text-align: center;
    width: 100%;
  }
}