/* ═══════════════════════════════════════════════════════════════
   Marc Pouliot — App Immobilier PWA
   Design System Mobile-First — Image de marque (clair / foncé)
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

/* ─── Tokens — Clair (défaut) ─── */
:root,
html[data-theme="light"] {
  --primary: #003DA5;
  --primary-dark: #001E5C;
  --primary-light: #1A56C4;
  --accent: #BE0000;
  --accent-light: #D41C1C;
  --white: #ffffff;

  --bg: #F6F5F1;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F0EFEA;
  --bg-elevated: #FFFFFF;

  --text: #0B1B36;
  --text-secondary: #5C6680;
  --text-light: #8A93A6;

  --border: #E5E2D8;
  --border-light: #EEEBE3;
  --shadow-sm: 0 1px 2px rgba(11,27,54,0.04);
  --shadow-md: 0 4px 14px rgba(11,27,54,0.07);
  --shadow-lg: 0 12px 32px rgba(11,27,54,0.1);
  --shadow-card: 0 2px 10px rgba(11,27,54,0.06);
  --shadow-glow: 0 0 24px rgba(0,61,165,0.12);

  --header-grad: linear-gradient(170deg, #003DA5 0%, #002B75 45%, #001E5C 100%);
  --header-orb-blue: rgba(255,255,255,0.1);
  --header-orb-red: rgba(190,0,0,0.12);
  --desktop-bg: #EAE8E1;

  --header-bg: rgba(255,255,255,0.92);
  --pill-bg: #F6F5F1;
  --pill-border: #E5E2D8;
  --pill-active-bg: rgba(0,61,165,0.1);
  --pill-active-border: rgba(0,61,165,0.35);
  --pill-active-text: #003DA5;
  --detail-bg: #FFFFFF;
  --detail-border: rgba(0,61,165,0.22);

  --rate-good: #059669;
  --rate-up: #DC2626;
  --rate-down: #059669;
  --chart-broker: #003DA5;
  --chart-broker-fill: rgba(0,61,165,0.14);
  --chart-bank: #8A93A6;
  --chart-grid: rgba(11,27,54,0.08);
  --chart-label: #5C6680;
  --chart-dot-stroke: #FFFFFF;
  --chart-selected: #001E5C;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 480px;
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* ─── Tokens — Foncé ─── */
html[data-theme="dark"] {
  --primary: #2F7BFF;
  --primary-dark: #0C1626;
  --primary-light: #6FA4FF;
  --accent: #E5383B;
  --accent-light: #FF6B6B;
  --white: #ffffff;

  --bg: #0C1626;
  --bg-surface: #111E33;
  --bg-card: #15233A;
  --bg-card-hover: #1C2D4A;
  --bg-elevated: #1C2D4A;

  --text: #EEF2F7;
  --text-secondary: #B3C0D4;
  --text-light: #8B9AB2;

  --border: #26385A;
  --border-light: #1E2E4A;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.35);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.4);
  --shadow-lg: 0 14px 36px rgba(0,0,0,0.5);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.28);
  --shadow-glow: 0 0 24px rgba(74,143,227,0.15);

  --header-grad: linear-gradient(170deg, #0A1628 0%, #0F2242 40%, #152D52 70%, #0A1628 100%);
  --header-orb-blue: rgba(74,143,227,0.14);
  --header-orb-red: rgba(220,53,69,0.08);
  --desktop-bg: #060B14;

  --header-bg: rgba(16,28,48,0.92);
  --pill-bg: rgba(255,255,255,0.04);
  --pill-border: rgba(255,255,255,0.12);
  --pill-active-bg: rgba(74,143,227,0.18);
  --pill-active-border: rgba(107,166,239,0.45);
  --pill-active-text: #BFDBFE;
  --detail-bg: #152238;
  --detail-border: rgba(107,166,239,0.35);

  --rate-good: #34D399;
  --rate-up: #F87171;
  --rate-down: #34D399;
  --chart-broker: #6BA6EF;
  --chart-broker-fill: rgba(74,143,227,0.2);
  --chart-bank: #94A3B8;
  --chart-grid: rgba(255,255,255,0.07);
  --chart-label: rgba(240,243,248,0.55);
  --chart-dot-stroke: #0A1628;
  --chart-selected: #BFDBFE;
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  color-scheme: light;
}
html[data-theme="dark"] { color-scheme: dark; }

body {
  font-family: 'Montserrat', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--safe-area-top);
  padding-bottom: var(--safe-area-bottom);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
img { max-width: 100%; display: block; }

/* ─── App Shell ─── */
.app-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
}

/* ─── Header Profile ─── */
.profile-header {
  background: var(--header-grad);
  padding: 44px 24px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.profile-header::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -40%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--header-orb-blue) 0%, transparent 70%);
  border-radius: 50%;
}

.profile-header::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -25%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, var(--header-orb-red) 0%, transparent 70%);
  border-radius: 50%;
}

.app-refresh-btn,
.btn-theme,
#btn-app-theme {
  position: absolute;
  top: 16px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.app-refresh-btn { left: 16px; }
