/* Échéancia : fenêtre de l'assistant IA (site public et espace client), couleurs de la charte définies ici. */
.assistant { --a-encre: #15314b; --a-doux: #52657a; --a-fond: #f2f5f7; --a-blanc: #ffffff; --a-trait: #d6dee5;
             --a-trait-fort: #c6d1d9; --a-sarcelle: #0e7a72; --a-sarcelle-fonce: #0a5c56; --a-sarcelle-pale: #e4f1ef;
             --a-ocre: #9a6a12; --a-brique: #a63b2b;
             position: fixed; right: 20px; bottom: 20px; z-index: 50; color: var(--a-encre);
             font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.assistant-bulle { display: flex; align-items: center; gap: 8px; background: var(--a-sarcelle); color: #fff; border: 0;
                   border-radius: 999px; padding: 12px 18px 12px 14px; font: inherit; font-weight: 600; font-size: .98rem;
                   cursor: pointer; box-shadow: 0 10px 28px -12px rgba(21, 49, 75, .6); }
.assistant-bulle:hover { background: var(--a-sarcelle-fonce); }
.assistant-bulle svg { width: 22px; height: 22px; flex-shrink: 0; }
.assistant-fenetre { position: absolute; right: 0; bottom: 0; width: 380px; max-width: calc(100vw - 32px);
                     height: 560px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
                     display: flex; flex-direction: column; background: var(--a-blanc); color: var(--a-encre);
                     border: 1px solid var(--a-trait); border-radius: 14px; overflow: hidden;
                     box-shadow: 0 24px 60px -24px rgba(21, 49, 75, .55); }
.assistant-fenetre[hidden] { display: none; }
.assistant-tete { background: var(--a-encre); color: #fff; padding: 14px 16px 12px; position: relative; }
.assistant-tete h2 { font-family: "Lora", "Iowan Old Style", "Sitka Text", Georgia, serif; font-size: 1.08rem;
                     line-height: 1.3; margin: 0 40px 4px 0; color: #fff; font-weight: 700; }
.assistant-tete p { margin: 0; font-size: .82rem; line-height: 1.45; color: #dbe5ee; }
.assistant-tete a { color: #fff; }
.assistant-fermer { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 8px;
                    background: transparent; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0; }
.assistant-fermer:hover { background: rgba(255, 255, 255, .12); }
.assistant-corps { flex: 1; overflow-y: auto; padding: 14px 14px 6px; background: var(--a-fond); }
.assistant-fil { display: flex; flex-direction: column; gap: 10px; }
.assistant-msg { max-width: 88%; margin: 0; padding: 9px 12px; border-radius: 12px; font-size: .95rem; line-height: 1.5;
                 white-space: pre-line; overflow-wrap: anywhere; }
.assistant-msg.ia { align-self: flex-start; background: var(--a-blanc); border: 1px solid var(--a-trait); border-bottom-left-radius: 4px; }
.assistant-msg.visiteur { align-self: flex-end; background: var(--a-sarcelle); color: #fff; border-bottom-right-radius: 4px; }
.assistant-msg.attente { color: var(--a-doux); font-style: italic; }
.assistant-msg.erreur { align-self: stretch; max-width: none; background: #fbe8e4; color: #8f2f22; border: 0; }
.assistant-suggestions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 12px 0 4px; }
.assistant-suggestions[hidden] { display: none; }
.assistant-suggestions button { background: var(--a-blanc); color: var(--a-sarcelle-fonce); border: 1px solid var(--a-sarcelle);
                                border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .9rem; cursor: pointer; text-align: left; }
.assistant-suggestions button:hover { background: var(--a-sarcelle-pale); }
.assistant-formulaire { background: var(--a-blanc); border: 1px solid var(--a-trait); border-radius: 12px; padding: 12px; margin: 12px 0 8px; }
.assistant-formulaire[hidden] { display: none; }
.assistant-formulaire h3 { font-size: 1rem; line-height: 1.3; margin: 0 0 8px; color: var(--a-encre); font-family: inherit; font-weight: 700; }
.assistant-formulaire .assistant-aide { font-size: .82rem; color: var(--a-doux); margin: 0 0 10px; line-height: 1.45; }
.assistant-champ { margin-bottom: 9px; }
.assistant-champ label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 3px; }
.assistant-champ input, .assistant-champ textarea { width: 100%; padding: 8px 10px; font: inherit; font-size: .95rem; color: var(--a-encre);
                         border: 1px solid var(--a-trait-fort); border-radius: 7px; background: #fff; box-sizing: border-box; }
.assistant-champ textarea { resize: vertical; min-height: 96px; }
.assistant-case { display: flex; gap: 8px; align-items: flex-start; font-size: .84rem; line-height: 1.45; margin: 4px 0 10px; font-weight: 400; }
.assistant-case input { margin-top: 3px; accent-color: var(--a-sarcelle); flex-shrink: 0; }
.assistant-erreur-champ { color: var(--a-brique); font-size: .82rem; margin: 3px 0 0; }
.assistant-erreur-champ:empty { display: none; }
.assistant-pot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.assistant-pied { border-top: 1px solid var(--a-trait); background: var(--a-blanc); }
.assistant-raccourci { display: block; width: 100%; padding: 8px 12px 0; background: none; border: 0; text-align: left;
                       font: inherit; font-size: .86rem; color: var(--a-sarcelle-fonce); text-decoration: underline;
                       text-underline-offset: 2px; cursor: pointer; }
.assistant-saisie { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; margin: 0; }
.assistant-saisie textarea { flex: 1; width: auto; resize: none; min-height: 42px; max-height: 120px; padding: 9px 11px; font: inherit;
                             font-size: .95rem; color: var(--a-encre); border: 1px solid var(--a-trait-fort); border-radius: 8px; box-sizing: border-box; }
.assistant-bouton { display: inline-block; background: var(--a-sarcelle); color: #fff; border: 0; border-radius: 8px;
                    padding: 10px 14px; font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; line-height: 1.3; }
.assistant-bouton:hover { background: var(--a-sarcelle-fonce); }
.assistant-bouton[disabled] { opacity: .6; cursor: wait; }
.assistant button:focus-visible, .assistant a:focus-visible, .assistant input:focus-visible,
.assistant textarea:focus-visible { outline: 3px solid var(--a-ocre); outline-offset: 2px; }
.assistant-masque { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 520px) {
  .assistant { right: 12px; bottom: 12px; }
  .assistant.ouvert { left: 8px; right: 8px; bottom: 8px; top: 8px; }
  .assistant.ouvert .assistant-bulle { display: none; }
  .assistant-fenetre { position: static; width: 100%; max-width: none; height: 100%; max-height: none; }
  .assistant-bulle-texte { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .assistant-bulle { padding: 14px; }
  .assistant-saisie textarea, .assistant-champ input, .assistant-champ textarea { font-size: 1rem; } /* pas de zoom automatique sur iPhone */
}
@media print { .assistant { display: none; } }
