:root {
  --bg: #0b0e16;
  --bg2: #10141f;
  --card: #151b29;
  --line: rgba(255, 255, 255, 0.08);
  --fg: #e8ecf4;
  --muted: #9aa7bd;
  --accent: #ff7a1a;
  --accent2: #ffa94d;
  --ok: #3ddc97;
  --danger: #ff5d5d;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255, 122, 26, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(56, 132, 255, 0.10), transparent 55%),
    var(--bg);
  color: var(--fg);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--accent2); text-decoration: none; }
.accent { color: var(--accent); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(11, 14, 22, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 700; color: var(--fg); }
.nav { display: flex; gap: 18px; align-items: center; font-size: 0.94rem; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--fg); }
.nav-item { position: relative; }
.dropdown-toggle {
  background: none; border: 0; color: var(--muted); font-family: inherit;
  font-size: 0.94rem; cursor: pointer; padding: 7px 6px;
}
.dropdown-toggle:hover { color: var(--fg); }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 200px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 6px; display: none; z-index: 30;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
}
.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block; padding: 8px 12px; color: var(--muted); border-radius: 8px; font-size: 0.9rem;
}
.dropdown-menu a:hover { background: rgba(255, 255, 255, 0.06); color: var(--fg); }
.nav-cta {
  border: 1px solid var(--accent); color: var(--accent) !important;
  padding: 7px 16px; border-radius: 999px; transition: 0.2s;
}
.nav-cta:hover { background: var(--accent); color: #0b0e16 !important; }

/* ---------- Hero ---------- */
.hero { padding: 92px 24px 70px; text-align: center; max-width: 980px; margin: 0 auto; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -0.02em; line-height: 1.12; }
.hero .sub { color: var(--muted); margin: 18px 0 34px; font-size: 1.06rem; }

.searchbox {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 10px 8px 20px; max-width: 680px; margin: 0 auto;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.35);
}
.searchbox:focus-within { border-color: rgba(255, 122, 26, 0.6); }
.lens { width: 22px; height: 22px; stroke: var(--muted); fill: none; stroke-width: 2; flex: none; }
.searchbox input { flex: 1; background: none; border: 0; outline: 0; color: var(--fg); font-size: 1.05rem; min-width: 0; }
.btn-go {
  background: linear-gradient(90deg, var(--accent), var(--accent2)); border: 0; color: #10131c;
  font-weight: 700; font-size: 1rem; padding: 11px 24px; border-radius: 999px; cursor: pointer;
  transition: transform 0.15s;
}
.btn-go:hover { transform: translateY(-1px); }

.hint { margin-top: 16px; color: var(--muted); font-size: 0.9rem; }
.chips {
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); color: var(--muted);
  padding: 4px 12px; border-radius: 999px; cursor: pointer; font-size: 0.85rem;
}
.chips:hover { color: var(--fg); border-color: var(--accent); }

.spinner {
  width: 34px; height: 34px; margin: 26px auto 0; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.results { list-style: none; margin-top: 26px; text-align: left; }
.results li {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; margin-bottom: 12px;
}
.results .r-title { font-weight: 600; color: var(--accent2); }
.results .r-url { color: var(--muted); font-size: 0.82rem; margin-bottom: 4px; }
.results .r-snip { color: var(--fg); font-size: 0.94rem; }

/* ---------- Sections ---------- */
.section { max-width: 1080px; margin: 0 auto; padding: 70px 24px; }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 18px; letter-spacing: -0.01em; }
.section.dark { border-block: 1px solid var(--line); background: var(--bg2); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 12px; }
.cards article {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  transition: transform 0.18s, border-color 0.18s;
}
.cards article:hover { transform: translateY(-3px); border-color: rgba(255, 122, 26, 0.4); }
.cards img { width: 34px; height: 34px; margin-bottom: 12px; }
.cards h3 { margin-bottom: 6px; font-size: 1.05rem; }
.cards p { color: var(--muted); font-size: 0.93rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; text-align: center; }
.stats b { display: block; font-size: 1.6rem; color: var(--accent2); }
.stats span { color: var(--muted); font-size: 0.85rem; }

.lead { color: var(--muted); font-size: 1.05rem; }
.checks { list-style: none; margin-top: 18px; }
.checks li { padding-left: 28px; position: relative; margin-bottom: 10px; color: var(--fg); }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--ok); font-weight: 700;
}