.btn-theme, #btn-app-theme { left: 64px; }
.app-refresh-btn:active,
.btn-theme:active,
#btn-app-theme:active {
  background: rgba(255,255,255,0.22);
  color: #fff;
}
.app-refresh-btn.spinning {
  animation: app-refresh-spin 0.7s linear infinite;
}
@keyframes app-refresh-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.btn-theme__icon-dark { display: none; }
html[data-theme="dark"] .btn-theme__icon-light { display: none; }
html[data-theme="dark"] .btn-theme__icon-dark { display: inline; }

/* Theme toggle in calc headers (not absolute) */
.calc-header .header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  position: static;
}
.calc-header .btn-theme--calc,
.calc-header .btn-theme {
  position: static;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.header-actions .btn-theme {
  position: static;
}
.calc-header .calc-page-title {
  margin-right: 0;
}

.lang-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 4px;
  z-index: 10;
}

.lang-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  transition: var(--transition);
  letter-spacing: 0.5px;
}

.lang-btn.active {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
/* Photo — PNG transparent (Marc Remax outline 15 Matrix.png) */
.profile-photo {
  width: 160px;
  height: 160px;
  border-radius: 0;
  border: none;
  object-fit: contain;
  margin: 0 auto 14px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
  overflow: visible;
}

.profile-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.3px;
  position: relative;
  z-index: 1;
}

.profile-title {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

.profile-location {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
  position: relative;
  z-index: 1;
}

.profile-brokerage {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 7px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 22px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  z-index: 1;
}

.profile-brokerage img {
  width: 18px;
  height: 18px;
}

/* ─── Hero taux live ─── */
.taux-hero-wrap {
  margin-top: -10px;
  margin-bottom: 4px;
  position: relative;
  z-index: 2;
}

.taux-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  min-height: 64px;
  transition: var(--transition);
  border-left: 3px solid var(--rate-good);
}

.taux-hero:active {
  transform: scale(0.98);
  background: var(--bg-card-hover);
}

.taux-hero-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(52,168,83,0.18);
  flex-shrink: 0;
}

.taux-hero-body {
  flex: 1;
  min-width: 0;
}

.taux-hero-rate {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.taux-hero-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ─── Quick shortcuts (3) ─── */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 0 16px 14px;
}

.quick-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 16px 8px 14px;
  text-align: center;
  transition: var(--transition);
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.quick-card:active {
  transform: scale(0.96);
  background: var(--bg-card-hover);
}

.quick-card-icon {
  font-size: 26px;
  line-height: 1;
}

.quick-card-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.25;
}

/* ─── CTA Évaluation ─── */
.cta-eval {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  background: linear-gradient(135deg, #b01020 0%, #dc3545 55%, #e04555 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(220,53,69,0.28);
  min-height: 72px;
  transition: var(--transition);
}

.cta-eval:active {
  transform: scale(0.98);
  filter: brightness(1.05);
}

.cta-eval-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(255,255,255,0.14);
  flex-shrink: 0;
}

.cta-eval-body {
  flex: 1;
  min-width: 0;
}

.cta-eval-title {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
}

.cta-eval-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.82);
  margin-top: 2px;
}

.cta-eval-arrow {
  color: rgba(255,255,255,0.75);
  font-size: 20px;
  flex-shrink: 0;
}

/* ─── Voir tous calculateurs ─── */
.calc-more-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.calc-more-btn:active {
  background: var(--bg-card);
  color: var(--text);
}

.calc-more-chevron {
  font-size: 12px;
  opacity: 0.8;
}

.calc-more-grid[hidden] {
  display: none;
}

.calc-more-grid {
  margin-bottom: 14px;
}

/* ─── Contact Buttons — BIGGER for big fingers ─── */
.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 18px 20px 10px;
  position: relative;
  z-index: 2;
}

.contact-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 76px;
}

.contact-btn-icon {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  font-size: 26px;
}

.contact-btn:active .contact-btn-icon {
  transform: scale(0.92);
  background: var(--bg-elevated);
}

.contact-btn-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ─── Social Links ─── */
.social-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 10px 24px 22px;
}

.social-link {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  transition: var(--transition);
  font-size: 20px;
}

.social-link:active {
  transform: scale(0.9);
  background: var(--bg-card);
}

/* ─── Section Cards ─── */
.section-group {
  padding: 0 16px;
  margin-bottom: 14px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-light);
  padding: 6px 8px 10px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card-link {
  display: flex;
  align-items: center;
  padding: 16px 18px;
  transition: var(--transition);
  gap: 14px;
  min-height: 64px;
}

.card-link:active {
  background: var(--bg-card-hover);
}

