/* ===== Base ===== */
:root{
  --bg:#23272f;
  --card:#262a36;
  --ink:#e9e9e9;
  --muted:#b9c0c7;
  --accent:#41f29c;
  --accent-2:#87eaf2;
  --ink-2:#79ffd7;
  --surface:#161a20;
  --border:#2c2e38;
  --btn:#32b899;
  --btn-hover:#2dbd72;
  --copy-bg:#263442;
  --copy-bg-hover:#1bfaac55;
  --shadow:#0009;
}

*{ box-sizing:border-box; }
html, body { height:100%; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  margin: 0;
}

/* ===== Carte centrée ===== */
main.container {
  background: var(--card);
  max-width: 640px;
  margin: 42px auto;
  padding: 34px 28px 28px 28px;
  border-radius: 18px;
  box-shadow: 0 8px 28px var(--shadow);
  min-height: 60vh;
}

/* ===== Logo petit ===== */
.logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}
.logo {
  max-width: 72px;
  max-height: 72px;
  border-radius: 50%;
  background: #181a1c;
  box-shadow: 0 2px 12px rgba(27,250,172,0.15);
  border: 2px solid var(--accent);
}

/* ===== Titre ===== */
h1 {
  text-align: center;
  font-size: 2rem;
  color: var(--accent-2);
  margin: 14px 0 18px 0;
}
.highlight { color: var(--accent); }

/* ===== Formulaire ===== */
.form-row {
  display: flex;
  flex-direction: row;
  gap: 18px;
  justify-content: center;
  align-items: flex-start;
}
.form-row.half { margin-top: 18px; margin-bottom: 0; }

.form-group {
  margin: 12px 0 10px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group.wide { width: 100%; }
.form-group.half { width: 100%; min-width: 130px; }

label small {
  display: block;
  color: var(--muted);
  font-size: .9em;
  margin-top: 2px;
}

input, select {
  font-size: 1.05rem;
  padding: 9px 12px;
  border: 1px solid #444c5a;
  background: #181c23;
  color: #e6e9ed;
  border-radius: 8px;
  outline: none;
  margin-top: 2px;
  width: 100%;
}

/* ===== Boutons ===== */
.buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 18px;
}
button {
  background: var(--btn);
  color: #fff;
  border: none;
  padding: 11px 22px;
  font-size: 1rem;
  border-radius: 9px;
  cursor: pointer;
  transition: background .18s, transform .06s;
  font-weight: 600;
  letter-spacing: .02em;
}
button:hover:not(:disabled) { background: var(--btn-hover); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { background:#36566a; color:#bbb; cursor:not-allowed; }

/* ===== États / Résultats ===== */
.status, .stats, .result {
  margin: 14px 0 0 0;
  font-size: 1.02rem;
  word-break: break-word;
}
.pattern-note.invalid { color:#e86b6b; }
.pattern-note.valid { color: var(--accent); }

.result {
  margin-top: 20px;
  background: var(--surface);
  border-radius: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  text-align: center;
}
.result b { color: var(--ink-2); }

/* Bouton Copy */
.copy-btn {
  cursor: pointer;
  background: var(--copy-bg);
  border: none;
  color: var(--accent);
  font-weight: 700;
  border-radius: 6px;
  margin-left: 6px;
  padding: 3px 10px;
  font-size: .9rem;
  transition: background .2s, color .2s;
  vertical-align: middle;
  display: inline-block;
}
.copy-btn:hover { background: var(--copy-bg-hover); }
.copy-btn.copied { background: var(--btn-hover); color: #0c1e14; }

/* Pied de page */
.copyright-footer {
  margin: 28px auto 0 auto;
  max-width: 420px;
  text-align: center;
  background: #1c222b;
  border-radius: 10px;
  box-shadow: 0 2px 7px rgba(0,0,0,.4);
  padding: 12px 10px;
  font-size: .9rem;
  color: #47ecac;
  border: 1px solid #273042;
  letter-spacing: .01em;
}
.copyright-footer a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  transition: color .18s;
}
.copyright-footer a:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

/* Utilitaire monospace (évite tout style inline) */
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* ===== Responsive ===== */
@media (max-width: 680px){
  main.container { margin: 22px 12px; padding: 24px 16px; }
  .form-row { flex-direction: column; gap: 12px; }
  .logo { max-width:64px; max-height:64px; }
  h1 { font-size: 1.75rem; }
}
