/* ============================================
   IMMO-VISITE — Style v4 avec dd balance
   ============================================ */

/* --- Variables & Base --- */
:root {
  /* Palette */
  --color-bg: #faf9f7;
  --color-bg-alt: #f3f1ed;
  --color-surface: #ffffff;
  --color-text: #2c2c2c;
  --color-text-soft: #5a5a5a;
  --color-text-muted: #8a8a8a;
  --color-accent: #3d5a4c;
  --color-accent-hover: #2e4639;
  --color-border: #e5e3df;
  --color-border-soft: #eeece8;
  
  /* Typo */
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  
  /* Espacements */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  
  /* Autres */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-soft: 0 2px 8px rgba(44, 44, 44, 0.06);
  --shadow-medium: 0 4px 20px rgba(44, 44, 44, 0.08);
  --transition: 0.2s ease;
}

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

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-hover);
}

/* --- Skip link --- */
.skip {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  z-index: 9999;
}

.skip:focus {
  top: var(--space-md);
  color: white;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ============================================
   TOPBAR / NAVIGATION
   ============================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-soft);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: var(--space-lg);
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.brand__dot {
  width: 10px;
  height: 10px;
  background: var(--color-accent);
  border-radius: 50%;
}

.brand__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.brand__subtitle {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav a:not(.btn) {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-soft);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav a:not(.btn):hover {
  color: var(--color-text);
  background: var(--color-border-soft);
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav a:not(.btn) {
    display: none;
  }
  .topbar__inner {
    height: 60px;
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--color-accent);
  color: white;
  text-decoration: none;
}

.btn:hover {
  background: var(--color-accent-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

.btn--small {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: var(--space-2xl) 0 var(--space-3xl);
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-2xl);
  align-items: center;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  .hero__media {
    order: -1;
  }
}

/* Pill */
.pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-accent);
  background: rgba(61, 90, 76, 0.08);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  margin-bottom: var(--space-md);
  letter-spacing: 0.01em;
}

/* Hero text */
.hero__text h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.lead {
  font-size: 1.05rem;
  color: var(--color-text-soft);
  line-height: 1.7;
  max-width: 540px;
}

/* KPIs */
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border-soft);
}

.kpi {
  min-width: 120px;
}

.kpi__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.kpi__value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-text);
}

.kpi__hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.15rem;
}

/* Hero CTA */
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.fineprint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: var(--space-lg);
  font-style: italic;
}

/* Hero media */
.hero__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
}

.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,0,0,0.06);
  pointer-events: none;
}

.cover {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: var(--space-3xl) 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section__head {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.section__head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.section__head p {
  color: var(--color-text-soft);
  font-size: 0.95rem;
}

/* ============================================
   CARDS (highlights)
   ============================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--color-border-soft);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-medium);
  border-color: var(--color-border);
}

.icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  filter: grayscale(0.2);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.card__text {
  font-size: 0.9rem;
  color: var(--color-text-soft);
  line-height: 1.6;
}

/* ============================================
   EMBED (Matterport)
   ============================================ */
.embed {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.embed__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
}

.embed__hint {
  text-align: center;
  padding: var(--space-lg);
  color: var(--color-text-soft);
  font-size: 0.9rem;
}

.embed__hint code {
  display: inline-block;
  background: var(--color-surface);
  padding: 0.2em 0.5em;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
  margin-top: var(--space-xs);
}

.actions {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  flex-wrap: wrap;
}

/* ============================================
   GALLERY (Photos)
   ============================================ */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.shot {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  transition: all var(--transition);
}

.shot:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

.shot img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.shot figcaption {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  color: var(--color-text-soft);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border-soft);
}

/* ============================================
   TWO-COL LAYOUT (Détails, Quartier, Contact)
   ============================================ */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.panel {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--color-border-soft);
}

.panel h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border-soft);
}

.dpe-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.dpe-badge svg {
  flex-shrink: 0;
  transform: scale(1.5);
  transform-origin: right center; }

/* Specs (dl) */
.specs {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.specs > div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-xs) 0;
  border-bottom: 1px dashed var(--color-border-soft);
}

.specs > div:last-child {
  border-bottom: none;
}

.specs dt {
  font-size: 0.9rem;
  color: var(--color-text-soft);
  min-width: 16ch;
}

.specs dd {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  text-align: right;
  text-wrap: balance;
}

/* List */
.list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.list li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  color: var(--color-text-soft);
}

.list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  background: var(--color-accent);
  border-radius: 50%;
  opacity: 0.6;
}

.muted {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: var(--space-md);
  font-style: italic;
}

/* Notice */
.notice {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background: rgba(61, 90, 76, 0.05);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-accent);
  font-size: 0.9rem;
  color: var(--color-text-soft);
}

.notice strong {
  color: var(--color-text);
}

/* ============================================
   MAP
   ============================================ */
.map {
  margin-top: var(--space-md);
}

.map__placeholder {
  aspect-ratio: 16/10;
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.big {
  font-size: 1.1rem;
  line-height: 2;
}

.big a {
  font-weight: 500;
}

.contact .actions {
  justify-content: flex-start;
  margin-top: var(--space-lg);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer__links {
  display: flex;
  gap: var(--space-sm);
}

.footer__links a {
  color: var(--color-text-soft);
}

.footer__links a:hover {
  color: var(--color-accent);
}

/* ============================================
   RESPONSIVE FINE-TUNING
   ============================================ */
@media (max-width: 600px) {
  :root {
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
  }
  
  .container {
    padding: 0 var(--space-md);
  }
  
  .hero__meta {
    gap: var(--space-md);
  }
  
  .kpi {
    flex: 1 1 calc(50% - var(--space-md));
    min-width: 0;
  }
  
  .gallery {
    grid-template-columns: 1fr;
  }
  
  .two-col, .contact {
    grid-template-columns: 1fr;
  }
  
  .footer {
    flex-direction: column;
    text-align: center;
  }
}

/* Subtle entrance animations */
@media (prefers-reduced-motion: no-preference) {
  .hero__text,
  .hero__media,
  .card,
  .panel,
  .shot {
    animation: fadeUp 0.5s ease both;
  }
  
  .hero__media { animation-delay: 0.1s; }
  .card:nth-child(1) { animation-delay: 0.05s; }
  .card:nth-child(2) { animation-delay: 0.1s; }
  .card:nth-child(3) { animation-delay: 0.15s; }
  
  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
