/* ===================================================================
   ARIS Intelligence — Plateforme de Due Diligence & Intelligence Économique
   Design corporate : marine profond + accent or, typographie Inter/Fraunces
   =================================================================== */
:root {
  --navy-900: #0e1b2e;
  --navy-800: #14253c;
  --navy-700: #1c3350;
  --navy-600: #274465;
  --ink: #1b2330;
  --slate: #5a6577;
  --muted: #8a93a3;
  --line: #e4e7ee;
  --line-2: #eef1f6;
  --bg: #f4f6fa;
  --card: #ffffff;
  --gold: #c79a2e;
  --gold-soft: #f3e9cf;
  --blue: #2f6dba;
  --blue-soft: #e4eefb;
  --green: #2f9e6b;
  --green-soft: #def0e7;
  --amber: #d97a2b;
  --amber-soft: #fbeada;
  --red: #c0392b;
  --red-soft: #f8e1de;
  --grey-soft: #eceef3;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,30,54,.06), 0 6px 20px rgba(16,30,54,.06);
  --shadow-lg: 0 12px 40px rgba(16,30,54,.18);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Marque ---------- */
.brand-mark { display: flex; align-items: center; gap: 12px; }
.brand-glyph {
  width: 42px; height: 42px; flex: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), #a9821f);
  color: #1a1407; font-family: "Fraunces", serif; font-weight: 600;
  font-size: 24px; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.brand-name { font-family: "Fraunces", serif; font-size: 20px; font-weight: 600; letter-spacing: .14em; }
.brand-sub { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* ===================================================================
   LOGIN
   =================================================================== */
.login-body { background: var(--navy-900); }
.login-shell { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.login-brand {
  position: relative; color: #eef2f8; padding: 56px;
  display: flex; align-items: center;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(199,154,46,.16), transparent 60%),
    radial-gradient(700px 500px at 90% 90%, rgba(47,109,186,.18), transparent 55%),
    linear-gradient(160deg, var(--navy-900), var(--navy-700));
  overflow: hidden;
}
.login-brand::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(circle at 30% 30%, #000, transparent 75%);
}
.login-brand-inner { position: relative; max-width: 460px; }
.login-brand .brand-sub { color: rgba(238,242,248,.6); }
.login-headline {
  font-family: "Fraunces", serif; font-weight: 600; font-size: 38px; line-height: 1.12;
  margin: 38px 0 18px;
}
.login-lead { color: rgba(238,242,248,.75); font-size: 16px; max-width: 420px; }
.login-points { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 14px; }
.login-points li {
  display: flex; align-items: baseline; gap: 14px; font-size: 15px;
  color: rgba(238,242,248,.85); border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px;
}
.login-points span {
  font-family: "Fraunces", serif; font-size: 26px; color: var(--gold); min-width: 44px;
}
.login-foot { margin-top: 44px; font-size: 12px; letter-spacing: .04em; color: rgba(238,242,248,.45); }

.login-panel { display: grid; place-items: center; background: #fbfcfe; padding: 40px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 24px; }
.login-hint { color: var(--slate); margin: 6px 0 26px; font-size: 14px; }
.login-error {
  background: var(--red-soft); color: var(--red); border: 1px solid #f0c4bd;
  padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px;
}
.login-legal { color: var(--muted); font-size: 11.5px; margin-top: 18px; line-height: 1.5; }

/* ---------- Champs ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span, .field-range .range-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field-row { display: block; margin-bottom: 16px; }
.field-row > span { display:block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
input.input, select.input, textarea.input,
.field input, .field select, .field-row select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 14px; color: var(--ink);
  background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus, .input:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft);
}
.textarea { resize: vertical; min-height: 72px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238a93a3' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 10px 16px; font-size: 14px; font-weight: 600; transition: all .15s;
  white-space: nowrap;
}
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-primary { background: var(--navy-800); color: #fff; }
.btn-primary:hover { background: var(--navy-700); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--navy-600); background: #fafbfd; }
.btn-danger { background: #fff; border-color: #f0c4bd; color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }

/* ===================================================================
   APPLICATION
   =================================================================== */
.app-body { display: grid; grid-template-columns: 264px 1fr; height: 100vh; overflow: hidden; }

.sidebar {
  background: linear-gradient(180deg, var(--navy-900), var(--navy-800));
  color: #cfd8e6; display: flex; flex-direction: column; padding: 22px 16px;
  border-right: 1px solid rgba(255,255,255,.05);
}
.sidebar-brand { padding: 4px 8px 22px; border-bottom: 1px solid rgba(255,255,255,.07); margin-bottom: 16px; }
.sidebar-brand .brand-name { color: #fff; }
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  color: #aebacb; transition: all .14s;
}
.nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav a.active { background: rgba(199,154,46,.16); color: #fff; box-shadow: inset 2px 0 0 var(--gold); }
.nav-ic { width: 18px; text-align: center; opacity: .85; font-size: 13px; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.07); padding-top: 16px; }
.conf-badge {
  display: inline-block; font-size: 10px; letter-spacing: .18em; font-weight: 700;
  color: var(--gold); border: 1px solid rgba(199,154,46,.4); padding: 3px 8px; border-radius: 4px;
}
.sidebar-note { font-size: 11px; color: rgba(207,216,230,.5); margin-top: 10px; }

.main { display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 0 28px; height: 66px;
  background: #fff; border-bottom: 1px solid var(--line); flex: none;
}
.topbar-title { font-family: "Fraunces", serif; font-size: 20px; font-weight: 600; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--navy-700); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.user-name { font-size: 14px; font-weight: 600; }
.user-office { font-size: 12px; color: var(--muted); }
.hamburger { display: none; background: none; border: none; font-size: 22px; color: var(--ink); }

.content { padding: 28px; overflow-y: auto; flex: 1; }

/* ---------- Sections & panneaux ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 16px; }
.section-head h2 { font-family: "Fraunces", serif; font-size: 22px; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.panel h3 { font-size: 15px; margin-bottom: 14px; color: var(--ink); }
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.para { color: var(--slate); margin: 0 0 10px; font-size: 14px; }
.para.muted, .muted { color: var(--muted); }
.empty { color: var(--muted); padding: 28px; text-align: center; font-size: 14px; border: 1px dashed var(--line); border-radius: var(--radius-sm); }

/* ---------- Cartes statistiques ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 20px; }
.stat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--navy-600); }
.stat-card.accent-blue::before { background: var(--blue); }
.stat-card.accent-red::before { background: var(--red); }
.stat-card.accent-amber::before { background: var(--amber); }
.stat-card.accent-green::before { background: var(--green); }
.stat-value { font-family: "Fraunces", serif; font-size: 34px; font-weight: 600; line-height: 1; }
.stat-label { font-size: 13px; font-weight: 600; margin-top: 8px; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ---------- Donut & légende ---------- */
.donut-wrap { display: flex; align-items: center; gap: 26px; }
.donut { width: 150px; height: 150px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.donut-hole { width: 96px; height: 96px; background: #fff; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line); }
.donut-num { font-family: "Fraunces", serif; font-size: 30px; font-weight: 600; }
.donut-cap { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.legend { display: grid; gap: 10px; flex: 1; }
.legend-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.legend-label { flex: 1; color: var(--slate); }
.legend-num { font-weight: 700; }

/* ---------- Barres horizontales ---------- */
.barlist { display: grid; gap: 16px; }
.barrow { display: grid; grid-template-columns: 80px 1fr 30px; align-items: center; gap: 12px; }
.barrow-label { font-size: 13px; font-weight: 600; }
.barrow-track { background: var(--grey-soft); border-radius: 6px; height: 12px; overflow: hidden; }
.barrow-fill { height: 100%; background: linear-gradient(90deg, var(--navy-600), var(--blue)); border-radius: 6px; }
.barrow-val { font-weight: 700; font-size: 13px; text-align: right; }

/* ---------- Tableaux ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table thead th {
  text-align: left; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.table tbody td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.row-click { cursor: pointer; transition: background .12s; }
.row-click:hover { background: #f8fafc; }
.td-urgent { color: var(--red); font-weight: 700; }

/* ---------- Pills & badges ---------- */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; margin-right: 6px; }
.pill-grey { background: var(--grey-soft); color: var(--slate); }
.pill-blue { background: var(--blue-soft); color: var(--blue); }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-amber { background: var(--amber-soft); color: var(--amber); }
.pill-red { background: var(--red-soft); color: var(--red); }

.risk-badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 700; }
.risk-faible { background: var(--green-soft); color: var(--green); }
.risk-modere { background: var(--gold-soft); color: #9a7818; }
.risk-eleve { background: var(--amber-soft); color: var(--amber); }
.risk-critique { background: var(--red-soft); color: var(--red); }

.reco { font-size: 12.5px; font-weight: 600; }
.reco-faible { color: var(--green); }
.reco-modere { color: #9a7818; }
.reco-eleve { color: var(--amber); }
.reco-critique { color: var(--red); }

.mini-flag { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; margin-right: 5px; }
.flag-pep { background: #efe3fb; color: #7a3db5; }
.flag-sanc { background: var(--red-soft); color: var(--red); }

/* ---------- Filtres ---------- */
.filterbar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.filterbar .input { width: auto; }
.filterbar input[type="search"] { flex: 1; min-width: 220px; }

/* ---------- Cartes missions ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.mission-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); transition: transform .14s, box-shadow .14s, border-color .14s;
}
.mission-card.row-click:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--navy-600); }
.mc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mc-ref { font-family: "Fraunces", serif; font-weight: 600; color: var(--navy-700); }
.mc-client { font-size: 16px; font-weight: 700; }
.mc-type { font-size: 13px; color: var(--slate); margin: 3px 0 12px; }
.mc-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.mc-bureau { font-size: 12px; color: var(--muted); margin-left: auto; }
.mc-progress-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.progress { background: var(--grey-soft); height: 8px; border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), #b8881f); border-radius: 6px; }

/* ---------- Détail ---------- */
.back-link { color: var(--slate); font-size: 13px; font-weight: 600; display: inline-block; margin-bottom: 16px; }
.back-link:hover { color: var(--navy-700); }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 14px; }
.detail-ref { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.detail-head h2 { font-family: "Fraunces", serif; font-size: 26px; margin: 4px 0; }
.detail-sub { color: var(--slate); font-size: 14px; }
.detail-actions { display: flex; gap: 10px; flex: none; }
.tag-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 16px; }
.info-item { }
.info-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.info-val { font-size: 14px; font-weight: 500; }

/* ---------- Score hero & dimensions ---------- */
.score-hero { display: flex; gap: 28px; align-items: center; }
.score-gauge {
  width: 130px; height: 130px; border-radius: 50%; flex: none; display: grid; place-items: center;
  position: relative; color: #fff;
}
.score-gauge::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: rgba(255,255,255,.16); }
.score-faible { background: var(--green); }
.score-modere { background: var(--gold); }
.score-eleve { background: var(--amber); }
.score-critique { background: var(--red); }
.score-num { font-family: "Fraunces", serif; font-size: 44px; font-weight: 600; position: relative; z-index: 1; line-height: 1; }
.score-cap { font-size: 12px; position: relative; z-index: 1; opacity: .85; }
.score-meta { flex: 1; }
.score-band { font-size: 16px; font-weight: 700; }
.score-reco { font-size: 14px; color: var(--slate); margin: 4px 0 14px; }

.dim-row { display: grid; grid-template-columns: 240px 1fr 40px; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.dim-row:last-child { border-bottom: none; }
.dim-label { display: flex; flex-direction: column; font-size: 13.5px; font-weight: 600; }
.dim-weight { font-size: 11px; color: var(--muted); font-weight: 500; }
.dim-track { background: var(--grey-soft); height: 10px; border-radius: 6px; overflow: hidden; }
.dim-fill { height: 100%; border-radius: 6px; }
.dim-faible { background: var(--green); }
.dim-modere { background: var(--gold); }
.dim-eleve { background: var(--amber); }
.dim-critique { background: var(--red); }
.dim-val { font-weight: 700; text-align: right; }

/* ---------- Matrice ---------- */
.matrix { overflow-x: auto; }
.matrix-grid { display: grid; grid-template-columns: 90px repeat(4, 1fr); gap: 6px; min-width: 560px; }
.matrix-corner { font-size: 11px; color: var(--muted); display: grid; place-items: center; text-align: center; }
.matrix-axis-x { font-size: 12px; font-weight: 600; text-align: center; color: var(--slate); padding-bottom: 4px; }
.matrix-axis-y { font-size: 12px; font-weight: 600; display: grid; place-items: center; color: var(--slate); }
.matrix-cell { min-height: 88px; border-radius: var(--radius-sm); padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; border: 1px solid rgba(0,0,0,.04); }
.mc-faible { background: var(--green-soft); }
.mc-modere { background: var(--gold-soft); }
.mc-eleve { background: var(--amber-soft); }
.mc-critique { background: var(--red-soft); }
.matrix-dot {
  background: var(--navy-800); color: #fff; font-size: 11px; font-weight: 600;
  padding: 4px 9px; border-radius: 6px; cursor: pointer; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.matrix-dot:hover { background: var(--gold); color: #1a1407; }

/* ---------- Journal ---------- */
.journal { display: grid; gap: 14px; }
.journal-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; background: #fcfdff; }
.journal-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.journal-date { font-size: 12px; font-weight: 700; color: var(--navy-700); }
.src-type { font-size: 12px; background: var(--blue-soft); color: var(--blue); padding: 2px 9px; border-radius: 5px; font-weight: 600; }
.src-cote { font-size: 12px; background: var(--navy-800); color: #fff; padding: 2px 9px; border-radius: 5px; font-weight: 700; letter-spacing: .05em; }
.journal-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.journal-foot { font-size: 12px; color: var(--muted); }

/* ---------- Veille & alertes pays ---------- */
.head-actions { display: flex; gap: 8px; }
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-bottom: 20px; }
.country-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); transition: transform .14s, box-shadow .14s, border-color .14s; }
.country-card.row-click:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--navy-600); }
.cc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cc-name { font-size: 16px; font-weight: 700; }
.cc-region { font-size: 12px; color: var(--muted); }
.cc-score { width: 44px; height: 44px; border-radius: 10px; flex: none; display: grid; place-items: center; color: #fff; font-family: "Fraunces", serif; font-weight: 600; font-size: 19px; }
.cc-band { margin-bottom: 8px; }
.cc-alerts { font-size: 12.5px; color: var(--slate); }

.alert-feed { display: grid; gap: 12px; }
.alert-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fcfdff; }
.alert-row-main { min-width: 0; }
.alert-row-title { font-weight: 600; font-size: 13.5px; }
.alert-row-meta { font-size: 12px; color: var(--muted); }

.alert-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; background: #fcfdff; }
.alert-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.alert-country { font-size: 12.5px; font-weight: 700; color: var(--navy-700); }
.alert-date { font-size: 12px; color: var(--muted); margin-left: auto; }
.alert-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.alert-foot { font-size: 12px; color: var(--muted); margin-top: 4px; }
.alert-actions { margin-top: 10px; }

.sev { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; flex: none; }
.sev-info { background: var(--blue-soft); color: var(--blue); }
.sev-vigilance { background: var(--gold-soft); color: #9a7818; }
.sev-alerte { background: var(--amber-soft); color: var(--amber); }
.sev-critique { background: var(--red-soft); color: var(--red); }

/* ---------- Équipe ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.team-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; gap: 14px; box-shadow: var(--shadow); }
.team-avatar { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, var(--navy-700), var(--blue)); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.team-info { min-width: 0; }
.team-name { font-weight: 700; font-size: 15px; }
.team-role { font-size: 13px; color: var(--slate); margin-bottom: 8px; }
.team-tags { margin-bottom: 8px; }
.team-spec { font-size: 12.5px; color: var(--muted); }
.team-miss { font-size: 12px; color: var(--navy-600); font-weight: 600; margin-top: 6px; }

/* ---------- Formulaires (modale) ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(14,27,46,.55); display: grid; place-items: center; z-index: 100; padding: 24px; backdrop-filter: blur(2px); }
.modal-overlay[hidden] { display: none; }
.modal { background: #fff; border-radius: var(--radius); width: 100%; max-width: 680px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-family: "Fraunces", serif; font-size: 18px; }
.modal-close { background: none; border: none; font-size: 26px; line-height: 1; color: var(--muted); }
.modal-close:hover { color: var(--ink); }
.modal-body { padding: 22px; overflow-y: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.form-checks { display: flex; gap: 22px; margin: 16px 0; flex-wrap: wrap; }
.field-check { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; cursor: pointer; }
.field-check input { width: 17px; height: 17px; accent-color: var(--navy-700); }
.score-form { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 14px; }
.score-form-title { font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.field-range { display: block; margin-bottom: 12px; }
.range-wrap { display: flex; align-items: center; gap: 12px; }
.range { flex: 1; accent-color: var(--gold); }
.range-out { width: 34px; text-align: right; font-weight: 700; font-size: 13px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.file-btn { cursor: pointer; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy-800); color: #fff; padding: 12px 22px; border-radius: 8px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; transition: all .25s; z-index: 200; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================================================================
   RAPPORT (impression)
   =================================================================== */
.report-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.report { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 44px; max-width: 880px; margin: 0 auto; box-shadow: var(--shadow); }
.report-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--navy-800); padding-bottom: 18px; margin-bottom: 26px; }
.report-brand { display: flex; align-items: center; gap: 12px; }
.report-conf { font-size: 11px; letter-spacing: .18em; font-weight: 700; color: var(--red); border: 1px solid var(--red); padding: 4px 10px; border-radius: 4px; }
.report-title { font-family: "Fraunces", serif; font-size: 26px; margin-bottom: 4px; }
.report-ref { color: var(--muted); font-size: 13px; margin-bottom: 28px; }
.report-section { margin-bottom: 26px; }
.report-section h2 { font-family: "Fraunces", serif; font-size: 17px; color: var(--navy-800); border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 14px; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.rkv { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-bottom: 1px dotted var(--line); font-size: 13.5px; }
.rkv-k { color: var(--slate); }
.rkv-v { font-weight: 600; text-align: right; }
.report-verdict { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); border-left: 4px solid; }
.verdict-faible { background: var(--green-soft); border-color: var(--green); }
.verdict-modere { background: var(--gold-soft); border-color: var(--gold); }
.verdict-eleve { background: var(--amber-soft); border-color: var(--amber); }
.verdict-critique { background: var(--red-soft); border-color: var(--red); }
.report-src { border-left: 3px solid var(--line); padding: 4px 0 12px 14px; margin-bottom: 12px; }
.bulletin-alert.sev-border-info { border-left-color: var(--blue); }
.bulletin-alert.sev-border-vigilance { border-left-color: var(--gold); }
.bulletin-alert.sev-border-alerte { border-left-color: var(--amber); }
.bulletin-alert.sev-border-critique { border-left-color: var(--red); }
.bulletin-alert .report-src-head .sev { margin-right: 6px; }
.report-src-head { font-size: 12px; color: var(--muted); font-weight: 600; }
.report-src-title { font-weight: 700; font-size: 14px; margin: 2px 0 4px; }
.report-foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); line-height: 1.6; }

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .app-body { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; z-index: 90; transform: translateX(-100%); transition: transform .22s; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .hamburger { display: block; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .dim-row { grid-template-columns: 140px 1fr 34px; }
  .score-hero { flex-direction: column; align-items: flex-start; }
  .detail-head { flex-direction: column; }
  .report { padding: 24px; }
  .report-grid { grid-template-columns: 1fr; }
}

@media print {
  .sidebar, .topbar, .report-toolbar, .no-print { display: none !important; }
  .app-body { display: block; height: auto; overflow: visible; }
  .main, .content { overflow: visible; height: auto; padding: 0; }
  .report { border: none; box-shadow: none; max-width: none; padding: 0; }
  body { background: #fff; }
  .report-section { break-inside: avoid; }
}

/* ===================================================================
   Module Intelligence économique (multi-agents · Afrique)
   =================================================================== */
.ie-config { display: flex; flex-direction: column; gap: 18px; }
.ie-config-grid { display: grid; grid-template-columns: 1.2fr 1.6fr 1fr; gap: 16px; }
.ie-cible-card {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff;
}
.ie-cible-flag { font-size: 40px; line-height: 1; flex: none; }
.ie-cible-meta { flex: 1; min-width: 0; }
.ie-cible-nom { font-family: "Fraunces", serif; font-size: 21px; font-weight: 600; }
.ie-cible-region { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 2px 0 8px; }
.ie-cible-base { font-size: 13px; color: rgba(255,255,255,.82); line-height: 1.55; }
.ie-cible-base strong { color: #fff; }
.ie-cible-base .muted { color: rgba(255,255,255,.5); }
.ie-cible-card .btn { flex: none; }
.ie-cible-card .btn-block { width: auto; min-width: 200px; }

.ie-hero-panel { background: linear-gradient(140deg, var(--navy-900), var(--navy-700)); color: #fff; border: none; }
.ie-hero { text-align: center; padding: 14px 0 6px; }
.ie-hero-label { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.ie-hero-score { font-family: "Fraunces", serif; font-size: 78px; line-height: 1; font-weight: 600; margin: 6px 0 2px; }
.ie-hero-level { font-size: 15px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ie-hero-bar { height: 10px; border-radius: 6px; background: rgba(255,255,255,.14); margin: 16px auto 8px; max-width: 620px; overflow: hidden; }
.ie-hero-fill { height: 100%; border-radius: 6px; transition: width .5s; }
.ie-hero-scale { display: flex; justify-content: space-between; max-width: 620px; margin: 0 auto; font-size: 11px; color: rgba(255,255,255,.55); letter-spacing: .04em; }
.ie-hero-meta { margin-top: 14px; font-size: 12.5px; color: rgba(255,255,255,.7); }

.ie-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; }
.ie-metric { text-align: center; }
.ie-metric-val { font-family: "Fraunces", serif; font-size: 30px; font-weight: 600; color: var(--gold); }
.ie-metric-label { font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.ie-metric-sub { font-size: 11px; color: rgba(255,255,255,.55); }

.ie-reco { margin-top: 14px; padding: 14px 16px; background: var(--gold-soft); border-left: 3px solid var(--gold); border-radius: var(--radius-sm); font-size: 14px; line-height: 1.55; }
.ie-reco-cap { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8a6d18; font-weight: 700; margin-bottom: 4px; }
.ie-alertes { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.ie-alerte { padding: 10px 14px; background: var(--red-soft); border-left: 3px solid var(--red); border-radius: var(--radius-sm); font-size: 13.5px; color: #7e241a; font-weight: 500; }

.ie-agent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ie-agent-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: #fff; }
.ie-agent-top { display: flex; align-items: center; gap: 8px; }
.ie-agent-ic { font-size: 18px; }
.ie-agent-name { font-weight: 600; font-size: 14px; flex: 1; }
.ie-agent-score { font-family: "Fraunces", serif; font-weight: 700; font-size: 18px; padding: 1px 9px; border-radius: 6px; }
.ie-agent-bar { height: 6px; border-radius: 4px; background: var(--line-2); margin: 10px 0 8px; overflow: hidden; }
.ie-agent-fill { height: 100%; border-radius: 4px; }
.ie-agent-kpi { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.ie-agent-analyse { font-size: 13px; line-height: 1.5; color: var(--ink); margin: 0 0 8px; }
.ie-agent-sig, .ie-agent-ind { font-size: 12px; line-height: 1.45; color: var(--slate); margin-top: 4px; }
.ie-agent-sig strong, .ie-agent-ind strong { color: var(--ink); }

.ie-scen-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ie-scen-card { border: 1px solid var(--line); border-left-width: 3px; border-radius: var(--radius); padding: 14px 16px; background: #fff; }
.ie-scen-optimiste { border-left-color: var(--green); }
.ie-scen-central { border-left-color: var(--blue); }
.ie-scen-pessimiste { border-left-color: var(--amber); }
.ie-scen-rupture { border-left-color: var(--red); }
.ie-scen-top { display: flex; align-items: center; justify-content: space-between; }
.ie-scen-tag { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 5px; }
.ie-tag-optimiste { background: var(--green-soft); color: #1d6a47; }
.ie-tag-central { background: var(--blue-soft); color: #1f4f8a; }
.ie-tag-pessimiste { background: var(--amber-soft); color: #9c5316; }
.ie-tag-rupture { background: var(--red-soft); color: #7e241a; }
.ie-scen-proba { font-family: "Fraunces", serif; font-weight: 700; font-size: 18px; }
.ie-scen-bar { height: 6px; border-radius: 4px; background: var(--line-2); margin: 10px 0; overflow: hidden; }
.ie-scen-fill { height: 100%; border-radius: 4px; }
.ie-fill-optimiste { background: var(--green); }
.ie-fill-central { background: var(--blue); }
.ie-fill-pessimiste { background: var(--amber); }
.ie-fill-rupture { background: var(--red); }
.ie-scen-title { font-weight: 600; font-size: 14.5px; margin-bottom: 4px; }
.ie-scen-desc { font-size: 13px; line-height: 1.5; color: var(--slate); margin: 0 0 8px; }
.ie-scen-decl { font-size: 12px; color: var(--slate); }
.ie-scen-decl strong { color: var(--ink); }
.ie-scen-border-optimiste { border-left: 3px solid var(--green); padding-left: 12px; }
.ie-scen-border-central { border-left: 3px solid var(--blue); padding-left: 12px; }
.ie-scen-border-pessimiste { border-left: 3px solid var(--amber); padding-left: 12px; }
.ie-scen-border-rupture { border-left: 3px solid var(--red); padding-left: 12px; }

.ie-niv { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 2px 8px; border-radius: 5px; }
.ie-niv-faible { background: var(--green-soft); color: #1d6a47; }
.ie-niv-modere { background: var(--blue-soft); color: #1f4f8a; }
.ie-niv-eleve { background: var(--gold-soft); color: #8a6d18; }
.ie-niv-tres-eleve { background: var(--amber-soft); color: #9c5316; }
.ie-niv-critique { background: var(--red-soft); color: #7e241a; }

.ie-import { margin: 6px 0 12px; }
.ie-sig-feed { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ie-sig-row { padding: 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--navy-600); border-radius: var(--radius-sm); background: #fbfcfe; }
.ie-sig-meta { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 3px; }
.ie-sig-text { font-size: 13.5px; line-height: 1.5; color: var(--ink); }

.ie-empty { text-align: center; padding: 40px 24px; }
.ie-empty-ic { font-size: 34px; color: var(--gold); }
.ie-empty-title { font-family: "Fraunces", serif; font-size: 18px; font-weight: 600; margin: 8px 0 6px; }

@media (max-width: 820px) {
  .ie-config-grid { grid-template-columns: 1fr; }
  .ie-cible-card { flex-direction: column; align-items: flex-start; }
  .ie-cible-card .btn-block { width: 100%; }
  .ie-metrics { grid-template-columns: 1fr 1fr; }
  .ie-agent-grid, .ie-scen-grid { grid-template-columns: 1fr; }
  .ie-hero-score { font-size: 60px; }
}

/* ===================================================================
   Veille Fekini — dossier entité dédié
   =================================================================== */
.fekini-id { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff; border: none; }
.fekini-id-main { min-width: 0; }
.fekini-id-nom { font-family: "Fraunces", serif; font-size: 26px; font-weight: 600; line-height: 1.15; }
.fekini-id-ar { font-size: 24px; color: var(--gold); margin-top: 4px; direction: rtl; }
.fekini-id-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 10px; }
.fekini-chip { font-size: 12px; padding: 4px 10px; border-radius: 6px; background: rgba(255,255,255,.1); color: rgba(255,255,255,.92); }
.fekini-id-flags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-flag { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 6px; }
.tag-flag.flag-off { background: rgba(255,255,255,.12); color: rgba(255,255,255,.8); }
.tag-flag.flag-on { background: var(--red); color: #fff; }
.fekini-id-score { text-align: center; flex: none; padding-left: 20px; border-left: 1px solid rgba(255,255,255,.14); }
.fekini-score-val { font-family: "Fraunces", serif; font-size: 52px; font-weight: 600; color: var(--gold); line-height: 1; }
.fekini-score-lbl { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-top: 4px; }
.fekini-score-sub { font-size: 11px; color: rgba(255,255,255,.5); margin-top: 2px; }

.fekini-notes { margin-top: 12px; padding: 12px 14px; background: var(--bg); border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; color: var(--slate); }
.fekini-dim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
.fekini-dim-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.fekini-dim-bar { height: 8px; border-radius: 5px; background: var(--line-2); overflow: hidden; }
.fekini-dim-fill { height: 100%; border-radius: 5px; }

.fekini-timeline { display: flex; flex-direction: column; }
.fekini-tl-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.fekini-tl-row:last-child { border-bottom: none; }
.fekini-tl-date { font-size: 12.5px; font-weight: 600; color: var(--gold); }
.fekini-tl-body { position: relative; padding-right: 32px; }
.fekini-tl-fait { font-size: 14px; line-height: 1.5; }
.fekini-tl-src { font-size: 12px; color: var(--muted); margin-top: 4px; }
.fekini-tl-del { position: absolute; top: 0; right: 0; }

.fekini-src { border: 1px solid var(--line); border-left: 3px solid var(--navy-600); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; }
.fekini-src-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.fekini-src-type { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--blue); }
.fekini-src-cote { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 5px; background: var(--gold-soft); color: #8a6d18; }
.fekini-src-date { margin-left: auto; font-size: 12px; }
.fekini-src-head .btn-xs { margin-left: 6px; }
.fekini-src-title { font-weight: 600; font-size: 14px; margin: 6px 0 2px; }
.fekini-src-link { font-size: 12.5px; color: var(--blue); word-break: break-all; }

.fekini-alerte { border: 1px solid var(--line); border-left-width: 3px; border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; }
.fekini-alerte-head { display: flex; align-items: center; gap: 8px; }
.fekini-alerte-cat { margin-left: auto; font-size: 12px; }
.fekini-alerte-title { font-weight: 600; font-size: 14px; margin-top: 6px; }

.btn-xs { padding: 3px 8px; font-size: 12px; line-height: 1.2; }
.small { font-size: 12px; }

@media (max-width: 820px) {
  .fekini-id { flex-direction: column; align-items: flex-start; }
  .fekini-id-score { border-left: none; padding-left: 0; border-top: 1px solid rgba(255,255,255,.14); padding-top: 12px; text-align: left; }
  .fekini-dim-grid { grid-template-columns: 1fr; }
  .fekini-tl-row { grid-template-columns: 1fr; gap: 2px; }
}
