/* =========================================================================
   Horizon Immobilier — design system
   A calm, trustworthy palette (deep navy + warm sand) for a property agency.
   ========================================================================= */

:root {
    /* Palette derived from the GAHO Immo-BTP logo (glossy steel / denim blue). */
    --ink: #1c3653;
    --brand: #35618c;
    --brand-700: #274b6e;
    --brand-100: #e7eef6;
    --accent: #5e93c6;
    --accent-600: #3f79ad;
    --bg: #ffffff;
    --surface: #f5f7f9;
    --surface-2: #eef1f4;
    --line: #e2e8ee;
    --text: #22303c;
    --muted: #607283;
    --white: #ffffff;
    --success: #2e7d5b;
    --danger: #c0392b;

    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 2px rgba(20, 32, 46, .06), 0 2px 8px rgba(20, 32, 46, .05);
    --shadow: 0 6px 24px rgba(20, 32, 46, .10);
    --shadow-lg: 0 18px 50px rgba(20, 32, 46, .16);
    --container: 1180px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Base --------------------------------------------------------------- */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-700); }
img { max-width: 100%; display: block; }
p { margin: 0 0 1rem; }

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .72rem 1.35rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    transition: transform .06s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
    white-space: nowrap;
    line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-700); color: #fff; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-600); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #f1f3f6; color: var(--ink); }
