/* ================================================================
   CYBER CHALLENGE — thème commun (fond blanc, orange & noir)
   ================================================================ */
:root {
  --orange: #ff7900;
  --orange-dark: #d96500;
  --orange-soft: #fff1e5;
  --ink: #0b0b0c;
  --ink-2: #3a3a3f;
  --muted: #74747c;
  --line: #e4e4e8;
  --paper: #ffffff;
  --ok: #12a150;
  --ok-soft: #e6f6ed;
  --ko: #d92d20;
  --ko-soft: #fdecea;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --display: 'Chakra Petch', 'JetBrains Mono', system-ui, sans-serif;
  --radius: 4px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Pluie numérique en arrière-plan */
#matrix {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0.018) 0 1px, transparent 1px 3px);
}
.page { position: relative; z-index: 2; }

/* ---------- Marque ---------- */
.brand {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0;
}
.brand .accent { color: var(--orange); }
.brand .cursor {
  display: inline-block;
  width: 0.55em;
  height: 0.85em;
  margin-left: 0.08em;
  background: var(--orange);
  vertical-align: -0.05em;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.prompt { color: var(--muted); font-size: 13px; }
.prompt b { color: var(--orange); font-weight: 600; }

/* ---------- Carte « terminal » ---------- */
.term {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--orange);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.term-bar .dots { display: flex; gap: 6px; }
.term-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: #444; display: block; }
.term-bar .dots i:first-child { background: var(--orange); }
.term-bar .grow { flex: 1; }
.term-body { padding: 26px 24px 24px; }

/* ---------- Formulaires ---------- */
label.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.input {
  width: 100%;
  font: 600 20px var(--mono);
  letter-spacing: 0.08em;
  padding: 14px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
  text-transform: uppercase;
}
.input::placeholder { color: #b8b8bf; text-transform: none; letter-spacing: 0; font-weight: 400; }
.input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.input.small { font-size: 14px; padding: 9px 12px; text-transform: none; letter-spacing: 0; font-weight: 400; border-width: 1.5px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: 700 15px var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 15px 22px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--orange);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, background 0.15s;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn:hover:not(:disabled) { background: #ff8a20; }
.btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled { background: #f1f1f3; color: #a3a3aa; border-color: #c9c9cf; box-shadow: none; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; box-shadow: none; padding: 9px 14px; font-size: 12px; }
.btn.ghost:hover:not(:disabled) { background: var(--orange-soft); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover:not(:disabled) { background: #26262a; }

.error {
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--ko);
  background: var(--ko-soft);
  color: #8f1d14;
  font-size: 13px;
}
.hidden { display: none !important; }

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