/* Cibly · coque applicative : écran de connexion, barre latérale fixe, onglets, top 10, CRM.
   Complète styles.css (jetons de couleur, composants) ; thème clair unique. */
:root {
  --sb-w: 256px;
  --sb-bg: #0b1324;
  --sb-bg-2: #131d33;
  --sb-line: rgba(255, 255, 255, .08);
  --sb-text: #c3cbdb;
  --sb-dim: #7d889e;
  --violet: #7c3aed;
  --violet-soft: #f3eefe;
}
html { scroll-padding-top: 24px; }
body { background: var(--pearl); }

/* ------------------------------------------------------------------ */
/* Écran de connexion                                                  */
/* ------------------------------------------------------------------ */
.gate { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: var(--white); }
.gate-brand {
  position: relative; overflow: hidden; background: radial-gradient(120% 90% at 0% 0%, #1b2a4a 0%, var(--sb-bg) 55%);
  color: var(--white); padding: 44px clamp(28px, 5vw, 64px); display: grid; grid-template-rows: auto 1fr auto; gap: 40px;
}
.gate-arcs {
  position: absolute; left: -260px; bottom: -320px; width: 900px; height: 900px; border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(circle at center, transparent 0 62px, rgba(201, 164, 76, .10) 62px 63px);
  -webkit-mask-image: radial-gradient(circle at center, #000 25%, transparent 70%); mask-image: radial-gradient(circle at center, #000 25%, transparent 70%);
  animation: arcs 60s linear infinite;
}
@keyframes arcs { to { transform: rotate(360deg); } }
.logo-light, .logo-light .logo-word { color: var(--white); }
.logo-light .logo-mark { color: var(--white); }
.gate-pitch { position: relative; align-self: center; display: grid; gap: 18px; max-width: 34rem; }
.gate-pitch h1 { color: var(--white); font-size: clamp(30px, 3.4vw, 46px); line-height: 1.1; font-weight: 800; letter-spacing: -.025em; }
.gate-pitch p:not(.eyebrow) { color: #b9c3d6; font-size: 16.5px; line-height: 1.65; }
.gate-proof { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gate-proof li { border-top: 1px solid rgba(201, 164, 76, .45); padding-top: 12px; display: grid; gap: 3px; }
.gate-proof b { font: 700 14px var(--f-display); color: var(--gold-bright); }
.gate-proof span { font-size: 12.5px; color: #98a3b8; }
.gate-panel { padding: 40px clamp(24px, 5vw, 72px); display: flex; flex-direction: column; overflow-y: auto; max-height: 100vh; }
.gate-panel > .gate-step { margin-block: auto; }
.gate-step { display: grid; gap: 18px; width: 100%; max-width: 640px; animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.gate-head { display: grid; gap: 8px; }
.gate-head h2 { font-size: clamp(24px, 2.4vw, 30px); font-weight: 800; }
.gate-head .link-btn { justify-self: start; }
.tenants { display: grid; gap: 10px; }
.tenant-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 16px; align-items: center; text-align: left;
  padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s, transform .2s; animation: rise .4s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 60ms);
}
.tenant-card:hover { border-color: var(--royal-mid); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.tenant-card:hover .tc-go { background: var(--navy); color: var(--gold-bright); transform: translateX(3px); }
.tenant-mono.lg { width: 46px; height: 46px; border-radius: 13px; font-size: 16px; }
.tc-main { display: grid; gap: 4px; min-width: 0; }
.tc-main b { font: 700 16px var(--f-display); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tc-main b em { font: 700 10.5px var(--f-body); font-style: normal; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); background: var(--gold-soft); border-radius: 5px; padding: 2px 6px; }
.tc-main small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-axes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.tc-stats { display: grid; gap: 1px; text-align: right; font-size: 12.5px; color: var(--slate); white-space: nowrap; }
.tc-stats b { color: var(--navy); font-variant-numeric: tabular-nums; }
.tc-stats small { color: var(--muted); font-size: 11.5px; }
.tc-go { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--mist); color: var(--navy); font-weight: 700; transition: all .2s; }
.tenant-new {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; text-align: left; padding: 16px 18px;
  border: 1.5px dashed var(--line-strong); border-radius: 14px; background: var(--pearl); color: var(--navy); transition: border-color .2s, background .2s;
}
.tenant-new:hover { border-color: var(--royal); background: var(--royal-soft); }
.tenant-new b { font: 700 15px var(--f-display); display: block; }
.tenant-new small { color: var(--muted); font-size: 12.5px; }

/* Assistant de création */
.wizard { gap: 16px; }
.wz-steps { list-style: none; margin: 6px 0 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.wz-steps li { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--mist); }
.wz-steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--white); font: 700 11.5px var(--f-display); color: var(--slate); }
.wz-steps li.current { background: var(--navy); color: var(--white); }
.wz-steps li.current span { background: var(--gold-bright); color: var(--navy); }
.wz-steps li.done { background: var(--green-soft); color: var(--green); }
.wz-steps li.done span { background: var(--green); color: var(--white); }
.wz-pane { display: grid; gap: 6px; animation: rise .35s ease both; }
.wz-pane select { width: 100%; max-width: 420px; }
.wz-pane .segmented { margin-top: 2px; }
.wz-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.wz-row > div { display: grid; gap: 6px; }
.wz-row select { width: 100%; }
.sectors { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.wz-axes { display: grid; gap: 10px; }
.wz-axis { --ax: var(--royal); display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--ax); border-radius: 12px; background: var(--white); animation: rise .3s ease both; }
.wz-axis-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.wz-axis-top input { font-weight: 700; }
.wz-color { width: 26px; height: 26px; border-radius: 7px; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--line-strong); background: var(--c); padding: 0; }
.wz-axis .badge-input { max-width: none; }
.wz-empty { font-size: 13px; color: var(--muted); padding: 16px; border: 1px dashed var(--line-strong); border-radius: 12px; text-align: center; }
.wz-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }

