/* =================================================================
   ImmoSentinel — thème public V2 pour les pages légales + aide.
   Pages autonomes (sans login, sans SPA) qui partagent l'identité
   visuelle de la landing : fond sombre, Geist, accent emeraude.
   ================================================================= */

:root {
  --leg-bg:        #0A0A0A;
  --leg-surface:   #121212;
  --leg-border:    rgba(255, 255, 255, 0.10);
  --leg-border-strong: rgba(255, 255, 255, 0.18);
  --leg-text:      #F5F5F5;
  --leg-muted:     #9A9A9A;
  --leg-dim:       #6A6A6A;
  --leg-accent:    #34D399;
  --leg-font:      'Geist', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --leg-mono:      'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--leg-bg);
  color: var(--leg-text);
  font-family: var(--leg-font);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ─── Barre du haut ─────────────────────────────────────────────── */
.legal-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--leg-border);
}
.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--leg-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
/* Logo officiel SENTINEL : boite a cadre fin + carre vert inset + battement.
   Reprend a l'identique .logo-mark (landing) / .nav__mark (app V2). */
.legal-brand__mark {
  width: 14px;
  height: 14px;
  border: 1px solid var(--leg-text);
  position: relative;
  flex-shrink: 0;
}
.legal-brand__mark::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--leg-accent);
  transform-origin: center;
  animation: legalMarkHeartbeat 1.6s ease-out infinite;
}
@keyframes legalMarkHeartbeat {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0   color-mix(in oklch, var(--leg-accent) 65%, transparent); }
  18%  { transform: scale(1.18); box-shadow: 0 0 0 4px color-mix(in oklch, var(--leg-accent) 25%, transparent); }
  30%  { transform: scale(.92);  box-shadow: 0 0 0 6px color-mix(in oklch, var(--leg-accent) 0%, transparent); }
  44%  { transform: scale(1.14); box-shadow: 0 0 0 3px color-mix(in oklch, var(--leg-accent) 22%, transparent); }
  58%  { transform: scale(1);    box-shadow: 0 0 0 0   color-mix(in oklch, var(--leg-accent) 0%, transparent); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0   color-mix(in oklch, var(--leg-accent) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .legal-brand__mark::after { animation: none !important; }
}
.legal-brand__sub {
  color: var(--leg-dim);
  font-family: var(--leg-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-left: 4px;
}
.legal-back {
  color: var(--leg-muted);
  text-decoration: none;
  font-family: var(--leg-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 160ms ease;
}
.legal-back:hover { color: var(--leg-text); }

/* ─── Contenu ───────────────────────────────────────────────────── */
.legal-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.legal-eyebrow {
  font-family: var(--leg-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--leg-accent);
  margin-bottom: 14px;
}
.legal-wrap h1 {
  font-weight: 200;
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 10px;
}
.legal-date {
  font-family: var(--leg-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--leg-dim);
  margin: 0 0 40px;
}

.legal-doc { font-size: 15px; color: #DEDEDE; }
.legal-doc h2 {
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--leg-text);
  margin: 38px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--leg-border);
}
.legal-doc h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.legal-doc h3 {
  font-weight: 500;
  font-size: 14px;
  color: var(--leg-text);
  margin: 24px 0 8px;
}
.legal-doc p { margin: 0 0 14px; }
.legal-doc ul, .legal-doc ol { margin: 0 0 14px; padding-left: 22px; }
.legal-doc li { margin-bottom: 7px; }
.legal-doc strong { color: var(--leg-text); font-weight: 500; }
.legal-doc a {
  color: var(--leg-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(52, 211, 153, 0.35);
  transition: border-color 160ms ease;
}
.legal-doc a:hover { border-bottom-color: var(--leg-accent); }
.legal-doc .muted { color: var(--leg-muted); }

/* Carte "callout" optionnelle (ex: bloc contact, FAQ) */
.legal-card {
  background: var(--leg-surface);
  border: 1px solid var(--leg-border);
  border-radius: 4px;
  padding: 20px 22px;
  margin: 0 0 16px;
}
.legal-card h3 { margin-top: 0; }
.legal-card p:last-child { margin-bottom: 0; }

/* ─── FAQ (page Aide) : accordeon natif <details> ──────────────── */
.legal-faq { display: grid; gap: 10px; margin-top: 8px; }
.legal-faq details {
  background: var(--leg-surface);
  border: 1px solid var(--leg-border);
  border-radius: 4px;
  overflow: hidden;
}
.legal-faq details[open] { border-color: var(--leg-border-strong); }
.legal-faq summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-size: 14px;
  color: var(--leg-text);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 160ms ease;
}
.legal-faq summary::-webkit-details-marker { display: none; }
.legal-faq summary::after {
  content: '+';
  margin-left: auto;
  color: var(--leg-dim);
  font-size: 18px;
  font-weight: 300;
  transition: transform 200ms ease, color 160ms ease;
}
.legal-faq details[open] summary::after { transform: rotate(45deg); color: var(--leg-accent); }
.legal-faq summary:hover { color: var(--leg-accent); }
.legal-faq summary strong { font-weight: 500; }
.legal-faq__body {
  padding: 0 18px 18px;
  font-size: 14px;
  color: #CFCFCF;
  border-top: 1px solid var(--leg-border);
  padding-top: 14px;
}
.legal-faq__body p { margin: 0 0 12px; }
.legal-faq__body ul, .legal-faq__body ol { margin: 0 0 12px; padding-left: 20px; }
.legal-faq__body li { margin-bottom: 6px; }
.legal-faq__body a {
  color: var(--leg-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(52, 211, 153, 0.35);
}
.legal-faq__body code, .legal-faq__body kbd {
  font-family: var(--leg-mono);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--leg-border);
  border-radius: 3px;
  padding: 1px 5px;
}

/* ─── Pied de page ──────────────────────────────────────────────── */
.legal-foot {
  border-top: 1px solid var(--leg-border);
  padding: 28px 24px;
  text-align: center;
}
.legal-foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: center;
  font-family: var(--leg-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.legal-foot__links a {
  color: var(--leg-muted);
  text-decoration: none;
  transition: color 160ms ease;
}
.legal-foot__links a:hover { color: var(--leg-text); }
.legal-foot__links span { color: var(--leg-dim); }
.legal-foot__copy {
  margin-top: 14px;
  font-size: 11px;
  color: var(--leg-dim);
}
