/* ==========================================================================
   GREEN IMMOBILIER — Feuille de style
   Direction artistique : vert profond, ivoire, sable, anthracite.
   Typographies : Playfair Display (titres) · Inter (texte)
                  Amiri / IBM Plex Sans Arabic (arabe)
   ========================================================================== */

:root {
  --green-950: #0F1F17;
  --green-900: #15291F;
  --green-800: #1C3528;
  --green-700: #264634;
  --green-600: #33593F;
  --olive: #7D8F2C;            /* accent issu du logo */
  --olive-soft: #A7B35E;
  --ivory: #F7F4EE;
  --paper: #FBFAF7;
  --sand: #EEE7DA;
  --sand-2: #E3D9C7;
  --ink: #191C1A;
  --graphite: #343936;
  --muted: #6B6F6A;
  --line: #DDD5C6;
  --line-dark: rgba(255,255,255,.14);
  --white: #fff;
  --wa: #1F8F55;

  --f-display: "Playfair Display", Georgia, serif;
  --f-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --container: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 2px;
  --header-h: 84px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --shadow: 0 18px 40px -22px rgba(15,31,23,.35);
}

html[lang="ar"] {
  --f-display: "Amiri", "Noto Naskh Arabic", serif;
  --f-body: "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }
::selection { background: var(--green-800); color: var(--ivory); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--green-800); color: #fff; padding: 10px 16px; }
.skip:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 10vw, 140px); }
.section--sand { background: var(--sand); }
.section--ivory { background: var(--ivory); }
.section--dark { background: var(--green-900); color: var(--ivory); }

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--olive);
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: currentColor; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 14px; }
.section--dark .eyebrow { color: var(--olive-soft); }
h1, h2, h3, .display { font-family: var(--f-display); font-weight: 500; line-height: 1.08; letter-spacing: -.01em; margin: 0; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] .display { line-height: 1.35; letter-spacing: 0; font-weight: 700; }
.h1 { font-size: clamp(40px, 6.2vw, 86px); }
.h2 { font-size: clamp(34px, 4.6vw, 60px); }
.h3 { font-size: clamp(26px, 2.6vw, 34px); }
.lead { font-size: clamp(17px, 1.35vw, 19px); color: var(--graphite); max-width: 62ch; }
.section--dark .lead { color: rgba(247,244,238,.78); }
.muted { color: var(--muted); }
.section-head { display: grid; gap: 22px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head--split { grid-template-columns: 1.1fr .9fr; align-items: end; gap: 40px; }
@media (max-width: 860px) { .section-head--split { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--green-800); --fg: var(--ivory); --bd: var(--green-800);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border: 1px solid var(--bd); background: var(--bg); color: var(--fg);
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; border-radius: var(--radius);
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
  white-space: nowrap;
}
html[lang="ar"] .btn { letter-spacing: 0; font-size: 15px; }
.btn:hover { --bg: var(--green-950); --bd: var(--green-950); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .35s var(--ease); }
.btn:hover svg.arrow { transform: translateX(4px); }
html[dir="rtl"] svg.arrow { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover svg.arrow { transform: scaleX(-1) translateX(4px); }
.btn--ghost { --bg: transparent; --fg: var(--green-800); --bd: var(--green-800); }
.btn--ghost:hover { --bg: var(--green-800); --fg: var(--ivory); }
.btn--light { --bg: var(--ivory); --fg: var(--green-900); --bd: var(--ivory); }
.btn--light:hover { --bg: #fff; --fg: var(--green-950); --bd: #fff; }
.btn--outline-light { --bg: transparent; --fg: var(--ivory); --bd: rgba(247,244,238,.5); }
.btn--outline-light:hover { --bg: var(--ivory); --fg: var(--green-900); --bd: var(--ivory); }
.btn--wa { --bg: var(--wa); --bd: var(--wa); --fg: #fff; }
.btn--wa:hover { --bg: #187647; --bd: #187647; }
.btn--block { width: 100%; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-800); padding-bottom: 6px; border-bottom: 1px solid currentColor;
}
html[lang="ar"] .link-arrow { letter-spacing: 0; font-size: 15px; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .35s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }
html[dir="rtl"] .link-arrow:hover svg { transform: scaleX(-1) translateX(4px); }
.section--dark .link-arrow { color: var(--ivory); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  color: var(--ivory); transition: background .4s var(--ease), color .4s var(--ease), box-shadow .4s var(--ease), height .4s var(--ease);
}
.site-header::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: rgba(247,244,238,.18); transition: opacity .4s; }
.site-header.is-solid, body.page-light .site-header {
  background: rgba(251,250,247,.96); color: var(--ink); box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
}
.site-header.is-solid::after, body.page-light .site-header::after { opacity: 0; }
.site-header.is-compact { height: 68px; }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand img { width: 38px; height: 38px; }
.brand-text { display: grid; line-height: 1; }
.brand-name { font-family: "Playfair Display", serif; font-weight: 600; font-size: 25px; letter-spacing: .16em; }
.brand-sub { font-size: 9.5px; font-weight: 600; letter-spacing: .5em; text-transform: uppercase; opacity: .75; margin-top: 5px; padding-inline-start: 2px; }
.main-nav { margin-inline-start: auto; }
.main-nav ul { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 28px); list-style: none; margin: 0; padding: 0; }
.main-nav a { position: relative; font-size: 13px; font-weight: 500; letter-spacing: .04em; padding-block: 8px; white-space: nowrap; }
html[lang="ar"] .main-nav a { font-size: 15px; letter-spacing: 0; }
.main-nav a::after { content: ""; position: absolute; inset-inline: 0; bottom: 2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; border: 1px solid currentColor; border-radius: var(--radius); opacity: .9; }
.lang-switch button { min-width: 34px; height: 32px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; opacity: .55; transition: opacity .3s, background .3s; }
.lang-switch button[aria-pressed="true"] { opacity: 1; background: currentColor; }
.lang-switch button[aria-pressed="true"] span { color: var(--green-900); }
.site-header.is-solid .lang-switch button[aria-pressed="true"] span, body.page-light .lang-switch button[aria-pressed="true"] span { color: var(--ivory); }
.lang-switch button:hover { opacity: 1; }
.header-cta { min-height: 42px; padding: 0 18px; font-size: 11.5px; }
.site-header:not(.is-solid) .header-cta { --bg: transparent; --fg: var(--ivory); --bd: rgba(247,244,238,.6); }
body.page-light .site-header .header-cta { --bg: var(--green-800); --fg: var(--ivory); --bd: var(--green-800); }
.site-header:not(.is-solid) .header-cta:hover { --bg: var(--ivory); --fg: var(--green-900); }
.burger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; }
.burger span { display: block; width: 24px; height: 1.5px; background: currentColor; position: relative; }
.burger span::before, .burger span::after { content: ""; position: absolute; inset-inline: 0; height: 1.5px; background: currentColor; }
.burger span::before { top: -7px; } .burger span::after { top: 7px; }

@media (max-width: 1240px) {
  .main-nav, .header-actions .header-cta { display: none; }
  .burger { display: inline-flex; }
  .header-actions { margin-inline-start: auto; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 60; background: var(--green-900); color: var(--ivory);
  display: flex; flex-direction: column; padding: 22px var(--gutter) 32px;
  opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility .45s;
  overflow-y: auto;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; }
.mobile-menu nav { margin-block: 48px auto; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mobile-menu nav a { font-family: var(--f-display); font-size: clamp(30px, 8vw, 44px); line-height: 1.25; display: inline-block; transform: translateY(14px); opacity: 0; transition: transform .6s var(--ease), opacity .6s var(--ease); }
.mobile-menu.is-open nav a { transform: none; opacity: 1; }
.mobile-menu nav li:nth-child(n) a { transition-delay: calc(var(--i) * 45ms + 120ms); }
.mobile-menu-foot { display: grid; gap: 16px; padding-top: 28px; border-top: 1px solid var(--line-dark); font-size: 15px; }
.close-btn { width: 44px; height: 44px; position: relative; }
.close-btn::before, .close-btn::after { content: ""; position: absolute; left: 10px; right: 10px; top: 50%; height: 1.5px; background: currentColor; transform: rotate(45deg); }
.close-btn::after { transform: rotate(-45deg); }
body.no-scroll { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: max(720px, 100svh); display: flex; flex-direction: column; color: var(--ivory); background: var(--green-950); isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: heroZoom 14s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,31,23,.55) 0%, rgba(15,31,23,.12) 32%, rgba(15,31,23,.25) 58%, rgba(15,31,23,.82) 100%); }
.hero-content { margin-top: auto; padding-top: calc(var(--header-h) + 60px); padding-bottom: 36px; }
.hero .eyebrow { color: var(--ivory); opacity: .9; }
.hero h1 { margin: 22px 0 22px; max-width: 13ch; }
.hero-sub { max-width: 52ch; font-size: clamp(16px, 1.4vw, 19px); color: rgba(247,244,238,.88); margin: 0; }
.hero-caption { display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 12px; letter-spacing: .08em; color: rgba(247,244,238,.7); padding-block: 18px 26px; }
.hero-caption a { display: inline-flex; gap: 10px; align-items: center; }
.hero-caption .scroll-line { width: 1px; height: 36px; background: rgba(247,244,238,.5); position: relative; overflow: hidden; }
.hero-caption .scroll-line::after { content: ""; position: absolute; inset: 0; background: var(--ivory); animation: scrollLine 2.4s var(--ease) infinite; }
@keyframes scrollLine { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* Search panel */
.search-panel { background: var(--paper); color: var(--ink); border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); margin-top: 44px; }
.search-tabs { display: flex; border-bottom: 1px solid var(--line); }
.search-tabs button { padding: 16px 26px; font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); position: relative; }
html[lang="ar"] .search-tabs button { letter-spacing: 0; font-size: 15px; }
.search-tabs button[aria-selected="true"] { color: var(--green-800); }
.search-tabs button[aria-selected="true"]::after { content: ""; position: absolute; inset-inline: 20px; bottom: -1px; height: 2px; background: var(--green-800); }
.search-fields { display: grid; grid-template-columns: 1.1fr 1.1fr .8fr .8fr auto; }
.field { display: grid; gap: 4px; padding: 16px 22px; border-inline-end: 1px solid var(--line); min-width: 0; }
.field label, .field .label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .field label, html[lang="ar"] .field .label { letter-spacing: 0; font-size: 13px; }
.field select, .field input { border: 0; background: transparent; padding: 4px 0; font-size: 15.5px; font-weight: 500; outline: none; width: 100%; min-width: 0; }
.field select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23343936' stroke-width='1.4'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 2px center; padding-inline-end: 22px; cursor: pointer; }
html[dir="rtl"] .field select { background-position: left 2px center; }
.search-submit { min-height: auto; margin: 10px; padding-inline: 34px; }
@media (max-width: 1080px) {
  .search-fields { grid-template-columns: 1fr 1fr; }
  .field:nth-child(2n) { border-inline-end: 0; }
  .field { border-bottom: 1px solid var(--line); }
  .search-submit { grid-column: 1 / -1; min-height: 54px; }
}
@media (max-width: 560px) {
  .search-tabs button { flex: 1; padding: 14px 6px; font-size: 11.5px; letter-spacing: .08em; }
  .field { padding: 12px 16px; }
}

