:root {
  --fond: #14121f;
  --fond-2: #1d1a2c;
  --carte: #252138;
  --texte: #efe9dc;
  --doux: #a9a2b8;
  --or: #e8c27a;
  --or-pale: #f5deae;
  --rouge: #e5766b;
  --vert: #8fc9a3;
  --rayon: 18px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(120% 70% at 50% 0%, #2a2440 0%, var(--fond) 60%);
  background-color: var(--fond);
  color: var(--texte);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.vue {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Accueil */
.haut { display: flex; justify-content: space-between; align-items: flex-start; }
.heure { font-size: 44px; font-weight: 300; margin: 8px 0 0; letter-spacing: 1px; }
.salut { margin: 0; color: var(--doux); }
.discret-bouton {
  background: none; border: 1px solid #3a3452; border-radius: 999px;
  width: 40px; height: 40px; color: var(--doux); font-size: 18px;
}
.discret-bouton.petit { width: 34px; height: 34px; font-size: 15px; }
.discret-bouton[aria-pressed="true"] { color: var(--fond); background: var(--or); border-color: var(--or); }

.urgences { display: flex; flex-direction: column; gap: 8px; }
.urgence {
  background: #3a1f25; border: 1px solid var(--rouge); border-radius: var(--rayon);
  padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start;
}
.urgence p { margin: 0; flex: 1; }
.urgence small { color: var(--doux); display: block; }

.ange-central {
  margin: 24px auto 0;
  width: min(64vw, 240px); aspect-ratio: 1;
  border-radius: 50%; border: none; position: relative;
  background: radial-gradient(circle at 50% 40%, #3b3358, #221d35 70%);
  box-shadow: 0 0 0 1px #4a4166, 0 20px 60px #0008;
  display: grid; place-items: center;
}
.aureole {
  position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid var(--or); opacity: .55;
  animation: respire 5s ease-in-out infinite;
}
@keyframes respire { 50% { transform: scale(1.04); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .aureole, .onde { animation: none !important; } }
.ange-texte { font-size: 19px; color: var(--or-pale); max-width: 70%; }
.bon-moment {
  align-self: center; background: none; border: none; color: var(--or);
  text-decoration: underline; text-underline-offset: 4px; padding: 8px;
}

.tiroirs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.tiroirs button, #tester-code, #essai-voix, #copier-adresse {
  background: var(--carte); border: 1px solid #332d4a; border-radius: var(--rayon);
  padding: 16px 12px; text-align: center;
}
.tiroirs button[data-cat="urgence"].actif { border-color: var(--rouge); }
.pied { display: flex; justify-content: space-between; }
.lien { background: none; border: none; color: var(--doux); padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; }

/* Barres */
.barre { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; }
.barre h1 { font-size: 19px; font-weight: 500; margin: 0; text-align: center; }
.retour { background: none; border: none; font-size: 32px; line-height: 1; color: var(--doux); padding: 0 8px; }

/* Listes de notifications */
.notifs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.notif { background: var(--carte); border-radius: var(--rayon); padding: 12px 14px; }
.notif .app { color: var(--or); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.notif .resume { margin: 2px 0; }
.notif details { color: var(--doux); font-size: 15px; }
.notif .quand { color: var(--doux); font-size: 13px; }
.vide, .aide { color: var(--doux); }
.anciennes summary { color: var(--doux); padding: 8px 0; }

/* Ange */
.vue-ange { gap: 10px; }
.fil { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
.bulle { max-width: 88%; padding: 10px 14px; border-radius: var(--rayon); white-space: pre-wrap; overflow-wrap: anywhere; }
.bulle.moi { align-self: flex-end; background: #34304a; color: var(--texte); }
.bulle.ange { align-self: flex-start; background: none; border-left: 2px solid var(--or); border-radius: 0; color: var(--or-pale); }
.bulle a { color: var(--or); }
.lecteur { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; margin-top: 8px; }
.statut { min-height: 1.5em; margin: 0; color: var(--doux); text-align: center; font-size: 15px; }
.commandes { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.mains-libres { color: var(--doux); font-size: 14px; display: flex; gap: 6px; align-items: center; }
#nouvelle { justify-self: end; }
.micro {
  width: 84px; height: 84px; border-radius: 50%; border: none; position: relative;
  background: var(--or); box-shadow: 0 8px 30px #e8c27a44;
}
.micro::before {
  content: ""; position: absolute; inset: 30px 34px; border-radius: 10px; background: var(--fond);
}
.micro.ecoute { background: var(--rouge); }
.micro.ecoute .onde { position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--rouge); animation: respire 1.2s ease-in-out infinite; }
.micro.parle::before { inset: 32px; border-radius: 4px; }
.saisie { display: flex; gap: 8px; }
.saisie input { flex: 1; min-width: 0; background: var(--fond-2); border: 1px solid #332d4a; border-radius: 12px; padding: 10px 12px; }
.saisie button { background: var(--carte); border: 1px solid #332d4a; border-radius: 12px; padding: 10px 14px; }

/* Mémoire */
.souvenirs, .journal { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.souvenirs li { background: var(--carte); border-radius: 12px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; }
.souvenirs li span { flex: 1; }
.souvenirs li button { background: none; border: none; color: var(--doux); font-size: 18px; }
.journal li { color: var(--doux); font-size: 15px; }
h2 { font-size: 16px; font-weight: 500; color: var(--doux); margin: 16px 0 0; }

/* Réglages */
.champ { display: flex; flex-direction: column; gap: 6px; color: var(--doux); }
.champ input, .champ select { background: var(--fond-2); border: 1px solid #332d4a; border-radius: 12px; padding: 10px 12px; color: var(--texte); }