.card-link + .card-link {
  border-top: 1px solid var(--border);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

/* Dark mode icon backgrounds */
.card-icon.blue { background: rgba(42,90,140,0.2); }
.card-icon.green { background: rgba(52,168,83,0.15); }
.card-icon.purple { background: rgba(128,90,213,0.15); }
.card-icon.orange { background: rgba(255,152,0,0.15); }
.card-icon.red { background: rgba(220,53,69,0.15); }
.card-icon.teal { background: rgba(0,188,212,0.15); }
.card-icon.pink { background: rgba(233,30,99,0.12); }
.card-icon.indigo { background: rgba(63,81,181,0.15); }

.card-content {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.card-arrow {
  color: var(--text-light);
  font-size: 16px;
  flex-shrink: 0;
}

/* ─── Tool Grid — BIGGER cards for big fingers ─── */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
  margin-bottom: 14px;
}

/* OUTILS : cartes égales, un peu plus compactes (pas de carte pleine largeur orpheline) */
.tool-grid--tools {
  gap: 10px;
}
.tool-grid--tools .tool-card {
  min-height: 96px;
  padding: 16px 12px;
}
.tool-grid--tools .tool-card-icon {
  font-size: 26px;
  margin-bottom: 8px;
}
.tool-grid--tools .tool-card-title {
  font-size: 13px;
  font-weight: 600;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 22px 16px;
  text-align: center;
  transition: var(--transition);
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tool-card:active {
  transform: scale(0.96);
  background: var(--bg-card-hover);
}

.tool-card-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.tool-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

.tool-card-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.tool-card-wide {
  grid-column: 1 / -1;
}

button.tool-card {
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

button.tool-card:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.7);
  outline-offset: 2px;
}

/* ─── Footer ─── */
.app-footer {
  text-align: center;
  padding: 24px 16px 44px;
  color: var(--text-light);
  font-size: 12px;
}

.app-footer a {
  color: var(--primary-light);
  font-weight: 500;
}

/* ─── Version Pro annotation ─── */
.mp-pro-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  border: 1px solid transparent;
}
.mp-pro-chip--off {
  color: rgba(148, 163, 184, 0.9);
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.18);
  cursor: pointer;
}
.mp-pro-chip--on {
  color: #dbeafe;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-color: rgba(147, 197, 253, 0.35);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
  cursor: pointer;
}
.mp-pro-chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
  flex-shrink: 0;
}
.mp-pro-chip--on .mp-pro-chip__dot {
  background: #86efac;
  box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.25);
}
.mp-pro-chip__label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 10px; }
.mp-pro-chip__name { font-weight: 500; opacity: 0.92; text-transform: none; letter-spacing: 0; font-size: 11px; }
.mp-pro-chip__hint { font-weight: 500; opacity: 0.7; text-transform: none; letter-spacing: 0; font-size: 10px; }

.mp-pro-banner {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  padding-left: max(14px, env(safe-area-inset-left, 0px));
  padding-right: max(14px, env(safe-area-inset-right, 0px));
  font-size: 12px;
  font-weight: 600;
  color: #eff6ff;
  background: linear-gradient(90deg, #1e3a8a, #1d4ed8 40%, #2563eb);
  border-bottom: 1px solid rgba(147, 197, 253, 0.35);
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}
.mp-pro-banner[hidden] { display: none !important; }
.mp-pro-banner__mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.14);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mp-pro-banner__text { font-weight: 500; opacity: 0.95; }

/* ─── Calculator Page — Dark ─── */
.calc-page {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}

.calc-header {
  background: var(--bg-surface);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.calc-back {
  padding: 6px;
  color: var(--primary-light);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-weight: 500;
}

.calc-page-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  text-align: center;
  margin-right: 60px;
}

.calc-body {
  padding: 22px 16px;
}

.calc-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 22px;
  line-height: 1.6;
}

/* ─── Form Elements — BIGGER inputs ─── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-card);
  transition: var(--transition);
  -webkit-appearance: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(74,138,191,0.15);
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-segmented {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 3px;
}

.form-segmented button {
  flex: 1;
  padding: 12px 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.form-segmented button.active {
  background: var(--bg-card);
  color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.form-select {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-card);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%235a6a82'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ─── Buttons — BIGGER ─── */
.btn-primary {
  width: 100%;
  padding: 16px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: var(--transition);
  box-shadow: 0 6px 16px rgba(0,61,165,0.22);
  box-shadow: 0 4px 14px rgba(42,90,140,0.3);
  min-height: 54px;
}

.btn-primary:active {
  transform: scale(0.98);
  filter: brightness(0.9);
}

.btn-secondary {
  width: 100%;
  padding: 16px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 500;
  transition: var(--transition);
  min-height: 54px;
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

/* ─── Results — Dark ─── */
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 20px;
  box-shadow: var(--shadow-card);
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.result-row + .result-row {
  border-top: 1px solid var(--border);
}

.result-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.result-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.result-highlight {
  background: linear-gradient(135deg, #0f2242 0%, var(--primary) 100%);
  color: var(--white);
  margin: -20px -20px 16px;
  padding: 22px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  text-align: center;
  border-bottom: 1px solid rgba(42,90,140,0.3);
}

.result-highlight-label {
  font-size: 14px;
  opacity: 0.75;
  margin-bottom: 6px;
}

.result-highlight-value {
  font-size: 30px;
  font-weight: 700;
}

/* ─── Amortization Table — Dark ─── */
.amort-toggle {
  width: 100%;
  padding: 14px;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--primary-light);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 16px;
  transition: var(--transition);
}

.amort-table-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.amort-table-wrap.open {
  max-height: 2000px;
}

.amort-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 12px;
}

.amort-table th {
  background: var(--bg-surface);
  padding: 10px 6px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: right;
  position: sticky;
  top: 0;
}

.amort-table th:first-child { text-align: center; }

