/* Chatbot Adirexia : charte du site (marine, bleu ciel, angles droits, cadres de 1 px) */
.adx-chat { position: fixed; right: 1rem; bottom: 1rem; z-index: 1040; font-family: var(--sans); }
.adx-chat-toggle { display: flex; align-items: center; gap: .5rem; min-height: 52px; padding: 0 1.1rem;
  background: var(--navy); color: #fff; border: 1px solid var(--navy); outline: 1px solid var(--sky); outline-offset: 2px;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.adx-chat-toggle i { font-size: 1.25rem; }
.adx-chat-toggle:hover, .adx-chat-toggle:focus-visible { background: var(--navy-2); }
.adx-chat.is-open .adx-chat-toggle { display: none; }

.adx-chat-panel { width: min(400px, calc(100vw - 2rem)); height: min(600px, calc(100vh - 2rem)); height: min(600px, calc(100dvh - 2rem));
  display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--navy); border-bottom: 4px solid var(--sky); }
.adx-chat-panel[hidden] { display: none; }
.adx-chat-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  background: var(--navy); color: #fff; padding: .8rem 1rem; }
.adx-chat-kicker { color: var(--gold); font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.adx-chat-title { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; line-height: 1.2; }
.adx-chat-close { background: transparent; border: 1px solid rgba(255,255,255,.6); color: #fff; width: 44px; height: 44px; }
.adx-chat-close:hover { background: var(--navy-2); }

.adx-chat-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--navy); }
.adx-chat-tabs button { min-height: 44px; background: var(--paper); color: var(--navy); border: 0; font-weight: 600; font-size: .82rem; }
.adx-chat-tabs button + button { border-left: 1px solid var(--navy); }
.adx-chat-tabs button[aria-selected="true"] { background: var(--sky-soft); box-shadow: inset 0 -3px 0 var(--sky); }

.adx-chat-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; background: var(--ivory); }
.adx-chat-msg { max-width: 88%; padding: .6rem .8rem; font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; }
.adx-chat-msg.is-user { align-self: flex-end; background: var(--navy); color: #fff; }
.adx-chat-msg.is-bot { align-self: flex-start; background: var(--paper); color: var(--ink); border: 1px solid var(--navy); }
.adx-chat-msg.is-error { align-self: stretch; max-width: none; background: var(--paper); color: var(--ink); border: 1px dashed var(--navy); }
.adx-chat-msg p { margin: 0 0 .5rem; } .adx-chat-msg p:last-child { margin: 0; }
.adx-chat-msg ul { margin: 0 0 .5rem; padding-left: 1.1rem; } .adx-chat-msg ul:last-child { margin: 0; }
.adx-chat-msg strong { font-weight: 600; }
.adx-chat-msg a { color: inherit; text-decoration: underline; }
.adx-chat-hello { color: var(--muted); font-size: .88rem; }
.adx-chat-hello b { color: var(--navy); }
.adx-chat-suggest { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.adx-chat-suggest button { background: var(--paper); border: 1px solid var(--navy); color: var(--navy); font-size: .8rem; padding: .35rem .6rem; min-height: 36px; text-align: left; }
.adx-chat-suggest button:hover { background: var(--sky-soft); }
.adx-chat-typing { align-self: flex-start; display: flex; gap: .3rem; padding: .7rem .8rem; border: 1px solid var(--navy); background: var(--paper); }
.adx-chat-typing i { width: 7px; height: 7px; background: var(--navy); animation: adx-chat-dot 1s infinite ease-in-out; }
.adx-chat-typing i:nth-child(2) { animation-delay: .15s; } .adx-chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes adx-chat-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.adx-chat-form { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--navy); background: var(--paper); }
.adx-chat-form textarea { flex: 1; resize: none; border: 1px solid var(--navy); padding: .5rem .6rem; font-size: 16px; min-height: 44px; max-height: 140px; }
.adx-chat-form textarea:focus { outline: 2px solid var(--sky); outline-offset: 0; }
.adx-chat-send { width: 48px; min-height: 44px; background: var(--navy); color: #fff; border: 1px solid var(--navy); font-size: 1.1rem; }
.adx-chat-send:disabled { opacity: .5; }
.adx-chat-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: 0 .8rem .6rem;
  font-size: .72rem; color: var(--muted); background: var(--paper); }
.adx-chat-clear { background: transparent; border: 0; color: var(--navy); text-decoration: underline; font-size: .75rem; padding: .3rem; }

.adx-chat-locked { padding: 1.4rem 1.2rem; text-align: center; overflow-y: auto; }
.adx-chat-locked > i { font-size: 1.8rem; color: var(--navy); }
.adx-chat-locked p { margin: .6rem 0; }

@media (max-width: 575.98px) {
  .adx-chat { right: .75rem; bottom: .75rem; }
  .adx-chat-toggle span { display: none; }
  .adx-chat-toggle { width: 56px; justify-content: center; padding: 0; }
  .adx-chat.is-open { inset: 0; }
  .adx-chat.is-open .adx-chat-panel { width: 100vw; height: 100vh; height: 100dvh; border: 0; }
}
@media (prefers-reduced-motion: reduce) { .adx-chat-typing i { animation: none; opacity: .6; } }
@media print { .adx-chat { display: none; } }
.adx-chat-panel:has(.adx-chat-locked) { height: auto; max-height: calc(100vh - 2rem); }
