/* ═════════════════════════════════════════════════════════════════════════════
   NEXUS — vitrine nexusimmo.be
   ═════════════════════════════════════════════════════════════════════════════ */
:root {
  --ink: #0b1422;
  --ink-2: #111d30;
  --ink-3: #18263d;
  --line: rgba(255, 255, 255, .09);
  --text: #e9edf3;
  --text-soft: #a7b1c2;
  --gold: #c9a96a;
  --gold-2: #e4cc96;
  --paper: #f6f3ee;
  --paper-ink: #1b2533;
  --danger: #ff8f7a;
  --ok: #8fd6a8;
  --radius: 18px;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--gold-2); }
button { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }

/* ── Boutons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .95rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: .95rem; letter-spacing: .01em; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn svg { width: 18px; height: 18px; }
.btn:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a1408; box-shadow: 0 10px 30px -10px rgba(201, 169, 106, .6); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(201, 169, 106, .75); }
.btn-ghost { background: rgba(255, 255, 255, .04); color: var(--text); border-color: rgba(255, 255, 255, .18); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); transform: translateY(-2px); }
.btn-sm { padding: .6rem 1.1rem; font-size: .85rem; }
.btn-block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; }

/* ── Navigation ───────────────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem clamp(20px, 4vw, 48px);
  transition: padding .3s var(--ease), background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { padding-block: .75rem; background: rgba(11, 20, 34, .82); backdrop-filter: blur(14px); border-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--text); }
.brand-mark { width: 30px; height: 30px; color: var(--gold); }
.brand-word { font-family: var(--sans); font-weight: 800; letter-spacing: .32em; font-size: 1.05rem; }
.brand-sub { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: .02em; color: var(--gold-2); margin-left: .35rem; font-size: 1.15rem; }
.nav-links { display: flex; gap: 2rem; font-size: .9rem; color: var(--text-soft); }
.nav-links a { position: relative; transition: color .2s; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -4px; width: 100%; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-start; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.aurora { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; will-change: transform; }
.a1 { width: 52vw; height: 52vw; left: -12vw; top: -18vw; background: radial-gradient(circle, #1f3a63, transparent 65%); animation: drift1 22s ease-in-out infinite alternate; }
.a2 { width: 42vw; height: 42vw; right: -10vw; top: 6vh; background: radial-gradient(circle, rgba(201, 169, 106, .45), transparent 65%); animation: drift2 26s ease-in-out infinite alternate; }
.a3 { width: 38vw; height: 38vw; left: 30vw; bottom: -20vw; background: radial-gradient(circle, #24406b, transparent 65%); animation: drift1 30s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(8vw, 6vh) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-10vw, 10vh) scale(.92); } }
.grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 70%);
  opacity: .5;
}

.hero-inner { position: relative; width: min(1180px, 100% - 40px); margin: 0 auto; padding: clamp(7rem, 20vh, 11rem) 0 12rem; display: grid; }
.hero-copy, .tenant-panel { grid-area: 1 / 1; }
.hero-copy { max-width: 760px; transition: opacity .5s var(--ease), transform .6s var(--ease), filter .5s; }
.eyebrow { margin: 0 0 1.1rem; font-size: .78rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: .8rem; }
.eyebrow::before { content: ''; width: 34px; height: 1px; background: var(--gold); }
.hero-title { margin: 0; font-family: var(--serif); font-weight: 600; font-size: clamp(2.8rem, 7.2vw, 6rem); line-height: 1.02; letter-spacing: -.01em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero-title .line > span { display: inline-block; transform: translateY(110%); animation: rise 1.1s var(--ease) forwards; }
.hero-title .line:nth-child(2) > span { animation-delay: .14s; }
@keyframes rise { to { transform: none; } }
.hero-lead { max-width: 560px; margin: 1.6rem 0 2.2rem; font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--text-soft); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2.6rem; margin: 3.2rem 0 0; padding: 0; list-style: none; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--serif); font-size: 2.1rem; font-weight: 600; color: var(--gold-2); line-height: 1; }
.hero-stats span { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft); margin-top: .45rem; }

/* Mode locataire : le texte s'efface, le panneau apparaît */
body.tenant-mode .hero-copy { opacity: 0; transform: translateX(-40px); filter: blur(6px); pointer-events: none; }
.tenant-panel {
  position: relative;
  justify-self: center; align-self: center;
  width: min(440px, 100%);
  padding: 2.4rem 2.2rem 2rem;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(24, 38, 61, .88), rgba(11, 20, 34, .92));
  border: 1px solid rgba(201, 169, 106, .28);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(18px);
  text-align: center;
  opacity: 0; visibility: hidden; transform: translateY(30px) scale(.96);
  transition: opacity .5s var(--ease), transform .6s var(--ease), visibility 0s .6s;
}
body.tenant-mode .tenant-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .5s var(--ease) .15s, transform .6s var(--ease) .15s, visibility 0s; }
.panel-back { position: absolute; top: 1rem; left: 1rem; display: inline-flex; align-items: center; gap: .3rem; background: none; border: 0; color: var(--text-soft); font-size: .82rem; cursor: pointer; padding: .4rem .5rem; border-radius: 8px; }
.panel-back svg { width: 16px; height: 16px; }
.panel-back:hover { color: var(--gold-2); }
.panel-lock { width: 64px; height: 64px; margin: .4rem auto 1rem; display: grid; place-items: center; border-radius: 50%; color: var(--gold-2); background: radial-gradient(circle, rgba(201, 169, 106, .18), transparent 70%); }
.panel-lock svg { width: 40px; height: 40px; }
.panel-lock .shackle { transition: transform .5s var(--ease); transform-origin: 32px 21px; }
.tenant-panel.unlocked .panel-lock .shackle { transform: translateY(-4px) rotate(-18deg); }
.tenant-panel.unlocked .panel-lock { color: var(--ok); }
.panel-title { margin: 0; font-family: var(--serif); font-size: 2rem; font-weight: 600; }
.panel-lead { margin: .6rem 0 1.6rem; color: var(--text-soft); font-size: .92rem; }
#tenantCode {
  width: 100%; margin-bottom: 1rem; padding: 1rem 1.2rem;
  border-radius: 14px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05);
  color: var(--text); font-family: var(--sans); font-weight: 700; font-size: 1.6rem; letter-spacing: .5em; text-align: center; text-indent: .5em;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