.amort-table td {
  padding: 8px 6px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.amort-table td:first-child {
  text-align: center;
  color: var(--text-secondary);
}

/* ─── QR Code Section — Dark ─── */
.qr-section {
  text-align: center;
  padding: 36px 24px;
}

.qr-code {
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.qr-label {
  font-size: 15px;
  color: var(--text-secondary);
}

/* ─── Taux Section — Dark ─── */
.taux-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}

.taux-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.taux-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.taux-date {
  font-size: 12px;
  color: var(--text-light);
}

.taux-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
}

.taux-row + .taux-row {
  border-top: 1px solid var(--border);
}

.taux-term {
  font-size: 15px;
  color: var(--text-secondary);
}

.taux-rate {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-light);
}

/* ─── Loading & Animations ─── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.animate-in {
  animation: fadeIn 0.4s ease forwards;
}

.animate-in-delay-1 { animation-delay: 0.05s; opacity: 0; }
.animate-in-delay-2 { animation-delay: 0.1s; opacity: 0; }
.animate-in-delay-3 { animation-delay: 0.15s; opacity: 0; }
.animate-in-delay-4 { animation-delay: 0.2s; opacity: 0; }
.animate-in-delay-5 { animation-delay: 0.25s; opacity: 0; }

/* ─── Standalone PWA overrides ─── */
@media (display-mode: standalone) {
  .profile-header {
    padding-top: calc(24px + var(--safe-area-top));
  }
}

/* ─── Sub-page entry animation ─── */
.calc-body {
  animation: fadeInUp 0.35s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Skeleton Loaders (shimmer) ─── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-elevated) 37%,
    var(--bg-card) 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}

.skeleton-line {
  height: 14px;
  margin-bottom: 10px;
  border-radius: 6px;
}

.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }
.skeleton-line.full { width: 100%; }

.skeleton-block {
  height: 60px;
  margin-bottom: 12px;
}

@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ─── Freshness Badge ─── */
.freshness-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.freshness-badge--fresh {
  background: rgba(5, 150, 105, 0.1);
  color: var(--rate-good);
  border: 1px solid rgba(5, 150, 105, 0.22);
}

.freshness-badge--stale {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.freshness-badge--expired {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ─── Desktop wrapper ─── */
@media (min-width: 481px) {
  body {
    background: var(--desktop-bg);
  }
  .app-shell {
    box-shadow: var(--shadow-lg);
  }
}

/* ─── Pro tools gate (accueil) + page gate /recherche ─── */
.pro-tools-gate[hidden],
#pro-login-gate[hidden] {
  display: none !important;
}

/* Login Pro — compact, bas de page */
.pro-login-compact {
  padding: 4px 16px 0;
  margin-bottom: 4px;
}
.btn-pro-login-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: var(--transition);
}
.btn-pro-login-compact:active {
  background: var(--bg-card-hover);
}
.btn-pro-login-compact__icon {
  font-size: 15px;
  line-height: 1;
  opacity: 0.85;
}
.btn-pro-login-compact__label {
  color: var(--text-secondary);
}
.btn-pro-login-compact__sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
}
.btn-pro-login-compact__sub::before {
  content: '·';
  margin-right: 6px;
}

.mp-pro-page-gate {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(11, 27, 54, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
html[data-theme="dark"] .mp-pro-page-gate {
  background: rgba(0, 0, 0, 0.65);
}
.mp-pro-page-gate__card {
  width: min(380px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 28px 22px 22px;
  text-align: center;
}
.mp-pro-page-gate__icon { font-size: 32px; margin-bottom: 10px; }
.mp-pro-page-gate__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.mp-pro-page-gate__text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
}
.mp-pro-page-gate__btn {
  display: block;
  width: 100%;
  margin-bottom: 12px;
}
.mp-pro-page-gate__back {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
html.mp-pro-gated body > .calc-page,
html.mp-pro-gated body > .app-shell {
  pointer-events: none;
  user-select: none;
}


/* ═══════════════════════════════════════════════════════════════
   MODE TERRAIN (Pro) — refonte 26 oct. 2026
   html.mp-is-pro = Pro / propriétaire / VPN (posé par theme.js + search-api.js)
   html.mp-show-card = Marc affiche sa carte client (?carte=1)
   ═══════════════════════════════════════════════════════════════ */
:root {
  --t-ink: #0C1626;
  --t-slate: #15233A;
  --t-line: #26385A;
  --t-paper: #EEF2F7;
  --t-signal: #2F7BFF;
  --t-alert: #E5383B;
  --t-ok: #2BB673;
  --t-tab-h: 64px;
}
html[data-theme="light"] {
  --t-ink: #F3F5F9;
  --t-slate: #FFFFFF;
  --t-line: #D9DFEA;
  --t-paper: #0B1B36;
  --t-signal: #003DA5;
}

.pro-only { display: none; }
html.mp-is-pro .pro-only { display: block; }
html.mp-is-pro .public-only { display: none; }
html.mp-is-pro.mp-show-card .public-only { display: block; }
html.mp-is-pro.mp-show-card .pro-only { display: none; }
html.mp-is-pro .mp-pro-banner,
html.mp-is-pro #mp-access-badge { display: none !important; }
.mp-num { font-variant-numeric: tabular-nums; }

/* ── Barre du bas ── */
.t-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  display: none;
  padding: 6px 8px calc(6px + var(--safe-area-bottom));
  background: color-mix(in srgb, var(--bg-surface) 94%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
html.mp-is-pro:not(.mp-no-tabbar) .t-tabbar { display: flex; justify-content: center; }
html.mp-is-pro:not(.mp-no-tabbar) body { padding-bottom: calc(var(--t-tab-h) + var(--safe-area-bottom) + 12px); }
.t-tabbar__inner { display: flex; width: 100%; max-width: var(--max-width); }
.t-tab {
  flex: 1; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--text-secondary); text-decoration: none; font-size: 0.6875rem; font-weight: 600; border-radius: 12px;
}
.t-tab__ico { font-size: 1.3rem; line-height: 1; }
.t-tab[aria-current="page"] { color: var(--primary-light); background: color-mix(in srgb, var(--t-signal) 14%, transparent); }
.t-tab:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 2px; }

/* ── Cockpit (accueil Pro) ── */
.t-home { padding: 14px 16px 8px; }
.t-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.t-top__photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--t-signal); }
.t-top__who { flex: 1; min-width: 0; }
.t-top__name { font-weight: 700; font-size: 1rem; color: var(--text); }
.t-top__state { font-size: 0.75rem; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.t-top__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--t-ok); }
.t-iconbtn {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text); font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.t-iconbtn:focus-visible { outline: 2px solid var(--primary-light); }

