:root {
  --bg: #0b1220;
  --card: #121a2b;
  --muted: #a9b1c3;
  --text: #eef2ff;
  --accent: #4f7cff;
  --accent-2: #00c2a8;
  --danger: #ff6b6b;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji';
  background: radial-gradient(1200px 600px at 10% -10%, rgba(79,124,255,.25), transparent 50%),
              radial-gradient(900px 500px at 100% 0%, rgba(0,194,168,.25), transparent 50%),
              var(--bg);
  color: var(--text);
  display: grid;
  place-items: center;
  padding: 32px 16px;
}
.container {
  width: 100%;
  max-width: 980px;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  height: 40px;
}
.brand h1 { font-size: 1.1rem; margin: 0; letter-spacing: .2px; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  padding: 24px;
}

.grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 24px;
}
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
}

h2 { margin: 0 0 8px 0; font-size: 1.4rem; }
p.muted { color: var(--muted); margin: 0 0 16px 0; }

.field { margin-bottom: 16px; }
label { display: block; font-size: .95rem; margin-bottom: 6px; color: #d7ddf7; }

.pin-input {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 14px 12px;
  font-size: 1.05rem;
  color: var(--text);
  outline: none;
  transition: border .15s ease, box-shadow .15s ease;
  width: 100%;
  text-align: left;
  letter-spacing: 2px; /* espace léger entre les chiffres */
}
.pin-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79,124,255,.15); }
.pin-input::placeholder { color: #6e7690; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.checkbox { display: flex; align-items: center; gap: 10px; font-size: .95rem; color: var(--muted); }
.checkbox input { width: 18px; height: 18px; }

button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: white;
  font-weight: 700;
  padding: 14px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .06s ease, filter .2s ease, box-shadow .2s ease;
  box-shadow: 0 8px 24px rgba(0, 137, 255, .35);
}
button:hover { filter: brightness(1.05); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }

.result {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 16px;
  min-height: 96px;
}

.result h3 { margin: 0 0 6px 0; font-size: 1.05rem; }
.result .value { font-weight: 800; font-size: 1.6rem; }
.result .ok { color: var(--accent-2); }
.result .err { color: var(--danger); }

.small { font-size: .9rem; color: var(--muted); }
a.link { color: var(--accent-2); text-decoration: none; }
a.link:hover { text-decoration: underline; }

/* 📱 Améliorations responsives */
@media (max-width: 600px) {
  .header {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  .header img.logo {
    max-width: 160px;
    height: auto;
  }

  .row {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  button {
    width: 100%;
  }

  .card {
    padding: 16px;
  }

  h2 {
    font-size: 1.2rem;
  }

  .result .value {
    font-size: 1.2rem;
    word-break: break-word;
  }
}
