/* ═══════════════════════════════════════════════════════════════
   Centre d'Aide donna — styles
   Inspiré du mockup Margot (donna__12_) — adapté aux tokens donna
   (light / dark / warm / noir / ardoise) via les variables existantes.
   ═══════════════════════════════════════════════════════════════ */

#page-aide {
  /* [v1024] margin-top:-32px RETIRÉ : compensait un padding-top:32px du
     .shellv2-main qui n'existe plus depuis v963 (page-header.css override avec
     padding-top:0). Cf CSS_HIERARCHY.md §2.1. Le padding 8/24/40 est gardé
     en attendant un audit séparé. */
  padding: 8px 24px 40px;
}

/* [#aide-fullwidth] Sur page aide, override le max-width 1560px du shellv2-root
   (défini dans shell-v2.css l42) pour prendre toute la largeur de l'écran sur
   grand moniteur. La toggle class est ajoutée par ca.js switchPage. */
body.page-aide-active.shell-v2-on .shellv2-root {
  max-width: none !important;
}

/* ─── Tabs en haut ─── */

.aide-tab .pill {
  background: var(--s2);
  color: var(--muted);
  border-radius: 99px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.aide-tab[data-active="true"] .pill {
  background: var(--text);
  color: var(--bg);
}

/* Bouton "Nouveau ticket" en bout de barre */

/* ═══════════════════ HOME ═══════════════════ */

/* ─── Hero ─── */
.aide-hero {
  text-align: center;
  padding: 24px 0 24px;
}
.aide-hero-eyebrow {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
}
.aide-hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 36px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text);
  margin: 0 0 14px;
}
.aide-hero-title .grad {
  background: linear-gradient(135deg, var(--accent) 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.aide-hero-sub {
  font-size: 14px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.5;
}

/* ─── Search box ─── */
.aide-hero-search { max-width: 720px; margin: 0 auto; position: relative; }
.aide-search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color .15s, box-shadow .15s;
  position: relative;
  z-index: 2;
}
.aide-search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}
.aide-search-box svg { color: var(--muted); flex-shrink: 0; }
.aide-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  min-width: 0;
}
.aide-search-box input::placeholder { color: var(--muted); }
.aide-search-box kbd {
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 11px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

/* Chips suggestions sous la search */
.aide-hero-suggest {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
  margin-top: 16px;
  align-items: center;
}
.aide-hero-suggest .label {
  font-size: 12px;
  color: var(--muted);
  margin-right: 4px;
}
.aide-hero-chip {
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color .15s;
}
.aide-hero-chip:hover { border-color: var(--accent); }

/* ─── Panneau de résultats live (>3 chars) ─── */
.aide-results-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.12);
  padding: 14px;
  z-index: 3;
  max-height: 70vh;
  overflow-y: auto;
  animation: aidePanelIn .18s ease-out;
}
@keyframes aidePanelIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.aide-results-section {
  margin-bottom: 14px;
}
.aide-results-section:last-child { margin-bottom: 0; }

