/* La discussion avec Nakari (discussion.js) : couleurs et polices de la v8, rien de nouveau */
.nk-chat .fullchat-head { flex-wrap: wrap; }
.nk-titre { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nk-titre h1 { font-size: 22px; line-height: 1.1; }
.nk-titre svg { width: 24px; height: 24px; flex: none; }
.nk-statut { font-size: 12px; color: var(--ink-2); }
.nk-outils { display: flex; gap: 7px; flex-wrap: wrap; }
.nk-outils .btn-secondary { height: 30px; }
.nk-chat button:disabled, .nk-composer textarea:disabled { opacity: .45; cursor: default; }
.nk-outils .btn-secondary.active { border-color: var(--accent); color: var(--accent); }

.nk-msg { max-width: 88%; }
.nk-md p { margin: 0 0 .5em; }
.nk-md p:last-child { margin-bottom: 0; }
.nk-md ul, .nk-md ol { margin: .2em 0 .55em; padding-left: 1.25em; }
.nk-md li { margin: .15em 0; }
.nk-md code { font-family: 'DM Mono', ui-monospace, monospace; font-size: .92em; padding: 1px 5px; border-radius: 5px; background: var(--surface-2); }
.nk-md a { color: var(--accent); text-decoration: underline; }
.nk-attente { color: var(--ink-2); }
.nk-attente span { animation: nk-point 1.2s infinite both; }
.nk-attente span:nth-child(2) { animation-delay: .2s; }
.nk-attente span:nth-child(3) { animation-delay: .4s; }
@keyframes nk-point { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nk-attente span { animation: none; } }
.nk-note { margin: 6px 0 0; font-size: 12px; color: var(--ink-2); }
.nk-erreur { margin: 8px 0 0; font-size: 12.5px; color: var(--danger, #E5484D); }

.nk-action { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--border-strong, var(--border)); background: var(--surface-2); }
.nk-action.fini { opacity: .7; }
.nk-action-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nk-action-quoi { font-size: 11.5px; font-weight: 600; color: var(--accent); }
.nk-action-detail { font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.nk-action-boutons { display: flex; gap: 6px; flex: none; }
.nk-action-boutons button { height: 30px; padding: 0 11px; font-size: 12.5px; }
.nk-action-etat { font-size: 12px; font-weight: 600; color: var(--signal, #52D1B3); }
.nk-action-etat.refusee { color: var(--ink-2); }

.nk-vide { margin: auto 0; display: flex; flex-direction: column; gap: 12px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; max-width: 520px; }
.nk-vide p { margin: 0; }

.nk-histo { display: flex; flex-direction: column; gap: 2px; max-height: 38vh; overflow-y: auto; padding: 6px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.nk-histo-ligne { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; text-align: left; font-size: 13px; }
.nk-histo-ligne:hover, .nk-histo-ligne.active { background: var(--surface-2); }
.nk-histo-ligne span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nk-histo-date { flex: none; font-size: 11.5px; color: var(--ink-2); }

.nk-composer { align-items: flex-end; }
.nk-composer textarea { flex: 1; border: 0; background: transparent; outline: none; font: inherit; font-size: 13.5px; line-height: 1.45; resize: none; padding: 7px 0; max-height: 160px; color: inherit; }
.nk-composer textarea:disabled { opacity: .6; }

/* iPhone : la barre d'accueil, puis l'écran de discussion en plein écran */
.nk-iphone { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 8px 14px; border-radius: 14px; border: 1px solid var(--border-strong, var(--border)); background: var(--surface); color: var(--ink-2); font-size: 14px; text-align: left; box-shadow: var(--shadow-sm); }
.nk-iphone strong { color: var(--ink); }
.nk-iphone-orb svg { width: 22px; height: 22px; display: block; }
body.iphone-detail .main.chat-mode { padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
body.iphone-detail .nk-chat .nk-retour { display: none; }
body.iphone-detail .nk-msg, body.iphone-detail .nk-chat .msg { max-width: 94%; }
body.iphone-detail .nk-action { flex-direction: column; align-items: stretch; }
body.iphone-detail .nk-action-boutons button { flex: 1; height: 38px; }
body.iphone-detail .nk-composer textarea { font-size: 16px; } /* sous 16 px, Safari zoome sur le champ */
@media (max-width: 700px) {
  .nk-action { flex-direction: column; align-items: stretch; }
  .nk-action-boutons button { flex: 1; height: 38px; }
}
.nk-action-tout { margin-top: 4px; font-size: 12px; color: var(--ink-2); }
.nk-action-tout summary { cursor: pointer; color: var(--accent); }
.nk-action-tout pre { margin: 6px 0 0; max-height: 240px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-family: 'DM Mono', ui-monospace, monospace; font-size: 11.5px; line-height: 1.45; padding: 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); }
