/* Aurora — tokens taken from the app's "Horizon solaire" dark theme (src/theme.ts). */
:root {
  --bg: #101026;
  --surface: rgba(75, 51, 78, 0.76);
  --surface-solid: #30253d;
  --nav: rgba(60, 43, 66, 0.96);
  --ink: #fff8ed;
  --muted: #d3c7d8;
  --accent: #ff9161;
  --sun: #ffe6a3;
  --on-accent: #171329;
  --green: #79dbad;
  --red: #ff9b9b;
  --line: rgba(123, 101, 126, 0.68);
  --radius-card: 28px;
  --radius-control: 18px;
  --max: 720px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Sky gradient + sun halo, like the app's horizon background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 72% 30%, rgba(255, 245, 184, 0.35), rgba(255, 177, 110, 0.18) 18%, transparent 42%),
    linear-gradient(180deg, #15215c 0%, #554778 38%, #a8687a 52%, #24213c 70%, #101026 100%);
}

a { color: inherit; }

/* Mountains */
.horizon {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46vh;
  z-index: -1;
  pointer-events: none;
}
.horizon svg { width: 100%; height: 100%; display: block; }

/* Header */
.site-header {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
}

/* App icon: the source image has padding around the tile, so we crop it */
.app-icon {
  display: inline-block;
  overflow: hidden;
  border-radius: 23%;
  flex: none;
  box-shadow: 0 18px 48px rgba(5, 5, 9, 0.45);
}
.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.74);
  display: block;
}
.app-icon--sm { width: 40px; height: 40px; }
.app-icon--lg { width: 132px; height: 132px; }

main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* Typography */
.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  margin: 0;
  font-size: clamp(40px, 8vw, 64px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.035em;
}
h1 .highlight { color: var(--sun); }
h2 {
  margin: 36px 0 10px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
p { margin: 0 0 14px; }
.lead {
  margin-top: 16px;
  font-size: 18px;
  color: var(--muted);
}
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Home hero */
.hero {
  min-height: calc(100vh - 220px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}
.hero .app-icon { margin-bottom: 20px; }
.hero h1 { font-size: clamp(48px, 11vw, 80px); }
.hero .lead { max-width: 560px; font-size: clamp(20px, 3.4vw, 26px); line-height: 1.35; color: var(--ink); opacity: 0.9; }
.hero .placeholder {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 4px 12px;
}

/* Buttons — same shape as the app's Button (56px, radius 18) */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 14px 24px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { opacity: 0.75; transform: none; }
.button:disabled { opacity: 0.5; cursor: progress; transform: none; }
.button:focus-visible,
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
.site-footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.button svg { width: 22px; height: 22px; flex: none; }
.button .label { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.button .label small { font-size: 11px; font-weight: 500; opacity: 0.7; }
.hero .button { margin-top: 28px; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.page-head { text-align: center; margin-bottom: 32px; }
.page-head .lead { max-width: 520px; margin-left: auto; margin-right: auto; }

/* Form */
.form { display: grid; gap: 18px; }
.form-row { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: rgba(16, 16, 38, 0.55);
  color: var(--ink);
  font: inherit;
}
.field textarea { min-height: 150px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23D3C7D8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; padding-right: 44px; }
.field select option { background: var(--surface-solid); }
.field ::placeholder { color: rgba(211, 199, 216, 0.6); }
.form .button { width: 100%; }
.form-status { margin: 0; font-size: 14px; text-align: center; }
.form-status.ok { color: var(--green); }
.form-status.error { color: var(--red); }

/* Legal pages */
.legal .card { padding: 32px 28px; }
.legal h2:first-of-type { margin-top: 0; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 20px; margin: 0 0 14px; }
.legal h3 { margin: 22px 0 8px; font-size: 16px; font-weight: 600; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal a { color: var(--accent); }
.placeholder-inline {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 145, 97, 0.18);
  color: var(--accent);
  font-size: 0.92em;
  white-space: nowrap;
}
.note {
  margin: 0 0 14px;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  background: rgba(116, 68, 74, 0.55);
}
.note p:last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 14px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legal th, .legal td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal th { color: var(--ink); font-weight: 600; }
.legal td { color: var(--muted); }
.todo {
  display: block;
  padding: 12px 16px;
  margin: 0 0 14px;
  border-radius: 14px;
  background: rgba(116, 68, 74, 0.8);
  color: var(--ink);
  font-size: 14px;
}

.back-link {
  display: inline-block;
  margin-top: 28px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
.back-link:hover { color: var(--ink); }

/* Footer */
.site-footer {
  padding: 24px 16px 32px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin-bottom: 12px;
}
.site-footer nav a {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.85;
}
.site-footer nav a:hover,
.site-footer nav a[aria-current='page'] { opacity: 1; color: var(--accent); }
.site-footer p { margin: 0; font-size: 12px; }

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .card { padding: 24px 18px; }
  .legal .card { padding: 24px 18px; }
  .app-icon--lg { width: 112px; height: 112px; }
}

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