/* ---------- Intro / services ---------- */
.intro-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.intro-grid .h2 { font-size: clamp(30px, 3.6vw, 48px); }
.services { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: clamp(56px, 8vw, 96px); }
.service { padding: 34px 32px 6px 0; border-inline-end: 1px solid var(--line); }
.service + .service { padding-inline-start: 32px; }
.service:last-child { border-inline-end: 0; }
.service-num { font-family: "Playfair Display", serif; font-size: 15px; color: var(--olive); letter-spacing: .1em; }
.service h3 { font-size: 30px; margin: 10px 0 12px; }
.service p { margin: 0 0 22px; color: var(--graphite); }
@media (max-width: 900px) {
  .intro-grid { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .service, .service + .service { padding: 28px 0; border-inline-end: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Exceptional (editorial) ---------- */
.exception { display: grid; gap: clamp(72px, 10vw, 140px); }
.ex-item { display: grid; grid-template-columns: repeat(12, 1fr); align-items: center; gap: 24px; }
.ex-media { grid-column: 1 / span 8; position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--sand-2); }
.ex-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.ex-item:hover .ex-media img { transform: scale(1.04); }
.ex-media-2 { position: absolute; width: 38%; aspect-ratio: 3/4; bottom: -1px; inset-inline-end: -1px; border: 10px solid var(--paper); border-bottom: 0; border-inline-end: 0; overflow: hidden; }
.section--sand .ex-media-2 { border-color: var(--sand); }
.ex-media-2 img { width: 100%; height: 100%; object-fit: cover; }
.ex-body { grid-column: 9 / span 4; padding-inline-start: clamp(0px, 2vw, 32px); }
.ex-item:nth-child(even) .ex-media { grid-column: 5 / span 8; grid-row: 1; }
.ex-item:nth-child(even) .ex-body { grid-column: 1 / span 4; grid-row: 1; padding-inline: 0 clamp(0px, 2vw, 32px); }
.ex-index { font-family: "Playfair Display", serif; font-size: 15px; color: var(--olive); letter-spacing: .12em; }
.ex-body h3 { font-size: clamp(30px, 3vw, 42px); margin: 14px 0 12px; }
.ex-place { color: var(--muted); font-size: 14px; letter-spacing: .04em; }
.ex-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 24px 0; padding-block: 18px; border-block: 1px solid var(--line); font-size: 14px; color: var(--graphite); }
.ex-price { font-family: var(--f-display); font-size: 30px; color: var(--green-800); margin-bottom: 26px; }
@media (max-width: 900px) {
  .ex-item, .ex-item:nth-child(even) { grid-template-columns: 1fr; }
  .ex-media, .ex-body, .ex-item:nth-child(even) .ex-media, .ex-item:nth-child(even) .ex-body { grid-column: 1; grid-row: auto; padding: 0; }
  .ex-media-2 { width: 34%; border-width: 6px; }
}

/* ---------- Property cards ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3vw, 44px) clamp(20px, 2.4vw, 32px); }
@media (max-width: 1080px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-cards { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; background: transparent; position: relative; }
.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), opacity .5s; }
.card:hover .card-media img { transform: scale(1.05); }
.card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,31,23,.35), transparent 35%, transparent 70%, rgba(15,31,23,.35)); pointer-events: none; }
.badges { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 6px 10px; background: var(--paper); color: var(--green-900); border-radius: var(--radius); }
html[lang="ar"] .badge { letter-spacing: 0; font-size: 12px; }
.badge--dark { background: var(--green-800); color: var(--ivory); }
.badge--muted { background: rgba(25,28,26,.75); color: #fff; }
.card-photos { position: absolute; bottom: 12px; inset-inline-end: 14px; z-index: 2; color: #fff; font-size: 12px; display: flex; gap: 6px; align-items: center; }
.card-photos svg { width: 15px; height: 15px; }
.card-body { padding-top: 20px; display: flex; flex-direction: column; flex: 1; }
.card-place { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .card-place { letter-spacing: 0; font-size: 13px; }
.card-title { font-family: var(--f-display); font-size: 22px; line-height: 1.18; margin: 8px 0 14px; font-weight: 500; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-specs { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--graphite); padding-block: 14px; border-top: 1px solid var(--line); margin-top: auto; }
.spec { display: inline-flex; align-items: center; gap: 7px; }
.spec svg { width: 17px; height: 17px; color: var(--green-700); flex: none; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.price { font-family: var(--f-display); font-size: 23px; font-weight: 600; color: var(--green-800); line-height: 1.1; }
html[lang="ar"] .price { font-weight: 700; font-size: 24px; }
.price small { font-family: var(--f-body); font-size: 13px; font-weight: 500; color: var(--muted); }
.card-cta { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--green-800); display: inline-flex; gap: 8px; align-items: center; position: relative; z-index: 2; }
html[lang="ar"] .card-cta { letter-spacing: 0; font-size: 14px; }
.card-cta svg { width: 15px; height: 15px; transition: transform .35s var(--ease); }
.card:hover .card-cta svg { transform: translateX(4px); }
html[dir="rtl"] .card:hover .card-cta svg { transform: scaleX(-1) translateX(4px); }
.card.is-off .card-media img { filter: saturate(.75); }

/* ---------- Categories ---------- */
.cats { display: grid; grid-template-columns: repeat(var(--n, 6), 1fr); gap: 12px; }
.cat { position: relative; aspect-ratio: 3 / 4; overflow: hidden; color: var(--ivory); display: flex; align-items: flex-end; background: var(--green-800); }
.cat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.cat::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 40%, rgba(15,31,23,.85)); transition: background .5s; }
.cat:hover img { transform: scale(1.06); }
.cat-body { position: relative; z-index: 2; padding: 20px; width: 100%; }
.cat-body h3 { font-size: 24px; }
.cat-body span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.cat--empty { background: var(--green-700); }
@media (max-width: 1080px) { .cats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .cats { grid-template-columns: repeat(2, 1fr); } .cat-body { padding: 14px; } .cat-body h3 { font-size: 20px; } }

