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

html, body {
  height: 100%;
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  background-color: #f4f4f9;
  color: #333;
}

/* ------------------------- TITRES ------------------------- */
h1, h2 {
  color: #1e1e2f;
  text-decoration: underline;
  transition: color 0.3s ease, transform 0.3s ease;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.4rem;
  margin: 0.8rem 0 0.5rem 0;
}

/* ------------------------- NAVBAR ------------------------- */
nav {
  width: 100%;
  background-color: #1e1e2f;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative; /* important pour le menu mobile */
}

nav ul.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

nav a, nav button {
  color: white;
  text-decoration: none;
  font-weight: bold;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

nav button {
  padding: 0.5rem 1rem;
  border: 1px solid white;
  border-radius: 5px;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  cursor: pointer;
}

.burger div {
  width: 100%;
  height: 3px;
  background-color: white;
  border-radius: 2px;
}

/* Menu mobile */
@media (max-width: 768px) {
  nav ul.nav-links {
    display: none;
    position: absolute;
    top: 100%;           /* juste sous la nav */
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
    background-color: #1e1e2f;
    z-index: 9999;       /* <-- très important pour être au-dessus de tout */
  }

  nav ul.nav-links.active {
    display: flex;
  }

  .burger {
    display: flex;
    z-index: 10000;       /* assure que le burger reste au-dessus */
  }
}


/* ------------------------- BODY ------------------------- */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ------------------------- MAIN INFO ------------------------- */
#main-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  max-width: 700px;
  margin: 2rem auto;
  background-color: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#main-info:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

#main-info h1 {
  margin-bottom: 1rem;
  font-size: 2rem;
  color: #1e1e2f;
}

#sub-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

img.profile-photo {
  max-height: 100px;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

img.profile-photo:hover {
  transform: scale(1.1);
}

/* ------------------------- MAIN CONTENT ------------------------- */
main {
  width: 90%;
  max-width: 900px;
  margin: 2rem auto;
}

span, p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 1rem;
}

/* ------------------------- PROJETS ------------------------- */
.card {
  background-color: #fff;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 5px solid #1e1e2f;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;

  display: flex;
  gap: 1rem;
}

/* Contenu texte */
.card-content {
  flex: 1; /* prend toute la place dispo */
}

/* Image (si présente) */
.card-image {
  flex: 0 0 auto; /* prend seulement la taille de l’image */
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.card-image img {
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

/* Responsive */
@media (max-width: 700px) {
  .card {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-image {
    justify-content: center;
    margin-top: 1rem;
    width: 100%;
  }

  .card-image img {
    max-width: 100%;
  }
}

.card h4::before {
  content: attr(data-year);
  display: inline-block;
  background-color: #1e1e2f;
  color: #fff;
  font-weight: bold;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

/* ------------------------- SKILLS ------------------------- */
#skills {
  width: 90%;
  max-width: 900px;
}

#skills h2 {
  text-align: left; /* titre principal aligné à gauche */
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #1e1e2f;
}

#skills section {
  margin-bottom: 2rem;
}

#skills section h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  text-align: left; /* titres de sous-section alignés à gauche */
  color: #333;
}


/* --- Liste de skills en grille (alignement à gauche) --- */
#skills ul {
  display: flex;
  flex-wrap: wrap;            /* passe à la ligne si besoin */
  justify-content: flex-start; /* alignement à gauche */
  gap: 1rem 1.5rem;           /* espace horizontal et vertical entre logos */
  list-style: none;
  padding: 0;
  margin: 0;
}

#skills li {
  flex: 0 1 80px;             /* chaque logo a au minimum 80px */
  display: flex;
  justify-content: flex-start; /* logos alignés à gauche dans leur "case" */
  align-items: center;
}

/* --- Images des skills --- */
.image-skill {
  width: 50px;
  height: 50px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.image-skill:hover {
  transform: scale(1.2) rotate(5deg);
}

/* Responsive */
@media (max-width: 500px) {
  #skills li {
    flex: 0 1 60px;
  }

  .image-skill {
    width: 40px;
    height: 40px;
  }
}

/* ------------------------- FOOTER ------------------------- */
footer {
  width: 100%;
  background-color: #1e1e2f;
  color: white;
  padding: 1.5rem 0;
  text-align: center;
}

footer a {
  color: #61dafb;
  text-decoration: none;
  transition: all 0.3s ease;
}

footer a:hover {
  text-decoration: underline;
  transform: scale(1.05);
}

/* Onglets */
.tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tab-button {
  padding: 0.5rem 1rem;
  border: 2px solid #1e1e2f;
  border-radius: 5px;
  background-color: #fff;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.tab-button.active {
  background-color: #1e1e2f;
  color: #fff;
}

/* Contenu onglets */
.tab-content {
  display: none;
  padding-bottom: 100px;
}

.tab-content.active {
  display: block;
}

#copyright {
    color: white;
}

/* État initial : invisible et décalé */
.scroll-element {
  opacity: 0;
  transform: translateY(30px); /* décalage vers le bas */
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Quand l’élément devient visible */
.scroll-element.visible {
  opacity: 1;
  transform: translateY(0);
}

#certifications {
  margin: 2rem 0;
  width: 90%;
  max-width: 600px;
}

.cert-card {
  background-color: #fff;
  padding: 1.2rem 1.5rem;
  border-left: 5px solid #1e1e2f; /* accent coloré */
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.edu-card, .cert-card {
  background-color: #fff;
  padding: 1.2rem 1.5rem;
  border-left: 5px solid #1e1e2f; /* couleur différente si tu veux */
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0,0,0,0.05);
  margin-bottom: 1rem;
}

.edu-card h3, .cert-card h3 {
  margin-bottom: 0.5rem;
  color: #1e1e2f;
}

.edu-card p, .cert-card p {
  color: #555;
  margin: 0.3rem 0;
}

/* Badge année pour diplômes et certifications */
.edu-card h4::before,
.cert-card h4::before {
  content: attr(data-year);
  display: inline-block;
  background-color: #1e1e2f;
  color: #fff;
  font-weight: bold;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

/* Hover dynamique */
.edu-card:hover,
.cert-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
