/* Patromnia — page provisoire. Reprend les jetons --p-* de l'application
   (app/static/patrimoine.css). Aucune police distante : la CSP du conteneur
   n'autorise que les feuilles de style locales. */
:root {
  color-scheme: dark;
  --bg-deepest: #050810;
  --bg-deep: #0a0e1a;
  --bg-surface: #111827;
  --bg-elevated: #1a2332;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #60a5fa;
  --border-subtle: rgba(59, 130, 246, 0.08);
  --border-default: rgba(59, 130, 246, 0.15);
  --blue: #3b82f6;
  --green: #10b981;
  --purple: #8b5cf6;
  --cyan: #06b6d4;
  --amber: #f59e0b;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg-deep); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(59, 130, 246, 0.07) 0%, transparent 45%),
    radial-gradient(ellipse at 90% 30%, rgba(6, 182, 212, 0.04) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(139, 92, 246, 0.04) 0%, transparent 50%),
    var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p { margin: 0; }

.page {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── En-tête ─────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.wordmark {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-default);
  border-radius: 9999px;
  background: rgba(17, 24, 39, 0.6);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-accent);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
  flex: none;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 5.5rem 0 5rem;
}

.eyebrow,
.section-label {
  color: var(--text-accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
}

h1 .accent { color: var(--text-secondary); }

.lead {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.75;
  max-width: 34rem;
  margin-bottom: 2rem;
}

.notice {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ── Aperçu (illustration) ───────────────────────────────── */
.preview { justify-self: end; width: 100%; max-width: 430px; }

.preview-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 40px rgba(59, 130, 246, 0.08);
}

.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.preview-title { font-size: 0.95rem; font-weight: 600; }

.preview-tag {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-accent);
  background: rgba(59, 130, 246, 0.1);
  border-radius: 9999px;
  padding: 0.2rem 0.6rem;
}

.kpi-label {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.masked { color: var(--text-muted); letter-spacing: 0.08em; }

.alloc {
  display: flex;
  gap: 3px;
  height: 10px;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.seg { display: block; height: 100%; }
.alloc .seg-comptes { flex: 18; }
.alloc .seg-placements { flex: 24; }
.alloc .seg-prevoyance { flex: 20; }
.alloc .seg-immobilier { flex: 32; }
.alloc .seg-biens { flex: 6; }

.seg-comptes { background: var(--blue); }
.seg-placements { background: var(--green); }
.seg-prevoyance { background: var(--purple); }
.seg-immobilier { background: var(--cyan); }
.seg-biens { background: var(--amber); }

.legend {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.legend li { display: inline-flex; align-items: center; gap: 0.4rem; }

.swatch { width: 8px; height: 8px; border-radius: 2px; }

.budget-row {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.1rem;
}

.budget-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.progress {
  height: 6px;
  border-radius: 9999px;
  background: var(--bg-elevated);
  overflow: hidden;
}

.progress-fill {
  display: block;
  width: 64%;
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--blue), #1d4ed8);
}

.preview-caption {
  margin-top: 0.8rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ── Sections ────────────────────────────────────────────── */
.features,
.principles {
  padding: 4.5rem 0;
  border-top: 1px solid var(--border-subtle);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
  max-width: 36rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.6rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature {
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--feature-color);
  opacity: 0.7;
}

.feature:hover {
  border-color: var(--border-default);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.feature-blue { --feature-color: var(--blue); }
.feature-green { --feature-color: var(--green); }
.feature-purple { --feature-color: var(--purple); }
.feature-cyan { --feature-color: var(--cyan); }
.feature-amber { --feature-color: var(--amber); }

.feature-label {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.feature p:last-child,
.principle p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
}

sup { font-size: 0.65em; line-height: 0; }

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.principle {
  padding-left: 1.1rem;
  border-left: 2px solid var(--border-default);
}

/* ── Conclusion ──────────────────────────────────────────── */
.closing {
  margin: 1rem 0 4.5rem;
  padding: 3rem 2rem;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-surface), rgba(17, 24, 39, 0.4));
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
}

.closing h2 { margin: 0 auto 0.75rem; }

.closing p {
  color: var(--text-secondary);
  max-width: 32rem;
  margin: 0 auto;
}

/* ── Pied de page ────────────────────────────────────────── */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ── Adaptatif ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 3rem; padding: 3.5rem 0 3.5rem; }
  .preview { justify-self: center; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .principle-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

@media (max-width: 580px) {
  .page { padding: 0 1.1rem; }
  .site-header { padding: 1.25rem 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .features, .principles { padding: 3.25rem 0; }
  .lead { font-size: 1rem; }
  .closing { padding: 2.25rem 1.25rem; }
  .site-footer { flex-direction: column; gap: 0.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .feature { transition: none; }
}