/* TL;DR section (IA generated) */
.aide-tldr-section {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.aide-tldr-h {
  display: flex; align-items: center; gap: 7px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.aide-tldr-pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: aideTldrPulse 1.6s infinite;
}
@keyframes aideTldrPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.aide-tldr-meta {
  font-weight: 500;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-size: 10.5px;
}
.aide-tldr-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
}
.aide-tldr-cite {
  display: inline-block;
  cursor: help;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85em;
  margin: 0 1px;
}
.aide-tldr-cites {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}
.aide-tldr-cite-chip {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 99px;
  padding: 3px 9px;
  font-size: 11px;
  color: var(--text);
}
.aide-tldr-cite-chip sup {
  color: var(--accent);
  font-weight: 700;
  margin-right: 3px;
}
.aide-tldr-loader {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

/* Loader rail ticket suggestions */
.aide-tk-rail-related-loading {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 0;
}
.aide-results-h {
  font-size: 10.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0 4px;
}
.aide-results-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s;
  text-align: left;
  width: 100%;
  font-family: inherit;
  color: inherit;
}
.aide-results-row:hover { background: var(--s2); }
.aide-results-row .left { flex: 1; min-width: 0; }
.aide-results-row .t {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aide-results-row .t mark {
  background: color-mix(in srgb, var(--accent) 25%, transparent);
  color: var(--text);
  padding: 0;
  border-radius: 2px;
}
.aide-results-row .m {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.aide-results-row .arrow { color: var(--muted); flex-shrink: 0; }
.aide-results-empty {
  text-align: center; padding: 24px; color: var(--muted); font-size: 13px;
}
.aide-results-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px;
  color: var(--muted);
}
.aide-results-footer button {
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 7px;
  padding: 6px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.aide-results-footer button:hover { background: var(--text-dim, var(--text)); }

/* ─── Cards catégories ─── */
.aide-section-h {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 40px 0 16px;
  letter-spacing: -0.2px;
}
.aide-cats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
/* [#aide-fullwidth] Grand écran : 4 colonnes de catégories pour exploiter
   la largeur sans avoir des cards immenses. */
@media (min-width: 1400px) {
  .aide-cats-grid { grid-template-columns: repeat(4, 1fr); }
  .aide-top-list { grid-template-columns: repeat(3, 1fr); }
}
.aide-cat-card {
  background: var(--surface);
  /* [#card-borders v603] color-mix sur var(--text) → bordure adaptative */
  border: 1px solid color-mix(in srgb, var(--text) 30%, transparent);
  border-radius: 12px;
  padding: 18px 18px 16px;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  width: 100%;
  font-family: inherit;
  color: inherit;
}
.aide-cat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
}
.aide-cat-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-bottom: 4px;
}
.aide-cat-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.1px;
}
.aide-cat-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
  flex: 1;
}
.aide-cat-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted);
}
.aide-cat-count {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ─── Top articles ─── */
/* ─── Top articles : grille 2 colonnes ─── */
.aide-top-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.aide-top-row {
  display: flex !important;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  border-radius: 11px;
  cursor: pointer;
  transition: border-color .15s, transform .12s;
  width: 100% !important;
  text-align: left;
  font-family: inherit;
  color: inherit;
  box-sizing: border-box;
}
.aide-top-row:hover {
  border-color: var(--accent) !important;
  transform: translateY(-1px);
}
@media (max-width: 720px) {
  .aide-top-list { grid-template-columns: 1fr; }
}
.aide-top-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 1px;
  width: 28px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.aide-top-info { flex: 1; min-width: 0; }
.aide-top-t {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aide-top-m {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.aide-top-arrow { color: var(--muted); flex-shrink: 0; }

/* ─── CTA bas de page ─── */
.aide-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-top: 40px;
  display: flex; align-items: center; gap: 18px;
}

/* ─── CTA Card prominente — v598 ───
   Card cliquable avec gradient accent, layout horizontal desktop / vertical
   mobile. Toute la card est un <button>, hover effect = scale + border accent. */
.aide-cta-card {
  display: flex; align-items: center; gap: 18px;
  width: 100%;
  margin-top: 48px;
  padding: 24px 24px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 8%, var(--surface)),
    color-mix(in srgb, var(--accent) 3%, var(--surface))
  );
  /* [#card-borders v603] border accent renforcé : 22% → 38% pour mieux ressortir
     sur tous les thèmes, surtout noir où l'accent purple sur fond noir était
     visuellement faible. */
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-radius: 16px;
  cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  font-family: inherit;
  text-align: left;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.aide-cta-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 12%, transparent);
}
.aide-cta-card:active { transform: translateY(0); }
.aide-cta-card-icon {
  width: 52px; height: 52px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.aide-cta-card-body { flex: 1; min-width: 0; }
.aide-cta-card-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--accent);
  margin-bottom: 6px;
}
.aide-cta-card-h {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.2px;
  margin-bottom: 4px;
}
.aide-cta-card-sub {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}
.aide-cta-card-arrow {
  flex-shrink: 0;
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.aide-cta-card:hover .aide-cta-card-arrow { transform: translateX(3px); }
@media (max-width: 640px) {
  .aide-cta-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 22px 20px;
  }
  .aide-cta-card-arrow { display: none; }
}