/* ------------------------------------------------------------------ */
/* Coque : barre latérale + contenu                                    */
/* ------------------------------------------------------------------ */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sb-w); z-index: 40; display: flex; flex-direction: column; gap: 18px;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 14px calc(16px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, var(--sb-bg) 0%, #0d1730 100%); color: var(--sb-text); border-right: 1px solid #0a1120; overflow-y: auto;
}
.sb-logo { padding: 2px 8px 4px; }
.sb-logo .logo-mark { width: 30px; height: 30px; }
.sb-logo .logo-word { font-size: 16px; }
.sb-tenant {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left;
  padding: 10px; border-radius: 12px; border: 1px solid var(--sb-line); background: var(--sb-bg-2); color: var(--white); transition: border-color .2s, background .2s;
}
.sb-tenant:hover { border-color: rgba(201, 164, 76, .55); background: #18243f; }
.sb-tenant .tenant-mono { width: 34px; height: 34px; border-radius: 10px; background: var(--gold-bright); color: var(--navy); font-size: 12.5px; }
.sb-tenant-txt { display: grid; min-width: 0; }
.sb-tenant-txt b { font: 700 14px var(--f-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-tenant-txt small { color: var(--sb-dim); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-ico { width: 18px; height: 18px; fill: none; stroke: var(--sb-dim); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sb-nav { display: grid; gap: 2px; }
.sb-sep { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sb-dim); padding: 14px 10px 6px; }
.sb-nav a {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 10px; border-radius: 10px;
  color: var(--sb-text); text-decoration: none; font-weight: 500; font-size: 14px; transition: background .2s, color .2s;
}
.sb-nav a svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.sb-nav a:hover { background: rgba(255, 255, 255, .05); color: var(--white); }
.sb-nav a[aria-current="page"] { background: rgba(201, 164, 76, .12); color: var(--white); font-weight: 600; }
.sb-nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold-bright); }
.sb-nav a[aria-current="page"] svg { color: var(--gold-bright); opacity: 1; }
.sb-nav .nav-count { margin-left: auto; background: rgba(255, 255, 255, .1); color: var(--white); }
.sb-nav .nav-count.due { background: var(--gold-bright); color: var(--navy); }
.sb-foot { margin-top: auto; display: grid; gap: 12px; padding-top: 12px; border-top: 1px solid var(--sb-line); }
.sb-foot .status { color: var(--sb-dim); padding: 0 6px; }
.btn-gold { background: var(--gold-bright); color: var(--navy); box-shadow: 0 8px 22px -10px rgba(201, 164, 76, .7); }
.btn-gold:hover { background: #d6b25a; }
.btn-gold .btn-icon { color: var(--navy); --gold-bright: var(--navy); }
.btn-gold.scanning .btn-icon, .btn-scan.scanning .btn-icon { animation: spin 1.4s linear infinite; }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #991b1b; }
.btn-win { background: var(--green); color: var(--white); }

.shell { min-height: 100vh; }
.main { margin-left: var(--sb-w); min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { display: none; }
.sb-scrim { position: fixed; inset: 0; z-index: 35; background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }

.view { padding-inline: clamp(16px, 3.2vw, 44px); padding-block: 34px 56px; flex: 1; }
.view.enter { animation: viewIn .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
.view-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 26px; max-width: 1360px; }
.view-head h2 { font-size: clamp(24px, 2.4vw, 31px); font-weight: 800; margin: 6px 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.view-body { max-width: 1360px; display: grid; gap: 22px; }
.view-body > * { min-width: 0; }
.site-footer { padding: 22px clamp(16px, 3.2vw, 44px) 28px; border-top: 1px solid var(--line); background: var(--white); }

/* ------------------------------------------------------------------ */
/* Accueil                                                             */
/* ------------------------------------------------------------------ */
#v-accueil { padding: 0; }
#v-accueil .hero { border-bottom: 1px solid var(--line); }
#v-accueil .hero-grid { padding: 56px clamp(16px, 3.2vw, 44px) 60px; max-width: 1400px; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; }
#v-accueil .hero h1 { font-size: clamp(28px, 2.9vw, 42px); }
#v-accueil .view-body { padding: 36px clamp(16px, 3.2vw, 44px) 56px; }
.hd-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 22px; display: grid; gap: 18px; animation: rise .5s .1s cubic-bezier(.2, .8, .2, 1) both; }
.hd-head { display: flex; align-items: center; gap: 14px; }
.hd-head .tenant-mono { background: var(--navy); color: var(--gold-bright); }
.hd-head h3 { font-size: 19px; font-weight: 800; }
.hd-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hd-stats button { text-align: left; display: grid; gap: 2px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--pearl); transition: border-color .2s, background .2s, transform .2s; }
.hd-stats button:hover { border-color: var(--royal-mid); background: var(--royal-soft); transform: translateY(-1px); }
.hd-stats b { font: 800 24px/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.hd-stats span { font-size: 13px; font-weight: 600; color: var(--navy-2); }
.hd-stats small { font-size: 12px; color: var(--muted); }
.hd-stats button.hot { background: var(--navy); border-color: var(--navy); }
.hd-stats button.hot b { color: var(--gold-bright); }
.hd-stats button.hot span { color: var(--white); }
.hd-stats button.hot small { color: #aab4c6; }
.hd-top h4 { font: 600 12px var(--f-body); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 8px; }
.hd-top ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hd-top button { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: none; }
.hd-top button:hover { background: var(--pearl); border-color: var(--line); }
.hd-top b { font-size: 13.5px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-top small { font-size: 12px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-top span:last-child { min-width: 0; }
.hd-empty { display: grid; gap: 12px; justify-items: start; padding: 14px; border-radius: 12px; background: var(--gold-soft); color: #6f5520; font-size: 14px; }
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: j; }
.journey button { width: 100%; height: 100%; text-align: left; display: grid; gap: 6px; align-content: start; padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s, transform .2s; }
.journey button:hover { box-shadow: var(--shadow-md); border-color: var(--line-strong); transform: translateY(-2px); }
.j-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--gold-bright); font: 700 13px var(--f-display); margin-bottom: 4px; }
.journey b { font: 700 15.5px var(--f-display); }
.journey span:not(.j-n) { font-size: 13.5px; color: var(--slate); }
.sector-band { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sector-band span:not(.muted) { font-size: 12.5px; font-weight: 600; color: var(--navy-2); background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }

/* Entreprise */
.identity { margin-bottom: 0; }
.danger-card { padding: 18px 20px; display: grid; gap: 10px; align-content: start; }
.danger-card h3 { font-size: 15px; }
.danger-card code { font-size: 12px; background: var(--mist); padding: 1px 5px; border-radius: 4px; }
.axes { margin-bottom: 0; }

/* Cartographie */
.step2-grid { grid-template-columns: minmax(0, 1fr) 360px; }
.scan-side { display: grid; gap: 16px; align-content: start; }
.scan-card { padding: 18px; display: grid; gap: 12px; }
.scan-card .sources { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.scan-card .src { padding: 10px 12px; }
.scan-card .src b { font-size: 13px; }
.scan-card .src span { font-size: 11.5px; }
.scan-card .btn-scan { min-width: 0; }
.scan-panel { position: static; }
.map-help { text-align: center; }
.map-wrap { max-width: 760px; }
#france .dep.att { fill: #f3e7c9; }
#france .bubble { transform-box: view-box; transform-origin: 0 0; animation: none; pointer-events: none;
  transition: transform .75s cubic-bezier(.2, .9, .25, 1.15), opacity .55s ease; }
#france .bubble .b-disc { transform-box: view-box; transform-origin: 0 0; transition: transform .75s cubic-bezier(.2, .9, .25, 1.2); }
#france .bubble text { transition: opacity .4s ease .25s; }
#france .bubble.leaving { opacity: 0; }
#france .bubble.leaving text { opacity: 0; transition-delay: 0s; }
#france .bubble.top .halo { animation: halo 2.6s ease-in-out infinite; }
#france .bubble.hover .core { stroke-width: 3.2; }
#france .bubble.hover .halo { fill: rgba(201, 164, 76, .3); }
@keyframes halo { 50% { opacity: .35; } }

/* ------------------------------------------------------------------ */
/* Opportunités : top 10 et liste détaillée                            */
/* ------------------------------------------------------------------ */
.top10 { padding: 20px 22px 18px; display: grid; gap: 14px; }
.top10-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; flex-wrap: wrap; }
.top10-head h3 { font-size: 17px; font-weight: 800; }
.top10-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--slate); }
.top10-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 6px; vertical-align: -1px; }
.hbars { display: grid; gap: 4px; }
.hb-scale, .hb-row { display: grid; grid-template-columns: 30px minmax(180px, 34%) minmax(0, 1fr) 46px; gap: 14px; align-items: center; }
.hb-scale { padding: 0 8px; }
.hb-ticks { position: relative; height: 16px; }
.hb-ticks i { position: absolute; transform: translateX(-50%); font-size: 11px; font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.hb-ticks i:first-child { transform: none; }
.hb-ticks i:last-child { transform: translateX(-100%); }
.hb-row { width: 100%; text-align: left; padding: 8px; border-radius: 10px; border: 1px solid transparent; background: none; transition: background .2s, border-color .2s; }
.hb-row:hover { background: var(--pearl); border-color: var(--line); }
.hb-rank { font: 800 14px var(--f-display); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.hb-row:nth-child(-n+4) .hb-rank { color: var(--gold); }
.hb-label { min-width: 0; display: grid; gap: 1px; }
.hb-label b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-label small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-label .dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: var(--c); margin-right: 7px; }
.hb-label .gapw { font-style: normal; font-weight: 700; color: var(--gold); }
.hb-track { position: relative; height: 22px; border-radius: 6px; background: var(--mist); }
.hb-track .grid { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, .9); z-index: 1; }
.hb-bar { position: absolute; inset: 0 auto 0 0; width: var(--w); display: flex; border-radius: 6px; overflow: hidden; }
.hb-bar i { background: var(--c); min-width: 2px; }
.hb-bar i + i { box-shadow: inset 1px 0 0 rgba(255, 255, 255, .55); }
.hb-row.anim .hb-bar { transform-origin: left; transform: scaleX(0); }
.hb-row.anim.in .hb-bar { transform: scaleX(1); transition: transform .9s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i) * 55ms); }
.hb-val { font: 800 17px var(--f-display); text-align: right; font-variant-numeric: tabular-nums; }
.hb-val.fort { color: var(--royal-dark); }
.hb-val.moyen { color: var(--gold); }
.hb-val.faible { color: var(--muted); }

