body {
  margin: 0;
  background: #FAF5E8; 
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
}

main {
  min-height: 100vh;
  background: #FAF5E8;
  padding-top: 4em;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2em 0;
  background: #FAF5E8;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2.2em;
  position: relative;
}

.site-name {
  font-size: 1.6em;
  font-weight: 700;
  color: #1D2235;
  position: relative;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.site-name:hover {
  color: #6981A7;
  transform: scale(1.02);
}

.site-name::after {
  content: "";
  display: block;
  width: 40%;
  height: 2px;
  background: #6981A7;
  margin-top: 4px;
}

.site-name span {
  color: #6981A7;
  transition: color 0.3s ease;
}

.site-name:hover span {
    color: #425776;
}

.navbar {
  display: flex;
  align-items: center;
  background: none;
  padding: 0 1em; 
}

.navbar ul {
  display: flex;
  gap: 1.5em;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar ul li a {
  text-decoration: none;
  color: #425776;
  font-size: 1.1em;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.4em 0.6em;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.navbar ul li a:hover {
  color: #1D2235; 
  background-color: rgba(105, 129, 167, 0.2);
  transform: translateY(-2px);
}


.header-underline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  width: calc(100% - 85px);
  margin: 0 auto;
  height: 1px;
  background: #6981A7;
  opacity: 0.8;
  border-radius: 1px;
  pointer-events: none;
}

.social-sidebar {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  padding: 1em 0.5em;
  background: rgba(250, 245, 232, 0.9);
  border-top: 1px solid #6981A7;
  border-right: 1px solid #6981A7;
  border-bottom: 1px solid #6981A7;
  border-radius: 0 8px 8px 0;
  z-index: 2000;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05); 
}

.social-sidebar a img {
  width: 37px;
  height: 37px;
  filter: grayscale(100%) opacity(0.7); 
  transition: 0.3s;
}

.social-sidebar a img:hover {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.08);
}

.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6rem 1.5rem 2rem;
  background: #FAF5E8;
  color: #1D2235;
}

.intro {
  text-align: center;
  color: #1D2235;
}

.intro h1 {
  font-size: 3.5em;
  font-weight: 600;
  margin: 0;
}

.intro h1 span {
  color: #6981A7;
  font-weight: 700;
}

