/* Vue « Conseiller » (chat IA) — classes préfixées ad- */
.ad-col { max-width: 760px; margin: 0 auto; padding: 10px 12px 0; }

.ad-head { display: grid; gap: 8px; margin-bottom: 12px; }
.ad-hint { margin: 0; font-size: .82rem; color: var(--muted); }
.ad-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ad-modes { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.ad-modes button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; min-height: 32px; cursor: pointer; }
.ad-modes button[aria-checked="true"] { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.ad-clear { color: var(--muted); font-weight: 600; }
.ad-clear[hidden] { display: none; }

/* Messages */
.ad-list { display: grid; gap: 14px; }
.ad-msg { display: grid; gap: 4px; max-width: 88%; scroll-margin-top: 80px; }
@media (min-width: 900px) { .ad-msg { scroll-margin-top: 130px; } }
.ad-user { justify-self: end; justify-items: end; }
.ad-ai { justify-self: start; justify-items: start; }
.ad-bubble { padding: 10px 14px; border-radius: 18px; line-height: 1.5; overflow-wrap: anywhere; }
.ad-user .ad-bubble { background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 6px; }
.ad-ai .ad-bubble { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 6px; box-shadow: var(--shadow); }
.ad-ai .ad-bubble > :first-child { margin-top: 0; }
.ad-ai .ad-bubble > :last-child { margin-bottom: 0; }
.ad-tag { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--gold); padding: 0 6px; }

.ad-acts { display: flex; gap: 2px; flex-wrap: wrap; }
.ad-act { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 600; padding: 4px 8px; border-radius: 8px; min-height: 30px; cursor: pointer; }
.ad-act:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.ad-act:disabled { color: var(--good); cursor: default; }

/* Indicateur « réfléchit » */
.ad-thinking .ad-bubble { color: var(--muted); font-style: italic; display: flex; align-items: center; gap: 10px; }
.ad-dots { display: inline-flex; gap: 4px; }
.ad-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: ad-bounce 1.2s infinite ease-in-out; }
.ad-dots i:nth-child(2) { animation-delay: .15s; }
.ad-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ad-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-5px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ad-dots i { animation: none; opacity: .8; } }

/* Historique vide */
.ad-empty { text-align: center; padding: 22px 16px; }
.ad-empty-icon { font-size: 2.6rem; }
.ad-empty h2 { margin: 4px 0 6px; }
.ad-empty-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.ad-empty-chips .chip, .ad-sugg .chip { font: inherit; font-size: .85rem; font-weight: 600; color: var(--ink); padding: 7px 12px; text-align: left; }
.ad-empty-chips .chip:hover, .ad-sugg .chip:hover { border-color: var(--gold); }

/* Zone de saisie collée en bas (au-dessus de la barre d'onglets sur téléphone ; bottom ajusté en JS) */
.ad-composer { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 15;
  background: var(--bg); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .ad-composer { bottom: 0; padding-bottom: env(safe-area-inset-bottom); } }
.ad-composer-in { max-width: 760px; margin: 0 auto; padding: 8px 12px; display: grid; gap: 8px; }
.ad-sugg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
.ad-sugg::-webkit-scrollbar { display: none; }
.ad-sugg[hidden] { display: none; }
.ad-sugg .chip { flex: none; white-space: nowrap; padding: 5px 11px; font-size: .8rem; }
.ad-inputrow { display: flex; gap: 8px; align-items: flex-end; }
.ad-inputrow textarea { flex: 1; min-height: 44px; max-height: 180px; resize: none; border-radius: 22px; padding: 10px 16px; overflow-y: auto; }
.ad-send { flex: none; width: 44px; min-width: 44px; padding: 0; border-radius: 50%; font-size: 1.1rem; }
.ad-send:disabled { opacity: .5; }
