/* aqm.css -- espace AQM de l'Analyse et rapport AQM figé (décision 153).
   Partagé par analysis.html et report.html ; rendu par js/aqm-render.js. */
/* Espace AQM (décision 153, planche Docs/refs/aqm-workspace-design.html) : cycles retenus,
   puis modules de visualisation propres à l'AQM, dans une seule liste défilante. */
#aqmWorkspace[hidden] { display: none !important; }
.aqm-workspace { position: relative; height: 100%; min-width: 0; min-height: 0; overflow: hidden; }
.aqm-host { height: 100%; min-height: 0; }
.aqm { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 0; }
.aqm-head .panel-act--label { width: auto; padding: 0 8px; font-size: var(--fs-xs); white-space: nowrap; }
.aqm-head .panel-act--label[aria-expanded="true"],
.aqm-head .aqm-all[aria-pressed="true"] { color: var(--primary-hi); background: var(--primary-soft); }
.aqm-head .aqm-rep { color: var(--primary-hi); font-weight: 600; }
.aqm-head-sub { min-width: 0; overflow: hidden; color: var(--ink-muted); font-size: var(--fs-xs);
  white-space: nowrap; text-overflow: ellipsis; }
.aqm-cnt { display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 4px;
  border-radius: 9px; background: var(--primary); color: #fff; font-size: 10px; }
.aqm-summary { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 6px 10px;
  border-bottom: 1px solid var(--border-soft); }
.aqm-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.aqm-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--bg-sunken); font-size: var(--fs-xs); white-space: nowrap; }
.aqm-chip.ok { border-color: var(--primary); color: var(--primary-hi); background: var(--primary-soft); }
.aqm-chip.warn { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.aqm-chip[data-tip] { cursor: help; }
.aqm-chip.info { border-color: var(--info); color: var(--info); background: var(--info-soft); }
.aqm-dot { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 50%; }
.aqm-dot.s1 { background: var(--side-left); }
.aqm-dot.s2 { background: var(--side-right); }
.aqm-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.aqm-narrow .aqm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aqm-kpi { padding: 3px 8px; border: 1px solid var(--border-soft); border-radius: var(--r-sm); background: var(--bg-sunken); }
.aqm-kpi small { display: block; color: var(--ink-muted); font-size: 10px; }
.aqm-kpi b { font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 600; }
.aqm-kpi em { margin-left: 4px; color: var(--ink-2); font-size: 10px; font-style: normal; }
.aqm-toc { display: flex; gap: 3px; overflow-x: auto; scrollbar-width: none; }
.aqm-toc::-webkit-scrollbar { display: none; }
.aqm-toc button { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px;
  border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--ink-2);
  font: inherit; font-size: var(--fs-xs); cursor: pointer; }
.aqm-toc button:hover { background: var(--bg-hover); }
.aqm-toc button.cur { border-color: var(--border); background: var(--bg-sunken); color: var(--ink); font-weight: 600; }
.aqm-toc button.st-absent { color: var(--ink-muted); }
.aqm-toc .rp { width: 6px; height: 6px; border: 1px solid var(--ink-muted); border-radius: 50%; }
.aqm-toc .rp.on { border-color: var(--primary); background: var(--primary); }
.aqm-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; background: var(--bg-sunken); }
.aqm-mod { margin-bottom: 8px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg-surface); }
.aqm-mod.in-report { box-shadow: inset 3px 0 0 var(--primary); }
.aqm-mod[data-status="absent"] .aqm-mod-title { color: var(--ink-2); }
.aqm-mod-head { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 8px; }
.aqm-chev { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 5px; background: transparent;
  color: var(--ink-2); cursor: pointer; transition: transform 140ms; }
