/* ══════════════════════════════════════════════════════
   results.css – Blocs de résultats : badges, score,
   signaux, conseil, résultats image (Claude Vision)
   ══════════════════════════════════════════════════════ */

/* ── Bloc résultat ──────────────────────────────────── */
.res {
  border-radius: var(--r);
  padding: 1.6rem;
  margin-top: 1.2rem;
  display: none;
  animation: up 0.4s ease;
}
@keyframes up {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.res-safe {
  background: var(--safe-bg);
  border: 2px solid rgba(22, 163, 74, 0.25);
}
.res-danger {
  background: var(--danger-bg);
  border: 2px solid rgba(220, 38, 38, 0.25);
}
.res-warning {
  background: var(--warn-bg);
  border: 2px solid rgba(217, 119, 6, 0.25);
}

/* ── En-tête du résultat ────────────────────────────── */
.res-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.95rem;
}
.res-badge {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.res-badge svg {
  width: 26px;
  height: 26px;
  stroke-width: 2.2;
}
.rb-safe {
  background: var(--safe-bg);
  color: var(--safe);
}
.rb-danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.rb-warning {
  background: var(--warn-bg);
  color: var(--warn);
}
.res-title {
  font-size: 1.2rem;
  font-weight: 800;
}
.res-safe .res-title {
  color: var(--safe);
}
.res-danger .res-title {
  color: var(--danger);
}
.res-warning .res-title {
  color: var(--warn);
}
.res-cat {
  font-size: 0.78rem;
  color: var(--gray);
  margin-top: 0.15rem;
}

/* ── Barre de score ─────────────────────────────────── */
.res-score {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.sc-lbl {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-sub);
  white-space: nowrap;
}
.sc-bar {
  flex: 1;
  height: 10px;
  background: #e5e7eb;
  border-radius: 5px;
  overflow: hidden;
}
.sc-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 1s ease;
}
.sf-safe {
  background: linear-gradient(90deg, #4ade80, #16a34a);
}
.sf-danger {
  background: linear-gradient(90deg, #f87171, #dc2626);
}
.sf-warning {
  background: linear-gradient(90deg, #fbbf24, #d97706);
}
.sc-pct {
  font-weight: 800;
  font-size: 0.97rem;
  min-width: 42px;
  text-align: right;
}

/* ── Explication & signaux ──────────────────────────── */
.res-expl {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-sub);
  margin-bottom: 0.95rem;
}
.res-sigs {
  list-style: none;
  margin-bottom: 0.85rem;
}
.res-sigs li {
  font-size: 0.9rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.55;
  color: var(--text-sub);
}
.res-sigs li:last-child {
  border: none;
}
.sig-i {
  width: 19px;
  height: 19px;
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 0.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sig-i svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.8;
}
.si-ok {
  background: var(--safe-bg);
  color: var(--safe);
}
.si-bad {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ── Bloc conseil ───────────────────────────────────── */
.res-adv {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  color: var(--text-sub);
  line-height: 1.6;
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}
.adv-ico {
  color: var(--pink);
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.adv-ico svg {
  width: 17px;
  height: 17px;
}

/* ── Résultats image (Claude Vision) ────────────────── */
.img-results {
  display: none;
  animation: up 0.4s ease;
  margin-top: 1.2rem;
}
.img-result-card {
  background: #fff;
  border-radius: var(--r-sm);
  padding: 1.2rem 1.4rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--sh);
  border: 1px solid var(--border);
}
.img-result-card.card-safe {
  border-left: 4px solid var(--safe);
}
.img-result-card.card-warn {
  border-left: 4px solid var(--warn);
}
.img-result-card.card-danger {
  border-left: 4px solid var(--danger);
}
.irc-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.irc-ico {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.irc-ico svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}
.irc-ico.safe {
  background: var(--safe-bg);
  color: var(--safe);
}
.irc-ico.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.irc-ico.danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.irc-title {
  font-size: 0.97rem;
  font-weight: 800;
  color: var(--text);
}
.irc-bar-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.5rem;
}
.irc-bar {
  flex: 1;
  height: 10px;
  background: #e5e7eb;
  border-radius: 5px;
  overflow: hidden;
}
.irc-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 1s ease;
}
.irc-pct {
  font-weight: 800;
  font-size: 0.92rem;
  min-width: 40px;
  text-align: right;
}
.irc-verdict {
  font-size: 0.87rem;
  color: var(--text-sub);
  line-height: 1.55;
  margin-top: 0.3rem;
}
.img-advice {
  background: var(--pink-lt);
  border-radius: var(--r-sm);
  padding: 0.95rem 1.1rem;
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.6;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.img-advice svg {
  width: 17px;
  height: 17px;
  color: var(--pink);
  flex-shrink: 0;
  margin-top: 0.1rem;
}
