:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 64px 0 56px;
  text-align: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.logo {
  font-size: 40px;
  background: rgba(255,255,255,.18);
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-img {
  height: 60px;
  width: auto;
  border-radius: 12px;
  background: rgba(255,255,255,.15);
  padding: 4px;
}
.hero h1 {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.tagline {
  margin: 8px 0 16px;
  font-size: 18px;
  opacity: .92;
}
.version {
  display: inline-block;
  margin: 8px 0 0;
  font-size: 14px;
  background: rgba(0,0,0,.18);
  padding: 6px 14px;
  border-radius: 999px;
  opacity: .95;
}

main { padding: 48px 0; }

section { margin-bottom: 48px; }

h2 {
  font-size: 24px;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,.08), 0 12px 24px rgba(0,0,0,.06);
}
.card-icon {
  font-size: 48px;
  margin-bottom: 8px;
}
.card h3 {
  margin: 0 0 4px;
  font-size: 22px;
}
.card-desc {
  color: var(--text-muted);
  margin: 0 0 20px;
  font-size: 14px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
  font-size: 15px;
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn.disabled {
  background: #cbd5e1;
  color: white;
  pointer-events: none;
  cursor: not-allowed;
}

.card-meta {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hash {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  color: #94a3b8;
}

.warn {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--warn);
}

.empty {
  text-align: center;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  padding: 16px;
  border-radius: var(--radius);
  margin-top: 20px;
}

.changelog pre {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.info details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 12px;
}
.info summary {
  cursor: pointer;
  font-weight: 600;
  user-select: none;
}
.info ol {
  margin: 12px 0 0;
  padding-left: 22px;
}
.info code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.api {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.api a { color: var(--primary); text-decoration: none; }
.api a:hover { text-decoration: underline; }

footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 24px 0;
  font-size: 13px;
  text-align: center;
}

/* ── Boutons tutoriel ──────────────────────────────────────────── */
.tuto-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.btn-tuto {
  background: var(--surface);
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 10px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-tuto:hover {
  background: var(--primary);
  color: #fff;
}

/* ── Section aide ─────────────────────────────────────────────── */
.help-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 48px;
  text-align: center;
}
.help-desc {
  color: var(--text-muted);
  margin: 0 0 20px;
}
.btn-help {
  background: #f0fdf4;
  color: var(--success);
  border: 2px solid var(--success);
  border-radius: 10px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-help:hover {
  background: var(--success);
  color: #fff;
}
.btn-cancel {
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-cancel:hover { background: var(--border); }

/* ── Modals ────────────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.open {
  display: flex;
}
.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.modal-box h3 {
  margin: 0 0 20px;
  font-size: 22px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
}
.modal-close:hover { background: var(--border); }

/* ── Liste tutoriel ───────────────────────────────────────────── */
.tuto-list {
  margin: 0 0 20px;
  padding-left: 22px;
}
.tuto-list li {
  margin-bottom: 14px;
  line-height: 1.6;
}
.tuto-list code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.tuto-tip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: #1e40af;
}

/* ── Formulaire d'aide ────────────────────────────────────────── */
.help-modal-desc {
  color: var(--text-muted);
  margin: 0 0 20px;
}
.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-weight: 600;
  font-size: 14px;
}
.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
  background: var(--bg);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}
.form-group textarea { resize: vertical; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.help-feedback {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 12px;
}
.help-feedback.success {
  background: #f0fdf4;
  color: var(--success);
  border: 1px solid #bbf7d0;
}
.help-feedback.error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

@media (max-width: 600px) {
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 32px; }
  .tagline { font-size: 16px; }
  h2 { font-size: 20px; }
  .tuto-btns { flex-direction: column; }
  .modal-box { padding: 24px; }
}
