/* Styles communs pour les pages publiques Trop Petit */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f5f5;
  color: #000;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  background-color: white;
  min-height: 100vh;
}

/* Header */
.header {
  padding: 16px;
  background: #00D4AA;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo {
  height: 40px;
}

.header-logo img {
  height: 100%;
  width: auto;
}

.header-title {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}

.back-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f5f5f7;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 12px;
}

.share-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f5f5f7;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Content */
.content {
  padding: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  margin-top: 24px;
}

.info-grid {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.info-row:not(:last-child) {
  border-bottom: 1px solid #e5e5e5;
}

.info-icon {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  opacity: 0.6;
}

.info-label {
  color: #666;
  font-size: 14px;
}

.info-value {
  font-size: 14px;
  font-weight: 600;
  text-align: right;
}

.description {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 24px;
}

/* Profile Section */
.profile-section {
  padding: 24px 16px;
  text-align: center;
  background: white;
  border-bottom: 1px solid #e5e5e5;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 16px;
  overflow: hidden;
  background: #e5e5e7;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 600;
  color: #666;
  background: #e5e5e7;
}

.profile-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.profile-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 16px;
}

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

.meta-item svg {
  width: 20px;
  height: 20px;
  opacity: 0.6;
}

/* Listings */
.listings-header {
  padding: 16px;
  font-size: 18px;
  font-weight: 600;
  background: #f9f9f9;
  border-bottom: 1px solid #e5e5e5;
}

.listings-count {
  display: inline-block;
  background: #00d4aa;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 14px;
  margin-left: 8px;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
}

.listing-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

.listing-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.listing-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #f5f5f7;
  overflow: hidden;
}

.listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.listing-image-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}

.listing-favorite {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.listing-favorite svg {
  width: 16px;
  height: 16px;
}

.listing-price {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
}

.listing-info {
  padding: 12px;
}

.listing-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
}

.listing-location {
  font-size: 12px;
  color: #666;
}

.listing-date {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

/* Location & Map */
.location-section {
  margin-bottom: 24px;
}

.location-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
}

.map-container {
  width: 100%;
  height: 200px;
  background: #f0f0f0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.map-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
}

#map {
  width: 100%;
  height: 200px;
  min-height: 200px;
  pointer-events: auto; /* Allow map to load but disable some interactions via CSS */
  z-index: 1;
}

/* Disable Leaflet interactions via CSS */
#map .leaflet-control-container {
  display: none !important;
}

#map .leaflet-clickable {
  cursor: default !important;
}

/* Seller Section */
.seller-section {
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin: 0 0 24px 0;
}

.seller-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.seller-title {
  font-size: 18px;
  font-weight: 600;
}

.report-button {
  color: #ff3b30;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.report-button:hover {
  text-decoration: underline;
}

.seller-info {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.seller-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e5e5e7;
  margin-right: 12px;
  overflow: hidden;
}

.seller-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seller-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: #666;
  background: #e5e5e7;
}

.seller-details {
  flex: 1;
}

.seller-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.seller-meta {
  font-size: 13px;
  color: #666;
}

/* CTA Button */
.cta-section {
  padding: 16px;
  position: sticky;
  bottom: 0;
  background: white;
  border-top: 1px solid #e5e5e5;
  z-index: 1000;
}

.cta-button {
  width: 100%;
  padding: 16px;
  background: #00d4aa;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cta-button:hover {
  background: #00bf99;
  transform: translateY(-1px);
}

/* App Banner */
.app-banner {
  padding: 24px 16px;
  background: #00d4aa !important;
  text-align: center;
  border-top: none;
  position: relative;
  bottom: auto;
  font-size: 13px;
  color: white;
  margin-bottom: 0;
  border-radius: 0;
}

.app-banner h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: white;
}

.app-banner p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
}

.store-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: white;
  color: #00d4aa;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  min-width: 120px;
}

/* Full width buttons on mobile */
@media (max-width: 480px) {
  .store-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .store-button {
    width: 100%;
    max-width: none;
  }
}

.store-button:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.store-button svg {
  width: 20px;
  height: 20px;
}

.app-link {
  color: white;
  text-decoration: underline;
  font-weight: 600;
}

/* Empty State */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: #666;
}

.empty-state svg {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #333;
}

.empty-state p {
  font-size: 14px;
}

/* Error State */
.error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  text-align: center;
}

.error h2 {
  font-size: 24px;
  margin-bottom: 12px;
}

.error p {
  font-size: 16px;
  color: #86868b;
  margin-bottom: 24px;
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-size: 18px;
  color: #86868b;
}

/* Responsive */
@media (min-width: 600px) {
  .container {
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    min-height: auto;
    overflow-x: hidden;
  }

  .header {
    border-radius: 12px 12px 0 0;
  }
  
  .header + .profile-section {
    border-radius: 0;
  }

  .cta-section {
    position: relative;
    border-radius: 0 0 12px 12px;
  }

  .app-banner {
    border-radius: 0;
  }
}

/* Styles spécifiques à la page listing */

/* Stats section */
.stats {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
  margin-top: 8px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Image carousel */
.image-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f5f5f7;
  margin-bottom: 0;
}

.carousel-inner {
  display: flex;
  transition: transform 0.3s ease;
  height: 100%;
}

.carousel-item {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-indicators {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.3s;
}

.indicator.active {
  background: white;
}

/* Main info section */
.main-info {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 0;
  line-height: 1.3;
  flex: 1;
}

.price-display {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Supprimer le prix sur l'image - on garde seulement celui à droite du titre */
.price {
  display: none;
}

.stats {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.heart-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 10;
}

.heart-button svg {
  width: 20px;
  height: 20px;
}

/* Footer */
.footer {
  background: #111827;
  color: white;
  padding: 4rem 1rem;
  margin-top: 0;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  background: transparent !important;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-description {
  color: #9CA3AF;
  line-height: 1.6;
}

.footer-title {
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #D1D5DB;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #9CA3AF;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 2rem;
  text-align: center;
  color: #9CA3AF;
}