.aqm-mod.closed .aqm-chev { transform: rotate(-90deg); }
.aqm-mod.closed .aqm-mod-body { display: none; }
.aqm-mod-title { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.aqm-mod-sub { min-width: 0; overflow: hidden; color: var(--ink-muted); font-size: var(--fs-xs);
  white-space: nowrap; text-overflow: ellipsis; }
.aqm-narrow .aqm-mod-sub, .aqm-narrow .aqm-head-sub { display: none; }
.aqm-st { padding: 0 7px; border-radius: 999px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.aqm-st.produit { background: var(--primary-soft); color: var(--primary-hi); }
.aqm-st.degrade { background: var(--warn-soft); color: var(--warn); }
.aqm-st.absent { border: 1px dashed var(--border); background: var(--bg-sunken); color: var(--ink-muted); }
.aqm-st.fixe { background: var(--info-soft); color: var(--info); }
.aqm-lock { color: var(--ink-muted); font-size: 10px; white-space: nowrap; }
.aqm-addr { height: 24px; padding: 0 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-surface);
  color: var(--ink-2); font: inherit; font-size: var(--fs-xs); white-space: nowrap; cursor: pointer; }
.aqm-addr:hover:not(:disabled) { border-color: var(--primary); color: var(--primary-hi); }
.aqm-addr[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: #fff; font-weight: 600; }
.aqm-addr:disabled { opacity: .45; cursor: not-allowed; }
.aqm-mod-body { padding: 0 10px 10px; overflow-x: auto; }
.aqm-foot { margin-top: 6px; color: var(--ink-muted); font-size: 10.5px; line-height: 1.4; }
.aqm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--ink-2); font-size: var(--fs-xs); }
.aqm-tools select { padding: 2px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-surface);
  color: var(--ink); font: inherit; font-size: var(--fs-xs); }
.aqm-seg { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-sunken); }
.aqm-seg button { padding: 2px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2);
  font: inherit; font-size: var(--fs-xs); cursor: pointer; }
