:root {
  color-scheme: light;
  --bg: #f4f4f1;
  --surface-1: #fcfcfb;
  --surface-2: #f0f0ec;
  --border: #e2e1dc;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #6f6e69;
  --grid: #e6e5e0;
  --accent: #1f7a4d;
  --accent-ink: #ffffff;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100;
  --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948;
  --good: #0ca30c; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b;
  --mark: #fff3b0;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121211; --surface-1: #1a1a19; --surface-2: #232321; --border: #33332f;
    --text-primary: #f0efec; --text-secondary: #c3c2b7; --text-muted: #9c9b93; --grid: #2c2c29;
    --accent: #3fae78; --accent-ink: #0b0b0b;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
    --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
    --mark: #5a4b00;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121211; --surface-1: #1a1a19; --surface-2: #232321; --border: #33332f;
  --text-primary: #f0efec; --text-secondary: #c3c2b7; --text-muted: #9c9b93; --grid: #2c2c29;
  --accent: #3fae78; --accent-ink: #0b0b0b;
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500;
  --series-5: #d55181; --series-6: #008300; --series-7: #9085e9; --series-8: #e66767;
  --mark: #5a4b00;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text-primary); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h2 { font-size: 1.2rem; margin: 0 0 .3rem; }
h3 { font-size: 1rem; margin: 0 0 .2rem; }
p { margin: .3rem 0; }
code { background: var(--surface-2); padding: 0 .3em; border-radius: 4px; font-size: .9em; }
a { color: var(--accent); }
.muted { color: var(--text-secondary); }
.small { font-size: .85rem; }
.row { display: flex; gap: .6rem; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

.top { background: var(--surface-1); border-bottom: 1px solid var(--border); padding: .7rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.brand { display: flex; gap: .6rem; align-items: center; }
.brand small { display: block; color: var(--text-secondary); font-size: .8rem; }
.logo { font-size: 1.6rem; color: var(--accent); }
.tabs { display: flex; gap: .3rem; }
.tabs button { background: none; border: 0; padding: .5rem .8rem; border-radius: 8px; font: inherit; color: var(--text-secondary); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text-primary); font-weight: 600; }

main { max-width: 1200px; margin: 0 auto; padding: 1rem; }
.card { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid2 > .card { margin-bottom: 1rem; }
.grid-wide { display: grid; grid-template-columns: 1fr 2fr; gap: 1rem; }
.grid-wide > .card { margin-bottom: 1rem; }
@media (max-width: 860px) { .grid2, .grid-wide { grid-template-columns: 1fr; } }

button, .btn { font: inherit; border-radius: 8px; padding: .5rem .9rem; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-primary); cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { filter: brightness(.97); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
button:disabled { opacity: .55; cursor: wait; }
.btn.small, button.small { padding: .25rem .6rem; font-size: .85rem; }
.danger-ghost { color: var(--critical); background: transparent; }
input, select, textarea { font: inherit; color: var(--text-primary); background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px; padding: .45rem .6rem; }
textarea { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: .88rem; }
label.block { display: block; margin: .6rem 0; font-weight: 500; }
label.block textarea { margin-top: .3rem; font-weight: 400; }
label.inline { display: inline-flex; gap: .5rem; align-items: center; margin-top: .8rem; }

.run-card { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: start; }
.run-card #run-progress { grid-column: 1 / -1; }
.run-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
@media (max-width: 640px) { .run-card { grid-template-columns: 1fr; } }
.progress { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .3s; }

.alert { border-radius: var(--radius); padding: .7rem 1rem; margin-bottom: 1rem; border: 1px solid var(--border); background: var(--surface-1); border-left: 4px solid var(--warning); }
.empty { text-align: center; padding: 2rem; }

.filters { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.filters label { display: flex; gap: .4rem; align-items: center; font-size: .9rem; color: var(--text-secondary); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; }
.kpi .label { color: var(--text-secondary); font-size: .85rem; }
.kpi .value { font-size: 1.9rem; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .sub { color: var(--text-muted); font-size: .8rem; }

.legend { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .82rem; color: var(--text-secondary); margin: .5rem 0; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* barres horizontales */
.bars { display: grid; gap: .7rem; margin-top: .4rem; }
.bar-group .name { font-size: .88rem; font-weight: 600; display: flex; justify-content: space-between; gap: .5rem; }
.bar-group .name .tag { font-weight: 400; color: var(--text-muted); font-size: .78rem; }
.bar-row { display: grid; grid-template-columns: 1fr 3.2em; gap: .5rem; align-items: center; height: 14px; margin-top: 2px; }
.bar-track { position: relative; height: 10px; border-radius: 0 4px 4px 0; background: transparent; border-left: 1px solid var(--text-muted); }
.bar-fill { height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.bar-val { font-size: .78rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; text-align: right; }

/* tableaux */
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; color: var(--text-secondary); font-weight: 500; border-bottom: 1px solid var(--border); padding: .4rem .4rem; white-space: nowrap; }
td { border-bottom: 1px solid var(--grid); padding: .4rem .4rem; vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }
.table-scroll { overflow-x: auto; max-height: 460px; overflow-y: auto; }
.ok { color: var(--good); font-weight: 700; }
.ko { color: var(--text-muted); }
.pill { display: inline-block; padding: 0 .45em; border-radius: 99px; font-size: .75rem; background: var(--surface-2); color: var(--text-secondary); border: 1px solid var(--border); }
.pill.own { border-color: var(--accent); color: var(--accent); }

/* réponses */
.resp { border: 1px solid var(--border); border-radius: 8px; padding: .7rem .9rem; margin-top: .7rem; }
.resp-head { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; font-size: .85rem; color: var(--text-secondary); margin-bottom: .4rem; }
.resp-text { white-space: pre-wrap; font-size: .9rem; max-height: 320px; overflow: auto; }
.resp-text mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }
.resp-cites { font-size: .8rem; color: var(--text-secondary); margin-top: .4rem; word-break: break-all; }
.err { color: var(--critical); }

/* audit */
.score-head { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.gauge { position: relative; width: 120px; height: 120px; flex: none; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge .g-val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge .g-val strong { font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge .g-val span { font-size: .75rem; color: var(--text-muted); }
.status { display: inline-flex; gap: .35rem; align-items: center; font-weight: 600; font-size: .9rem; }
.status i { font-style: normal; display: inline-flex; width: 1.2em; height: 1.2em; border-radius: 50%; align-items: center; justify-content: center; font-size: .75em; color: #0b0b0b; }
.reco { border-left: 3px solid var(--border); padding: .4rem .8rem; margin: .5rem 0; }
.reco.haute { border-left-color: var(--critical); }
.reco.moyenne { border-left-color: var(--warning); }
.reco.basse { border-left-color: var(--text-muted); }
.reco .meta { font-size: .78rem; color: var(--text-secondary); }
.preview { background: var(--surface-2); border-radius: 8px; padding: .7rem .9rem; font-size: .85rem; max-height: 240px; overflow: auto; white-space: pre-wrap; }
details summary { cursor: pointer; font-weight: 600; margin: .6rem 0; }

/* réglages */
.keys { display: grid; gap: .6rem; margin: .8rem 0; }
.key-row { display: grid; grid-template-columns: 200px 1fr auto; gap: .6rem; align-items: center; }
.key-row input { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
@media (max-width: 640px) { .key-row { grid-template-columns: 1fr; } }
.prov-row, .brand-row { display: grid; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--grid); }
.prov-row { grid-template-columns: 1.4fr 1fr auto; }
.brand-row { grid-template-columns: 1fr 1.6fr 1.3fr auto auto; }
.brand-row input, .prov-row input[type="text"] { width: 100%; }
@media (max-width: 760px) { .brand-row, .prov-row { grid-template-columns: 1fr; } }
.save-bar { position: sticky; bottom: 0; background: var(--bg); padding: .8rem 0; display: flex; gap: .8rem; align-items: center; }

/* graphique d'évolution */
.trend svg { width: 100%; height: auto; display: block; overflow: visible; }
.trend text { fill: var(--text-muted); font-size: 11px; }

#tooltip { position: fixed; z-index: 50; pointer-events: none; background: var(--surface-1); color: var(--text-primary); border: 1px solid var(--border); border-radius: 8px; padding: .45rem .6rem; font-size: .8rem; box-shadow: 0 4px 16px rgba(0,0,0,.15); max-width: 280px; }
#tooltip .t-row { display: flex; gap: .4rem; align-items: center; }
.tabs { overflow-x: auto; max-width: 100%; scrollbar-width: thin; }
.tabs button { white-space: nowrap; padding: .45rem .65rem; }
.techs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .3rem .8rem; margin-top: .4rem; font-weight: 400; }
.techs label { display: flex; gap: .4rem; align-items: center; font-size: .9rem; }
.rewrite-box { margin: 1rem 0; }
.md-out { background: var(--surface-2); border-radius: 8px; padding: .8rem 1rem; white-space: pre-wrap; font-size: .88rem; max-height: 520px; overflow: auto; }
.md-out mark, .resp-text mark.todo { background: var(--mark); }
.verdict { font-weight: 600; font-size: .8rem; display: inline-flex; gap: .3rem; align-items: center; }
.sig { font-weight: 700; }
.row-between.wrap { flex-wrap: wrap; }
.finding { display: grid; grid-template-columns: 1.6em 1fr; gap: .4rem; padding: .45rem 0; border-bottom: 1px solid var(--grid); }
.finding:last-child { border-bottom: 0; }
.finding .ic { font-weight: 700; }
.md h1, .md h2, .md h3, .md h4 { margin: 1rem 0 .3rem; font-size: 1rem; }
.md h2 { font-size: 1.08rem; }
.md ul, .md ol { margin: .3rem 0; padding-left: 1.3rem; }
.md table { margin: .5rem 0; }
.md p { margin: .45rem 0; }
@media print {
  .top, .no-print, #tooltip, .tabs { display: none !important; }
  body { background: #fff; color: #000; }
  .tab:not(#tab-synthese) { display: none !important; }
  #tab-synthese { display: block !important; }
  .card { break-inside: avoid; border-color: #ccc; }
  .table-scroll { max-height: none !important; overflow: visible !important; }
  main { padding: 0; max-width: none; }
}
.sitebar { display: flex; gap: .4rem; align-items: center; flex: 1 1 420px; max-width: 620px; }
.sitebar select { max-width: 220px; }
.sitebar input { flex: 1; min-width: 0; }
@media (max-width: 640px) { .sitebar { flex-wrap: wrap; } .sitebar select { max-width: none; width: 100%; } }

/* ---------- Réglages : Mammouth ---------- */
.mm-box { margin-top: 1rem; padding: .9rem 1rem; border: 1px dashed var(--border, #c9d3cf); border-radius: 12px; }
.mm-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .25rem .75rem; max-height: 18rem; overflow: auto; margin-top: .5rem; }
.mm-model { display: flex; align-items: center; gap: .35rem; font-size: .9em; }
.mm-model[hidden] { display: none; }
.pill.mm-web { background: #6dedb3; color: #1d2939; }

/* ---------- Animation : boulette lancée à la poubelle ---------- */
.pb-ball, .pb-bin { position: fixed; pointer-events: none; z-index: 9999; }
.pb-ball { width: 22px; height: 22px; z-index: 9998; filter: drop-shadow(0 2px 2px rgba(29,41,57,.25)); }
.pb-bin { transform-origin: 50% 100%; }
.pb-bin svg { display: block; overflow: visible; filter: drop-shadow(0 3px 4px rgba(29,41,57,.28)); }
.pb-bin .pb-lid, .pb-gallery .pb-lid { transform-box: fill-box; }
.pb-tag { position: absolute; left: 50%; top: calc(100% + 4px); transform: translateX(-50%); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px;
  background: #1d2939; color: #fff; font: 600 11px/1.4 Outfit, system-ui, sans-serif; box-shadow: 0 2px 6px rgba(29,41,57,.25); }
.pb-tag i { width: 7px; height: 7px; border-radius: 50%; }
.pb-gallery { position: fixed; inset: 0; z-index: 10000; background: rgba(255,255,255,.96); display: flex; flex-wrap: wrap; gap: 44px 28px; padding: 30px; align-content: flex-start; }
.pb-gallery > div { position: relative; padding-bottom: 26px; }
.pill.warn { background: #fff4e5; border-color: #f0a14a; color: #8a4b08; font-weight: 600; }

/* --- agrandir une carte --- */
.card { position: relative; }
.expand-btn { position: absolute; top: .55rem; right: .6rem; z-index: 2; width: 2rem; height: 2rem; padding: 0; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-1); color: var(--text-secondary); font-size: 1rem; line-height: 1; cursor: pointer; opacity: .55; transition: opacity .15s, transform .15s; }
.card:hover > .expand-btn, .expand-btn:focus-visible { opacity: 1; }
.expand-btn:hover { transform: scale(1.1); color: var(--text-primary); }
.card > h3:first-of-type, .card > h2:first-of-type { padding-right: 2.4rem; }
.card.expanded { position: fixed; inset: 3vh 3vw; z-index: 1001; margin: 0; overflow: auto; max-width: 1400px; margin-inline: auto; height: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.card.expanded > .expand-btn { position: sticky; float: right; top: 0; opacity: 1; margin: -.3rem -.4rem 0 .5rem; }
.card.expanded svg { max-height: 70vh; }
.expand-backdrop { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(20, 25, 35, .45); backdrop-filter: blur(2px); }
body.has-expanded .expand-backdrop { display: block; }
body.has-expanded { overflow: hidden; }
@media (max-width: 700px) { .card.expanded { inset: 0; border-radius: 0; } }


/* ===== lisibilité (10/11/2026) ===== */
.tabs button { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; gap: .1rem; padding: .38rem .62rem; }
.tabs .t-hint { font-size: .68rem; font-weight: 400; opacity: .72; letter-spacing: 0; }
.tabs button[aria-selected="true"] .t-hint { opacity: .85; }
@media (max-width: 1180px) { .tabs .t-hint { display: none; } }

.costs-inline { margin-top: .8rem; border-top: 1px dashed var(--border); padding-top: .6rem; }
.costs-inline > summary { cursor: pointer; font-size: .9rem; color: var(--text-secondary); list-style: none; }
.costs-inline > summary::-webkit-details-marker { display: none; }
.costs-inline > summary::before { content: '▸ '; }
.costs-inline[open] > summary::before { content: '▾ '; }
.costs-inline[open] > summary { margin-bottom: .6rem; }

.verdict { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; padding: .9rem 1.1rem; margin-bottom: 1rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-1); box-shadow: var(--shadow); }
.verdict p { margin: 0; flex: 1 1 380px; font-size: 1.02rem; }
.verdict-icon { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 99px; font-weight: 800; color: #fff; flex: none; }
.verdict.good .verdict-icon { background: var(--good, #2e9e5b); }
.verdict.mid .verdict-icon { background: var(--warning, #e0952b); }
.verdict.bad .verdict-icon { background: var(--critical, #d64545); }
.verdict-link { font-weight: 600; white-space: nowrap; }

.toolbar { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: .55rem .9rem; }
.toolbar-title { font-weight: 650; font-size: .85rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .06em; }
.toolbar .spacer { flex: 1; }

.heatmap { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: .88rem; }
.heatmap th { font-weight: 600; font-size: .78rem; color: var(--text-secondary); white-space: nowrap; vertical-align: bottom; }
.heatmap td { padding: .35rem .5rem; border-radius: 6px; }
.heatmap td.heat { text-align: center; font-variant-numeric: tabular-nums; min-width: 3.2rem; cursor: default; }
.heatmap td.strong { font-weight: 700; }
.heatmap tr.own-row td:first-child { font-weight: 650; }
.web-dot { display: inline-block; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 0 .35em; border-radius: 4px; background: #6dedb3; color: #1d2939; vertical-align: middle; }
#tracker-results > .grid2 { grid-template-columns: 1fr; }
#tracker-results #chart-trend svg { max-height: 260px; }
#tracker-results #chart-trend .legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
[hidden] { display: none !important; }
.run-card > .costs-inline, .run-card > #run-progress { grid-column: 1 / -1; }
.filters.toolbar select { width: auto !important; min-width: 8rem; max-width: 20rem; flex: none; }
.filters.toolbar label { flex: none; }
.toolbar label { margin: 0; }
.heatmap thead th { white-space: normal; max-width: 7.5rem; line-height: 1.25; text-align: center; }
.heatmap thead th:first-child { text-align: left; }
.heatmap thead .swatch { display: inline-block; width: .6rem; height: .6rem; border-radius: 99px; vertical-align: middle; margin-right: .15rem; }
.heatmap td:first-child { white-space: nowrap; }

/* Sources + questions côte à côte : pas de défilement horizontal, seulement vertical */
#table-domains .table-scroll, #table-prompts .table-scroll { overflow-x: hidden; }
#table-domains table, #table-prompts table { table-layout: fixed; width: 100%; font-size: .82rem; }
#table-domains th, #table-domains td, #table-prompts th, #table-prompts td { padding: .35rem .3rem; }
#table-domains th:nth-child(2), #table-domains td:nth-child(2) { width: 4.6rem; }
#table-domains th:nth-child(3), #table-domains td:nth-child(3) { width: 3.2rem; }
#table-domains td:first-child { overflow-wrap: anywhere; }
#table-prompts th:first-child, #table-prompts td:first-child { width: 36%; }
#table-prompts th.ia-col { white-space: nowrap; text-align: center; font-size: .64rem; line-height: 1.15; letter-spacing: -.01em; padding-left: .1rem; padding-right: .1rem; }
#table-prompts th.ia-col .swatch { display: block; margin: 0 auto .2rem; width: .6rem; height: .6rem; border-radius: 99px; }
#table-prompts td.num { text-align: center; }


/* déchet radioactif « non cité » */
.stink { display: inline-block; line-height: 0; vertical-align: middle; }
.stink .blob { fill: #a6d13a; stroke: #4f6d16; stroke-width: 1; animation: stink-glow 2.4s ease-in-out infinite; }
.stink .peel { stroke: #4f6d16; stroke-width: 1.1; }
.stink .rad { fill: #2c3d0c; }
.stink .fumes path { stroke: #7fd63a; opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; animation: stink-fume 1.9s ease-in-out infinite; }
.stink .fumes .f2 { animation-delay: .35s; }
.stink .fumes .f3 { animation-delay: .7s; }
@keyframes stink-fume {
  0% { opacity: 0; transform: translateY(3px) scaleY(.5); }
  35% { opacity: .95; }
  100% { opacity: 0; transform: translateY(-4px) scaleY(1.15) skewX(-8deg); }
}
@keyframes stink-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(150, 255, 60, 0)); }
  50% { filter: drop-shadow(0 0 3px rgba(150, 255, 60, .95)); }
}
tr:hover .stink svg { animation: stink-wobble .5s ease-in-out infinite; }
@keyframes stink-wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .stink *, .stink svg { animation: none !important; } .stink .fumes path { opacity: .8; } }


/* super-éboueur « cité » */
.hero { display: inline-block; line-height: 0; vertical-align: middle; }
.hero .body { transform-box: view-box; transform-origin: 50% 50%; animation: hero-fly 1.6s ease-in-out infinite; }
.hero .cape { fill: #e0402f; transform-box: fill-box; transform-origin: 50% 0; animation: hero-cape .7s ease-in-out infinite alternate; }
.hero .suit { fill: #2f6fdc; }
.hero .arm, .hero .leg { stroke: #2f6fdc; }
.hero .emb { fill: #ffd23f; }
.hero .skin { fill: #f2c79a; }
.hero .mask { fill: #1d2b4f; }
.hero .bin rect { fill: #3fa34d; }
.hero .bin .lid { fill: #2a7a36; transform-box: fill-box; transform-origin: 0 100%; animation: hero-lid 1.6s ease-in-out infinite; }
@keyframes hero-fly { 0%, 100% { transform: translateY(1px) rotate(-3deg); } 50% { transform: translateY(-1.5px) rotate(3deg); } }
@keyframes hero-cape { from { transform: skewX(6deg) scaleY(.95); } to { transform: skewX(-10deg) scaleY(1.05); } }
@keyframes hero-lid { 0%, 60%, 100% { transform: rotate(0); } 75% { transform: rotate(-35deg); } }
tr:hover .hero .body { animation-duration: .5s; }
@media (prefers-reduced-motion: reduce) { .hero * { animation: none !important; } }


/* passe UI/UX */
.card > .row-between:first-child, .card > .expand-btn + .row-between { padding-right: 2.4rem; }
.nowrap { white-space: nowrap; }
.key-warn { margin: .4rem 0 .6rem; padding: .55rem .8rem; border-radius: 10px; background: color-mix(in srgb, var(--warning) 14%, var(--surface-1)); border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent); font-size: .88rem; }
.key-warn a { font-weight: 600; }
input[type=file] { font: inherit; font-size: .88rem; color: var(--text-secondary); }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-right: .7rem; padding: .45rem .9rem; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-primary); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--surface-1); }


/* réponses des IA : mise en page lisible */
#responses { display: grid; gap: .9rem; margin-top: .6rem; }
#responses .resp { margin: 0; border: 1px solid var(--border); border-left: 4px solid var(--pc, var(--border)); border-radius: 14px; padding: .9rem 1.1rem 1rem; background: var(--surface-1); box-shadow: 0 1px 2px rgba(29,41,57,.04); }
#responses .resp-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: .55rem; color: inherit; }
#responses .resp-who { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; font-size: .92rem; }
#responses .resp-who .muted { font-size: .78rem; }
.rstat { flex: none; font-size: .74rem; font-weight: 700; padding: .2rem .65rem; border-radius: 99px; }
.rstat.ok { background: var(--primary); color: #fff; }
.rstat.ko { background: var(--surface-2); color: var(--text-secondary); }
.rstat.err { background: color-mix(in srgb, var(--critical) 14%, var(--surface-1)); color: var(--critical); }
.resp-lbl { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary); margin-right: .2rem; }
.resp-brands, .resp-cites { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.resp-brands { padding-bottom: .65rem; margin-bottom: .65rem; border-bottom: 1px dashed var(--border); }
.bchip { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; padding: .15rem .6rem .15rem .2rem; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); }
.bchip b { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; border-radius: 99px; background: var(--surface-1); font-size: .7rem; }
.bchip.own { background: color-mix(in srgb, var(--primary) 14%, var(--surface-1)); border-color: color-mix(in srgb, var(--primary) 45%, transparent); font-weight: 600; }
.bchip.own b { background: var(--primary); color: #fff; }
.bchip.warn { padding-left: .6rem; background: color-mix(in srgb, var(--warning) 16%, var(--surface-1)); border-color: color-mix(in srgb, var(--warning) 45%, transparent); }
.bchip .src-ic { font-style: normal; font-size: .72rem; }
#responses .resp-text { white-space: normal; font-size: .92rem; line-height: 1.6; max-height: none; overflow: visible; position: relative; }
#responses .resp-text.clipped { max-height: 15.5em; overflow: hidden; }
#responses .resp-text.clipped::after { content: ''; position: absolute; inset: auto 0 0 0; height: 3.5em; background: linear-gradient(transparent, var(--surface-1)); }
#responses .resp-text p { margin: 0 0 .6rem; }
#responses .resp-text h4 { margin: .8rem 0 .35rem; font-size: .95rem; }
#responses .resp-text ul, #responses .resp-text ol { margin: 0 0 .6rem; padding-left: 1.3rem; }
#responses .resp-text li { margin: .15rem 0; }
#responses .resp-text .md-row { margin: 0 0 .25rem; font-size: .86rem; }
#responses .resp-text mark { background: color-mix(in srgb, var(--primary) 18%, transparent); padding: 0 .15em; border-radius: 4px; }
.cite-refs { white-space: nowrap; }
.cite-ref { display: inline-grid; place-items: center; min-width: 1.05rem; height: 1.05rem; margin-left: .12rem; padding: 0 .2rem; border-radius: 5px; font-size: .62rem; font-weight: 700; vertical-align: super; line-height: 1; background: var(--surface-2); color: var(--text-secondary); text-decoration: none; border: 1px solid var(--border); }
a.cite-ref:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.resp-more { margin: .1rem 0 .6rem; padding: .25rem .8rem; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-1); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; color: var(--text-primary); }
.resp-more:hover { background: var(--surface-2); }
#responses .resp-cites { margin-top: .4rem; padding-top: .65rem; border-top: 1px dashed var(--border); word-break: normal; }
.schip { font-size: .76rem; padding: .12rem .55rem; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-secondary); text-decoration: none; }
.schip span { opacity: .7; }
.schip:hover { color: var(--text-primary); border-color: var(--text-secondary); }
.schip.own { background: color-mix(in srgb, var(--primary) 14%, var(--surface-1)); border-color: color-mix(in srgb, var(--primary) 45%, transparent); color: var(--text-primary); font-weight: 600; }
.more-src { display: contents; }
.more-src summary { list-style: none; cursor: pointer; font-size: .76rem; font-weight: 700; padding: .12rem .55rem; border-radius: 99px; border: 1px dashed var(--border); }
.more-src summary::-webkit-details-marker { display: none; }
.more-src[open] summary { display: none; }

/* survol du super-éboueur */
.hero-fly { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; filter: drop-shadow(0 6px 8px rgba(29,41,57,.25)); }
.hero-fly .hero { transform: rotate(75deg); }
.hero-fly .hero .body { animation: none; }
.hero-fly .hero .cape { animation-duration: .25s; }
.hero-fly .speed { position: absolute; right: 80px; top: 40px; width: 70px; height: 16px; background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(47,111,220,.45) 3px 5px); border-radius: 6px; mask-image: linear-gradient(90deg, transparent, #000); -webkit-mask-image: linear-gradient(90deg, transparent, #000); }
.card:has(#table-prompts) { overflow: clip; }
.rstat.mid { background: color-mix(in srgb, var(--warning) 18%, var(--surface-1)); color: var(--text-primary); }
.resp-sort { display: block; margin-top: .2rem; font-size: .76rem; font-weight: 500; color: var(--text-secondary); }


/* en-tête condensé de « Visibilité IA » */
.hero-card { padding-top: 1rem; padding-bottom: 1.1rem; }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hero-title { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.hero-title h2 { margin: 0; font-size: 1.05rem; }
.hero-card .run-actions { display: flex; gap: .5rem; }
.hero-intro { margin: .7rem 0 0; }
.hero-card .verdict { margin: .9rem 0 0; padding: 0; border: 0; box-shadow: none; background: transparent; align-items: center; }
.hero-card .verdict:empty { display: none; }
.hero-card .verdict-icon { width: 2.6rem; height: 2.6rem; font-size: 1.15rem; }
.verdict-body { flex: 1 1 420px; min-width: 0; }
.hero-card .verdict p.verdict-head { margin: 0 0 .45rem; font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.verdict-head em { font-style: normal; font-weight: 800; color: var(--primary); }
.vstats { display: flex; flex-wrap: wrap; gap: .4rem; }
.vstat { display: inline-flex; align-items: baseline; gap: .35rem; font-size: .8rem; font-weight: 500; color: var(--text-secondary); padding: .2rem .65rem; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); }
.vstat b { font-size: .92rem; color: var(--text-primary); }
.vstat.comp b { color: var(--critical, #d64545); }
.hero-card #run-progress { margin-top: .8rem; }
.run-info { margin-top: 1rem; }
.run-info h3 { margin-top: 0; }
.run-info #run-estimate { margin: .3rem 0 .6rem; }


/* le méchant (concurrent n° 1) */
.vstat.comp { align-items: center; }
.villain { display: inline-block; line-height: 0; margin: -.35rem 0 -.35rem -.25rem; }
.villain .vcape { fill: #6b2fa3; transform-box: fill-box; transform-origin: 50% 0; animation: hero-cape .6s ease-in-out infinite alternate; }
.villain .vsuit, .villain .vleg { fill: #2a2433; stroke: #2a2433; }
.villain .vemb { fill: #b6e22e; }
.villain .vhorn { fill: #d64545; }
.villain .vskin { fill: #9fd36b; }
.villain .vbrow, .villain .vgrin { stroke: #1b1622; }
.villain .veye { fill: #d64545; }
.villain .vbody { transform-box: view-box; transform-origin: 50% 100%; animation: villain-cackle 1.1s ease-in-out infinite; }
.villain .vtrash { fill: #8a8f98; animation: villain-drop 1.8s ease-in infinite; }
@keyframes villain-cackle { 0%, 100% { transform: rotate(0) translateY(0); } 20% { transform: rotate(-4deg) translateY(-.6px); } 40% { transform: rotate(4deg) translateY(0); } 60% { transform: rotate(-3deg) translateY(-.6px); } }
@keyframes villain-drop { 0% { transform: translateY(-3px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(2px); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .villain * { animation: none !important; } }


/* méchante canette écrasée */
.villain .vcan { fill: #d64545; stroke: #8f1f1f; stroke-width: .6; stroke-linejoin: round; }
.villain .vdent { stroke: #f2c2c2; }
.villain .vband { stroke: #f4f4f4; opacity: .8; }
.villain .vlid { fill: #c9ced6; stroke: #7d848f; stroke-width: .4; }
.villain .vtab { fill: #9aa1ab; }
.villain .vbrow { stroke: #1b1622; }
.villain .veyew { fill: #fff6c2; }
.villain .veye { fill: #1b1622; }
.villain .vgrin { fill: #1b1622; }
.villain .vteeth { stroke: #fff; }
.villain .vdrip { fill: #8a4b1d; transform-box: fill-box; transform-origin: 50% 0; animation: can-drip 1.6s ease-in infinite; }
@keyframes can-drip { 0% { transform: translateY(-2px) scale(.4); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(4px) scale(1); opacity: 0; } }


/* canette furieuse : tremble de rage, fume, l'œil s'enflamme */
.villain { margin: -.5rem -.05rem -.5rem -.35rem; }
.villain .vbody { animation: can-rage 2.2s ease-in-out infinite; transform-box: view-box; transform-origin: 50% 85%; }
@keyframes can-rage {
  0%, 55%, 100% { transform: translate(0, 0) rotate(0); }
  60% { transform: translate(-.5px, 0) rotate(-3deg); } 65% { transform: translate(.5px, 0) rotate(3deg); }
  70% { transform: translate(-.5px, 0) rotate(-3deg); } 75% { transform: translate(.5px, 0) rotate(3deg); }
  80% { transform: translate(0, -.6px) rotate(0); }
}
.villain .cn-steam path { stroke: #c9ced6; opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; animation: stink-fume 1.4s ease-out infinite; }
.villain .cn-steam .s2 { animation-delay: .5s; }
.villain .cn-vein { transform-box: fill-box; transform-origin: center; animation: can-vein 1.1s ease-in-out infinite; }
@keyframes can-vein { 0%, 100% { transform: scale(.8); opacity: .6; } 50% { transform: scale(1.25); opacity: 1; } }
.villain .cn-pupil { animation: can-glare 2.2s ease-in-out infinite; }
@keyframes can-glare { 0%, 55%, 100% { fill: #c00; } 65%, 80% { fill: #ff2d2d; filter: drop-shadow(0 0 1.5px #ff2d2d); } }
.villain .vdrip { fill: #7a3e12; }


/* pile énervée : étincelles, regard qui s'allume, fuite d'acide */
.villain .pl-spark path { stroke: #ffe14d; opacity: 0; filter: drop-shadow(0 0 1.5px #ffd000); animation: pile-zap 2.2s steps(1) infinite; }
.villain .pl-spark .k2 { animation-delay: .15s; }
@keyframes pile-zap { 0%, 58% { opacity: 0; } 60%, 66% { opacity: 1; } 63% { opacity: .2; } 70%, 76% { opacity: 1; } 73% { opacity: 0; } 80%, 100% { opacity: 0; } }
.villain .pl-pupil { animation: can-glare 2.2s ease-in-out infinite; }
.villain .vdrip { fill: #b8e02e; }
