/* Layout : parcours vertical en 5 sections pleine largeur (hero puis 4 étapes), alternance blanc / gris perle, contenu dans une colonne de 1200 px. Thème clair unique. */
:root {
  --white: #ffffff;
  --pearl: #f8fafc;
  --mist: #f1f5f9;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --navy: #0f172a;
  --navy-2: #1e293b;
  --slate: #475569;
  --muted: #64748b;
  --royal: #2563eb;
  --royal-dark: #1d4ed8;
  --royal-soft: #eff4ff;
  --royal-mid: #c7d7fb;
  --gold: #a07c2c;
  --gold-bright: #c9a44c;
  --gold-soft: #fbf6ea;
  --amber: #b45309;
  --amber-soft: #fef6e7;
  --red: #b91c1c;
  --red-soft: #fef2f2;
  --green: #047857;
  --green-soft: #ecfdf5;
  --f-display: "Plus Jakarta Sans", "Inter", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 1px rgba(15, 23, 42, .03);
  --shadow-md: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px -14px rgba(15, 23, 42, .14);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 28px 64px -24px rgba(15, 23, 42, .22);
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--white); color: var(--navy);
  font: 400 15px/1.6 var(--f-body); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--f-display); color: var(--navy); margin: 0; text-wrap: balance; letter-spacing: -.015em; }
p { margin: 0; }
a { color: var(--royal); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--royal); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.eyebrow { font: 600 12px/1.2 var(--f-body); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.eyebrow-gold { color: var(--gold); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; text-decoration: none;
  border: 1px solid transparent; border-radius: 10px; padding: 11px 18px; font-weight: 600; font-size: 14.5px;
  transition: background .2s, border-color .2s, box-shadow .2s, transform .15s, color .2s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 9px; }
.btn-lg { padding: 14px 24px; font-size: 15.5px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-navy { background: var(--navy); color: var(--white); box-shadow: 0 8px 20px -10px rgba(15, 23, 42, .55); }
.btn-navy:hover { background: var(--navy-2); box-shadow: 0 12px 26px -10px rgba(15, 23, 42, .6); }
.btn-royal { background: var(--royal); color: var(--white); box-shadow: 0 8px 20px -10px rgba(37, 99, 235, .6); }
.btn-royal:hover { background: var(--royal-dark); }
.btn-ghost { background: var(--white); color: var(--navy); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-ghost.is-done { color: var(--green); border-color: #a7dcc6; background: var(--green-soft); }
.btn:disabled { opacity: .75; cursor: progress; }
.link-btn { background: none; border: 0; padding: 0; color: var(--royal); font-weight: 600; font-size: 13.5px; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--red); }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); color: var(--muted); flex: none; }
.icon-btn:hover { color: var(--navy); border-color: var(--line-strong); }

/* En-tête */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--navy); }
.logo-mark { width: 34px; height: 34px; color: var(--navy); flex: none; }
.logo-word { font: 800 18px/1 var(--f-display); letter-spacing: .16em; }
.logo-word b { color: var(--gold-bright); font-weight: 800; }
.logo-sm .logo-mark { width: 26px; height: 26px; }
.logo-sm .logo-word { font-size: 14px; }
.nav { display: flex; gap: 4px; margin-left: 28px; }
.nav a { color: var(--slate); text-decoration: none; font-weight: 500; font-size: 14px; padding: 8px 12px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; }
.nav a:hover { color: var(--navy); background: var(--mist); }
.nav-count { font-size: 11px; font-weight: 700; background: var(--gold-soft); color: var(--gold); border-radius: 999px; padding: 1px 7px; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.status.ok i { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .15); }
.status.ko i { background: var(--red); }

/* Hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--white) 0%, var(--pearl) 100%); border-bottom: 1px solid var(--line); }
.hero-arcs {
  position: absolute; right: -220px; top: -260px; width: 820px; height: 820px; border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(circle at center, transparent 0 58px, rgba(15, 23, 42, .05) 58px 59px);
  -webkit-mask-image: radial-gradient(circle at center, #000 30%, transparent 70%);
  mask-image: radial-gradient(circle at center, #000 30%, transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; padding-block: 72px 80px; align-items: center; }
.hero-copy { display: grid; gap: 22px; }
.hero h1 { font-size: clamp(32px, 4.1vw, 50px); line-height: 1.08; font-weight: 800; letter-spacing: -.025em; }
.lead { font-size: 17.5px; line-height: 1.65; color: var(--slate); max-width: 58ch; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-proof { font-size: 13px; color: var(--muted); padding-left: 14px; border-left: 2px solid var(--gold-bright); }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pillar {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 20px 22px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md);
}
.pillar h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 4px; }
.pillar p { font-size: 14px; color: var(--slate); }
.pillar-icon { width: 42px; height: 42px; border-radius: 11px; background: var(--navy); display: grid; place-items: center; }
.pillar-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--gold-bright); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pillar-metric { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--gold); background: var(--gold-soft); padding: 3px 9px; border-radius: 6px; }

/* Étapes */
.step { padding-block: 80px; border-bottom: 1px solid var(--line); }
.step-pearl { background: var(--pearl); }
.step-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: start; margin-bottom: 36px; }
.step-num {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font: 700 18px/1 var(--f-display); color: var(--white); background: var(--navy);
  box-shadow: 0 0 0 5px var(--white), 0 0 0 6px var(--gold-bright);
}
.step-pearl .step-num { box-shadow: 0 0 0 5px var(--pearl), 0 0 0 6px var(--gold-bright); }
.step-head h2 { font-size: clamp(25px, 2.6vw, 32px); font-weight: 800; margin: 6px 0; }
.step-sub { color: var(--slate); max-width: 70ch; }
/* Source de veille indisponible au dernier scan (veille.message_indisponibles) */
.panne-sources { margin-top: 10px; max-width: 70ch; padding: 8px 12px; border-left: 3px solid var(--amber); border-radius: 6px;
  background: var(--amber-soft); color: var(--amber); font-size: 14px; line-height: 1.45; }
.head-action { align-self: center; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); }

/* Étape 1 */
.step1-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 24px; align-items: start; }
.profiles { display: grid; gap: 12px; }
.profile {
  position: relative; display: grid; gap: 10px; text-align: left; padding: 20px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s;
}
.profile:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.profile[aria-checked="true"] { border-color: var(--royal); box-shadow: 0 0 0 3px var(--royal-soft), var(--shadow-md); }
.profile[aria-checked="true"]::after {
  content: "✓"; position: absolute; top: 16px; right: 16px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--royal); color: var(--white); font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
.profile-name { display: flex; align-items: center; gap: 10px; font: 700 16.5px/1.2 var(--f-display); padding-right: 28px; }
.monogram { width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: var(--gold-bright); display: grid; place-items: center; font: 700 14px var(--f-display); letter-spacing: .02em; flex: none; }
.profile-desc { font-size: 13.5px; color: var(--slate); }
.profile-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.profile-meta span { font-size: 11.5px; font-weight: 600; color: var(--slate); background: var(--mist); padding: 3px 8px; border-radius: 6px; }
.profile-new { border-style: dashed; border-color: var(--line-strong); box-shadow: none; background: transparent; align-items: center; grid-template-columns: auto minmax(0, 1fr); }
.profile-new:hover { border-color: var(--royal); background: var(--white); }
.plus { width: 36px; height: 36px; border-radius: 10px; border: 1px dashed var(--line-strong); display: grid; place-items: center; color: var(--royal); font-size: 20px; }
.profile-new b { font: 700 15px var(--f-display); display: block; }