.aqm-seg button[aria-pressed="true"] { background: var(--bg-surface); color: var(--primary-hi); font-weight: 600; box-shadow: var(--shadow-sm); }
.aqm-chk { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.aqm-degr { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; padding: 6px 9px; border-radius: var(--r-sm);
  background: var(--warn-soft); font-size: var(--fs-xs); }
.aqm-degr b { color: var(--warn); }
.aqm-degr.abs { border: 1px dashed var(--border); background: var(--bg-sunken); }
.aqm-degr.abs b { color: var(--ink-2); }
.aqm-muted { color: var(--ink-muted); }
.aqm-mono { font-family: var(--font-mono); }
.aqm-link { color: var(--info); font-size: 10.5px; text-decoration: underline; cursor: pointer; white-space: nowrap; }
.aqm-empty { padding: 30px 6px; border-radius: 6px; background: var(--chart-panel); color: var(--ink-muted);
  font-size: var(--fs-xs); text-align: center; }
table.aqm-t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-xs); }
.aqm-t th { padding: 3px 6px; border-bottom: 1px solid var(--border); color: var(--ink-2); font-weight: 600; text-align: left; white-space: nowrap; }
.aqm-t td { padding: 3px 6px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.aqm-t .n { font-family: var(--font-mono); text-align: right; white-space: nowrap; }
.aqm-t td.n small { color: var(--ink-muted); font-size: 9.5px; }
.aqm-t tr.grp td { border-bottom: 0; background: var(--bg-sunken); font-weight: 600; }
.aqm-t tr.na td { color: var(--ink-muted); }
.aqm-t tr.cy { cursor: pointer; }
.aqm-t tr.cy:hover td { background: var(--bg-hover); }
.aqm-t tr.cy.active td { background: var(--primary-soft); }
.aqm-t tr.cy.excl td { color: var(--ink-muted); }
.aqm-narrow .aqm-t .opt { display: none; }
.aqm-ev { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; border: 1px solid var(--border);
  border-radius: 999px; font-size: 10px; white-space: nowrap; }
.aqm-ev.rev { border-color: var(--primary); color: var(--primary-hi); }
.aqm-ev.pro { border-style: dashed; border-color: var(--warn); color: var(--warn); }
.aqm-ev.none { color: var(--ink-muted); }
.aqm-dg.pos { color: var(--side-right); }
.aqm-dg.neg { color: var(--side-left); }
.aqm-lanes { position: relative; margin: 8px 0 0 18px; }
.aqm-lane { position: relative; height: 16px; margin-bottom: 4px; border-radius: 5px; background: var(--bg-sunken); }
.aqm-lane.thin { height: 7px; background: transparent; }
.aqm-lane .lab { position: absolute; top: 0; left: -16px; font-size: 10px; font-weight: 600; }
.aqm-lane i { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; opacity: .85; cursor: pointer; }
.aqm-lane.thin i { top: 0; bottom: 0; }
.aqm-lane i.excl { border: 1px dashed var(--border); opacity: 1;
  background: repeating-linear-gradient(45deg, transparent 0 5px, rgba(138,158,136,.28) 5px 6px) !important; }
.aqm-lane i.active { opacity: 1; outline: 2px solid var(--ink); outline-offset: 1px; }
.aqm-lane i u { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); opacity: .7; }
.aqm-playhead { position: absolute; top: -3px; bottom: 0; width: 2px; background: var(--ink); pointer-events: none; }
.aqm-axis { display: flex; justify-content: space-between; margin-left: 18px; color: var(--ink-muted); font-size: 10px; }
.aqm-bars { display: grid; grid-template-columns: 28px 1fr 50px; gap: 3px 6px; align-items: center; font-size: 10.5px; }
.aqm-bars .aqm-lane { height: 14px; margin: 0; }
.aqm-bars .aqm-axis { margin-left: 0; }
.aqm-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.aqm-figs.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aqm-narrow .aqm-figs { grid-template-columns: minmax(0, 1fr); }
.aqm-fig { min-width: 0; }
.aqm-fig h4 { margin: 0 0 2px; overflow: hidden; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.aqm-fig h4 small { color: var(--ink-muted); font-weight: 400; }
.aqm-fig svg { display: block; width: 100%; height: auto; border-radius: 6px; cursor: crosshair; }
.aqm-fig svg [data-trace] { cursor: pointer; }
svg.aqm-static { display: block; width: 100%; height: auto; }
.aqm-read { height: 14px; color: var(--ink-2); font-family: var(--font-mono); font-size: 10px; white-space: nowrap; }
.aqm-side-title { margin: 2px 0; font-size: 10.5px; font-weight: 600; }
.aqm-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; color: var(--ink-2); font-size: 10.5px; }
.aqm-legend i { display: inline-block; width: 14px; height: 3px; margin-right: 4px; border-radius: 2px; vertical-align: 3px; }
.aqm-steps { display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr); gap: 10px; align-items: start; }
.aqm-scrollx { max-height: 220px; overflow: auto; }
.aqm-capt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.aqm-capt figure { margin: 0; overflow: hidden; border: 1px solid var(--border-soft); border-radius: var(--r-sm); }
.aqm-shot { display: grid; place-items: center; aspect-ratio: 3 / 4; background: var(--viewport-bg);
  color: var(--ink-muted); font-size: var(--fs-xs); text-align: center; }
.aqm-shot img { display: block; width: 100%; height: 100%; object-fit: contain; }
.aqm-capt figcaption { display: flex; justify-content: space-between; gap: 4px; padding: 3px 6px; font-size: 10.5px; }
.aqm-capture { position: fixed; left: -10000px; top: -10000px; width: 360px; height: 480px; opacity: 0; pointer-events: none; }
.aqm-notes { display: grid; gap: 8px; }
.aqm-notes label { display: flex; justify-content: space-between; color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; }
.aqm-notes textarea { width: 100%; min-height: 46px; padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg-surface); color: var(--ink); font: inherit; font-size: var(--fs-sm); resize: vertical; }
.aqm-method { color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.5; }
.aqm-method p { margin: 0 0 4px; }
.aqm-drawer { position: absolute; z-index: 6; top: 36px; right: 10px; bottom: 10px; width: min(360px, calc(100% - 20px));
  overflow-y: auto; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-surface);
  box-shadow: var(--shadow-lg); font-size: var(--fs-sm); }
