/* We Boost — Validation des prospects
   Page blanche, peu d'encadrés, des panneaux doux posés sur la page,
   et une seule couleur d'accent (--accent). */
:root {
  --white: #ffffff;
  --page: #ffffff;
  --panel: #f7f5f1;          /* fond des panneaux */
  --panel-line: #ebe5db;
  --beige-2: #efe9df;
  --beige-3: #ddd4c6;
  --text: #26231f;
  --muted: #847b70;
  --line: #ece6dc;

  /* La couleur unique : la changer ici change toute l'interface */
  --accent: #3b5bdb;
  --accent-hover: #2f49b8;
  --accent-soft: #e8ecfc;

  /* Uniquement pour les erreurs d'envoi */
  --error: #b42318;
  --error-soft: #fdecea;

  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-panel: 20px;
  --r-ctrl: 10px;
  --r-tag: 6px;
  --shadow: 0 1px 2px rgba(50, 40, 30, .04), 0 8px 24px -12px rgba(50, 40, 30, .12);
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

h1 { margin: 0; }
h2 { margin: 0; font-size: 15px; font-weight: 600; }
.display { font-size: 30px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.eyebrow { font-size: 13px; color: var(--muted); }
.sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.card-meta { font-size: 13px; color: var(--muted); }
kbd { font: 500 11px/1 var(--font); padding: 3px 6px; border-radius: 4px; margin-left: 10px; border: 1px solid currentColor; opacity: .6; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--panel); display: flex; flex-direction: column; overflow-y: auto;
}
.content { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }
.main { padding: 40px 48px 64px; max-width: 1380px; }

.brand { display: flex; align-items: center; gap: 12px; padding: 24px 22px 20px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 15.5px; }
.brand-text span { font-size: 12px; color: var(--muted); }

.nav { flex: 1; padding: 8px 12px 20px; }
.nav-section { margin-bottom: 20px; }
.nav-title { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #a69c8f; padding: 0 12px 8px; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px; color: #4d463d; font-size: 14.5px;
  transition: background .12s, color .12s;
}
.nav-link:hover { background: rgba(255, 255, 255, .7); color: var(--text); }
.nav-link.active { background: var(--white); color: var(--accent); font-weight: 600; box-shadow: var(--shadow); }
.nav-icon { width: 19px; height: 19px; flex: none; color: #9a9085; }
.nav-link.active .nav-icon { color: var(--accent); }
.nav-label { flex: 1; }
.badge { min-width: 24px; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; text-align: center; color: #6b6258; }
.badge-accent { background: var(--accent); color: var(--white); }
.badge-danger { background: var(--error-soft); color: var(--error); }

.user { display: flex; align-items: center; gap: 11px; margin: 0 12px 14px; padding: 12px; border-radius: 14px; background: var(--white); }
.user-text { display: flex; flex-direction: column; line-height: 1.35; }
.user-text strong { font-weight: 600; }
.user-text span { font-size: 12px; color: var(--muted); }

/* ---------- Avatars ---------- */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 600;
  background: var(--beige-2); color: #5d544a;
}
.avatar-co { border-radius: 10px; background: var(--white); border: 1px solid var(--line); color: var(--text); }
.avatar-sm { width: 32px; height: 32px; font-size: 11px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; background: var(--accent-soft); color: var(--accent); }
.avatar-xl { width: 60px; height: 60px; font-size: 19px; border-radius: 16px; }
.avatar-user { background: var(--accent-soft); color: var(--accent); }
.avatar-pair { display: inline-flex; }
.avatar-pair .avatar + .avatar { margin-left: -10px; box-shadow: 0 0 0 2px var(--white); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: var(--r-ctrl); padding: 9px 16px; font-weight: 600; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s, transform .08s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 13px 20px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-primary, .btn-validate, .btn-success-soft { background: var(--accent); color: var(--white); }
.btn-primary:hover, .btn-validate:hover:not(:disabled), .btn-success-soft:hover { background: var(--accent-hover); }
.btn-primary-soft { background: var(--accent-soft); color: var(--accent); }
.btn-primary-soft:hover { background: #d3dbf8; }
.btn-ghost, .btn-other, .btn-reject { background: var(--white); border-color: var(--beige-3); color: var(--text); }
.btn-ghost:hover, .btn-other:hover { border-color: var(--text); }
.btn-reject:hover { border-color: var(--error); color: var(--error); background: var(--error-soft); }

/* ---------- En-tête de page ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; }

/* ---------- Filtre de semaine ---------- */
.period { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.week-picker { display: inline-flex; align-items: center; background: var(--panel); border-radius: 99px; padding: 3px; }
.week-picker button { width: 32px; height: 32px; border: 0; background: none; border-radius: 50%; font-size: 19px; line-height: 1; color: var(--text); }
.week-picker button:hover:not(:disabled) { background: var(--white); color: var(--accent); }
.week-picker button:disabled { opacity: .3; cursor: not-allowed; }
.week-current { padding: 0 10px; color: var(--muted); white-space: nowrap; }
.week-current strong { color: var(--text); font-weight: 600; }
.period-tag { font-size: 12.5px; font-weight: 600; color: var(--accent); }
.period-tag::before { content: "● "; font-size: 10px; vertical-align: 1px; }
.period-link { border: 0; background: none; padding: 0; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.period-link:hover { text-decoration: underline; }

/* ---------- Panneaux ---------- */
.panel, .card { background: var(--panel); border-radius: var(--r-panel); padding: 24px 26px; }
.block-head, .card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.pill { padding: 1px 9px; border-radius: 99px; background: var(--accent); color: var(--white); font-size: 12.5px; font-weight: 600; }

/* ---------- Tableau de bord ---------- */
/* Cartes blanches simples, bordure fine */
.dcard { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; }
.dcard h2 { font-size: 15px; font-weight: 600; margin-bottom: 18px; }

.kpis { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.kpi { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi-label { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 15px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.kpi-foot { font-size: 12.5px; color: var(--muted); }
.kpi-wide .kpi-value { font-size: 34px; }
.progress { height: 8px; background: var(--beige-2); border-radius: 99px; overflow: hidden; margin: 4px 0 2px; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
a.kpi { transition: border-color .12s; }
a.kpi:hover { border-color: var(--beige-3); }
.kpi-alert .kpi-value { color: var(--error); }

.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; margin-top: 6px; }
.dot-accent { background: var(--accent); }
.dot-mid { background: #7d93e8; }
.dot-light { background: #bcc9f3; }
.dot-error { background: var(--error); }

.dash-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }

.bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; height: 150px; align-items: end; }
.bar-col { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 6px; }
.bar-val { font-size: 12.5px; font-weight: 500; }
.bar-track { flex: 1; width: 100%; max-width: 44px; display: flex; align-items: flex-end; }
.bar { display: block; width: 100%; background: #c9d3f6; border-radius: 4px 4px 0 0; transition: height .4s; }
.bar-day { font-size: 12.5px; color: var(--muted); }
.bar-col.today .bar { background: var(--accent); }
.bar-col.today .bar-day { color: var(--accent); font-weight: 600; }
.bar-col.future .bar { background: var(--beige-2); }
.bar-col.future .bar-val { color: var(--muted); }

.fam-bars { display: flex; flex-direction: column; gap: 16px; }
.fam-bar-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.fam-bar-track { height: 6px; background: var(--beige-2); border-radius: 99px; overflow: hidden; }
.fam-bar-track span { display: block; height: 100%; border-radius: 99px; transition: width .4s; }
.shade-0 { background: var(--accent); }
.shade-1 { background: #7d93e8; }
.shade-2 { background: #bcc9f3; }

.motif-list { list-style: none; margin: -6px 0 0; padding: 0; }
.motif-list li { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.count-pill { min-width: 26px; padding: 1px 8px; border-radius: 99px; background: var(--beige-2); font-size: 12px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }

.count-pill.accent { background: var(--accent); color: var(--white); }
.count-pill.alert { background: var(--error-soft); color: var(--error); }
.kpi-foot strong { color: var(--accent); font-weight: 600; }

/* Listes du tableau de bord */
.list-card { display: flex; flex-direction: column; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.list-head h2 { margin: 0; }
.list-lead { margin: -4px 0 10px; font-size: 13px; color: var(--muted); }
.list-lead strong { color: var(--text); font-weight: 600; }
.list-empty { margin: 8px 0 16px; color: var(--muted); }
.list-card > .btn-block { margin-top: auto; }

.mini-list { list-style: none; margin: 0 0 16px; padding: 0; }
.mini-list li { display: flex; align-items: center; gap: 11px; padding: 10px 8px; margin: 0 -8px; border-radius: 10px; }
.mini-list li + li { border-top: 1px solid var(--line); }
.mini-list li.clickable { cursor: pointer; transition: background .1s; }
.mini-list li.clickable:hover, .mini-list li.clickable:focus { background: var(--panel); outline: none; }
.mini-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.mini-text strong { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-text strong .muted { font-weight: 400; }
.mini-text > span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-text .warn { font-style: normal; font-weight: 600; color: #8a6d3b; }
.mini-tag { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.mini-tag.tag-q { background: var(--accent-soft); color: var(--accent); }
.mini-tag.tag-m { background: var(--beige-2); color: #6b6258; }
.mini-date { font-size: 12.5px; color: var(--muted); white-space: nowrap; }

.attention-list { list-style: none; margin: -6px 0 0; padding: 0; }
.attention-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; transition: color .1s; }
.attention-list a:hover { color: var(--accent); }
.attention-list a.is-zero { color: var(--muted); }
.attention-list a.is-zero .count-pill { opacity: .6; }

/* ---------- Listes ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.search, .select, .quick-add input {
  border: 1px solid transparent; background: var(--panel); border-radius: var(--r-ctrl); padding: 11px 14px;
  font: inherit; color: var(--text); outline: none; transition: border-color .12s, background .12s, box-shadow .12s;
}
.search::placeholder, .quick-add input::placeholder { color: #a99f92; }
.search { flex: 1; min-width: 220px; padding-left: 38px;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23847b70' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E") no-repeat 13px center;
}
.search:focus, .select:focus, .quick-add input:focus { background-color: var(--white); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.count { font-size: 13px; color: var(--muted); margin-left: auto; white-space: nowrap; }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch-ui { width: 34px; height: 20px; border-radius: 99px; background: var(--beige-3); position: relative; transition: background .15s; }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); transition: left .15s; }
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { left: 16px; }

/* Tableau : pas de cadre, des lignes qui deviennent des cartes au survol */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 780px; }
.table th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 15px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; transition: background .1s; }
.table tr:last-child td { border-bottom: none; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td, .table tr.clickable:focus td { background: var(--panel); border-bottom-color: transparent; }
.table tr.clickable:hover td:first-child, .table tr.clickable:focus td:first-child { border-radius: 14px 0 0 14px; }
.table tr.clickable:hover td:last-child, .table tr.clickable:focus td:last-child { border-radius: 0 14px 14px 0; }
.table tr.clickable:focus { outline: none; }
.chev { font-size: 20px; color: var(--beige-3); width: 34px; transition: transform .15s, color .15s; }
.table tr.clickable:hover .chev { color: var(--accent); transform: translateX(3px); }
.strong { font-weight: 600; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.muted-warn { font-size: 12.5px; font-weight: 600; color: #6b6258; background: var(--beige-2); padding: 3px 9px; border-radius: var(--r-tag); }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn + .btn { margin-left: 6px; }

.cell-entity { display: flex; align-items: center; gap: 12px; }
.cell-entity > div { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.cell-entity > div > span { color: var(--muted); font-size: 12.5px; }

.fam { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: #5d544a; }
.fam::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .55; }
.tag { display: inline-block; padding: 2px 9px; border-radius: var(--r-tag); font-size: 12.5px; background: var(--beige-2); color: #5d544a; margin: 2px 4px 2px 0; }
.tag-warn { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-ok { color: var(--accent); }
.status-err { color: var(--error); font-weight: 600; }

.empty {
  background: var(--panel); border-radius: var(--r-panel);
  padding: 60px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.empty strong { font-size: 17px; }
.empty span { color: var(--muted); }
.empty-icon { font-size: 32px; margin-bottom: 6px; }

.quick-add { display: flex; gap: 10px; margin-bottom: 20px; }
.quick-add input { flex: 1; min-width: 0; }
.shake { animation: shake .35s; border-color: var(--error) !important; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ---------- Détail ---------- */
.detail-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.detail-top .eyebrow { padding: 4px 12px; border-radius: 99px; background: var(--panel); font-weight: 500; }
.back { color: var(--muted); font-weight: 500; }
.back:hover { color: var(--accent); }
.detail-head { display: flex; align-items: center; gap: 18px; margin-bottom: 30px; }
.detail-head > div { flex: 1; min-width: 0; }
.detail-head .eyebrow { margin-bottom: 2px; }
.qual { padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.qual-q { background: var(--accent); color: var(--white); }
.qual-m { background: var(--accent-soft); color: var(--accent); }
.qual-n { background: var(--beige-2); color: var(--muted); }

.banner { border-radius: 16px; padding: 16px 20px; margin-bottom: 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.banner-warn { background: var(--accent-soft); }
.banner-warn strong { font-size: 15px; }
.banner-warn .tag-warn { background: var(--white); }
.banner-info { background: var(--panel); color: var(--muted); font-weight: 500; }
.banner-tags { margin-top: 6px; }
.banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Gauche : offre + entreprise en texte. Droite : contact + boutons, qui reste visible au défilement. */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 48px; align-items: start; }
.detail-info { display: flex; flex-direction: column; gap: 40px; }
.info h2 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.info .facts { grid-template-columns: 170px 1fr; font-size: 14.5px; margin-bottom: 14px; }
.info .facts dt, .info .facts dd { padding: 11px 0; }
.contact-panel { position: sticky; top: 24px; }
.block-main { background: var(--white); box-shadow: 0 1px 2px rgba(50, 40, 30, .05), 0 20px 40px -20px rgba(50, 40, 30, .22); border: 1px solid var(--line); padding: 24px 26px; }
.block-main > h2 { color: var(--accent); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 18px; }
.person { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.person-name { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.person-role { color: var(--muted); }
.why { background: var(--panel); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.why strong { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.link { color: var(--accent); font-weight: 600; font-size: 13.5px; }
.link:hover { text-decoration: underline; }
.author {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: flex-start; gap: 9px; font-size: 13.5px;
}
.choice-hint { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.choices { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.choice { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--white); }
.choice:hover { border-color: var(--beige-3); }
.choice.on { border-color: var(--accent); background: var(--accent-soft); }
.choice input { accent-color: var(--accent); margin: 0; }
.choice > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.choice small { color: var(--muted); }
.no-decider { display: flex; flex-direction: column; gap: 4px; }
.no-decider strong { font-size: 17px; }
.no-decider > span { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }
.no-decider .quick-add { margin: 0; }

.facts { display: grid; grid-template-columns: auto 1fr; margin: 0 0 14px; font-size: 13.5px; }
.facts dt, .facts dd { padding: 7px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); padding-right: 16px; }
.facts dd { margin: 0; font-weight: 500; }

.actionbar { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.actionbar-inner { display: flex; flex-direction: column; gap: 8px; }
.actionbar-inner .btn { width: 100%; }
.reject-wrap { position: relative; }
.reject-menu {
  position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; z-index: 20;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 6px;
  box-shadow: 0 16px 40px rgba(50, 40, 30, .16);
}
.reject-title { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 8px 10px 6px; }
.reject-menu button { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 10px; border-radius: 10px; }
.reject-menu button:hover { background: var(--error-soft); color: var(--error); }

.nq-lead { margin: -4px 0 14px; color: var(--muted); font-size: 14px; }
.nq-reasons { margin-bottom: 14px; }
.nq-reasons .tag { font-size: 13.5px; padding: 4px 11px; }
.nq-hint { margin: 0; padding: 12px 14px; background: var(--panel); border-radius: 14px; font-size: 13.5px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 16px); opacity: 0; z-index: 50;
  background: var(--text); color: var(--white); border-radius: 14px; padding: 10px 10px 10px 18px;
  display: flex; align-items: center; gap: 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
  transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-undo { background: var(--accent); color: var(--white); border: 0; border-radius: 10px; padding: 7px 13px; font-weight: 600; white-space: nowrap; }
.toast-undo:hover { background: var(--accent-hover); }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .kpi-wide { grid-column: 1 / -1; }
}
@media (max-width: 1180px) {
  .dash-row { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .contact-panel { position: static; order: -1; }
  .actionbar-inner { flex-direction: row; }
  .actionbar-inner > .btn, .reject-wrap { flex: 1; }
}
@media (max-width: 900px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .dash-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .sidebar { position: static; width: auto; }
  .brand { padding: 14px 16px 8px; }
  .nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 12px 12px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-section { display: contents; }
  .nav-title { display: none; }
  .nav-link { flex: none; padding: 7px 12px; }
  .user { display: none; }
  .content { margin-left: 0; }
  .main { padding: 24px 16px 40px; }
  .display { font-size: 24px; }
  .info .facts { grid-template-columns: 120px 1fr; }
  .detail.has-actionbar { padding-bottom: 90px; }
  .detail-head { flex-wrap: wrap; gap: 12px; }
  .detail-head > div { flex-basis: calc(100% - 76px); }
  .detail-top .eyebrow { white-space: nowrap; }
  /* Sur mobile, les 3 boutons restent collés en bas, à portée du pouce */
  .actionbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; margin: 0;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-top: 1px solid var(--line);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }
  .actionbar-inner { gap: 8px; }
  .btn-validate { flex: 1.3 !important; }
  .reject-wrap .btn { width: 100%; }
  .btn-lg { padding: 14px 8px; font-size: 14px; }
  .actionbar kbd { display: none; }
  .reject-menu { left: auto; right: 0; min-width: 230px; }
  .toast { bottom: 84px; }
  .quick-add { flex-direction: column; }
}

/* ---------- Panneau contact : en-tête et boutons ---------- */
.person-text { flex: 1; min-width: 0; }
.li-btn {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 99px;
  font-size: 12.5px; font-weight: 600; color: var(--accent); transition: border-color .12s, background .12s;
}
.li-btn svg { width: 15px; height: 15px; }
.li-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.why { margin-bottom: 0; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-validate { gap: 8px; }
.btn-validate svg { stroke-width: 2.4; }
.action-secondary { display: grid; grid-template-columns: 1fr; gap: 8px; }
.action-secondary .btn { width: 100%; padding: 10px 12px; color: var(--muted); }
.action-secondary .btn-reject:hover { color: var(--error); }
.action-secondary .reject-menu { left: auto; right: 0; min-width: 240px; }
@media (max-width: 1180px) {
  .action-secondary { display: contents; }
}
@media (max-width: 760px) {
  .actionbar .btn { min-width: 0; padding: 13px 6px; font-size: 14px; }
  .action-secondary .btn svg { display: none; }
  .actionbar .btn-validate { flex: 1.4 !important; }
}
@media (max-width: 1180px) {
  .actionbar-inner { align-items: stretch; }
  .action-secondary .btn, .actionbar .btn-validate { padding-top: 13px; padding-bottom: 13px; }
  .reject-wrap { display: flex; }
}
@media (max-width: 760px) {
  .hide-sm { display: none; }
  .actionbar .btn-validate svg { display: none; }
}
@media (max-width: 1180px) {
  .actionbar .btn { min-width: 0; }
  .actionbar .btn-validate { flex: 1.3; }
}
@media (max-width: 760px) {
  .actionbar .btn { font-size: 13px; padding: 13px 4px; }
  .actionbar .btn-validate { flex: 1 !important; }
}

/* ---------- Provenance du contact ---------- */
.source-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px;
  font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.4;
}
.source-badge svg { width: 13px; height: 13px; stroke-width: 2; }
.source-author { background: var(--accent); color: var(--white); }
.source-search { background: var(--accent-soft); color: var(--accent); }
.source-manual { background: var(--beige-2); color: #6b6258; }
.person-badges { margin: 6px 0 4px; }
.role-unknown { color: #a99f92; font-style: italic; }
.choice .source-badge { align-self: flex-start; margin-top: 4px; font-size: 11px; padding: 2px 7px; }
.author-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.author-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Connexion, chargement, déconnexion ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--panel); }
.auth[hidden] { display: none; }
.auth-card { width: 100%; max-width: 380px; background: var(--white); border-radius: 20px; padding: 32px 30px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.auth-brand { display: flex; flex-direction: column; line-height: 1.25; margin-bottom: 22px; }
.auth-brand strong { font-size: 17px; }
.auth-brand span { font-size: 12.5px; color: var(--muted); }
.auth-card h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 20px; }
.auth-card label { font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.auth-card input {
  border: 1px solid var(--beige-3); background: var(--white); border-radius: var(--r-ctrl); padding: 11px 14px;
  font: inherit; color: var(--text); outline: none; margin-bottom: 16px;
}
.auth-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-error { margin: -4px 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--error-soft); color: var(--error); font-size: 13.5px; }
.auth-card .btn { width: 100%; }

.state-msg { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--muted); }
.state-msg strong { color: var(--text); font-size: 18px; }
.state-msg span { max-width: 56ch; }
.state-actions { display: flex; gap: 8px; margin-top: 8px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--beige-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.user { position: relative; }
.logout { margin-left: auto; width: 32px; height: 32px; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; color: var(--muted); flex: none; }
.logout svg { width: 17px; height: 17px; }
.logout:hover { background: var(--panel); color: var(--text); }
.logout[hidden] { display: none; }
.status-wait { color: var(--muted); }
.layout[hidden] { display: none; }
.badge:empty { display: none; }

/* ---------- Boutons en cours d'envoi ---------- */
.btn.is-loading { pointer-events: none; opacity: .85; cursor: progress; }
.btn-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; flex: none; vertical-align: -2px; }
.status .btn-spinner { margin-right: 7px; }
.status-wait:has(.btn-spinner)::before { display: none; }

/* ---------- Recherches en cours / sous-filtre ---------- */
.searching { display: flex; align-items: center; gap: 9px; margin: 8px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.searching[hidden] { display: none; }
.switch .count-pill { margin-left: 2px; }
@media (max-width: 760px) { .searching { flex: none; margin: 0; white-space: nowrap; } }

/* ---------- Fenêtre : ajouter un décideur ---------- */
body.modal-open { overflow: hidden; }
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(38, 35, 31, .45); overflow-y: auto; }
.modal { width: 100%; max-width: 460px; background: var(--white); border-radius: 20px; padding: 28px 28px 24px; box-shadow: 0 24px 60px rgba(38, 35, 31, .3); }
.modal h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.modal-sub { margin: 4px 0 20px; color: var(--muted); font-size: 13.5px; }
.modal .field { margin-bottom: 16px; }
.modal label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.modal .req { color: var(--accent); }
.modal .optional { color: var(--muted); font-weight: 400; }
.modal input {
  width: 100%; border: 1px solid var(--beige-3); background: var(--white); border-radius: var(--r-ctrl); padding: 11px 14px;
  font: inherit; color: var(--text); outline: none; transition: border-color .12s, box-shadow .12s;
}
.modal input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.modal input.invalid { border-color: var(--error); box-shadow: 0 0 0 3px var(--error-soft); }
.modal input:disabled { background: var(--panel); }
.modal .help { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.modal .field-error { margin: 6px 0 0; font-size: 13px; font-weight: 500; color: var(--error); }
.modal .field-error[hidden], .modal .modal-error[hidden] { display: none; }
.modal-error { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--error-soft); color: var(--error); font-size: 13.5px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@media (max-width: 760px) { .modal { padding: 22px 18px 18px; } .modal-actions .btn { flex: 1; } }

/* Avertissement (personne déjà envoyée dans Emelia) */
.banner-caution { background: #fff5e0; color: #7a4f00; justify-content: flex-start; gap: 12px; border-left: 4px solid #e0a43a; }
.banner-caution svg { width: 20px; height: 20px; flex: none; color: #c98a14; }
.banner-caution strong { font-size: 14.5px; font-weight: 600; }

/* ---------- Pas qualifiées : états de la ligne ---------- */
.nq-state { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; font-size: 13.5px; }
.nq-found { display: flex; flex-direction: column; gap: 6px; }
.nq-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-left: 40px; }
.row-actions .btn { vertical-align: middle; }
.btn-sm.btn-primary { padding: 6px 14px; }
a.btn { text-decoration: none; }
.modal-sm { max-width: 420px; }
.confirm-msg { margin: 0 0 4px; font-size: 15px; line-height: 1.55; }

/* ---------- Toutes les offres ---------- */
.status-muted { color: var(--muted); font-weight: 500; }
.more-wrap { display: flex; justify-content: center; padding: 18px 0 4px; }
.table.table-wide { min-width: 1020px; }

/* ---------- Menu déroulant « Les types d'offres » ---------- */
.dropdown { position: relative; }
.dd-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 190px;
  border: 1px solid transparent; background: var(--panel); border-radius: var(--r-ctrl); padding: 11px 14px;
  font: inherit; color: var(--text); cursor: pointer; transition: background .12s, border-color .12s, box-shadow .12s, color .12s;
}
.dd-btn:hover { background: var(--beige-2); }
.dd-chevron { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform .15s; }
.dropdown.open .dd-btn, .dd-btn:focus-visible { background: var(--white); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.dropdown.open .dd-chevron { transform: rotate(180deg); }
.dd-btn.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.dd-btn.active .dd-chevron { color: var(--accent); }
.dd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 100%; max-width: calc(100vw - 32px); z-index: 30;
  margin: 0; padding: 6px; list-style: none; background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(50, 40, 30, .16);
}
.dd-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.dd-item:hover, .dd-item:focus { background: var(--panel); outline: none; }
.dd-check { width: 16px; height: 16px; flex: none; color: var(--accent); visibility: hidden; }
.dd-item[aria-selected="true"] { color: var(--accent); font-weight: 600; }
.dd-item[aria-selected="true"] .dd-check { visibility: visible; }
.dd-sep { height: 1px; margin: 4px 6px; background: var(--line); }
