: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: 60px 0 34px; }
.hero-compact { padding: 22px 0 20px; }

.brand { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; margin-bottom: 30px; }
.brand-icon-wrap { position: relative; display: inline-block; }
.brand-icon-wrap::before {
  content: ""; position: absolute; inset: 12%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(59,130,246,.4), rgba(139,92,246,.2) 55%, transparent 75%);
  filter: blur(16px);
  animation: logo-glow 2.8s ease-in-out infinite;
}
.brand-icon {
  width: 150px; height: auto; display: block; margin-bottom: 6px;
  filter: drop-shadow(0 16px 26px rgba(37, 99, 235, 0.28));
  animation: logo-float 2.8s ease-in-out infinite;
  transform-origin: 50% 85%;
}
@keyframes logo-float {
  0%   { transform: translateY(0)    rotate(0deg)  scale(1); }
  25%  { transform: translateY(-16px) rotate(-6deg) scale(1.04); }
  50%  { transform: translateY(-2px)  rotate(4deg)  scale(1); }
  75%  { transform: translateY(-18px) rotate(-4deg) scale(1.04); }
  100% { transform: translateY(0)    rotate(0deg)  scale(1); }
}
@keyframes logo-glow {
  0%, 100% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
}
.brand-compact { flex-direction: row; align-items: center; gap: 10px; margin-bottom: 20px; }
.brand-compact .brand-icon { width: 34px; margin-bottom: 0; animation-duration: 3.4s; }
.brand-compact .brand-icon-wrap::before { inset: 8%; filter: blur(8px); }

.logo-heading { margin: 0; display: inline-block; }
.logo {
  font-size: 44px; font-weight: 800; letter-spacing: -0.5px; text-decoration: none; display: inline-block;
  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: 24px; }
.tagline {
  margin: 10px 0 0; font-size: 12.5px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--muted);
}
.tagline .dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin: 0 7px 0 3px; vertical-align: middle; }
.dot-blue { background: var(--blue); }
.dot-pink { background: var(--red); }
.dot-orange { background: var(--orange); }

@keyframes logo-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .logo, .brand-icon, .brand-icon-wrap::before { 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 --- */
.breadcrumb { font-size: 13px; color: var(--muted-2); margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumb a { color: var(--muted-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); text-decoration: underline; }
.breadcrumb-sep { color: var(--border); }
.page-title { font-size: 22px; margin: 0 0 4px; color: var(--text); }
.results-count { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.results-list { display: flex; flex-direction: column; gap: 14px; }
.result {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow-sm);
}
.result-head { display: flex; align-items: center; gap: 10px; }
.result-favicon {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 1px var(--border); object-fit: contain;
}
.result-head-text { min-width: 0; line-height: 1.3; }
.result-site { font-size: 13px; font-weight: 600; color: var(--text); }
.result-url { color: var(--muted-2); font-size: 12px; word-break: break-all; }
.result-title { font-size: 18px; color: var(--blue); text-decoration: none; font-weight: 600; }
.result-title:hover { text-decoration: underline; }
.result-excerpt { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.result-excerpt strong { color: var(--text); font-weight: 700; }

.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); }

.scroll-sentinel { height: 1px; margin: 0; }
.scroll-loading { text-align: center; color: var(--muted-2); font-size: 13px; margin: 18px 0 0; }

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

footer {
  position: fixed; right: 18px; bottom: 10px; z-index: 2;
  text-align: right; margin: 0;
}
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; }
  .brand-icon { width: 100px; }
  .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; }
}
