@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/manrope-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("fonts/sora-variable.woff2") format("woff2");
}

:root {
  --purple: #8b5cf6;
  --pink: #ec4899;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --amber: #fbbf24;
  --text: #1e1b3a;
  --muted: #6b6690;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.8);
  --shadow-glow: 0 0 0 1px rgba(255, 255, 255, 0.4) inset, 0 30px 60px -20px rgba(99, 60, 200, 0.45);
  --radius-xl: 32px;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #fdf4ff 0%, #eef2ff 45%, #ecfeff 100%);
  overflow-x: hidden;
  position: relative;
}

/* ---------- Floating gradient blobs (mandatory AI-slop ingredient) ---------- */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}
.blob-a {
  width: 480px;
  height: 480px;
  top: -160px;
  left: -140px;
  background: radial-gradient(circle at 30% 30%, var(--purple), transparent 70%);
  animation: float-a 14s ease-in-out infinite;
}
.blob-b {
  width: 420px;
  height: 420px;
  bottom: -160px;
  right: -120px;
  background: radial-gradient(circle at 60% 60%, var(--pink), transparent 70%);
  animation: float-b 18s ease-in-out infinite;
}
.blob-c {
  width: 360px;
  height: 360px;
  top: 40%;
  right: 10%;
  background: radial-gradient(circle at 50% 50%, var(--cyan), transparent 70%);
  animation: float-c 20s ease-in-out infinite;
  opacity: 0.35;
}

@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -30px) scale(1.15); }
}
@keyframes float-c {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 50px) scale(0.9); }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */
.page {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 56px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 22px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(236, 72, 153, 0.14));
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #6d28d9;
  backdrop-filter: blur(6px);
}

