/* Pour la vie — design system MVP.
   Direction : flat, épuré, premium discret, catholique contemporain.
   Ivoire, encre, bleu marial profond, or discret, sobriété. */

:root {
  --background: #FFFDF7;
  --foreground: #171717;
  --muted: #F3EFE7;
  --muted-foreground: #6F6A60;
  --primary: #1E3A5F;
  --primary-foreground: #FFFFFF;
  --secondary: #EFE8D8;
  --secondary-foreground: #1E1E1E;
  --accent: #B89B4D;
  --accent-foreground: #171717;
  --success: #466B4F;
  --danger: #A64037;
  --border: #E4DCCB;
  --card: #FFFFFF;
  --card-foreground: #171717;
  --radius: 18px;
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-brand: 'Cormorant Garamond', Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 1.9rem; font-weight: 700; }
h2 { font-size: 1.45rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--primary); }
.muted { color: var(--muted-foreground); font-size: .95rem; }
.center-text { text-align: center; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-narrow { max-width: 460px; }

/* ---- Header ---- */

.site-header {
  background: var(--background);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}
.brand-logo { display: block; height: 30px; width: auto; }
.brand-name {
  font-family: var(--font-brand);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: .01em;
}
.header-nav { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* ---- Boutons ---- */

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: calc(var(--radius) - 6px);
  border: 1px solid transparent;
  font-family: var(--font-ui);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: #16304F; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--primary-foreground); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--muted); }
.btn-lg { padding: 13px 26px; font-size: 1.02rem; }
.btn-block { display: block; width: 100%; }

/* ---- Hero ---- */

.hero {
  padding: 64px 0 56px;
  text-align: center;
  background:
    radial-gradient(1200px 500px at 50% -200px, var(--secondary), transparent),
    var(--background);
}
.hero-kicker {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.1rem);
  max-width: 720px;
  margin: 0 auto .5em;
}
.hero h1 em {
  font-family: var(--font-brand);
  font-style: italic;
  color: var(--primary);
}
.hero-sub {
  font-size: 1.12rem;
  color: var(--muted-foreground);
  max-width: 560px;
  margin: 0 auto 28px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.hero-actions.center { margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: .9rem; color: var(--muted-foreground); }

/* ---- Sections ---- */

.section { padding: 52px 0; }
.section-alt { background: var(--muted); }
.section h2 { text-align: center; margin-bottom: 30px; }

.cards-3, .cards-2 { display: grid; gap: 16px; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: 720px; margin: 0 auto; }

.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { color: var(--primary); }
.card p:last-child { margin-bottom: 0; }

.price-card { text-align: center; }
.price {
  font-family: var(--font-brand);
  font-size: 2.4rem;
  color: var(--primary);
  margin: 0 0 .3em;
}

.steps {
  max-width: 640px;
  margin: 0 auto;
  padding-left: 1.4em;
  display: grid;
  gap: 14px;
}
.steps li::marker { color: var(--accent); font-weight: 700; }

.checklist {
  list-style: none;
  padding: 0;
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}
.checklist li {
  padding: 14px 18px 14px 44px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 6px);
  position: relative;
}
.checklist li::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 6px;
  height: 12px;
  border-right: 2px solid var(--success);
  border-bottom: 2px solid var(--success);
}

/* ---- Formulaires / auth ---- */

.auth-section { padding: 48px 0 64px; }
.auth-card { padding: 30px 26px; }
.auth-intro { color: var(--muted-foreground); }
.auth-alt { margin-top: 18px; font-size: .95rem; text-align: center; }

.form { display: grid; gap: 16px; margin-top: 8px; }
.form label { font-weight: 600; font-size: .92rem; display: block; }
.form input[type="email"],
.form input[type="password"],
.form input[type="text"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 400;
  color: var(--foreground);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 8px);
}
.form input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}
.form .checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .9rem; }
.form .checkbox input { margin-top: 3px; }

.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.form-errors {
  background: #FBEDEB;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: calc(var(--radius) - 8px);
  padding: 12px 16px;
  font-size: .92rem;
}
.form-errors ul { margin: 0; padding-left: 1.2em; }

/* ---- Flashes ---- */

.flash {
  max-width: 1080px;
  margin: 16px auto 0;
  padding: 12px 18px;
  border-radius: calc(var(--radius) - 8px);
  font-size: .95rem;
}
.flash-success { background: #EBF2EC; border: 1px solid var(--success); color: var(--success); }
.flash-error   { background: #FBEDEB; border: 1px solid var(--danger); color: var(--danger); }
.flash-info    { background: var(--secondary); border: 1px solid var(--border); color: var(--secondary-foreground); }

/* ---- Metrics admin ---- */

.metric-card { text-align: center; }
.metric-value {
  font-family: var(--font-brand);
  font-size: 2.6rem;
  color: var(--primary);
  margin: 0;
}
.metric-label { color: var(--muted-foreground); font-size: .9rem; margin: 0; }

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  background: var(--muted);
}
.footer-brand {
  font-family: var(--font-brand);
  font-size: 1.3rem;
  color: var(--primary);
  margin: 0 0 4px;
}
.footer-tagline { color: var(--muted-foreground); font-size: .9rem; margin: 0 0 10px; }
.footer-links { font-size: .88rem; margin: 0; }
.footer-links a { color: var(--muted-foreground); }

/* ---- Mobile ---- */

@media (max-width: 560px) {
  .hero { padding: 44px 0 40px; }
  .section { padding: 40px 0; }
  .header-inner { gap: 8px; }
  .brand-logo { height: 26px; }
  .brand-name { font-size: 1.25rem; }
  .header-nav { gap: 6px; }
  .header-nav .btn { padding: 8px 12px; font-size: .85rem; }
  /* Sur la landing (visiteur), on masque "Se connecter" pour garder une seule ligne */
  .page-landing .header-nav .btn-ghost { display: none; }
}