/* ─── Tab "Mes tickets" ─── */
.aide-tickets-list {
  display: flex; flex-direction: column; gap: 10px;
}
.aide-ticket-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .15s, transform .12s;
  display: flex !important;
  align-items: center;
  gap: 14px;
  width: 100% !important;
  text-align: left;
  font-family: inherit;
  color: inherit;
  box-sizing: border-box;
}
.aide-ticket-card:hover {
  border-color: var(--accent);
  transform: translateX(2px);
}
.aide-ticket-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  width: 50px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.aide-ticket-info { flex: 1; min-width: 0; }
.aide-ticket-subj {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aide-ticket-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}
.aide-ticket-status {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.aide-ticket-status[data-status="open"]      { background: rgba(192,138,46,.15); color: #c08a2e; }
.aide-ticket-status[data-status="in_progress"]{ background: rgba(61,127,194,.15); color: #3d7fc2; }
.aide-ticket-status[data-status="resolved"]  { background: rgba(34,160,107,.15); color: #22a06b; }
.aide-ticket-status .dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.aide-ticket-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.aide-ticket-empty-icon { opacity: .3; margin-bottom: 12px; }
.aide-ticket-empty-cta {
  margin-top: 18px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 9px;
  padding: 10px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ═══════════════════ ARTICLE VIEW ═══════════════════ */

.aide-article-grid {
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  gap: 32px;
  align-items: start;
}

/* Breadcrumb */

.aide-crumb-search {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: all .12s;
}
.aide-crumb-search:hover { border-color: var(--accent); color: var(--text); }

/* Sidebar TOC */
/* [v1200] Anthony "rajoute padding au dessus de la colonne de droite et
   gauche sinon c'est croppé par le nouveau header (comme on a fait pour
   les colonnes sur fiche bien et fiche client)". Pattern aligné sur
   bien-page-v2.css L226 : top: 60px (header sticky ~52px + respiration).
   La sidebar TOC + nav catégories était cropped sous le .ph quand on
   scrollait dans un article long. */
.aide-art-side {
  position: sticky;
  top: 60px;
  display: flex; flex-direction: column; gap: 24px;
  font-size: 13px;
}
.aide-art-side-h {
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.aide-art-toc {
  display: flex; flex-direction: column; gap: 4px;
}
.aide-art-toc a {
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  padding: 5px 0;
  font-size: 12.5px;
  transition: color .12s;
  line-height: 1.4;
}
.aide-art-toc a.sub {
  padding-left: 14px;
  font-size: 12px;
}
.aide-art-toc a:hover { color: var(--text); }
.aide-art-toc a[data-active="true"] {
  color: var(--accent);
  font-weight: 600;
}

/* Body de l'article */
.aide-art-body {
  max-width: 700px;
  min-width: 0;
}
.aide-art-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}
.aide-art-meta .cat-pill {
  background: var(--s2);
  color: var(--text);
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
}
.aide-art-h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.4px;
  color: var(--text);
  margin: 0 0 14px;
}
.aide-art-lede {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 22px;
}
.aide-art-byline {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  font-size: 12.5px;
  color: var(--muted);
}
.aide-art-byline-av {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.aide-art-byline-name {
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}
.aide-art-byline-role { font-size: 11.5px; }
.aide-art-byline-spacer { flex: 1; }
.aide-art-byline-dur {
  display: inline-flex; align-items: center; gap: 5px;
}

/* Markdown rendu */
.aide-art-md { color: var(--text); line-height: 1.65; font-size: 14.5px; }
.aide-art-md h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin: 32px 0 14px;
  color: var(--text);
  scroll-margin-top: 24px;
}
.aide-art-md h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin: 22px 0 10px;
  color: var(--text);
  scroll-margin-top: 24px;
}
.aide-art-md p { margin: 0 0 14px; }
.aide-art-md ul, .aide-art-md ol {
  margin: 0 0 14px; padding-left: 22px;
}
.aide-art-md li { margin-bottom: 6px; }
.aide-art-md code {
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--text);
}
.aide-art-md pre {
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 16px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text);
  position: relative;
}
.aide-art-md pre code { background: none; border: none; padding: 0; }
.aide-art-md a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.aide-art-md strong { color: var(--text); font-weight: 600; }
.aide-art-md em { color: var(--text); font-style: italic; }

/* Callouts (blockquotes stylés) */
.aide-art-md blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-radius: 0 8px 8px 0;
  font-size: 13.5px;
  line-height: 1.55;
}
.aide-art-md blockquote p:last-child { margin-bottom: 0; }
.aide-art-md blockquote.tip {
  border-left-color: #22a06b;
  background: color-mix(in srgb, #22a06b 7%, transparent);
}
.aide-art-md blockquote.warn {
  border-left-color: #c08a2e;
  background: color-mix(in srgb, #c08a2e 7%, transparent);
}

/* Footer feedback */
.aide-art-foot {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.aide-feedback {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
}
.aide-feedback-body { flex: 1; min-width: 240px; }
.aide-feedback h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}
.aide-feedback p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
}
.aide-feedback-actions {
  display: flex; gap: 8px; flex-shrink: 0;
}
.aide-feedback-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .12s;
}
.aide-feedback-btn:hover { border-color: var(--accent); }
.aide-feedback-btn.ask {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.aide-feedback-btn.ask:hover { opacity: .85; }
.aide-feedback-btn[data-active="true"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Articles "À lire aussi" */
.aide-art-related {
  margin-top: 32px;
}
.aide-art-related h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.1px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.aide-art-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.aide-art-related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color .12s, transform .12s;
}
.aide-art-related-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.aide-art-related-t {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 6px;
}
.aide-art-related-m {
  font-size: 11px;
  color: var(--muted);
}

/* Rail droit article */
/* [v1200] Idem .aide-art-side : top: 60px pour pas être cropped par le .ph */
.aide-art-rail {
  position: sticky;
  top: 60px;
  display: flex; flex-direction: column; gap: 14px;
}
.aide-art-rail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 16px;
}
.aide-art-rail-card h5 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
.aide-art-rail-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.aide-art-rail-stat {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.aide-art-rail-stat-l {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 3px;
  font-weight: 500;
}
.aide-art-rail-cta {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 11px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: background .15s;
  width: 100%;
  font-family: 'Inter', sans-serif;
}
.aide-art-rail-cta:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.aide-art-rail-cta-h {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.aide-art-rail-cta-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 10px;
}
.aide-art-rail-cta-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 7px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* ═══════════════════ CATEGORY VIEW ═══════════════════ */

.aide-cat-header {
  display: flex; align-items: flex-start; gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 24px;
}
.aide-cat-header-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.aide-cat-header-icon svg { width: 24px; height: 24px; }
.aide-cat-header-info { flex: 1; min-width: 0; }
.aide-cat-header-t {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  margin: 0 0 6px;
  line-height: 1.2;
}
.aide-cat-header-d {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 8px;
}
.aide-cat-header-m {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ═══════════════════ TICKET VIEW (Margot) ═══════════════════ */

.aide-tk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
  margin-top: 12px;
}

/* Header card */
.aide-tk-head {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 26px;
  margin-bottom: 18px;
}
.aide-tk-head-top {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.aide-tk-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.aide-tk-status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.aide-tk-status-pill[data-status="open"]      { background: rgba(192,138,46,.15); color: #c08a2e; }
.aide-tk-status-pill[data-status="in_progress"]{ background: rgba(61,127,194,.15); color: #3d7fc2; }
.aide-tk-status-pill[data-status="resolved"]  { background: rgba(34,160,107,.15); color: #22a06b; }
.aide-tk-status-pill .dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.aide-tk-head-actions {
  margin-left: auto;
  display: flex; gap: 8px; align-items: center;
}
.aide-tk-action-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 11px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  transition: border-color .12s;
}
.aide-tk-action-btn:hover { border-color: var(--accent); }
.aide-tk-action-btn.menu {
  width: 30px; padding: 6px 0; justify-content: center;
}

/* Dropdown menu actions ticket */
.aide-tk-dropdown {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  display: flex;
  flex-direction: column;
  gap: 1px;
  animation: aideTkDropIn .15s ease-out;
}
@keyframes aideTkDropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.aide-tk-dropdown-item {
  background: transparent;
  border: none;
  padding: 9px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  transition: background .12s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.aide-tk-dropdown-item:hover { background: var(--s2); }
.aide-tk-dropdown-item.danger { color: var(--chaud, #d64560); }
.aide-tk-dropdown-item.danger:hover { background: color-mix(in srgb, var(--chaud, #d64560) 8%, transparent); }
.aide-tk-dropdown-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.aide-tk-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  margin: 4px 0 6px;
  line-height: 1.25;
}
.aide-tk-meta {
  display: flex; gap: 8px; align-items: center;
  font-size: 12px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-wrap: wrap;
}
.aide-tk-meta .sep { opacity: .5; }
.aide-tk-meta-pill {
  background: var(--s2);
  border-radius: 99px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
}
.aide-tk-meta-pill[data-prio="urgent"] { background: rgba(214,69,96,.15); color: #d64560; }
.aide-tk-meta-pill[data-prio="high"]   { background: rgba(192,138,46,.15); color: #c08a2e; }
.aide-tk-meta-pill[data-prio="normal"] { background: rgba(61,127,194,.15); color: #3d7fc2; }
.aide-tk-meta-pill[data-prio="low"]    { background: var(--s2); color: var(--muted); }
.aide-tk-meta-pill[data-cat]           { background: var(--s2); color: var(--text); }

/* Conversation thread */
.aide-tk-thread {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 30px;
}
.aide-tk-day-sep {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin: 0 0 22px;
  position: relative;
}
.aide-tk-day-sep::before, .aide-tk-day-sep::after {
  content: ''; position: absolute; top: 50%;
  width: 32%; height: 1px; background: var(--border);
}
.aide-tk-day-sep::before { left: 0; }
.aide-tk-day-sep::after { right: 0; }

.aide-tk-msg {
  display: flex; gap: 14px;
  margin-bottom: 22px;
}
.aide-tk-msg:last-child { margin-bottom: 0; }
.aide-tk-msg-av {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.aide-tk-msg-av[data-from="user"]    { background: #6b5cf5; }
.aide-tk-msg-av[data-from="ai"]      { background: linear-gradient(135deg, #6b5cf5, #a78bfa); }
.aide-tk-msg-av[data-from="support"] { background: #14161f; }
.aide-tk-msg-body { flex: 1; min-width: 0; }
.aide-tk-msg-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.aide-tk-msg-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.aide-tk-msg-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}
.aide-tk-msg-tag[data-tag="ai"]      { background: color-mix(in srgb, #6b5cf5 14%, transparent); color: #6b5cf5; }
.aide-tk-msg-tag[data-tag="support"] { background: var(--s2); color: var(--text); }
.aide-tk-msg-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.aide-tk-msg-content {
  background: var(--s2);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
}
.aide-tk-msg[data-from="user"] .aide-tk-msg-content {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.aide-tk-msg[data-from="ai"] .aide-tk-msg-content {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.aide-tk-msg-content p { margin: 0 0 8px; }
.aide-tk-msg-content p:last-child { margin: 0; }

/* Composer */
.aide-tk-composer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px 14px;
  margin-top: 18px;
}
.aide-tk-composer-toolbar {
  display: flex; gap: 4px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  align-items: center;
}
.aide-tk-composer-toolbar .spacer { flex: 1; }
.aide-tk-composer-tool {
  background: transparent;
  border: none;
  color: var(--muted);
  width: 28px; height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s;
}
.aide-tk-composer-tool:hover {
  background: var(--s2);
  color: var(--text);
}
.aide-tk-composer-hint {
  font-size: 11.5px;
  color: var(--muted);
  font-style: italic;
}

/* Rail status pill + prio pill */
.aide-tk-rail-status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  font-family: 'Inter', sans-serif;
}
.aide-tk-rail-status-pill[data-status="open"]      { background: rgba(192,138,46,.15); color: #c08a2e; }
.aide-tk-rail-status-pill[data-status="in_progress"]{ background: rgba(61,127,194,.15); color: #3d7fc2; }
.aide-tk-rail-status-pill[data-status="resolved"]  { background: rgba(34,160,107,.15); color: #22a06b; }
.aide-tk-rail-status-pill .dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.aide-tk-rail-detail-prio {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
  font-family: 'Inter', sans-serif;
}
.aide-tk-rail-detail-prio[data-prio="urgent"] { background: rgba(214,69,96,.15); color: #d64560; }
.aide-tk-rail-detail-prio[data-prio="high"]   { background: rgba(192,138,46,.15); color: #c08a2e; }
.aide-tk-rail-detail-prio[data-prio="normal"] { background: rgba(61,127,194,.15); color: #3d7fc2; }
.aide-tk-rail-detail-prio[data-prio="low"]    { background: var(--s2); color: var(--muted); }

.aide-tk-rail-detail-assignee {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
}
.aide-tk-assignee-av {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 9px;
  font-weight: 700;
}
.aide-tk-composer-textarea {
  width: 100%;
  min-height: 70px;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  padding: 0;
}
.aide-tk-composer-textarea::placeholder { color: var(--muted); }
.aide-tk-composer-foot {
  display: flex; align-items: center; gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.aide-tk-composer-foot .hint {
  font-size: 11.5px;
  color: var(--muted);
}
.aide-tk-composer-foot .spacer { flex: 1; }
.aide-tk-composer-send {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .12s;
}
.aide-tk-composer-send:hover { opacity: .85; }
.aide-tk-composer-send:disabled { opacity: .4; cursor: not-allowed; }

/* Rail droit */
.aide-tk-rail {
  position: sticky;
  top: 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.aide-tk-rail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.aide-tk-rail-h {
  display: flex; align-items: center; gap: 7px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}
.aide-tk-rail-h .pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: aideTkPulse 1.6s infinite;
}
@keyframes aideTkPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.aide-tk-rail-h-plain {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.aide-tk-rail-art {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity .12s;
  background: transparent;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: inherit;
  box-sizing: border-box;
}
.aide-tk-rail-art:last-child { border-bottom: none; }
.aide-tk-rail-art:hover { opacity: .8; }
.aide-tk-rail-art-icon {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.aide-tk-rail-art-info { flex: 1; min-width: 0; }
.aide-tk-rail-art-t {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 3px;
}

.aide-tk-rail-art-match {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.aide-tk-rail-empty {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 12px 0;
  font-style: italic;
}

/* Détails */
.aide-tk-rail-details { font-size: 12.5px; }
.aide-tk-rail-detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.aide-tk-rail-detail-row:last-child { border-bottom: none; }
.aide-tk-rail-detail-l {
  color: var(--muted);
  font-size: 12px;
}
.aide-tk-rail-detail-v {
  color: var(--text);
  font-weight: 500;
  font-size: 12.5px;
  text-align: right;
}

/* Actions list */

/* Responsive ticket */
@media (max-width: 1100px) {
  .aide-tk-grid { grid-template-columns: 1fr; }
  .aide-tk-rail { position: static; }
}
@media (max-width: 720px) {
  .aide-tk-thread { padding: 14px 12px; }
  .aide-tk-title { font-size: 18px; }
  .aide-tk-head-actions { width: 100%; margin-left: 0; }
}

/* ─── Loading / Error states ─── */
.aide-loader {
  display: flex; align-items: center; justify-content: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 13px;
  gap: 10px;
}
.aide-loader-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: aideSpin .8s linear infinite;
}
@keyframes aideSpin { to { transform: rotate(360deg); } }
.aide-error {
  text-align: center; padding: 40px 20px;
  color: var(--chaud, #d64560);
  font-size: 13px;
}

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .aide-article-grid {
    grid-template-columns: 1fr;
  }
  .aide-art-side { position: static; flex-direction: row; gap: 16px; flex-wrap: wrap; }
  .aide-art-rail { position: static; }
  .aide-cats-grid { grid-template-columns: repeat(2, 1fr); }
  .aide-art-related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  #page-aide { padding: 16px 14px 80px; }
  .aide-hero { padding: 24px 0 20px; }
  .aide-hero-title { font-size: 26px; }
  .aide-hero-sub { font-size: 13px; }
  .aide-cats-grid { grid-template-columns: 1fr; gap: 10px; }
  .aide-cat-card { padding: 14px; }
  .aide-art-h1 { font-size: 24px; }
  .aide-art-lede { font-size: 14.5px; }
  .aide-art-md { font-size: 14px; }
  .aide-art-md h2 { font-size: 19px; }
}