.criteria { padding: 6px 26px 24px; }
.crit-block { display: grid; gap: 12px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.crit-head { display: flex; justify-content: space-between; align-items: baseline; }
.crit-head h3 { font-size: 15px; font-weight: 700; }
.segmented { display: inline-grid; grid-template-columns: 1fr 1fr; background: var(--mist); border-radius: 11px; padding: 4px; gap: 4px; max-width: 420px; }
.segmented button { border: 0; background: none; border-radius: 8px; padding: 9px 14px; font-weight: 600; font-size: 14px; color: var(--slate); transition: background .2s, color .2s, box-shadow .2s; }
.segmented button[aria-checked="true"], .segmented button[aria-selected="true"] { background: var(--white); color: var(--navy); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.deps { display: flex; flex-wrap: wrap; gap: 8px; }
.dep-chip {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); background: var(--white);
  border-radius: 9px; padding: 6px 11px; font-size: 13px; color: var(--slate); transition: all .2s;
}
.dep-chip b { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.dep-chip[aria-pressed="true"] { border-color: var(--royal); background: var(--royal-soft); color: var(--royal-dark); }
.dep-chip[aria-pressed="true"] b { color: var(--royal-dark); }
.badges { display: flex; flex-wrap: wrap; gap: 7px; }
.badge-tag {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  font-size: 13px; font-weight: 600; color: var(--navy); background: var(--white);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 5px 5px 12px; box-shadow: var(--shadow-sm);
  animation: pop .22s ease-out both;
}
.badge-tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold-bright); margin-right: 4px; flex: none; }
.badge-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-tag button { border: 0; background: none; width: 22px; height: 22px; border-radius: 50%; color: var(--muted); line-height: 1; padding: 0; font-size: 12px; flex: none; }
.badge-tag button:hover { background: var(--mist); color: var(--navy); }
.badges-ex .badge-tag { color: var(--slate); background: var(--pearl); box-shadow: none; }
.badges-ex .badge-tag::before { background: var(--red); opacity: .55; }
.badge-input {
  width: 100%; max-width: 420px; border: 1px dashed var(--line-strong); background: var(--white); border-radius: 10px; padding: 9px 13px; font-size: 14px;
}
.badge-input:focus { outline: none; border: 1px solid var(--royal); box-shadow: 0 0 0 3px var(--royal-soft); }
.crit-foot { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-top: 22px; flex-wrap: wrap; }
.crit-links { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.save-msg { color: var(--green); font-weight: 600; }
.btn-scan { min-width: 280px; }
.btn-icon { width: 24px; height: 24px; color: var(--white); --gold: var(--gold-bright); }
.btn-scan.scanning .btn-icon { animation: spin 1.4s linear infinite; }

/* Étape 2 */
.step2-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.map-card { padding: 18px 20px 20px; display: grid; gap: 12px; min-width: 0; }
.map-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.map-title { font: 700 15px var(--f-display); }
.map-legend { display: flex; gap: 16px; color: var(--muted); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg-zone { background: var(--royal-soft); border: 1px solid var(--royal-mid); }
.lg-hit { background: var(--royal); }
.map-wrap {
  position: relative; aspect-ratio: 1; width: 100%; max-width: 720px; justify-self: center; overflow: hidden; border-radius: 12px;
  background: radial-gradient(circle at 50% 45%, var(--white) 0%, var(--pearl) 75%);
  border: 1px solid var(--line);
}
#france { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#france .dep { fill: #edf1f6; stroke: var(--white); stroke-width: 1.1; vector-effect: non-scaling-stroke; transition: fill .6s ease, stroke .6s ease; }
#france .dep.zone { fill: var(--royal-soft); stroke: var(--royal-mid); }
#france .dep.scanned { fill: #dfe8fb; }
#france .dep.hit { fill: #7ea5f4; stroke: var(--white); cursor: pointer; }
#france .dep.hit.h2 { fill: #4f86f1; }
#france .dep.hit.h3 { fill: var(--royal); }
#france .dep.hit:hover, #france .dep.selected { fill: var(--navy); }
#france .dep:not(.hit):hover { fill: #e2e8f0; }
#france .lbl { fill: var(--slate); font-family: var(--f-body); font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
#france .lbl tspan.nm { font-weight: 500; fill: var(--muted); }
#france .counter { pointer-events: none; transform-box: fill-box; transform-origin: center; animation: counterIn .5s cubic-bezier(.2, .9, .3, 1.3) both; }
#france .counter rect { fill: var(--white); stroke: var(--gold-bright); vector-effect: non-scaling-stroke; stroke-width: 1.4; filter: drop-shadow(0 2px 4px rgba(15, 23, 42, .18)); }
#france .counter text { fill: var(--navy); font-family: var(--f-display); font-weight: 800; text-anchor: middle; dominant-baseline: central; }
.sweep {
  position: absolute; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .8s ease;
  background: conic-gradient(from 0deg, rgba(37, 99, 235, 0) 0deg, rgba(37, 99, 235, 0) 290deg, rgba(37, 99, 235, .10) 340deg, rgba(201, 164, 76, .28) 359deg, rgba(201, 164, 76, 0) 360deg);
}
.sweep::after {
  content: ""; position: absolute; left: 50%; top: 0; width: 1.5px; height: 50%; transform: translateX(-50%);
  background: linear-gradient(0deg, rgba(201, 164, 76, .9), rgba(201, 164, 76, 0));
}
.sweep.on { opacity: 1; }
.map-tip {
  position: absolute; z-index: 3; pointer-events: none; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px));
  background: var(--navy); color: var(--white); font-size: 12.5px; padding: 7px 10px; border-radius: 8px; box-shadow: var(--shadow-lg);
}
.map-tip b { color: var(--gold-bright); }
.outremer { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); }
.outremer span { border: 1px solid var(--line); border-radius: 7px; padding: 3px 9px; background: var(--white); }
.outremer span.on { border-color: var(--royal); color: var(--royal-dark); background: var(--royal-soft); font-weight: 600; }

.scan-panel { padding: 22px; display: grid; gap: 20px; position: sticky; top: 92px; }
.scan-panel h3 { font-size: 14px; font-weight: 700; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; }
.stepper li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 16px; }
.stepper li:not(:last-child)::before { content: ""; position: absolute; left: 10px; top: 24px; bottom: 2px; width: 2px; background: var(--line); }
.stepper li.done:not(:last-child)::before { background: var(--royal-mid); }
.stepper .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--white); position: relative; }
.stepper li.active .dot { border-color: var(--royal); border-top-color: transparent; animation: spin .8s linear infinite; }
.stepper li.done .dot { border-color: var(--royal); background: var(--royal); }
.stepper li.done .dot::after { content: ""; position: absolute; left: 6px; top: 2.5px; width: 5px; height: 9px; border: solid var(--white); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.stepper li.error .dot { border-color: var(--red); background: var(--red-soft); }
.stepper b { display: block; font-size: 14px; font-weight: 600; }
.stepper small { display: block; color: var(--muted); font-size: 12.5px; }
.stepper li.active b { color: var(--royal-dark); }
.journal { max-height: 150px; overflow-y: auto; display: grid; gap: 5px; padding: 12px 14px; background: var(--pearl); border: 1px solid var(--line); border-radius: 10px; }
.journal p { font-size: 12.3px; line-height: 1.45; color: var(--slate); animation: fadeIn .3s ease both; }
.journal p.warn { color: var(--amber); }
.journal p.err { color: var(--red); }
.journal p.ok { color: var(--green); }
.journal time { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 6px; }
.dep-counts { display: grid; gap: 10px; }
.dep-counts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.dep-counts li.row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 22px; gap: 10px; align-items: center; font-size: 13px; animation: fadeIn .4s ease both; }
.dep-counts .code { font-weight: 700; font-variant-numeric: tabular-nums; }
.dep-counts .nm { color: var(--muted); font-weight: 500; margin-left: 4px; }
.dep-counts .bar { height: 6px; background: var(--mist); border-radius: 3px; overflow: hidden; }
.dep-counts .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--royal), #5b8ff0); border-radius: 3px; transform-origin: left; animation: grow .8s cubic-bezier(.2, .8, .2, 1) both; }
.dep-counts .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Étape 3 */
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn { border: 1px solid var(--line-strong); background: var(--white); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; color: var(--slate); }
.chip-btn:hover { border-color: var(--navy); color: var(--navy); }
.chip-btn.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.chip-btn.chip-dep { background: var(--gold-soft); border-color: var(--gold-bright); color: var(--gold); }
.sort { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 500; }
select {
  appearance: none; border: 1px solid var(--line-strong); border-radius: 9px; padding: 8px 32px 8px 12px; font-weight: 600; color: var(--navy);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.results { display: grid; gap: 16px; }
.empty-state { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 56px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--slate); background: var(--pearl); }
.empty-state svg { width: 44px; height: 44px; color: var(--navy); opacity: .55; }

