
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
  background-color: #F2D7B6;
}


.hero-annonces {
  display: flex;
  justify-content: center;
  padding: 60px 20px;
  background: #F2D7B6;
  font-family: 'Segoe UI', sans-serif;
}

.hero-content {
  background: #fff;
  padding: 40px 30px;
  border-radius: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
  text-align: center;
  max-width: 800px;
  width: 100%;
}

.hero-content h1 {
  font-size: 30px;
  font-weight: 700;
  color: #2e2e2e;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 16px;
  color: #555;
  margin-bottom: 30px;
}

.hero-btn {
  display: inline-block;
  padding: 10px 24px;
  background-color: #333;
  color: white;
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.hero-btn:hover {
  background-color: #555;
}

/* Conteneur des cartes */
.annonces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 20px;
  font-family: 'Segoe UI', sans-serif;
}

/* Carte individuelle */
.annonce-card {
  background-color: #f5f5f5;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s ease;
}

.annonce-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Top bar */
.annonce-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background-color: #fdf6ef;
  border-radius: 12px 12px 0 0;
  padding: 10px 16px;
}

/* Avatar */
.annonce-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Bloc utilisateur */
.annonce-user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  font-size: 0.95rem;
  color: #6a3a18;
  font-weight: 500;
}

.annonce-image {
  position: relative;
  width: 100%;
  padding-top: 40%; /* Environ 160px de hauteur sur 230px de largeur */
  overflow: hidden;
  background-color: #fdf6ef;
}

.image-annonce {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Nom */
.username {
  white-space: nowrap;
}

/* Note */
.rating {
  background-color: #a87847;
  color: #fff;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Nombre de votes */
.votes {
  font-size: 0.85rem;
  color: #333;
}

/* Favori */
.fav-icon {
  background-color: transparent;
  border: 1px solid #a87847;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  color: #a87847;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.fav-icon:hover {
  background-color: #faeee1;
  transform: scale(1.1);
}

/* Placeholder d'image */
.annonce-image {
  width: 100%;
  height: 160px;
  background-color: #e0e0e0;
  background-image: linear-gradient(45deg, #dcdcdc 25%, transparent 25%, transparent 50%, #dcdcdc 50%, #dcdcdc 75%, transparent 75%, transparent);
  background-size: 40px 40px;
}

/* Bas de carte */
.annonce-bottom {
  background-color: #FAEEE1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.annonce-bottom h3 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: #222;
}

.annonce-bottom p {
  margin: 0;
  font-size: 13px;
  color: #333;
  line-height: 1.4;
}

.annonce-price {
  font-size: 16px;
  font-weight: bold;
  color: #000;
}

.annonce-meta {
  font-size: 12px;
  color: #555;
}

/* Conteneur centré */
.filters-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 40px;
  padding: 0 16px;
  box-sizing: border-box;
}

/* Barre de filtres horizontale */
.annonces-filters {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap; /* force les boutons à rester sur une ligne */
  overflow-x: auto;
  max-width: 100%;
}

/* Groupe filtre (bouton + dropdown) */
.filter-group {
  position: relative;
  flex-shrink: 0; /* empêche les boutons de se compresser */
}

/* Boutons de filtres */
.filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #fdf6ef;
  border: 1px solid #a87847;
  border-radius: 20px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 500;
  color: #6a3a18;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  background-color: #faeee1;
}

/* Icônes */
.filter-btn .icon {
  width: 18px;
  height: 18px;
}

/* Flèche */
.arrow {
  margin-left: auto;
  font-size: 0.9rem;
}

/* PLUS position absolute */
.dropdown {
  position: static; /* important : pas absolute */
  display: none;
  flex-direction: column;
  gap: 8px;
  background-color: #fff;
  border: 1px solid #a87847;
  border-radius: 8px;
  padding: 10px;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  animation: fadeIn 0.25s ease;
}

/* Affiche le menu quand actif */
.filter-group.active .dropdown {
  display: flex;
}



/* Style des options dans le menu */
.dropdown label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  color: #333;
}

/* Affichage du dropdown quand actif */
.filter-group.active .dropdown {
  display: flex;
}

/* Animation douce */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}



.filters-separator {
  margin-top: 20px;
  border: none;
  border-top: 1px solid #000000;
}



.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  font-family: sans-serif;
}

.page-link {
  display: inline-block;
  padding: 10px 16px;
  background-color: #fdf6ef; /* beige clair */
  color: #6a3a18; /* marron foncé */
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.page-link:hover {
  background-color: #a87847;
  color: white;
  transform: translateY(-2px);
}

.page-link.active {
  background-color: #6a3a18;
  color: white;
  cursor: default;
}

.page-link.prev,
.page-link.next {
  font-size: 1.2rem;
  padding: 10px 14px;
}


.fav-icon.active {
  background-color: #a87847;
  color: white;
  border: none;
}


.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.popup-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.popup-content {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  position: relative;
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.popup-overlay.show .popup-content {
  transform: translateY(0);
  opacity: 1;
}

.popup-content h2 {
  color: #6a3a18;
  margin-bottom: 10px;
}

.popup-content p {
  color: #333;
  font-size: 15px;
}

.popup-content .close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  color: #888;
  cursor: pointer;
}

.popup-content .close:hover {
  color: #000;
}


.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.popup-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.popup-content {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  position: relative;
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.popup-overlay.show .popup-content {
  transform: translateY(0);
  opacity: 1;
}

.popup-content h2 {
  color: #6a3a18;
  margin-bottom: 10px;
}

.popup-content p {
  color: #333;
  font-size: 15px;
}

.popup-content .close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  color: #888;
  cursor: pointer;
}

.popup-content .close:hover {
  color: #000;
}
