:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-soft: #1f2937;
  --line: #374151;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #60a5fa;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

[hidden] { display: none !important; }
.analysis-card-grid, .analysis-score-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.analysis-signal { min-width: 0; padding: 16px; border: 1px solid var(--line); border-left: 4px solid #fbbf24; border-radius: 10px; background: var(--panel-soft); }
.analysis-signal.signal-high { border-left-color: #f87171; }
.analysis-signal.signal-low { border-left-color: #34d399; }
.analysis-signal h4 { margin: 6px 0 10px; }
.signal-icon { font-size: 1.4rem; }
.analysis-badge { display: inline-block; margin: 0 8px 8px 0; padding: 4px 10px; border-radius: 20px; font-size: .75rem; font-weight: 700; }
.analysis-badge.risk-high { background: #3a2722; color: #fca5a5; }
.analysis-badge.risk-medium { background: #342e1f; color: #fbbf24; }
.analysis-badge.risk-low { background: #1f3022; color: #9ad575; }
.analysis-badge.risk-unknown { background: #28312b; color: #bac5bc; }
.analysis-score-grid p { margin: 8px 0; padding: 12px; background: var(--panel-soft); border-radius: 8px; }
.analysis-metric { font-size: .8rem; color: var(--muted); }
.analysis-recommendations { padding: 0; list-style: none; }
.analysis-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px; }
.analysis-charts > h3 { grid-column: 1 / -1; }
.analysis-chart { min-width: 0; }
.analysis-chart-frame { position: relative; height: 280px; }
.analysis-chart canvas { max-width: 100%; }
.analysis-next-step { padding: 10px; border-left: 3px solid var(--primary); }
@media (max-width: 700px) {
  .analysis-card-grid, .analysis-score-grid { grid-template-columns: 1fr; }
  .analysis-section-detail { padding: 12px; }
}

.analysis-full { grid-column: 1 / -1; min-width: 0; }
.analysis-details { min-width: 0; line-height: 1.6; overflow-wrap: anywhere; }
.analysis-section-detail { margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.analysis-section-detail > summary { cursor: pointer; font-weight: 700; }
.analysis-section-detail h3, .analysis-opportunity h4 { margin: 0 0 12px; }
.analysis-opportunity { margin: 14px 0; padding: 14px; border-left: 3px solid var(--primary); background: var(--panel-soft); border-radius: 8px; }
.analysis-fields { margin: 12px 0; }
.analysis-field { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 3fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.analysis-field dt { font-weight: 600; }
.analysis-field dd { min-width: 0; margin: 0; }
.analysis-field .analysis-field { display: block; }
.analysis-field .analysis-field dt { margin-bottom: 4px; }
.analysis-items { margin: 0; padding-left: 22px; }
.analysis-items > li { padding: 5px 0; }
.analysis-empty { color: var(--muted); }
.analysis-text { white-space: pre-wrap; }
.analysis-details a { color: var(--primary); }
#analysis-details-panel { padding: 20px; margin: 20px 0; }
@media (max-width: 600px) {
  .analysis-field { grid-template-columns: 1fr; gap: 4px; }
  .analysis-section-detail, .analysis-opportunity { padding: 12px; }
}
@media print {
  .analysis-details { color: #172117; }
  .analysis-section-detail, .analysis-opportunity { background: white; border-color: #cbd5cb; }
  .analysis-opportunity { break-inside: avoid; }
  .analysis-empty, .analysis-details a { color: #39483c; }
  .analysis-raw { display: none; }
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(180deg, #0b1020 0%, #111827 100%);
  color: var(--text);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 16px 80px;
}

.topbar {
  margin-bottom: 24px;
}

h1 {
  margin: 0;
  font-size: 2rem;
}

.panel,
.card {
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 20px;
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

.row {
  display: flex;
  gap: 12px;
}

input {
  flex: 1;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f172a;
  color: var(--text);
  font-size: 1rem;
}

button {
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #08111d;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.08);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  padding: 20px;
}

.card.full {
  grid-column: 1 / -1;
}

h2 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 1.2rem;
}

h3 {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list li {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.status {
  min-height: 24px;
  margin-bottom: 16px;
  color: var(--muted);
}

pre {
  margin-top: 12px;
  background: #050b16;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: bold;
}

.badge.low { background: rgba(52, 211, 153, 0.12); color: var(--success); }
.badge.medium { background: rgba(251, 191, 36, 0.12); color: var(--warning); }
.badge.high { background: rgba(248, 113, 113, 0.12); color: var(--danger); }

@media (max-width: 640px) {
  .row {
    flex-direction: column;
  }
}

  :root {
    --bg: #0c1713;
    --panel: #111f19;
    --panel-soft: #192920;
    --line: #283a30;
    --text: #ecf3e8;
    --muted: #96a89a;
    --primary: #c2ef7a;
    --success: #9ad575;
    --warning: #ecc46d;
    --danger: #e98b7c;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  }

  body.auth-page,
  body.dashboard-page,
  body.report-page {
    min-height: 100vh;
    color: var(--text);
    background: #0c1713;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }

  [hidden] { display: none !important; }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #eef6e9;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: -0.03em;
  }
  .brand small { display: block; margin-top: 3px; color: #899e8d; font-size: 0.66rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
  .brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 13px;
    background: #c2ef7a;
    color: #122117;
    font-size: 1.3rem;
    font-weight: 850;
  }
  .eyebrow { margin: 0 0 9px; color: #a9d87a; font-size: 0.67rem; font-weight: 800; letter-spacing: 0.15em; }

  .auth-page { background: radial-gradient(ellipse at 50% 0%, #172d21 0%, #0c1713 55%); }
  .auth-shell { display: flex; min-height: 100vh; width: min(100% - 36px, 480px); margin: 0 auto; flex-direction: column; justify-content: center; padding: 48px 0 25px; }
  .auth-shell > .brand { margin-bottom: 58px; }
  .auth-intro { margin-bottom: 28px; }
  .auth-intro h1 { max-width: 470px; margin: 0 0 15px; font-size: clamp(2rem, 7vw, 3.1rem); line-height: 1.08; letter-spacing: -0.06em; }
  .auth-intro > p:last-child { max-width: 440px; color: var(--muted); line-height: 1.7; }
  .auth-card { padding: 10px 25px 26px; border: 1px solid #2a3d31; border-radius: 18px; background: rgba(18, 32, 24, 0.92); box-shadow: var(--shadow); }
  .auth-tabs { display: flex; margin: 0 -25px 24px; padding: 0 20px; border-bottom: 1px solid var(--line); }
  .auth-tab { flex: 1; padding: 16px 8px 14px; border-radius: 0; border-bottom: 2px solid transparent; background: transparent; color: #8ea091; font-size: 0.88rem; }
  .auth-tab.active { border-bottom-color: var(--primary); color: #eaf4e6; }
  .auth-form h2 { margin: 0 0 20px; font-size: 1.25rem; }
  .auth-form label { margin: 14px 0 7px; color: #d4e1d4; font-size: 0.82rem; }
  .auth-form input { width: 100%; border: 1px solid #33473a; border-radius: 9px; background: #0d1912; color: white; font-size: 0.94rem; }
  .button-primary, .button-secondary { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 10px; padding: 0 18px; border: 0; border-radius: 9px; background: var(--primary); color: #172414; font-size: 0.84rem; font-weight: 800; text-decoration: none; transition: transform 0.16s ease, filter 0.16s ease; }
  .button-primary:hover, .button-secondary:hover { transform: translateY(-1px); filter: brightness(1.04); }
  .button-primary:disabled { cursor: wait; opacity: 0.65; transform: none; }
  .auth-form .button-primary { width: 100%; margin-top: 24px; }
  .button-primary.compact { min-height: 42px; }
  .button-secondary { border: 1px solid #395141; background: #1a2b20; color: #deebdc; }
  .auth-footer { margin-top: 24px; color: #75887a; font-size: 0.75rem; text-align: center; }
  .notice.error { color: #ffb4a8; }

  .app-shell { display: grid; min-height: 100vh; grid-template-columns: 242px minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; overflow-y: auto; padding: 27px 16px 18px; border-right: 1px solid #223229; background: #0d1913; }
  .sidebar .brand { padding: 0 7px; }
  .nav-label { margin: 49px 10px 13px; color: #75877a; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.13em; }
  .main-nav { display: grid; gap: 5px; }
  .nav-link { display: flex; min-height: 43px; align-items: center; gap: 12px; padding: 0 12px; border-radius: 8px; color: #9aad9d; font-size: 0.82rem; text-decoration: none; }
  .nav-link > span { width: 18px; color: #93a997; font-size: 1rem; text-align: center; }
  .nav-link:hover, .nav-link.active { background: #1a2b20; color: #eaf5e6; }
  .nav-link.active { box-shadow: inset 2px 0 #c2ef7a; }
  .sidebar-bottom { margin-top: auto; padding-top: 15px; border-top: 1px solid #223229; }
  .workspace-switch { display: flex; align-items: center; gap: 10px; padding: 5px 6px 14px; font-size: 0.78rem; font-weight: 700; }
  .workspace-switch small { display: block; margin-top: 3px; color: #829687; font-size: 0.68rem; font-weight: 500; }
  .workspace-avatar, .topbar-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: #263c2c; color: #d2f4a2; font-weight: 750; }
  .logout-button { width: 100%; padding: 10px 8px; background: transparent; color: #98a99a; font-size: 0.76rem; text-align: left; }
  .dashboard-main { min-width: 0; }
  .dashboard-topbar { display: flex; min-height: 72px; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 4vw, 55px); border-bottom: 1px solid #223229; background: #101d16; }
  .dashboard-topbar > div:first-child { display: grid; gap: 4px; font-size: 0.82rem; }
  .crumb { color: #819284; font-size: 0.7rem; }
  .topbar-right { display: flex; align-items: center; gap: 9px; color: #a5b3a6; font-size: 0.73rem; }
  .status-dot { width: 7px; height: 7px; border-radius: 50%; background: #a8de71; box-shadow: 0 0 11px #95cb65; }
  .topbar-avatar { width: 31px; height: 31px; margin-left: 9px; font-size: 0.8rem; }
  .content-wrap { width: min(100%, 1320px); margin: 0 auto; padding: 39px clamp(20px, 4vw, 55px) 30px; }
  .page-heading, .section-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
  .page-heading { margin-bottom: 27px; }
  .page-heading h1 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.1rem); letter-spacing: -0.05em; }
  .page-heading h1 span { color: #b6e677; font-size: 1rem; vertical-align: top; }
  .page-heading > div > p:last-child, .section-title > div > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 0.82rem; }
  .stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 40px; }
  .stat-card { min-width: 0; padding: 17px 18px 18px; border: 1px solid #27382e; border-radius: 12px; background: linear-gradient(145deg, #14231a, #111e17); }
  .stat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #a1b1a4; font-size: 0.72rem; }
  .stat-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 9px; background: #21382a; color: #b9e87d; font-size: 1rem; }
  .stat-icon.green { background: #21382a; color: #b9e87d; }
  .stat-card > strong { display: block; margin: 15px 0 5px; color: #eef5e9; font-size: 1.75rem; letter-spacing: -0.05em; }
  .stat-card > strong .unit { color: #829486; font-size: 0.84rem; font-weight: 500; }
  .stat-card > small { color: #829486; font-size: 0.68rem; }
  .stat-card > small .positive { color: #b3e27d; font-weight: 700; }
  .analysis-section, .history-section { margin-top: 25px; }
  .section-title { margin-bottom: 16px; }
  .section-title h2 { margin: 0; font-size: 1.12rem; letter-spacing: -0.025em; }
  .section-title .eyebrow { margin-bottom: 6px; }
  .section-title > div > p:last-child { font-size: 0.76rem; }
  .section-badge { padding: 7px 10px; border: 1px solid #334c38; border-radius: 20px; color: #b7dc8b; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; }
  .analysis-form { padding: 20px; border: 1px solid #2b3c31; border-radius: 13px; background: #14221a; }
  .analysis-form label { margin-bottom: 9px; color: #dce8d9; font-size: 0.8rem; }
  .analysis-input-row { display: flex; align-items: center; gap: 10px; }
  .analysis-input-row > span { margin-left: 4px; color: #849989; }
  .analysis-input-row input { min-width: 0; border: 1px solid #34483a; background: #0d1912; font-size: 0.85rem; }
  .analysis-input-row .button-primary { white-space: nowrap; }
  .manual-content { margin-top: 14px; color: #94a797; font-size: 0.74rem; }
  .manual-content summary { cursor: pointer; }
  .manual-content textarea { width: 100%; min-height: 84px; margin-top: 9px; padding: 12px; border: 1px solid #34483a; border-radius: 9px; background: #0d1912; color: var(--text); font: inherit; }
  .status-message { min-height: 20px; margin: 11px 2px 0; color: #a7d77a; font-size: 0.76rem; }
  .status-message.is-error { color: #f2a394; }
  .result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 13px 0 34px; scroll-margin-top: 18px; }
  .result-card { padding: 19px; border: 1px solid #2b3c31; border-radius: 12px; background: #14221a; }
  .result-card h3 { margin: 0 0 14px; font-size: 0.96rem; }
  .result-card .eyebrow { margin-bottom: 7px; }
  .risk-pill, .risk-label { display: inline-block; padding: 5px 9px; border: 1px solid #46503a; border-radius: 20px; background: #2d3020; color: #e5d279; font-size: 0.68rem; font-weight: 750; }
  .risk-pill.risk-high, .risk-label.risk-critique, .risk-label.risk-eleve { border-color: #583c34; background: #3a2722; color: #f1a18d; }
  .risk-pill.risk-low, .risk-label.risk-faible { border-color: #324a35; background: #1f3022; color: #b8df91; }
  .risk-pill.risk-unknown, .risk-label.risk-unknown { border-color: #46504b; background: #28312b; color: #bac5bc; }
  .result-note, .prospect-card > p { color: #96a99a; font-size: 0.76rem; line-height: 1.6; }
  .evidence-excerpt { display: block; margin-top: 5px; color: #94a99a; font-size: 0.7rem; font-style: italic; line-height: 1.55; }
  .prospect-card .button-secondary { margin-top: 7px; }
  .history-section { margin-top: 37px; }
  .text-link, .row-link { color: #b7e584; font-size: 0.75rem; text-decoration: none; }
  .history-table-wrap { overflow: auto; border: 1px solid #2a3c31; border-radius: 12px; background: #132119; }
  .history-table { width: 100%; border-collapse: collapse; font-size: 0.73rem; }
  .history-table th, .history-table td { padding: 13px 14px; border-bottom: 1px solid #27382d; text-align: left; white-space: nowrap; }
  .history-table th { color: #829587; font-size: 0.64rem; font-weight: 650; }
  .history-table td { color: #becdc0; }
  .history-table tbody tr:last-child td { border-bottom: 0; }
  .history-table td:first-child { max-width: 390px; overflow: hidden; text-overflow: ellipsis; }
  .history-table td:first-child a { color: #dae8d7; text-decoration: none; }
  .site-favicon { display: inline-grid; width: 25px; height: 25px; margin-right: 8px; place-items: center; border-radius: 7px; background: #263c2b; color: #c5eb91; font-weight: 750; }
  .risk-label { padding: 4px 8px; font-size: 0.65rem; }
  .empty-state { padding: 38px 20px; border: 1px dashed #334a38; border-radius: 12px; color: #9eafa0; text-align: center; }
  .empty-state > span { color: #b6e677; font-size: 1.4rem; }
  .empty-state h3 { margin: 10px 0 7px; color: #dce8da; font-size: 0.96rem; }
  .empty-state p { margin: 0 0 12px; font-size: 0.76rem; }
  .empty-state a { color: #b6e677; font-size: 0.76rem; text-decoration: none; }
  .dashboard-footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 33px; color: #708275; font-size: 0.67rem; }
  .dashboard-footer a { color: #b6e677; text-decoration: none; }

  .app-shell > .report-shell { width: min(100% - 36px, 850px); margin: 0 auto; padding: 28px 0 40px; }
  .report-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid #2a3c31; }
  .report-hero { padding: 42px 0 27px; }
  .report-hero h1 { margin: 0 0 8px; font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -0.05em; }
  .report-hero > a { color: #b7e584; font-size: 0.85rem; }
  .report-hero > p:last-child, .report-section > p:not(.eyebrow) { max-width: 680px; color: #a1b1a3; font-size: 0.83rem; line-height: 1.7; }
  .report-section { margin-top: 26px; padding: 20px; border: 1px solid #2b3c31; border-radius: 12px; background: #14221a; }
  .report-section h2 { margin: 0 0 14px; font-size: 1rem; }
  .report-disclosure { margin-top: 12px; border-top: 1px solid #2b3c31; color: #c9d7c9; }
  .report-disclosure > summary { padding: 13px 2px 4px; color: #dce9d9; font-size: .82rem; font-weight: 700; cursor: pointer; }
  .report-disclosure > summary::marker { color: #b7e584; }
  .report-disclosure-content { padding-top: 12px; }
  .report-role-list { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-left: 18px; }
  .report-summary { margin-top: 0; }
  .report-executive-summary { margin: 16px 0 0; color: #dce9d9; font-size: .88rem; line-height: 1.55; }
  .report-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; }
  .report-summary-grid > div { min-width: 0; }
  .report-summary-grid dt { color: #a5b5a7; font-size: .76rem; }
  .report-summary-grid dd { margin: 4px 0 0; color: #e6f0df; font-size: .86rem; font-weight: 600; overflow-wrap: anywhere; }
  .report-indicators { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0; }
  .report-indicators > div { min-width: 0; padding: 10px; border-radius: 8px; background: #101b14; }
  .report-indicators dt { color: #a5b5a7; font-size: .72rem; }
  .report-indicators dd { margin: 4px 0 0; color: #e6f0df; font-size: .82rem; font-weight: 650; overflow-wrap: anywhere; }
  .decision-highlights { display: grid; gap: 8px; margin-top: 12px; }
  .decision-highlights > p, .decision-highlight { margin: 0; padding: 9px 11px; border-radius: 8px; background: #101b14; color: #c9d7c9; font-size: .78rem; line-height: 1.5; overflow-wrap: anywhere; }
  .decision-highlight h3 { margin: 0 0 5px; color: #e6f0df; font-size: .8rem; }
  .decision-highlight p { margin: 5px 0; }
  .decision-highlight blockquote { margin: 6px 0; color: #c9d7c9; font-size: .76rem; }
  .decision-highlight a, #decision-evidence a { color: #b7e584; overflow-wrap: anywhere; }
  .report-contacts-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; }
  .report-contacts-list > div { min-width: 0; }
  .report-contacts-list dt { color: #a5b5a7; font-size: .76rem; }
  .report-contacts-list dd { margin: 4px 0; color: #e6f0df; font-size: .86rem; font-weight: 600; overflow-wrap: anywhere; }
  .report-contacts-list a { color: #b7e584; font-size: .75rem; overflow-wrap: anywhere; }
  .report-contacts-list blockquote { margin: 6px 0; color: #a1b1a3; font-size: .74rem; }
  .report-appendix { margin-top: 24px; }
  .report-appendix > summary { padding: 14px; border: 1px solid #2b3c31; border-radius: 10px; background: #14221a; }
  .report-appendix[open] > summary { border-radius: 10px 10px 0 0; }
  .report-summary-grid .report-list { margin-top: 6px; }
  .report-list { display: grid; gap: 10px; margin: 0; padding-left: 19px; color: #c9d7c9; font-size: 0.8rem; line-height: 1.55; }
  .report-actions button,
.sales-draft-card button {
    flex: 0 0 auto; min-height: 40px; padding: 8px 12px; border: 1px solid #395141; border-radius: 8px;
    background: #14221a; color: #dce9d9; cursor: pointer;
  }
  .report-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 14px 0; }
  .report-filters label, .report-instruction { display: grid; gap: 6px; color: #a5b5a7; font-size: .78rem; }
  .report-filters input, .report-filters select, .report-instruction textarea, .sales-draft-card textarea {
    width: 100%; min-height: 40px; padding: 9px; border: 1px solid #395141; border-radius: 8px;
    background: #101b14; color: #e6f0df; font: inherit;
  }
  .report-card-list { display: grid; gap: 12px; }
  .report-claim-card,
.sales-draft-card,
.report-business-profile {
    min-width: 0; padding: 15px; border: 1px solid #2b3c31; border-radius: 10px; background: #101b14;
  }
  .report-claim-card h3,
.sales-draft-card h3 { margin: 10px 0; font-size: .9rem; }
  .report-claim-card h3,
.sales-draft-card h3,
.report-business-profile h3 { color: #e6f0df; }
  .report-card-heading { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
  .report-category, .report-risk { padding: 4px 8px; border-radius: 999px; font-size: .68rem; }
  .report-category { background: #263c2b; color: #dce9d9; }
  .report-risk { color: #142018; }
  .risk-1 { background: #9bd18a; }.risk-2 { background: #f3dc75; }.risk-3 { background: #f6aa63; }.risk-4 { background: #ef7777; }
  .report-claim-card p,
.report-business-profile p { color: #c9d7c9; font-size: .78rem; line-height: 1.55; overflow-wrap: anywhere; }
  .report-claim-card blockquote { margin: 10px 0; padding-left: 12px; border-left: 2px solid #8caf67; color: #c9d7c9; font-size: .78rem; }
  .report-claim-card a { color: #b7e584; overflow-wrap: anywhere; }
  .report-muted, .report-disclaimer { color: #a1b1a3 !important; }
  .report-business-profile { margin-bottom: 12px; }
  .report-business-profile h3 { margin-top: 0; }
  .report-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
  .report-actions button:hover,
.sales-draft-card button:hover { border-color: #b7e584; }
  .report-correction-controls { display: grid; gap: 6px; margin: 8px 0; }
  .report-correction-controls input, .report-correction-controls textarea { width: 100%; min-height: 36px; padding: 7px; border: 1px solid #395141; border-radius: 7px; background: #101b14; color: #e6f0df; font: inherit; }
  .report-correction-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
  .report-correction-actions button { min-height: 34px; padding: 5px 10px; border: 1px solid #395141; border-radius: 7px; background: #14221a; color: #dce9d9; cursor: pointer; }
  .report-correction-actions button:disabled { cursor: wait; opacity: .65; }
  .report-correction-status { color: #b7e584; font-size: .72rem; }
  .report-correction-history { margin-top: 20px; }
  .report-correction-history h3 { font-size: .88rem; }
  .report-correction-entry { color: #a5b5a7; font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
  .report-instruction { margin-top: 14px; }
  .sales-draft-card textarea { min-height: 90px; resize: vertical; color: #e6f0df; }
  .sales-draft-card button { margin-top: 8px; }
  .sales-history-list { margin-top: 12px; }
  .report-pipeline-form { margin: 16px 0; }

  @media (max-width: 1050px) {
    .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 700px) {
    .app-shell { display: block; }
    .sidebar { position: static; height: auto; padding: 13px 15px 9px; border-right: 0; border-bottom: 1px solid #223229; }
    .sidebar .brand { margin-bottom: 11px; }
    .nav-label { display: none; }
    .sidebar-bottom { display: block; margin-top: 12px; padding-top: 10px; }
    .main-nav { display: flex; flex-wrap: wrap; gap: 4px; }
    .nav-link { min-height: 37px; flex: 0 0 auto; padding: 0 10px; font-size: 0.7rem; }
    .nav-link > span { display: none; }
    .dashboard-topbar { min-height: 58px; padding: 0 17px; }
    .topbar-right { font-size: 0; }
    .topbar-avatar { font-size: 0.8rem; }
    .content-wrap { padding: 26px 16px 25px; }
    .page-heading { align-items: flex-start; }
    .page-heading > .button-primary { padding: 0 11px; font-size: 0.7rem; white-space: nowrap; }
    .stats-grid { gap: 9px; }
    .stat-card { padding: 13px; }
    .stat-head { font-size: 0.65rem; }
    .stat-card > strong { font-size: 1.45rem; }
    .analysis-input-row { flex-wrap: wrap; }
    .analysis-input-row > span { display: none; }
    .analysis-input-row input { flex-basis: 100%; }
    .analysis-input-row .button-primary { width: 100%; }
    .result-grid { grid-template-columns: 1fr; }
    .section-title { align-items: flex-start; }
    .section-badge { display: none; }
    .history-table th, .history-table td { padding: 11px 9px; }
    .history-table td:first-child { max-width: 190px; }
    .history-table td:nth-child(3), .history-table th:nth-child(3) { display: none; }
    .report-section { padding: 15px; }
    .report-summary-grid { gap: 10px; }
    .report-contacts-list { grid-template-columns: 1fr; gap: 10px; }
    .report-indicators { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .report-indicators > div:last-child { grid-column: 1 / -1; }
    .report-filters label { flex: 1 1 100%; }
    .report-card-heading { align-items: flex-start; }
    .report-role-list { grid-template-columns: 1fr; }
  }
  @media print {
    @page { size: A4; margin: 10mm; }
    body.report-page { background: #fff; color: #172117; }
    .app-shell { display: block; }
    .app-shell > .report-shell, .report-shell { width: 100%; padding: 0; }
    .sidebar { display: none; }
    .report-header { padding-bottom: 6px; }
    .report-hero { padding: 12px 0 8px; }
    .report-hero h1 { font-size: 1.6rem; }
    .report-hero > p { margin: 4px 0; }
    .report-section { margin-top: 7px; padding: 10px 12px; break-inside: auto; page-break-inside: auto; }
    /* Grandes sections coupables (sinon une page blanche les précède) ; titres jamais seuls en bas de page. */
    .report-section h2, .report-section h3, .report-section h4 { break-after: avoid; page-break-after: avoid; }
    .report-section li, .report-section blockquote { break-inside: avoid; page-break-inside: avoid; }
    .report-section .lead-card { break-inside: auto; page-break-inside: auto; }
    .report-section h2 { margin-bottom: 7px; font-size: .9rem; }
    .report-section > p:not(.eyebrow), .report-executive-summary { font-size: .72rem; line-height: 1.35; }
    .report-indicators { gap: 5px; }
    .report-indicators > div, .decision-highlights > p, .decision-highlight { padding: 5px 7px; }
    .report-summary-grid { gap: 6px 12px; }
    .report-appendix { break-before: page; page-break-before: always; }
    .report-appendix > summary { display: none; }
    .report-appendix > .report-disclosure-content,
    .report-appendix .report-disclosure > .report-disclosure-content { display: block !important; }
    .report-appendix .report-disclosure > summary { display: none; }
    .report-header,
.report-section { border-color: #cbd5cb; background: #fff; }
    .report-claim-card,
.sales-draft-card,
.report-business-profile { border-color: #cbd5cb; background: #fff; }
    .report-actions button,
.sales-draft-card button { background: #fff; color: #172117; border-color: #cbd5cb; }
    .report-filters, .report-actions, .report-pipeline-form, .report-correction-controls { display: none; }
    .report-header .brand,
.report-hero h1,
.report-section h2 { color: #172117; }
    .report-summary-grid dt { color: #526052; }
    .report-summary-grid dd { color: #172117; }
    .report-hero > a, .report-hero > p:last-child, .report-section > p:not(.eyebrow), .report-list { color: #39483c; }
    .report-claim-card h3,
.sales-draft-card h3,
.report-business-profile h3,
.report-claim-card p,
.sales-draft-card textarea,
.report-business-profile p,
.report-claim-card blockquote,
.report-muted,
.report-disclaimer { color: #172117 !important; }
    .sales-draft-card textarea { background: #fff; border-color: #cbd5cb; }
    .report-category { background: #fff; color: #172117; border: 1px solid #cbd5cb; }
    .report-claim-card a { color: #1d4d29; }
    .no-print { display: none !important; }
    .report-disclosure > summary { display: none; }
    .report-disclosure-content { display: block !important; }
    .dashboard-footer { color: #526052; }
  }
.feedback { margin-left: .5rem; }
.list blockquote { margin: .25rem 0; color: #9ca3af; font-size: .85rem; }

.prospect-list-controls {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.prospect-list-controls form { display: flex; align-items: end; gap: 8px; }
.prospect-list-controls > a.button-secondary { display: inline-flex; align-items: center; text-decoration: none; }
.prospect-list-controls label, .prospect-filter { color: #9ca99b; font-size: .75rem; }
.prospect-list-controls form label { display: grid; gap: 5px; }
.prospect-list-controls input, .prospect-list-controls select, #prospect-search {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #395141;
  border-radius: 8px;
  background: #132119;
  color: #e6f0df;
}
.prospect-list-controls .button-secondary { min-height: 40px; cursor: pointer; }
.file-button { cursor: pointer; }
.prospect-filter { display: block; margin: 20px 0 6px; }
#prospect-search { width: min(100%, 400px); margin-bottom: 12px; }
#prospect-sites td small { display: block; margin-top: 4px; color: #899b8c; white-space: normal; }
#prospect-sites .row-link { margin: 0 8px 4px 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
#prospect-sites .row-link:disabled, #export-prospects[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.evidence-source { display: block; margin-top: 5px; color: #b7e584; font-size: .68rem; overflow-wrap: anywhere; }

/* Analyse : barre de progression, arrêt, site déjà analysé */
.analysis-progress { margin: .75rem 0 1rem; }
.analysis-progress-track { height: 10px; border-radius: 999px; background: var(--primary-soft); overflow: hidden; }
.analysis-progress-track span { display: block; height: 100%; width: 0; background: var(--primary); border-radius: inherit; transition: width .6s ease; }
.analysis-progress-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-top: .5rem; font-size: .92em; }
.analysis-progress-row #analysis-progress-time { color: var(--muted); }
.analysis-progress-row button { margin-left: auto; }
.analysis-existing { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 10px; padding: .75rem 1rem; margin: .75rem 0; }
.analysis-existing p { margin: 0 0 .5rem; }

/* Coût IA de l'analyse : information interne, absente de l'impression. */
.report-ai-cost { font-size: 0.85rem; opacity: 0.8; }
@media print { .report-ai-cost { display: none; } }

/* Accueil : diagnostic gratuit intégré sous la connexion. */
.auth-diagnostic { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.auth-note { margin: 12px 0 0; font-size: 0.85rem; opacity: 0.75; }
.auth-logo { display: block; margin: 0 0 14px; }
.status-message.is-warning { background: #fff4e5; border: 1px solid #f0b46c; color: #6b3d00; padding: 12px 14px; border-radius: 10px; }

/* Rapport : financements possibles, regroupés et dépliables. */
.report-aid-group { border: 1px solid #e5e7eb; border-radius: 10px; margin: 8px 0; padding: 0 14px; }
.report-aid-group > summary { cursor: pointer; padding: 10px 0; }
@media print { .report-aid-group { border: 0; padding: 0; } }

/* Fenêtre « Exporter » (rapport et pré-diagnostic). */
.export-dialog { width: min(30rem, calc(100vw - 32px)); border: 0; border-radius: 16px; padding: 24px; box-shadow: 0 20px 60px rgba(0, 32, 58, 0.3); color: #00203A; }
.export-dialog::backdrop { background: rgba(0, 32, 58, 0.45); }
.export-dialog h2 { margin: 0 0 6px; }
.export-dialog p { margin: 0 0 14px; color: #4b5563; }
.export-choices { display: grid; gap: 10px; }
.export-choices button { display: grid !important; justify-items: start; justify-content: stretch; gap: 2px; text-align: left; padding: 12px 16px; }
.export-choices small { font-weight: 400; opacity: 0.85; }
.export-cancel { margin-top: 14px; width: 100%; }
@media print { .export-dialog { display: none !important; } }

/* Volet « Notes de suivi » : à droite, la page reste lisible et utilisable (assistant pendant l'appel). */
.deal-notes-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(26rem, 100vw); display: flex; flex-direction: column; gap: 10px;
  padding: 18px; background: #fff; border-left: 1px solid #dfe7e7; box-shadow: -12px 0 30px rgba(0, 32, 58, 0.12); overflow-y: auto; }
.deal-notes-panel header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.deal-notes-panel header strong { display: block; font-size: 1.05rem; margin-top: 2px; }
.deal-notes-field { display: grid; gap: 6px; font-weight: 600; font-size: 0.9rem; }
.deal-notes-field textarea { width: 100%; box-sizing: border-box; font: inherit; font-weight: 400; padding: 10px; border: 1px solid #b9c9c9; border-radius: 10px; resize: vertical; }
.deal-notes-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.deal-notes-actions small { color: #6b7280; }
.deal-notes-status { margin: 0; min-height: 1.2em; font-size: 0.85rem; color: #006D6E; }
.deal-notes-status.is-error { color: #8a1c1c; }
.deal-notes-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.deal-notes-list li { padding: 10px 12px; border-radius: 10px; background: #f3f7f7; border-left: 3px solid #006D6E; }
.deal-notes-list li small { color: #6b7280; }
.deal-notes-list li p { margin: 4px 0 0; white-space: pre-wrap; }
.deal-notes-list .deal-notes-empty { background: transparent; border: 0; color: #6b7280; }
@media (min-width: 1100px) { body.deal-notes-open .dashboard-main, body.deal-notes-open .pipeline-main { margin-right: 26rem; } }
.rerun-dialog .rerun-hint { font-size: 0.88rem; }
.rerun-dialog .rerun-verdict { margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; font-weight: 600; border-left: 4px solid var(--gray-400, #9aa5a8); background: var(--gray-100, #f3f5f5); }
.rerun-dialog .rerun-verdict.is-won { border-left-color: #2f7d4f; background: #eaf5ee; }
.rerun-dialog .rerun-verdict.is-lost, .rerun-dialog .rerun-verdict.is-removed { border-left-color: #b4532a; background: #fbefe8; }
.rerun-dialog .rerun-verdict.is-open { border-left-color: #2a6f97; background: #eaf2f7; }
.rerun-dialog .rerun-history { margin: 0 0 10px; padding-left: 1.1rem; font-size: 0.9rem; }
.rerun-dialog .rerun-history li { margin: 2px 0; }
.rerun-dialog .export-choices a { display: block; text-align: center; padding: 12px 16px; }
.prospect-step .prospect-force { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 10px; font-size: 0.88rem; font-weight: 400; }
