/* Style général */
* {
  margin: 0;
  padding: 0;                   /* Pour enlever les marges et paddings par défaut */
  box-sizing: border-box;
}

body {
  width: auto;
  font-family: 'Open Sans', sans-serif;

  /* Mettre le footer toujours en bas */
  display: flex;                /* Active le modèle de boîte flexible */
  flex-direction: column;       /* Organise les enfants (navbar, contenu, footer) en colonne */
  min-height: 100vh;            /* Garantit que la hauteur minimale du corps est égale à 100% de la hauteur de la fenêtre visible */
}
/* Style général */


/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: center;       /* Centre tout le contenu */
  padding: 10px ;
  background-color: white;
  border-bottom: 1px solid #ddd;
  gap: 60px;                    /* Espacement entre logo, liens, et bouton connexion*/
  margin-bottom: 30px;          /* Marge après la navbar */
}

.logo {
  display: flex;                /* pour aligner avec le reste de navbar*/
}

.logo img {
  height: 30px;
  width: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0 20px; 
  color: black;
  text-decoration: none;
}

.nav-links li a {
  text-decoration: none;
  color: black;
}


.auth-buttons {
  display: flex;
  gap: 10px;
  color: black;


}
.auth-buttons .login {
  text-decoration: none;
  padding: 10px;
  color: black;
}

.auth-buttons .signup {
  text-decoration: none;
  color: green;
  padding: 10px;
}

.header-profile-pic {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-image-link {
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Navbar */

/* Navbar Mobile */
/* Navbar Mobile */
.hamburger {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .hamburger {
    display: block;
    margin-left: auto;
  }

  .nav-links,
  .auth-buttons {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    background-color: white;
    padding: 10px 0;
  }

  .nav-links.show,
  .auth-buttons.show {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    padding: 10px;
  }

  .auth-buttons a {
    padding: 10px 20px;
  }
}

/* Navbar Mobile */

/* ==================================== */
/*  BARRE DE NAVIGATION SECONDAIRE */
/* ==================================== */

/* Barre des menus secondaire */
.sub-navbar {
    display: flex;
    justify-content: center;
    padding: 0 0 10px 0;
    background: white;
    border-bottom: 2px solid #ddd;
    width: 100%;
    box-sizing: border-box;
}

.sub-navbar ul {
    display: flex;
    list-style: none;
    gap: 60px;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

/* ✅ Responsive pour petits écrans */
@media (max-width: 600px) {
    .sub-navbar ul {
        flex-direction: column;
        gap: 5px;
    }

    .sub-navbar li {
        width: 100%;
        text-align: center;
    }

    .sub-navbar li a {
        width: 100%;
        padding: 8px 0;
    }
}

/* Liens de navigation */
.sub-navbar li a {
    text-decoration: none;
    color: black;
    font-weight: bold;
    padding: 10px;
    display: block;
    text-align: center;
}

.sub-navbar li a:hover {
    color: green;
}

.sub-navbar li a.active {
    color: green;
    border-bottom: 3px solid green;
}

/* 🔒 Verrouille l'overflow global */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100vw;
  box-sizing: border-box;
}



/* Contenu de la page (centré) */
.content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  /* min-height: 20vh;                     /* pour ajuste la hauteur pour centrer le contenu sinon coller a la barre */
  text-align: center;
  padding-bottom: 100px;
}
/* Contenu de la page (centré) */


                                               /*  FOOTER */
/* FOOTER */
footer {
  background-color: #000000; /* noir */
  color: white;
  width: 100%;
  position: relative;
  bottom: 0px;
  margin-top: auto;
  font-family: Arial, sans-serif;

  
  
}

/* Conteneur principal en flex */
.footer-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 120px;
  padding: 20px 0;
  text-align: left;
}

/* Titres des sections */
.footer-section h3 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 12px;
}

/* Liens */
.footer-section p {
  margin: 6px 0;
  font-size: 14px;
}

/* Retirer soulignement */
footer a {
  text-decoration: none;
  color: inherit;
}

.footer-bottom {
  background-color: #111111;
  border-top: 1px solid #333;
  color: white;
  width: 100%;
  position: relative;
  bottom: 0px;
  margin-top: auto;
  font-family: Arial, sans-serif;
  padding: 20px 0;
  margin-left: auto;
  font-size: 12px;
  color: #777;
  text-align: center;

}

@media screen and (max-width: 992px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 30px 20px;
  }

  .footer-section {
    width: 100%;
    max-width: 500px;
    text-align: center;
  }

  .footer-section h3 {
    font-size: 18px;
  }

  .footer-section p {
    font-size: 15px;
  }
}


                                                /*  FOOTER */






                                               /* Mes annonces */



/* Style du conteneur principal */
.content {
  width: 80%;
  margin: 30px auto;
}

/* Titre de la page */
.page-title {
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
}

/* Conteneur de l'annonce */
.annonce-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid black;
  border-radius: 10px;
  padding: 15px;
  background: white;
  width: 200%;
  max-width: 1000px;
  position: relative;
}

