/* ==========================================================================
   Sofiane Amrouni Immobilier — Agence Centrale Immo (Aubenas)
   Feuille de style partagée — charte "luxe discret"
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&family=Jost:wght@300;400;500;600&display=swap');

:root {
  --black: #14120f;
  --charcoal: #1e1b17;
  --charcoal-light: #2a2620;
  --gold: #b3894a;
  --gold-light: #d9b878;
  --gold-dim: rgba(179, 137, 74, 0.35);
  --cream: #f8f4ec;
  --cream-dark: #eee4d0;
  --ivory: #fffdf9;
  --text-dark: #201d18;
  --text-light: #6e6455;
  --text-on-dark: #efe8db;
  --text-on-dark-dim: #b8ad9a;
  --border-light: rgba(20, 18, 15, 0.1);
  --shadow: 0 20px 50px rgba(20, 18, 15, 0.12);
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--text-dark);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 600; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); }

p { margin: 0 0 1.2em; color: var(--text-light); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1em;
}

.section {
  padding: 96px 0;
}
.section--tight { padding: 64px 0; }
.section--dark {
  background: var(--charcoal);
  color: var(--text-on-dark);
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--ivory); }
.section--dark p { color: var(--text-on-dark-dim); }
.section--cream-dark { background: var(--cream-dark); }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 34px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn--gold {
  background: var(--gold);
  color: var(--ivory);
}
.btn--gold:hover { background: var(--gold-light); }
.btn--outline {
  background: transparent;
  border-color: currentColor;
  color: var(--text-dark);
}
.btn--outline:hover { background: var(--text-dark); color: var(--ivory); }
.section--dark .btn--outline,
.hero .btn--outline { color: var(--ivory); }
.section--dark .btn--outline:hover,
.hero .btn--outline:hover { background: var(--ivory); color: var(--charcoal); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--border-light);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--text-dark);
}
.brand-text span {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 3px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.main-nav ul {
  display: flex;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
  padding-bottom: 4px;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.main-nav a:hover::after,
.main-nav a.is-active::after { transform: scaleX(1); }

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--gold);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  font-weight: 500;
  padding: 10px 16px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.header-phone:hover { background: var(--gold); color: var(--ivory); }
.header-phone-icon { font-size: 0.95rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 26px;
  height: 1px;
  background: var(--text-dark);
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    inset: 88px 0 0 0;
    background: var(--ivory);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 40px 24px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul {
    flex-direction: column;
    gap: 24px;
    width: 100%;
  }
  .main-nav a { font-size: 1.05rem; }
  .nav-toggle { display: flex; }
  .header-phone-text { display: none; }
  .header-phone { padding: 10px 12px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  color: var(--ivory);
  background:
    linear-gradient(180deg, rgba(20,18,15,0.35) 0%, rgba(20,18,15,0.55) 55%, rgba(20,18,15,0.85) 100%),
    linear-gradient(135deg, #2c2620 0%, #1b1814 60%, #14120f 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(115deg, rgba(179,137,74,0.06) 0px, rgba(179,137,74,0.06) 1px, transparent 1px, transparent 90px);
  pointer-events: none;
}
.hero-content {
  position: relative;
  padding-bottom: 90px;
  max-width: 720px;
}
.hero h1 { color: var(--ivory); margin-bottom: 0.4em; }
.hero .eyebrow { color: var(--gold-light); }
.hero-lead {
  font-size: 1.15rem;
  color: var(--text-on-dark-dim);
  max-width: 540px;
}
.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.hero-meta {
  display: flex;
  gap: 36px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.hero-meta div { font-size: 0.82rem; letter-spacing: 0.04em; color: var(--text-on-dark-dim); }
.hero-meta strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--gold-light);
  font-weight: 500;
}

.page-hero {
  background: var(--charcoal);
  color: var(--ivory);
  padding: 160px 0 70px;
}
.page-hero h1 { color: var(--ivory); }
.page-hero p { color: var(--text-on-dark-dim); max-width: 560px; }

/* ---------- Grids / Cards ---------- */
.grid {
  display: grid;
  gap: 32px;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--ivory);
  border: 1px solid var(--border-light);
  padding: 40px 32px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-family: var(--font-serif);
  font-style: italic;
}
.card h3 { margin-bottom: 0.5em; }
.card p { margin-bottom: 0; font-size: 0.94rem; }

/* ---------- Placeholder media block (remplacer par vraies photos) ---------- */
.media-block {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #2c2620, #b3894a 140%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.75);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  text-align: center;
  padding: 20px;
  overflow: hidden;
}
.media-block--square { aspect-ratio: 1 / 1; }
.media-block--tall { aspect-ratio: 3 / 4; }
.media-block img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Listings (annonces) ---------- */
.listing-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.listing-filters button {
  padding: 10px 22px;
  border: 1px solid var(--border-light);
  background: var(--ivory);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}
.listing-filters button.is-active,
.listing-filters button:hover {
  background: var(--text-dark);
  color: var(--ivory);
  border-color: var(--text-dark);
}

