@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins';
  max-width: 100%;
  min-width: 50px;
  
}
html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  min-width: 50px;        /* Le viewport entier */
  box-sizing: border-box;
}

body {
  display: flex;        /* Permet de faire grandir la section #projets */
  flex-direction: column;
  background-color: #3C096C;
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
}

/* Header */
header {
  position: fixed;      /* Reste collé en haut */
  top: 0;
  left: 0;
  width: 100%;
  overflow-x: hidden;
  z-index: 9999;
  
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #5A189A;
  padding: 15px 0; 
  z-index: 1000;         /* Occupe toute la hauteur du header */
}

.navigation {
  list-style-type: none;
  display: flex;
  gap: 25px;
}

.navigation li a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: large;
  transition: color 0.3s ease;
}

.navigation li a:hover {
  color: #C3C3C3;
}

/* Section principale : prend tout l’espace vertical disponible 
   sous le header (flex:1). On ajoute un margin-top 
   pour éviter que le contenu ne passe sous le header fixe.
*/
#projets {
  flex: 1;             /* Le bloc #projets grandit pour remplir l'espace vertical */
  margin-top: 60px;    /* Décalage pour ne pas être sous le header */
  padding: 15px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

/* Titre Projets */
#projets h1 {
  font-size: x-large;
  color: #ffffff;
  letter-spacing: 3px;
  margin-bottom: 20px;
}

/* Container des cartes */

.projects-perso, .projects-univ, .podcast{
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* ou flex-start selon ta préférence */
  gap: 20px;
  margin: 40px;
}
/* Carte de projet */
.project-card {
  background-color: #10002B;
  width: 400px;
  text-align: center;
  border-radius: 8px;
  transition: transform 0.3s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 0;
  position: relative;
}

.project-card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.project-card img {
  padding: 0 10px 0 10px;
}

.project-card h3 {
  font-size: 18px;
  color: #ffffff;
  padding: 10px;
  font-weight: bold;
}

.project-card p {
  font-size: 18px;
  color: #cccccc;
  padding: 5px;
}

.project-card p img {
  width: 25px;
  height: 20px;
}

/* Cartes masquées (projets non terminés) */
.project-card-pas-fini {
  display: none;
}

/* Fenêtre modale */
.project-details {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
  justify-content: center;
  
}

.details-content {
  background: #10002B;
  padding: 20px 0 ; 
  border-radius: 10px;
  width: 100%;
  height: 80%;
  position: relative;
  justify-content:center;
  text-align: center;
  display: flex;
  flex-direction: column;
  
 
  
}

.card-txt-img{
  justify-content: center;
  background: #10002B;
    padding: 20px 0 ; 
    border-radius: 10px;
    width: 100%;
    height: 80%;
    gap:40px;
    
    
   
    
    
    position: relative;
    text-align: center;
    display: flex;

}
#project-image {
  object-fit: cover;
  max-width: 40%; /* L'image prendra au maximum 30% de la largeur */
  height: auto;

  

}


/* Image du profil */
.details-content img {
  width: 45%;
  border-radius: 5%;
  margin-bottom: 15px;

}

/* Texte des détails */
.details-content h2 {
  margin: 10px 0 5px;
  font-size: 1.5em;
  color: #fff;
}

.details-content p {
  font-size: 1em;
  color: #fff;
  margin-bottom: 15px;
  font-size: medium;
  
  
}



/* Affichage de la modale */
.project-details.visible {
  visibility: visible;
  opacity: 1;
}

.details-text {
max-width: 55%; /* Ajuste la largeur pour éviter qu’elle ne prenne tout l’espace */
  text-align: center;
  font-size: medium;
  padding: 5px;
  overflow:auto;
}
.details-text h1 {
    font-size: x-large;
  }
  .details-text h4 {
    font-size: large;
  }

.project-link img{
text-align: center;
width: 50px;
height: 50px;
filter: invert(1);
}

.container h2{
  font-size: large;
}

.container p,.container li{
  font-size: medium;
  text-align: left;
}



#button-card-details {
text-align: center;
margin-top: 30px;
}


#button-card-details button {
background-color: #9D4EDD;
color: #FFFFFF;
border: none;
padding: 10px 20px;
font-size: medium;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease, transform 0.3s ease;
}

#button-card-details button:hover {
background-color: #5A189A;
color: #ffffff;

}
/* Footer */
footer {
  background-color: #10002B;
  color: #cccccc;
  text-align: center;
  padding: 15px;
  font-size: small;
}

@media (max-width: 768px) {

  /* Réinitialisation de base pour éviter les problèmes de marge/padding */
  html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  nav {
    position: relative;
    padding: 5px 5px;
  }

  .navigation {
    display: flex; /* Empile les liens verticalement */
    gap: 5px;
    padding: 0;
    margin: 0;
  }

  .navigation li {
    list-style: none; /* Retire les puces si besoin */
  }

  .navigation li a {
    display: block;
    width: 100%;      /* Le lien prend toute la largeur disponible */
    text-align: center;
    font-size: small;
    padding: 5px 0;
  }

  /* Section #projets */
  #projets {
    background-color: #3C096C;
    color: #ffffff;
    padding: 50px 0;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    
  }
  #projets h2 {
    font-size: medium;
    color: #ffffff;
    padding: 15px 0;
    letter-spacing: 3px;
  }
  

  /* Disposition en colonne pour les projets */
  .projects {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 0 1rem; /* Légères marges latérales pour éviter le collage */
  }
  .card-txt-img{
    
    background: #10002B;
      
      border-radius: 10px;
      width: 100%;
      height: 90%;
      flex-direction: column;
      
      align-items: center; 
      
     
      
      
      position: relative;
      text-align: center;
      display: flex;
      gap: 0px;
      padding: 5px;
  
  }
  #project-image {
    object-fit: cover;
    max-width: 70%; /* L'image prendra au maximum 30% de la largeur */
    height: auto;
    margin-left: 0px;
    width: auto;
    padding: 5px;
    position: relative;
   
    
  
  }

  .details-text {
    max-width: 100%; /* Ajuste la largeur pour éviter qu’elle ne prenne tout l’espace */
      text-align: center;
      font-size: x-small;
      padding: 5px;
      overflow:auto;
  }
  .details-text h1 {
    font-size: large;
  }
  .details-text h4 {
    font-size: medium;
  }
  .container h2{
    font-size: medium;
  }
  
  .container p,.container li{
    font-size: small;
    text-align: left;
  }
}