.t-search { position: relative; margin-bottom: 8px; }
.t-search__label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); margin: 0 0 8px 2px; }
.t-search__row { display: flex; gap: 8px; }
.t-search__input {
  flex: 1; min-width: 0; height: 58px; padding: 0 16px; border-radius: 16px;
  border: 2px solid var(--border); background: var(--bg-card); color: var(--text);
  font: 600 1.0625rem 'Montserrat', sans-serif; -webkit-appearance: none;
}
.t-search__input::placeholder { color: var(--text-light); font-weight: 500; }
.t-search__input:focus { outline: none; border-color: var(--t-signal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--t-signal) 22%, transparent); }
.t-search__go {
  width: 58px; height: 58px; border-radius: 16px; border: none; background: var(--t-signal); color: #fff;
  font-size: 1.4rem; cursor: pointer;
}
.t-search__go:active { transform: scale(0.96); }
.t-search__hint { min-height: 22px; margin: 8px 2px 0; font-size: 0.8125rem; color: var(--text-secondary); }
.t-search__hint b { color: var(--text); font-weight: 600; }
.t-recents { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 2px; scrollbar-width: none; }
.t-recents::-webkit-scrollbar { display: none; }
.t-chip {
  flex: 0 0 auto; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 9px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text); font: 600 0.8125rem 'Montserrat', sans-serif; text-decoration: none; cursor: pointer;
}

.t-h2 { font-size: 0.9375rem; font-weight: 700; color: var(--text); margin: 22px 2px 10px; }
.t-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.t-tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 96px;
  padding: 14px; border-radius: 16px; background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); text-decoration: none;
}
.t-tile:active { background: var(--bg-card-hover); }
.t-tile:focus-visible { outline: 2px solid var(--primary-light); }
.t-tile__ico { font-size: 1.5rem; line-height: 1; }
.t-tile__name { font-weight: 700; font-size: 0.9375rem; line-height: 1.2; }
.t-tile__sub { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }
.t-tile--wide { grid-column: span 2; flex-direction: row; align-items: center; min-height: 64px; }
.t-tile--signal { background: var(--t-signal); border-color: var(--t-signal); color: #fff; }
.t-tile--signal .t-tile__sub { color: rgba(255,255,255,0.85); }

.t-rate {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text); text-decoration: none; margin-top: 10px;
}
.t-rate__val { font-size: 1.375rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.t-rate__txt { flex: 1; font-size: 0.8125rem; color: var(--text-secondary); }

.t-calcs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.t-calc {
  min-height: 72px; padding: 10px 6px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text); text-decoration: none; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.2;
}
.t-calc span:first-child { font-size: 1.3rem; }
.t-back-cockpit {
  display: none; position: sticky; top: 0; z-index: 50; margin: 0; width: 100%; padding: 12px; border: none;
  background: var(--t-signal); color: #fff; font: 700 0.875rem 'Montserrat', sans-serif; cursor: pointer;
}
html.mp-is-pro.mp-show-card .t-back-cockpit { display: block; }