/* ---------- About teaser / values ---------- */
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.about-media { position: relative; aspect-ratio: 4/5; overflow: hidden; }
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.values { list-style: none; padding: 0; margin: 34px 0 40px; display: grid; }
.values li { display: grid; grid-template-columns: 46px 1fr; gap: 12px; padding-block: 18px; border-top: 1px solid var(--line); }
.section--dark .values li { border-color: var(--line-dark); }
.values li:last-child { border-bottom: 1px solid var(--line); }
.section--dark .values li:last-child { border-color: var(--line-dark); }
.values b { display: block; font-family: var(--f-display); font-size: 23px; font-weight: 500; margin-bottom: 4px; }
.values p { margin: 0; font-size: 15px; color: var(--muted); }
.section--dark .values p { color: rgba(247,244,238,.68); }
.values .n { font-family: "Playfair Display", serif; color: var(--olive); font-size: 15px; padding-top: 6px; }
.section--dark .values .n { color: var(--olive-soft); }
@media (max-width: 900px) { .about-split { grid-template-columns: 1fr; } .about-media { aspect-ratio: 4/3; } }

/* ---------- Zones ---------- */
.zones { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-dark); }
.zone { padding: 28px 24px 30px 0; border-inline-end: 1px solid var(--line-dark); display: grid; gap: 8px; transition: background .4s; }
.zone + .zone { padding-inline-start: 24px; }
.zone:last-child { border-inline-end: 0; }
.zone h3 { font-size: 28px; }
.zone span { font-size: 13px; color: rgba(247,244,238,.65); }
.zone:hover h3 { color: var(--olive-soft); }
@media (max-width: 900px) { .zones { grid-template-columns: 1fr 1fr; } .zone, .zone + .zone { padding: 22px 16px 22px 0; border-bottom: 1px solid var(--line-dark); } .zone:nth-child(2n) { border-inline-end: 0; padding-inline-start: 16px; } }

