/* Assistant du centre d'aide (assistant-aide.js). Bulle flottante AU MÊME FORMAT que la messagerie du site (messagerie.css,
   .tdm / .tdm-fab, décision d'Olivier du 25/10) : ordinateur = barre sombre de 360 px en bas à droite, ouverte vers le haut ;
   sous 768 px = bouton rond de 56 px et panneau plein écran. Icône : bulle + point d'interrogation (pas l'enveloppe).
   Messagerie aussi présente (.asst-avec-tdm) : à sa gauche sur ordinateur, au-dessus sur téléphone. Charte « Corde ».
   Aucun style en ligne (CSP stricte). */
.asst-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------------------------------------------------------------- bulle : ordinateur (barre en bas à droite, comme .tdm) */
.asst { position: fixed; z-index: 66; right: 24px; bottom: 0; width: 360px; display: flex; flex-direction: column;
  font: 400 14.5px/1.4 var(--f-text, Inter, Arial, sans-serif); color: var(--ink, #161a1d); }
.asst.asst-avec-tdm { right: calc(24px + 360px + 12px); }
.asst-fab { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 12px 0 16px; border: 0;
  border-radius: var(--radius, 12px) var(--radius, 12px) 0 0; background: var(--ink, #161a1d); color: #fff; font: 700 14.5px/1 var(--f-text, Inter, sans-serif);
  text-align: left; cursor: pointer; box-shadow: 0 -4px 18px rgba(22, 26, 29, .09); }
.asst-fab:hover { background: var(--navy-2, #2a3036); }
.asst-fab:focus-visible { outline: 3px solid var(--red, #f04432); outline-offset: 2px; }
.asst-fab > .asst-ico { width: 20px; height: 20px; }
.asst-fab-t { white-space: nowrap; }
.asst-chev { width: 18px; height: 18px; margin-left: auto; transform: rotate(180deg); transition: transform .25s var(--ease, ease); }
.asst[data-ouvert=true] .asst-chev { transform: none; }

.asst-pan { display: flex; flex-direction: column; height: min(560px, calc(100dvh - 150px)); min-height: 300px; background: #fff;
  border: 1px solid var(--rule-strong, #c9cfd4); border-top: 0; border-bottom: 0; box-shadow: 0 10px 28px rgba(22, 26, 29, .09); overflow: hidden; }
.asst-pan[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .asst[data-ouvert=true] .asst-pan { animation: asst-ouvre .32s var(--ease, ease); }
}
@keyframes asst-ouvre { from { opacity: 0; transform: translateY(14px); clip-path: inset(0 0 30% 0); } }
body.aide-page::after { content: ""; display: block; height: 56px; }   /* la barre ne cache pas le bas de la page */

.asst-h { display: none; align-items: center; gap: 8px; min-height: 56px; padding: 6px 6px 6px 18px; border-bottom: 1px solid var(--rule, #dfe3e6); }
.asst-t { flex: 1; margin: 0; font: 800 17px/1.25 var(--f-display, Manrope, Inter, sans-serif); letter-spacing: -.01em; }
.asst-t:focus { outline: none; }
.asst-x { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius-sm, 8px);
  background: none; color: var(--ink, #161a1d); cursor: pointer; }
.asst-x:hover { background: var(--paper-2, #edf0f2); }
.asst-x:focus-visible, .asst-lien:focus-visible, .asst-fil:focus-visible { outline: 2px solid var(--red-deep, #d92d20); outline-offset: 2px; }

.asst-fil { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; gap: 12px;
  background: var(--paper, #f6f7f8); }
.asst-msg { max-width: 92%; padding: 10px 14px; border-radius: var(--radius, 12px); overflow-wrap: anywhere; }
.asst-msg p { margin: 0; }
.asst-msg p + p, .asst-reponse p + p { margin-top: 6px; }
.asst-bot { align-self: flex-start; background: #fff; border: 1px solid var(--rule, #dfe3e6); }
.asst-moi { align-self: flex-end; background: var(--ink, #161a1d); color: #fff; }
.asst-qui { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.asst-attente .asst-txt { color: var(--ink-3, #646b75); }
.asst-ko { border-color: var(--danger, #b42318); }
.asst-mention { margin-top: 8px !important; padding-top: 8px; border-top: 1px dashed var(--rule-strong, #c9cfd4); color: var(--ink-3, #646b75); font-size: 13px; }
.asst-st { margin-top: 10px !important; color: var(--ink-3, #646b75); font: 700 12px/1.3 var(--f-text, Inter, sans-serif); text-transform: uppercase; letter-spacing: .04em; }

.asst-liens { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.asst-lien { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; align-items: start; padding: 8px 10px;
  border: 1px solid var(--rule, #dfe3e6); border-radius: var(--radius-sm, 8px); color: var(--ink, #161a1d); text-decoration: none; }
.asst-lien:hover { border-color: var(--rule-strong, #c9cfd4); background: var(--paper, #f6f7f8); }
.asst-lien .asst-ico { width: 18px; height: 18px; margin-top: 1px; color: var(--red-deep, #d92d20); }
.asst-lien-t { font-weight: 600; text-decoration: underline; text-decoration-color: var(--rule-strong, #c9cfd4); text-underline-offset: 3px; }
.asst-lien-s { grid-column: 2; color: var(--ink-3, #646b75); font-size: 13px; }

.asst-sup { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule, #dfe3e6); }
.asst-case { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-2, #3e454d); font-size: 13.5px; cursor: pointer; }
.asst-case input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--red-deep, #d92d20); }
.asst-ecrire { justify-self: start; display: inline-flex; align-items: center; gap: 8px; }
.asst-coachs { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; }   /* 26/10 : « Découvrir les coachs » (question de pilotage) */

.asst-form { display: grid; gap: 6px; padding: 12px 16px 14px; border-top: 1px solid var(--rule, #dfe3e6); background: #fff; }
.asst-l { font: 600 14px var(--f-text, Inter, sans-serif); }
.asst-q { width: 100%; min-height: 64px; max-height: 160px; padding: 10px 12px; border: 1px solid var(--rule-strong, #c9cfd4);
  border-radius: var(--radius-sm, 8px); font: 400 16px/1.4 var(--f-text, Inter, sans-serif); color: var(--ink, #161a1d); resize: vertical; box-sizing: border-box; }
.asst-q:focus { outline: none; border-color: var(--ink, #161a1d); box-shadow: var(--focus, 0 0 0 3px rgba(217, 45, 32, .24)); }
.asst-pied { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.asst-compte { color: var(--ink-3, #646b75); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.asst-envoyer { display: inline-flex; align-items: center; gap: 8px; }
.asst-err { margin: 0; color: var(--danger, #b42318); font-size: 13.5px; }
.asst-err:empty { display: none; }
.asst-note { margin: 0; color: var(--ink-3, #646b75); font-size: 12.5px; }
.asst-deja .asst-note { display: none; }

/* Invitations (montrées par assistant-aide.js) : accueil, sous la recherche ; fin d'article, de catégorie et recherche sans
   résultat : bloc discret */
.aide-asst-invite { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; color: var(--ink-3, #646b75); font-size: 14px; }
.aide-asst-invite[hidden], .aide-asst-bloc[hidden] { display: none; }
.aide-asst-bloc { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 28px 0 0;
  padding: 14px 16px; border: 1px solid var(--rule, #dfe3e6); border-radius: var(--radius, 12px); background: #fff; }
.aide-asst-bloc p { margin: 0; color: var(--ink-2, #3e454d); font-weight: 600; }
.aide-vide .aide-asst-bloc { margin-top: 16px; text-align: left; }

/* ---------------------------------------------------------------- téléphone : rond de 56 px, panneau plein écran (comme .tdm) */
@media (max-width: 767px) {
  .asst { right: 16px; bottom: 12px; width: auto; }
  .asst.asst-avec-tdm { right: 16px; bottom: calc(12px + 56px + 12px); }
  .asst-fab { position: relative; justify-content: center; width: 56px; height: 56px; min-height: 0; padding: 0; border-radius: 50%;
    box-shadow: 0 6px 20px rgba(22, 26, 29, .09); }
  .asst-fab > .asst-ico { width: 24px; height: 24px; }
  .asst-fab-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .asst-chev { display: none; }
  .asst[data-ouvert=true] { top: 0; left: 0; right: 0; bottom: 0; width: auto; z-index: 1000; }
  .asst[data-ouvert=true] .asst-fab { display: none; }
  .asst[data-ouvert=true] .asst-pan { flex: 1; height: auto; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
  .asst-h { display: flex; }
  .aide-asst-bloc .btn { width: 100%; justify-content: center; }
  .asst-fil { padding: 14px 16px; }
  .asst-form { padding: 10px 16px 12px; }
  .asst-q { min-height: 48px; }
  .asst-msg { max-width: 100%; }
  body.aide-page::after { height: 80px; }
}
@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  .asst[data-ouvert=true] .asst-pan { animation: asst-plein .28s var(--ease, ease); }
}
@keyframes asst-plein { from { opacity: 0; transform: translateY(24px); } }
html.asst-verrou, html.asst-verrou body { overflow: hidden; }
@media print { .asst, .aide-asst-bloc, .aide-asst-invite { display: none !important; } }