.aqm-drawer[hidden] { display: none; }
.aqm-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.aqm-drawer-head h3 { margin: 0; font-size: var(--fs-sm); }
.aqm-drawer-head button { border: 0; background: transparent; color: var(--ink-muted); font: inherit; font-size: 20px; cursor: pointer; }
.aqm-drawer p { font-size: var(--fs-xs); }
.aqm-frow { display: grid; grid-template-columns: 130px 1fr; gap: 8px; align-items: center; margin-bottom: 6px; font-size: var(--fs-xs); }
.aqm-frow span { color: var(--ink-2); }
.aqm-frow b { font-weight: 500; }
.aqm-frow input { width: 100%; padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-surface);
  color: var(--ink); font: inherit; font-size: var(--fs-xs); }
.aqm-comp { margin: 0 0 10px; padding: 0; list-style: none; }
.aqm-comp li { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; padding: 4px 8px; border: 1px solid var(--border-soft);
  border-radius: 6px; font-size: var(--fs-xs); }
.aqm-comp li.fixed { background: var(--bg-sunken); color: var(--ink-2); }
.aqm-btn { display: block; width: 100%; height: 30px; border: 0; border-radius: var(--r-btn, 10px); background: var(--primary);
  color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.aqm-btn:disabled { opacity: .5; cursor: not-allowed; }
.seg-row.seg-flash { outline: 2px solid var(--warn); outline-offset: -2px; }

/* Rapport AQM figé (page Rapport) : mêmes modules, rendus depuis les modèles gelés. */
.aqm-error { color: var(--danger); font-size: var(--fs-xs); }
.aqm-ok { color: var(--primary-hi); font-size: var(--fs-xs); }
.aqm-note-text { margin: 2px 0 0; white-space: pre-wrap; font-size: var(--fs-sm); color: var(--ink); }
.aqm-report { height: auto; display: block; }
.aqm-report .aqm-mod { margin-bottom: 12px; scroll-margin-top: 12px; }
.aqm-report .aqm-mod-head { min-height: 40px; padding: 8px 12px; }
.aqm-report .aqm-mod-body { padding: 0 12px 12px; }
.aqm-report .aqm-fig svg { cursor: default; }
/* Repli d'un côté dans « Cycles retenus » : le triangle tout à droite de la ligne de groupe. */
.aqm-grp { display: flex; align-items: center; gap: 8px; }
.aqm-grp > span:first-child { flex: 1; min-width: 0; }
.aqm-fold { flex: none; width: 24px; height: 22px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-surface); color: var(--ink); cursor: pointer; font-size: 13px; line-height: 1; }
.aqm-fold:hover { background: var(--bg-active); color: var(--ink); }
.aqm-head .aqm-detect { color: var(--primary-hi); background: var(--primary-soft); font-weight: 600; }
.aqm-head .aqm-detect:hover { background: var(--primary-mid, var(--primary-soft)); }
/* Asymétrie G/D : une ligne par grandeur, points G et D sur une piste, écart D − G à droite. */
.aqm-asym { display: grid; gap: 2px; font-size: var(--fs-xs); }
.aqm-asym-row { display: grid; grid-template-columns: minmax(80px, 32%) minmax(0, 1fr) 52px; align-items: center; gap: 10px; min-height: 22px; }
.aqm-asym-row .lab { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aqm-asym-row .trk { position: relative; height: 12px; margin: 0 6px; background: linear-gradient(var(--border-soft), var(--border-soft)) center / 100% 1px no-repeat; }
.aqm-asym-row .trk i { position: absolute; top: 5px; height: 2px; background: var(--ink-muted); }
.aqm-asym-row .trk b { position: absolute; top: 1px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; }
.aqm-asym-row .trk b.s1 { background: var(--side-left); }
.aqm-asym-row .trk b.s2 { background: var(--side-right); }
.aqm-asym-row .n { font-family: var(--font-mono); text-align: right; white-space: nowrap; }

/* Drapeau des décollements à revoir, à droite de la rangée de synthèse. */
.aqm-flag { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px;
  border: 1px solid var(--warn); border-radius: 999px; background: var(--warn-soft); color: var(--warn);
  font: 600 var(--fs-xs) var(--font); cursor: pointer; }
.aqm-flag:hover { filter: brightness(.95); }
.aqm-flag span { font-family: var(--font-mono); }

/* Barre des sections : numéros, défilement à la molette, flèches de part et d'autre. */
.aqm-toc-wrap { position: relative; display: flex; align-items: center; min-width: 0; }
.aqm-toc-wrap .aqm-toc { flex: 1; min-width: 0; }
.aqm-toc .rp { width: auto; min-width: 16px; height: 16px; padding: 0 3px; display: inline-grid; place-items: center;
  border: 1px solid var(--ink-muted); border-radius: 8px; font: 600 9.5px var(--font-mono); color: var(--ink-2); }
.aqm-toc .rp.on { border-color: var(--primary); background: var(--primary); color: #fff; }
:root[data-theme="dark"] .aqm-toc .rp.on { color: #151e2d; }
.aqm-toc-nav { flex: none; width: 24px; height: 22px; display: inline-grid; place-items: center; padding: 0;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg-surface); color: var(--ink);
  font-size: 15px; line-height: 1; cursor: pointer; }
.aqm-toc-nav[hidden] { display: none; }
.aqm-toc-nav.prev { margin-right: 4px; }
.aqm-toc-nav.next { margin-left: 4px; border-color: var(--primary); color: var(--primary-hi); background: var(--primary-soft);
  animation: aqm-breathe 1.8s ease-in-out infinite; }
.aqm-toc-nav:hover { animation: none; background: var(--bg-active); }
@keyframes aqm-breathe {
  0%, 100% { transform: translateX(0) scale(1); box-shadow: 0 0 0 0 var(--primary-soft); }
  50% { transform: translateX(2px) scale(1.08); box-shadow: 0 0 0 4px var(--primary-soft); }
}
@media (prefers-reduced-motion: reduce) { .aqm-toc-nav.next { animation: none; } }

/* Sommaire : un bloc à part, sous la synthèse, pour qu'on le lise comme une table des matières. */
.aqm-sommaire { flex: none; padding: 6px 10px 0; background: var(--bg-sunken); }
.aqm-sommaire-box { display: flex; align-items: center; gap: 8px; padding: 4px 6px;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg-surface); }
.aqm-sommaire-lbl { flex: none; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.aqm-sommaire .aqm-toc-wrap { flex: 1; }

/* Numéro de section, le même que dans le sommaire (et dans l'ordre du rapport publié). */
.aqm-mod-num { flex: none; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: var(--bg-sunken); border: 1px solid var(--border); color: var(--ink-2);
  font: 600 10px var(--font-mono); }
.aqm-mod.in-report .aqm-mod-num { background: var(--primary); border-color: var(--primary); color: #fff; }
:root[data-theme="dark"] .aqm-mod.in-report .aqm-mod-num { color: #151e2d; }

/* Texte d'explication d'un module : un « ? » discret à droite, le texte au clic. */
.aqm-note { display: flex; flex-direction: column; align-items: flex-end; margin-top: 4px; }
.aqm-note-btn { width: 18px; height: 18px; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--border);
  border-radius: 50%; background: var(--bg-surface); color: var(--ink-muted); font: 600 10px var(--font); cursor: pointer; }
.aqm-note-btn:hover, .aqm-note-btn[aria-expanded="true"] { color: var(--ink); border-color: var(--ink-muted); }
.aqm-note .aqm-foot { align-self: stretch; margin-top: 4px; padding: 6px 8px; border-radius: var(--r-sm); background: var(--bg-sunken); }
.aqm-note .aqm-foot[hidden] { display: none; }

/* Volet Informations : état des attentes. */
.aqm-drawer-sub { margin: 14px 0 6px; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); }
.aqm-expect { display: grid; grid-template-columns: 18px 1fr auto; gap: 6px; align-items: center; margin-bottom: 4px;
  padding: 4px 8px; border: 1px solid var(--border-soft); border-radius: var(--r-sm); font-size: var(--fs-xs); cursor: help; }
.aqm-expect .ic { font-weight: 700; text-align: center; }
.aqm-expect b { font-family: var(--font-mono); font-weight: 600; }
.aqm-expect.ok { border-color: var(--primary); background: var(--primary-soft); }
.aqm-expect.ok .ic { color: var(--primary-hi); }
.aqm-expect.warn { border-color: var(--warn); background: var(--warn-soft); }
.aqm-expect.warn .ic { color: var(--warn); }
.aqm-expect.info { border-color: var(--info); background: var(--info-soft); }
.aqm-expect.info .ic { color: var(--info); font-style: italic; }

/* Rail AQM : boutons-icônes le long du panneau AQM, centrés verticalement sur la scène 3D
   (même allure que les outils de la vue). */
.aqm-rail { position: absolute; z-index: 3; right: var(--s2, 8px); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 4px; }
.aqm-rail[hidden] { display: none; }
.aqm-rail button { width: 30px; height: 30px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 8px;
  background: rgba(255,255,255,.10); color: #e0ecd8; cursor: pointer; }
.aqm-rail button:hover { background: rgba(255,255,255,.22); color: #fff; }
:root:not([data-theme="dark"]) .aqm-rail button { background: rgba(255,255,255,.92); color: var(--gray-900, #151e2d); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
:root:not([data-theme="dark"]) .aqm-rail button:hover { background: #fff; }
.aqm-rail button[aria-pressed="true"], .aqm-rail button[aria-expanded="true"] { background: var(--primary); color: #fff; }
.aqm-rail button:disabled { opacity: .45; cursor: default; }
/* A global `svg { width: 100% }` rule would stretch the icons: their size is fixed here. */
.aqm-rail svg, .aqm-info svg { display: block; flex: none; width: 16px; height: 16px; overflow: visible; }
.aqm-head .aqm-info { gap: 5px; }

/* Boutons-icônes de l'en-tête (Détecter, Tout le panneau), à côté d'Informations. */
.aqm-head .aqm-ico { width: 28px; height: 26px; color: var(--ink-2); }
.aqm-head .aqm-ico svg { display: block; width: 16px; height: 16px; overflow: visible; }
.aqm-head .aqm-ico[aria-pressed="true"] { color: var(--primary-hi); background: var(--primary-soft); }
.aqm-head .aqm-ico:disabled { opacity: .4; cursor: default; }

/* Aucun cycle de marche : « Détecter » en rouge qui respire ; ni sommaire ni modules. */
.aqm-nocycle .aqm-sommaire, .aqm-nocycle .aqm-scroll { display: none; }
.aqm-nocycle [data-aqm-detect] { color: #fff !important; background: var(--danger) !important; border-color: var(--danger) !important;
  animation: aqm-breathe-red 1.6s ease-in-out infinite; }
@keyframes aqm-breathe-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(207,59,52,.45); transform: scale(1); }
  50% { box-shadow: 0 0 0 6px rgba(207,59,52,0); transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { .aqm-nocycle [data-aqm-detect] { animation: none; } }
