:root {
  --aubergine: #1F1641;
  --violet: #D6C9FE;
  --violet-fonce: #5B4BC4;
  --creme: #FFFAF2;
  --gris: #6A7184;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  background: var(--creme);
  color: var(--aubergine);
  -webkit-tap-highlight-color: transparent;
}
.app {
  max-width: 520px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom)) 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
}
.head { text-align: center; margin-top: 8px; }
.logo { font-size: 34px; font-weight: 800; letter-spacing: 1px; }
.logo span { color: var(--violet-fonce); }
.tagline { margin: 2px 0 0; color: var(--gris); font-size: 13px; }

.installer {
  border: 1.5px dashed var(--violet-fonce); background: #fff; color: var(--violet-fonce);
  border-radius: 12px; padding: 12px; font-size: 14px; font-weight: 600; cursor: pointer;
}

.micro {
  border: 0; border-radius: 16px; padding: 22px;
  background: var(--aubergine); color: var(--creme);
  font-size: 19px; font-weight: 600; cursor: pointer;
  box-shadow: 0 4px 14px rgba(31, 22, 65, 0.18);
}
.micro.rec { background: #C0392B; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }

textarea {
  width: 100%; border: 1.5px solid #E5E2F5; border-radius: 14px;
  padding: 14px; font-size: 16px; font-family: inherit; color: var(--aubergine);
  background: #fff; resize: vertical;
}
textarea:focus { outline: 2px solid var(--violet-fonce); border-color: transparent; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--violet); background: #fff; color: var(--violet-fonce);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; cursor: pointer;
}
.chip.actif { background: var(--violet-fonce); color: #fff; border-color: var(--violet-fonce); }

.actions { display: flex; gap: 10px; }
.primaire {
  flex: 1; border: 0; border-radius: 14px; padding: 16px;
  background: var(--violet-fonce); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
}
.secondaire {
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--violet-fonce); border-radius: 14px; padding: 0 18px;
  color: var(--violet-fonce); font-size: 15px; font-weight: 600; cursor: pointer;
}

.statut { min-height: 40px; margin: 0; padding: 0 4px; font-size: 14px; white-space: pre-line; }
.statut.ok { color: #1E7E45; }
.statut.err { color: #C0392B; }
.statut.wait { color: var(--gris); }

.foot {
  margin-top: auto; display: flex; justify-content: space-between;
  color: var(--gris); font-size: 12px; padding-top: 12px; border-top: 1px solid #ECE8FB;
}
.foot a { color: var(--violet-fonce); text-decoration: none; }
.foot .hil { font-style: italic; }