/* ---------- CTA band ---------- */
.cta-band { position: relative; color: var(--ivory); isolation: isolate; overflow: hidden; }
.cta-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(15,31,23,.9), rgba(15,31,23,.55)); }
html[dir="rtl"] .cta-band::before { background: linear-gradient(270deg, rgba(15,31,23,.9), rgba(15,31,23,.55)); }
.cta-band .container { padding-block: clamp(80px, 10vw, 140px); }
.cta-band h2 { max-width: 18ch; margin: 18px 0; }
.cta-band p { max-width: 52ch; color: rgba(247,244,238,.82); margin: 0 0 34px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: calc(var(--header-h) + clamp(48px, 7vw, 96px)) 0 clamp(40px, 5vw, 64px); background: var(--ivory); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(42px, 6vw, 80px); margin: 18px 0 16px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.breadcrumb a:hover { color: var(--green-800); }
.breadcrumb span[aria-hidden] { opacity: .5; }

/* ---------- Catalogue ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-top: 34px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 10px 18px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13.5px; font-weight: 500; background: var(--paper); transition: all .3s var(--ease); }
.chip:hover { border-color: var(--green-800); }
.chip[aria-pressed="true"] { background: var(--green-800); border-color: var(--green-800); color: var(--ivory); }
.catalog { display: grid; grid-template-columns: 290px 1fr; gap: clamp(32px, 4vw, 64px); align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 26px; }
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.filters-head h2 { font-size: 28px; }
.f-group { display: grid; gap: 10px; }
.f-group > .label { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--graphite); }
html[lang="ar"] .f-group > .label { letter-spacing: 0; font-size: 13.5px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); }
.seg button { padding: 10px 4px; font-size: 12.5px; font-weight: 500; border-inline-end: 1px solid var(--line); transition: background .3s; }
.seg button:last-child { border-inline-end: 0; }
.seg button[aria-pressed="true"] { background: var(--green-800); color: var(--ivory); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); background: var(--paper); padding: 12px 14px; border-radius: var(--radius);
  font-size: 15px; transition: border-color .3s, box-shadow .3s; outline: none;
}
.select { appearance: none; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23343936' stroke-width='1.4'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; padding-inline-end: 36px; }
html[dir="rtl"] .select { background-position: left 14px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(38,70,52,.12); }
.textarea { min-height: 140px; resize: vertical; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills button { min-width: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 13.5px; }
.pills button[aria-pressed="true"] { background: var(--green-800); color: var(--ivory); border-color: var(--green-800); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--green-800); width: 17px; height: 17px; margin-top: 3px; flex: none; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 30px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.toolbar .count { font-family: var(--f-display); font-size: 24px; }
.toolbar .select { width: auto; padding-block: 9px; font-size: 14px; }
.filters-toggle { display: none; }
.filters-mobile-foot { display: none; }
.empty { padding: 70px 30px; text-align: center; background: var(--ivory); border: 1px solid var(--line); }
.empty p { font-family: var(--f-display); font-size: 26px; margin: 0 0 24px; }
@media (max-width: 1000px) {
  .catalog { grid-template-columns: 1fr; }
  .filters-toggle { display: inline-flex; }
  .filters {
    position: fixed; inset: 0; z-index: 70; background: var(--paper); padding: 22px var(--gutter) 110px; overflow-y: auto;
    transform: translateY(100%); transition: transform .5s var(--ease); align-content: start;
  }
  .filters.is-open { transform: none; }
  .filters-mobile-foot { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; position: fixed; bottom: 0; inset-inline: 0; padding: 14px var(--gutter); background: var(--paper); border-top: 1px solid var(--line); }
  .filters:not(.is-open) .filters-mobile-foot { display: none; }
}

/* ---------- Property detail ---------- */
.prop-head { padding: calc(var(--header-h) + 36px) 0 28px; }
.prop-title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-top: 22px; }
.prop-title-row h1 { font-size: clamp(34px, 4.4vw, 60px); max-width: 22ch; }
.prop-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; color: var(--muted); font-size: 14.5px; margin-top: 14px; }
.prop-price { text-align: end; flex: none; }
.prop-price .price { font-size: clamp(32px, 3.4vw, 46px); }
@media (max-width: 760px) { .prop-title-row { flex-direction: column; align-items: flex-start; } .prop-price { text-align: start; } }

