:root {
  --text: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --border: #e2e8f0;
  --surface: #ffffff;
  --bg: #fafbff;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --teal: #14b8a6;
  --green: #22c55e;
  --orange: #f59e0b;
  --red: #f43f5e;
  --shadow: 0 8px 30px rgba(51, 65, 85, 0.08);
  --shadow-sm: 0 2px 10px rgba(51, 65, 85, 0.06);
  --radius: 18px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  position: relative;
  overflow-x: hidden;
}

/* --- Décor de fond : vagues + pictos flottants --- */
.bg-wave {
  position: fixed; left: 0; right: 0; bottom: 0; height: 45vh; min-height: 260px;
  z-index: 0; pointer-events: none; opacity: 0.55;
}
.bg-wave svg { width: 100%; height: 100%; }
.deco { position: absolute; color: #94a3b8; opacity: 0.35; }
.deco svg { width: 26px; height: 26px; }
.deco-globe { top: 12%; left: 8%; }
.deco-search { top: 55%; left: 42%; }
.deco-star { top: 18%; right: 10%; }
.deco-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; opacity: 0.5; }
.deco-dot-1 { background: var(--purple); top: 30%; left: 6%; }
.deco-dot-2 { background: var(--blue); top: 40%; right: 15%; }

.page { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; padding: 24px 20px 60px; }

.hero { text-align: center; padding: 70px 0 30px; }
.hero-compact { padding: 26px 0 20px; }

.logo {
  font-size: 46px; font-weight: 800; letter-spacing: -0.5px; text-decoration: none; display: inline-block;
  margin-bottom: 34px;
  background: linear-gradient(90deg, var(--blue), var(--purple) 25%, var(--teal) 45%, var(--green) 58%, var(--orange) 75%, var(--red) 90%, var(--blue));
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: logo-shimmer 7s linear infinite;
}
.hero-compact .logo { font-size: 26px; margin-bottom: 20px; }
@keyframes logo-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .logo { animation: none; }
}

.search-box {
  display: flex; align-items: center; gap: 10px; max-width: 680px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 8px 8px 22px; box-shadow: var(--shadow);
}
.search-icon { color: var(--muted-2); display: flex; }
.search-icon svg, .search-submit svg { width: 20px; height: 20px; }
.search-box input[type="text"] {
  flex: 1; border: none; background: transparent; color: var(--text);
  font-size: 16px; padding: 10px 4px; outline: none;
}
.search-box input::placeholder { color: var(--muted-2); }
.search-divider { width: 1px; height: 24px; background: var(--border); }
.search-submit {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: white; flex-shrink: 0;
}
.search-submit:hover { filter: brightness(1.08); }

/* --- Filtres / pastilles catégories --- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; margin-top: 34px; }
.filter-pill {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none; color: var(--muted); font-size: 13px; width: 68px;
}
.filter-icon {
  width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #eef2ff; color: var(--blue); transition: transform .12s ease;
}
.filter-icon-all { background: #e0e7ff; color: #4f46e5; }
.filter-icon svg { width: 22px; height: 22px; }
.filter-pill:hover .filter-icon { transform: translateY(-2px); }
.filter-pill.active { color: var(--text); font-weight: 600; }
.filter-pill.active .filter-icon { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px currentColor; }

/* --- Résultats --- */
.results-count { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.results-list { display: flex; flex-direction: column; gap: 14px; }
.result {
  display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.result-icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.result-icon svg { width: 20px; height: 20px; }
.result-body { min-width: 0; }
.result-title { font-size: 17px; color: var(--text); text-decoration: none; font-weight: 700; }
.result-title:hover { color: var(--blue); }
.result-url { color: var(--teal); font-size: 12px; margin: 3px 0 6px; word-break: break-all; }
.result-excerpt { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.result-tags { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.result-tag {
  display: inline-block; font-size: 11px; color: var(--muted);
  background: #f1f5f9; border-radius: 999px; padding: 3px 12px;
}
.result-tag-ext { color: var(--purple); background: #f3f0ff; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 30px; }
.pagination a {
  color: var(--muted); text-decoration: none; padding: 7px 13px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); font-size: 14px;
}
.pagination a.active { color: white; border-color: var(--blue); background: var(--blue); }

.empty { color: var(--muted); text-align: center; padding: 50px 0; }

footer { text-align: center; margin-top: 70px; }
footer a { color: var(--muted-2); font-size: 12px; text-decoration: none; }
footer a:hover { color: var(--muted); text-decoration: underline; }
footer .sep { color: var(--border); margin: 0 6px; font-size: 12px; }

/* --- Pages légales --- */
.legal-page { max-width: 720px; padding-top: 50px; }
.legal-logo {
  display: inline-block; font-size: 22px; font-weight: 800; text-decoration: none; margin-bottom: 30px;
  background: linear-gradient(90deg, var(--blue), var(--purple) 40%, var(--teal) 70%, var(--orange));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.legal-page h1 { font-size: 28px; margin-bottom: 30px; }
.legal-page h2 { font-size: 17px; margin: 34px 0 10px; color: var(--text); }
.legal-page section:first-of-type h2 { margin-top: 0; }
.legal-page p, .legal-page li { color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.legal-page ul { padding-left: 20px; }
.legal-page a { color: var(--blue); }
.legal-page em { color: var(--muted-2); font-style: normal; }
.legal-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13.5px; }
.legal-table th, .legal-table td { text-align: left; padding: 10px 12px; border: 1px solid var(--border); }
.legal-table th { background: #f8fafc; color: var(--muted); font-weight: 600; }
.legal-table code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 12.5px; }
.legal-back { margin-top: 46px; font-size: 13px; color: var(--muted-2); text-align: center; }
.legal-back a { color: var(--muted); }

@media (max-width: 560px) {
  .logo { font-size: 34px; }
  .filters { gap: 16px; }
  .filter-pill { width: 58px; }
  .filter-icon { width: 48px; height: 48px; }
}

/* --- Bannière de consentement CNIL --- */
.cnil-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 720px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
}
.cnil-banner[hidden] { display: none; }
.cnil-text { flex: 1 1 320px; margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.cnil-text a { color: var(--blue); }
.cnil-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.cnil-btn {
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  border-radius: 999px; padding: 9px 18px; border: 1px solid transparent;
}
.cnil-btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.cnil-btn-ghost:hover { background: #f1f5f9; }
.cnil-btn-primary { background: linear-gradient(135deg, var(--blue), var(--purple)); color: #fff; }
.cnil-btn-primary:hover { opacity: 0.92; }

@media (max-width: 560px) {
  .cnil-banner { padding: 16px; }
  .cnil-actions { width: 100%; }
  .cnil-btn { flex: 1; }
}
