/* Pas besoin de règles supplémentaires, le CSS de sidebar_universal.css gère tout */
/* ===================================
   1. CAROUSEL DES VILLES (Flickity)
   =================================== */
.carousel {
  width: 100%;
  margin-top: 0;
  padding-top: 0;
  position: relative;
  display: block;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
  padding: 15px 0;
}

#slider-city-list-main {
  margin-top: 0;
  padding-top: 0;
  overflow: hidden;
  max-width: 100%;
  padding: 15px 0;
}

/* Sécurité sur la section location-display */
.location-display {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0;
}

.carousel-cell {
  width: 220px; /* ✅ Augmenter encore un peu */
  margin-right: 20px; /* ✅ Plus d'espace entre les cellules */
  padding-top: 0;
  margin-top: 0;
  display: block;
  height: auto;
}

.city-list-item {
  margin-top: 0;
  padding-top: 0;
  margin: 0;
}

.city-list {
  padding: 0 3px;
  box-sizing: border-box;
  line-height: 1.1;
}

ul.city-list {
  list-style: none;
}

.city-link {
  text-decoration: none;
  color: black;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  border-radius: 0;
  line-height: 1.1;
  font-size: 13px;
}

.city-detail {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.city-icon {
  margin-left: 3px;
  fill: gray;
  transition: fill 0.3s;
  margin-right: 3px;
}

.city-count {
  margin-right: 8px;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.1;
}

.all-cities-link {
  display: inline-block;
  margin-top: 20px;
  text-decoration: none;
}

.city-link:hover {
  transform: translateY(-2px);
}

.flickity-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: linear-gradient(
    135deg,
    rgba(230, 57, 70, 0.85),
    rgba(255, 77, 90, 0.85)
  );
  border-radius: 50%;
  border: none;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.flickity-button:hover {
  background: linear-gradient(
    135deg,
    rgba(230, 57, 70, 0.95),
    rgba(255, 77, 90, 0.95)
  );
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.4);
}

.flickity-button:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  transform: translateY(-50%) scale(0.9);
}

.flickity-button.previous {
  left: 10px;
}

.flickity-button.next {
  right: 10px;
}

.flickity-button-icon {
  fill: rgb(255, 255, 255);
  width: 60%;
  height: 60%;
}

.city-link:hover .city-icon {
  fill: white;
}

/* ===================================
   2. SYSTÈME DE MENU + ANNONCES
   =================================== */
/* ✅ Nouveau système - le contenu s'adapte automatiquement */
.category_prod {
  width: 100%;
  transition: all 0.3s ease;
}

.category_prod,
#testa,
.home-category-carousel {
  width: 100%;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  max-width: 100%;
}

/* Sécurité supplémentaire pour les conteneurs de la page */
.section-white,
#main-content {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Conteneur principal des annonces */
#annoncesContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  padding: 1px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  z-index: 10;
  box-sizing: border-box;
}

/* Chaque annonce individuelle - Mobile First */
#annoncesContainer .profile-container {
  margin-bottom: 0;
  box-sizing: border-box;
  /* Mobile par défaut : 2 colonnes */
  flex: 0 0 calc(50% - 0.5px);
  max-width: calc(50% - 0.5px);
}

/* Grande tablette portrait (577-767px) : 3 colonnes */
@media (min-width: 577px) {
  #annoncesContainer .profile-container {
    flex: 0 0 calc(33.3333% - 0.67px);
    max-width: calc(33.3333% - 0.67px);
  }
}

/* Tablette paysage / Petit laptop (768-975px) : 4 colonnes */
@media (min-width: 768px) {
  #annoncesContainer .profile-container {
    flex: 0 0 calc(25% - 0.75px);
    max-width: calc(25% - 0.75px);
  }
}

/* Desktop moyen (976-1199px) : 4 colonnes */
@media (min-width: 976px) {
  #annoncesContainer .profile-container {
    flex: 0 0 calc(25% - 0.75px);
    max-width: calc(25% - 0.75px);
  }
}

/* Grand desktop (1200px+) : 5 colonnes */
@media (min-width: 1200px) {
  #annoncesContainer .profile-container {
    flex: 0 0 calc(20% - 0.8px);
    max-width: calc(20% - 0.8px);
  }
}

/* Cacher sidebar desktop en mode mobile */
@media (max-width: 768px) {
  .desktop-left-menu {
    display: none !important;
  }

  .desktop-right-content {
    width: 100% !important;
  }
}

/* Très petit mobile : 1 colonne */
@media (max-width: 320px) {
  #annoncesContainer .profile-container {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #annoncesContainer {
    gap: 1px;
  }
}