.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 8px; height: clamp(360px, 62vh, 640px); }
.gallery button { position: relative; overflow: hidden; background: var(--sand-2); padding: 0; }
.gallery button:first-child { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .4s; }
.gallery button:hover img { transform: scale(1.04); }
.gallery-all { position: absolute; bottom: 16px; inset-inline-end: 16px; z-index: 2; }
.gallery-all .btn { min-height: 44px; font-size: 11.5px; }
.gallery-wrap { position: relative; }
@media (max-width: 760px) {
  .gallery { display: flex; height: auto; overflow-x: auto; scroll-snap-type: x mandatory; gap: 6px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery button { flex: 0 0 86%; aspect-ratio: 4/3; scroll-snap-align: center; }
}

.prop-layout { display: grid; grid-template-columns: 1fr 380px; gap: clamp(40px, 6vw, 96px); align-items: start; padding-block: clamp(48px, 6vw, 80px); }
.prop-section { padding-block: 40px; border-top: 1px solid var(--line); }
.prop-section:first-child { border-top: 0; padding-top: 0; }
.prop-section h2 { font-size: clamp(28px, 2.8vw, 36px); margin-bottom: 24px; }
.keyfacts { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--ivory); }
.keyfact { padding: 20px 22px; border-inline-end: 1px solid var(--line); }
.keyfact:last-child { border-inline-end: 0; }
.keyfact svg { width: 22px; height: 22px; color: var(--green-700); margin-bottom: 10px; }
.keyfact b { display: block; font-family: var(--f-display); font-size: 28px; font-weight: 500; line-height: 1; }
.keyfact span { font-size: 13px; color: var(--muted); }
@media (max-width: 600px) { .keyfacts { grid-template-columns: 1fr 1fr; } .keyfact:nth-child(2) { border-inline-end: 0; } .keyfact:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
.prose p { margin: 0 0 14px; color: var(--graphite); }
.prose p:first-child { font-family: var(--f-display); font-size: 25px; line-height: 1.3; color: var(--ink); }
.prose.is-collapsed { max-height: 420px; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.read-more { margin-top: 10px; }
.lang-note { font-size: 13px; color: var(--muted); font-style: italic; margin-bottom: 18px; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: start; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.spec-table th { font-weight: 500; color: var(--muted); width: 45%; }
.amenities { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; list-style: none; padding: 0; margin: 0; }
.amenities li { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.amenities svg { width: 18px; height: 18px; color: var(--olive); flex: none; }
@media (max-width: 520px) { .amenities { grid-template-columns: 1fr; } }
.map-frame { position: relative; aspect-ratio: 16 / 9; background: var(--sand); border: 1px solid var(--line); overflow: hidden; }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(.35) contrast(1.02); }
.map-note { font-size: 13px; color: var(--muted); margin-top: 12px; }

.side-card { position: sticky; top: calc(var(--header-h) + 20px); background: var(--paper); border: 1px solid var(--line); padding: 30px; box-shadow: var(--shadow); }
.side-card h3 { font-size: 28px; margin-bottom: 8px; }
.side-card > p { color: var(--muted); font-size: 14.5px; margin: 0 0 22px; }
.side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 24px; }
.side-actions .btn { padding-inline: 12px; }
.agent { display: flex; gap: 14px; align-items: center; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.agent img { width: 48px; height: 48px; padding: 8px; background: var(--ivory); border: 1px solid var(--line); }
.agent b { display: block; font-size: 15px; }
.agent span { font-size: 13px; color: var(--muted); }
@media (max-width: 1000px) { .prop-layout { grid-template-columns: 1fr; } .side-card { position: static; } }

/* Sticky mobile contact bar */
.mobile-bar { display: none; }
@media (max-width: 760px) {
  .mobile-bar { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; position: fixed; bottom: 0; inset-inline: 0; z-index: 40; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(251,250,247,.97); border-top: 1px solid var(--line); }
  .mobile-bar .btn { min-height: 48px; padding: 0 8px; font-size: 11px; letter-spacing: .08em; }
  body.has-mobile-bar { padding-bottom: 76px; }
}

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-field { display: grid; gap: 7px; }
.form-field label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--graphite); }
html[lang="ar"] .form-field label { letter-spacing: 0; font-size: 14px; }
.form-field .err { font-size: 12.5px; color: #A2382B; min-height: 0; }
.form-field.invalid .input, .form-field.invalid .textarea, .form-field.invalid .select { border-color: #A2382B; }
.form-ok { display: none; padding: 24px; background: var(--ivory); border: 1px solid var(--line); }
.form-ok.is-visible { display: grid; gap: 12px; animation: fadeUp .6s var(--ease); }
.form-ok b { font-family: var(--f-display); font-size: 26px; font-weight: 500; }
.form-ok p { margin: 0; color: var(--muted); font-size: 14.5px; }
.form-ok .btn-row .btn { flex: 1; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.radio-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.radio-cards label { position: relative; display: block; cursor: pointer; }
.radio-cards input { position: absolute; opacity: 0; }
.radio-cards span { display: block; text-align: center; padding: 14px 8px; border: 1px solid var(--line); font-size: 14px; font-weight: 500; transition: all .3s; text-transform: none; letter-spacing: 0; color: var(--ink); }
.radio-cards input:checked + span { background: var(--green-800); border-color: var(--green-800); color: var(--ivory); }
.radio-cards input:focus-visible + span { outline: 2px solid var(--olive); outline-offset: 2px; }
@media (max-width: 560px) { .radio-cards { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 100px); }
.contact-list { list-style: none; margin: 0 0 36px; padding: 0; }
.contact-list li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 20px 0; border-top: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list svg { width: 22px; height: 22px; color: var(--green-700); margin-top: 4px; }
.contact-list .label { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .contact-list .label { letter-spacing: 0; font-size: 13px; }
.contact-list a, .contact-list .val { font-family: var(--f-display); font-size: 24px; display: block; line-height: 1.3; }
.contact-list a:hover { color: var(--green-600); }
.contact-list [dir="ltr"] { unicode-bidi: isolate; }
.panel { background: var(--paper); border: 1px solid var(--line); padding: clamp(24px, 4vw, 48px); }
.panel h2 { font-size: 34px; margin-bottom: 26px; }
.map-full { height: clamp(320px, 45vw, 520px); position: relative; border-top: 1px solid var(--line); }
.map-full iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.3); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); font-size: 16px; }
.steps li::before { content: "0" counter(s); font-family: "Playfair Display", serif; color: var(--olive); font-size: 22px; line-height: 1.2; }

/* ---------- Quote ---------- */
.quote { font-family: var(--f-display); font-size: clamp(32px, 4.4vw, 58px); line-height: 1.15; max-width: 22ch; margin: 0; }
.quote cite { display: block; margin-top: 24px; font-family: var(--f-body); font-style: normal; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--olive-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-950); color: rgba(247,244,238,.78); padding-top: clamp(64px, 8vw, 110px); font-size: 15px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 64px; }
.site-footer .brand { color: var(--ivory); margin-bottom: 22px; }
.site-footer h4 { font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ivory); margin: 6px 0 20px; }
html[lang="ar"] .site-footer h4 { letter-spacing: 0; font-size: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a:hover { color: var(--ivory); }
.socials { display: flex; gap: 10px; margin-top: 24px; }
.socials a { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line-dark); transition: background .3s, border-color .3s; }
.socials a:hover { background: var(--ivory); color: var(--green-950); border-color: var(--ivory); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-block: 26px; border-top: 1px solid var(--line-dark); font-size: 13px; color: rgba(247,244,238,.55); }
@media (max-width: 960px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }

