:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --border: #e5e7eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 28%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.container {
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
}

.subtitle {
  margin: 0 auto;
  max-width: 640px;
  color: var(--muted);
  line-height: 1.6;
}

.search-card,
.results {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.search-card {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.search-card label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
}

input[type="search"] {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="search"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

button {
  border: 0;
  border-radius: 12px;
  padding: 0 1.25rem;
  background: var(--primary);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.hint {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.hint.error {
  color: #dc2626;
}

.results {
  padding: 1.5rem;
}

.results h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.9rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

tbody tr:hover {
  background: rgba(37, 99, 235, 0.04);
}

code {
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.95rem;
}

.badge-liste {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-principale {
  background: #dcfce7;
  color: #15803d;
}

.badge-attente {
  background: #fef3c7;
  color: #b45309;
}

.badge-inconnu {
  background: #f1f5f9;
  color: var(--muted);
}

.ville {
  text-transform: capitalize;
  color: var(--muted);
}

.empty {
  margin: 0;
  color: var(--muted);
}

.hidden {
  display: none;
}

@media (max-width: 640px) {
  .search-row {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
    padding: 0.95rem 1rem;
  }
}