/* ANIMATIONS */
.fade-in-img {
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.fade-in-img.loaded {
  opacity: 1;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* STYLES DU MENU */
.navigation-link {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 15px;
  text-decoration: none;
  color: #000;
  transition: background-color 0.2s ease;
}

.navigation-link:hover {
  background-color: #f8f9fa;
}

.navigation-link.active {
  background-color: #e9ecef;
  font-weight: 600;
}

.mainmenu_bottom_btn {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mainmenu_bottom_btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* ===================================
   3. TITRE DE LA PAGE
   =================================== */
.home-category-carousel-title {
  background: #fff;
  padding: 12px 20px;
  margin-bottom: 2px;
  border-bottom: 1px solid #e0e0e0;
  border-left: 6px solid #e63946;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
}

.home-category-carousel-title:hover {
  background: #fdfdfd;
  border-left-color: #c92a37;
}

.title-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #e63946 0%, #ff6b6b 100%);
  color: white;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
  flex-shrink: 0;
}

.title-icon-wrapper svg {
  width: 18px;
  height: 18px;
  fill: white;
}

.home-category-carousel-title h1 {
  margin: 0;
  font-size: 25px;
  font-weight: 700;
  text-transform: uppercase;
  color: #2c3e50;
}

.count-badge {
  background: linear-gradient(135deg, #c471ed 0%, #f64f59 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(196, 113, 237, 0.4);
  margin-left: auto;
}

@media (max-width: 576px) {
  .count-badge {
    display: none !important;
  }
  .home-category-carousel-title {
    padding: 12px 15px;
    gap: 12px;
    border-left-width: 4px;
  }
  .title-icon-wrapper {
    width: 32px;
    height: 32px;
    margin-top: 3px;
  }
  .title-icon-wrapper svg {
    width: 16px;
    height: 16px;
  }
  .home-category-carousel-title h2 {
    white-space: normal;
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .carousel-cell {
    width: 180px;
    margin-right: 15px;
  }

  .city-link {
    padding: 0;
    font-size: 13px;
    line-height: 1.1;
  }

  .city-count {
    margin-right: 6px;
    font-size: 11px;
    line-height: 1.1;
  }
}

/* =========================================
   STYLE DU FIL D'ARIANE (BREADCRUMB)
   ========================================= */

/* Fil d'Ariane enrichi */
.breadcrumb-enhanced {
  background: linear-gradient(
    135deg,
    rgba(230, 57, 70, 0.05),
    rgba(45, 172, 74, 0.05)
  );
  padding: 12px 15px;
  border-radius: 0px;
  border: 1px solid rgba(230, 57, 70, 0.1);
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.breadcrumb-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.breadcrumb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
}

.breadcrumb-list a {
  color: #e63946;
  text-decoration: none;
  display: flex;
  align-items: center;
  font-weight: 600;
  transition: opacity 0.3s;
  font-size: 14px;
}

.breadcrumb-list a:hover {
  opacity: 0.7;
}

.breadcrumb-separator {
  color: #999;
  margin: 0 3px;
}

.breadcrumb-current {
  color: #666;
  font-weight: 600;
  font-size: 14px;
}

.breadcrumb-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
}

.breadcrumb-user {
  font-weight: 600;
  color: #2a2a2a;
}

.breadcrumb-divider {
  color: #999;
}

.breadcrumb-cta {
  color: #e63946;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s;
}

.breadcrumb-cta:hover {
  opacity: 0.7;
}

@media (max-width: 768px) {
  .breadcrumb-enhanced {
    padding: 10px 12px;
  }

  .breadcrumb-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .breadcrumb-info {
    width: 100%;
    justify-content: space-between;
    font-size: 13px;
  }
}

/* =========================================
   TEXTE SEO BAS DE PAGE
   ========================================= */

.seo-content-section {
  overflow-x: hidden;
  
  box-sizing: border-box;
}

.seo-footer-title {
  font-size: 1.5rem; /* ~24px, assez gros pour être lu, plus petit que le H1 */
  color: #2c3e50;
  font-weight: 600;
  line-height: 1.4;
}

.seo-footer-subtitle {
  font-size: 1.1rem; /* ~18px */
  color: #444;
  font-weight: 600;
}

.seo-footer-text {
  font-size: 0.95rem; /* ~15px, lisible */
  line-height: 1.6; /* Aéré pour la lecture */
  color: #6c757d;
  text-align: justify; /* Fait plus propre sur les blocs de texte */
}

/* Petit style pour le disclaimer */
.seo-disclaimer {
  border-left: 4px solid #e63946; /* Rappel de ta couleur rouge */
  border-radius: 4px;
  font-size: 0.85rem;
  color: #555;
}

/* Responsive mobile */
@media (max-width: 768px) {
  .seo-footer-text {
    text-align: left; /* Plus facile à lire sur mobile */
  }
  .seo-footer-title {
    font-size: 1.3rem;
  }
}

/* ============================================
   EMPTY STATE - VILLES
   ============================================ */

.empty-cities-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  width: 100%;
}

.empty-cities-content {
  text-align: center;
  max-width: 280px;
}

.empty-cities-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 15px;
  background: linear-gradient(
    135deg,
    rgba(230, 57, 70, 0.1),
    rgba(255, 107, 107, 0.1)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e63946;
}

.empty-cities-icon svg {
  opacity: 0.8;
}

.empty-cities-title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 700;
  color: #1a202c;
}

.empty-cities-text {
  margin: 0;
  font-size: 13px;
  color: #718096;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .empty-cities-state {
    padding: 25px 15px;
  }

  .empty-cities-icon {
    width: 60px;
    height: 60px;
  }

  .empty-cities-icon svg {
    width: 40px;
    height: 40px;
  }

  .empty-cities-title {
    font-size: 14px;
  }

  .empty-cities-text {
    font-size: 12px;
  }
}