.intro h2 {
  font-size: 1.3em;
  font-weight: 400;
  color: #425776;
  margin-top: 0.8em;
  margin-bottom: 1.5em;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.project-button {
  margin-top: 5.5em;
  text-align: center;
  margin-left: 0; 
}


.project-button a {
  display: inline-block;
  background: #FAF5E8;
  border: 2px solid #6981A7;
  color: #6981A7;
  text-decoration: none;
  font-size: 1.2em;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 1em 2.5em;
  border-radius: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.project-button a:hover {
  background: #6981A7;
  color: #FAF5E8;
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(105, 129, 167, 0.4);
}


.about-me {
  margin-top: 4em;
  color: #1D2235;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2.2em;
}

.about-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
  margin-bottom: 2em;
}

.about-title h2 {
  font-size: 2em;
  font-weight: 500;
  color: #1D2235;
}


.about-title .line {
  flex: 1;
  height: 1px;
  background-color: #6981A7;
}

.about-content {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2em;
}

.about-text {
  flex: 2;
  max-width: 600px;
  font-size: 1rem;
  font-weight: 300;
  color: #425776;
  line-height: 1.6;
  text-align: left;
}

.about-text p {
  margin-bottom: 1em;
}

.about-text strong {
    color: #1D2235;
}

.profile-pic {
  flex: 1;
  max-width: 260px;
  margin-left: 10em;
  margin-right: 2em;
  border-radius: 12px;
  border: none;
  box-shadow: 0 8px 20px rgba(105, 129, 167, 0.5);
  object-fit: cover;
}

.education, .skills {
  margin-top: 8em;
  color: #1D2235;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2.2em;
}

.education-content {
    max-width: 800px;
    margin: 3em auto 2em auto;
    padding: 2.5em;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.timeline-container {
  position: relative;
  padding-left: 30px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10px;
  width: 2px;
  height: 100%;
  background: #E0E4EB; 
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5em;
  padding-left: 10px;
}

.timeline-dot {
  position: absolute;
  top: 0.3em;
  left: -20px;
  width: 14px;
  height: 14px;
  background: #6981A7;
  border: 3px solid #FAF5E8;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #E0E4EB;
}

.timeline-item h3 {
  margin: 0 0 0.2em 0;
  color: #1D2235;
  font-weight: 600;
  font-size: 1.3em;
}

.timeline-item p {
  margin: 0 0 0.5em 0;
  color: #425776;
  font-size: 0.95em;
}


.skills-content {
  display: flex;
  gap: 3em;
  margin-top: 3em;
  padding-bottom: 2em;
}

.skills-category {
    flex: 1;
    min-width: 45%; 
    padding: 1.5em;
    background: #FFFFFF;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.skills-category h3 {
  color: #6981A7; 
  font-size: 1.5em;
  font-weight: 600;
  border-bottom: 2px solid rgba(105, 129, 167, 0.3);
  padding-bottom: 0.5em;
  margin-top: 0;
  margin-bottom: 1.5em;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7em;
}

.skill-item {
  background: #FAF5E8;
  color: #425776;
  border: 1px solid #6981A7;
  padding: 0.5em 1em;
  border-radius: 5px;
  font-size: 0.9em;
  font-weight: 400;
  transition: all 0.2s;
}

.skill-item:hover {
  background: #6981A7;
  color: #FAF5E8;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.soft-skills-list {
  list-style: none;
  padding-left: 0;
}

.soft-skills-list li {
  margin-bottom: 0.6em;
  color: #425776;
}

.soft-skills-list li::before {
  content: '✓'; 
  color: #6981A7;
  font-weight: 700;
  margin-right: 0.5em;
}

.projects {
  margin-top: 8em;
  color: #1D2235;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2.2em;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2em;
  margin-top: 3em;
}

.project-card {
  background: #FFFFFF;
  border-radius: 8px;
  border: 1px solid #ededed;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: #6981A7;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 8px 8px 0 0;
  background-color: #f0f0f0; 
}

.project-card h3 {
  color: #1D2235;
  margin: 1em;
}

.project-card p {
  color: #425776;
  margin: 0 1em 1em;
}

.project-card button {
  margin: 0 1em 1em;
  padding: 0.5em 1em;
  background: none;
  border: 1px solid #6981A7;
  color: #6981A7;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.project-card button:hover {
    background: #6981A7;
    color: #FAF5E8;
}

.project-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(250, 245, 232, 0.95);
  z-index: 1000;
}

.popup-content {
  position: relative;
  max-width: 800px;
  margin: 50px auto;
  padding: 2em;
  background: #FFFFFF;
  border: 1px solid #6981A7;
  border-radius: 8px;
  color: #1D2235;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.close-btn {
  position: absolute;
  right: 1em;
  top: 1em;
  background: none;
  border: none;
  color: #6981A7;
  font-size: 1.5em;
  cursor: pointer;
}

.close-btn:hover {
  color: #1D2235;
}

html {
  scroll-behavior: smooth;
}

.carousel {
  position: relative;
  max-width: 600px;
  margin: 2em auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
}

.carousel-images {
  width: 100%;
  overflow: hidden; 
  position: relative; 
  display: block; 
}

.carousel-images img {
  display: none; 
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  border-radius: 8px;
}

.carousel-images img.active {
  display: block;
}

.carousel button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #ddd;
  border-radius: 50%;
  font-size: 1.5em;
  padding: 0.5em 0.8em;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s;
  color: #6981A7;
}

.carousel button:hover {
  background: #FFFFFF;
  color: #1D2235;
}

.carousel .prev {
  left: 5px;
}

.carousel .next {
  right: 5px;
}

.contact {
    padding-bottom: 6em; 
}

.contact-form {
  max-width: 600px;
  margin: 2em auto;
  text-align: left; 
  padding: 2.5em; 
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #f0f0f0;
}

.form-group {
  margin-bottom: 1.5em;
}