/* Image de l'annonce */
.annonce-image img {
  width: 150px;
  height: 100px;
  border-radius: 10px;
  object-fit: cover;
}

/* Informations de l'annonce */
.annonce-info {
  flex-grow: 1;
  margin-left: 15px;
}

.annonce-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
}

.annonce-description {
  font-size: 14px;
  color: #555;
}

/* État de l'annonce */
/* NewDropdown */
.newdropdown {
  margin-bottom: 60px;
  border-radius: 10px;
  width: 80px;
  height: 40px;
  padding-left: 5px;
  border: 1px solid #ddd;
  background-color: transparent;
}
/* NewDropdown */

.newinput-field {
  width: 100%;
  max-width: 700px;
  padding: 9px;
  font-size: 15px;
  border: 1px solid #ffffff;
  border-radius: 10px;
  display: block;
  margin: auto;
}

/* Conteneur des boutons */
.button-container {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

/* Boutons */
.delete-button, .edit-button {
  padding: 8px 12px;
  font-size: 14px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.delete-button {
  background: #218838;
  color: white;
}

.delete-button:hover {
  background: #218838;
}

.edit-button {
  background: lightgray;
}

.edit-button:hover {
  background: gray;
}




                                                 /* Mes annonces */                                                                                          


                                        

                                               /* FAQ */
/* Séparation pour la section Besoin d'aide */
.help-section {
  background-color: #e6f7ff;
  border-left: 5px solid #008000;
}

/* Style des titres */
h1 {
  font-size: 2em;
  margin: 20px 0;
  padding-left: 20px;
}

/* Espacement des sections */
.faq-section {
  margin-bottom: 40px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
  width: 95%;
  margin-left: 70px;
  margin-right: auto;
}


.faq-section h2 {
  color: #2c3e50;
  font-size: 1.5em;
  margin-bottom: 15px;
  border-bottom: 2px solid #ddd;
  padding-bottom: 5px;
}

/* Style des questions */
.faq-item {
  margin-bottom: 10px;
}

.faq-question {
  cursor: pointer;
  font-size: 1.2em;
  color: #008000;
  font-weight: bold;
  margin-left: 10px;
}

/* Cacher les réponses par défaut */
.faq-answer {
  display: none;
  margin-left: 20px;
}

/* Afficher la réponse quand la question est active */
.faq-item.active .faq-answer {
  display: block;
}

/* Formulaire d'aide */
.help-form {
  background-color: #e6f7ff;
  border-left: 5px solid #008000;
  margin-left: 70px;
  margin-bottom: 60px; /* Augmente l'écart entre cette section et le footer */
  padding-bottom: 30px;
  border-bottom: 2px solid #ccc; /* Ligne de séparation */
}

.help-form label {
  display: block;
  font-weight: bold;
  margin-top: 10px;
}

.help-form input, 
.help-form textarea {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.help-form button {
  margin-top: 15px;
  background-color: #008000;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.help-form button:hover {
  background-color: #006400;
}

.faq-section {
  flex-grow: 1;
}

.auth-buttons a[href="espace_projet.php"] {
  position: relative;
  top: 10px; /* Descend le bouton de 15px */
}


header {
  background-color: white !important;
  color: black !important;
}



                                               /* ==================================== */
                                              /*  MESSAGERIE */
                                              /* ==================================== */  
#messagerie-modal {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 270px;
  background: #f5f5f5;
  border-left: 1px solid #ccc;
  border-radius: 8px 0 0 8px;
  padding: 10px;
  box-shadow: -4px 0 10px rgba(0,0,0,0.1);
  z-index: 9999;
  font-family: Arial, sans-serif;
  max-height: 90vh;
  overflow-y: auto;
}

.message-prive {
  margin: 5px 0;
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 10px;
  background-color: #f0f0f0;
}

.message-prive.from-me {
  text-align: right;
  background-color: #d1f0d1;
}

.message-prive.from-them {
  text-align: left;
  background-color: #ffffff;
}


.contact-card {
  background-color: #c8e6c9;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-card:hover {
  background-color: #a5d6a7;
}
#messagerie-modal,
#messagerie-modal * {
  color: black !important;
}

.contact-card i {
  margin-right: 10px;
  font-size: 18px;
}

.contact-name {
  font-size: 14px;
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.active-contact {
  background-color: #81c784 !important;
  border: 2px solid #388e3c;
}

#new-message-btn {
  background-color: #dcdcdc;
  border-radius: 4px;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  margin-bottom: 15px;
  cursor: pointer;
  font-weight: bold;
}

#new-message-form {
  display: none;
  margin-bottom: 15px;
}

#new-message-form input,
#new-message-form textarea {
  width: 100%;
  margin-bottom: 5px;
  padding: 6px;
}
.message-floating-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #007bff;
  color: white;
  padding: 15px;
  border-radius: 50%;
  text-align: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  z-index: 9999;
}

                                                  /* ==================================== */
                                              /*  MESSAGERIE */
                                              /* ==================================== */  