/* ── Fiche adresse ── */
.f-page { max-width: var(--max-width); margin: 0 auto; padding: 10px 16px 24px; }
.f-bar { display: flex; gap: 8px; align-items: center; position: sticky; top: 0; z-index: 40; padding: 8px 0; background: var(--bg); }
.f-bar .t-search__input { height: 48px; font-size: 0.9375rem; border-radius: 12px; }
.f-bar .t-search__go { width: 48px; height: 48px; border-radius: 12px; font-size: 1.1rem; }
.f-plate {
  margin: 10px 0 12px; padding: 18px 18px 16px; border-radius: 18px;
  background: var(--t-signal); color: #fff; position: relative; overflow: hidden;
}
.f-plate__num { font-size: clamp(3rem, 18vw, 4.5rem); font-weight: 800; line-height: 0.95; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.f-plate__street { font-size: 1.25rem; font-weight: 700; margin-top: 6px; line-height: 1.2; }
.f-plate__city { font-size: 0.875rem; opacity: 0.85; margin-top: 2px; }
.f-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.f-act {
  min-height: 60px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font: 600 0.6875rem 'Montserrat', sans-serif; text-decoration: none; cursor: pointer;
}
.f-act span:first-child { font-size: 1.2rem; }
.f-facade { margin-bottom: 14px; }
.f-sec { border: 1px solid var(--border); border-radius: 16px; background: var(--bg-card); margin-bottom: 10px; overflow: hidden; }
.f-sec > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 14px; min-height: 56px;
}
.f-sec > summary::-webkit-details-marker { display: none; }
.f-sec__ico { font-size: 1.25rem; }
.f-sec__title { flex: 1; font-weight: 700; font-size: 0.9375rem; color: var(--text); }
.f-sec__count { min-width: 28px; padding: 3px 9px; border-radius: 999px; background: var(--bg-surface); border: 1px solid var(--border); font-size: 0.75rem; font-weight: 700; text-align: center; color: var(--text); }
.f-sec__count--alert { background: var(--t-alert); border-color: var(--t-alert); color: #fff; }
.f-sec__chev { color: var(--text-light); transition: transform .2s; }
.f-sec[open] .f-sec__chev { transform: rotate(180deg); }
.f-sec__body { padding: 0 14px 14px; }
.f-sec--empty > summary { opacity: 0.6; }
.f-big { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.1; }
.f-big-sub { font-size: 0.8125rem; color: var(--text-secondary); margin: 2px 0 12px; }
.f-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.f-kv dt { font-size: 0.6875rem; color: var(--text-light); font-weight: 600; }
.f-kv dd { font-size: 0.875rem; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; margin: 1px 0 0; }
.f-row {
  display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border);
  color: var(--text); text-decoration: none;
}
.f-row:first-child { border-top: none; }
.f-row__main { flex: 1; min-width: 0; }
.f-row__t { font-weight: 700; font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; }
.f-row__s { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; }
.f-row__v { text-align: right; font-weight: 800; font-size: 0.9375rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.f-row__v small { display: block; font-weight: 500; font-size: 0.6875rem; color: var(--text-secondary); }
.f-pill { display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 0.6875rem; font-weight: 700; }
.f-pill--ok { background: color-mix(in srgb, var(--t-ok) 18%, transparent); color: var(--t-ok); }
.f-pill--off { background: var(--bg-surface); color: var(--text-secondary); border: 1px solid var(--border); }
.f-pill--alert { background: var(--t-alert); color: #fff; }
.f-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.f-stat { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.f-stat b { display: block; font-size: 1rem; font-variant-numeric: tabular-nums; color: var(--text); }
.f-stat span { font-size: 0.6875rem; color: var(--text-secondary); }
.f-more { display: block; text-align: center; padding: 12px; margin-top: 6px; border-radius: 12px; border: 1px solid var(--border); color: var(--primary-light); font-weight: 700; font-size: 0.8125rem; text-decoration: none; }
.f-msg { padding: 28px 8px; text-align: center; color: var(--text-secondary); font-size: 0.9375rem; }
.f-msg b { display: block; color: var(--text); font-size: 1.0625rem; margin-bottom: 6px; }
.f-hist { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin-top: 12px; }
.f-hist__bar { flex: 1; background: color-mix(in srgb, var(--t-signal) 55%, transparent); border-radius: 4px 4px 0 0; position: relative; min-height: 4px; }
.f-hist__lbl { display: flex; gap: 6px; font-size: 0.625rem; color: var(--text-light); margin-top: 4px; }
.f-hist__lbl span { flex: 1; text-align: center; }
.f-skel { height: 56px; border-radius: 16px; background: var(--bg-card); border: 1px solid var(--border); margin-bottom: 10px; animation: fpulse 1.2s ease-in-out infinite; }
@keyframes fpulse { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .f-skel { animation: none; } }

/* Pages de recherche existantes : plus gros en mode terrain */
html.mp-is-pro .pro-search-input { min-height: 52px; font-size: 16px; }
html.mp-is-pro .pro-search-btn { min-height: 52px; min-width: 56px; }
html.mp-is-pro .pro-result-card { border-radius: 16px; }
html.mp-is-pro .hero-mini { padding: 16px 18px; }
html.mp-is-pro .hero-mini__stats { display: none; }

/* Façade Street View (fiche adresse + fiche entreprise) */
.facade { display: block; position: relative; border-radius: 14px; overflow: hidden; background: var(--bg-surface); aspect-ratio: 16 / 9; text-decoration: none; }
.facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.facade__badge { position: absolute; left: 10px; bottom: 10px; background: rgba(12,22,38,0.8); color: #fff; font-size: 0.6875rem; font-weight: 600; padding: 4px 8px; border-radius: 6px; }
.t-tile__name, .t-tile__sub { display: block; }
.t-tile--wide { justify-content: flex-start; gap: 12px; }
.t-alt { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.t-alt[hidden] { display: none; }

/* ═══════════════════════════════════════════════════════════════
   GRAND ÉCRAN (Mac) — mode Pro seulement, ≥ 1024 px (27 oct. 2026)
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  /* Menu latéral gauche (style data.pouliot) — icône + libellé sur une ligne */
  html.mp-is-pro { --t-rail-w: 216px; }
  html.mp-is-pro:not(.mp-no-tabbar) body { padding-bottom: 0; padding-left: var(--t-rail-w); }
  html.mp-is-pro:not(.mp-no-tabbar) .t-tabbar {
    top: 0; bottom: 0; left: 0; right: auto; width: var(--t-rail-w); flex-direction: column; justify-content: flex-start;
    padding: 20px 12px; border-top: none; border-right: 1px solid var(--border);
    background: var(--bg-card); backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  html.mp-is-pro .t-tabbar__inner { flex-direction: column; gap: 2px; max-width: none; }
  html.mp-is-pro .t-tabbar__inner::before {
    content: "Marc Pouliot · Pro"; display: block; padding: 4px 12px 18px; margin-bottom: 8px;
    font-size: 0.9375rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text-primary);
    border-bottom: 1px solid var(--border);
  }
  html.mp-is-pro .t-tab {
    flex: 0 0 auto; min-height: 42px; flex-direction: row; justify-content: flex-start; gap: 12px;
    padding: 0 12px; font-size: 0.9375rem; font-weight: 500; border-radius: 8px;
  }
  html.mp-is-pro .t-tab:not([aria-current="page"]):hover { background: rgba(0, 61, 165, 0.08); color: var(--text-primary); }
  html.mp-is-pro .t-tab__ico { font-size: 1.125rem; width: 20px; display: inline-flex; justify-content: center; }
  html.mp-is-pro .t-tab__ico svg { width: 20px; height: 20px; }

  /* Accueil */
  html.mp-is-pro .app-shell { max-width: 1240px; }
  html.mp-is-pro .t-home { padding: 28px 32px 40px; }
  html.mp-is-pro .t-search__input { height: 64px; font-size: 1.1875rem; }
  html.mp-is-pro .t-search__go { width: 64px; height: 64px; }
  html.mp-is-pro .t-home .t-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  html.mp-is-pro .t-home .t-tile { min-height: 112px; padding: 18px; }
  html.mp-is-pro .t-home .t-tile--wide { grid-column: span 2; }
  html.mp-is-pro .t-calcs { grid-template-columns: repeat(9, 1fr); }
  html.mp-is-pro .t-tile:hover, html.mp-is-pro .t-calc:hover, html.mp-is-pro .t-chip:hover,
  html.mp-is-pro .f-act:hover { border-color: var(--t-signal); }
  html.mp-is-pro .f-row:hover { background: color-mix(in srgb, var(--t-signal) 7%, transparent); }

  /* Fiches (adresse, propriété, courtier) : deux colonnes */
  html.mp-is-pro .f-page { max-width: 1240px; padding: 18px 32px 40px; }
  html.mp-is-pro .f-bar { max-width: 760px; }
  html.mp-is-pro .d-split { display: grid; grid-template-columns: minmax(340px, 420px) 1fr; gap: 24px; align-items: start; }
  html.mp-is-pro .d-left { position: sticky; top: 76px; }
  html.mp-is-pro .d-right > .f-sec { margin-bottom: 12px; }
  html.mp-is-pro .d-right .f-kv { grid-template-columns: repeat(3, 1fr); }
  html.mp-is-pro .d-left .f-actions, html.mp-is-pro .d-left .p-acts { grid-template-columns: repeat(3, 1fr) !important; }
  html.mp-is-pro .f-plate__num { font-size: 4.5rem; }

  /* Pages de recherche : résultats sur deux colonnes */
  html.mp-is-pro .calc-page:has([id$="Results"]) { max-width: 1240px; }
  html.mp-is-pro .calc-page:has([id$="Results"]) .calc-body { padding-left: 32px; padding-right: 32px; }
  html.mp-is-pro .calc-page:has([id$="Results"]) .pro-search-card { max-width: 820px; }
  html.mp-is-pro [id$="Results"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; align-items: start; }
  html.mp-is-pro [id$="Results"] > :not(.pro-result-card) { grid-column: 1 / -1; }
}
@media (min-width: 1500px) {
  html.mp-is-pro [id$="Results"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Bouton Suivre (étoile) */
[data-suivi-type].s-on { background: #F5B83D !important; border-color: #F5B83D !important; color: #0C1626 !important; }
.s-ico { font-size: 1.2rem; }


/* ═══════════════════════════════════════════════════════════════
   LANGAGE VISUEL data.pouliot.ca (SkyView / RE/MAX) — 29 oct. 2026
   Même jetons que data.pouliot.ca/assets/css/tokens.css : coins plus serrés, ombres fines,
   texte moins gras, icônes à trait fin (theme.js remplace les émojis), sombre = dégradé SkyView.
   ═══════════════════════════════════════════════════════════════ */
:root,
html[data-theme="light"] {
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --shadow-sm: 0 1px 2px rgba(0, 30, 92, 0.06), 0 0 0 1px rgba(0, 30, 92, 0.08);
  --shadow-card: 0 1px 2px rgba(0, 30, 92, 0.06), 0 0 0 1px rgba(0, 30, 92, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 30, 92, 0.10), 0 0 0 1px rgba(0, 30, 92, 0.08);
  --sv-primary-bg: #E8EEF8;
  --sv-ring: rgba(0, 61, 165, 0.18);
}
html[data-theme="dark"] {
  --primary: #2f6fe0;
  --primary-light: #4a86f0;
  --accent: #dc1c2e;
  --bg: #0e1115;
  --bg-surface: #0f1729;
  --bg-card: #121b31;
  --bg-card-hover: #18233d;
  --bg-elevated: #18233d;
  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.70);
  --text-light: rgba(255, 255, 255, 0.50);
  --border: rgba(255, 255, 255, 0.10);
  --border-light: rgba(255, 255, 255, 0.06);
  --pill-bg: rgba(255, 255, 255, 0.05);
  --pill-border: rgba(255, 255, 255, 0.10);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.10);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.10);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.20);
  --t-ink: #0e1115;
  --t-slate: #121b31;
  --t-line: rgba(255, 255, 255, 0.10);
  --t-signal: #2f6fe0;
  --sv-primary-bg: rgba(47, 111, 224, 0.18);
  --sv-ring: rgba(255, 255, 255, 0.25);
}
html[data-theme="dark"] body {
  background-color: #0e1115;
  background-image: radial-gradient(circle at 50% 140%, #0044FF 0%, #0F308A 40%, #000A33 100%);
  background-attachment: fixed;
}
html[data-theme="light"] { --t-signal: #003DA5; }

/* Icônes à trait fin (posées par theme.js à la place des émojis) */
.sv-ic { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; display: block; }

/* Barre du bas / rail du Mac */
.t-tabbar { background: color-mix(in srgb, var(--bg-surface) 92%, transparent); }
html[data-theme="dark"] .t-tabbar { background: rgba(0, 0, 0, 0.40); border-color: rgba(255, 255, 255, 0.10); }
.t-tab { font-weight: 500; border-radius: var(--radius-sm); }
.t-tab__ico .sv-ic { width: 22px; height: 22px; }
.t-tab[aria-current="page"] { color: var(--t-signal); background: var(--sv-primary-bg); font-weight: 600; }
html[data-theme="dark"] .t-tab[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.10); }

/* Accueil Pro */
.t-top__name { font-weight: 600; letter-spacing: -0.01em; }
.t-top__photo { border-width: 1px; border-color: var(--border); }
.t-iconbtn { border-radius: var(--radius-sm); background: var(--bg-card); box-shadow: var(--shadow-sm); border-color: transparent; }
.t-iconbtn .sv-ic { width: 18px; height: 18px; }
.t-search__label { font-weight: 500; }
.t-search__input { height: 52px; border-radius: var(--radius-md); border-width: 1px; font-weight: 500; font-size: 1rem; box-shadow: var(--shadow-sm); border-color: transparent; }
html[data-theme="dark"] .t-search__input { background: rgba(0, 0, 0, 0.25); border-color: rgba(255, 255, 255, 0.10); box-shadow: none; }
.t-search__input:focus { border-color: var(--t-signal); box-shadow: 0 0 0 3px var(--sv-ring); }
.t-search__go { width: 52px; height: 52px; border-radius: var(--radius-md); display: inline-flex; align-items: center; justify-content: center; }
.t-search__go[href="/ici.html"] { background: var(--bg-card) !important; color: var(--text) !important; box-shadow: var(--shadow-sm); }
html[data-theme="dark"] .t-search__go[href="/ici.html"] { border: 1px solid rgba(255, 255, 255, 0.10); }
.t-chip { font-weight: 500; box-shadow: var(--shadow-sm); border-color: transparent; }
html[data-theme="dark"] .t-chip { border-color: rgba(255, 255, 255, 0.10); box-shadow: none; }
.t-h2 { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-light); margin: 26px 2px 10px; }
.t-tile, .t-calc, .t-rate, .bdc-band {
  border-radius: var(--radius-lg); border-color: transparent; box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
html[data-theme="dark"] .t-tile, html[data-theme="dark"] .t-calc, html[data-theme="dark"] .t-rate { border-color: rgba(255, 255, 255, 0.10); }
@media (hover: hover) { .t-tile:hover, .t-calc:hover, .t-rate:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); } }
.t-tile { min-height: 92px; padding: 16px; }
.t-tile__ico { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--sv-primary-bg); color: var(--t-signal); display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
html[data-theme="dark"] .t-tile__ico { color: #8fb3ff; }
.t-tile__name { font-weight: 600; }
.t-tile--signal { background: var(--t-signal); }
.t-tile--signal .t-tile__ico { background: rgba(255, 255, 255, 0.16); color: #fff; }
.t-rate__val { font-weight: 700; letter-spacing: -0.02em; }
.t-calc { font-weight: 500; min-height: 76px; }
.t-calc span:first-child { color: var(--t-signal); }
html[data-theme="dark"] .t-calc span:first-child { color: #8fb3ff; }
.bdc-band__v { font-weight: 700; letter-spacing: -0.02em; }

/* Pages de recherche et fiches */
.f-bar .t-search__input { border-radius: var(--radius-md); }
.f-bar .t-search__go { border-radius: var(--radius-md); }
.f-row { border-radius: var(--radius-md); }
.f-skel { border-radius: var(--radius-lg); }
.f-msg { border-radius: var(--radius-lg); }
.taux-card { border-radius: var(--radius-lg); }
/* SkyView : le fond dégradé reste visible derrière la coquille de l'app */
html[data-theme="dark"] .app-shell { background: transparent; }
