/* Site foyeo.ch : mêmes couleurs que l'app (backend/app/static/style.css). Aucun script. */
:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #eaeef3;
  --text: #1a1e24;
  --muted: #5f6773;
  --border: #dfe4eb;
  --track: #e4e9f0;
  --accent: #2654a0;
  --accent-ink: #ffffff;
  --accent-soft: #e2eaf7;
  --ok-bar: #3a6fc6;
  --warn-bar: #e2a33a;
  --over: #c13b2a;
  --over-bar: #d9503e;
  --orange: #f2994a;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 6px 20px rgb(0 0 0 / 0.06);
  --radius: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11141a;
    --surface: #1a1e26;
    --surface-2: #232833;
    --text: #e8ebf0;
    --muted: #9aa1ad;
    --border: #2a303b;
    --track: #2a2f39;
    --accent: #7fa7e6;
    --accent-ink: #0d1626;
    --accent-soft: #1d2a40;
    --ok-bar: #5b8fde;
    --warn-bar: #d99a35;
    --over: #f07c6a;
    --over-bar: #e0604d;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- en-tête */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
}

.brand img { width: 36px; height: 36px; border-radius: 9px; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.btn.small { padding: 8px 16px; font-size: 0.95rem; }

.btn.ghost {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent-soft);
}

/* ---------- accueil */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding-block: 40px 64px;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.12;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}

.hero .lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 28px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.note { color: var(--muted); font-size: 0.92rem; margin-top: 14px; }

.badge {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---------- l'écran du mois, dessiné en HTML */
.phone {
  justify-self: center;
  width: min(330px, 100%);
  padding: 14px;
  border-radius: 34px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.screen {
  border-radius: 24px;
  background: var(--bg);
  padding: 18px 14px;
}

.screen .month { font-weight: 700; font-size: 1.1rem; }

.screen .left {
  margin: 10px 0 14px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
}

.screen .left small { display: block; opacity: 0.85; font-size: 0.8rem; }
.screen .left strong { font-size: 1.6rem; }

.cat {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: var(--surface);
  font-size: 0.88rem;
}

.cat div { display: flex; justify-content: space-between; gap: 8px; }
.cat span { color: var(--muted); }
.cat .over { color: var(--over); font-weight: 600; }

.bar {
  height: 7px;
  margin-top: 7px;
  border-radius: 99px;
  background: var(--track);
  overflow: hidden;
}

.bar i { display: block; height: 100%; border-radius: 99px; background: var(--ok-bar); }
.bar i.warn { background: var(--warn-bar); }
.bar i.full { background: var(--over-bar); }
.w45 { width: 45%; }
.w63 { width: 63%; }
.w82 { width: 82%; }
.w100 { width: 100%; }

/* ---------- sections */
section { padding: 56px 0; }
section.alt { background: var(--surface); }

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.intro { color: var(--muted); max-width: 640px; margin: 0 0 32px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

section.alt .card { background: var(--bg); box-shadow: none; }

.card h3 { margin: 0 0 6px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); }

.icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.steps { counter-reset: step; }
.steps .card h3::before {
  counter-increment: step;
  content: counter(step) ". ";
  color: var(--accent);
}

.lock {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.lock ul { margin: 0; padding-left: 1.2em; }
.lock li { margin-bottom: 10px; }

.price {
  max-width: 560px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.price strong { font-size: 1.5rem; display: block; margin-bottom: 6px; }

details {
  padding: 16px 20px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--surface);
}

summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; color: var(--muted); }

/* ---------- pied de page */
footer {
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 0.92rem;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: inherit; }

/* ---------- pages de texte (confidentialité) */
.doc {
  max-width: 720px;
  padding-block: 24px 56px;
}

.doc h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.2; margin: 0 0 8px; }
.doc h2 { font-size: 1.3rem; margin: 36px 0 10px; }
.doc .updated { color: var(--muted); margin: 0 0 28px; }
.doc ol, .doc ul { padding-left: 1.3em; }
.doc li { margin-bottom: 8px; }
.doc table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc th { font-weight: 600; }

@media (max-width: 820px) {
  .hero, .lock { grid-template-columns: 1fr; gap: 36px; }
  .grid { grid-template-columns: 1fr; }
  .hero { padding-top: 16px; }
  section { padding: 44px 0; }
  .doc table { font-size: 0.9rem; }
}