#tenantCode::placeholder { color: rgba(255, 255, 255, .25); letter-spacing: .35em; }
#tenantCode:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201, 169, 106, .18); background: rgba(255, 255, 255, .07); }
#tenantCode.shake { animation: shake .45s; border-color: var(--danger); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.btn-spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(26, 20, 8, .3); border-top-color: #1a1408; animation: spin .8s linear infinite; }
.loading .btn-spinner { display: inline-block; }
.loading .btn-label { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }
.panel-msg { min-height: 1.4em; margin: .9rem 0 0; font-size: .88rem; }
.panel-msg.error { color: var(--danger); }
.panel-msg.ok { color: var(--ok); }
.panel-foot { margin: 1.2rem 0 0; font-size: .8rem; color: var(--text-soft); opacity: .8; }

/* Skyline animée */
.skyline { position: absolute; left: 0; right: 0; bottom: 0; height: min(260px, 30vh); z-index: -1; color: #0e1a2c; pointer-events: none; }
.skyline svg { width: 100%; height: 100%; display: block; }
.skyline::before { content: ''; position: absolute; inset: auto 0 0; height: 100%; background: linear-gradient(to top, var(--ink), transparent 70%); z-index: 1; }
#windows rect { fill: var(--gold-2); opacity: 0; transition: opacity 1.4s ease; }
#windows rect.on { opacity: .75; }

.scroll-hint { position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%); width: 26px; height: 42px; border: 1.5px solid rgba(255, 255, 255, .3); border-radius: 14px; z-index: 2; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
body.tenant-mode .scroll-hint { opacity: 0; }

/* ── Sections ─────────────────────────────────────────────────────────────── */
.section { padding: clamp(5rem, 11vw, 9rem) 0; position: relative; }
.section-alt { background: var(--paper); color: var(--paper-ink); }
.section-alt .eyebrow { color: #9a7a3c; }
.section-alt .eyebrow::before { background: #9a7a3c; }
.section-alt em { color: #9a7a3c; }
.section-title { margin: 0 0 3.2rem; font-family: var(--serif); font-weight: 600; font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.08; }
.section-lead { color: var(--text-soft); max-width: 460px; margin: -1.8rem 0 2rem; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.card {
  position: relative; padding: 2rem 1.6rem; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--ink-2), var(--ink)); border: 1px solid var(--line);
  transition: transform .4s var(--ease), border-color .3s;
  overflow: hidden;
}
.card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(201, 169, 106, .14), transparent 45%); opacity: 0; transition: opacity .3s; }
.card:hover { transform: translateY(-6px); border-color: rgba(201, 169, 106, .35); }
.card:hover::before { opacity: 1; }
.card-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: rgba(201, 169, 106, .12); color: var(--gold-2); margin-bottom: 1.4rem; }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin: 0 0 .5rem; font-size: 1.08rem; }
.card p { margin: 0; color: var(--text-soft); font-size: .93rem; }