.btn--whatsapp { background: #25d366; color: #fff; }
.btn--whatsapp:hover { background: #1eb658; color: #fff; }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #a12a1d; color: #fff; }
.btn--sm { padding: .5rem .9rem; font-size: .85rem; }
.btn--block { width: 100%; }

/* ---- Public header ------------------------------------------------------ */
/* The blur lives on a pseudo-element: a backdrop-filter on .site-header itself
   would become the containing block for the position:fixed mobile drawer. */
.site-header {
    position: sticky;
    top: 0;
    /* Above .wa-float (60), which would otherwise paint over the mobile drawer. */
    z-index: 70;
    isolation: isolate;
}
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 1;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: background .3s ease, border-color .3s ease, box-shadow .3s ease, opacity .35s ease;
}
.site-header.is-scrolled::before {
    background: rgba(255, 255, 255, .94);
    border-bottom-color: var(--line);
    box-shadow: 0 8px 28px rgba(20, 32, 46, .07);
}

/* Reading progress, revealed once the glass bar is solid. */
.scroll-progress {
    position: absolute; left: 0; bottom: -1px;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    transform: scaleX(0); transform-origin: 0 50%;
    opacity: 0; transition: opacity .3s ease;
}
.site-header.is-scrolled .scroll-progress { opacity: 1; }

/* ---- Transparent header laid over the hero (homepage) ------------------- */
body.has-overlay-header .site-header { position: fixed; top: 0; left: 0; right: 0; }
body.has-overlay-header .hero__content { padding-top: 152px; }
/* Scoped on .js: without the script the header never turns solid on scroll, so
   it must stay the plain glass bar instead of white-on-white over the content. */
.js .site-header--overlay { background: linear-gradient(180deg, rgba(10, 18, 28, .55), rgba(10, 18, 28, 0)); transition: background .35s ease; }
.js .site-header--overlay.is-scrolled { background: transparent; }
.js .site-header--overlay:not(.is-scrolled)::before { opacity: 0; }

.js .site-header--overlay:not(.is-scrolled) .brand__name { color: #fff; }
.js .site-header--overlay:not(.is-scrolled) .brand__logo { filter: brightness(0) invert(1); }
.js .site-header--overlay:not(.is-scrolled) .nav__link { color: rgba(255, 255, 255, .84); }
.js .site-header--overlay:not(.is-scrolled) .nav__link:hover,
.js .site-header--overlay:not(.is-scrolled) .nav__link.is-active { color: #fff; }
.js .site-header--overlay:not(.is-scrolled) .nav__pill { background: rgba(255, 255, 255, .18); }
.js .site-header--overlay:not(.is-scrolled) .lang-switch { background: rgba(255, 255, 255, .16); }
.js .site-header--overlay:not(.is-scrolled) .lang-switch a { color: rgba(255, 255, 255, .82); }
.js .site-header--overlay:not(.is-scrolled) .lang-switch a.is-active { background: #fff; color: var(--ink); }
.js .site-header--overlay:not(.is-scrolled) .header-actions .btn--primary {
    background: #fff; color: var(--ink); box-shadow: 0 8px 22px rgba(8, 16, 26, .28);
}
.js .site-header--overlay:not(.is-scrolled) .nav-toggle { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .32); }
.js .site-header--overlay:not(.is-scrolled) .nav-toggle span { background: #fff; }
.brand__name, .brand__logo, .nav-toggle { transition: color .3s ease, filter .3s ease, background .3s ease, border-color .3s ease; }
/* The drawer is white, so the controls that stay on top of it must go dark
   again while it is open — otherwise they are white on white in overlay mode. */
.site-header.is-open .nav-toggle { background: #fff; border-color: var(--line); }
.site-header.is-open .nav-toggle span { background: var(--ink); }
.site-header.is-open .lang-switch { background: var(--surface-2); }
.site-header.is-open .lang-switch a { color: var(--muted); }
.site-header.is-open .lang-switch a.is-active { background: #fff; color: var(--ink); }

/* The floating WhatsApp bubble would sit on top of the open drawer. */
.wa-float { transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease; }
body.no-scroll .wa-float { opacity: 0; pointer-events: none; }
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 74px;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; color: var(--ink); font-size: 1.15rem; letter-spacing: -.02em; }
.brand--header { transition: opacity .2s ease; }
.brand--header:hover { opacity: .78; color: var(--ink); }
.brand__mark {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, var(--brand), var(--brand-700));
    color: #fff; display: grid; place-items: center; font-size: 1rem; font-weight: 800;
}
.brand__logo { height: 44px; width: auto; display: block; }
.brand__name em { font-style: normal; font-weight: 600; color: var(--brand); }
.login-card__brand .brand__logo, .admin-sidebar__brand .brand__logo { height: 54px; }
.admin-sidebar__brand .brand__logo { height: 44px; }

/* Nav: a single pill slides between items (hover, then back to the active one).
   Without JS the pill stays hidden and .is-active keeps its own background. */
.nav { position: relative; display: flex; flex-wrap: nowrap; align-items: center; gap: .1rem; }
.nav__pill {
    position: absolute; top: 50%; left: 0;
    height: 38px; width: 0; margin-top: -19px;
    border-radius: 999px; background: var(--brand-100);
    opacity: 0; pointer-events: none;
    transition: transform .34s cubic-bezier(.4, .9, .3, 1), width .34s cubic-bezier(.4, .9, .3, 1), opacity .2s ease;
}
.nav.is-ready .nav__pill { opacity: 1; }
.nav__link {
    position: relative; z-index: 1;
    color: var(--muted); font-weight: 600; font-size: .93rem;
    padding: .55rem .95rem; border-radius: 999px;
    transition: color .2s ease;
}
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--brand); }
.nav:not(.is-ready) .nav__link.is-active { background: var(--brand-100); }
.nav__item { position: relative; display: flex; align-items: center; }
.nav__caret { width: 12px; height: 12px; margin-left: .32rem; opacity: .7; transition: transform .25s ease; }
.nav__item.is-open .nav__caret { transform: rotate(180deg); }
.nav__drawer-foot { display: none; }

/* ---- Mega-menu (property types) ---------------------------------------- */
.megamenu {
    position: absolute; top: 100%; left: 50%; z-index: 5;
    width: 470px; max-width: 92vw;
    padding-top: 14px;
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateX(-50%) translateY(-8px);
    transition: opacity .22s ease, transform .3s cubic-bezier(.4, .9, .3, 1), visibility .3s;
}
.nav__item.is-open .megamenu {
    opacity: 1; visibility: visible; pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.megamenu__panel {
    background: #fff; border: 1px solid var(--line); border-radius: 18px;
    padding: 1rem; box-shadow: var(--shadow-lg);
}
.megamenu__label {
    margin: 0 0 .55rem .4rem; font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.megamenu__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem; }
.megacard {
    display: flex; align-items: center; gap: .7rem;
    padding: .6rem .65rem; border-radius: 12px;
    transition: background .18s ease;
}
.megacard:hover { background: var(--surface); }
/* A lone last card fills the row instead of leaving a hole. */
.megacard:last-child:nth-child(odd) { grid-column: 1 / -1; }
.megacard__icon {
    flex: none; width: 38px; height: 38px; border-radius: 11px;
    display: grid; place-items: center;
    background: var(--brand-100); color: var(--brand);
    transition: background .18s ease, color .18s ease;
}
.megacard:hover .megacard__icon { background: var(--brand); color: #fff; }
.megacard__icon svg { width: 20px; height: 20px; }
.megacard__body { display: flex; flex-direction: column; line-height: 1.28; }
.megacard__name { font-weight: 600; font-size: .93rem; color: var(--ink); }
.megacard__count { font-size: .76rem; color: var(--muted); }
.megamenu__all {
    display: inline-flex; align-items: center; gap: .4rem;
    margin: .45rem 0 0 .2rem; padding: .5rem .45rem;
    font-size: .87rem; font-weight: 600;
}
.megamenu__all span { transition: transform .2s ease; }
.megamenu__all:hover span { transform: translateX(4px); }

.header-actions { display: flex; align-items: center; gap: .7rem; }
.header-actions .btn--primary { box-shadow: 0 6px 16px rgba(53, 97, 140, .26); }
.header-actions .btn--primary:hover { transform: translateY(-1px); }

/* Segmented control (light track, white thumb on the selected locale). */
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border-radius: 999px; }
.lang-switch a {
    padding: .32rem .62rem; border-radius: 999px;
    font-size: .74rem; font-weight: 700; letter-spacing: .04em; color: var(--muted);
    transition: color .2s ease, background .2s ease;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.nav-toggle {
    display: none; position: relative; z-index: 80;
    width: 42px; height: 42px; padding: 0;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
}
.nav-toggle span {
    position: absolute; left: 11px; width: 20px; height: 2px; border-radius: 2px; background: var(--ink);
    transition: top .28s ease, transform .28s ease, opacity .18s ease;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.site-header.is-open .nav-toggle span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.site-header.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

.nav-backdrop { display: none; }
body.no-scroll { overflow: hidden; }

/* Visible focus ring for keyboard users, without a permanent outline on click. */
.nav__link:focus-visible, .lang-switch a:focus-visible, .nav-toggle:focus-visible, .brand:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 999px;
}

/* ---- Hero --------------------------------------------------------------- */
.hero { position: relative; color: #fff; isolation: isolate; overflow: hidden; perspective: 1000px; }

/* Background photo (behind everything) with a slow Ken-Burns drift.
   .hero__media carries a gradient so a missing image still looks intentional. */
.hero__media {
    position: absolute; inset: 0; z-index: -3; overflow: hidden;
    background: linear-gradient(135deg, var(--brand) 0%, var(--ink) 70%);
}
.hero__media img {
    width: 100%; height: 100%; object-fit: cover;
    transform: scale(1.08); transform-origin: center;
    animation: heroKenBurns 26s ease-in-out infinite alternate;
    will-change: transform;
}

/* Readability overlay: deep on the left (under the text), clearer on the right. */
.hero__overlay {
    position: absolute; inset: 0; z-index: -2;
    background:
        linear-gradient(103deg, rgba(15,26,40,.92) 0%, rgba(17,32,50,.72) 46%, rgba(20,42,66,.34) 100%),
        linear-gradient(0deg, rgba(12,22,34,.55) 0%, rgba(12,22,34,0) 34%);
}

/* Soft coloured light that slowly breathes across the scene. */
.hero__glow {
    position: absolute; inset: -20%; z-index: -2; pointer-events: none;
    background: radial-gradient(42% 55% at 78% 30%, rgba(94,147,198,.42), transparent 70%);
    mix-blend-mode: screen; animation: heroGlow 14s ease-in-out infinite alternate;
}

/* Floating blurred orbs add depth + are the parallax targets. */
.hero__decor { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero__orb {
    position: absolute; border-radius: 50%; filter: blur(6px); opacity: .55;
    mix-blend-mode: screen; will-change: transform;
}
.hero__orb--1 { width: 320px; height: 320px; top: 8%; right: 10%;
    background: radial-gradient(circle at 35% 35%, rgba(140,193,235,.9), rgba(53,97,140,0) 68%);
    animation: heroFloat 12s ease-in-out infinite; }
.hero__orb--2 { width: 200px; height: 200px; bottom: 12%; right: 26%;
    background: radial-gradient(circle at 40% 40%, rgba(94,147,198,.85), rgba(53,97,140,0) 70%);
    animation: heroFloat 16s ease-in-out infinite reverse; }
.hero__orb--3 { width: 140px; height: 140px; top: 46%; right: 6%;
    background: radial-gradient(circle at 40% 40%, rgba(207,227,245,.7), rgba(53,97,140,0) 72%);
    animation: heroFloat 9s ease-in-out infinite; }

/* Brand watermark in the empty left band of the hero — light, discreet. */
.hero__watermark {
    position: absolute; left: 9%; top: 50%; z-index: 0;
    height: 62%; width: auto; max-width: 21%; object-fit: contain;
    opacity: .17; pointer-events: none;
    transform: translateY(-50%);
    animation: heroWatermark 9s ease-in-out infinite alternate;
}
@keyframes heroWatermark {
    from { transform: translateY(-52%); }
    to   { transform: translateY(-48%); }
}
@media (prefers-reduced-motion: reduce) { .hero__watermark { animation: none; } }
@media (max-width: 1200px) { .hero__watermark { display: none; } }

.hero__content { padding: 92px 0 100px; max-width: 640px; position: relative; z-index: 1; transform-style: preserve-3d; }
/* Staggered entrance for the text. */
.hero__content > * { opacity: 0; animation: heroRise .9s cubic-bezier(.22,.61,.36,1) forwards; }
.hero__content > *:nth-child(1) { animation-delay: .10s; }
.hero__content > *:nth-child(2) { animation-delay: .22s; }
.hero__content > *:nth-child(3) { animation-delay: .34s; }
.hero__content > *:nth-child(4) { animation-delay: .46s; }

.hero__eyebrow {
    display: inline-block; text-transform: uppercase; letter-spacing: .14em;
    font-size: .78rem; font-weight: 700; color: #eaf3fb; margin-bottom: 1rem;
    background: rgba(94,147,198,.28); border: 1px solid rgba(207,227,245,.35);
    padding: .45rem .9rem; border-radius: 999px; backdrop-filter: blur(4px);
}
.hero__title { color: #fff; font-size: clamp(2.1rem, 5vw, 3.5rem); margin-bottom: 1rem; text-shadow: 0 2px 24px rgba(8,16,26,.45); }
.hero__text { font-size: 1.15rem; color: rgba(255,255,255,.92); margin-bottom: 1.8rem; max-width: 40ch; text-shadow: 0 1px 12px rgba(8,16,26,.4); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__actions .btn { box-shadow: 0 10px 30px rgba(8,18,30,.28); transition: transform .18s ease, box-shadow .18s ease, background .2s ease; }
.hero__actions .btn:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(8,18,30,.36); }

@keyframes heroKenBurns {
    0%   { transform: scale(1.08) translate3d(0, 0, 0); }
    100% { transform: scale(1.18) translate3d(-2.2%, -2%, 0); }
}
@keyframes heroRise {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFloat {
    0%   { transform: translate3d(0, 0, 0); }
    50%  { transform: translate3d(-16px, -22px, 0); }
    100% { transform: translate3d(0, 0, 0); }
}
@keyframes heroGlow {
    0%   { opacity: .55; transform: translateX(0); }
    100% { opacity: .95; transform: translateX(-4%); }
}
@media (prefers-reduced-motion: reduce) {
    .hero__media img { animation: none; transform: scale(1.05); }
    .hero__glow, .hero__orb { animation: none; }
    .hero__content > * { opacity: 1; animation: none; }
}

/* ---- Search bar --------------------------------------------------------- */
.searchbar {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #eef4fb 55%, var(--brand-100) 100%);
    color: var(--text);
    border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 1.4rem 1.1rem 1.1rem; margin-top: 1.5rem;
    overflow: hidden;
}
/* Liseré dégradé aux couleurs de la charte */
.searchbar::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
    background: linear-gradient(90deg, var(--brand) 0%, var(--accent-600) 50%, var(--ink) 100%);
}
.searchbar--floating { margin-top: -46px; position: relative; z-index: 5; }
.searchbar__grid {
    display: grid; gap: .8rem;
    grid-template-columns: 1.4fr 1fr 1fr .8fr .8fr auto;
    align-items: end;
}
/* Landing search bar without the keyword field (one column fewer). */
.searchbar--nokw .searchbar__grid { grid-template-columns: 1.3fr 1.3fr .9fr .9fr auto; }
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field > label { font-size: .78rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .form-control, .form-select {
    width: 100%; padding: .68rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font-size: .95rem; font-family: inherit; color: var(--text); background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .form-control:focus, .form-select:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,73,101,.14);
}
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }

/* ---- Sections ----------------------------------------------------------- */
.section { padding: 76px 0; }
.section--muted { background: var(--surface); }
.section--tight { padding: 56px 0; }
/* Same brand-gradient edge glow as the search bar / service cards, top and bottom. */
.section--edge-glow { position: relative; }
.section--edge-glow::before, .section--edge-glow::after {
    content: ""; position: absolute; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, rgba(63,121,173,.25) 0%, rgba(140,193,235,.4) 50%, rgba(63,121,173,.25) 100%);
    box-shadow: 0 0 5px 0 rgba(140,193,235,.18);
}
.section--edge-glow::before { top: 0; }
.section--edge-glow::after { bottom: 0; }

/* Subtle brand wash + floating orbs, for sections that would otherwise be flat white. */
.section--decor {
    position: relative; isolation: isolate;
    background:
        radial-gradient(60% 80% at 12% 8%, rgba(63,121,173,.07), transparent 60%),
        radial-gradient(55% 75% at 88% 92%, rgba(28,54,83,.06), transparent 60%),
        #fff;
}
.section__decor { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.section__orb { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .55; will-change: transform; }
.section__orb--1 {
    width: 340px; height: 340px; top: -8%; left: -6%;
    background: radial-gradient(circle at 35% 35%, rgba(63,121,173,.30), rgba(63,121,173,0) 70%);
    animation: heroFloat 15s ease-in-out infinite;
}
.section__orb--2 {
    width: 260px; height: 260px; bottom: -6%; right: 4%;
    background: radial-gradient(circle at 40% 40%, rgba(28,54,83,.22), rgba(28,54,83,0) 70%);
    animation: heroFloat 19s ease-in-out infinite reverse;
}
.section__orb--3 {
    width: 160px; height: 160px; top: 38%; right: 22%;
    background: radial-gradient(circle at 40% 40%, rgba(94,147,198,.28), rgba(94,147,198,0) 72%);
    animation: heroFloat 11s ease-in-out infinite;
}
.section__orb--4 {
    width: 220px; height: 220px; top: 42%; left: 4%;
    background: radial-gradient(circle at 40% 40%, rgba(63,121,173,.26), rgba(63,121,173,0) 70%);
    animation: heroFloat 17s ease-in-out infinite reverse;
}
@media (prefers-reduced-motion: reduce) { .section__orb { animation: none; } }
.section__head { max-width: 640px; margin: 0 auto 2.6rem; text-align: center; }
.section__head--left { margin-inline: 0; text-align: left; }
.section__eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--accent-600); }
.section__title { font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin-top: .5rem; }
.section__lead { color: var(--muted); font-size: 1.08rem; }

/* ---- Marquee défilant (titre services) --------------------------------- */
.marquee {
    position: relative;
    width: 100vw;
    margin: -2.4rem 0 2.6rem calc(50% - 50vw);
    padding: .3rem 0;
    overflow: hidden;
    font-weight: 800;
    line-height: 1.15;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
    display: inline-flex;
    align-items: center;
    gap: 1.8rem;
    width: max-content;
    white-space: nowrap;
    animation: marquee-scroll 30s linear infinite;
    will-change: transform;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
    font-size: clamp(1.9rem, 5.2vw, 3.6rem);
    letter-spacing: -.02em;
    background: linear-gradient(120deg, var(--brand) 0%, var(--accent-600) 45%, var(--ink) 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.marquee__logo {
    height: clamp(2.2rem, 4.4vw, 3.4rem);
    width: auto;
    flex: none;
    opacity: .9;
    filter: drop-shadow(0 2px 6px rgba(28, 54, 83, .18));
    animation: marquee-float 3.5s ease-in-out infinite;
}
@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@keyframes marquee-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
    .marquee__track { animation: none; transform: none; }
    .marquee__logo { animation: none; }
    .marquee {
        -webkit-mask-image: none;
                mask-image: none;
    }
}

.section-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }

/* ---- Grid --------------------------------------------------------------- */
.grid { display: grid; gap: 1.4rem; }
.grid--cards { grid-template-columns: repeat(3, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

/* ---- Property card ------------------------------------------------------ */
.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3dde5; }
.card__media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__media img { transform: scale(1.04); }
.card__media-empty { width: 100%; height: 100%; display: grid; place-items: center; color: var(--line); background: linear-gradient(135deg, var(--surface), var(--surface-2)); }
.card__badges { position: absolute; top: .8rem; left: .8rem; display: flex; gap: .4rem; flex-wrap: wrap; }
.card__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.card__price { font-size: 1.3rem; font-weight: 800; color: var(--ink); }
.card__title { font-size: 1.05rem; margin: 0; }
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--brand); }
.card__meta { color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: .4rem; }
.card__specs { margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--line); display: flex; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
.card__specs span { display: inline-flex; align-items: center; gap: .35rem; }

/* ---- Icons (app\services\Icon) ------------------------------------------
   Line icons inherit colour and sit on the text baseline, so they can be
   dropped inline next to a label without shifting it. */
.icon { flex: none; display: inline-block; vertical-align: -.18em; }
.card__meta .icon, .card__specs .icon { color: var(--muted); opacity: .9; }
.footer__list .icon { opacity: .75; }

/* ---- Badges & status ---------------------------------------------------- */
.badge {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .74rem; font-weight: 700; letter-spacing: .02em;
    padding: .34rem .6rem; border-radius: 7px; text-transform: uppercase;
    background: var(--ink); color: #fff;
}
.badge--sale { background: var(--brand); }
.badge--rent { background: var(--accent); }
.status { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; padding: .3rem .6rem; border-radius: 7px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.is-available { color: var(--success); background: #e6f4ee; }
.status.is-sold { color: var(--danger); background: #fbeae8; }
.status.is-rented { color: var(--accent-600); background: #f7efdd; }
.badge--soft { background: var(--brand-100); color: var(--brand); text-transform: none; font-weight: 600; }

/* ---- Services / features ------------------------------------------------ */
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); }
.feature__icon { width: 52px; height: 52px; border-radius: 12px; background: var(--brand-100); color: var(--brand); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 1rem; }
.feature__title { font-size: 1.2rem; margin-bottom: .4rem; }
.feature__text { color: var(--muted); margin: 0; }

/* ---- Stats band --------------------------------------------------------- */
/* A soft blue wash rather than a dark band: enough tint for the white cards to
   detach and for the section to read as its own zone, without putting a large
   glare source mid-page. */
.stats-band {
    position: relative; isolation: isolate; overflow: hidden;
    background:
        radial-gradient(70% 90% at 14% 8%, rgba(94,147,198,.16), transparent 62%),
        radial-gradient(62% 85% at 88% 96%, rgba(28,54,83,.09), transparent 62%),
        linear-gradient(180deg, #eaf1f8 0%, #dfe9f3 100%);
    border-block: 1px solid #d5e1ee;
}
.stats-band__decor { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.stats-band__orb { position: absolute; border-radius: 50%; filter: blur(12px); will-change: transform; }
.stats-band__orb--1 {
    width: 340px; height: 340px; top: -34%; left: -5%;
    background: radial-gradient(circle at 40% 40%, rgba(94,147,198,.12), rgba(94,147,198,0) 70%);
    animation: heroFloat 16s ease-in-out infinite;
}
.stats-band__orb--2 {
    width: 280px; height: 280px; bottom: -38%; right: 5%;
    background: radial-gradient(circle at 40% 40%, rgba(63,121,173,.09), rgba(63,121,173,0) 70%);
    animation: heroFloat 21s ease-in-out infinite reverse;
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.stat {
    position: relative; text-align: center; padding: 2.15rem 1.5rem 1.9rem;
    background: #fff; border: 1px solid rgba(255,255,255,.9); border-radius: 18px;
    box-shadow: 0 1px 2px rgba(20,32,46,.05), 0 12px 28px -14px rgba(20,32,46,.22);
    transition: transform .45s cubic-bezier(.22,.9,.3,1), box-shadow .45s ease;
}
.stat:hover { transform: translateY(-6px); box-shadow: 0 2px 4px rgba(20,32,46,.06), 0 22px 44px -16px rgba(20,32,46,.3); }

.stat__icon {
    width: 52px; height: 52px; margin: 0 auto 1.05rem;
    display: grid; place-items: center; border-radius: 15px;
    background: var(--brand-100); color: var(--brand);
    transition: background .4s ease, color .4s ease, transform .45s cubic-bezier(.22,.9,.3,1);
}
.stat:hover .stat__icon { background: var(--brand); color: #fff; transform: scale(1.06); }
.stat__value {
    font-size: clamp(2.2rem, 4.2vw, 2.9rem); font-weight: 800; line-height: 1;
    letter-spacing: -.02em; color: var(--brand);
}
.stat__label { margin-top: .55rem; font-weight: 500; font-size: .95rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { .stats-band__orb { animation: none; } }

/* ---- About split -------------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.split__media-empty { border-radius: var(--radius); aspect-ratio: 4/3; background: linear-gradient(135deg, var(--brand), var(--brand-700)); box-shadow: var(--shadow); }
.checklist { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .7rem; }
.checklist li { display: flex; gap: .6rem; align-items: flex-start; color: var(--text); }
.checklist li::before { content: "✓"; color: var(--accent); font-weight: 800; }

/* ---- Contact ------------------------------------------------------------ */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; gap: .4rem; box-shadow: var(--shadow-sm); }
.contact-card__icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center; margin-bottom: .25rem;
    background: var(--brand-100); color: var(--brand);
    transition: background .25s ease, color .25s ease;
}
.contact-card:hover .contact-card__icon { background: var(--brand); color: #fff; }
.contact-card__label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.contact-card__value { font-weight: 600; color: var(--ink); word-break: break-word; }
/* 3D tilt card: JS (index.php) tracks the cursor and writes --tilt-x/--tilt-y
   + the glare's --glare-x/--glare-y; here just declares how to render them. */
.cta-panel {
    /* No overflow:hidden here: it would clip the card's own box-shadow. The
       glare below is kept inside the rounded corners via its own radius instead. */
    position: relative; isolation: isolate;
    background: linear-gradient(120deg, var(--brand), var(--brand-700));
    color: #fff; border-radius: var(--radius); padding: 3rem; text-align: center;
    box-shadow:
        0 22px 46px -14px rgba(20, 32, 46, .4),
        0 10px 28px rgba(53, 97, 140, .3);
    transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transition: transform .5s cubic-bezier(.22, .9, .3, 1), box-shadow .5s ease;
}
.cta-panel.is-tilting {
    transition: transform .1s linear, box-shadow .35s ease;
    box-shadow:
        0 34px 70px -14px rgba(20, 32, 46, .45),
        0 16px 42px rgba(53, 97, 140, .4);
}
.cta-panel h2 { color: #fff; }
.cta-panel p { color: rgba(255,255,255,.88); max-width: 46ch; margin-inline: auto; }
.cta-panel > * { position: relative; z-index: 1; }
.cta-panel__glare {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    border-radius: inherit; overflow: hidden;
    background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 25%), rgba(255, 255, 255, .28), transparent 55%);
    opacity: 0; transition: opacity .3s ease;
}
.cta-panel.is-tilting .cta-panel__glare { opacity: 1; }
@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
    .cta-panel { transform: none; }
}

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
    position: relative; isolation: isolate; overflow: hidden;
    background: var(--ink); color: #b9c6d1; padding: 60px 0 28px; margin-top: 0;
}
/* Brand-gradient top border, matching the searchbar / service cards.
   Kept on bright blues (not --brand/--ink) so it stays visible against the
   dark footer background across its full width, with a soft glow underneath. */
.site-footer::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; z-index: 1;
    background: linear-gradient(90deg, var(--accent-600) 0%, #8cc1eb 50%, var(--accent-600) 100%);
    box-shadow: 0 0 16px 1px rgba(140,193,235,.55);
}
/* Soft floating glow, echoing the hero orbs, kept faint so text stays readable. */
.site-footer::after {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    width: 420px; height: 420px; top: -55%; right: -8%; border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, rgba(94,147,198,.35), rgba(94,147,198,0) 70%);
    filter: blur(10px); mix-blend-mode: screen; opacity: .6;
    animation: heroFloat 18s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .site-footer::after { animation: none; } }
/* Faint watermark of the house mark, sat behind all footer content. */
.footer__watermark {
    position: absolute; top: 50%; left: 50%; z-index: 0; pointer-events: none;
    height: 340px; width: auto; max-width: none;
    transform: translate(-50%, -50%); opacity: .05;
}
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; position: relative; z-index: 1; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .03em; }
.site-footer a { color: #b9c6d1; }
.site-footer a:hover { color: #fff; }
.footer__brand .brand { color: #fff; align-items: center; margin-bottom: 1rem; }
/* The logo is mid-blue on transparent: unreadable on the navy footer, so it is
   knocked out to white here (same treatment as the overlay header). */
.site-footer .brand__logo { filter: brightness(0) invert(1); opacity: .92; height: 46px; }
.site-footer .footer__bottom-logo { opacity: .65; height: 22px; }
.footer__list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer__list a {
    text-transform: uppercase; font-size: .88rem; letter-spacing: .02em;
    position: relative; display: inline-block; width: fit-content;
    transition: color .2s ease;
}
.footer__list a::after {
    content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 100%;
    background: var(--accent-600); transform: scaleX(0); transform-origin: left;
    transition: transform .25s ease;
}
.footer__list a:hover::after { transform: scaleX(1); }
.socials { display: flex; gap: .6rem; margin-top: 1rem; position: relative; z-index: 1; }
.socials a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; transition: background .2s ease, transform .2s ease; }
.socials a:hover { background: var(--accent); transform: translateY(-2px); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .85rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; position: relative; z-index: 1; }
.footer__copy { display: inline-flex; align-items: center; gap: .55rem; }
.footer__bottom-logo { height: 22px; width: auto; display: block; }

/* ---- Page heading (catalogue / detail) ---------------------------------- */
/* Same glow + gradient-line language as the hero and footer, scaled down for a
   slim banner — keeps the flat brand block from reading as an inert slab. */
.page-head {
    position: relative; isolation: isolate; overflow: hidden;
    padding: 54px 0; color: #fff;
    background:
        radial-gradient(60% 130% at 12% 0%, rgba(140, 193, 235, .32), transparent 62%),
        radial-gradient(55% 120% at 96% 100%, rgba(255, 255, 255, .12), transparent 60%),
        linear-gradient(120deg, var(--brand) 0%, var(--brand-700) 100%);
}
.page-head::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; z-index: 1;
    background: linear-gradient(90deg, var(--accent-600) 0%, #8cc1eb 50%, var(--accent-600) 100%);
    box-shadow: 0 0 16px 1px rgba(140, 193, 235, .5);
}
.page-head::after {
    content: ""; position: absolute; z-index: 0; pointer-events: none;
    width: 360px; height: 360px; top: -62%; right: -8%; border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, rgba(94, 147, 198, .38), rgba(94, 147, 198, 0) 70%);
    filter: blur(10px); mix-blend-mode: screen; opacity: .75;
    animation: heroFloat 16s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .page-head::after { animation: none; } }
.page-head .container { position: relative; z-index: 1; }
.page-head h1 { color: #fff; margin: 0; text-transform: uppercase; letter-spacing: .02em; }
.page-head p { color: rgba(255,255,255,.85); margin: .5rem 0 0; }
.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 1.4rem; }
.breadcrumbs a { color: var(--brand); }

/* ---- Catalogue layout --------------------------------------------------- */
.catalogue { padding: 40px 0 76px; }
.catalogue__bar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.1rem; margin-bottom: 1.6rem; }
.catalogue__meta { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.catalogue__count { color: var(--muted); }
.catalogue__count strong { color: var(--ink); }
.inline-sort {
    display: flex; align-items: center; gap: .55rem;
    background: #fff; border: 1px solid var(--line); border-radius: 999px;
    padding: .5rem .5rem .5rem 1.1rem; box-shadow: var(--shadow-sm);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.inline-sort:hover, .inline-sort:focus-within { border-color: var(--accent); box-shadow: 0 4px 14px rgba(20, 32, 46, .08); }
.inline-sort label { font-size: .85rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.inline-sort select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    width: auto; border: 0; background-color: transparent;
    padding: .3rem 1.7rem .3rem .2rem; margin: 0;
    font-weight: 700; font-family: inherit; font-size: .89rem; color: var(--ink);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2335618c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right center; background-size: 14px;
}
.inline-sort select:focus { outline: none; }
.inline-sort select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.empty { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.empty__icon { font-size: 3rem; margin-bottom: 1rem; }

/* ---- Pagination --------------------------------------------------------- */
.pagination { display: flex; gap: .4rem; list-style: none; padding: 0; margin: 2.5rem 0 0; justify-content: center; flex-wrap: wrap; }
.pagination li a, .pagination li span { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 .6rem; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: #fff; }
.pagination li.active a, .pagination li.active span { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination li.disabled a, .pagination li.disabled span { color: var(--muted); opacity: .5; }

/* ---- Property detail ---------------------------------------------------- */
.property { padding: 34px 0 76px; }
.property__layout { display: grid; grid-template-columns: 1.6fr .9fr; gap: 2.4rem; align-items: start; }
.gallery__main { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/10; background: var(--surface-2); box-shadow: var(--shadow-sm); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__main-empty { width: 100%; height: 100%; display: grid; place-items: center; color: var(--line); }
/* Bootstrap's `button:not(:disabled) { cursor: pointer }` otherwise wins the
   cascade over a plain class selector — repeating :not(:disabled) here beats it. */
.gallery__main--zoomable:not(:disabled) { cursor: zoom-in; border: 0; padding: 0; margin: 0; background: none; display: block; width: 100%; height: 100%; }
.gallery__main--zoomable:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.gallery__zoom-hint {
    position: absolute; right: .8rem; bottom: .8rem; z-index: 1;
    width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(15, 26, 40, .55); color: #fff;
    opacity: 0; transform: scale(.85);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}
.gallery__main--zoomable:hover .gallery__zoom-hint,
.gallery__main--zoomable:focus-visible .gallery__zoom-hint { opacity: 1; transform: scale(1); }
@media (hover: none) { .gallery__zoom-hint { opacity: 1; transform: scale(1); background: rgba(15, 26, 40, .42); } }
.gallery__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; margin-top: .7rem; }
.gallery__thumbs button { border: 2px solid transparent; border-radius: 10px; overflow: hidden; padding: 0; cursor: pointer; aspect-ratio: 4/3; background: var(--surface-2); }
.gallery__thumbs button.is-active { border-color: var(--brand); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Lightbox: fullscreen photo viewer ----------------------------------- */
.lightbox {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    background: rgba(10, 14, 20, .94);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.lightbox__figure { display: flex; flex-direction: column; align-items: center; gap: .9rem; max-width: 92vw; }
.lightbox__img {
    max-width: 92vw; max-height: 80vh; width: auto; height: auto;
    border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    opacity: 0; transform: scale(.97);
    transition: opacity .2s ease, transform .2s ease;
}
.lightbox__img.is-visible { opacity: 1; transform: none; }
.lightbox__counter { color: rgba(255, 255, 255, .78); font-size: .85rem; font-weight: 600; letter-spacing: .02em; }
.lightbox__close, .lightbox__nav {
    position: absolute; display: grid; place-items: center;
    width: 46px; height: 46px; border-radius: 50%;
    background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .22);
    cursor: pointer; transition: background .2s ease, transform .15s ease;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .22); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__close:active { transform: scale(.94); }
.lightbox__nav--prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev:active, .lightbox__nav--next:active { transform: translateY(-50%) scale(.94); }
.lightbox__nav.is-hidden { display: none; }
.lightbox__close:focus-visible, .lightbox__nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 640px) {
    .lightbox__close { top: 12px; right: 12px; width: 40px; height: 40px; }
    .lightbox__nav { width: 40px; height: 40px; }
    .lightbox__nav--prev { left: 8px; }
    .lightbox__nav--next { right: 8px; }
    .lightbox__img { max-height: 72vh; }
}
@media (prefers-reduced-motion: reduce) {
    .lightbox, .lightbox__img { transition: none; }
}

.property__title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: .8rem 0 .4rem; }
.property__price { font-size: 1.8rem; font-weight: 800; color: var(--brand); }
.property__loc { color: var(--muted); display: inline-flex; align-items: center; gap: .4rem; }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1.6rem 0; }
.spec { background: #fff; padding: 1.1rem; text-align: center; }
.spec__icon { color: var(--brand); display: grid; place-items: center; margin-bottom: .35rem; }
.spec__value { font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.spec__label { font-size: .82rem; color: var(--muted); }
.prose { color: var(--text); }
.prose h2 { font-size: 1.4rem; margin-top: 2rem; }

.aside-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.5rem; position: sticky; top: 88px; }
.aside-card__ref { color: var(--muted); font-size: .85rem; }
.aside-actions { display: grid; gap: .7rem; margin-top: 1.2rem; }
.aside-agent { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); display: flex; gap: .8rem; align-items: center; }
.aside-agent__avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-100); color: var(--brand); display: grid; place-items: center; font-weight: 800; }

/* ---- Flash / alerts ----------------------------------------------------- */
.flash { border-radius: var(--radius-sm); padding: .9rem 1.1rem; margin-bottom: 1rem; border: 1px solid transparent; }
.flash--success { background: #e6f4ee; color: #1c6444; border-color: #bfe3d0; }
.flash--error { background: #fbeae8; color: #a12a1d; border-color: #f3c9c3; }

/* ---- Forms (shared) ----------------------------------------------------- */
.form-group { margin-bottom: 1rem; }
label { font-weight: 600; font-size: .9rem; color: var(--ink); }
textarea.form-control { min-height: 120px; resize: vertical; }
.help-block, .hint-block { color: var(--muted); font-size: .82rem; margin-top: .3rem; }
.has-error .form-control { border-color: var(--danger); }
.has-error .help-block { color: var(--danger); }
.invalid-feedback { color: var(--danger); font-size: .82rem; display: block; }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.6rem; }

/* =========================================================================
   Admin
   ========================================================================= */
body.admin { background: var(--surface); }
.admin-shell { display: grid; grid-template-columns: 258px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--ink); color: #aeb9c4; padding: 1.4rem 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-sidebar__brand { color: #fff; font-weight: 800; font-size: 1.1rem; display: flex; align-items: center; gap: .6rem; padding: .3rem .6rem 1.3rem; }
.admin-nav { display: grid; gap: .2rem; }
.admin-nav a { color: #aeb9c4; padding: .65rem .8rem; border-radius: 9px; display: flex; align-items: center; gap: .7rem; font-weight: 500; font-size: .95rem; }
.admin-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-nav a.is-active { background: var(--brand); color: #fff; }
.admin-nav__section { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: #6b7b8c; padding: 1.2rem .8rem .4rem; }

.admin-main { display: flex; flex-direction: column; min-width: 0; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 1rem 1.8rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: sticky; top: 0; z-index: 20; }
.admin-topbar h1 { font-size: 1.25rem; margin: 0; }
.admin-content { padding: 1.8rem; flex: 1; }
.admin-user { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .9rem; }

.admin-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.5rem; margin-bottom: 1.5rem; }
.admin-card__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.admin-card__head h2 { font-size: 1.1rem; margin: 0; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-bottom: 1.5rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow-sm); }
.kpi__label { color: var(--muted); font-size: .85rem; }
.kpi__value { font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1.1; margin-top: .3rem; }
.kpi--accent { border-left: 4px solid var(--accent); }
.kpi--brand { border-left: 4px solid var(--brand); }
.kpi--success { border-left: 4px solid var(--success); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .8rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.table tbody tr:hover { background: var(--surface); }
.table-wrap { overflow-x: auto; }
.table__thumb { width: 56px; height: 42px; border-radius: 7px; object-fit: cover; background: var(--surface-2); }
.row-actions { display: flex; gap: .4rem; flex-wrap: wrap; }

.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.grid-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.4rem; }
.grid-form--3 { grid-template-columns: repeat(3, 1fr); }
.span-2 { grid-column: span 2; }
.fieldset-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-600); font-weight: 700; margin: 1.6rem 0 .4rem; border-top: 1px solid var(--line); padding-top: 1.4rem; }
.fieldset-title:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.locale-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.locale-cols__head { font-weight: 700; color: var(--brand); font-size: .85rem; margin-bottom: .4rem; display: flex; align-items: center; gap: .5rem; }
.auto-translate-status { font-weight: 500; color: var(--muted); font-size: .78rem; }
.form-actions { display: flex; gap: .7rem; margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }

/* image upload / preview */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; margin-top: 1rem; }
.photo-tile { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; position: relative; }
.photo-tile img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.photo-tile__bar { display: flex; align-items: center; justify-content: space-between; padding: .5rem .6rem; gap: .4rem; font-size: .8rem; }
.photo-tile__main { color: var(--accent-600); font-weight: 700; }

/* admin login */
.login-screen { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--ink)); padding: 1.5rem; }
.login-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 2.4rem; width: 100%; max-width: 400px; }
.login-card__brand { text-align: center; margin-bottom: 1.6rem; }

.tag { display: inline-block; background: var(--brand-100); color: var(--brand); border-radius: 6px; padding: .2rem .5rem; font-size: .78rem; font-weight: 600; }

/* ---- Utilities ---------------------------------------------------------- */
.text-muted { color: var(--muted) !important; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.flex { display: flex; gap: .6rem; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.stack { display: grid; gap: 1rem; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1080px) {
    .searchbar__grid, .searchbar--nokw .searchbar__grid { grid-template-columns: 1fr 1fr; }
    .searchbar__grid .field--submit { grid-column: 1 / -1; }
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .property__layout { grid-template-columns: 1fr; }
    .aside-card { position: static; }
    .split { grid-template-columns: 1fr; gap: 1.6rem; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; height: auto; display: none; }
    .admin-sidebar.is-open { display: block; }
}
/* ---- Mobile nav: side drawer + backdrop -------------------------------- */
@media (max-width: 860px) {
    .header-actions .btn--primary { display: none; }
    .nav-toggle { display: block; }

    .nav {
        position: fixed; top: 0; right: 0; bottom: 0;
        width: min(86vw, 340px);
        flex-direction: column; align-items: stretch; justify-content: flex-start;
        gap: 0; padding: 84px 1.1rem 1.4rem;
        background: #fff; box-shadow: -22px 0 55px rgba(20, 32, 46, .18);
        transform: translateX(101%);
        transition: transform .34s cubic-bezier(.4, .9, .3, 1);
        overflow-y: auto; z-index: 70;
    }
    .site-header.is-open .nav { transform: none; }
    .nav__pill, .nav__caret { display: none; }
    .nav__item { display: block; }
    .nav__link {
        display: block;
        font-size: 1.05rem; color: var(--ink); padding: .95rem .4rem;
        border-radius: 0; border-bottom: 1px solid var(--line);
    }
    .nav__link.is-active, .nav:not(.is-ready) .nav__link.is-active { color: var(--brand); background: none; }
    /* Inside the drawer the mega-menu is just an inline sub-list. */
    .megamenu {
        position: static; width: auto; max-width: none; padding: .35rem 0 .7rem;
        opacity: 1; visibility: visible; pointer-events: auto; transform: none;
    }
    .megamenu__panel { background: none; border: 0; box-shadow: none; padding: 0; }
    .megamenu__grid { grid-template-columns: 1fr; }
    .megacard { padding: .5rem .3rem; }
    .megacard__icon { width: 32px; height: 32px; border-radius: 9px; }
    .megacard__icon svg { width: 17px; height: 17px; }
    .megamenu__label, .megamenu__all { display: none; }

    .nav__drawer-foot { display: flex; flex-direction: column; align-items: stretch; gap: .9rem; margin-top: 1.5rem; }
    .nav__phone { text-align: center; font-weight: 600; color: var(--ink); }

    /* Staggered entrance for the drawer rows. */
    .site-header.is-open .nav > .nav__item,
    .site-header.is-open .nav__drawer-foot { animation: drawerRise .42s cubic-bezier(.22, .61, .36, 1) backwards; }
    .site-header.is-open .nav > .nav__item:nth-child(2) { animation-delay: .06s; }
    .site-header.is-open .nav > .nav__item:nth-child(3) { animation-delay: .12s; }
    .site-header.is-open .nav > .nav__item:nth-child(4) { animation-delay: .18s; }
    .site-header.is-open .nav__drawer-foot { animation-delay: .24s; }
    @keyframes drawerRise {
        from { opacity: 0; transform: translateX(18px); }
        to   { opacity: 1; transform: none; }
    }

    /* Kept above the drawer, like the burger, so both stay usable when open. */
    .header-actions .lang-switch { position: relative; z-index: 80; }

    .nav-backdrop {
        display: block; position: fixed; inset: 0; z-index: 65;
        background: rgba(15, 26, 40, .45);
        opacity: 0; visibility: hidden;
        transition: opacity .3s ease, visibility .3s ease;
    }
    .site-header.is-open .nav-backdrop { opacity: 1; visibility: visible; }
}

@media (prefers-reduced-motion: reduce) {
    .nav, .nav__pill, .nav-backdrop, .nav-toggle span, .site-header::before, .megamenu { transition: none; }
    .site-header.is-open .nav > .nav__item,
    .site-header.is-open .nav__drawer-foot { animation: none; }
}

@media (max-width: 760px) {
    .grid--cards, .grid--3, .grid--2, .contact-cards, .stats { grid-template-columns: 1fr; }
    .grid--4 { grid-template-columns: 1fr 1fr; }
    .searchbar__grid, .searchbar--nokw .searchbar__grid { grid-template-columns: 1fr; }
    .searchbar--floating { margin-top: 1.2rem; }
    .grid-form, .grid-form--3, .locale-cols { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .footer__grid { grid-template-columns: 1fr; }
    .section { padding: 54px 0; }
    .hero__content { padding: 56px 0; }
    .kpis { grid-template-columns: 1fr 1fr; }
    .gallery__thumbs { grid-template-columns: repeat(4, 1fr); }

    /* Cards turn into compact rows: icon, then figure over label. Three stacked
       centred blocks would eat most of a phone screen for very little content. */
    .stats { gap: .8rem; }
    .stat {
        display: flex; align-items: center; gap: 1.05rem; text-align: left;
        padding: 1.05rem 1.2rem; border-radius: 15px;
    }
    .stat__icon { width: 44px; height: 44px; margin: 0; flex: 0 0 auto; border-radius: 13px; }
    .stat__value { font-size: 1.8rem; }
    .stat__label { margin-top: .15rem; font-size: .88rem; }
}

/* ---- Admin: tables become stacked cards on phones & portrait tablets ---- */
@media (max-width: 820px) {
    .table--cards thead { display: none; }
    .table--cards, .table--cards tbody, .table--cards tr, .table--cards td { display: block; width: 100%; }
    .table--cards tr {
        border: 1px solid var(--line); border-radius: var(--radius-sm);
        margin-bottom: 1rem; padding: .35rem .2rem; background: #fff;
    }
    .table--cards td {
        display: flex; justify-content: space-between; align-items: center; gap: 1rem;
        text-align: right; border: 0; padding: .5rem .9rem;
    }
    .table--cards td::before {
        content: attr(data-label); font-weight: 700; color: var(--muted);
        text-transform: uppercase; font-size: .7rem; letter-spacing: .04em; text-align: left; flex-shrink: 0;
    }
    .table--cards td[data-label=""]::before { content: none; }
    .table--cards td.cell-media { padding: 0; }
    .table--cards td.cell-media::before { content: none; }
    .table--cards td.cell-media img,
    .table--cards td.cell-media .table__thumb {
        width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    }
    .table--cards .row-actions { justify-content: flex-end; flex-wrap: wrap; }
}

/* ---- Admin: compact chrome on small screens ----------------------------- */
@media (max-width: 640px) {
    .admin-topbar { padding: .8rem 1rem; }
    .admin-topbar h1 { font-size: 1.05rem; }
    .admin-content { padding: 1.1rem; }
    .admin-card { padding: 1.1rem; }
    .admin-user span { display: none; } /* hide email, keep the logout button */
    .kpis { grid-template-columns: 1fr 1fr; gap: .8rem; }
    .kpi { padding: 1rem 1.1rem; }
    .kpi__value { font-size: 1.6rem; }
    .admin-card__head { gap: .6rem; }
    .admin-card__head .toolbar { width: 100%; }
    .admin-card__head form[role="search"] { flex: 1; }
    .admin-card__head form[role="search"] input { width: 100% !important; }
}

/* ---- Very small phones -------------------------------------------------- */
@media (max-width: 420px) {
    .container { padding-inline: 15px; }
    .kpis { grid-template-columns: 1fr; }
    .grid--4 { grid-template-columns: 1fr 1fr; }
    .hero__actions { flex-direction: column; align-items: stretch; }
    .hero__actions .btn { width: 100%; }
    .btn { font-size: .9rem; }
    .page-head { padding: 40px 0; }
    .gallery__thumbs { grid-template-columns: repeat(3, 1fr); }
    .form-actions { flex-direction: column; align-items: stretch; }
    .form-actions .btn { width: 100%; }
}

/* =========================================================================
   Motion & interactions (progressive — only active once JS opts in)
   ========================================================================= */

/* Scroll reveal. The hidden state applies ONLY when <html> carries .js-reveal,
   so pages without the reveal script (or JS off) always show their content. */
html.js-reveal .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s ease, transform .8s cubic-bezier(.22, .61, .36, 1);
    will-change: opacity, transform;
}
html.js-reveal .reveal--left  { transform: translateX(-34px); }
html.js-reveal .reveal--right { transform: translateX(34px); }
html.js-reveal .reveal.is-visible {
    opacity: 1;
    transform: none;
}
/* Pop-in variant (the CTA panel): scale up with a slight overshoot instead of
   a plain slide. Same specificity as .reveal above, so it must come after it
   to win the cascade. */
html.js-reveal .reveal--pop {
    transform: scale(.92) translateY(24px);
    transition: opacity .6s ease, transform .7s cubic-bezier(.34, 1.56, .64, 1);
}
html.js-reveal .reveal--pop.is-visible { transform: none; }

/* Feature / service cards — come alive on hover. */
.feature {
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    position: relative;
}
.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: #d3dde5;
}
.feature__icon {
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background .25s ease, color .25s ease;
}
.feature:hover .feature__icon {
    transform: translateY(-3px) rotate(-6deg) scale(1.06);
    background: var(--brand);
    color: #fff;
}

/* Badges — a soft light sweep on the card the badge sits on. */
.card__badges .badge { position: relative; overflow: hidden; }
.card__badges .badge::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
    transform: translateX(-120%);
}
.card:hover .card__badges .badge::after { animation: badgeShine .9s ease forwards; }
@keyframes badgeShine { to { transform: translateX(120%); } }

/* WhatsApp CTA — gentle attention pulse. */
.btn--whatsapp { position: relative; }
.btn--whatsapp::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, .5);
    animation: waPulse 2.4s ease-out infinite;
    pointer-events: none;
}
@keyframes waPulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, .45); }
    70%  { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Search bar — lift the floating card and animate the submit button. */
.searchbar--floating { transition: transform .3s ease, box-shadow .3s ease; }
.searchbar--floating:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg), 0 22px 60px rgba(20, 32, 46, .12); }

