/* CamTrust key screens — Détecteur home/analyzing/result, CamVerify, modules. Loaded after app.css. */

.card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 1.1rem;
}
.card__title .icon { color: var(--green); }

.empty-state { color: var(--muted); font-size: 0.92rem; }

/* ---------- Détecteur: upload ---------- */

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  padding: 32px 20px;
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 122, 61, 0.07), transparent 70%),
    var(--bg);
  transition: border-color 0.15s, background-color 0.15s;
}
.upload-zone:hover { border-color: var(--green-400); }
.upload-zone.is-dragover { border-color: var(--green); background-color: var(--green-bg); }

.upload-zone__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-bg);
  color: var(--green);
  box-shadow: 0 0 0 8px rgba(0, 122, 61, 0.06);
}
.upload-zone__icon .icon { width: 30px; height: 30px; }

.drop-hint { margin: 14px 0 0; color: var(--muted); }

.history-item__thumb { border-radius: var(--r-md); box-shadow: var(--shadow-1); }

/* ---------- Détecteur: analyzing (scan-line over the preview) ---------- */

.analyzing { text-align: center; }

.scan-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
}
.analyzing__preview { display: block; margin: 0 auto; background: var(--ink-900); }

.scan-frame__line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--green-400);
  box-shadow: 0 0 18px 6px rgba(43, 182, 115, 0.45);
  animation: scan 2.2s ease-in-out infinite alternate;
}
.analyzing__preview[hidden] + .scan-frame__line { display: none; }

@keyframes scan { from { top: 0; } to { top: calc(100% - 3px); } }

@media (prefers-reduced-motion: reduce) {
  .scan-frame__line { animation: none; top: 50%; }
}

/* ---------- Détecteur: result ---------- */

.card--dark {
  background: linear-gradient(160deg, var(--ink-800), var(--ink-900));
  color: var(--on-dark);
  box-shadow: var(--shadow-2);
}

.gauge__track { stroke: var(--ink-700); }
.gauge__arc { stroke: var(--green); transition: stroke-dashoffset 1.1s cubic-bezier(0.2, 0.8, 0.2, 1); }

@media (prefers-reduced-motion: reduce) {
  .gauge__arc { transition: none; }
}

.card--dark .gauge__score {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: #fff;
  margin-top: -36px;
}
.card--dark .gauge__label,
.card--dark .confidence-label { color: var(--on-dark-muted); }

.verdict-chip { padding: 10px 18px; font-size: 1.05rem; margin-top: 16px; }

.explanation-card h2 { font-size: 1.4rem; }
.explanation-card .lang-switch { float: right; margin-left: 12px; font-size: 0.82rem; gap: 6px; padding-left: 10px; }

.accordion { border-radius: var(--r-md); }
.accordion__toggle { background: var(--bg); }

/* ---------- Action / module cards (CamVerify landing, modules page) ---------- */

.action-card, .module-card { text-align: left; }

.action-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--green-bg);
  color: var(--green);
  margin-bottom: 12px;
}
.action-card__icon .icon { width: 26px; height: 26px; }
.action-card--institution .action-card__icon { background: #e7edf5; color: var(--ink-600); }

.action-card h2, .module-card h2 { font-size: 1.2rem; margin: 0 0 6px; }

.module-card { display: flex; flex-direction: column; align-items: flex-start; transition: transform 0.15s, box-shadow 0.15s; }
.module-card .btn { margin-top: auto; }
.module-card:not(.is-disabled):hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.module-card.is-disabled { background: var(--bg); box-shadow: none; border-color: var(--border); }
.module-card.is-disabled .action-card__icon { background: var(--border); color: var(--muted); }
.module-card.is-disabled h2, .module-card.is-disabled p { color: var(--muted); }

.tier-card__badge--live { background: var(--green-bg); color: var(--green); }
.tier-card__badge--proto { background: var(--amber-bg); color: var(--amber); }

/* ---------- CamVerify ---------- */

@media (min-width: 600px) {
  .camverify-landing .tier-cards { grid-template-columns: repeat(2, 1fr); align-items: start; }
}

.camverify-method input[type="text"],
.camverify-method input[type="file"],
.camverify-unlock input {
  font: inherit;
  width: 100%;
  padding: 10px 12px;
  margin: 6px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
}

.camverify-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-left: 5px solid currentColor;
}
.issuer-documents__row .camverify-status { margin-bottom: 0; border-left-width: 3px; padding: 6px 10px; font-size: 0.85rem; }

.issuer-documents__row { background: var(--card-bg); transition: border-color 0.15s, box-shadow 0.15s; }
.issuer-documents__row:hover { border-color: var(--green-400); box-shadow: var(--shadow-1); }

/* ---------- How it works ---------- */

.how-page .card { margin: 12px 0; }

/* ---------- CamVerify PDFs ---------- */

.issuer-stamp__page {
  display: block;
  width: 100%;
  margin: 6px 0 4px;
  padding: 10px 12px;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--card-bg);
}

.camverify-document__open { margin-top: 10px; }
