/* ============================================
   dccn.fr — design sobre, pro, sans fantaisie
   Palette: off-white + gris neutre + bleu accent
   ============================================ */

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --border: #e7e7e5;
  --border-strong: #d4d4d2;
  --text: #0a0a0a;
  --text-muted: #6b6b6b;
  --text-subtle: #9a9a9a;
  --accent: #2563eb;
  --accent-soft: #eff5ff;
  --ok: #10b981;
  --warn: #f59e0b;
  --err: #ef4444;
  --checking: #c2c2c0;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   TOPBAR
   ============================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 250, 249, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--text);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.brand-name {
  font-size: 15px;
  color: var(--text);
}

.topbar-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 5px 0;
  transition: color 0.15s;
}

.topbar-link:hover {
  color: var(--accent);
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.hero {
  margin-bottom: 40px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-sub {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 15px;
  max-width: 620px;
}

/* ============================================
   SEARCH
   ============================================ */

.search-wrap {
  position: relative;
  max-width: 480px;
}

.search {
  width: 100%;
  padding: 11px 60px 11px 38px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239a9a9a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>")
    14px center / 14px no-repeat;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search::placeholder {
  color: var(--text-subtle);
}

.search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-hint {
  position: absolute;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11.5px;
  color: var(--text-subtle);
  pointer-events: none;
  display: none;
  background: var(--surface);
  padding: 2px 4px;
  border-radius: 4px;
}

.search-hint[data-active="true"] {
  display: block;
}

/* ============================================
   GROUP / SECTION
   ============================================ */

.group {
  margin-top: 36px;
}

.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.group-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-icon {
  width: 14px;
  height: 14px;
  color: var(--text-subtle);
  flex-shrink: 0;
}

.group-count {
  font-size: 12px;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}

.group[hidden] {
  display: none;
}

/* ============================================
   GRID + CARDS
   ============================================ */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.card {
  position: relative;
  display: block;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

a.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

a.card:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.card--static {
  cursor: default;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 7px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.card-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

a.card:hover .card-icon {
  color: var(--accent);
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.3;
}

.card-desc {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

.card-meta {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-subtle);
  padding: 3px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  letter-spacing: -0.01em;
}

.card[hidden] {
  display: none;
}

/* ============================================
   STATUS DOTS (placeholder — currently unused)
   ============================================ */

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--checking);
  flex-shrink: 0;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
  margin: 60px 0;
  text-align: center;
  color: var(--text-subtle);
  font-size: 14px;
}

.empty-state[hidden] {
  display: none;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
}

.footer p {
  margin: 0;
  color: var(--text-subtle);
  font-size: 12.5px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
  .topbar-inner {
    padding: 12px 16px;
  }
  .container {
    padding: 32px 16px 48px;
  }
  .hero h1 {
    font-size: 24px;
  }
  .hero-sub {
    font-size: 14px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .group {
    margin-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
