/* ImmoPilot · Identité commune aux deux espaces */
:root {
  --ip-display: "Manrope", "DM Sans", system-ui, sans-serif;
  --ip-text: "DM Sans", system-ui, sans-serif;
  --ip-ink: #17303a;
  --ip-muted: #50666d;
  --ip-green: #146d61;
  --ip-navy: #182f45;
  --ip-blue: #315f95;
  --ip-mint: #a1d9c5;
  --ip-surface: #fff;
  --ip-radius: 18px;
  --ip-control: 10px;
  --ip-shadow: 0 12px 32px #17303a0b;
}
body.portal {
  --ink: var(--ip-ink);
  --muted: var(--ip-muted);
  --paper: #f5f8f6;
  --line: #dbe6e1;
  --accent: var(--ip-green);
  --soft: #e8f3ee;
  --serif: var(--ip-display); /* Legacy component token */
  font: 15px/1.55 var(--ip-text);
}
body.portal.agent {
  --ink: var(--ip-navy);
  --muted: #526578;
  --paper: #f4f7fb;
  --line: #dbe4ef;
  --accent: var(--ip-blue);
  --soft: #e9f0fa;
}
.portal h1, .portal h2, .portal h3 {
  font-family: var(--ip-display);
  font-weight: 800;
}
.portal h1 { letter-spacing: -.05em; line-height: 1.08; }
.portal h2 { letter-spacing: -.035em; line-height: 1.22; }
.portal .eyebrow { font-size: 11px; letter-spacing: .11em; font-weight: 800; }
.portal .brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: var(--ink);
  flex-wrap: wrap;
  font-family: var(--ip-display);
}
.portal .brand::before {
  content: "";
  flex: 0 0 32px;
  height: 32px;
  background: url("icon.svg") center / contain no-repeat;
  margin-right: 10px;
}
.portal .brand b { color: var(--accent); }
.portal .portal-header {
  padding-block: 14px;
  min-height: 66px;
}
.portal-header nav a {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  padding-block: 8px;
}
.portal a:focus-visible, .portal button:focus-visible, .portal input:focus-visible,
.portal select:focus-visible, .portal textarea:focus-visible, .portal summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.portal .btn {
  border-radius: var(--ip-control);
  font: 700 13px/1.35 var(--ip-text);
  min-height: 44px;
  text-align: center;
}
.portal .btn:not(:disabled):hover { border-color: var(--accent); background: var(--soft); }
.portal .btn.primary:not(:disabled):hover { background: var(--ink); border-color: var(--ink); }
.portal .btn.small { font-size: 12px; }
.portal .panel, .portal .agent-stat, .portal .personal-property {
  border-radius: var(--ip-radius);
  box-shadow: var(--ip-shadow);
}
.portal input, .portal select, .portal textarea { border-radius: var(--ip-control); }
.portal .pill { border-radius: 999px; }
.portal .gateway { padding-top: clamp(24px, 3vw, 38px); }
.gateway-intro {
  max-width: none;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
  background: linear-gradient(115deg, #102b36, #125448);
  border-radius: 24px;
  margin-bottom: 24px;
}
.gateway-intro::after {
  position: absolute;
  content: "";
  z-index: -1;
  width: min(40vw, 390px);
  aspect-ratio: 1;
  right: -7%;
  top: -52%;
  border-radius: 50%;
  border: 1px solid #a1d9c54d;
  box-shadow: 0 0 0 30px #a1d9c51a, 0 0 0 65px #a1d9c515, 0 0 0 100px #a1d9c50d;
}
.gateway-intro h1 { color: white; font-size: clamp(33px, 5.3vw, 66px); margin-bottom: 14px; }
.gateway-intro .eyebrow { color: var(--ip-mint); }
.portal .gateway-intro p { color: #dcefe9; margin-bottom: 0; }
.portal-choice .choice {
  --choice-art: #e4f2eb;
  --choice-stroke: #a3c8b8;
  border-radius: var(--ip-radius);
  box-shadow: var(--ip-shadow);
}
.portal-choice .choice-agent {
  --accent: var(--ip-blue);
  --ink: var(--ip-navy);
  --muted: #526578;
  --choice-art: #e8eff9;
  --choice-stroke: #a6bad2;
}
.portal-choice .choice-art {
  height: 96px;
  background-color: var(--choice-art);
  background-image: radial-gradient(var(--choice-stroke) 1px, transparent 1px);
  background-size: 14px 14px;
  border-bottom: 1px solid var(--line);
}
.choice-art .building, .choice-art .sketch-sheet { border-color: var(--choice-stroke); }
.choice-art .building { border-radius: 8px 8px 0 0; }
.choice-art .building::before { background: repeating-linear-gradient(to right, var(--choice-stroke) 0 9px, transparent 9px 21px); }
.choice-art .sketch-sheet { border-radius: 8px; transform: rotate(-6deg); }
.choice-art .sketch-lines i { background: #688fb9; border-radius: 3px 3px 0 0; }
.portal-choice .choice-body { display: flex; flex: 1; flex-direction: column; padding: clamp(20px, 3vw, 32px); }
.portal-choice .choice h2 { font-size: clamp(23px, 3vw, 33px); margin: 0 0 9px; }
.portal-choice .choice .eyebrow { margin-bottom: 8px; }
.portal-choice .choice ul { margin-block: 10px 19px; }
.portal-choice .choice li { font-size: 13px; }
.portal-choice .choice li::before {
  content: "";
  flex: 0 0 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 7px;
  background: var(--accent);
}
.portal-choice .choice .btn { align-self: flex-start; margin-top: auto; }
.portal .personal-welcome h1 { font-size: clamp(34px, 4vw, 53px); }
.portal .next-action {
  background: linear-gradient(115deg, #102b36, #125448);
  border: 0;
  border-radius: var(--ip-radius);
  padding: clamp(20px, 3vw, 32px);
  color: white;
}
.portal .next-action .eyebrow { color: var(--ip-mint); }
.portal .next-action p { color: #dcefe9; font-size: 14px; }
.portal .next-action .btn.primary { color: #103f38; background: #c5ebdc; border-color: #c5ebdc; }
.portal .next-action .btn.primary:hover { background: #e7f8f0; border-color: #e7f8f0; }
.portal .next-action .btn:focus-visible { outline-color: var(--ip-mint); }
.portal .personal-search { border-radius: var(--ip-radius); box-shadow: var(--ip-shadow); }
.portal .personal-search label, .portal .personal-tabs a { font-size: 13px; }
.portal .personal-property-price, .portal .agent-stat strong, .portal .results-card strong {
  font-family: var(--ip-display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.agent .agent-sidebar { background: var(--ip-navy); }
.agent .agent-sidebar .brand { color: white; }
.agent .agent-sidebar .brand b { color: var(--ip-mint); }
.agent-sidebar nav button { min-height: 44px; border-radius: var(--ip-control); }
.agent-sidebar nav button:hover, .agent-sidebar nav button.active { background: #314c68; color: white; }
.agent-sidebar nav button.active { box-shadow: inset 3px 0 0 var(--ip-mint); }
.agent .agent-sidebar :focus-visible { outline-color: var(--ip-mint); }
.agent .agent-topbar { background: white; border-bottom: 1px solid var(--line); }
.agent .agent-intro h1 { font-size: clamp(32px, 4vw, 52px); }
.agent .agent-stat { border-top: 3px solid #a6bad2; }
.agent .form-section, .agent .results-card { border-radius: var(--ip-radius); }

@media (max-width: 700px) {
  .portal .portal-header { gap: 10px; padding-inline: 16px; }
  .portal .portal-header nav { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
  .portal-header nav a { font-size: 12px; }
  .portal .brand { font-size: 20px; }
  .portal .brand::before { flex-basis: 26px; height: 26px; margin-right: 7px; }
  .portal .gateway { padding-inline: 16px; }
  .portal-choice .choice .btn { align-self: stretch; }
  .portal .personal-tabs { flex-wrap: wrap; column-gap: 15px; row-gap: 0; }
  .portal .personal-search > label { min-width: 0; }
  .portal .personal-search input { width: 100%; }
  .agent .agent-sidebar nav button { font-size: 11px; line-height: 1.25; }
}
@media (max-width: 380px) {
  .portal .personal-search { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .portal .panel { box-shadow: none; }
}

.agent .agent-topbar { flex-wrap: wrap; gap: 8px 12px; }
.agent .agent-topbar a { font-weight: 700; color: var(--accent); }