.opp {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 26px; padding: 26px 28px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, border-color .25s; animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms);
}
.opp:hover { box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.opp-score { display: grid; justify-items: center; align-content: start; gap: 6px; }
.opp-score .lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.opp-body { display: grid; gap: 14px; min-width: 0; }
.opp-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 6px; background: var(--mist); color: var(--slate); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill.urgent { background: var(--red-soft); color: var(--red); }
.pill.soon { background: var(--amber-soft); color: var(--amber); }
.pill.calm { background: var(--green-soft); color: var(--green); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }
.opp h3 { font-size: 19px; line-height: 1.35; font-weight: 700; }
.opp .buyer { color: var(--slate); font-weight: 500; margin-top: -8px; }
.opp-resume { color: var(--slate); line-height: 1.65; max-width: 80ch; }
.opp-resume.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.more { background: none; border: 0; padding: 0; color: var(--royal); font-weight: 600; font-size: 13.5px; justify-self: start; }
.opp-cols { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; }
.attn h4, .why h4 { margin: 0 0 8px; font: 600 12px var(--f-body); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.attn ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.attn li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 9px; font-size: 14px; color: var(--navy-2); align-items: start; }
.attn li i { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; margin-top: 1px; }
.attn li.alerte i { background: var(--amber-soft); color: var(--amber); }
.attn li.atout i { background: var(--royal-soft); color: var(--royal); }
.attn li.info i { background: var(--mist); color: var(--muted); }
.why { display: grid; align-content: start; }
.why-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--mist); }
.why-row b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--royal-dark); }
.why-row .star { color: var(--gold-bright); }
.opp-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); }
.opp-actions .ext { margin-left: auto; font-size: 13.5px; font-weight: 600; text-decoration: none; }
.opp-actions .ext:hover { text-decoration: underline; }

