/* ── RESET & BASE ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #F2F5F9;
  --bg2:       #E8EDF4;
  --surface:   #FFFFFF;
  --border:    rgba(0,140,190,0.14);
  --border2:   rgba(0,140,190,0.24);
  --accent:    #0099BB;
  --accent2:   #0055CC;
  --green:     #00A86B;
  --red:       #E0274A;
  --amber:     #D4900A;
  --text:      #0A1520;
  --muted:     rgba(10,21,32,0.62);
  --faint:     rgba(10,21,32,0.05);
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --font-disp: 'Fraunces', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── FONTS ───────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,300;1,9..144,400&family=Outfit:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

/* ── NAV ─────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 48px;
  min-height: 106px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border2);
  box-shadow: 0 1px 20px rgba(0,0,0,0.08);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-lang {
  display: flex;
  gap: 6px;
}
.nav-lang a {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid var(--border2);
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
}
.nav-lang a:hover, .nav-lang a.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0,140,190,0.05);
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 20px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.85; }

/* ── HERO ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 24px 48px;
  overflow: hidden;
}

.scan-lines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,140,190,0.04) 2px,
    rgba(0,140,190,0.04) 4px
  );
  pointer-events: none;
  z-index: 0;
}

.hero-noise {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,102,255,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(0,200,255,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 60%, rgba(0,180,255,0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero > * { position: relative; z-index: 1; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(0,140,190,0.3);
  padding: 6px 14px;
  border-radius: 2px;
  margin-bottom: 40px;
  background: rgba(0,140,190,0.04);
}

.tag-blink {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.2; } }

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 28px;
}

.title-top {
  font-family: var(--font-disp);
  font-size: clamp(36px, 6vw, 76px);
  font-weight: 300;
  font-style: normal;
  line-height: 1.05;
  letter-spacing: -1px;
  color: var(--text);
  font-variation-settings: "opsz" 72;
}

.title-em {
  font-family: var(--font-disp);
  font-size: clamp(36px, 6vw, 76px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -1px;
  font-variation-settings: "opsz" 72;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 14px 32px;
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,200,255,0.3); }

.hero-metrics {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 32px;
  border: 1px solid var(--border2);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
}

.metric {
  padding: 20px 40px;
  text-align: center;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -1px;
}

.metric-key {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.metric-sep {
  width: 1px;
  height: 75px;
  background: var(--border2);
  flex-shrink: 0;
}

/* ── CALCUL ───────────────────────────────────────────────────── */
.calcul-section {
  padding: 120px 48px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.calcul-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
  max-width: 680px;
  margin: 0 auto;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #0077AA;
  margin-bottom: 20px;
}

.calcul-title {
  font-family: var(--font-disp);
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
  font-variation-settings: "opsz" 36;
}
.calcul-title em {
  font-style: italic;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.calcul-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 48px;
}

/* FORM */
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.calc-field { display: flex; flex-direction: column; gap: 8px; }

.calc-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #2a3a4a;
}

.calc-input {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 2px;
  padding: 14px 18px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.calc-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,140,190,0.1);
}
.calc-input::placeholder { color: var(--muted); }

/* Autocomplete */
.autocomplete-wrap { position: relative; }

.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-top: none;
  border-radius: 0 0 2px 2px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.autocomplete-list.open { display: block; }