.opp-list { display: grid; gap: 12px; }
.opp-card {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 20px; padding: 20px 22px; 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 .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 40ms);
}
.opp-card:hover { box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.opp-card.fort { border-left: 3px solid var(--royal); }
.opp-card.moyen { border-left: 3px solid var(--gold-bright); }
.oc-rank { display: grid; justify-items: center; align-content: start; gap: 8px; }
.oc-rank > span { font: 800 12px var(--f-display); color: var(--muted); letter-spacing: .06em; }
.oc-rank > span::before { content: "N° "; font-weight: 600; }
.ring-xs { --size: 64px; }
.ring-xs .num b { font-size: 19px; }
.ring-xs .num small { font-size: 9.5px; }
.ring-xs .track, .ring-xs .val { stroke-width: 9; }
.oc-body { display: grid; gap: 10px; min-width: 0; }
.oc-body h3 { font-size: 17.5px; line-height: 1.35; font-weight: 700; }
.oc-title { all: unset; cursor: pointer; }
.oc-title:hover { color: var(--royal-dark); text-decoration: underline; text-underline-offset: 3px; }
.oc-title:focus-visible { outline: 2px solid var(--royal); border-radius: 4px; }
.oc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--slate); }
.oc-meta b { color: var(--navy); font-weight: 600; }
.oc-why, .mk-why { display: grid; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--pearl); border: 1px solid var(--line); }
.mk-why { background: linear-gradient(180deg, var(--royal-soft), var(--white)); border-color: var(--royal-mid); }
.oc-verdict { font-size: 13.5px; color: var(--slate); }
.oc-verdict b { font: 800 12px var(--f-display); text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px; margin-right: 4px; }
.oc-verdict.fort b { background: var(--royal); color: var(--white); }
.oc-verdict.moyen b { background: var(--gold-soft); color: var(--gold); box-shadow: inset 0 0 0 1px #ecd9a8; }
.oc-verdict.faible b { background: var(--mist); color: var(--slate); }
.oc-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; }
.oc-cols h4 { font: 600 11.5px var(--f-body); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 6px; }
.why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.why-list li { position: relative; padding-left: 22px; font-size: 13.5px; line-height: 1.5; color: var(--navy-2); }
.why-list li::before { position: absolute; left: 0; top: 1px; width: 16px; height: 16px; border-radius: 5px; display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.why-list.wl-pos li::before { content: "✓"; background: var(--green-soft); color: var(--green); }
.why-list.wl-neg li::before { content: "!"; background: var(--amber-soft); color: var(--amber); }
.oc-action { font-size: 13.5px; color: var(--navy-2); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed var(--line-strong); }
.oc-action span { font: 700 11px var(--f-body); text-transform: uppercase; letter-spacing: .1em; color: var(--gold); }
.oc-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.oc-actions .link-btn { margin-left: auto; text-decoration: none; }

/* ------------------------------------------------------------------ */
/* Pipeline & CRM                                                      */
/* ------------------------------------------------------------------ */
.crm-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.crm-kpis .kpi { gap: 3px; align-content: start; text-align: left; font: inherit; color: inherit; }
.crm-kpis .kpi > span { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.crm-kpis .kpi b { font-size: 24px; }
.crm-kpis .kpi small { font-size: 12px; color: var(--muted); }
.crm-kpis .kpi .track { height: 5px; border-radius: 3px; background: var(--mist); overflow: hidden; margin-top: 6px; }
.crm-kpis .kpi .track i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--royal), var(--green)); transform-origin: left; animation: grow .9s cubic-bezier(.2, .8, .2, 1) both; }
.crm-kpis .kpi.due { cursor: pointer; }
.crm-kpis .kpi.due > span { color: #aab4c6; }
.crm-kpis .kpi.due small { color: #cbd5e1; }
.funnel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 6px; }
.fn-step { position: relative; display: grid; gap: 2px; padding: 0 16px; }
.fn-step + .fn-step { border-left: 1px solid var(--line); }
.fn-bar { height: 6px; border-radius: 3px; background: var(--mist); overflow: hidden; margin-bottom: 6px; }
.fn-bar i { display: block; height: 100%; width: var(--w); background: var(--c); border-radius: 3px; transform-origin: left; animation: grow .9s cubic-bezier(.2, .8, .2, 1) both; }
.fn-step b { font: 800 20px var(--f-display); font-variant-numeric: tabular-nums; }
.fn-step span { font-size: 12.5px; font-weight: 600; color: var(--navy-2); }
.fn-step small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fn-arrow { position: absolute; right: -9px; top: 26px; z-index: 1; width: 18px; height: 18px; border-radius: 50%; background: var(--white); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-size: 13px; line-height: 1; }

.outbox { padding: 18px 20px; display: grid; gap: 14px; }
.ob-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.ob-head h3 { font-size: 16px; font-weight: 800; }
.ob-count { font: 700 12.5px var(--f-display); padding: 5px 11px; border-radius: 999px; background: var(--mist); color: var(--slate); white-space: nowrap; }
.ob-count.on { background: var(--gold-bright); color: var(--navy); }
.ob-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; }
.ob-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: start; }
.ob-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) 170px auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--white); animation: rise .35s ease both; }
.ob-list li.late { border-color: #f5c2c2; background: linear-gradient(90deg, var(--red-soft), var(--white) 40%); }
.ob-list li.today { border-color: #ecd9a8; background: linear-gradient(90deg, var(--gold-soft), var(--white) 40%); }
.ob-list li.ob-empty { display: block; color: var(--muted); font-size: 13.5px; text-align: center; padding: 18px; border-style: dashed; }
.ob-main { min-width: 0; display: grid; }
.ob-main b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-main small, .ob-step small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-step { display: grid; min-width: 0; }
.ob-step b { font-size: 12.5px; }
.ob-list li.late .ob-step small { color: var(--red); font-weight: 600; }
.ob-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ob-week { border-left: 1px solid var(--line); padding-left: 18px; }
.ob-week h4 { font: 600 11.5px var(--f-body); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 8px; }
.ob-week ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ob-week li { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 8px; font-size: 12.5px; }
.ob-week time { font-weight: 700; color: var(--royal-dark); text-transform: capitalize; }
.ob-week b { display: block; font-weight: 600; }
.ob-week small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.crm-bar { margin-bottom: 0; }
.crm-bar .filters { align-items: center; }
.search { width: 280px; max-width: 100%; border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 14px; background: var(--white); font-size: 13.5px; }
.search:focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 3px var(--royal-soft); }
.crm-bar select { padding-top: 7px; padding-bottom: 7px; font-size: 13px; }
.kanban { grid-template-columns: repeat(9, minmax(228px, 1fr)); min-width: 2120px; }
.col.clos { background: color-mix(in srgb, var(--c) 6%, var(--mist)); }
.dossier.gagne { border-color: #a7dcc6; }
.dossier.perdu { opacity: .75; }
.proba-chip { font: 700 11px var(--f-display); color: var(--slate); background: var(--mist); border-radius: 5px; padding: 1px 5px; font-variant-numeric: tabular-nums; }
.todo { font-size: 12px; color: var(--navy-2); background: var(--violet-soft); border-radius: 7px; padding: 5px 8px; }
.todo.late { background: var(--red-soft); color: var(--red); }
.next.paused { background: var(--mist); color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(100, 116, 139, .4); }
.next.done { background: var(--green-soft); color: var(--green); }
.outcome-btns { gap: 6px; }
.dossier-foot .advance.win { border-color: #a7dcc6; color: var(--green); }
.dossier-foot .advance.lose { border-color: #f5c2c2; color: var(--red); }
.crm-table { min-width: 980px; }
.crm-table .next { display: inline-block; }
.st-select { font-size: 12.5px; padding: 5px 28px 5px 10px; border-color: color-mix(in srgb, var(--c) 45%, white); color: var(--navy); box-shadow: inset 3px 0 0 var(--c); }
.agenda { display: grid; gap: 18px; }
.ag-day h4 { font: 700 14px var(--f-display); margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.ag-day h4 .n { font-size: 11.5px; background: var(--mist); color: var(--slate); padding: 1px 8px; border-radius: 999px; }
.ag-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ag-day li { display: grid; grid-template-columns: 110px 96px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 11px; background: var(--white); border: 1px solid var(--line); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.ag-day li:hover { border-color: var(--royal-mid); box-shadow: var(--shadow-sm); }
.ag-day time { font-size: 12.5px; font-weight: 700; color: var(--slate); text-transform: capitalize; }
.ag-type { font: 700 10.5px var(--f-body); text-transform: uppercase; letter-spacing: .08em; padding: 3px 7px; border-radius: 5px; text-align: center; background: var(--royal-soft); color: var(--royal-dark); }
.ag-day li.remise .ag-type { background: var(--red-soft); color: var(--red); }
.ag-day li.action .ag-type { background: var(--violet-soft); color: var(--violet); }
.ag-day li.publication .ag-type { background: var(--gold-soft); color: var(--gold); }
.ag-day li.approche .ag-type { background: var(--navy); color: var(--gold-bright); }
.ag-main { min-width: 0; display: grid; }
.ag-main b { font-size: 13.5px; font-weight: 600; }
.ag-main small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tiroir dossier */
#drawer .drawer-inner { gap: 20px; }
.pipeline { display: flex; flex-wrap: wrap; }
.pipeline li { flex: 1 1 96px; }
.pipeline button.current { border-color: var(--c); color: var(--navy); background: color-mix(in srgb, var(--c) 10%, white); }
.pipeline button.current::before { background: var(--c); }
.pipeline button.clos { border-style: dashed; }
.oc-box { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; }
.oc-box label { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--slate); }
.oc-box input { width: 220px; }
.oc-box.win { background: var(--green-soft); border: 1px solid #a7dcc6; color: var(--green); }
.oc-box.lose { background: var(--red-soft); border: 1px solid #f5c2c2; color: var(--red); }
.oc-box.lose input { width: 300px; }
.oc-box.wait { background: var(--violet-soft); border: 1px solid #ddd0fb; color: var(--violet); }
.dr-money { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.dr-money label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--slate); }
.dr-money input[type="number"] { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-variant-numeric: tabular-nums; }
.dr-money small { font-weight: 500; font-size: 11.5px; }
.dr-weighted { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--royal-soft); border: 1px solid var(--royal-mid); }
.dr-weighted span { font-size: 12.5px; font-weight: 600; color: var(--slate); }
.dr-weighted b { font: 800 20px var(--f-display); color: var(--royal-dark); font-variant-numeric: tabular-nums; }
.dr-relances { display: grid; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--pearl); }
.rl-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rl-head .field-label { margin: 0; }
.rl-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; position: relative; }
.rl-steps li { display: grid; gap: 3px; position: relative; padding-top: 20px; min-width: 0; }
.rl-steps li::before { content: ""; position: absolute; top: 6px; left: 14px; right: -10px; height: 2px; background: var(--line-strong); }
.rl-steps li:last-child::before { display: none; }
.rl-dot { position: absolute; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 2px solid var(--line-strong); z-index: 1; }
.rl-steps li.done .rl-dot { background: var(--green); border-color: var(--green); }
.rl-steps li.done::before { background: #a7dcc6; }
.rl-steps li.next .rl-dot { border-color: var(--royal); box-shadow: 0 0 0 4px var(--royal-soft); }
.rl-steps li.today .rl-dot { border-color: var(--gold-bright); background: var(--gold-bright); box-shadow: 0 0 0 4px var(--gold-soft); animation: pulse 1.8s ease-in-out infinite; }
.rl-steps li.late .rl-dot { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(201, 164, 76, .15); } }
.rl-steps b { font-size: 12.5px; }
.rl-steps small { font-size: 12px; color: var(--muted); text-transform: none; }
.rl-steps li.late small { color: var(--red); font-weight: 600; }
.rl-steps li.today small { color: var(--gold); font-weight: 600; }
.rl-steps input[type="date"] { padding: 5px 8px; font-size: 12.5px; }
.rl-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rl-foot .dr-next { flex: 1 1 260px; }
.rl-foot input[type="date"] { width: auto; padding: 6px 9px; font-size: 13px; }
.dr-next.paused { color: var(--muted); }
.dr-contact, .dr-next-edit, .dr-journal { display: grid; gap: 8px; }
.dr-contact .field-label, .dr-next-edit .field-label, .dr-journal .field-label { margin: 0; }
.dr-contact-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, .9fr); gap: 8px; }
.dr-contact-grid.two { grid-template-columns: minmax(0, 1fr) 170px; }
.act-form { display: grid; grid-template-columns: 130px minmax(0, 1fr) 150px auto; gap: 8px; }
.act-form select { width: 100%; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 26px 86px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--mist); color: var(--navy-2); }
.timeline li.auto { color: var(--slate); }
.timeline .ti { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; background: var(--mist); color: var(--slate); }
.timeline li.appel .ti, .timeline li.rdv .ti, .timeline li.visite .ti { background: var(--royal-soft); color: var(--royal-dark); }
.timeline li.email .ti { background: var(--gold-soft); color: var(--gold); }
.timeline li.note .ti { background: var(--violet-soft); color: var(--violet); }
.timeline li.statut .ti { font-size: 8px; color: var(--green); background: var(--green-soft); }
.timeline time { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ */
/* Adaptation                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 1320px) {
  .crm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ob-list li { grid-template-columns: auto minmax(0, 1fr) 150px; }
  .ob-list li .ob-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 1180px) {
  .step2-grid { grid-template-columns: minmax(0, 1fr); }
  .scan-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #v-accueil .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .ob-grid { grid-template-columns: minmax(0, 1fr); }
  .ob-week { border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 0; }
  .gate { grid-template-columns: minmax(0, 1fr); }
  .gate-brand { gap: 24px; padding-block: 32px; }
  .gate-pitch h1 { font-size: 30px; }
  .gate-panel { max-height: none; padding-block: 32px 48px; }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); box-shadow: 30px 0 60px -30px rgba(0, 0, 0, .5); }
  body.sb-open .sidebar { transform: none; }
  .main { margin-left: 0; }
  .topbar {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; justify-content: space-between;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
  }
  .topbar .icon-btn { display: grid; place-items: center; }
  .topbar .icon-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; }
  .topbar .logo-mark { width: 28px; height: 28px; }
  .topbar .logo-word { font-size: 14px; }
  .topbar .tenant-mono { width: 32px; height: 32px; }
  .scan-side { grid-template-columns: minmax(0, 1fr); }
  .funnel { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .fn-step:nth-child(4) { border-left: 0; }
  .fn-arrow { display: none; }
  .oc-cols { grid-template-columns: minmax(0, 1fr); }
  .hb-scale, .hb-row { grid-template-columns: 24px minmax(0, 1fr) 40px; row-gap: 6px; }
  .hb-label { grid-column: 2 / 4; grid-row: 1; }
  .hb-track { grid-column: 2; grid-row: 2; }
  .hb-val { grid-column: 3; grid-row: 2; }
  .hb-rank { grid-row: 1 / 3; }
  .hb-scale { display: none; }
}
@media (max-width: 720px) {
  .view { padding-block: 22px 40px; }
  .view-head { flex-direction: column; align-items: start; }
  .crm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey { grid-template-columns: minmax(0, 1fr); }
  .hd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opp-card { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px; }
  .oc-rank { grid-auto-flow: column; justify-content: start; align-items: center; }
  .oc-actions .link-btn { margin-left: 0; }
  .ob-list li { grid-template-columns: auto minmax(0, 1fr); }
  .ob-list li .ob-step { grid-column: 2; }
  .ag-day li { grid-template-columns: minmax(0, 1fr) auto; }
  .ag-day li time, .ag-day li .ag-type { grid-column: 1; }
  .dr-money, .dr-contact-grid, .dr-contact-grid.two, .act-form { grid-template-columns: minmax(0, 1fr); }
  .rl-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .rl-steps li:nth-child(2)::before { display: none; }
  .wz-row { grid-template-columns: minmax(0, 1fr); }
  .tenant-card { grid-template-columns: auto minmax(0, 1fr); }
  .tc-stats { grid-column: 2; text-align: left; display: flex; gap: 10px; flex-wrap: wrap; }
  .tc-go { display: none; }
  .gate-proof { grid-template-columns: minmax(0, 1fr); }
  .scan-card .sources { grid-template-columns: minmax(0, 1fr); }
  .search { width: 100%; }
  .oc-box input, .oc-box.lose input { width: 100%; }
}
.more-btn { margin-top: 4px; }
.gate-tabs { justify-self: start; margin-bottom: 6px; }
.gate-tabs button { padding-inline: 20px; }
.boot-error { position: fixed; inset: 0; display: grid; place-content: center; gap: 8px; text-align: center; padding: 24px; background: var(--pearl); color: var(--navy); font-size: 15px; }
.boot-error b { font: 800 20px var(--f-display); }

/* ------------------------------------------------------------------ */
/* Marque Cibly                                                        */
/* ------------------------------------------------------------------ */
.logo-word { letter-spacing: -.02em; font-weight: 800; font-size: 21px; text-transform: none; }
.logo-sm .logo-word { font-size: 16px; }
.brand-lockup { position: relative; display: grid; gap: 8px; justify-items: start; }
.logo-tag { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-bright); line-height: 1.4; }
.sb-tag { padding: 0 8px; margin-top: -12px; font-size: 9.5px; color: var(--sb-dim); letter-spacing: .07em; }
.sb-logo .logo-word { font-size: 20px; }
.gate-proof { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
.gate-how { list-style: none; margin: 4px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gate-how li { display: grid; gap: 2px; }
.gate-how b { font: 700 13px var(--f-display); color: var(--navy); }
.gate-how span { font-size: 12px; color: var(--muted); }
.benefits { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.benefits li { display: grid; gap: 6px; align-content: start; padding: 18px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.benefits b { font: 700 15.5px var(--f-display); }
.benefits li > span:last-child { font-size: 13.5px; color: var(--slate); line-height: 1.55; }
.bf-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--navy); display: grid; place-items: center; margin-bottom: 4px; }
.bf-ico svg { width: 20px; height: 20px; fill: none; stroke: var(--gold-bright); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1180px) { .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .benefits, .gate-how, .gate-proof { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ */
/* Comptes, tâches du jour, intégrations, support                      */
/* ------------------------------------------------------------------ */
.gate-alt { line-height: 1.8; }
.gate-alt .link-btn { font-size: 13px; }
#gate-list input, #gate-activate input { max-width: none; }
a.sb-tenant { text-decoration: none; grid-template-columns: auto minmax(0, 1fr); }
.sb-user { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 6px; }
.sb-user-txt { display: grid; min-width: 0; }
.sb-user-txt b { font-size: 13px; color: var(--white); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user-txt small { font-size: 11.5px; color: var(--sb-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-logout { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--sb-line); background: none; color: var(--sb-text); display: grid; place-items: center; }
.sb-logout:hover { background: rgba(255, 255, 255, .08); color: var(--white); }
.sb-logout svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.support-banner { position: sticky; top: 0; z-index: 25; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px clamp(16px, 3.2vw, 44px); background: var(--violet); color: var(--white); font-size: 13.5px; }
.support-banner .btn { margin-left: auto; background: var(--white); border-color: var(--white); }

.tk-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tk-list { display: grid; gap: 10px; }
.tk { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); transition: opacity .25s, border-color .2s; animation: rise .35s ease both; }
.tk.retard:not(.done) { border-left: 4px solid var(--red); }
.tk.aujourdhui:not(.done) { border-left: 4px solid var(--gold-bright); }
.tk.urgent:not(.done) { box-shadow: 0 0 0 3px var(--red-soft), var(--shadow-sm); }
.tk.done { opacity: .58; }
.tk.done h4 { text-decoration: line-through; text-decoration-color: rgba(15, 23, 42, .35); }
.tk-check { position: relative; width: 24px; height: 24px; margin-top: 2px; cursor: pointer; }
.tk-check input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.tk-check span { position: absolute; inset: 0; border-radius: 7px; border: 2px solid var(--line-strong); background: var(--white); transition: all .2s; pointer-events: none; }
.tk-check input:checked + span { background: var(--green); border-color: var(--green); }
.tk-check input:checked + span::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid var(--white); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.tk-check input:focus-visible + span { outline: 2px solid var(--royal); outline-offset: 2px; }
.tk-body { display: grid; gap: 4px; min-width: 0; }
.tk-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tk-type { font: 700 10.5px var(--f-body); text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 5px; background: var(--mist); color: var(--slate); }
.tk-type.rl, .tk-type.ap { background: var(--royal-soft); color: var(--royal-dark); }
.tk-type.vi { background: var(--violet-soft); color: var(--violet); }
.tk-type.re { background: var(--red-soft); color: var(--red); }
.tk-type.am { background: var(--gold-soft); color: var(--gold); }
.tk-when { font-size: 12.5px; font-weight: 600; color: var(--slate); }
.tk.retard:not(.done) .tk-when { color: var(--red); }
.tk h4 { font: 700 15.5px/1.35 var(--f-display); }
.tk-detail { font-size: 13.5px; color: var(--slate); }
.tk-dossier { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.tk-dossier .link-btn { font-size: 12.5px; }
.tk-actions { display: grid; gap: 6px; justify-items: end; align-content: start; }

.account-card { padding: 18px 20px; display: grid; gap: 6px; align-content: start; }
.acc-actions { padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px; gap: 10px; }
.integ-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.integ { display: grid; gap: 12px; align-content: start; padding: 18px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.integ.on { border-color: #a7dcc6; background: linear-gradient(180deg, var(--green-soft), var(--white) 90px); }
.integ-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
.integ-head b { font: 700 15px var(--f-display); display: block; }
.integ-head small { font-size: 12.5px; color: var(--muted); }
.integ-logo { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font: 800 15px var(--f-display); color: var(--white); background: var(--navy); }
.integ-logo.google { background: #1a73e8; }
.integ-logo.microsoft { background: #0f6cbd; }
.integ-logo.ics { background: var(--gold-bright); color: var(--navy); font-size: 12px; }
.integ-use { margin: 0; padding-left: 18px; font-size: 13px; color: var(--slate); display: grid; gap: 3px; }
.integ-off { color: var(--amber); background: var(--amber-soft); border-radius: 8px; padding: 8px 10px; }
.integ .btn { justify-self: start; }
.ics-url { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.ics-url input { font-size: 12px; font-family: ui-monospace, Menlo, monospace; }
.support-card { padding: 18px 20px; }
.sp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.sp-gen { display: grid; gap: 12px; align-content: start; }
.sp-code { display: grid; gap: 6px; justify-items: start; padding: 14px 16px; border-radius: 12px; background: var(--navy); color: var(--white); }
.sp-code span { font-size: 12px; color: #aab4c6; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.sp-code b { font: 800 26px ui-monospace, Menlo, monospace; letter-spacing: .08em; color: var(--gold-bright); }
.sp-code small { font-size: 12.5px; color: #cbd5e1; }
.sp-state { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.sp-state li { padding: 8px 10px; border-radius: 9px; background: var(--pearl); border: 1px solid var(--line); }
.sp-state li.live { background: var(--violet-soft); border-color: #ddd0fb; color: var(--violet); font-weight: 600; }
.sp-log h4 { font: 600 11.5px var(--f-body); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 8px; }
.sp-log ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sp-log li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; font-size: 13px; }
.sp-log time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.sp-log small { display: block; color: var(--muted); font-size: 12px; }
body.support-mode [data-advance], body.support-mode .quick-mail { display: none; }
@media (max-width: 1180px) { .integ-grid { grid-template-columns: minmax(0, 1fr); } .tk-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .sp-grid { grid-template-columns: minmax(0, 1fr); } .tk { grid-template-columns: auto minmax(0, 1fr); } .tk-actions { grid-column: 2; justify-items: start; } .tk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------------ */
/* Portail Cibly Pro                                                   */
/* ------------------------------------------------------------------ */
body.pro { background: var(--pearl); }
.pro-badge { font: 800 11px var(--f-display); letter-spacing: .1em; text-transform: uppercase; background: var(--gold-bright); color: var(--navy); border-radius: 6px; padding: 3px 7px; margin-left: 8px; }
.pro-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(120% 90% at 0% 0%, #1b2a4a 0%, var(--sb-bg) 60%); }
.pro-login { width: min(440px, 100%); padding: 28px; display: grid; gap: 8px; }
.pro-login h1 { font-size: 22px; font-weight: 800; margin-top: 10px; }
.pro-login code { font-size: 12px; background: var(--mist); padding: 1px 5px; border-radius: 4px; }
.pro-login .btn { margin-top: 6px; }
.pro-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 14px clamp(16px, 3.2vw, 44px); background: var(--sb-bg); color: var(--white); }
.pro-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.pro-nav a { color: var(--sb-text); text-decoration: none; font-size: 14px; font-weight: 500; padding: 7px 12px; border-radius: 8px; }
.pro-nav a:hover { background: rgba(255, 255, 255, .07); color: var(--white); }
.pro-who { margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--sb-text); }
.btn-ghost-light { background: none; border-color: rgba(255, 255, 255, .25); color: var(--white); }
.btn-ghost-light:hover { border-color: var(--gold-bright); }
.pro-main { padding: 28px clamp(16px, 3.2vw, 44px) 60px; display: grid; gap: 44px; max-width: 1400px; }
.pro-sec { display: grid; gap: 16px; scroll-margin-top: 80px; }
.pro-sec .view-head { margin-bottom: 0; }
.pro-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.pro-chart { padding: 18px 20px; display: grid; gap: 14px; }
.bars { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 4px; height: 180px; align-items: end; padding-bottom: 20px; position: relative; border-bottom: 1px solid var(--line); }
.bar-col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.bar-col span { width: 42%; border-radius: 3px 3px 0 0; min-height: 0; transform-origin: bottom; animation: growY .8s cubic-bezier(.2, .8, .2, 1) both; }
.b-scan { background: var(--navy); }
.b-opp { background: var(--gold-bright); }
.bar-col small { position: absolute; bottom: -20px; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
@keyframes growY { from { transform: scaleY(0); } }
.bars-legend { display: flex; gap: 16px; }
.bars-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg-scan { background: var(--navy); } .lg-opp { background: var(--gold-bright); }
.pro-table { min-width: 1180px; }
.pro-table tbody tr { cursor: default; }
.pro-table .warn { color: var(--amber); }
.pro-table .live { color: var(--violet); }
.ab-edit { display: flex; gap: 6px; align-items: center; }
.ab-edit select { padding: 5px 26px 5px 8px; font-size: 12.5px; }
.ab-edit input { width: auto; padding: 5px 8px; font-size: 12.5px; }
.ab-edit input[data-ab="offre"] { width: 84px; }
.pro-scans { padding: 16px 18px; }
.pro-scans h3 { font-size: 15px; margin-bottom: 8px; }
.pro-scans ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pro-scans li { display: grid; grid-template-columns: 130px 200px minmax(0, 1fr); gap: 12px; font-size: 13px; }
.pro-scans time { color: var(--muted); font-variant-numeric: tabular-nums; }
.support-form { padding: 18px 20px; display: grid; gap: 8px; max-width: 720px; }
.pro-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pro-oauth { padding: 18px 20px; display: grid; gap: 8px; align-content: start; }
.pro-oauth h3 { font-size: 15.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pro-oauth label { display: grid; gap: 4px; }
.pro-oauth .btn { justify-self: start; }
.redir { font-size: 12px; background: var(--mist); padding: 6px 8px; border-radius: 6px; overflow-wrap: anywhere; }
@media (max-width: 1080px) { .pro-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pro-settings { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .pro-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pro-scans li { grid-template-columns: minmax(0, 1fr); gap: 0; } }
input[type="email"], input[type="url"], input[type="search"] {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; background: var(--white); font-size: 14px; color: var(--navy);
}
.pro-scans li.muted { display: block; }

/* Secteurs, clients cibles, opportunités saisies */
.sector-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 6px; }
.sector-opt { text-align: left; padding: 11px 12px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--white); font-size: 13.5px; font-weight: 600; color: var(--navy-2); transition: border-color .2s, background .2s, box-shadow .2s; }
.sector-opt:hover { border-color: var(--royal); }
.sector-opt[aria-checked="true"] { border-color: var(--royal); background: var(--royal-soft); color: var(--royal-dark); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.src-tag.prv { background: var(--violet-soft); color: var(--violet); }
.id-meta .meta-sector { background: var(--navy); color: var(--gold-bright); }
#opp-form select, #identity-form select { width: 100%; }
#opp-form .segmented { max-width: 360px; }
@media (max-width: 720px) { .sector-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form-grid input[type="number"], .wz-row input[type="number"] { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; background: var(--white); font-size: 14px; color: var(--navy); font-variant-numeric: tabular-nums; }


/* Codes CPV des axes (éditeur d'axe) et lots correspondants (fiche opportunité) */
.field:has(> .badges-cpv) { min-width: 0; }
.badges-cpv { min-width: 0; }
.badges-cpv .badge-tag { max-width: 100%; min-width: 0; border-radius: 14px; }
.badges-cpv .badge-tag > span { white-space: normal; overflow-wrap: anywhere; min-width: 0; }  /* libellés longs : retour à la ligne (390 px) */
.badges-cpv .badge-tag::before { background: var(--royal); }
.badges-cpv .badge-tag b { font-variant-numeric: tabular-nums; margin-right: 4px; }
.cpv-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.cpv-sugg:empty { display: none; }
.cpv-sugg .small { flex-basis: 100%; margin: 0; }
.cpv-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; flex-basis: 100%; min-width: 0; }
.cpv-liste li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 6px 6px 6px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.cpv-liste li b { font-variant-numeric: tabular-nums; color: var(--navy); }
.cpv-liste li span { color: var(--navy-2); font-size: 13.5px; overflow-wrap: anywhere; }
.cpv-liste .btn { min-height: 36px; }
@media (max-width: 520px) { .cpv-liste li { grid-template-columns: auto minmax(0, 1fr); } .cpv-liste .btn { grid-column: 1 / -1; justify-self: start; } }
.mk-lots { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mk-lots li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: baseline; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.mk-lots li > b { font-variant-numeric: tabular-nums; color: var(--royal-dark); white-space: nowrap; }
.mk-lots li > span { color: var(--navy-2); overflow-wrap: anywhere; }
.mk-lots li > small { grid-column: 2; color: var(--slate); }

/* Saisie des mots-clés (chantier 2) : nombre d'avis ouverts, terme trop générique, exclusions proposées */
.badge-tag .kw-n { font-size: 11px; font-weight: 600; color: var(--slate); font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge-tag .kw-n:empty { display: none; }
.badge-tag.warn { border-color: #D97706; background: #FFFBEB; }
.badge-tag.warn::before { background: #B45309; }
.kw-warn { flex-basis: 100%; font-size: 12.5px; line-height: 1.4; color: #8A4B00; }
.kw-live { display: block; min-height: 1em; margin-top: 4px; font-size: 12.5px; line-height: 1.4; color: var(--slate); }
.kw-live:empty { display: none; }
.px-box .kw-live { flex-basis: 100%; margin: 0 6px 4px; }
.kw-sugg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.kw-sugg .chip-btn { min-height: 32px; }
.futur-head { margin-top: 28px; }
.crit-pct { white-space: nowrap; }  /* « 100 % » sur une seule ligne à 390 px */
@media (max-width: 480px) {
  /* Mots-clés longs : retour à la ligne plutôt que tronqués (le nombre d'avis reste visible) */
  .badges .badge-tag, .px-box .badge-tag { border-radius: 14px; }
  .badges .badge-tag > span, .px-box .badge-tag > span { white-space: normal; overflow-wrap: anywhere; }
}

/* Cibly Pro : coût estimé de l'assistant IA */
.pro-ia { padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.pro-ia .crit-head { flex-wrap: wrap; gap: 4px 16px; }
.pro-ia .crit-head h3 { flex: 0 0 auto; }
.pia-total { margin: 0; font-size: 14px; color: var(--slate); }
.pia-total b { font: 800 20px/1.1 var(--f-display); color: var(--navy); margin-right: 4px; }
.pia-total.is-alerte strong, .pia-total.is-alerte { color: #92400E; }
.pia-total.is-pause { color: #9A3412; }
.pia-barre { width: 100%; height: 8px; border: 0; border-radius: 99px; overflow: hidden; background: #E2E8F0; appearance: none; }
.pia-barre::-webkit-progress-bar { background: #E2E8F0; border-radius: 99px; }
.pia-barre::-webkit-progress-value { background: var(--navy); border-radius: 99px; }
.pia-barre::-moz-progress-bar { background: var(--navy); border-radius: 99px; }
.pia-table .pia-somme td { border-top: 2px solid var(--line-strong); }
.pro-notes { padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.pro-notes .crit-head { flex-wrap: wrap; gap: 4px 16px; }
.pro-notes .crit-head h3 { flex: 0 0 auto; }
.pn-table { min-width: 640px; }
.pn-table td:first-child { white-space: nowrap; }
.pro-settings .ps-ia { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.ps-ia .ps-sous { margin: 6px 0 0; font-size: 13.5px; }
.pia-prix input { width: 100%; min-width: 72px; }

/* Cibly Pro : espaces à supprimer */
#pro-suppr .pd-liste li { grid-template-columns: 110px minmax(0, 1fr) auto; align-items: center; }
@media (max-width: 560px) { #pro-suppr .pd-liste li { grid-template-columns: minmax(0, 1fr); gap: 2px; } #pro-suppr .pd-liste .link-btn { justify-self: start; } }
