* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial;
  background: var(--surface-2);
}

/* Haut de page */
.app-header {
  background: var(--brand-bg);
  color: #0033a0;
  padding: 24px 16px;
  box-shadow: var(--shadow);
  border-bottom: 2px solid #0fd3a0;
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

/* Logo optionnel (placez assets/logo.png ou supprimez la règle) */
.brand-logo {
  width: 80px;
  height: 60px;
  flex: 0 0 auto;
  display: block;
  background: transparent url("./logo.png") center/contain no-repeat;
}

.brand-text h1 {
  margin: 0;
  font-size: 20px;
  color: #0033a0;
}

.subtitle {
  margin: 2px 0 0;
  color: #0033a0;
  opacity: .85;
  font-size: 13px;
}

.container { max-width: 1100px; margin: 24px auto; padding: 0 12px; }

.card {
  background: var(--surface);
  border: 2px solid #0fd3a0;
  border-radius: var(--radius);
  padding: 18px;
  margin: 16px 0;
  box-shadow: var(--shadow);
}

.card h2 { color: #0033a0; }

.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 800px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }

.field label {
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: bold;
}
.field input, .field select {
  width: 100%;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.field input:focus, .field select:focus {
  outline: none; box-shadow: var(--focus); border-color: transparent;
}

.actions.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
button { appearance: none; border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; font-weight: 600; }
button.primary { background: var(--brand-primary); color: var(--brand-primary-contrast); }
button.secondary { background: #EEF2FF; color: #1E3A8A; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
button.danger { background: var(--danger); color: #fff; }
button:focus-visible { outline: none; box-shadow: var(--focus); }

.qr-wrap { display: flex; justify-content: center; align-items: center; padding: 10px; }
.qr-container {
  width: 320px;
  height: 320px;
  border-radius: 12px;
  background: var(--qr-bg);
  display: grid;
  place-items: center;
  border: none;
}

.app-footer { text-align: center; padding: 24px 12px; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); margin-top: 8px; }