/* Téléphone d'abord ; uniquement les composants des agents spécialisés. */
.agent-bloc { overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.agent-bloc h2 { color: var(--titre); font-size: 1.2rem; }
.agent-bloc h3, .agent-ligne h3 { font-size: 1.05rem; overflow-wrap: anywhere; }
.agent-ligne { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.agent-texte { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.agent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.agent-actions .btn { flex: 1 1 145px; white-space: normal; }
.agent-champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-weight: 600; }
.agent-champ input, .agent-champ textarea, .agent-champ select { width: 100%; max-width: 100%; min-height: 44px; border: 1px solid var(--ligne); border-radius: 8px; background: var(--surface); padding: 10px; font-weight: 400; }
.agent-champ textarea { resize: vertical; }
.agent-formulaire { display: flex; flex-direction: column; gap: 12px; padding-block: 10px; }
.agent-formulaire button, .agent-bloc button, .agent-ligne button, .agent-ligne a { min-height: 44px; white-space: normal; }
.agent-deux { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.agent-alerte { color: var(--ambre); background: var(--ambre-fond); border-left: 3px solid var(--ambre-trait); padding: 8px 12px; overflow-wrap: anywhere; }
.agent-retour { display: flex; flex-direction: column; gap: 8px; overflow-wrap: anywhere; }
@media (min-width: 700px) { .agent-formulaire { max-width: 640px; } .agent-actions .btn { flex: 0 1 auto; } }
.agent-fournisseur { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--ligne); border-radius: 8px; display: flex; flex-direction: column; gap: 10px; }
.agent-bloc .meta, .agent-operation .meta { font-size: 13px; color: var(--doux); margin-top: 4px; }
.agent-liste { display: flex; flex-direction: column; gap: 8px; }
.agent-operation > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 44px; }
.agent-operation > summary strong { flex: 1 1 0; min-width: 0; color: var(--titre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-operation > summary::before { content: '▸'; }
.agent-operation[open] > summary::before { content: '▾'; }
.agent-detail { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }
.agent-champ input[type=checkbox] { width: 44px; align-self: flex-start; }
.agent-operation-meta { flex: 1 0 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* État du site (veilleur) */
.site-voyant { align-self: flex-start; }
.site-rouge { border-left-color: var(--rouge); background: var(--rouge-fond); }
/* Assistant : conversation lisible au pouce, à 375 px comme sur un ordinateur. */
.assistant { display: flex; flex-direction: column; gap: 12px; min-width: 0; border-radius: 12px; }
.assistant.depose { outline: 2px dashed var(--vert); outline-offset: 4px; }
.assistant-fil { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.assistant-msg { max-width: 92%; min-width: 0; padding: 10px 12px; border-radius: 12px; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 6px; }
.assistant-msg p { margin: 0; }
/* La dernière réponse reste lisible au-dessus de la zone de saisie, qui tient en bas de l'écran. */
.assistant-msg, .assistant-fil > .aide { scroll-margin-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 190px); scroll-margin-top: 12px; }
.assistant-msg.lui { align-self: flex-start; background: var(--surface); border: 1px solid var(--ligne); box-shadow: var(--ombre); }
.assistant-msg.moi { align-self: flex-end; background: var(--clair); border: 1px solid var(--ligne); }
.assistant-fichier { font-size: 14px; color: var(--doux); }
.assistant-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.assistant-actions .btn { flex: 1 1 130px; min-height: 44px; white-space: normal; }
.assistant-titre { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
.assistant-titre input { width: 100%; min-height: 44px; border: 1px solid var(--ligne); border-radius: 8px; padding: 10px; font: inherit; font-weight: 400; background: var(--surface); }
.assistant-saisie { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 6px); z-index: 2; background: var(--bg); padding: 8px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.assistant-saisie textarea { width: 100%; min-height: 52px; max-height: 160px; border: 1px solid var(--ligne); border-radius: 10px; padding: 10px; font: inherit; background: var(--surface); resize: vertical; }
.assistant-ligne { display: flex; gap: 8px; }
.assistant-ligne .btn { flex: 1 1 0; min-height: 46px; white-space: normal; }
.assistant-joindre { position: relative; display: inline-flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.assistant-joindre input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
@media (min-width: 700px) { .assistant { max-width: 720px; } .assistant-actions .btn { flex: 0 1 auto; } }