/* Keep grid layout intact when featured cards are wrapped for staggered reveal. */
.grid--cards > .reveal { display: flex; }
.grid--cards > .reveal > .card { width: 100%; }

/* Service carousel — an auto-rotating "one service at a time" showcase. */
.service-carousel { position: relative; }
.service-carousel__viewport { overflow: hidden; }
.service-carousel__track { display: flex; will-change: transform; }
.service-slide { flex: 0 0 100%; display: flex; justify-content: center; padding: .5rem .6rem; }
.feature--showcase {
    max-width: 640px; width: 100%; text-align: center; padding: 2.7rem 2rem 2.4rem;
    background: linear-gradient(135deg, #ffffff 0%, #eef4fb 55%, var(--brand-100) 100%);
    overflow: hidden;
}
.feature--showcase::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
    background: linear-gradient(90deg, var(--brand) 0%, var(--accent-600) 50%, var(--ink) 100%);
}
.feature--showcase .feature__icon { margin-inline: auto; width: 60px; height: 60px; font-size: 1.7rem; }
.feature--showcase .feature__title { font-size: 1.35rem; }
.feature--showcase .feature__text { max-width: 44ch; margin-inline: auto; }
.service-carousel__dots { display: flex; justify-content: center; gap: .5rem; margin-top: 1.6rem; }
.service-dot {
    width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%;
    background: var(--line); cursor: pointer;
    transition: width .3s ease, background .3s ease, border-radius .3s ease;
}
.service-dot:hover { background: var(--accent); }
.service-dot.is-active { width: 28px; border-radius: 6px; background: var(--brand); }