.badge-live {
  background: rgba(34, 211, 153, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #047857;
}

.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulse-dot 1.6s ease-out infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  margin: 0 0 10px;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(2.6rem, 9vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(90deg, var(--purple), var(--pink) 45%, var(--blue) 90%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

.hero-sub {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  max-width: 420px;
}
.hero-sub em {
  font-style: normal;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Glass card ---------- */
.card {
  position: relative;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 44px 32px 30px;
  box-shadow: var(--shadow-glow);
  overflow: hidden;
  transition: background 0.6s ease, box-shadow 0.6s ease, transform 0.3s ease;
}

.card-shine {
  position: absolute;
  inset: -2px;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.5) 50%, transparent 70%);
  background-size: 250% 250%;
  animation: shine 5s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: overlay;
}

@keyframes shine {
  0% { background-position: 200% 0; }
  100% { background-position: -50% 0; }
}

.eyebrow {
  position: relative;
  margin: 0 0 14px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.verdict {
  position: relative;
  margin: 0;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(2rem, 8vw, 2.6rem);
  line-height: 1.15;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 2.4em;
  text-shadow: 0 2px 24px rgba(139, 92, 246, 0.25);
}

.subtext {
  position: relative;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
}

.details {
  position: relative;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 16px 18px;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
}

.detail-label {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  background: #e2e8f0;
  color: #334155;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.pill[data-color="vert"]    { background: linear-gradient(135deg, #bbf7d0, #dcfce7); color: #15803d; }
.pill[data-color="jaune"]   { background: linear-gradient(135deg, #fef08a, #fef9c3); color: #a16207; }
.pill[data-color="orange"]  { background: linear-gradient(135deg, #fed7aa, #ffedd5); color: #c2410c; }
.pill[data-color="rouge"]   { background: linear-gradient(135deg, #fecaca, #fee2e2); color: #b91c1c; }
.pill[data-color="inconnu"] { background: #e2e8f0; color: #475569; }

.refresh-btn {
  position: relative;
  margin-top: 26px;
  border: none;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  font-weight: 800;
  font-size: 14.5px;
  padding: 13px 26px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px -8px rgba(139, 92, 246, 0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.refresh-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 36px -8px rgba(139, 92, 246, 0.75);
  filter: brightness(1.05);
}

.refresh-btn:active {
  transform: translateY(0) scale(0.97);
}

.refresh-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.refresh-icon {
  display: inline-block;
}
.refresh-btn:not(:disabled):active .refresh-icon {
  animation: spin-once 0.5s ease;
}
@keyframes spin-once {
  to { transform: rotate(360deg); }
}

.meta {
  position: relative;
  margin: 16px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  min-height: 1.4em;
}

/* ---------- Stats row ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  margin-top: 22px;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 16px 8px;
  box-shadow: 0 12px 28px -16px rgba(99, 60, 200, 0.35);
}

.stat-num {
  font-family: "Sora", sans-serif;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-num span {
  font-size: 13px;
  font-weight: 700;
}

.stat-label {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Rule explainer ---------- */
.rule-card {
  width: 100%;
  margin-top: 26px;
  text-align: left;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 24px 26px;
  box-shadow: 0 12px 28px -16px rgba(99, 60, 200, 0.3);
}

.rule-card h3 {
  margin: 0 0 10px;
  font-family: "Sora", sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.rule-card p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.disclaimer {
  font-size: 12px !important;
  color: var(--muted) !important;
  font-style: italic;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 30px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  font-weight: 600;
}

.footer a {
  color: #7c3aed;
  font-weight: 800;
}

.footer-tiny {
  opacity: 0.7;
  font-size: 11.5px;
}

.spinner {
  width: 1em;
  height: 1em;
  border: 3px solid rgba(139, 92, 246, 0.2);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- State-driven theming ---------- */
[data-state="yes"] {
  --glass-bg: rgba(255, 235, 240, 0.65);
  --glass-border: rgba(255, 182, 193, 0.8);
  animation: card-pop 0.5s ease;
}
[data-state="yes"] .verdict {
  background: linear-gradient(90deg, #ef4444, #f97316, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 3s linear infinite;
  background-size: 200% auto;
}

[data-state="no"] {
  --glass-bg: rgba(238, 242, 255, 0.65);
  --glass-border: rgba(191, 219, 254, 0.8);
}
[data-state="no"] .verdict {
  background: linear-gradient(90deg, var(--blue), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

[data-state="error"] .verdict {
  color: #64748b;
  font-size: 1.6rem;
  background: none;
  -webkit-text-fill-color: initial;
}

@keyframes card-pop {
  0% { transform: scale(0.97); }
  50% { transform: scale(1.015); }
  100% { transform: scale(1); }
}

@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(135deg, #0f0a1f 0%, #0b1120 50%, #071019 100%);
    color: #e9e6ff;
  }
  :root {
    --text: #ece9ff;
    --muted: #a9a3d6;
    --glass-bg: rgba(30, 24, 60, 0.55);
    --glass-border: rgba(139, 92, 246, 0.25);
  }
  .badge {
    color: #d8b4fe;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(236, 72, 153, 0.18));
  }
  .badge-live {
    color: #6ee7b7;
  }
  .pill {
    box-shadow: none;
  }
  .footer a { color: #c4b5fd; }

  [data-state="yes"] {
    --glass-bg: rgba(76, 20, 30, 0.5);
    --glass-border: rgba(248, 113, 113, 0.35);
  }
  [data-state="no"] {
    --glass-bg: rgba(20, 30, 70, 0.5);
    --glass-border: rgba(96, 165, 250, 0.3);
  }
}

@media (max-width: 420px) {
  .stat-num { font-size: 18px; }
  .card { padding: 36px 22px 24px; }
}

/* ---------- Persistent legal disclaimer banner ---------- */
.warning-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  background: linear-gradient(90deg, #ef4444, #ec4899);
  box-shadow: 0 4px 20px -6px rgba(239, 68, 68, 0.5);
}

.warning-banner strong {
  text-decoration: underline;
  text-underline-offset: 2px;
}
