/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body & background */
body {
  font-family: 'Poppins', sans-serif;
  background-color: #0a0a0a;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23bfa16f' fill-opacity='0.08'%3E%3Cpath d='M10 0a10 10 0 100 20A10 10 0 0010 0zm0 2a8 8 0 110 16A8 8 0 0110 2z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 100px;
  color: #f5f5f5;
  line-height: 1.6;
  font-weight: 400;
  padding-bottom: 3rem;
}

/* Links */
a {
  color: #bfa16f;
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover,
a:focus {
  color: #d4c484;
  outline: none;
}

/* Header */
header.container {
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.95);
  padding: 1.2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  z-index: 1000;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #bfa16f;
  letter-spacing: 2px;
  cursor: default;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 3rem;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
}

nav ul li a {
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
  border-bottom: 2px solid #bfa16f;
  color: #bfa16f;
}

/* Section About */
#about {
  max-width: 900px;
  margin: 4rem auto 6rem;
  padding: 2rem 3rem;
  background: rgba(17, 17, 17, 0.85);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(191, 161, 111, 0.3);
  font-family: 'Poppins', sans-serif;
  color: #f5f5f5;
}

#about h2, #about h3 {
  font-family: 'Playfair Display', serif;
  color: #bfa16f;
  text-shadow: 0 0 10px rgba(191, 161, 111, 0.4);
  margin-bottom: 1rem;
}

#about h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

#about h3 {
  font-size: 1.6rem;
  margin-top: 2.5rem;
}

#about p {
  font-size: 1.1rem;
  margin-bottom: 1.4rem;
  line-height: 1.6;
  opacity: 0.9;
}

#about strong {
  color: #d4c484;
  font-weight: 600;
}

#about ul {
  list-style: disc inside;
  margin-bottom: 1.6rem;
  color: #f5f5f5;
  opacity: 0.9;
}

#about li {
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  header.container {
    flex-direction: column;
    padding: 1rem 2rem;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.8rem;
  }

  #about {
    margin: 2rem 1rem 4rem;
    padding: 1.5rem 2rem;
  }

  #about h2 {
    font-size: 2rem;
  }

  #about h3 {
    font-size: 1.3rem;
  }

  #about p, #about li {
    font-size: 1rem;
  }
}

/* Grille de cartes */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Cartes stylées */
.card {
  background: rgba(17, 17, 17, 0.9);
  padding: 1.8rem;
  border-radius: 15px;
  box-shadow: 0 6px 18px rgba(191, 161, 111, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 25px rgba(191, 161, 111, 0.4);
}

.card h3 {
  color: #bfa16f;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card p, .card ul {
  font-size: 1rem;
  opacity: 0.9;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.5s ease;
}

.card.active p,
.card.active ul {
  max-height: 500px;
  opacity: 1;
}

/* Animation fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }
.delay-5 { animation-delay: 1s; }
.delay-6 { animation-delay: 1.2s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Style du menu déroulant dans les compétences */
.card .filter {
  margin-bottom: 1rem;
}

.card .filter label {
  font-size: 0.95rem;
  color: #bfa16f;
  margin-right: 0.5rem;
}

.card .filter select {
  background: rgba(17, 17, 17, 0.85);
  color: #f5f5f5;
  border: 1px solid #bfa16f;
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.card .filter select:hover,
.card .filter select:focus {
  border-color: #d4c484;
  outline: none;
  color: #d4c484;
  background: rgba(17, 17, 17, 0.95);
}

/* Optionnel : ajout d'une transition sur la liste des compétences filtrées */
#skillsList li {
  transition: all 0.3s ease;
  list-style: disc inside;
  padding-left: 0.3rem;
}

/* Responsive pour le menu déroulant */
@media (max-width: 768px) {
  .card .filter label,
  .card .filter select {
    font-size: 0.9rem;
  }
}

#about .card p {
  max-height: 200px;      /* hauteur visible */
  overflow-y: auto;       /* active le scroll vertical si le texte dépasse */
  padding-right: 10px;    /* pour éviter que le texte touche le bord */
  scrollbar-width: thin;  /* pour Firefox */
  scrollbar-color: #bfa16f rgba(17,17,17,0.9); /* couleur scrollbar Firefox */
}

/* Scrollbar pour Chrome, Edge, Safari */
#about .card p::-webkit-scrollbar {
  width: 8px;
}

#about .card p::-webkit-scrollbar-track {
  background: rgba(17,17,17,0.9);
  border-radius: 8px;
}

#about .card p::-webkit-scrollbar-thumb {
  background-color: #bfa16f;
  border-radius: 8px;
  border: 2px solid rgba(17,17,17,0.9);
}
