/* Design refait : light theme, sidebar claire, jauges circulaires, plus de respiration */
:root {
  --bg: #fafafb;
  --card: #ffffff;
  --border: #eceef2;
  --border-strong: #dfe3ea;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --muted-3: #cbd5e1;
  --accent: #ea5730;
  --accent-dark: #cf3f1c;
  --accent-soft: #fef3ef;
  --accent-line: #f5cec1;
  --sidebar-bg: #ffffff;
  --sidebar-hover: #f4f5f8;
  --green: #10b981;
  --green-soft: #ecfdf5;
  --green-line: #a7f3d0;
  --yellow: #f59e0b;
  --yellow-soft: #fffbeb;
  --yellow-line: #fde68a;
  --orange: #f97316;
  --orange-soft: #fff7ed;
  --orange-line: #fed7aa;
  --red: #ef4444;
  --red-soft: #fef2f2;
  --red-line: #fecaca;
  --gray-soft: #f3f4f6;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px -8px rgba(15, 23, 42, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}
h1, h2, h3, h4 { letter-spacing: -0.02em; }
a { color: inherit; }

/* ================= SIDEBAR ================= */
.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 24px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 8px 20px;
  border-bottom: 1px solid var(--border);
}
.logo {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent) 0%, #f97316 100%);
  color: white;
  font-weight: 700;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 10px -2px rgba(234, 87, 48, 0.35);
}
.brand-name { color: var(--text); font-weight: 600; font-size: 14px; line-height: 1.2; }
.brand-sub { color: var(--muted); font-size: 11px; margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-section {
  color: var(--muted-2);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 14px 12px 6px;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--radius-xs);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s;
  position: relative;
}
.nav-item:hover { background: var(--sidebar-hover); color: var(--text); }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
}
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.75; }
.nav-item.active svg { opacity: 1; }
.nav-item .badge {
  margin-left: auto;
  background: var(--gray-soft);
  color: var(--muted);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  min-width: 22px; text-align: center;
}
.nav-item.active .badge { background: var(--accent); color: white; }

.sidebar-foot { margin-top: auto; padding: 0 4px; }
.local-badge {
  display: flex; gap: 10px; align-items: center;
  padding: 12px 14px;
  background: var(--green-soft);
  border: 1px solid var(--green-line);
  border-radius: var(--radius-sm);
}
.local-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); } }
.local-txt { font-size: 12px; color: #065f46; }
.local-txt b { display: block; font-size: 13px; }

/* ================= MAIN ================= */
.main { min-width: 0; }
.topbar {
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.crumbs { display: flex; align-items: center; gap: 10px; font-size: 14px; min-width: 0; }
.crumb-root { font-weight: 600; color: var(--text); font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb-link { color: var(--muted); text-decoration: none; font-size: 13px; }
.crumb-link:hover { color: var(--accent); }
.crumb-sep { color: var(--muted-3); }
.crumb-count { color: var(--muted); font-size: 13px; font-weight: 400; }
.top-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.content { padding: 32px 40px 64px; max-width: 1240px; }

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent;
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  font-family: inherit;
  line-height: 1.4;
}
.btn svg { width: 14px; height: 14px; }
.btn-primary {
  background: var(--accent); color: white;
  box-shadow: 0 1px 2px rgba(234, 87, 48, 0.2), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: white; color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-outline:hover { border-color: var(--muted-3); background: var(--bg); }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-lg { padding: 11px 22px; font-size: 14px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  font-size: 12.5px;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.btn-ghost:hover { background: var(--gray-soft); color: var(--text); }
.btn-ghost svg { width: 14px; height: 14px; }

/* ================= EMPTY ================= */
.empty {
  text-align: center;
  padding: 100px 20px;
  color: var(--muted);
  background: white;
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
}
.empty svg { width: 48px; height: 48px; color: var(--muted-3); margin-bottom: 12px; }
.empty h2 { color: var(--text); margin: 0 0 8px; font-size: 20px; font-weight: 600; }
.empty p { margin: 0 0 24px; max-width: 380px; margin-left: auto; margin-right: auto; }

/* ================= DOCUMENTS LIST ================= */
.doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.doc-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 4px 1fr auto auto;
  align-items: center;
  overflow: hidden;
  transition: all 0.18s;
  box-shadow: var(--shadow-xs);
}
.doc-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); transform: translateY(-1px); }
.doc-color { height: 100%; min-height: 82px; align-self: stretch; }
.doc-main { padding: 18px 22px; min-width: 0; }
.doc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.doc-name {
  font-weight: 600; color: var(--text); text-decoration: none;
  font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 460px;
}
.doc-name:hover { color: var(--accent); }
.chip-id {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  background: var(--gray-soft);
  border-radius: 20px;
  color: var(--muted);
  font-size: 11.5px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.chip-id:hover { background: white; border-color: var(--border-strong); color: var(--text); }
.chip-id .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip-id svg { width: 11px; height: 11px; opacity: 0.6; }
.doc-meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; flex-wrap: wrap; }
.doc-meta .sep { color: var(--muted-3); }
.doc-score-block { padding: 18px 12px; text-align: center; }
.score-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.1px; margin-top: 6px; font-weight: 600; }
.doc-actions { padding: 18px 22px; display: flex; gap: 6px; align-items: center; }

