:root {
  --bg: #0f172a;
  --fg: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at top, #1e293b, var(--bg));
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: 0 16px;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  margin: 0;
  line-height: 1.1;
}

.lead {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 32rem;
  margin: 1.25rem 0 0;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1.5rem 0;
}

/* --- Recherche --- */
.topbar {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  right: 16px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.search-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(248, 250, 252, 0.2);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.6);
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.search-toggle:hover,
.search-toggle[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
}

.search-panel {
  width: min(22rem, calc(100vw - 32px));
  background: #1e293b;
  border: 1px solid rgba(248, 250, 252, 0.15);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.search-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(248, 250, 252, 0.2);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-results {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 60vh;
  overflow-y: auto;
}

.search-results li { margin-top: 6px; }

.search-results a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
}

.search-results a:hover,
.search-results a:focus { background: rgba(56, 189, 248, 0.12); outline: none; }

.search-results .r-title { display: block; font-weight: 600; }
.search-results .r-snippet { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.search-results mark { background: rgba(56, 189, 248, 0.35); color: inherit; border-radius: 2px; }
.search-results .r-empty { padding: 8px 10px; color: var(--muted); font-size: 0.9rem; }

h1 {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