.contact-form label {
  display: block;
  margin-bottom: 0.5em;
  font-weight: 500;
  color: #1D2235; 
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.9em;
  border: 1px solid #E0E4EB;
  border-radius: 5px;
  background: #FFFFFF;
  color: #1D2235;
  font-size: 1em;
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06); 
  transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #6981A7;
  box-shadow: 0 0 0 3px rgba(105, 129, 167, 0.2);
}

.contact-form button {
  padding: 0.8em 2em;
  border: none;
  border-radius: 5px;
  background: #6981A7;
  color: #FAF5E8;
  font-size: 1.1em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 10px rgba(105, 129, 167, 0.3);
}

.contact-form button:hover {
  background: #425776;
  color: #FAF5E8;
  box-shadow: 0 6px 15px rgba(105, 129, 167, 0.4);
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 1.5em; 
  }

  .site-name {
    font-size: 1.4em;
  }
  
  .navbar {
    display: none; 
  }
  
  .header-underline {
    display: none; 
  }

  .social-sidebar {
    top: auto;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row; 
    width: 100%;
    justify-content: center;
    padding: 0.5em 0;
    border: none;
    border-top: 1px solid #6981A7;
    border-radius: 8px 8px 0 0;
    background: rgba(250, 245, 232, 0.98); 
  }

  .social-sidebar a img {
    width: 30px;
    height: 30px;
  }
  
  main {
    padding-top: 2em; 
    padding-bottom: 50px; 
  }

  .about-me, .education, .skills, .projects, .contact {
    padding: 0 1.5em; 
    margin-top: 4em; 
  }

  .hero {
    min-height: 50vh; 
    padding-top: 3rem;
  }

  .intro h1 {
    font-size: 2.5em; 
  }

  .intro h2 {
    font-size: 1.1em;
  }
  
  .project-button {
      margin-top: 3em;
  }

  .about-content {
    flex-direction: column; 
    align-items: center;
  }
  
  .about-text {
      max-width: 100%;
      order: 2; 
  }

  .profile-pic {
    order: 1; 
    margin: 0 0 2em 0;
    max-width: 250px;
    width: 60%;
    height: auto;
  }

  .skills-content {
    flex-direction: column; 
    gap: 2em;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr); 
    gap: 1.5em;
  }
  
  .popup-content {
      margin: 20px 10px;
      padding: 1.5em;
  }

  .contact-form {
      max-width: 100%;
      padding: 2em;
      box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  
  header {
    padding: 1em 0;
  }
  
  .header-container {
    padding: 0 1em;
  }

  .hero {
    min-height: 40vh;
    padding: 2rem 1em 1rem;
  }
  
  .intro h1 {
    font-size: 2em; 
  }

  .intro h2 {
    font-size: 1em;
    margin-top: 0.5em;
  }

  .project-button a {
    font-size: 1em;
    padding: 0.8em 2em;
  }
  
  .social-sidebar {
      gap: 1.5em;
  }
  
  .about-me, .education, .skills, .projects, .contact {
    padding: 0 1em; 
  }
  
  .about-title h2 {
      font-size: 1.5em;
  }
  
  .profile-pic {
    max-width: 200px;
  }
  
  .education-content {
      padding: 1.5em;
  }
  
  .timeline-item h3 {
      font-size: 1.1em;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1em;
  }
  
  .popup-content h2 {
      font-size: 1.3em;
  }
  
  .carousel button {
      font-size: 1.2em;
      padding: 0.3em 0.6em;
  }

  .contact-form {
    padding: 1.5em 1em;
  }
  
  .contact-form button {
      width: 100%; 
  }
}
.logo-formation {
    max-width: 60px;
    height: auto;
    float: right;
    margin-left: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 
    border: 1px solid #E0E4EB;
}
.competences-pop-up {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7em;
  margin-top: 1em;
  margin-bottom: 2em;
}
/* Style du lien de preuve dans la fenêtre contextuelle (pop-up) */
.lien-preuve-pop-up {
    color: #425776; /* Couleur "bleue" du barème */
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.3s;
}

.lien-preuve-pop-up:hover {
    color: #6981A7;
}

/* Assure que la balise <p> parente du lien centre bien l'élément */
.popup-content p[style*="margin-top"] { /* Cibler les paragraphes contenant le lien */
    text-align: center !important;
}