/* ==========================================================================
   Smart Residences — feuille de style principale
   ========================================================================== */
:root {
  --bg: #FEFCF8;
  --bg-alt: #F5F2EA;
  --ink: #141414;
  --muted: #5C5E63;
  --gold: #C8AE4D;
  --gold-dark: #A08A2E;
  --gold-soft: #F5EFD9;
  --line: #E7E2D6;
  --wa: #25D366;
  --wa-dark: #1DA851;
  --font-head: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(20, 20, 20, .08);
  --container: 1180px;
  --header-h: 112px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1;
  margin: 0 0 .5em;
  letter-spacing: 0;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); line-height: .95; }
h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); }
h3, .h3 { font-size: 1.3rem; font-weight: 750; line-height: 1.2; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: middle; flex: none; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { left: 16px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-family: inherit; font-weight: 700; font-size: .9rem; letter-spacing: 0; line-height: 1.2;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn .icon { width: 20px; height: 20px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--gold-dark); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--gold); color: var(--ink); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-whatsapp { background: var(--wa); color: #fff; }
.btn-whatsapp:hover { background: var(--wa-dark); color: #fff; }
.btn-block { width: 100%; margin-top: 18px; }
.nav-cta { padding: 11px 18px; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(254, 252, 248, .94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(20, 20, 20, .07); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand img { width: 150px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 36px; }
.nav-list { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  position: relative; display: inline-block; padding: 6px 0;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
}
.nav-list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav-list a:hover::after,
.nav-list .current-menu-item > a::after,
.nav-list .current_page_item > a::after { transform: scaleX(1); }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line); border-radius: 10px; padding: 10px; color: var(--ink); cursor: pointer;
}
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle .icon-close, .nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 960px) {
  :root { --header-h: 84px; }
  .brand img { width: 104px; }
  .nav-toggle { display: inline-flex; }
  /* Panneau ancré sous l'en-tête (pas de position:fixed : le backdrop-filter de l'en-tête en ferait le bloc conteneur). */
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 55;
    height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
    display: none; flex-direction: column; align-items: flex-start; gap: 28px;
    padding: 28px 24px; background: var(--bg); border-top: 1px solid var(--line); overflow: auto;
  }
  .site-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; gap: 0; width: 100%; }
  .nav-list a { display: block; font-size: 1rem; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-list a::after { display: none; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 8vw, 112px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head h2 { text-wrap: balance; }
.section-head .btn { margin-top: 8px; }
.lead { font-size: 1.06rem; color: var(--muted); max-width: 64ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin: 0 0 16px;
  font-size: .78rem; font-weight: 780; letter-spacing: .04em; text-transform: uppercase; color: var(--gold-dark);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split-reverse .split-text { order: 2; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split-reverse .split-text { order: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; display: flex; align-items: flex-end;
  min-height: min(88vh, 820px); color: #fff; background: var(--ink);
  isolation: isolate; overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media picture, .hero-media img { width: 100%; height: 100%; }
.hero-media img { object-fit: cover; object-position: center 40%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(12, 12, 12, .16) 0%, rgba(12, 12, 12, .3) 40%, rgba(12, 12, 12, .86) 100%),
    linear-gradient(90deg, rgba(12, 12, 12, .5) 0%, rgba(12, 12, 12, 0) 65%);
}
.hero-content { padding: 120px 0 64px; max-width: 860px; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: #fff; max-width: 15ch; text-wrap: balance; }
.hero-lead { font-size: clamp(1rem, 1.4vw, 1.2rem); max-width: 56ch; color: rgba(255, 255, 255, .86); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-stats {
  list-style: none; margin: 48px 0 0; padding: 28px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .22);
  display: flex; flex-wrap: wrap; gap: 40px;
}
.hero-stats li { display: flex; flex-direction: column; gap: 4px; }
.hero-stats strong { font-family: var(--font-head); font-size: 2rem; font-weight: 800; line-height: 1; }
.hero-stats span { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
@media (max-width: 600px) {
  .hero { min-height: min(82vh, 700px); }
  .hero-content { padding: 96px 0 48px; }
  .hero-stats { gap: 24px 32px; margin-top: 36px; }
}

/* ---------- Le projet ---------- */
.features { display: grid; gap: 22px; margin: 28px 0 32px; }
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature h3 { font-size: 1.1rem; margin-bottom: 4px; }
.feature p { color: var(--muted); margin: 0; }
.feature-icon {
  flex: none; width: 48px; height: 48px; border-radius: 13px;
  display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-dark);
}
.feature-icon .icon { width: 22px; height: 22px; }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mosaic figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #e9e5dc; }
.mosaic picture, .mosaic img { width: 100%; height: 100%; }
.mosaic img { object-fit: cover; }
.mosaic-wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.mosaic figure:not(.mosaic-wide) { aspect-ratio: 3 / 4; }

/* ---------- Cartes ---------- */
.cards { display: grid; gap: 28px; }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(20, 20, 20, .12); }
.card-media { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: #e9e5dc; }
.card-media picture, .card-media img { width: 100%; height: 100%; }
.card-media img { object-fit: cover; }
.card-body { padding: 26px 26px 28px; }
.card-body h3 { font-size: 1.45rem; margin-bottom: 8px; }
.card-body p { color: var(--muted); margin: 0; }
.chips { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-size: .74rem; font-weight: 600; letter-spacing: .04em; padding: 6px 12px; border-radius: 999px;
  background: var(--gold-soft); color: var(--gold-dark);
}
.plan { margin: 40px 0 0; border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.plan img { width: 100%; }
.plan figcaption { padding: 16px 22px; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); }
.service { padding: 34px 30px; }
.service .feature-icon { width: 58px; height: 58px; margin-bottom: 20px; }
.service .feature-icon .icon { width: 26px; height: 26px; }
.service h3 { font-size: 1.2rem; }
.service p { color: var(--muted); margin: 0; }

/* ---------- Galerie ---------- */
.slider {
  position: relative; border-radius: var(--radius); overflow: hidden; background: #111;
  aspect-ratio: 16 / 9; box-shadow: var(--shadow); outline: none;
}
.slider:focus-visible { box-shadow: 0 0 0 3px var(--gold); }
.slider-track { display: flex; height: 100%; transition: transform .6s cubic-bezier(.22, .61, .36, 1); }
.slide { position: relative; min-width: 100%; height: 100%; margin: 0; }
.slide picture, .slide img { width: 100%; height: 100%; }
.slide img { object-fit: cover; }
.slide-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 44px 24px 18px;
  color: #fff; font-size: .9rem; font-weight: 500;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .62));
}
.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .2s;
}
.slider-btn .icon { width: 26px; height: 26px; }
.slider-btn:hover { background: rgba(255, 255, 255, .42); }
.slider-prev { left: 16px; }
.slider-next { right: 16px; }
.thumbs { display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px; margin-top: 12px; }
.thumb {
  padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #e9e5dc;
  cursor: pointer; aspect-ratio: 16 / 10; opacity: .7; transition: opacity .2s, border-color .2s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active, .thumb:hover { opacity: 1; border-color: var(--gold); }
@media (max-width: 760px) {
  .thumbs { display: flex; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .thumb { flex: 0 0 96px; scroll-snap-align: start; }
}

/* ---------- Localisation ---------- */
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #e9e5dc; aspect-ratio: 4 / 3; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-full { aspect-ratio: 21 / 9; min-height: 320px; }
.address { font-style: normal; display: flex; gap: 16px; align-items: flex-start; margin: 24px 0 28px; }
.address strong { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-list a {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; transition: border-color .2s, transform .2s;
}
.contact-list a:hover { border-color: var(--gold); transform: translateX(4px); }
.contact-list .label { display: block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact-list strong { font-weight: 600; }
.contact-list .is-wa .feature-icon { background: #E3F8EA; color: var(--wa-dark); }
.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 36px); box-shadow: var(--shadow);
}
.form-card h3, .form-card .h3 { margin-bottom: 4px; }
.form-card .muted { margin-bottom: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 6px; }
.field label span { color: var(--gold-dark); }
.field input, .field textarea {
  width: 100%; font: inherit; padding: 12px 14px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200, 174, 77, .28); }
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.notice { padding: 14px 16px; border-radius: 10px; margin-bottom: 16px; font-size: .92rem; }
.notice-ok { background: #E8F7EE; color: #1B5E3A; border: 1px solid #BFE8CF; }
.notice-err { background: #FDECEC; color: #8A1F1F; border: 1px solid #F5C2C2; }
.form-note { font-size: .78rem; color: var(--muted); margin: 12px 0 0; text-align: center; }

/* ---------- Bandeau de page ---------- */
.page-hero { background: var(--ink); color: #fff; padding: clamp(56px, 8vw, 96px) 0; }
.page-hero .eyebrow { color: var(--gold); }
.page-hero h1 { color: #fff; }
.page-hero .lead { color: rgba(255, 255, 255, .78); }
.prose { max-width: 760px; }
.prose img { border-radius: 12px; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--ink); color: #CFCABF; padding: clamp(48px, 6vw, 80px) 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr; gap: 40px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { width: 150px; height: auto; border-radius: 6px; }
.footer-brand p { margin: 18px 0 0; max-width: 40ch; font-size: .92rem; }
.site-footer h3 { font-family: var(--font-body); font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-list a { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; transition: color .2s; }
.footer-list a:hover { color: var(--gold); }
.footer-list .icon { width: 18px; height: 18px; color: var(--gold); }
.footer-bottom {
  margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .82rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: #fff; text-decoration: none; }
.footer-bottom a:hover { color: var(--gold); }

/* ---------- WhatsApp flottant ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--wa); color: #fff; padding: 12px 18px 12px 14px; border-radius: 999px;
  font-weight: 600; font-size: .9rem; text-decoration: none;
  box-shadow: 0 12px 28px rgba(37, 211, 102, .4); transition: transform .2s, background .2s;
}
.wa-float:hover { background: var(--wa-dark); transform: translateY(-2px); }
.wa-float .icon { width: 26px; height: 26px; }
@media (max-width: 600px) {
  .wa-float { padding: 14px; }
  .wa-float span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ---------- Accessibilité / mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Barre d'administration WordPress */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