.listing-card {
  background: var(--ivory);
  border: 1px solid var(--border-light);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
a.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.listing-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.listing-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--gold);
  color: var(--ivory);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
}
.listing-media { position: relative; }
.listing-body { padding: 26px 28px 30px; }
.listing-price {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 6px;
}
.listing-title { font-size: 1.05rem; margin-bottom: 8px; }
.listing-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 0.02em;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
  margin-top: 14px;
}
.listing-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
  font-style: italic;
  grid-column: 1 / -1;
}

/* ---------- Fiche détaillée d'un bien ---------- */
.section--detail { padding-top: 132px; }

.back-link {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 36px;
}
.back-link:hover { color: var(--gold); }

.listing-detail-head { margin-bottom: 40px; }
.listing-detail-head h1 { margin-bottom: 0.4em; }
.listing-detail-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.listing-detail-price {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  color: var(--gold);
}
.btn--call { font-size: 0.9rem; padding: 16px 30px; }
@media (max-width: 620px) {
  .btn--call {
    width: 100%;
    justify-content: center;
    font-size: 0.82rem;
    padding: 15px 20px;
  }
}

/* Barre d'appel fixe en bas d'écran (mobile) */
.call-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: var(--charcoal);
  border-top: 1px solid var(--gold-dim);
  box-shadow: 0 -8px 24px rgba(20, 18, 15, 0.25);
}
.call-bar-info { display: flex; flex-direction: column; min-width: 0; }
.call-bar-info strong {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--gold-light);
  font-weight: 500;
}
.call-bar-info span {
  font-size: 0.72rem;
  color: var(--text-on-dark-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.call-bar .btn { padding: 13px 24px; white-space: nowrap; }

@media (max-width: 860px) {
  .call-bar { display: flex; }
  /* on laisse la place à la barre fixe */
  body.has-call-bar { padding-bottom: 82px; }
}

.gallery { margin-bottom: 64px; }
.gallery-main {
  background: var(--charcoal);
  overflow: hidden;
}
.gallery-main img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.gallery-thumb {
  padding: 0;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  overflow: hidden;
  line-height: 0;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.65;
}
.gallery-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.is-active {
  border-color: var(--gold);
  opacity: 1;
}

.listing-detail-body {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 860px) {
  .listing-detail-body { grid-template-columns: 1fr; gap: 40px; }
}

.listing-detail-text h2 { margin-bottom: 0.8em; }
.atouts-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 28px;
}
@media (max-width: 620px) {
  .atouts-list { grid-template-columns: 1fr; }
}
.atouts-list li {
  position: relative;
  padding-left: 24px;
  color: var(--text-light);
  font-size: 0.94rem;
}
.atouts-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 1px;
  background: var(--gold);
}

.listing-honoraires {
  font-size: 0.85rem;
  font-style: italic;
  border-top: 1px solid var(--border-light);
  padding-top: 18px;
  margin-top: 28px;
}

.listing-detail-aside {
  background: var(--ivory);
  border: 1px solid var(--border-light);
  padding: 34px 30px;
  position: sticky;
  top: 112px;
}
.listing-detail-aside h3 {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 22px;
}
@media (max-width: 860px) {
  .listing-detail-aside { position: static; }
}

.spec-list { margin: 0 0 32px; }
.spec-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}
.spec-list dt { color: var(--text-light); }
.spec-list dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
  color: var(--text-dark);
}

.listing-detail-cta { border-top: 1px solid var(--border-light); padding-top: 26px; }
.listing-detail-cta p {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 16px;
}
.listing-detail-cta .btn {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 10px;
}

/* ---------- Blog ---------- */
.blog-card { display: flex; flex-direction: column; }
.blog-card .listing-body { flex: 1; display: flex; flex-direction: column; }
.blog-card .eyebrow { margin-bottom: 0.6em; }
.blog-card .btn { margin-top: auto; align-self: flex-start; }
.blog-article {
  max-width: 760px;
  margin: 0 auto;
}
.blog-article h2 { margin-top: 1.4em; }
.blog-article ul, .blog-article ol { color: var(--text-light); padding-left: 1.2em; }
.blog-article li { margin-bottom: 0.5em; }
.blog-article blockquote {
  border-left: 3px solid var(--gold);
  margin: 2em 0;
  padding: 0.2em 0 0.2em 24px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-dark);
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) {
  .form-grid { grid-template-columns: 1fr; }
}
label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
}
input, select, textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  border: 1px solid var(--border-light);
  background: var(--ivory);
  color: var(--text-dark);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
}
textarea { resize: vertical; min-height: 130px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--black);
  color: var(--text-on-dark-dim);
  padding: 72px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h4 {
  color: var(--gold-light);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-weight: 600;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; font-size: 0.92rem; }
.site-footer a:hover { color: var(--ivory); }
.footer-brand { font-family: var(--font-serif); color: var(--ivory); font-size: 1.3rem; margin-bottom: 10px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
  font-size: 0.78rem;
  color: var(--text-light);
}
.social-row { display: flex; gap: 14px; }
.social-row a {
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.social-row a:hover { border-color: var(--gold); color: var(--gold-light); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.divider {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 24px;
}
.divider--left { margin: 0 0 24px; }