/* Floating WhatsApp */
.wa-float { position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 45; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px -10px rgba(0,0,0,.45); transition: transform .35s var(--ease); }
.wa-float:hover { transform: translateY(-3px); }
.wa-float svg { width: 28px; height: 28px; }
@media (max-width: 760px) { body.has-mobile-bar .wa-float { display: none; } }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(12,20,16,.97); color: var(--ivory); display: grid; grid-template-rows: auto 1fr auto; opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; font-size: 14px; letter-spacing: .1em; }
.lb-stage { position: relative; display: grid; place-items: center; overflow: hidden; padding: 0 70px; touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 190px); object-fit: contain; transition: opacity .3s; user-select: none; -webkit-user-drag: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border: 1px solid rgba(247,244,238,.3); display: grid; place-items: center; transition: background .3s; }
.lb-nav:hover { background: rgba(247,244,238,.12); }
.lb-nav svg { width: 22px; height: 22px; }
.lb-prev { inset-inline-start: 12px; } .lb-next { inset-inline-end: 12px; }
html[dir="rtl"] .lb-nav svg { transform: scaleX(-1); }
.lb-thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 14px 20px 20px; scrollbar-width: thin; justify-content: safe center; }
.lb-thumbs button { flex: none; width: 86px; height: 60px; opacity: .45; transition: opacity .3s; outline-offset: 2px; }
.lb-thumbs button[aria-current="true"] { opacity: 1; outline: 1px solid var(--ivory); }
.lb-thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .lb-stage { padding: 0; } .lb-nav { display: none; } .lb-thumbs button { width: 64px; height: 46px; } }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }
/* Le masque s'applique aux enfants : un élément entièrement masqué ne serait jamais détecté par IntersectionObserver */
.img-reveal > * { clip-path: inset(0 0 100% 0); transition: clip-path 1.3s var(--ease); }
.img-reveal.is-in > * { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal, .img-reveal > *, .hero-in { opacity: 1; transform: none; clip-path: none; }
  html { scroll-behavior: auto; }
}

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--green-900); color: var(--ivory); padding: 12px 20px; font-size: 14px; opacity: 0; transition: all .4s var(--ease); z-index: 95; pointer-events: none; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Apparition du hero au chargement (indépendante du défilement) */
.hero-in { opacity: 0; animation: fadeUp 1.1s var(--ease) forwards; animation-delay: var(--d, 0ms); }
@media (max-width: 640px) {
  .hero-media::after { background: linear-gradient(180deg, rgba(15,31,23,.6) 0%, rgba(15,31,23,.35) 40%, rgba(15,31,23,.85) 100%); }
}
.catalog > * { min-width: 0; }
@media (max-width: 560px) {
  .toolbar { flex-wrap: wrap; }
  .toolbar > div { width: 100%; }
  .toolbar > div > * { flex: 1; }
  .toolbar .select { width: 100%; }
}