/* Respect users who prefer less motion — drop every added effect. */
@media (prefers-reduced-motion: reduce) {
    html.js-reveal .reveal { opacity: 1; transform: none; transition: none; }
    .feature, .feature__icon, .searchbar--floating { transition: none; }
    .feature:hover { transform: none; }
    .feature:hover .feature__icon { transform: none; }
    .card:hover .card__badges .badge::after { animation: none; }
    .btn--whatsapp::before { animation: none; }
    /* Carousel falls back to a static, fully-visible grid. */
    .service-carousel__track { flex-wrap: wrap; gap: 1.4rem; transform: none !important; transition: none; }
    .service-slide { flex: 1 1 280px; padding: 0; }
    .feature--showcase { max-width: none; text-align: left; }
    .feature--showcase .feature__icon { margin-inline: 0; }
    .feature--showcase .feature__text { margin-inline: 0; }
    .service-carousel__dots { display: none; }
}

/* ---- Bouton flottant WhatsApp ------------------------------------------ */
.wa-float {
    position: fixed; right: 22px; bottom: 22px; z-index: 60;
    width: 58px; height: 58px; border-radius: 50%;
    display: grid; place-items: center;
    background: #25d366; color: #fff;
    box-shadow: 0 10px 26px rgba(37, 211, 102, .45);
    transition: transform .25s ease, box-shadow .25s ease;
}
.wa-float:hover {
    color: #fff;
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 14px 32px rgba(37, 211, 102, .55);
}
.wa-float::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, .5);
    animation: waPulse 2.4s ease-out infinite;
    pointer-events: none;
}
@media (max-width: 600px) {
    .wa-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
    .wa-float { transition: none; }
    .wa-float::after { animation: none; }
}
