/* ============================================
   Annuaire Masseur IDF — Theme Bien-Être
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=Inter:wght@400;500;600&display=swap');

/* --- CSS Variables --- */
:root {
  --green-900: #1b4332;
  --green-800: #2d6a4f;
  --green-700: #40916c;
  --green-600: #52b788;
  --green-500: #74c69d;
  --green-400: #95d5b2;
  --cream-100: #fefae0;
  --cream-200: #faedcd;
  --cream-300: #e9edc9;
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-500: #868e96;
  --gray-700: #495057;
  --gray-900: #212529;
  --shadow-sm: 0 1px 3px rgba(45,106,79,0.08);
  --shadow-md: 0 4px 12px rgba(45,106,79,0.1);
  --shadow-lg: 0 8px 24px rgba(45,106,79,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: 0.25s ease;
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-900);
  background-color: var(--cream-100);
  min-height: 100vh;
}

/* Subtle texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232d6a4f' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

a { color: var(--green-700); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-800); }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.3; }

img { max-width: 100%; height: auto; display: block; }

/* --- Header --- */
.site-header {
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  color: var(--white);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo svg { flex-shrink: 0; }

.site-logo:hover { color: var(--cream-200); }

.header-nav { display: flex; gap: 1.5rem; }

.header-nav a {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color var(--transition);
}
.header-nav a:hover { color: var(--white); }

/* --- Hero / Search Section --- */
.hero {
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green-600) 50%, var(--green-500) 100%);
  color: var(--white);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--cream-100);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.05rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

/* --- Search Bar --- */
.search-container {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.search-container input {
  flex: 1;
  border: none;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--gray-900);
  outline: none;
  background: transparent;
}

.search-container input::placeholder {
  color: var(--gray-500);
}

.search-container button {
  background: var(--green-800);
  color: var(--white);
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-container button:hover { background: var(--green-900); }

/* --- Filters --- */
.filters {
  max-width: 1200px;
  margin: -1rem auto 0;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  position: relative;
  z-index: 10;
}

.filter-select {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-width: 160px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23868e96' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

.filter-select:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(82,183,136,0.15);
}

/* --- Listings Grid --- */
.listings-section {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.listings-count {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

.listings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

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

@media (min-width: 960px) {
  .listings-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- Card --- */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  width: 100%;
  height: 180px;
  background: var(--cream-200);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

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

.card-image-placeholder {
  color: var(--green-400);
  opacity: 0.5;
}

.card-body {
  padding: 1rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--green-900);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.card-address {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  line-height: 1.4;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.stars { color: #f4a261; letter-spacing: 1px; }

.rating-count {
  color: var(--gray-500);
  font-size: 0.8rem;
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-view {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--green-800);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  transition: background var(--transition);
  cursor: pointer;
  border: none;
}

.btn-view:hover { background: var(--green-900); color: var(--white); }

.card-phone {
  font-size: 0.8rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* --- Load More --- */
.load-more-container {
  text-align: center;
  padding: 2rem 0;
}

.btn-load-more {
  background: var(--white);
  color: var(--green-800);
  border: 2px solid var(--green-800);
  padding: 0.75rem 2rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-load-more:hover {
  background: var(--green-800);
  color: var(--white);
}

.btn-load-more:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Listing Detail Page --- */
.listing-detail {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.listing-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--green-800), var(--green-600));
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.listing-hero img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.listing-hero-placeholder {
  color: rgba(255,255,255,0.3);
  font-size: 4rem;
}

.listing-info-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.listing-info-card h1 {
  font-size: 1.75rem;
  color: var(--green-800);
  margin-bottom: 0.5rem;
}

.listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.listing-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.listing-meta-item svg { flex-shrink: 0; color: var(--green-600); }

.listing-description {
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.listing-description.empty {
  color: var(--gray-500);
  font-style: italic;
}

/* --- Action Buttons --- */
.listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn-action svg { flex-shrink: 0; }

.btn-primary {
  background: var(--green-800);
  color: var(--white);
}
.btn-primary:hover { background: var(--green-900); color: var(--white); }

.btn-secondary {
  background: var(--cream-200);
  color: var(--green-800);
}
.btn-secondary:hover { background: var(--cream-300); }

.btn-outline {
  background: transparent;
  color: var(--green-700);
  border: 1.5px solid var(--green-700);
}
.btn-outline:hover { background: var(--green-800); color: var(--white); }

/* --- Map --- */
.listing-map-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

#listing-map {
  height: 300px;
  width: 100%;
}

/* --- Footer --- */
.site-footer {
  background: var(--green-900);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 3rem;
  font-size: 0.85rem;
}

.site-footer a { color: var(--green-400); }

/* --- Loading Spinner --- */
.spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid var(--green-400);
  border-top-color: var(--green-800);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-500);
}

.loading-state .spinner { margin-bottom: 1rem; }

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--gray-500);
}

.empty-state svg { margin-bottom: 1rem; opacity: 0.4; }
.empty-state h3 { color: var(--gray-700); margin-bottom: 0.5rem; }

/* --- Breadcrumb --- */
.breadcrumb {
  max-width: 900px;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.breadcrumb a { color: var(--green-700); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 0.4rem; }

/* --- Back Link --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--green-700);
  margin-bottom: 1rem;
}

.back-link:hover { color: var(--green-800); }

/* --- Responsive --- */
@media (max-width: 639px) {
  .hero h1 { font-size: 1.5rem; }
  .hero { padding: 2rem 1rem 2rem; }
  .search-container { flex-direction: column; border-radius: var(--radius-md); }
  .search-container button { justify-content: center; border-radius: 0; }
  .filters { flex-direction: column; }
  .filter-select { width: 100%; }
  .listing-info-card { padding: 1.25rem; }
  .listing-info-card h1 { font-size: 1.35rem; }
  .listing-actions { flex-direction: column; }
  .btn-action { justify-content: center; }
}

@media (min-width: 640px) and (max-width: 959px) {
  .hero h1 { font-size: 1.75rem; }
}

/* --- Tag badges --- */
.tag-badge {
  display: inline-block;
  background: var(--cream-200);
  color: var(--green-800);
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  margin: 0.15rem;
}

/* --- Skeleton loading --- */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.card-skeleton { height: 300px; }