.residences { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
.residence {
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: #fff; box-shadow: 0 30px 60px -40px rgba(27, 37, 51, .5);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.residence:hover { transform: translateY(-8px); box-shadow: 0 40px 80px -40px rgba(27, 37, 51, .6); }
.residence-art { height: 220px; display: grid; place-items: end center; color: var(--ink-3); overflow: hidden; }
.residence-art svg { width: 100%; height: 100%; transition: transform .8s var(--ease); }
.residence:hover .residence-art svg { transform: scale(1.06); }
.art-gilly { background: linear-gradient(160deg, #22385a, #0f1b2d); }
.art-tournai { background: linear-gradient(160deg, #2b3550, #121a2b); }
.residence-body { padding: 1.8rem 1.9rem 2rem; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #9a7a3c; background: rgba(201, 169, 106, .14); padding: .3rem .7rem; border-radius: 999px; }
.residence h3 { margin: .9rem 0 .4rem; font-family: var(--serif); font-size: 2rem; font-weight: 600; }
.residence p { margin: 0 0 1.3rem; color: #56606f; }
.residence-link { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .92rem; }
.residence-link svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.residence:hover .residence-link svg { transform: translateX(5px); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.features li { display: flex; gap: 1.1rem; padding: 1.3rem 1.4rem; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: var(--text-soft); font-size: .93rem; transition: border-color .3s, transform .4s var(--ease); }
.features li:hover { border-color: rgba(201, 169, 106, .35); transform: translateX(6px); }
.features strong { display: block; color: var(--text); font-size: 1rem; margin-bottom: .15rem; }
.features .dot { flex: none; width: 10px; height: 10px; margin-top: .45rem; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(201, 169, 106, .15); }

.footer { border-top: 1px solid var(--line); padding: 2.6rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.4rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.6rem; font-size: .88rem; color: var(--text-soft); }
.footer-links a:hover, .footer-links .linklike:hover { color: var(--gold-2); }
.copy { margin: 0; font-size: .8rem; color: var(--text-soft); opacity: .7; width: 100%; }

/* ── Apparitions au défilement ────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal { transition-delay: .45s; }
.hero .hero-cta.reveal { transition-delay: .6s; }
.hero .hero-stats.reveal { transition-delay: .75s; }
.cards .card:nth-child(2), .features li:nth-child(2) { transition-delay: .08s; }
.cards .card:nth-child(3), .features li:nth-child(3) { transition-delay: .16s; }
.cards .card:nth-child(4), .features li:nth-child(4) { transition-delay: .24s; }
.residences .residence:nth-child(2) { transition-delay: .12s; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 2.6rem; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav { padding-inline: 16px; }
  .wrap, .hero-inner { width: calc(100% - 32px); }
  .hero-inner { padding: 7rem 0 10rem; }
  .hero-stats { gap: 1.6rem; }
  .hero-cta .btn { flex: 1 1 100%; }
  .cards, .residences { grid-template-columns: 1fr; }
  .tenant-panel { padding: 2.6rem 1.4rem 1.6rem; }
  .brand-word { letter-spacing: .24em; }
}
@media (max-width: 380px) {
  .nav .btn-sm { padding: .5rem .8rem; font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-title .line > span { transform: none; }
}