.autocomplete-item {
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.active {
  background: rgba(0,140,190,0.08);
  color: var(--accent);
}
.autocomplete-price {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* Surface input */
.surf-wrap { position: relative; }
.surf-input { padding-right: 50px; }
.surf-unit {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

/* Calc button */
.calc-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 16px 24px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}
.calc-btn:hover {
  background: var(--accent);
  color: var(--bg);
}
.calc-btn-arrow { font-size: 18px; transition: transform 0.2s; }
.calc-btn:hover .calc-btn-arrow { transform: translateX(4px); }

/* RESULT SCREEN */
.result-screen {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 4px;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.result-screen:not(:has(#screen-result[style*="block"])) {
  display: none;
}
.result-screen::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent2), var(--accent), var(--green));
}

.screen-idle {
  display: none !important;
}
.idle-icon {
  font-size: 40px;
  color: var(--border2);
  animation: spin-slow 8s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }
.idle-text {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  max-width: 240px;
  line-height: 1.6;
}

.screen-result { padding: 36px; }

.res-commune {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.res-price-wrap { margin-bottom: 8px; }
.res-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.res-price {
  font-family: var(--font-disp);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  background: linear-gradient(90deg, var(--text), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.res-precision {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.res-divider {
  height: 1px;
  background: var(--border2);
  margin: 24px 0;
}

.res-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.res-meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.res-meta-val {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.res-bar-wrap {
  height: 3px;
  background: var(--border2);
  border-radius: 2px;
  margin-bottom: 24px;
  overflow: hidden;
}
.res-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  width: 0%;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.res-insight {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  padding: 16px;
  background: rgba(0,140,190,0.04);
  border: 1px solid var(--border2);
  border-radius: 2px;
  border-left: 3px solid var(--accent);
}
.res-insight strong { color: var(--text); }

/* ── COMMUNES GRID ───────────────────────────────────────────── */
.communes-section {
  padding: 100px 48px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.communes-inner { max-width: 1200px; margin: 0 auto; }
.communes-title {
  font-family: var(--font-disp);
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 300;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  line-height: 1.1;
  font-variation-settings: "opsz" 36;
}
.communes-title em {
  font-style: italic;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.communes-desc {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 48px;
  max-width: 560px;
}

.communes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2px;
}

.commune-row {
  display: grid;
  grid-template-columns: 32px 1fr 60px 80px;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.commune-row:hover {
  border-color: var(--border2);
  border-left-color: var(--accent);
  background: rgba(0,140,190,0.04);
}
.commune-top3 {
  background: rgba(0,180,210,0.05);
  border-left-color: var(--accent) !important;
}
.commune-rank {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.commune-top3 .commune-rank { font-size: 17px; }
.commune-name {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.commune-bar-wrap {
  height: 4px;
  background: var(--faint);
  border-radius: 2px;
  overflow: hidden;
}
.commune-bar-fill {
  height: 100%;
  border-radius: 2px;
}
.commune-price-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

/* ── CTA ─────────────────────────────────────────────────────── */
.cta-section {
  padding: 120px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(0,102,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.cta-inner { max-width: 600px; margin: 0 auto; position: relative; }
.cta-section h2 {
  font-family: var(--font-disp);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 300;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 20px;
  font-variation-settings: "opsz" 48;
}
.cta-section h2 em {
  font-style: italic;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cta-section p { color: var(--muted); font-size: 16px; margin-bottom: 40px; }

.cta-form {
  display: flex;
  gap: 0;
  max-width: 460px;
  margin: 0 auto 16px;
}
.cta-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-right: none;
  border-radius: 2px 0 0 2px;
  padding: 14px 20px;
  color: var(--text);
  font-size: 15px;
  outline: none;
}
.cta-input:focus { border-color: var(--accent); }
.cta-submit {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 0 2px 2px 0;
  padding: 14px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}
.cta-submit:hover { opacity: 0.85; }

.form-msg { font-size: 13px; color: var(--accent); min-height: 20px; margin-bottom: 8px; }
.cta-fine { font-size: 11px; color: rgba(232,244,255,0.2); letter-spacing: 0.05em; }

/* ── FOOTER ──────────────────────────────────────────────────── */
footer {
  padding: 32px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
}
.footer-credit {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.6;
  letter-spacing: 0.04em;
}
.footer-credit a { color: var(--accent); text-decoration: none; }
.footer-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}
.footer-logo span { color: var(--accent); }
.footer-logo img { height: 75px; width: auto; vertical-align: middle; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* ── SCROLLBAR ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  nav { padding: 16px 24px; }
  .nav-links { display: none; }
  .calcul-section { padding: 80px 24px; }
  .calcul-inner { grid-template-columns: 1fr; gap: 48px; }
  .communes-section { padding: 80px 24px; }
  .cta-section { padding: 80px 24px; }
  footer { padding: 24px; flex-direction: column; gap: 16px; text-align: center; }
  .hero-metrics { flex-direction: column; border-radius: 4px; }
  .metric-sep { width: 60px; height: 1px; }
  .metric { padding: 16px 32px; }
}

/* ── TYPE GRID ───────────────────────────────────────────────── */
.type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.type-opt {
  flex: 1 1 auto;
  min-width: 0;
}

.type-opt input[type=radio] { display: none; }

.type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 10px;
  width: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid #c5d0db;
  border-radius: 2px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  color: #2a3a4a;
  transition: all 0.2s;
  text-align: center;
}
.type-icon { font-size: 18px; }
.type-opt input:checked + .type-btn {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,140,190,0.07);
  font-weight: 600;
}
.type-btn:hover { border-color: #0099BB; color: #0077AA; }

@media (max-width: 500px) {
  .type-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── NAV UPDATES ─────────────────────────────────────────────── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language dropdown */
.lang-dropdown { position: relative; }

.lang-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 7px 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
  transition: all .2s;
}
.lang-trigger:hover { border-color: var(--accent); color: var(--accent); }
.lang-chevron { transition: transform .2s; }
.lang-menu.open ~ .lang-trigger .lang-chevron,
.lang-trigger:has(+ .lang-menu.open) .lang-chevron { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 4px;
  min-width: 140px;
  display: none;
  z-index: 200;
  overflow: hidden;
}
.lang-menu.open { display: block; }

.lang-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: background .15s;
  border-bottom: 1px solid var(--border);
}
.lang-item:last-child { border-bottom: none; }
.lang-item:hover { background: rgba(0,200,255,0.06); color: var(--text); }
.lang-item.active { color: var(--accent); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0; right: 0;
  background: rgba(242,245,249,0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border2);
  padding: 24px;
  flex-direction: column;
  gap: 0;
  z-index: 99;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: #0A1520;
  text-decoration: none;
  font-size: 16px;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-langs {
  display: flex;
  gap: 16px;
  padding: 16px 0 0;
  margin-top: 8px;
}
.mobile-langs a {
  border: none;
  padding: 0;
  font-size: 14px;
  color: var(--muted);
}
.mobile-langs a.active { color: var(--accent); }

/* ── RESPONSIVE FULL ─────────────────────────────────────────── */
@media (max-width: 768px) {
  nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }

  .hero { padding: 100px 20px 60px; }
  .hero-metrics {
    flex-wrap: wrap;
    width: 100%;
  }
  .metric { flex: 1; min-width: 120px; padding: 16px; }
  .metric-sep { display: none; }
  .metric-val { font-size: 22px; }

  .calcul-section { padding: 60px 20px; }
  .calcul-inner { grid-template-columns: 1fr; gap: 40px; }

  .type-grid { grid-template-columns: repeat(2, 1fr); }

  .result-screen { min-height: 300px; }
  .screen-idle { height: 300px; }
  .screen-result { padding: 24px; }
  .res-price { font-size: 36px; }
  .res-meta { grid-template-columns: 1fr 1fr; gap: 16px; }

  .communes-section { padding: 60px 20px; }
  .communes-grid { grid-template-columns: 1fr; }

  .cta-section { padding: 60px 20px; }
  .cta-form { flex-direction: column; }
  .cta-input { border-right: 1px solid var(--border2); border-radius: 2px; }
  .cta-submit { border-radius: 2px; }

  footer { padding: 20px; flex-direction: column; gap: 16px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }

  .calcul-title { font-size: 28px; }
  .title-top, .title-em { font-size: 36px; }
}

@media (max-width: 480px) {
  .title-top, .title-em { font-size: 28px; letter-spacing: -1px; }
  .hero-tag { font-size: 10px; }
  .metric-val { font-size: 20px; }
  .calc-btn { font-size: 12px; }
  .res-price { font-size: 28px; }
}

/* ── SEO HIDDEN CONTENT (visible to crawlers) ────────────────── */
.seo-communes {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── iMMOSOLUTIONS SECTION ───────────────────────────────────── */
.imos-section {
  padding: 100px 48px;
  background: linear-gradient(135deg, rgba(0,102,255,0.06) 0%, rgba(0,200,255,0.03) 100%);
  border-top: 1px solid var(--border2);
  border-bottom: 1px solid var(--border2);
  position: relative;
  overflow: hidden;
}
.imos-section::before {
  content: 'iMMOSOLUTIONS';
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: .3em;
  color: rgba(0,200,255,0.06);
  white-space: nowrap;
  pointer-events: none;
}

.imos-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.imos-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 20px;
  font-variation-settings: "opsz" 48;
}
.imos-title em {
  font-style: italic;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.imos-desc {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 420px;
}

.imos-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 14px 28px;
  border-radius: 2px;
  text-decoration: none;
  transition: all .2s;
}
.imos-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,200,255,.3);
}

.imos-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.imos-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: border-color .2s;
}
.imos-card:hover { border-color: var(--accent); }

.imos-card-icon {
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}
.imos-card-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}
.imos-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .imos-section { padding: 60px 20px; }
  .imos-inner { grid-template-columns: 1fr; gap: 40px; }
}

/* ── iMMOSOLUTIONS UPDATES ───────────────────────────────────── */
.imos-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 36px;
}
.imos-stat-val {
  font-family: 'Space Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -1px;
}
.imos-stat-key {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.imos-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.imos-card-content {}
.imos-card-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text);
}
.imos-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.imos-quote {
  max-width: 1200px;
  margin: 56px auto 0;
  padding: 32px 40px;
  background: rgba(0,140,190,0.04);
  border: 1px solid var(--border2);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  position: relative;
}
.imos-quote-mark {
  font-family: 'Fraunces', serif;
  font-size: 64px;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  position: absolute;
  top: 16px;
  left: 28px;
}
.imos-quote-text {
  font-size: 16px;
  color: var(--text);
  line-height: 1.7;
  font-style: italic;
  padding-left: 40px;
  margin-bottom: 12px;
}
.imos-quote-author {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--accent);
  padding-left: 40px;
}

@media (max-width: 768px) {
  .imos-stats { gap: 20px; }
  .imos-stat-val { font-size: 22px; }
  .imos-quote { padding: 24px 20px; }
  .imos-quote-text { padding-left: 24px; font-size: 14px; }
  .imos-quote-author { padding-left: 24px; }
}


/* ── LOGO IMAGE ──────────────────────────────────────────────── */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo img {
  height: 38px;
  width: auto;
  display: block;
}
.nav-logo-text {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-logo-text span { color: var(--accent); }


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — VOLLSTÄNDIG FÜR MOBILE / TABLET / IPHONE
   ═══════════════════════════════════════════════════════════════ */

/* ── Touch-Targets ──────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Nav */
  nav { padding: 12px 16px; }
  .nav-logo img { height: 75px; }

  /* Hero */
  .hero { padding: 88px 16px 48px; }
  .hero-tag { font-size: 9px; padding: 5px 10px; margin-bottom: 28px; }
  .hero-sub { font-size: 15px; margin-bottom: 32px; }
  .cta-btn { padding: 13px 24px; font-size: 12px; }
  .hero-metrics { width: 100%; flex-wrap: wrap; }
  .metric { flex: 1 1 100px; padding: 14px 12px; }
  .metric-sep { display: none; }
  .metric-val { font-size: 22px; }
  .metric-key { font-size: 10px; }

  /* Calcul */
  .calcul-section { padding: 48px 16px; }
  .calcul-inner { grid-template-columns: 1fr; gap: 32px; }
  .calcul-title { font-size: 26px; }
  .calcul-desc { font-size: 14px; margin-bottom: 32px; }
  .calc-form { gap: 18px; }
  .calc-input { font-size: 16px; padding: 13px 14px; } /* 16px évite zoom iOS */
  .surf-input { padding-right: 44px; }
  .surf-unit { right: 14px; }
  .calc-btn { padding: 15px 20px; font-size: 12px; min-height: 48px; }

  /* Type grid */
  .type-grid { gap: 8px; }
  .type-btn { padding: 10px 8px; font-size: 11px; white-space: nowrap; }
  .type-icon { font-size: 16px; }

  /* Result */
  .result-screen { min-height: 280px; }
  .screen-idle { height: 280px; }
  .screen-result { padding: 20px; }
  .res-price { font-size: 32px; letter-spacing: -1px; }
  .res-meta { grid-template-columns: 1fr 1fr; gap: 12px; }
  .res-meta-val { font-size: 15px; }
  .res-insight { font-size: 12px; }

  /* Communes */
  .communes-section { padding: 48px 16px; }
  .communes-grid { grid-template-columns: 1fr; }
  .communes-title { font-size: 26px; }

  /* Footer */
  footer { padding: 20px 16px; flex-direction: column; gap: 12px; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 12px; }

  /* App/House fields */
  #app-fields-wrap .type-grid,
  #house-fields-wrap .type-grid { gap: 3px; }

  /* Parking grid */
  #app-fields-wrap > div[style*="grid-template-columns:1fr 1fr"] { gap: 6px; }
}

@media (max-width: 480px) {
  .title-top, .title-em { font-size: 28px; letter-spacing: -0.5px; }
  .hero-tag { font-size: 9px; }
  .metric-val { font-size: 20px; }
  .res-price { font-size: 26px; }
  .res-meta { grid-template-columns: 1fr; gap: 10px; }
  .calcul-inner { gap: 24px; }

  /* Energie grid auf iPhone — 6 pro Zeile ist eng, 4 besser */
  #energie-grid,
  #app-fields-wrap > div[style*="grid-template-columns:repeat(6"] {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  /* Baujahr 6→3 */
  #baujahr-grid,
  #app-fields-wrap .type-grid[id="baujahr-grid"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .type-btn { padding: 8px 4px; }
}

/* ── Safe area für iPhone X+ ──────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  nav {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

/* ── Landscape iPhone ────────────────────────────────────── */
@media (max-width: 812px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 80px 24px 40px; }
  .calcul-inner { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Tablet ──────────────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  nav { padding: 14px 28px; }
  .calcul-section { padding: 80px 28px; }
  .calcul-inner { gap: 48px; }
  .communes-section { padding: 72px 28px; }
  .hero { padding: 110px 28px 72px; }
}

/* ── MOBILE SPACING FIXES ────────────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 80px 16px 32px;
  }

  .hero-metrics {
    flex-direction: row !important;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 36px;
  }

  .metric {
    flex: 1 1 30%;
    padding: 14px 8px;
    text-align: center;
  }

  .metric-sep { display: none; }

  .calcul-section {
    padding: 32px 16px 48px;
  }
}

/* ── Market type switch buttons ─────────────────────────────── */
.mtype-btn {
  background: var(--surface);
  border: none;
  border-right: 1px solid var(--border2);
  color: var(--muted);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  letter-spacing: .04em;
}
.mtype-btn:last-child { border-right: none; }
.mtype-btn:hover { color: var(--accent); background: var(--bg2); }
.mtype-btn.mtype-active {
  background: var(--accent);
  color: #06060A;
  font-weight: 700;
}