/* ---------- Contact ---------- */
.contact-form { display: grid; gap: 12px; max-width: 520px; margin-top: 18px; }
.contact-form input, .contact-form textarea {
  background: var(--card); border: 1px solid var(--line); color: var(--fg);
  border-radius: 12px; padding: 12px 14px; font-size: 0.98rem; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form button {
  justify-self: start; background: var(--accent); color: #10131c; border: 0;
  font-weight: 700; padding: 11px 26px; border-radius: 999px; cursor: pointer;
}
.form-ok { color: var(--ok); }

/* Case « Je ne suis pas un robot » — allure Google reCAPTCHA v2 (rien de suspect) */
.captcha-host { margin-top: 34px; display: flex; }
.captcha-box {
  width: 302px; height: 78px; background: #fff; color: #333;
  border: 1px solid #d3d3d3; border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  padding: 14px 0 0 17px; position: relative; cursor: pointer;
  user-select: none; display: block;
  transition: border-color 0.15s;
}
.captcha-box:hover { border-color: #b8b8b8; }
.captcha-box:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.captcha-tick {
  float: left; width: 28px; height: 28px; margin-right: 14px;
  border: 2px solid #c1c1c1; border-radius: 3px; background: #fff;
  position: relative; overflow: hidden; flex: none;
}
.rc-tick-icon {
  width: 100%; height: 100%; display: block;
  fill: #7d7d7d; stroke: none;
  position: relative; z-index: 1;
}
.captcha-box.checking .rc-tick-icon { opacity: 0; }
.captcha-box.checked .rc-tick-icon { opacity: 0; }
.rc-spinner {
  position: absolute; inset: 4px; border-radius: 50%;
  border: 2px solid #e7f1ff; border-top-color: #5d9eff;
  animation: spin 0.7s linear infinite; display: none;
}
.captcha-box.checking .rc-spinner { display: block; }
.captcha-box.checked { border-color: #7cc77e; }
.captcha-box.checked .captcha-tick { background: #64c56f; border-color: #64c56f; }
.captcha-box.checked .captcha-tick::after {
  content: ""; position: absolute; left: 7px; top: 3px; width: 9px; height: 14px;
  border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); z-index: 2;
}

.captcha-label { font-size: 14px; line-height: 28px; color: #555; }

.captcha-footer {
  position: absolute; left: 0; right: 0; bottom: 0; height: 24px;
  background: #f7f7f7; border-top: 1px solid #ececec; border-bottom: 1px solid #ececec;
  display: flex; align-items: center; gap: 4px; padding: 0 10px;
}
.rc-logo { width: 22px; height: 22px; flex: none; }
.rc-word { font-size: 9px; color: #989898; letter-spacing: 0.2px; }
.rc-links { margin-left: auto; font-size: 8px; color: #999; }
.rc-links a { color: #999; }
.rc-links a:hover { color: #333; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 22px 28px; color: var(--muted); font-size: 0.88rem; }
.foot { max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--fg); }

/* ---------- Modal / puzzle ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 8, 14, 0.78); backdrop-filter: blur(6px);
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal-box {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px; max-width: 246px; width: 100%; position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.modal-box h3 { font-size: 1.05rem; margin-bottom: 4px; }
.puzzle-sub { color: var(--muted); font-size: 0.82rem; margin-bottom: 12px; }
.puzzle-sub b { color: var(--accent2); }
.close {
  position: absolute; top: 8px; right: 10px; background: none; border: 0;
  color: var(--muted); font-size: 1rem; cursor: pointer;
}
.close:hover { color: var(--fg); }

.grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; user-select: none;
}
.cell {
  aspect-ratio: 1; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--card); cursor: pointer; padding: 0; overflow: hidden;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
  display: flex; align-items: center; justify-content: center;
}
.cell img { width: 68%; height: 68%; object-fit: contain; pointer-events: none; }
.cell:hover { transform: scale(1.04); }
.cell.on { border-color: var(--ok); box-shadow: 0 0 0 2px rgba(61, 220, 151, 0.25); }
.cell.wrong { border-color: var(--danger); animation: shake 0.35s; }
@keyframes shake {
  25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-3px); }
}

.btn-unlock {
  width: 100%; margin-top: 12px; background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #10131c; font-weight: 700; border: 0; padding: 10px; border-radius: 999px; cursor: pointer;
}
.btn-unlock:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-unlock.open { background: linear-gradient(90deg, var(--ok), #2ecc8f); }
.puzzle-msg { color: var(--ok); font-size: 0.84rem; margin-top: 10px; text-align: center; }
.puzzle-msg.err { color: var(--danger); }

@media (max-width: 560px) {
  .nav { gap: 8px; font-size: 0.84rem; }
  .dropdown-menu { position: static; min-width: 0; box-shadow: none; border-radius: 10px; margin-top: 4px; }
  .foot { flex-direction: column; }
}