/* ================= GAUGES / SCORES ================= */
.gauge {
  --size: 68px;
  --stroke: 6px;
  --p: 0;
  --color: var(--muted-2);
  width: var(--size); height: var(--size);
  border-radius: 50%;
  background:
    conic-gradient(var(--color) calc(var(--p) * 1%), var(--border) 0);
  display: grid;
  place-items: center;
  position: relative;
  transition: --p 0.6s;
}
.gauge::before {
  content: ""; position: absolute; inset: var(--stroke);
  background: white; border-radius: 50%;
}
.gauge-val { position: relative; font-weight: 700; font-size: 15px; letter-spacing: -0.03em; }
.gauge-val small { font-size: 10px; font-weight: 600; opacity: 0.7; margin-left: 1px; }
.gauge-green { --color: var(--green); }
.gauge-yellow { --color: var(--yellow); }
.gauge-orange { --color: var(--orange); }
.gauge-red { --color: var(--red); }
.gauge-gray { --color: var(--muted-2); }

/* Big score dashboard */
.score-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  padding: 32px 36px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}
.score-hero::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
}
.score-hero-green::before { background: var(--green); }
.score-hero-yellow::before { background: var(--yellow); }
.score-hero-orange::before { background: var(--orange); }
.score-hero-red::before { background: var(--red); }
.score-hero-gray::before { background: var(--muted-2); }
.gauge-lg {
  --size: 148px;
  --stroke: 12px;
}
.gauge-lg .gauge-val { font-size: 40px; }
.gauge-lg .gauge-val small { font-size: 16px; }
.hero-info { min-width: 0; }
.hero-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 600; }
.hero-verdict { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 8px; }
.hero-verdict-green { color: #065f46; }
.hero-verdict-yellow { color: #78350f; }
.hero-verdict-orange { color: #7c2d12; }
.hero-verdict-red { color: #7f1d1d; }
.hero-verdict-gray { color: var(--text-2); }
.hero-expl { color: var(--muted); font-size: 14px; max-width: 620px; }

/* ================= UPLOAD ================= */
.upload-wrap { max-width: 720px; margin: 0 auto; padding: 20px 0; }
.upload-form {
  background: white;
  border-radius: var(--radius);
  padding: 40px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.upload-form h1 { margin: 0 0 8px; font-size: 24px; font-weight: 700; letter-spacing: -0.025em; }
.upload-form .lead { color: var(--muted); margin: 0 0 28px; font-size: 14.5px; }
.drop {
  display: block;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg);
  position: relative;
  overflow: hidden;
  min-height: 140px;
  display: flex; align-items: center; justify-content: center;
}
.drop:hover, .drop.hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.005);
}
.drop.hover { transform: scale(1.015); box-shadow: 0 0 0 6px rgba(234,87,48,0.12); }
.drop.has-file {
  border-style: solid;
  border-color: var(--green-line);
  background: var(--green-soft);
  cursor: default;
}
.drop input[type=file] { display: none; }

/* Empty state */
.drop-empty { padding: 20px 0; }
.drop-empty svg { width: 36px; height: 36px; color: var(--muted-3); margin-bottom: 10px; transition: all 0.2s; }
.drop:hover .drop-empty svg { color: var(--accent); transform: translateY(-3px); }
.drop-txt { color: var(--text); font-size: 15px; margin-bottom: 4px; }
.drop-txt u { color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.drop-sub { font-size: 12px; color: var(--muted); }

/* Filled state (fichier chargé) */
.drop-filled {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 14px 8px 8px;
  width: 100%;
}
.drop-filled.anim { animation: dropIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes dropIn {
  0% { opacity: 0; transform: scale(0.95); }
  60% { transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}
.drop-check {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green); color: white;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  animation: checkBounce 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}
.drop-check svg { width: 22px; height: 22px; animation: checkDraw 0.4s 0.15s ease forwards; stroke-dasharray: 30; stroke-dashoffset: 30; }
@keyframes checkBounce {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
@keyframes checkDraw { to { stroke-dashoffset: 0; } }
.drop-file { flex: 1; text-align: left; min-width: 0; }
.drop-file-name {
  font-weight: 600; color: var(--text); font-size: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.drop-file-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 500; }
.drop-clear {
  background: white; border: 1px solid var(--border);
  width: 32px; height: 32px; border-radius: 50%;
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.drop-clear:hover { background: var(--red-soft); border-color: var(--red-line); color: var(--red); transform: rotate(90deg); }
.drop-clear svg { width: 16px; height: 16px; }

.drop-warn {
  position: absolute;
  left: 12px; right: 12px; bottom: 8px;
  padding: 6px 12px;
  background: var(--yellow-soft); border: 1px solid var(--yellow-line);
  color: #78350f; border-radius: var(--radius-xs);
  font-size: 12px; text-align: left;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.opts.opts-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 900px) { .opts, .opts.opts-3 { grid-template-columns: 1fr; } }
.opt-group-single { margin: 0 0 20px; }
.opt-group {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.opt-title { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: 1px; font-weight: 600; margin-bottom: 10px; }
.radio, .check {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 14px;
}
.radio input, .check input { accent-color: var(--accent); }
.check small, .radio small { color: var(--muted); }
.spinner {
  width: 20px; height: 20px;
  border: 3px solid var(--accent-line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= LIVE PROGRESS PANEL ================= */
.progress-panel {
  margin-top: 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.progress-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  margin-bottom: 16px;
}
.progress-label {
  font-size: 15px; font-weight: 600; color: var(--text);
  margin-bottom: 2px; letter-spacing: -0.01em;
}
.progress-msg { color: var(--muted); font-size: 13px; }
.progress-pct {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.progress-bar {
  height: 8px;
  background: var(--gray-soft);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #f97316 100%);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 0 8px rgba(234, 87, 48, 0.4);
}
.progress-bar-fill::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
}
@media (max-width: 640px) { .progress-steps { grid-template-columns: 1fr; } }
.pstep {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted-2);
  transition: color 0.2s;
}
.pstep-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gray-soft);
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
  position: relative;
  transition: all 0.25s;
}
.pstep.done { color: var(--text-2); }
.pstep.done .pstep-dot {
  background: var(--green);
  border-color: var(--green);
}
.pstep.done .pstep-dot::after {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/10px no-repeat;
}
.pstep.active { color: var(--accent); font-weight: 600; }
.pstep.active .pstep-dot {
  background: white;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(234, 87, 48, 0.15);
  animation: pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  50% { box-shadow: 0 0 0 6px rgba(234, 87, 48, 0.08); }
}

.progress-error {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--red-soft);
  border: 1px solid var(--red-line);
  color: #7f1d1d;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* ================= REPORT HEAD ================= */
.report-head {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}
.report-title-row { display: flex; align-items: center; gap: 16px; }
.doc-color-big {
  width: 44px; height: 44px; border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.2);
}
.report-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.report-meta {
  color: var(--muted); font-size: 12.5px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px;
}
.report-meta .sep { color: var(--muted-3); }

/* ================= TABS ================= */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab {
  padding: 12px 18px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.15s;
  white-space: nowrap;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ================= SYNTHESE ================= */
.synthese { display: flex; flex-direction: column; gap: 24px; }

.section-h {
  margin: 8px 0 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  font-weight: 600;
}

.modules { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .modules { grid-template-columns: 1fr; } }
.module {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.15s;
}
.module:hover { box-shadow: var(--shadow-sm); }
.module h2 { margin: 0 0 4px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.mod-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 14px; }
.mod-sub { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.5; }
.mod-stats { color: var(--text-2); font-size: 13.5px; margin: 4px 0 10px; }
.mod-stats b { color: var(--text); }
.mod-empty { color: var(--muted); font-size: 13px; margin: 0; }
.mod-actions { margin-top: 12px; display: flex; gap: 18px; }
.link {
  color: var(--accent); text-decoration: none;
  font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
}
.link:hover { text-decoration: underline; }
.link svg { width: 12px; height: 12px; }

.disclaimer {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: flex; gap: 10px; align-items: flex-start;
}
.disclaimer svg { width: 18px; height: 18px; flex-shrink: 0; color: #d97706; }
.disclaimer b { color: #713f12; }

/* ================= POINTS D'INTÉRÊT ================= */
.points {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  min-height: 60vh;
}
@media (max-width: 1000px) { .points { grid-template-columns: 1fr; } }
.points-left {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-xs);
}
.points-toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding-bottom: 16px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
}
.chip {
  padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0;
  border: 1px solid;
}
.chip-green { background: var(--green-soft); color: #065f46; border-color: var(--green-line); }
.chip-yellow { background: var(--yellow-soft); color: #78350f; border-color: var(--yellow-line); }
.chip-orange { background: var(--orange-soft); color: #7c2d12; border-color: var(--orange-line); }
.chip-red { background: var(--red-soft); color: #7f1d1d; border-color: var(--red-line); }

.text-render {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
  font-family: "Charter", "Iowan Old Style", Georgia, serif;
}
.sent { padding: 2px 2px; border-radius: 4px; cursor: pointer; transition: all 0.15s; border-bottom: 2px solid transparent; }
.sent-green {}
.sent-yellow { background: var(--yellow-soft); border-bottom-color: var(--yellow-line); }
.sent-orange { background: var(--orange-soft); border-bottom-color: var(--orange-line); }
.sent-red { background: var(--red-soft); border-bottom-color: var(--red-line); }
.sent:hover { outline: 2px solid var(--accent); outline-offset: 2px; }
.sent.selected {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(234, 87, 48, 0.1);
}

.points-right {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  position: sticky;
  top: 92px;
  height: fit-content;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: var(--shadow-xs);
}
.side-empty { padding: 60px 24px; text-align: center; color: var(--muted); }
.side-empty svg { width: 42px; height: 42px; color: var(--muted-3); margin-bottom: 10px; }
.side-empty p { margin: 0; font-size: 13px; }
.side-header {
  padding: 18px 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}
.side-green { background: linear-gradient(135deg, var(--green), #059669); color: white; }
.side-yellow { background: linear-gradient(135deg, var(--yellow), #d97706); color: white; }
.side-orange { background: linear-gradient(135deg, var(--orange), #ea580c); color: white; }
.side-red { background: linear-gradient(135deg, var(--red), #dc2626); color: white; }
.side-score { font-size: 34px; font-weight: 700; line-height: 1; }
.side-score small { font-size: 14px; opacity: 0.9; margin-left: 2px; }
.side-verdict { font-size: 13px; opacity: 0.95; font-weight: 500; }
.side-body { padding: 20px 22px; }
.side-body h3 { font-size: 10px; text-transform: uppercase; color: var(--muted); letter-spacing: 1.2px; margin: 16px 0 8px; font-weight: 600; }
.side-body h3:first-child { margin-top: 0; }
.side-reasons { margin: 0; padding-left: 18px; }
.side-reasons li { margin: 4px 0; font-size: 13.5px; }
.side-body dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.side-body dt { color: var(--muted); font-size: 12px; }
.side-body dd { margin: 0; font-size: 13px; font-family: ui-monospace, "SF Mono", Consolas, monospace; }
.side-body blockquote {
  margin: 14px 0 0; padding: 12px 16px;
  background: var(--bg); border-left: 3px solid var(--accent);
  font-style: italic; font-size: 13.5px;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-family: "Charter", "Iowan Old Style", Georgia, serif;
  color: var(--text-2);
}

/* ================= SCORE BREAKDOWN ================= */
.breakdown .bd-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.bd-row {
  display: grid;
  grid-template-columns: 180px 1fr 160px;
  gap: 14px;
  align-items: center;
  font-size: 13.5px;
}
@media (max-width: 720px) { .bd-row { grid-template-columns: 1fr; gap: 4px; } }
.bd-name { color: var(--text-2); font-weight: 500; }
.bd-bar {
  position: relative;
  height: 20px;
  background: var(--gray-soft);
  border-radius: 10px;
  overflow: hidden;
}
.bd-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #f97316);
  border-radius: 10px;
  transition: width 0.5s ease;
}
.bd-val {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-weight: 700; color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  font-variant-numeric: tabular-nums;
}
.bd-weight {
  color: var(--muted); font-size: 12px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  text-align: right;
}

/* ================= STRUCTURAL SIGNALS GRID ================= */
.signals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.sig-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s;
}
.sig-card:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.sig-val {
  font-size: 24px; font-weight: 700; letter-spacing: -0.03em;
  color: var(--text); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.sig-val small { font-size: 13px; opacity: 0.6; margin-left: 1px; }
.sig-lab { font-size: 13px; font-weight: 500; color: var(--text-2); margin-top: 6px; }
.sig-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.signal-list { margin: 8px 0 0; padding-left: 18px; }
.signal-list li { color: var(--text-2); font-size: 13px; margin: 2px 0; }

/* ================= TIMELINE VERTICALE (points d'intérêt) ================= */
.points {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 52px 340px !important;
  gap: 14px !important;
}
@media (max-width: 1180px) {
  .points { grid-template-columns: 1fr !important; }
  .timeline { display: none !important; }
}
.timeline {
  position: sticky;
  top: 92px;
  align-self: start;
  height: calc(100vh - 112px);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  display: flex; flex-direction: column;
  padding: 10px 6px;
}
.tl-header { padding: 4px 4px 8px; text-align: center; }
.tl-title { font-size: 9px; font-weight: 700; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.tl-sub { font-size: 10px; color: var(--muted-2); font-variant-numeric: tabular-nums; margin-top: 2px; }
.tl-bars-wrap { flex: 1; position: relative; overflow: hidden; margin: 4px 2px; }
.tl-bars {
  display: flex; flex-direction: column; gap: 1px;
  height: 100%;
  border-radius: 4px;
}
.tl-bar {
  min-height: 3px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  border-radius: 2px;
  position: relative;
}
.tl-bar:hover { transform: scaleX(1.6); box-shadow: 0 0 0 1px rgba(0,0,0,0.05); z-index: 2; }
.tl-bar.tl-visible { outline: 2px solid var(--accent); outline-offset: -1px; z-index: 3; }
.tl-green { background: var(--green-line); }
.tl-yellow { background: var(--yellow); }
.tl-orange { background: var(--orange); }
.tl-red { background: var(--red); }
.tl-viewport {
  position: absolute; left: -2px; right: -2px;
  border: 1.5px solid var(--accent); border-radius: 4px;
  background: rgba(234, 87, 48, 0.06);
  pointer-events: none;
  transition: top 0.15s ease-out, height 0.15s ease-out;
  z-index: 4;
  top: 0; height: 30px;
}
.tl-legend {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 6px 0 2px;
  font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.tl-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.tl-tooltip {
  position: absolute;
  background: var(--text); color: white;
  padding: 8px 12px; border-radius: var(--radius-xs);
  font-size: 12px; max-width: 260px;
  box-shadow: var(--shadow-lg);
  transform: translateX(-100%);
  z-index: 100;
  pointer-events: none;
}
.tl-tt-score { font-weight: 700; font-size: 14px; color: var(--accent-line); margin-bottom: 3px; }
.tl-tt-txt { line-height: 1.4; }

kbd {
  background: var(--gray-soft); border: 1px solid var(--border-strong);
  border-radius: 3px; padding: 1px 5px; font-size: 11px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}

/* ================= PILLS & Doc list badges ================= */
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 500; border: 1px solid;
}
.pill-warn { background: var(--yellow-soft); color: #78350f; border-color: var(--yellow-line); }
.pill-neutral { background: var(--gray-soft); color: var(--muted); border-color: var(--border-strong); }
.doc-name-dim { color: var(--muted) !important; }

/* ================= MODAL de confirmation typed-name ================= */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
}
.modal-backdrop[hidden] { display: none !important; }
.modal-backdrop.closing { animation: fadeOut 0.18s ease forwards; }
.modal-backdrop.closing .modal { animation: modalOut 0.18s ease forwards; }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes modalOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-8px) scale(0.98); } }

/* ================= AUTH PAGE (split-screen) ================= */
body.auth-page {
  display: block;
  background: #0e1120;
  overflow-x: hidden;
}

.auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 960px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-hero { display: none !important; }
}

/* ==== Panneau gauche (hero) ==== */
.auth-hero {
  background:
    radial-gradient(ellipse at top left, rgba(234,87,48,0.20) 0%, transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(124,58,237,0.16) 0%, transparent 55%),
    linear-gradient(135deg, #0e1120 0%, #1a1f36 100%);
  color: white;
  padding: 48px 56px 40px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.auth-bg-shapes {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.shape {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.5;
  animation: floatSlow 12s ease-in-out infinite;
}
.shape-1 { top: -80px; right: -80px; width: 300px; height: 300px; background: radial-gradient(circle, rgba(234,87,48,0.6), transparent); }
.shape-2 { bottom: 80px; left: -60px; width: 280px; height: 280px; background: radial-gradient(circle, rgba(124,58,237,0.5), transparent); animation-delay: -4s; }
.shape-3 { top: 40%; right: 20%; width: 200px; height: 200px; background: radial-gradient(circle, rgba(16,185,129,0.35), transparent); animation-delay: -8s; }
@keyframes floatSlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.08); }
}

.auth-brand {
  display: flex; gap: 14px; align-items: center;
  position: relative;
  margin-bottom: 60px;
}
.auth-logo {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--accent) 0%, #f97316 100%);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; letter-spacing: 0.5px;
  color: white; font-size: 15px;
  box-shadow: 0 8px 24px -4px rgba(234, 87, 48, 0.55);
}
.auth-brand-name { color: white; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.auth-brand-sub { color: rgba(255,255,255,0.55); font-size: 12px; margin-top: 2px; }

.auth-pitch {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column;
  justify-content: center;
  max-width: 460px;
}
.auth-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(234, 87, 48, 0.15);
  border: 1px solid rgba(234, 87, 48, 0.35);
  border-radius: 999px;
  color: #fdb693;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
  align-self: flex-start;
}
.auth-headline {
  font-size: 44px; font-weight: 800;
  line-height: 1.08; letter-spacing: -0.03em;
  margin: 0 0 16px;
  color: white;
}
.auth-headline-accent {
  background: linear-gradient(135deg, #fdb693 0%, #ea5730 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-lead {
  font-size: 15px; line-height: 1.6;
  color: rgba(255,255,255,0.72);
  margin: 0 0 32px;
}
.auth-lead b { color: white; font-weight: 600; }

.auth-features {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.auth-features li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  transition: all 0.2s;
}
.auth-features li:hover { background: rgba(255,255,255,0.07); border-color: rgba(234,87,48,0.3); transform: translateX(2px); }
.auth-features svg {
  width: 20px; height: 20px;
  color: var(--accent);
  flex-shrink: 0; margin-top: 1px;
}
.auth-features b { color: white; font-weight: 600; font-size: 13.5px; display: block; margin-bottom: 2px; }
.auth-features span { color: rgba(255,255,255,0.55); font-size: 12.5px; }

.auth-hero-foot {
  position: relative;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 20px;
}

/* ==== Panneau droit (form) ==== */
.auth-panel {
  background: white;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.auth-form-wrap {
  width: 100%; max-width: 380px;
}
.auth-crumb { margin-bottom: 24px; }
.auth-step {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent-dark);
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.auth-title {
  font-size: 28px;
  font-weight: 800; letter-spacing: -0.03em;
  margin: 0 0 8px;
  color: var(--text);
}
.auth-subtitle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 28px;
}

.auth-error {
  display: flex; gap: 10px; align-items: center;
  padding: 12px 14px;
  background: var(--red-soft);
  border: 1px solid var(--red-line);
  color: #7f1d1d;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
  animation: shake 0.4s ease;
}
.auth-error svg { width: 18px; height: 18px; flex-shrink: 0; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.1px;
}
.auth-input-wrap {
  position: relative;
}
.auth-input-ico {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--muted-2);
  pointer-events: none;
  transition: color 0.15s;
}
.auth-input-wrap input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14.5px; font-family: inherit;
  color: var(--text);
  background: white;
  transition: all 0.15s;
}
.auth-input-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(234, 87, 48, 0.12);
}
.auth-input-wrap:focus-within .auth-input-ico { color: var(--accent); }

.auth-eye {
  position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  padding: 6px; cursor: pointer;
  color: var(--muted-2); border-radius: 6px;
  transition: all 0.15s;
}
.auth-eye:hover { color: var(--text); background: var(--gray-soft); }
.auth-eye svg { width: 18px; height: 18px; display: block; }

.auth-hint {
  font-size: 11.5px;
  color: var(--muted);
  padding-left: 2px;
}

.auth-cta {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 16px;
  background: linear-gradient(135deg, var(--accent) 0%, #f97316 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 14px -2px rgba(234, 87, 48, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.15s;
}
.auth-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -2px rgba(234, 87, 48, 0.5), inset 0 1px 0 rgba(255,255,255,0.2); }
.auth-cta:active { transform: translateY(0); }
.auth-cta svg { width: 16px; height: 16px; transition: transform 0.15s; }
.auth-cta:hover svg { transform: translateX(3px); }

.auth-cta-alt {
  background: white;
  color: var(--text);
  border: 1.5px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.auth-cta-alt:hover { background: var(--bg); border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow-sm); }

.auth-sep {
  display: flex; align-items: center; gap: 12px;
  margin: 6px 0;
  color: var(--muted); font-size: 12px;
}
.auth-sep::before, .auth-sep::after {
  content: ""; flex: 1;
  height: 1px; background: var(--border);
}

.auth-foot {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px; line-height: 1.55;
  display: flex; gap: 8px; align-items: flex-start;
}
.auth-foot svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; color: var(--muted-2); }
.auth-foot small { color: var(--muted-2); }
.auth-foot code { background: var(--gray-soft); padding: 1px 6px; border-radius: 3px; font-size: 11.5px; font-family: ui-monospace, "SF Mono", Consolas, monospace; }

/* ================= USER BOX (sidebar) ================= */
.user-box {
  display: flex; gap: 10px; align-items: center;
  padding: 10px;
  background: var(--gray-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: white; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  text-transform: uppercase;
  flex-shrink: 0;
}
.user-info { min-width: 0; flex: 1; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-logout {
  background: none; border: none; padding: 0;
  color: var(--muted); font-size: 11px;
  cursor: pointer; text-decoration: underline;
  font-family: inherit;
}
.user-logout:hover { color: var(--accent); }

.uploader-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px 2px 3px;
  background: var(--gray-soft);
  border-radius: 999px;
  font-size: 11px; color: var(--text-2);
  font-weight: 500;
}
.uploader-avatar {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); color: white;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  text-transform: uppercase;
}

/* ================= FILTER BAR ================= */
.filter-bar { margin-bottom: 16px; }
.filter-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search-wrap {
  position: relative; flex: 1; min-width: 240px;
}
.search-wrap input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white; font-size: 14px; font-family: inherit;
  color: var(--text);
  box-shadow: var(--shadow-xs);
}
.search-wrap input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.search-ico {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--muted-2);
  pointer-events: none;
}
.user-filter {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white; font-size: 13px; font-family: inherit;
  color: var(--text);
  cursor: pointer;
}

/* ================= BULK ACTION BAR ================= */
.bulk-bar {
  position: sticky; top: 78px;
  background: var(--text);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  z-index: 5;
  animation: slideDown 0.2s ease;
}
.bulk-info { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.bulk-info b { font-size: 15px; font-weight: 700; }
.bulk-info .btn-ghost { color: rgba(255,255,255,0.75); font-size: 12px; padding: 2px 8px; }
.bulk-info .btn-ghost:hover { background: rgba(255,255,255,0.1); color: white; }
.bulk-actions { display: flex; gap: 6px; }
.bulk-actions .btn-outline { background: transparent; color: white; border-color: rgba(255,255,255,0.25); }
.bulk-actions .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); color: white; }

/* ================= CHECKBOXES sur doc-card ================= */
.doc-list-head {
  padding: 4px 8px 6px;
  font-size: 12px; color: var(--muted);
}
.check-all { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.check-all input { accent-color: var(--accent); }
.doc-card {
  grid-template-columns: 42px 4px 1fr auto auto !important;
}
.doc-check {
  display: flex; align-items: center; justify-content: center;
  padding: 0 8px; cursor: pointer;
  min-height: 82px;
}
.doc-check input {
  accent-color: var(--accent);
  width: 16px; height: 16px;
  cursor: pointer;
}
.doc-card.selected { background: var(--accent-soft); }
.doc-card.selected .doc-color { box-shadow: inset 3px 0 0 var(--accent); }

/* ================= EXPAND INLINE ================= */
.doc-expanded {
  grid-column: 1 / -1;
  padding: 16px 24px 20px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  animation: expandDown 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.doc-expanded[hidden] { display: none; }
.doc-expanded.collapsing { animation: collapseUp 0.2s ease forwards; }
@keyframes expandDown {
  from { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
  to { opacity: 1; max-height: 2000px; }
}
@keyframes collapseUp {
  from { opacity: 1; max-height: 2000px; }
  to { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
}
.expand-loading, .expand-error {
  display: flex; align-items: center; gap: 12px;
  padding: 20px; color: var(--muted);
  justify-content: center;
}
.expand-error { color: var(--red); }
.partial-wrap { display: flex; flex-direction: column; gap: 16px; }
.partial-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.chev { transition: transform 0.2s ease; }
.signatures-alert-sm { padding: 14px 18px; }
.signatures-alert-sm .sa-title { font-size: 15px; }
.signatures-alert-sm .sa-score { font-size: 28px; }
.signatures-alert-sm .sa-score small { font-size: 14px; }

/* ================= PARAGRAPHES (retranscription) ================= */
.para {
  margin: 0 0 16px;
  padding: 12px 14px 12px 16px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border);
  background: white;
  transition: background 0.15s;
}
.para-green { border-left-color: var(--green-line); }
.para-yellow { border-left-color: var(--yellow); background: #fffdf4; }
.para-orange { border-left-color: var(--orange); background: #fff9f3; }
.para-red { border-left-color: var(--red); background: #fef5f5; }
.para-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
  font-size: 12px;
  color: var(--muted);
}
.para-num {
  font-weight: 700; color: var(--muted);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12px;
  min-width: 42px;
}
.para-score.gauge-mini {
  --size: 34px;
  --stroke: 4px;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.para-score.gauge-mini small { font-size: 9px; margin-left: 1px; }
.para-words { margin-left: auto; }
.para-body {
  font-family: "Charter", "Iowan Old Style", Georgia, serif;
  font-size: 15.5px; line-height: 1.85;
}

/* ================= BOUTONS icon+label ================= */
.btn-icon {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 6px 10px 6px 8px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-icon:hover { background: var(--gray-soft); border-color: var(--border-strong); color: var(--text); }
.btn-icon svg { width: 14px; height: 14px; }
.btn-icon .btn-lbl { font-size: 12.5px; }

/* ================= DOC LIST — badges détaillés ================= */
.doc-badges {
  display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap;
}
.pill-green { background: var(--green-soft); color: #065f46; border: 1px solid var(--green-line); }
.pill-yellow { background: var(--yellow-soft); color: #78350f; border: 1px solid var(--yellow-line); }
.pill-orange { background: var(--orange-soft); color: #7c2d12; border: 1px solid var(--orange-line); }
.pill-red { background: var(--red-soft); color: #7f1d1d; border: 1px solid var(--red-line); font-weight: 600; }
.pill-gray { background: var(--gray-soft); color: var(--muted); border: 1px solid var(--border); }

/* ================= SIGNATURES LLM alert ================= */
.signatures-alert {
  background: linear-gradient(135deg, var(--red) 0%, #b91c1c 100%);
  color: white;
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: 0 8px 24px -8px rgba(239, 68, 68, 0.4);
  animation: slideDown 0.3s ease;
}
.sa-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 14px; }
.sa-title { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sa-title svg { width: 22px; height: 22px; }
.sa-sub { margin: 6px 0 0; opacity: 0.92; font-size: 13px; }
.sa-score { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.sa-score small { font-size: 18px; opacity: 0.85; margin-left: 2px; }
.sa-hits { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.sa-hits li {
  background: rgba(255,255,255,0.14);
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  display: flex; gap: 10px; align-items: center;
  font-size: 13px;
}
.sa-tag {
  background: rgba(255,255,255,0.22);
  padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
  white-space: nowrap;
}
.sa-hits code {
  background: transparent; color: white;
  font-family: "Charter", Georgia, serif; font-style: italic;
  font-size: 13px; opacity: 0.95;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; min-width: 0;
}
.sa-more { justify-content: center; font-style: italic; opacity: 0.8; }
.sa-unicode {
  margin-top: 12px; padding: 8px 12px;
  background: rgba(0,0,0,0.2); border-radius: var(--radius-xs);
  font-size: 12px;
}

/* Banner langue */
.banner {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px; border-radius: var(--radius-sm);
  animation: slideDown 0.3s ease;
}
.banner svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.banner-warn { background: var(--yellow-soft); border: 1px solid var(--yellow-line); color: #78350f; }
.banner-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.banner-info svg { color: #3b82f6; }
.banner b { font-weight: 700; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: white;
  border-radius: var(--radius);
  max-width: 480px; width: 92%;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px 12px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.modal-body { padding: 20px 22px; }
.modal-body p { margin: 0 0 14px; color: var(--text-2); }
.modal-warn {
  background: var(--red-soft); border: 1px solid var(--red-line);
  color: #7f1d1d; padding: 8px 12px;
  border-radius: var(--radius-xs);
  font-size: 12.5px; font-weight: 600;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.modal-warn::before { content: "⚠"; }
.modal-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.modal-label input {
  display: block; width: 100%;
  margin-top: 6px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  font-size: 14px; font-family: inherit;
  color: var(--text);
}
.modal-label input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.modal-hint {
  font-size: 12px; color: var(--muted); margin-top: 8px;
}
.modal-hint code {
  background: var(--gray-soft);
  padding: 2px 8px; border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12px; color: var(--text);
  user-select: all;
}
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--border);
}

/* ================= POINTS D'INTÉRÊT — enrichissements ================= */
.legend { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nav-arrows { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-arrows button { padding: 4px 10px; font-size: 14px; line-height: 1; }
.points-toolbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
}

.minimap {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.minimap-title {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--muted); font-weight: 600; margin-bottom: 10px;
}
.minimap-bars {
  display: flex; align-items: flex-end; gap: 2px;
  min-height: 44px;
}
.mm-bar {
  flex: 1;
  min-width: 3px;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  opacity: 0.55;
}
.mm-bar:hover { opacity: 1; transform: scaleY(1.15); }
.mm-bar.mm-visible { opacity: 1; box-shadow: 0 0 0 2px white, 0 0 0 3px var(--accent); z-index: 1; position: relative; }
.mm-green { background: var(--green); }
.mm-yellow { background: var(--yellow); }
.mm-orange { background: var(--orange); }
.mm-red { background: var(--red); }

/* ================= SOURCES ================= */
.sources, .grammar {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-xs);
}
.sources h2, .grammar h2 { margin: 0 0 14px; font-size: 18px; font-weight: 700; }
.sources > p, .grammar > p { color: var(--muted); }
.src-table, .gram-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.src-table th, .gram-table th {
  text-align: left; padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
}
.src-table td, .gram-table td { padding: 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.src-table tr:last-child td, .gram-table tr:last-child td { border-bottom: none; }
.src-path { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12px; color: var(--muted); word-break: break-all; }
.src-shingles code {
  display: inline-block; background: var(--bg); padding: 3px 8px; border-radius: 4px;
  font-size: 11px; margin: 2px 4px 2px 0; border: 1px solid var(--border);
}
.src-shingles small { color: var(--muted); font-size: 11px; }

/* ================= SOURCES — sub-sections ================= */
.src-h3 {
  font-size: 13px; font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.src-h3:first-of-type { margin-top: 12px; }
.src-link {
  color: var(--accent); text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 500;
}
.src-link:hover { text-decoration: underline; }
.src-link svg { width: 12px; height: 12px; opacity: 0.6; }

.web-group {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 10px 0;
  background: var(--bg);
}
.web-passage {
  margin: 0 0 12px;
  padding: 6px 12px;
  background: var(--yellow-soft);
  border-left: 3px solid var(--yellow);
  font-style: italic;
  font-size: 13px;
  color: #78350f;
  border-radius: 0 4px 4px 0;
}
.web-results { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.web-results li { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.web-results li:last-child { border-bottom: none; }
.web-snippet { font-size: 13px; color: var(--text-2); margin: 4px 0; line-height: 1.5; }
.web-url { font-size: 11px; color: var(--muted); font-family: ui-monospace, "SF Mono", Consolas, monospace; overflow: hidden; text-overflow: ellipsis; }

/* ================= HEATMAP + CONTRAST + INTERVIEW ================= */
.side-actions {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.side-actions .btn { justify-content: flex-start; font-size: 12.5px; padding: 8px 12px; }
.hm-loading, .hm-empty, .hm-error {
  padding: 12px; text-align: center;
  color: var(--muted); font-size: 13px;
  background: var(--bg); border-radius: var(--radius-xs);
}
.hm-error { color: var(--red); }
.hm-legend {
  font-size: 11px; color: var(--muted);
  display: flex; align-items: center; gap: 6px; margin: 8px 0 6px;
}
.hm-sw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; }
.hm-sw.hm-lo { background: rgba(220, 38, 38, 0.9); }
.hm-sw.hm-hi { background: rgba(220, 38, 38, 0.15); border: 1px solid var(--border); }
.hm-tokens {
  font-family: "Charter", Georgia, serif;
  font-size: 14px; line-height: 1.9;
  padding: 10px 12px;
  background: var(--bg); border-radius: var(--radius-xs);
}
.hm-tok {
  padding: 1px 2px;
  border-radius: 2px;
  color: var(--text);
}

.contrast-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.contrast-list li { background: var(--green-soft); border: 1px solid var(--green-line); padding: 10px 12px; border-radius: var(--radius-xs); }
.contrast-sim { font-size: 11px; font-weight: 700; color: #065f46; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.contrast-list blockquote {
  margin: 0 0 6px; padding: 0;
  font-style: italic; font-size: 13px; color: #065f46;
  font-family: "Charter", Georgia, serif;
}
.contrast-src {
  font-size: 10px; color: var(--muted);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}

/* ================= INTERVIEW GRID ================= */
.interview { display: flex; flex-direction: column; gap: 20px; }
.interview-head { padding: 24px; background: white; border: 1px solid var(--border); border-radius: var(--radius); }
.interview-head h1 { margin: 0 0 8px; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.interview-head .lead { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.interview-meta { display: flex; gap: 8px; flex-wrap: wrap; }

.q-list { padding-left: 22px; margin: 12px 0 0; }
.q-list li { padding: 4px 0; color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.q-list-numbered { padding-left: 24px; }

.q-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
  border-left: 4px solid var(--muted-3);
}
.q-card-yellow { border-left-color: var(--yellow); }
.q-card-orange { border-left-color: var(--orange); background: #fffbf6; }
.q-card-red { border-left-color: var(--red); background: #fef8f8; }
.q-card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.q-reasons { color: var(--muted); font-size: 12px; }
.q-passage {
  margin: 10px 0; padding: 10px 14px;
  background: var(--yellow-soft); border-left: 3px solid var(--yellow);
  font-style: italic; font-size: 13.5px; color: #78350f;
  font-family: "Charter", Georgia, serif;
  border-radius: 0 4px 4px 0;
}
.q-keywords { margin: 8px 0; font-size: 12.5px; color: var(--muted); }
.q-kw-label { margin-right: 6px; font-weight: 600; }
.q-keywords code {
  background: var(--gray-soft); padding: 2px 8px; border-radius: 4px;
  margin: 0 4px 4px 0; font-size: 11.5px; color: var(--text);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  display: inline-block;
}

/* ================= MEMOIR QUALITY ================= */
.memoir { display: flex; flex-direction: column; gap: 20px; }
.mq-remarks { margin: 0; padding-left: 20px; }
.mq-remarks li { color: var(--text-2); font-size: 14px; margin: 4px 0; line-height: 1.5; }
.mq-check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.mq-check-list li { font-size: 14px; padding: 3px 0; }
.mq-check-list li.ok { color: #065f46; }
.mq-check-list li.ko { color: #7f1d1d; font-weight: 500; }
.mq-check-list li.ko small { color: var(--red); font-weight: 400; margin-left: 4px; }
.mq-stat { color: var(--text-2); font-size: 14px; }
.mq-stat b { color: var(--text); font-weight: 700; font-size: 16px; }
.mq-refs-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px; margin-top: 10px;
}
.mq-refs-grid > div {
  padding: 10px 12px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); text-align: center;
}
.mq-refs-grid b { font-size: 20px; font-weight: 700; color: var(--accent); display: block; line-height: 1; }
.mq-refs-grid span { font-size: 11px; color: var(--muted); font-family: ui-monospace, "SF Mono", Consolas, monospace; margin-top: 4px; display: block; }
.mq-issues { margin: 0; padding-left: 0; list-style: none; }
.mq-issues li {
  padding: 8px 12px; background: var(--yellow-soft); color: #78350f;
  border: 1px solid var(--yellow-line); border-radius: var(--radius-xs);
  margin: 4px 0; font-size: 13.5px;
}

/* ================= GRAMMAR ================= */
.gram-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 24px; }
.gram-stat {
  background: var(--bg); padding: 10px 16px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  display: flex; align-items: baseline; gap: 8px;
}
.gram-stat b { font-size: 20px; color: var(--accent); font-weight: 700; letter-spacing: -0.02em; }
.gram-stat span { color: var(--muted); font-size: 12px; text-transform: capitalize; }
.gram-table code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  background: var(--bg); padding: 3px 8px; border-radius: 4px;
  font-size: 12px; border: 1px solid var(--border);
}
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 500; text-transform: capitalize; border: 1px solid;
}
.tag-orthographe { background: var(--red-soft); color: #7f1d1d; border-color: var(--red-line); }
.tag-grammaire { background: var(--orange-soft); color: #7c2d12; border-color: var(--orange-line); }
.tag-ponctuation { background: var(--yellow-soft); color: #78350f; border-color: var(--yellow-line); }
.tag-style { background: var(--green-soft); color: #065f46; border-color: var(--green-line); }

/* icons default */
.ic { width: 16px; height: 16px; display: inline-block; vertical-align: middle; }

/* ---------------------------------------------------------------------------
   Formulaire verrouillé pendant l'analyse.
   Les options partent au serveur au moment du clic sur « Lancer » : les
   laisser cliquables ensuite ferait croire qu'on peut encore les modifier.
   --------------------------------------------------------------------------- */
.upload-form.is-locked .opts,
.upload-form.is-locked .opt-group-single {
  opacity: 0.5;
  filter: grayscale(0.35);
  pointer-events: none;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.upload-form.is-locked .drop {
  pointer-events: none;
  opacity: 0.6;
  border-style: solid;
}

.upload-form.is-locked .drop:hover {
  transform: none;
  box-shadow: none;
}

/* Le bouton reste visible pour montrer que l'analyse est bien lancée. */
.upload-form.is-locked .btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
