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

.prenom { font-size: 52px; line-height: 1; }
.titre-ecran { font-size: 40px; line-height: 1.05; }
.doux { margin: 0; color: var(--doux); font-size: 15px; line-height: 21px; }
.centre { margin: auto 0; display: grid; justify-items: center; gap: 14px; text-align: center; }
.centre-texte { text-align: center; }
.grande { min-height: 56px; font-size: 18px; font-weight: 700; width: 100%; }
.accent { color: var(--accent-texte); }

/* Accueil */
.barre { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.barre-droite { display: flex; align-items: center; gap: 8px; }
.marque { font-size: 13px; font-weight: 700; letter-spacing: 0.16em; color: var(--doux); }
.pastille { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--carte-2); font-size: 13px; font-weight: 600; color: var(--doux); }
.puce { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.pilule.rond { width: 44px; padding: 0; }
.scene { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
.orbe { width: min(300px, 78vw); aspect-ratio: 1; border: 0; padding: 0; border-radius: 50%; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.orbe:focus-visible { outline: 2px solid var(--orange-clair); outline-offset: 6px; }
.orbe canvas { width: 100%; height: 100%; display: block; }
.identite { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.code-orbe { font-size: 12px; font-weight: 700; letter-spacing: 0.22em; color: var(--accent-texte); }
.identite p { margin: 0; font-size: 17px; color: var(--doux); }
.indice { margin: 0; text-align: center; font-size: 13px; color: var(--doux); }
.nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 56px; border: 0; border-radius: var(--r); background: var(--carte-2); color: var(--encre); font: 600 13px var(--texte); cursor: pointer; }
.nav button:disabled { opacity: 0.45; cursor: default; }

/* En-têtes d'écran */
.retour-ligne { display: flex; align-items: center; gap: 12px; }
.retour { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--carte-2); color: var(--encre); cursor: pointer; }

/* Écrire */
.capture { display: grid; gap: 12px; }
.capture textarea, .champ input, .champ textarea {
  width: 100%; border-radius: var(--r); border: 1px solid var(--trait); background: var(--carte-2); color: var(--encre);
  font: 500 16px/1.4 var(--texte); padding: 12px 14px; resize: vertical;
}

/* Propositions */
.citation { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--r); background: var(--carte-2); }
.citation p { margin: 0; font-size: 17px; line-height: 25px; }
.noyau-mini { flex: 0 0 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 30% 72%, #F59463 0%, #E75C20 30%, #B8430F 58%, #313130 95%); }
.attente { display: flex; align-items: center; gap: 10px; color: var(--doux); }
.tourne { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--trait); border-top-color: var(--orange); animation: tourne 0.8s linear infinite; }
.reponse { margin: 0; font-size: 17px; line-height: 24px; }
.question { display: grid; gap: 10px; padding: 16px; border-radius: var(--r); border: 1px solid var(--orange); }
.question p { margin: 0; font-weight: 600; }
.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.cartes { display: grid; gap: 12px; }
.carte-prop { display: grid; gap: 12px; padding: 20px; border-radius: var(--r); background: var(--carte); border: 1px solid var(--trait); }
.carte-prop .haut { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.carte-prop .type { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--accent-texte); }
.carte-prop .conf { font-size: 13px; font-weight: 600; color: var(--doux); }
.carte-prop h2 { font-size: 24px; line-height: 1.15; }
.carte-prop .lignes { display: grid; gap: 6px; font-size: 15px; line-height: 21px; color: var(--doux); }
.carte-prop .actions { display: flex; gap: 8px; }
.carte-prop .actions .valider { flex: 1; background: var(--orange-fonce); border-color: transparent; color: #fff; font-weight: 700; }
.carte-prop .actions .discret { background: transparent; border-color: transparent; color: var(--doux); }
.carte-prop .fait { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; color: var(--accent-texte); }
.carte-prop .fait button { margin-left: auto; }
.carte-prop.ignoree { opacity: 0.5; }
.carte-prop .erreur { margin: 0; color: var(--accent-texte); font-size: 14px; }
.champ { display: grid; gap: 4px; }
.champ label { font-size: 13px; font-weight: 600; color: var(--doux); }
.pied { margin-top: auto; display: grid; gap: 10px; padding-bottom: 8px; }
#tout-valider { background: var(--orange); }

/* Confirmation */
.confirmation { align-items: stretch; }
.noyau-confirm { align-self: center; width: 96px; height: 96px; margin-top: 24px; border-radius: 50%; background: radial-gradient(circle at 30% 72%, #F59463 0%, #E75C20 30%, #B8430F 58%, #313130 96%); animation: respire 1.6s ease-in-out infinite alternate; }
@keyframes respire { from { transform: scale(0.97); } to { transform: scale(1.04); } }
.question-envoi { margin: 0; text-align: center; font-family: var(--titre); font-size: 26px; line-height: 1.2; }
.carte-detail { display: grid; gap: 12px; padding: 20px; border-radius: var(--r); background: var(--carte); font-size: 15px; }
.carte-detail div { display: flex; justify-content: space-between; gap: 12px; }
.carte-detail span { color: var(--doux); }
.carte-detail b { font-weight: 600; text-align: right; word-break: break-word; }
.carte-detail summary { color: var(--accent-texte); font-weight: 600; cursor: pointer; min-height: 32px; }
.carte-detail details p { white-space: pre-wrap; margin: 10px 0 0; line-height: 1.45; }
.deux { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#conf-oui { background: var(--orange); }

/* Journal */
.jour { margin: 8px 0 0; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--accent-texte); }
.ligne-journal { display: flex; gap: 14px; align-items: center; padding: 14px 16px; margin-top: 8px; border-radius: var(--r); background: var(--carte); }
.ligne-journal .h { flex: 0 0 44px; font-size: 14px; font-weight: 700; color: var(--doux); }
.ligne-journal .quoi { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ligne-journal .quoi b { font-weight: 600; font-size: 15px; line-height: 20px; }
.ligne-journal .quoi span { font-size: 13px; color: var(--doux); }
.ligne-journal .etat { font-size: 13px; font-weight: 600; color: var(--doux); }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 16px); max-width: 528px; margin: 0 auto; padding: 14px 16px; border-radius: var(--r); background: var(--carte-2); border-left: 3px solid var(--orange); font-size: 15px; z-index: 40; }

/* Écoute du « oui » */
.ecoute-oui { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; font-size: 15px; font-weight: 600; color: var(--accent-texte); }
.onde { width: 12px; height: 12px; border-radius: 50%; background: var(--orange); animation: onde 1s ease-out infinite; }
@keyframes onde { from { box-shadow: 0 0 0 0 rgba(231, 92, 32, 0.6); } to { box-shadow: 0 0 0 14px rgba(231, 92, 32, 0); } }
.discret-lien { background: transparent; border-color: transparent; color: var(--doux); }

/* Conversation en cours */
.conversation { position: fixed; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 16px); max-width: 528px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 999px; background: var(--carte-2); border: 1px solid var(--trait); z-index: 30; }
.conversation p { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation[data-etat="analyse"] .onde { animation-duration: 0.5s; }
.conversation[data-etat="parle"] .onde { background: var(--orange-clair); }
.conversation .pilule { min-height: 40px; }
body:has(.conversation:not([hidden])) .ecran { padding-bottom: 80px; }
.toast { bottom: calc(env(safe-area-inset-bottom) + 84px); }
