/* Conteneur principal */
#offerDetailsContainer {
  max-width: 800px;
  width: 100%;
  margin: 50px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-family: 'Arial', sans-serif;
  color: #333;
  box-sizing: border-box;
}

/* Titre principal */
#offerDetailsContainer h1 {
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  color: #ff3c00;
}

/* Conteneur des détails de l'offre */
.offer-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

/* Lien pour le pseudo */
.pseudo-link {
  text-decoration: none;
  color: #333;
}

.pseudo-link h2 {
  font-size: 2em;
  margin-bottom: 10px;
}

/* Style de l'image de profil */
.offer-details img {
  max-width: 100%;
  height: auto;
  width: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
}

/* Paragraphes descriptifs */
.offer-details p {
  font-size: 1.1em;
  margin: 10px 0;
  text-align: center;
}

/* Conteneur pour les boutons */
.button-container {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Boutons génériques */
.button-container .btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #ff3c00;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  box-sizing: border-box; /* Ajouté pour inclure padding dans la largeur */
}

.button-container .btn:hover {
  background-color: #e63900;
}

/* Nouveau conteneur pour la description de l'offre */
.description-container {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  background-color: #f8f8f8;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Titre de la description centré */
.description-title {
  text-align: center;
  font-size: 1.5em;
  margin-bottom: 10px;
  font-weight: bold;
}

/* Style pour la date : affichage sur une nouvelle ligne */
.date {
  display: block;
  margin-top: 10px;
  font-size: 0.9em;
  color: #999;
}

.detailed-description {
  margin: 10px 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  font-family: Arial, sans-serif;
  font-size: 1.1rem;
  color: #333;
  max-width: 100%;
}

.warning-text {
  font-size: 0.8em;
  color: #ff5733;
  margin-top: 10px;
  text-align: center;
  font-family: Arial, sans-serif !important;
  font-weight: bold !important;
}

.referral-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px; /* Espace entre l'input et le bouton */
  width: 100%;
  max-width: 100%; /* Empêche le conteneur de dépasser la largeur du parent */
  margin: 20px 0;
  box-sizing: border-box;
}

.referral-container label {
  font-size: 1.1em;
  margin-right: 10px;
}

.referral-container input[type="text"] {
  flex-grow: 1; /* L'input prend l'espace disponible */
  max-width: calc(100% - 120px); /* Limite la largeur en laissant de la place pour le bouton */
  padding: 8px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow-x: auto; /* Permet de défiler si le texte dépasse */
  white-space: nowrap; /* Empêche le retour à la ligne */
  box-sizing: border-box;
}

.referral-container button {
  padding: 8px 15px;
  background-color: #ff3c00;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.referral-container button:hover {
  background-color: #e63900;
}

/* Ajustements pour petits écrans */
@media screen and (max-width: 600px) {
  .referral-container {
    flex-direction: column; /* Passe en colonne sur petits écrans */
    gap: 10px;
  }
  
  .referral-container input[type="text"] {
    max-width: 100%; /* Prend toute la largeur disponible */
    width: 100%;
  }
  
  .referral-container button {
    width: 100%; /* Bouton pleine largeur sur mobile */
    max-width: 200px; /* Limite la largeur maximale */
  }
}

/* Ajustements pour petits écrans */
@media screen and (max-width: 600px) {
  #offerDetailsContainer {
    margin: 20px 10px;
    padding: 15px;
    width: calc(100% - 20px);
  }
  .offer-details {
    padding: 0 10px;
  }
  .button-container {
    flex-direction: column;
    align-items: center;
  }
  .button-container .btn {
    width: 100%;
    text-align: center;
    padding: 10px 15px; /* Réduit légèrement le padding horizontal */
    font-size: 1em; /* Réduit légèrement la taille de la police */
    white-space: normal; /* Permet au texte de passer à la ligne si nécessaire */
    overflow: hidden; /* Empêche le débordement */
    text-overflow: ellipsis; /* Ajoute "..." si le texte est tronqué */
  }
}