:root {
  --ink: #14213D;
  --surface: #F7F8FA;
  --accent: #0E8A63;
  --accent-dark: #0A6B4D;
  --accent-light: #E3F3EC;
  --accent-lighter: #F2FAF6;
  --warning: #FDCB6E;
  --danger: #E63946;
  --muted: #8C93A6;
  --border: #E4E7ED;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(20, 33, 61, 0.08);
  --shadow-hover: 0 16px 40px rgba(14, 138, 99, 0.18);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Sora', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: white; border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; font-family: 'Sora', sans-serif; }
.logo-badge {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex; align-items: center; justify-content: center; color: white; font-size: 18px;
}
.nav-links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--accent); }
.btn-contact-header {
  background: var(--accent); color: white; padding: 10px 20px; border-radius: 999px;
  font-weight: 600; font-size: 14px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--ink) 0%, #1F3A5C 100%);
  color: white; padding: 64px 0 40px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(14,138,99,0.35), transparent 70%);
}
.hero h1 { font-size: 36px; margin-bottom: 12px; position: relative; color: white; }
.hero p { color: rgba(255,255,255,0.75); font-size: 16px; margin-bottom: 28px; position: relative; }

/* ---------- Search bar ---------- */
.search-bar {
  background: white; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  display: flex; gap: 12px; flex-wrap: wrap; position: relative;
}
.search-bar select, .search-bar input {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 14px;
  font-family: inherit; color: var(--ink); background: white; flex: 1; min-width: 140px;
}
.search-bar button {
  background: var(--accent); color: white; border: none; border-radius: 10px;
  padding: 12px 28px; font-weight: 600; font-size: 14px; cursor: pointer; transition: background 0.2s;
}
.search-bar button:hover { background: var(--accent-dark); }

/* ---------- Grille de biens ---------- */
.biens-section { padding: 48px 0 80px; }
.section-title { font-size: 24px; margin-bottom: 24px; }
.biens-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px;
}

/* ---------- Carte bien ---------- */
.bien-card {
  background: white; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex; flex-direction: column;
}
.bien-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.bien-photo { position: relative; aspect-ratio: 4/3; background: var(--accent-light); overflow: hidden; }
.bien-photo img { width: 100%; height: 100%; object-fit: cover; }
.bien-badge {
  position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,0.95);
  color: var(--accent); padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.bien-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.bien-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.bien-location { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.bien-specs { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.bien-price {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace; font-size: 17px; font-weight: 600; color: var(--accent-dark);
}

/* ---------- Fiche detail ---------- */
.detail-header { padding: 32px 0 20px; }
.detail-gallery {
  display: grid; grid-template-columns: 2fr 1fr; gap: 8px; border-radius: var(--radius); overflow: hidden;
  max-height: 420px;
}
.detail-gallery img { width: 100%; height: 100%; object-fit: cover; }
.detail-gallery .thumbs { display: grid; grid-template-rows: 1fr 1fr; gap: 8px; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; padding: 40px 0 80px; }
.detail-specs { display: flex; gap: 24px; padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 20px 0; }
.spec-item { display: flex; flex-direction: column; gap: 2px; }
.spec-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.spec-value { font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 15px; }

.contact-card {
  background: white; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; position: sticky; top: 96px; height: fit-content;
}
.contact-card .price { font-family: 'JetBrains Mono', monospace; font-size: 24px; font-weight: 700; color: var(--accent-dark); margin-bottom: 16px; }
.contact-card input, .contact-card textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 12px;
  font-family: inherit; font-size: 14px;
}
.contact-card button {
  width: 100%; background: var(--accent); color: white; border: none; border-radius: 10px;
  padding: 14px; font-weight: 600; font-size: 15px; cursor: pointer; transition: background 0.2s;
}
.contact-card button:hover { background: var(--accent-dark); }
.success-msg { background: var(--accent-light); color: var(--accent-dark); padding: 14px; border-radius: 10px; font-size: 14px; text-align: center; }

#map { border-radius: var(--radius); height: 300px; margin-top: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 40px 0; margin-top: 40px; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .contact-card { position: static; }
  .detail-gallery { grid-template-columns: 1fr; max-height: none; }
  .detail-gallery .thumbs { display: none; }
  .hero h1 { font-size: 26px; }
}
@media (max-width: 600px) {
  .search-bar { flex-direction: column; }
  .biens-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ameliore ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.65); padding: 56px 0 24px; margin-top: 40px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand { display: flex; align-items: center; gap: 10px; color: white; font-size: 18px; font-weight: 700; font-family: 'Sora', sans-serif; margin-bottom: 12px; }
.footer-desc { max-width: 280px; line-height: 1.6; }
.footer-col h4 { color: white; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; font-family: 'Inter', sans-serif; font-weight: 600; }
.footer-col a, .footer-col p { display: block; color: rgba(255,255,255,0.65); margin-bottom: 10px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; flex-wrap: wrap; gap: 12px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.footer-social a:hover { background: var(--accent); }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
