/* Lanceur : écran d'ouverture, messages et cadre du CRM. Couleurs à accorder avec manifest.webmanifest. */
:root {
  --fond: #f5f7fa;
  --texte: #1f2937;
  --accent: #1f3a5f;
  --discret: #6b7280;
}
@media (prefers-color-scheme: dark) {
  :root { --fond: #111827; --texte: #f3f4f6; --accent: #7aa7e0; --discret: #9ca3af; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  overflow: hidden;
}
.ecran {
  position: fixed; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px; text-align: center; background: var(--fond);
}
.ecran[hidden] { display: none; }
.ecran img { border-radius: 22%; }
.nom { font-size: 22px; font-weight: 700; margin: 16px 0 4px; }
.etat, .code, .aide { color: var(--discret); margin: 4px 0; }
.code { font-size: 13px; margin-top: 16px; }
h1 { font-size: 20px; margin: 16px 0 8px; }
#message-texte { max-width: 420px; margin: 0 0 8px; }
.actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 320px; margin-top: 12px; }
button {
  font: inherit; font-weight: 600; min-height: 48px; border-radius: 10px; border: 0;
  background: var(--accent); color: #fff; padding: 10px 16px; cursor: pointer;
}
button.secondaire { background: transparent; color: var(--accent); border: 1px solid currentColor; }
@media (prefers-color-scheme: dark) { button { color: #111827; } button.secondaire { color: var(--accent); } }
/* Cadre du CRM : chargé derrière l'écran d'ouverture, montré quand le CRM a répondu « prêt ». */
#crm { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; z-index: 1; visibility: hidden; background: #fff; }
body.avec-crm #crm { visibility: visible; }