/* Jauge circulaire */
.ring { --size: 96px; position: relative; width: var(--size); height: var(--size); flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--mist); stroke-width: 7; }
.ring .val { fill: none; stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 1.3s cubic-bezier(.2, .8, .2, 1); }
.ring.fort .val { stroke: var(--royal); }
.ring.moyen .val { stroke: var(--gold-bright); }
.ring.faible .val { stroke: #94a3b8; }
.ring .num { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .num b { font: 800 28px/1 var(--f-display); letter-spacing: -.02em; display: block; }
.ring .num small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* Étape 4 : CRM */
.crm-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 4px; box-shadow: var(--shadow-sm); }
.kpi b { font: 800 26px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi.due { background: var(--navy); border-color: var(--navy); }
.kpi.due b { color: var(--gold-bright); }
.kpi.due span { color: #cbd5e1; }
.kanban-scroll { overflow-x: auto; padding-bottom: 6px; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 14px; min-width: 1120px; }
.col { background: var(--mist); border-radius: var(--radius); padding: 12px; display: grid; gap: 10px; align-content: start; min-height: 260px; transition: background .2s, box-shadow .2s; }
.col.drop { background: var(--royal-soft); box-shadow: inset 0 0 0 2px var(--royal-mid); }
.col-head { display: grid; gap: 2px; padding: 4px 4px 8px; }
.col-head div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.col-head h3 { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.col-head h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }
.col-head small { color: var(--muted); font-size: 12px; }
.col-head .n { font-size: 12px; font-weight: 700; background: var(--white); border-radius: 999px; padding: 1px 8px; color: var(--slate); }
.col-empty { font-size: 12.5px; color: var(--muted); text-align: center; padding: 22px 8px; border: 1px dashed var(--line-strong); border-radius: 10px; }
.dossier {
  background: var(--white); border: 1px solid var(--line); border-radius: 11px; padding: 13px; display: grid; gap: 8px;
  box-shadow: var(--shadow-sm); cursor: grab; text-align: left; transition: box-shadow .2s, transform .2s; animation: fadeIn .3s ease both;
}
.dossier:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.dossier.dragging { opacity: .5; }
.dossier-top { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.dossier h4 { font: 600 13.5px/1.35 var(--f-body); letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dossier .score-chip { font: 800 12.5px var(--f-display); color: var(--royal-dark); background: var(--royal-soft); border-radius: 6px; padding: 2px 7px; flex: none; font-variant-numeric: tabular-nums; }
.dossier .buyer { font-size: 12.3px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next { font-size: 12px; font-weight: 600; padding: 6px 8px; border-radius: 7px; background: var(--pearl); color: var(--slate); }
.next.late { background: var(--red-soft); color: var(--red); }
.next.today { background: var(--gold-soft); color: var(--gold); }
.dossier-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.dossier-foot .advance { border: 1px solid var(--line-strong); background: var(--white); border-radius: 7px; padding: 4px 9px; font-size: 12px; font-weight: 600; color: var(--navy); }
.dossier-foot .advance:hover { border-color: var(--navy); }

/* Modales */
.modal {
  width: min(980px, calc(100% - 32px)); max-height: calc(100% - 40px); padding: 0; border: 0; border-radius: 18px;
  background: var(--white); color: var(--navy); box-shadow: 0 40px 100px -30px rgba(15, 23, 42, .45);
}
.modal-sm { width: min(560px, calc(100% - 32px)); }
.modal::backdrop { background: rgba(15, 23, 42, .38); backdrop-filter: blur(4px); }
.modal[open] { animation: modalIn .3s cubic-bezier(.2, .8, .2, 1) both; }
.modal-inner { display: grid; }
.modal-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; padding: 24px 28px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 21px; font-weight: 800; margin-top: 4px; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 28px; border-top: 1px solid var(--line); background: var(--pearl); flex-wrap: wrap; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; }
.mail-compose { padding: 20px 28px 24px; display: grid; gap: 8px; min-width: 0; }
.mail-side { padding: 20px 24px; border-left: 1px solid var(--line); background: var(--pearl); display: grid; gap: 12px; align-content: start; }
.mail-side h3 { font-size: 14px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--slate); margin-top: 6px; }
input[type="text"], input[type="date"], input[type="password"], textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; background: var(--white); font-size: 14px; color: var(--navy);
}
input:focus, textarea:focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 3px var(--royal-soft); }
input[readonly] { background: var(--pearl); color: var(--slate); }
textarea { resize: vertical; line-height: 1.6; }
#mail-body { min-height: 320px; }
.note { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--gold-soft); color: #6f5520; line-height: 1.5; }
.sig-fields { display: grid; gap: 8px; }
#sig-modal .sig-fields { padding: 20px 28px; }
.sig-fields label { font-size: 12px; font-weight: 600; color: var(--slate); display: grid; gap: 4px; }
.form-grid { display: grid; gap: 6px; padding: 20px 28px; }
.form-error { color: var(--red); min-height: 18px; }

/* Tiroir dossier */
.drawer {
  margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(640px, 100%); padding: 0; border: 0;
  background: var(--white); color: var(--navy); box-shadow: -30px 0 80px -30px rgba(15, 23, 42, .4);
}
.drawer::backdrop { background: rgba(15, 23, 42, .3); backdrop-filter: blur(3px); }
.drawer[open] { animation: drawerIn .35s cubic-bezier(.2, .8, .2, 1) both; }
.drawer-inner { display: grid; gap: 22px; padding: 26px 28px 28px; }
.drawer-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.drawer-head h2 { font-size: 20px; line-height: 1.3; font-weight: 800; margin: 4px 0; }
.dr-status { display: grid; gap: 10px; }
.pipeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.pipeline button {
  width: 100%; height: 100%; text-align: left; border: 1px solid var(--line); background: var(--white); border-radius: 9px; padding: 8px 9px;
  font-size: 11.5px; font-weight: 600; color: var(--muted); line-height: 1.3; display: grid; gap: 6px; align-content: start;
}
.pipeline button::before { content: ""; height: 4px; border-radius: 2px; background: var(--line); }
.pipeline button.past { color: var(--slate); }
.pipeline button.past::before { background: var(--royal-mid); }
.pipeline button.current { border-color: var(--royal); color: var(--royal-dark); background: var(--royal-soft); }
.pipeline button.current::before { background: var(--royal); }
.dr-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dr-facts div { background: var(--white); padding: 11px 13px; display: grid; gap: 2px; min-width: 0; }
.dr-facts span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.dr-facts b { font-size: 14px; overflow-wrap: anywhere; }
.dr-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: end; }
.dr-next { font-size: 13.5px; padding: 11px 13px; border-radius: 10px; background: var(--pearl); border: 1px solid var(--line); }
.dr-next.late { background: var(--red-soft); border-color: #f5c2c2; color: var(--red); }
.dr-next.today { background: var(--gold-soft); border-color: #ecd9a8; color: #6f5520; }
.dr-mails { display: grid; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tabs { display: flex; background: var(--pearl); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 12px 16px; font-size: 13.5px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--gold-bright); background: var(--white); }
.tabs button .tag { font-size: 10.5px; margin-left: 6px; color: var(--gold); text-transform: uppercase; letter-spacing: .06em; }
.dr-mail { padding: 16px 18px 18px; display: grid; gap: 10px; }
.dr-mail .goal { font-size: 13px; color: var(--muted); }
.dr-mail .subject { font-weight: 600; font-size: 14px; }
.dr-mail pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 13.5px/1.7 var(--f-body); color: var(--navy-2); max-height: 340px; overflow-y: auto; padding: 14px; background: var(--pearl); border-radius: 10px; }
.dr-mail mark { background: var(--gold-soft); color: #6f5520; border-radius: 4px; padding: 0 3px; }
.dr-mail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dr-history { display: grid; gap: 8px; }
.dr-history ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dr-history li { font-size: 13px; color: var(--slate); display: flex; gap: 10px; }
.dr-history time { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 82px; }
.drawer-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 100;
  background: var(--navy); color: var(--white); padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg); animation: toastIn .3s ease both; display: flex; gap: 10px; align-items: center;
}
.toast::before { content: "✓"; color: var(--gold-bright); font-weight: 800; }

/* Pied de page */
.site-footer { padding-block: 32px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes counterIn { from { opacity: 0; transform: scale(.4); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Responsive */
@media (max-width: 1080px) {
  .nav { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-block: 52px 60px; }
  .step1-grid, .step2-grid { grid-template-columns: minmax(0, 1fr); }
  .scan-panel { position: static; }
  .crm-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mail-grid { grid-template-columns: minmax(0, 1fr); }
  .mail-side { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .header-right .status { display: none; }
  .header-right .btn { display: none; }
  .logo-word { font-size: 15px; }
  .step { padding-block: 56px; }
  .step-head { grid-template-columns: auto minmax(0, 1fr); }
  .head-action { grid-column: 1 / -1; justify-self: start; }
  .opp { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 16px; }
  .opp-score { grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-items: center; }
  .opp-cols { grid-template-columns: minmax(0, 1fr); }
  .opp-actions .ext { margin-left: 0; }
  .crm-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn-scan { min-width: 0; width: 100%; }
  .criteria { padding: 4px 18px 20px; }
  .dr-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dr-row { grid-template-columns: minmax(0, 1fr); }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-head, .modal-foot, .mail-compose, .form-grid { padding-left: 18px; padding-right: 18px; }
  #sig-modal .sig-fields { padding: 18px; }
  .drawer-inner { padding: 20px 18px; }
}

/* ===== Évolution : France entière, vue d'ensemble, fiche marché ===== */
.segmented.seg-3 { grid-template-columns: repeat(3, auto); max-width: none; }
.segmented.seg-sm { padding: 3px; border-radius: 9px; }
.segmented.seg-sm button { padding: 5px 11px; font-size: 12.5px; border-radius: 7px; }
.dep-picker { display: grid; gap: 10px; }
.dep-picker select { max-width: 340px; }
.dep-chip .x { color: var(--muted); margin-left: 2px; }
.map-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
#france .dep.reg { fill: #dbe6fb; }
#france .bubble { pointer-events: none; transform-box: fill-box; transform-origin: center; animation: counterIn .5s cubic-bezier(.2, .9, .3, 1.3) both; }
#france .bubble circle { fill: var(--navy); stroke: var(--gold-bright); vector-effect: non-scaling-stroke; stroke-width: 2; filter: drop-shadow(0 3px 6px rgba(15, 23, 42, .25)); }
#france .bubble circle.halo { fill: rgba(37, 99, 235, .14); stroke: none; filter: none; }
#france .bubble text { fill: var(--white); font-family: var(--f-display); font-weight: 800; text-anchor: middle; dominant-baseline: central; }
#france .bubble.region circle:not(.halo) { fill: var(--white); }
#france .bubble.region text { fill: var(--navy); }

/* Vue d'ensemble */
.overview { display: grid; gap: 32px; }
.ov-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ov-stat { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 3px; box-shadow: var(--shadow-sm); }
.ov-stat b { font: 800 26px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.ov-stat span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.ov-stat.hi { background: var(--navy); border-color: var(--navy); }
.ov-stat.hi b { color: var(--gold-bright); }
.ov-stat.hi span { color: #cbd5e1; }
.lane { display: grid; gap: 14px; }
.lane-head { display: flex; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.lane-head h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.lane-head h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.lane-head .n { font-size: 12.5px; font-weight: 700; color: var(--slate); background: var(--mist); border-radius: 999px; padding: 1px 9px; }
.lane-head small { color: var(--muted); font-size: 13px; margin-left: auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tile {
  display: grid; grid-template-rows: auto 1fr auto; gap: 10px; text-align: left; min-width: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px 15px;
  box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s, transform .2s;
  animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 25ms);
}
.tile:hover { box-shadow: var(--shadow-md); border-color: var(--royal-mid); transform: translateY(-2px); }
.tile.fort { border-color: #d5e2fc; }
.tile-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.score-badge {
  display: inline-flex; align-items: baseline; gap: 2px; font: 800 17px/1 var(--f-display); font-variant-numeric: tabular-nums;
  padding: 6px 9px; border-radius: 8px; background: var(--mist); color: var(--slate);
}
.score-badge small { font-size: 11px; font-weight: 600; opacity: .7; }
.score-badge.fort { background: var(--royal); color: var(--white); }
.score-badge.moyen { background: var(--gold-soft); color: var(--gold); box-shadow: inset 0 0 0 1px #ecd9a8; }
.tile h4 { font: 600 14.5px/1.38 var(--f-body); letter-spacing: 0; color: var(--navy); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-meta { display: grid; gap: 3px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.tile-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-meta .place { color: var(--slate); font-weight: 600; }
.tile-meta .place::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; border: 2px solid var(--gold-bright); margin-right: 6px; vertical-align: 0; }
.tile.tracked .tile-top::after { content: "Suivi"; font-size: 11px; font-weight: 700; color: var(--green); background: var(--green-soft); border-radius: 5px; padding: 2px 6px; margin-left: auto; order: 1; }
.tile.tracked .pill { order: 2; }

/* Fiche marché (tiroir large) */
.drawer-wide { width: min(760px, 100%); }
.mk-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.mk-head h2 { margin: 8px 0 4px; }
.mk-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mk-section { display: grid; gap: 10px; }
.mk-resume { color: var(--navy-2); line-height: 1.75; }
.mk-mail { padding: 20px; border: 1px solid var(--royal-mid); border-radius: 14px; background: linear-gradient(180deg, var(--royal-soft), var(--white) 120px); gap: 6px; animation: rise .35s ease both; }
.mk-mail-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.mk-mail textarea { min-height: 300px; }
.mk-mail .dr-mail-actions { align-items: center; margin-top: 6px; }
.ring-sm { --size: 72px; }
.ring-sm .num b { font-size: 21px; }
.ring-sm .track, .ring-sm .val { stroke-width: 8; }

@media (max-width: 720px) {
  .segmented.seg-3 { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .ov-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lane-head small { display: none; }
  .mk-head { grid-template-columns: minmax(0, 1fr); }
}

/* Sources */
.sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.src {
  display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 11px; background: var(--white);
  border: 1px solid var(--line-strong); transition: border-color .2s, background .2s, box-shadow .2s; position: relative;
}
.src b { font: 700 14px var(--f-display); }
.src span { font-size: 12.3px; color: var(--muted); line-height: 1.4; }
.src[aria-pressed="true"] { border-color: var(--royal); background: var(--royal-soft); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.src[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 10px; right: 12px; font-size: 12px; font-weight: 800; color: var(--royal); }
.src-off { border-style: dashed; background: var(--pearl); cursor: help; }
.src-off b { color: var(--slate); }
.src-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 2px 6px; border-radius: 5px; background: var(--mist); color: var(--slate); }
.src-tag.ted { background: #eef0ff; color: #3b45b5; }
.tile-src { display: flex; gap: 4px; }
@media (max-width: 720px) { .sources { grid-template-columns: minmax(0, 1fr); } }

.src-tag.app { background: var(--gold-soft); color: var(--gold); }
.src-tag.pla { background: var(--green-soft); color: var(--green); }
.mk-links { display: contents; }
.tile.futur { background: linear-gradient(180deg, var(--gold-soft), var(--white) 70%); border-style: dashed; border-color: #e6d3a3; }
.pill.prevu { background: var(--gold-soft); color: var(--gold); }
.ov-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1080px) { .ov-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ===================== Cibly · marque et configuration ===================== */
.logo-word { letter-spacing: .3em; font-weight: 800; }
.logo-mark { color: var(--navy); }
.tenant { display: inline-flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--white); }
.tenant-mono { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--gold-bright); display: grid; place-items: center; font: 700 11px var(--f-display); letter-spacing: .02em; }

/* Identité */
.identity { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 22px 24px; margin-bottom: 36px; }
.id-mono { width: 64px; height: 64px; border-radius: 16px; background: var(--navy); color: var(--gold-bright); display: grid; place-items: center; font: 800 22px var(--f-display); letter-spacing: .03em; box-shadow: 0 10px 24px -12px rgba(15, 23, 42, .6); }
.id-main { display: grid; gap: 6px; min-width: 0; }
.id-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.id-title h3 { font-size: 22px; font-weight: 800; }
.id-lock { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); background: var(--gold-soft); border-radius: 6px; padding: 3px 8px; }
.id-desc { color: var(--slate); }
.id-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.id-meta span { font-size: 12px; font-weight: 600; color: var(--slate); background: var(--mist); padding: 3px 9px; border-radius: 6px; }
.id-meta .sep { background: none; color: var(--muted); padding: 0 2px; font-weight: 500; }

.block-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 16px; }
.block-head h3 { font-size: 18px; font-weight: 800; }
.block-head.inner { margin-bottom: 8px; align-items: center; }
.block-head.inner h3 { font-size: 15px; }

/* Axes */
.axes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-bottom: 28px; }
.axis {
  --ax: var(--royal);
  display: grid; gap: 14px; align-content: start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s, opacity .2s; position: relative; overflow: hidden;
}
.axis::before { content: ""; position: absolute; inset: 0 0 auto; height: 72px; background: linear-gradient(180deg, color-mix(in srgb, var(--ax) 10%, transparent), transparent); pointer-events: none; }
.axis:hover { box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.axis.off { opacity: .62; }
.axis.off::before { display: none; }
.axis-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; position: relative; }
.axis-name { display: grid; gap: 4px; min-width: 0; }
.axis-name h4 { font: 800 17px/1.25 var(--f-display); letter-spacing: -.01em; display: flex; align-items: center; gap: 9px; }
.axis-name h4::before { content: ""; width: 11px; height: 11px; border-radius: 3px; background: var(--ax); flex: none; transform: rotate(45deg); }
.axis-scope { font-size: 12.5px; color: var(--muted); }
.owner { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--white); font: 700 11px var(--f-display); flex: none; background: var(--c, var(--slate)); }
.owner small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.kw-line { display: flex; flex-wrap: wrap; gap: 5px; }
.kw { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--mist); color: var(--navy-2); }
.kw.neg { background: var(--red-soft); color: var(--red); text-decoration: line-through; text-decoration-color: rgba(185, 28, 28, .4); }
.kw.more { background: none; color: var(--muted); padding-left: 2px; }
.goals-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.goals-row div { background: var(--pearl); padding: 9px 10px; display: grid; gap: 2px; min-width: 0; }
.goals-row b { font: 800 15px var(--f-display); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goals-row span { font-size: 11px; color: var(--muted); font-weight: 500; }
.goals-row.empty div b { color: var(--line-strong); }
.axis-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.axis-new { border-style: dashed; border-color: var(--line-strong); background: transparent; box-shadow: none; display: grid; place-items: center; text-align: center; min-height: 240px; color: var(--slate); cursor: pointer; }
.axis-new:hover { border-color: var(--royal); background: var(--white); color: var(--royal-dark); }
.axis-new b { font: 700 16px var(--f-display); display: block; margin-top: 8px; }
.axis-new .plus { margin: 0 auto; }

/* Interrupteur */
.toggle { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--slate); cursor: pointer; }
.toggle input, .switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(15, 23, 42, .3); transition: transform .2s; }
input:checked + .switch { background: var(--royal); }
input:checked + .switch::after { transform: translateX(16px); }
input:focus-visible + .switch { outline: 2px solid var(--royal); outline-offset: 2px; }
.switch-row { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; cursor: pointer; position: relative; }

/* Équipe + scan */
.config-bottom { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 24px; align-items: start; }
.team { padding: 18px 20px; }
.team-list { list-style: none; margin: 0; padding: 0; display: grid; }
.team-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.team-list li:first-child { border-top: 0; }
.team-list b { font-size: 14px; display: block; }
.team-list small { color: var(--muted); font-size: 12.3px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-list .axes-dots { display: flex; gap: 4px; }
.team-list .axes-dots i { width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); background: var(--c); }
.team-list button { border: 0; background: none; color: var(--royal); font-weight: 600; font-size: 12.5px; padding: 4px; }
.scan-card { padding: 6px 24px 22px; }
.scan-summary { font-size: 13.5px; color: var(--slate); max-width: 52ch; }
.scan-summary b { color: var(--navy); }

/* Formulaires axe / identité / membre */
.ax-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: end; }
.field { display: grid; gap: 8px; }
.inline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.inline select { min-width: 240px; }
.swatches { display: flex; gap: 7px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--line-strong); background: var(--c); padding: 0; }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--navy); }
.goals { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.goals legend { padding: 0 6px; margin-left: -6px; }
.goals label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--slate); }
.unit-input { position: relative; display: block; }
.unit-input input { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 40px 10px 12px; font-size: 14px; font-variant-numeric: tabular-nums; }
.unit-input input:focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 3px var(--royal-soft); }
.unit-input i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
#axis-drawer .drawer-inner { gap: 20px; }

/* Axes dans les étapes 2 à 4 */
.axis-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--navy-2); background: color-mix(in srgb, var(--c) 12%, white); border-radius: 6px; padding: 3px 8px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.axis-chip::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--c); transform: rotate(45deg); flex: none; }
.chip-btn.axis-filter::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--c); transform: rotate(45deg); margin-right: 7px; vertical-align: 1px; }
.chip-btn.axis-filter.active { background: var(--white); color: var(--navy); border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.filters-sep { width: 1px; background: var(--line-strong); margin: 4px 4px; }
.dossier .owner-mini { display: inline-flex; align-items: center; gap: 6px; }
.dossier .avatar { width: 22px; height: 22px; font-size: 9.5px; }

@media (max-width: 1080px) { .config-bottom { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .identity { grid-template-columns: auto minmax(0, 1fr); }
  .identity > .btn { grid-column: 1 / -1; justify-self: start; }
  .tenant span:last-child { display: none; }
  .axes { grid-template-columns: minmax(0, 1fr); }
  .goals { grid-template-columns: minmax(0, 1fr); }
  .ax-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ===================== Phase 2 : score détaillé, tableau, pipeline ===================== */
.bar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.crit-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.crit-mini i { height: 4px; border-radius: 2px; background: var(--mist); position: relative; overflow: hidden; }
.crit-mini i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--royal); border-radius: 2px; }
.crit-mini i.na::after { display: none; }
.crit-mini i.na { background: repeating-linear-gradient(90deg, var(--mist) 0 3px, transparent 3px 5px); }
.breakdown { display: grid; gap: 12px; }
.crit { display: grid; grid-template-columns: 120px minmax(0, 1fr) 52px; gap: 12px; align-items: center; }
.crit-name { font-size: 13.5px; font-weight: 700; display: grid; }
.crit-name small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.crit-bar { display: grid; gap: 4px; min-width: 0; }
.crit-track { height: 8px; border-radius: 4px; background: var(--mist); overflow: hidden; }
.crit-track i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--royal), #5b8ff0); transform-origin: left; animation: grow .8s cubic-bezier(.2, .8, .2, 1) both; }
.crit-track.mid i { background: linear-gradient(90deg, var(--gold-bright), #dcbf74); }
.crit-track.low i { background: #94a3b8; }
.crit-bar small { font-size: 12px; color: var(--muted); }
.crit-pct { text-align: right; font: 800 15px var(--f-display); font-variant-numeric: tabular-nums; }
.crit.na .crit-pct { color: var(--line-strong); font-weight: 600; font-size: 13px; }
.crit-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.crit-total b { font: 800 18px var(--f-display); color: var(--navy); }
.kw-detail summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--royal); margin-top: 6px; }
.kw-detail .why { margin-top: 8px; }

/* Tableau des marchés */
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.mtable { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 1080px; }
.mtable th { position: sticky; top: 0; background: var(--pearl); text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mtable th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.mtable th button:focus-visible { outline: 2px solid var(--royal); border-radius: 4px; }
.mtable th[aria-sort] button::after { content: "↓"; color: var(--royal); }
.mtable th[aria-sort="ascending"] button::after { content: "↑"; }
.mtable th.num, .mtable td.num { text-align: right; }
.mtable td { padding: 9px 12px; border-bottom: 1px solid var(--mist); vertical-align: middle; font-variant-numeric: tabular-nums; }
.mtable tbody tr { cursor: pointer; transition: background .15s; }
.mtable tbody tr:hover { background: var(--royal-soft); }
.mtable tbody tr:focus-visible { outline: 2px solid var(--royal); outline-offset: -2px; }
.mtable tr.futur td { background: color-mix(in srgb, var(--gold-soft) 60%, transparent); }
.mtable .t-title { font-weight: 600; color: var(--navy); max-width: 340px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mtable .t-sub { color: var(--muted); font-size: 12px; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pct { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.pct i { width: 34px; height: 5px; border-radius: 3px; background: var(--mist); position: relative; overflow: hidden; }
.pct i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--royal); }
.pct.na { color: var(--line-strong); }

/* Pipeline : valeurs */
.crm-summary { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.kpi.value { background: linear-gradient(135deg, var(--royal-soft), var(--white)); border-color: var(--royal-mid); }
.kpi.value b { color: var(--royal-dark); }
.col-value { font: 800 15px var(--f-display); color: var(--navy); font-variant-numeric: tabular-nums; }
.col-value small { font: 500 11.5px var(--f-body); color: var(--muted); margin-left: 4px; }
.dossier .value-chip { font: 700 12px var(--f-display); color: var(--navy-2); font-variant-numeric: tabular-nums; }
.dossier .value-chip.est { color: var(--muted); font-weight: 600; }
.quick-mail { border: 1px solid var(--royal-mid); background: var(--royal-soft); color: var(--royal-dark); border-radius: 7px; padding: 5px 9px; font-size: 12px; font-weight: 700; text-align: left; }
.quick-mail:hover { background: var(--royal); color: var(--white); border-color: var(--royal); }
.dr-row-3 { grid-template-columns: 180px 200px minmax(0, 1fr); }
.dr-row-3 small { display: block; margin-top: 4px; font-size: 11.5px; }
.toast { gap: 14px; }
.toast .t-actions { display: flex; gap: 8px; margin-left: 6px; }
.toast .t-actions a, .toast .t-actions button { background: rgba(255, 255, 255, .12); color: var(--white); border: 0; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; font-weight: 600; text-decoration: none; }
.toast .t-actions a:hover, .toast .t-actions button:hover { background: var(--gold-bright); color: var(--navy); }
.axis-progress { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.axis-progress .track { height: 5px; background: var(--mist); border-radius: 3px; overflow: hidden; }
.axis-progress .track i { display: block; height: 100%; background: var(--ax); border-radius: 3px; }
.axis-progress b { color: var(--navy); }
@media (max-width: 1080px) { .crm-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); } .dr-row-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 720px) { .crm-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .crit { grid-template-columns: 96px minmax(0, 1fr) 44px; } .dr-row-3 { grid-template-columns: minmax(0, 1fr); } }
.dossier-foot { flex-wrap: wrap; row-gap: 6px; }
.dossier .value-chip, .dossier-foot .advance { white-space: nowrap; }
.dossier .owner-mini { min-width: 0; }

/* ===================== Bid-Copilot ===================== */
#copilot { background: linear-gradient(180deg, var(--white), var(--pearl)); }
.cp-setup { padding: 8px 24px; margin-bottom: 20px; display: grid; }
.cp-setup-step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cp-setup-step:last-child { border-bottom: 0; }
.cp-setup-step.done { opacity: .55; }
.cp-setup-step.done .cp-badge { background: var(--green); }
.cp-setup-body { display: grid; gap: 8px; max-width: 78ch; }
.cp-setup-body h3 { font-size: 16px; }
.cp-badge { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--white); display: grid; place-items: center; font: 700 13px var(--f-display); }
.cp-setup code, .cp-status code { font-size: 12px; background: var(--mist); padding: 1px 5px; border-radius: 4px; }
.cp-status { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; color: var(--slate); }
.cp-status .ok { color: var(--green); font-weight: 700; }
.cp-status .warn { color: #9A3412; font-weight: 700; }
.cp-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.cp-side { display: grid; gap: 16px; position: sticky; top: 88px; }
.cp-pick, .cp-docs { padding: 18px; display: grid; gap: 10px; }
.cp-dossier-info { display: grid; gap: 6px; font-size: 13px; color: var(--slate); }
.cp-dossier-info b { color: var(--navy); font-size: 14px; line-height: 1.35; }
.drop { position: relative; display: grid; gap: 4px; justify-items: center; text-align: center; padding: 22px 14px; border: 1.5px dashed var(--line-strong); border-radius: 12px; background: var(--pearl); cursor: pointer; transition: border-color .2s, background .2s; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--royal); background: var(--royal-soft); }
.drop b { font-size: 14px; }
.drop:focus-within { outline: 2px solid var(--royal); outline-offset: 2px; }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.doc-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; }
.doc-list .ext { font: 700 10px var(--f-display); letter-spacing: .05em; text-transform: uppercase; background: var(--navy); color: var(--gold-bright); border-radius: 5px; padding: 3px 5px; }
.doc-list span.n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-list small { color: var(--muted); display: block; font-size: 11.5px; }
.doc-list button { border: 0; background: none; color: var(--muted); font-size: 14px; }
.doc-list button:hover { color: var(--red); }
.cp-main { overflow: hidden; min-width: 0; }
.cp-pane { padding: 22px 24px 26px; display: grid; gap: 20px; min-width: 0; }
.cp-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cp-empty { text-align: center; padding: 34px 16px; color: var(--slate); display: grid; gap: 10px; justify-items: center; }
.cp-empty svg { width: 40px; height: 40px; color: var(--navy); opacity: .5; }
.btn.loading { pointer-events: none; }
.btn.loading::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .8s linear infinite; }
.verdict { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--pearl); }
.verdict .tag-go { font: 800 13px var(--f-display); letter-spacing: .06em; text-transform: uppercase; padding: 7px 12px; border-radius: 8px; white-space: nowrap; }
.tag-go.go { background: var(--green-soft); color: var(--green); }
.tag-go.a_etudier { background: var(--gold-soft); color: var(--gold); }
.tag-go.no_go { background: var(--red-soft); color: var(--red); }
.verdict p { line-height: 1.65; }
.cp-block { display: grid; gap: 10px; }
.cp-block h4 { margin: 0; font: 700 15px var(--f-display); display: flex; align-items: center; gap: 10px; }
.cp-block h4 .n { font: 600 12px var(--f-body); color: var(--muted); }
.req-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.req-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--pearl); }
.req-table td { padding: 9px 10px; border-bottom: 1px solid var(--mist); vertical-align: top; }
.req-table td.id { font-weight: 700; white-space: nowrap; color: var(--slate); }
.req-table .src { color: var(--muted); font-size: 12px; }
.chip-cat { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: var(--mist); color: var(--slate); white-space: nowrap; }
.chip-ob { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: var(--red-soft); color: var(--red); white-space: nowrap; }
.crit-weights { display: grid; gap: 10px; }
.cw { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr) 52px; gap: 12px; align-items: center; font-size: 13.5px; }
.cw b { font-weight: 600; }
.cw small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.cw .bar { height: 8px; border-radius: 4px; background: var(--mist); overflow: hidden; }
.cw .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--royal)); border-radius: 4px; }
.cw .w { text-align: right; font: 800 15px var(--f-display); font-variant-numeric: tabular-nums; }
.risk-list, .piece-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.risk-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }
.risk-list .g { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; text-align: center; padding: 4px 0; border-radius: 5px; align-self: start; }
.g.eleve { background: var(--red-soft); color: var(--red); } .g.moyen { background: var(--amber-soft); color: var(--amber); } .g.faible { background: var(--mist); color: var(--slate); }
.risk-list small { display: block; color: var(--muted); margin-top: 3px; }
.piece-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.piece-list li { font-size: 13px; padding: 8px 10px; background: var(--pearl); border-radius: 8px; display: flex; gap: 8px; }
.piece-list li::before { content: "▢"; color: var(--muted); }
.dates-row { display: flex; gap: 10px; flex-wrap: wrap; }
.dates-row span { font-size: 12.5px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.dates-row b { display: block; font-size: 13.5px; }
.editor { width: 100%; min-height: 460px; font: 400 14px/1.7 var(--f-body); }
.ref-pick { display: grid; gap: 6px; }
.ref-pick label { display: flex; gap: 10px; align-items: start; font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.ref-pick label:has(input:checked) { border-color: var(--royal); background: var(--royal-soft); }
.ref-pick small { display: block; color: var(--muted); }
.coverage { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; }
.coverage .ring { --size: 104px; }
.status-chip { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 5px; white-space: nowrap; }
.status-chip.couvert { background: var(--green-soft); color: var(--green); }
.status-chip.partiel { background: var(--amber-soft); color: var(--amber); }
.status-chip.absent { background: var(--red-soft); color: var(--red); }
.manques { border: 1px solid #f5c2c2; background: var(--red-soft); border-radius: 12px; padding: 14px 16px; }
.manques h4 { color: var(--red); }
.manques ul { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; display: grid; gap: 4px; }
.sugg { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.sugg-card { border: 1px solid var(--royal-mid); background: linear-gradient(180deg, var(--royal-soft), var(--white) 80px); border-radius: 12px; padding: 14px; display: grid; gap: 8px; font-size: 13px; }
.sugg-card b { font-size: 14px; }
.sugg-card .p { font: 800 20px var(--f-display); color: var(--royal-dark); }
.sugg-card .angle { color: var(--slate); font-style: italic; }
.ref-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ref-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }
.ref-list small { color: var(--muted); display: block; }
.ref-row { display: grid; grid-template-columns: 110px 160px minmax(0, 1fr); gap: 10px; }
.ref-row label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--slate); }
.ref-row input { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
@media (max-width: 1080px) { .cp-grid { grid-template-columns: minmax(0, 1fr); } .cp-side { position: static; } }
@media (max-width: 720px) { .cw { grid-template-columns: minmax(0, 1fr) 52px; } .cw .bar { grid-column: 1 / -1; grid-row: 2; } .ref-row { grid-template-columns: minmax(0, 1fr); } .cp-pane { padding: 18px 16px; } }
.cp-side, .cp-pick, .cp-docs { min-width: 0; }
.cp-pick select { width: 100%; max-width: 100%; text-overflow: ellipsis; }

/* ===================== Intelligence concurrentielle ===================== */
#france .bubble.attrib circle:not(.halo) { fill: var(--gold-bright); stroke: var(--white); }
#france .bubble.attrib circle.halo { fill: rgba(201, 164, 76, .16); }
#france .bubble.attrib text { fill: var(--navy); }
.competitors { display: grid; gap: 10px; }
.competitors ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: c; }
.competitors li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 13px; counter-increment: c; }
.competitors li::before { content: counter(c); font: 700 11px var(--f-display); color: var(--muted); }
.competitors li b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.competitors li small { color: var(--muted); font-size: 11.5px; }
.competitors li .w { font: 800 13px var(--f-display); font-variant-numeric: tabular-nums; }
.chip-btn.chip-gap.active { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--navy); }
.pill.gap { background: var(--navy); color: var(--gold-bright); }
.pill.gap::before { content: "◆ "; }
.pill.fight { background: var(--red-soft); color: var(--red); }
.conc { display: grid; gap: 14px; }
.conc-base { font-size: 13px; color: var(--slate); }
.incumbent { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--pearl); }
.incumbent .mono { width: 42px; height: 42px; border-radius: 11px; background: var(--white); border: 1px solid var(--line-strong); display: grid; place-items: center; font: 800 14px var(--f-display); color: var(--navy); }
.incumbent b { font-size: 15px; }
.incumbent .facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--slate); margin-top: 4px; }
.incumbent .facts span b { font-size: 12.5px; color: var(--navy); }
.conc-signals { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.conc-signals li { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; font-size: 13.5px; align-items: baseline; }
.conc-signals .t { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 4px 0; border-radius: 5px; text-align: center; }
.t.breche { background: var(--navy); color: var(--gold-bright); } .t.vigilance { background: var(--red-soft); color: var(--red); } .t.info { background: var(--mist); color: var(--slate); }
.palmares { width: 100%; border-collapse: collapse; font-size: 13px; }
.palmares th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.palmares td { padding: 7px 8px; border-bottom: 1px solid var(--mist); font-variant-numeric: tabular-nums; }
.palmares td.num, .palmares th.num { text-align: right; }
.palmares tr.is-incumbent td:first-child b::after { content: " · sortant"; color: var(--gold); font-size: 11px; font-weight: 700; }
.conc-src { font-size: 11.5px; color: var(--muted); }

/* ===================== Veille amont ===================== */
.am-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.am-timeline-card { padding: 18px 20px 20px; margin-bottom: 22px; display: grid; gap: 12px; }
.am-timeline { position: relative; overflow-x: auto; }
.tl { display: grid; grid-template-columns: repeat(var(--n), minmax(56px, 1fr)); min-width: 900px; }
.tl-col { border-left: 1px solid var(--line); padding: 0 4px; display: grid; align-content: start; gap: 4px; min-height: 120px; }
.tl-col:first-child { border-left: 0; }
.tl-col.now { background: linear-gradient(180deg, var(--royal-soft), transparent); }
.tl-head { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 4px 2px 8px; white-space: nowrap; }
.tl-col.y .tl-head { color: var(--navy); }
.tl-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.tl-dot { width: 13px; height: 13px; border-radius: 4px; transform: rotate(45deg); background: var(--c); border: 0; padding: 0; cursor: pointer; box-shadow: 0 0 0 2px var(--white); }
.tl-dot.new { box-shadow: 0 0 0 2px var(--gold-bright); }
.tl-dot:hover, .tl-dot:focus-visible { transform: rotate(45deg) scale(1.3); }
.tl-n { font: 800 13px var(--f-display); color: var(--navy); }
.tl-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.tl-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); background: var(--c); margin-right: 6px; }
.am-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.am-main { min-width: 0; display: grid; gap: 14px; }
.am-list { display: grid; gap: 10px; }
.sig { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s; scroll-margin-top: 100px; }
.sig:hover { box-shadow: var(--shadow-md); }
.sig.flash { border-color: var(--gold-bright); box-shadow: 0 0 0 3px var(--gold-soft); }
.sig.ecarte { opacity: .5; }
.sig-body { display: grid; gap: 6px; min-width: 0; }
.sig-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sig h4 { margin: 0; font: 600 15px/1.4 var(--f-body); letter-spacing: 0; }
.sig .meta { font-size: 12.5px; color: var(--slate); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sig .meta b { color: var(--navy); }
.sig .desc { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sig-actions { display: grid; gap: 6px; align-content: start; justify-items: end; }
.pill.new { background: var(--gold-bright); color: var(--navy); }
.pill.published { background: var(--green); color: var(--white); }
.src-tag.doc { background: #f3e8ff; color: #6b21a8; }
.am-doc { padding: 20px; display: grid; gap: 10px; position: sticky; top: 92px; }
.am-doc h3 { font-size: 15px; }
.am-doc-form { display: grid; gap: 8px; }
.am-doc-form select { width: 100%; }
.dossier .published-link { border: 0; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: 12px; border-radius: 7px; padding: 5px 9px; text-align: left; }
.kanban { grid-template-columns: repeat(6, minmax(210px, 1fr)); min-width: 1320px; }
.crm-summary { grid-template-columns: repeat(8, minmax(0, 1fr)); }
@media (max-width: 1080px) { .am-grid { grid-template-columns: minmax(0, 1fr); } .am-doc { position: static; } .crm-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px) { .am-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sig { grid-template-columns: minmax(0, 1fr); } .sig-actions { justify-items: start; grid-auto-flow: column; } }

.pipeline { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 720px) { .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Références de l'entreprise (onglet) ------------------------------------ */
.rfv-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; }
.rfv-tools { display: flex; gap: 8px; flex: 1 1 320px; min-width: 0; }
.rfv-tools input, .rfv-tools select { min-height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 12px; font-size: 14px; background: var(--white); color: var(--navy); }
.rfv-tools input { flex: 1 1 auto; min-width: 0; }
.rfv-tools select { flex: 0 1 200px; min-width: 0; }
.rfv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rfv-actions .btn, .rfv-vide .btn { min-height: 44px; }
.rfv-compte { margin: 0; }
.rfv-filtre { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--amber-soft); color: #7a3505; font-size: 14px; }
.refx-sans-date { margin: 0; padding: 8px 12px; border-radius: 9px; background: var(--amber-soft); color: #7a3505; }
.rfv-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.rfv-card { width: 100%; height: 100%; display: grid; gap: 10px; align-content: start; text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-sm); font: inherit; color: inherit; cursor: pointer; }
.rfv-card:hover, .rfv-card:focus-visible { border-color: var(--royal); box-shadow: var(--shadow-md); }
.rfv-t b { display: block; color: var(--navy); font-size: 15px; line-height: 1.35; }
.rfv-t small { display: block; color: var(--slate); font-size: 13px; margin-top: 3px; }
.rfv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rfv-tags .pill { white-space: normal; }
.pill.rfv-prive { background: var(--amber-soft); color: #8a3c06; }
.pill.rfv-att { background: var(--green-soft); color: #035c42; }
.rfv-fill { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rfv-fill small { color: var(--slate); font-size: 12.5px; }
.rfv-jauge { height: 6px; border-radius: 99px; background: var(--mist); overflow: hidden; }
.rfv-jauge i { display: block; height: 100%; background: var(--royal); border-radius: inherit; }
.rfv-vide { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; align-items: start; padding: 24px; }
.rfv-vide > svg { width: 48px; height: 48px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rfv-vide h3 { margin: 0 0 6px; }
.rfv-vide p { margin: 0 0 14px; color: var(--slate); max-width: 64ch; }

/* Fiche d'une référence */
.rf-form { gap: 14px; }
.rf-aide { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--royal-soft); color: var(--navy-2); font-size: 13.5px; line-height: 1.5; }
.rf-fs { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; margin: 0; display: grid; gap: 6px; min-width: 0; }
.rf-fs legend { font-weight: 700; font-size: 13px; color: var(--navy); padding: 0 6px; }
.rf-fs textarea, .rf-fs input[type="text"], .rf-fs input[type="email"], .rf-fs input[type="tel"], .rf-fs input[type="file"] { width: 100%; box-sizing: border-box; }
.rf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.rf-grid label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--slate); min-width: 0; }
.rf-grid input, .rf-grid select { width: 100%; box-sizing: border-box; min-height: 42px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 12px; font-size: 14px; background: var(--white); color: var(--navy); }
.rf-axes { display: flex; flex-wrap: wrap; gap: 8px; }
.rf-axe { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; cursor: pointer; }
.rf-proposer { justify-self: start; min-height: 36px; }
.rf-att-cur { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin: 0 0 6px; }
@media (max-width: 560px) { .rf-grid { grid-template-columns: minmax(0, 1fr); } .rfv-tools { flex-wrap: wrap; } .rfv-tools select { flex: 1 1 100%; } .rfv-vide { grid-template-columns: minmax(0, 1fr); } }

/* Import en masse */
.imp-corps { gap: 12px; }
.imp-sources { display: grid; gap: 10px; }
.imp-src { display: grid; gap: 4px; text-align: left; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--white); font: inherit; color: var(--navy); cursor: pointer; }
.imp-src:hover:not(:disabled), .imp-src:focus-visible { border-color: var(--royal); background: var(--royal-soft); }
.imp-src:disabled { cursor: not-allowed; opacity: .75; }
.imp-src b { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.imp-src span:not(.pro-only-tag) { color: var(--slate); font-size: 13.5px; }
.imp-retour { justify-self: start; min-height: 36px; }
.imp-corr summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.imp-corr-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin-top: 10px; }
.imp-corr-g label { display: grid; gap: 3px; font-size: 12.5px; color: var(--slate); min-width: 0; }
.imp-corr-g label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.imp-corr-g select { width: 100%; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 6px 10px; font-size: 13.5px; background: var(--white); }
.imp-periode { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--gold-soft); font-size: 13.5px; line-height: 1.5; }
.imp-tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.imp-liste { max-height: 46vh; overflow-y: auto; }
@media (max-width: 560px) { .imp-corr-g { grid-template-columns: minmax(0, 1fr); } }

/* Vue d'ensemble : invitation, fiche opportunité : référence comparable */
.home-refs { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 18px; }
.home-refs .hr-ic { width: 34px; height: 34px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.home-refs p { margin: 3px 0 0; }
.home-refs .btn { min-height: 44px; }
@media (max-width: 720px) { .home-refs { grid-template-columns: 34px minmax(0, 1fr); } .home-refs .btn { grid-column: 1 / -1; } }
.mk-refcomp { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 9px 12px; border-radius: 10px; background: var(--green-soft); color: #035c42; font-size: 14px; }
.mk-refcomp svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.8; }
