:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #ff7a59;
  --accent-dark: #e85c3a;
  --sidebar: #232a3d;
  --ok: #10b981;
  --ko: #ef4444;
  --wait: #f59e0b;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: inherit; }

.layout { display: flex; min-height: 100vh; }
.sidebar { width: 200px; background: var(--sidebar); color: #cbd5e1; padding: 18px 12px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; }
.brand { display: block; font-size: 19px; font-weight: 800; color: white; text-decoration: none; padding: 4px 10px 18px; letter-spacing: .5px; }
.brand span { color: var(--accent); }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: #9aa5bd; font-weight: 500; }
.sidebar nav a:hover { color: white; background: rgba(255,255,255,.06); }
.sidebar nav a.active { color: white; background: var(--accent); }
.ico { width: 20px; text-align: center; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 58px; background: var(--panel); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 22px; gap: 16px; position: sticky; top: 0; z-index: 40; }
.search-wrap { position: relative; flex: 1; max-width: 620px; }
#global-search { width: 100%; padding: 9px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); font-size: 13.5px; }
#global-search:focus { outline: none; border-color: var(--accent); background: white; }
.search-dropdown { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: white; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(15,23,42,.14); overflow: hidden; max-height: 420px; overflow-y: auto; z-index: 60; }
.sd-group { padding: 8px 12px 3px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.sd-item { display: block; padding: 8px 12px; text-decoration: none; }
.sd-item:hover { background: var(--bg); }
.sd-item b { font-size: 13.5px; }
.sd-sub { color: var(--muted); font-size: 12px; margin-left: 6px; }
.sd-all { display: block; text-align: center; padding: 9px; font-size: 13px; color: var(--accent); font-weight: 600; border-top: 1px solid var(--border); text-decoration: none; }
.sd-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }

main { padding: 24px 26px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; font-weight: 700; }
.page-sub { margin: -10px 0 18px; }
.detail-head { align-items: flex-start; }
.head-chips { display: flex; gap: 7px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.count { color: var(--muted); font-weight: 500; font-size: 15px; margin-left: 4px; }

.card, .card-table, .stat-row .stat { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
.card { padding: 18px; margin-bottom: 16px; }
.card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); font-weight: 700; margin-bottom: 12px; }
.card-table { overflow: hidden; margin-bottom: 16px; }
.scroll-x { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 10px 12px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border); }
td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f1f2f6; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafbfd; }
.row-title { font-weight: 600; text-decoration: none; }
.row-title:hover { color: var(--accent); }
.block { display: block; }
.empty { color: var(--muted); font-style: italic; padding: 14px 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error-text { color: var(--ko); font-size: 12.5px; margin-top: 6px; }
.error-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn { padding: 8px 14px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; font-size: 13px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: white; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: #c9ced8; }
.btn-danger { background: var(--ko); color: white; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.chip-ok { background: #d1fae5; color: #065f46; }
.chip-ko { background: #fee2e2; color: #991b1b; }
.chip-wait { background: #fef3c7; color: #92400e; }
.chip-run { background: #dbeafe; color: #1e40af; }
.chip-gray { background: #f1f2f6; color: #4b5563; }
.chip-domain { background: #ede9fe; color: #5b21b6; text-decoration: none; }
.chip-agent { background: #fce7f3; color: #9d174d; }
.chip-lead { background: #fef3c7; color: #92400e; }
.chip-lead-soft { background: #fffbeb; color: #b45309; border: 1px dashed #fcd34d; }
.banner-lead { display: flex; align-items: center; gap: 8px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.row-current td { background: #f0fdf4 !important; }

.stage-badge { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.stage-open { background: #e0e7ff; color: #3730a3; }
.stage-won { background: #d1fae5; color: #065f46; }
.stage-lost { background: #fee2e2; color: #991b1b; }

.toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); cursor: pointer; }
.toggle input { accent-color: var(--accent); }

.filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filters input[type="search"] { flex: 1; min-width: 220px; max-width: 380px; }
input, select, textarea { padding: 8px 11px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-family: inherit; background: white; }
textarea { resize: vertical; min-height: 54px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

.form-group { margin-bottom: 11px; flex: 1; }
.form-group label { font-size: 11px; color: var(--muted); display: block; margin-bottom: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.form-group input, .form-group select { width: 100%; }
.form-row { display: flex; gap: 12px; }
.mapping-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 14px; }

.stat-row { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.stat { padding: 14px 18px; flex: 1; min-width: 120px; }
.stat .num { font-size: 24px; font-weight: 800; }
.stat .label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat-ko .num { color: var(--ko); }

.pagination { display: flex; gap: 6px; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.pagination a, .pg-current { padding: 6px 11px; border-radius: 7px; font-size: 13px; text-decoration: none; }
.pagination a { border: 1px solid var(--border); background: white; }
.pagination a:hover { border-color: var(--accent); }
.pg-current { background: var(--accent); color: white; font-weight: 700; }

/* ── Kanban ── */
.board { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 20px; }
.col { background: #eef0f5; border-radius: 12px; width: 272px; flex-shrink: 0; padding: 10px; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 10px; border-top: 3px solid transparent; }
.stage-border-open { border-color: #64748b; }
.stage-border-won { border-color: var(--ok); }
.stage-border-lost { border-color: var(--ko); }
.col-head h2 { font-size: 13px; font-weight: 700; }
.col-count { background: #dde1ea; border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 700; color: #475569; }
.col-total { padding: 0 6px 8px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.col-body { display: flex; flex-direction: column; gap: 8px; min-height: 60px; transition: background .15s; }
.col-body.dragover { background: #e0e4ee; border-radius: 8px; }
.col-empty { color: #98a1b3; font-size: 12px; text-align: center; padding: 16px 6px; border: 1px dashed #ccd2de; border-radius: 8px; }
.card-draggable, .col-body article.card {
  background: white; border: 1px solid var(--border); border-radius: 9px; padding: 11px 12px;
  cursor: grab; box-shadow: 0 1px 2px rgba(15,23,42,.05);
}
article.card:hover { border-color: #c9ced8; }
article.card.dragging { opacity: .45; transform: rotate(1.5deg); }
.card-title { font-weight: 700; font-size: 13.5px; text-decoration: none; display: block; margin-bottom: 6px; }
.card-title:hover { color: var(--accent); }
.card-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-mail { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.card-note { font-size: 12px; color: #556074; margin-top: 7px; border-top: 1px dashed var(--border); padding-top: 7px; }

.modal-dialog { border: none; border-radius: 14px; padding: 22px; width: min(520px, 92vw); height: fit-content; position: fixed; inset: 0; margin: auto; box-shadow: 0 24px 64px rgba(15,23,42,.25); }
.modal-dialog::backdrop { background: rgba(15,23,42,.45); }
.modal-dialog h3 { font-size: 16px; margin-bottom: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ── Détail company/contact ── */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.resume { line-height: 1.65; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.link-chip { text-decoration: none; background: var(--bg); border: 1px solid var(--border); padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.link-chip:hover { border-color: var(--accent); color: var(--accent); }
.kv div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed #eef0f4; font-size: 13px; }
.kv dt { color: var(--muted); flex-shrink: 0; }
.kv dd { text-align: right; word-break: break-all; }
.copy { background: none; border: none; cursor: copy; font: inherit; color: inherit; padding: 0; text-align: right; }
.copy:hover { color: var(--accent); }
.deal-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px dashed #eef0f4; }
.company-link { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 4px 0; }
.add-form summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; margin-top: 10px; }
.add-form form { margin-top: 12px; }
.danger-zone summary { cursor: pointer; color: var(--ko); font-size: 12.5px; margin-top: 14px; }
.danger-zone button { margin-top: 10px; }

/* ── Timeline ── */
.timeline { margin-top: 16px; }
.timeline-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f2f6; }
.tl-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px; }
.tl-note { background: #fff7ed; }
.tl-enrichissement { background: #ede9fe; }
.tl-changement_etape { background: #dbeafe; }
.tl-meta { display: flex; align-items: baseline; gap: 8px; }
.tl-type { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: #475569; }
.tl-date { font-size: 11px; color: var(--muted); }
.tl-del { border: none; background: none; color: #c3c9d4; cursor: pointer; font-size: 14px; margin-left: auto; }
.tl-del:hover { color: var(--ko); }
.tl-contenu { font-size: 13.5px; margin-top: 3px; white-space: pre-wrap; line-height: 1.55; }
.tl-move { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* ── Imports ── */
.upload-card { border-style: dashed; }
.dropzone { display: flex; gap: 16px; align-items: center; padding: 26px; border: 2px dashed #ccd2de; border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; position: relative; }
.dropzone:hover { border-color: var(--accent); background: #fffaf8; }
.dropzone.dragover { border-color: var(--accent); background: #fff3ee; border-style: solid; }
.dropzone input { display: none; }
.dropzone .dz-hover { display: none; }
.dropzone.dragover .dz-text { opacity: 0.3; }
.dropzone.dragover .dz-hover { display: block; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 600; color: var(--accent); }
.dz-icon { font-size: 34px; }
.bar { position: relative; height: 8px; background: #edeff4; border-radius: 999px; overflow: hidden; margin-bottom: 4px; max-width: 260px; }
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; background: #94a3b8; border-radius: 999px; }
.bar-green { background: var(--ok); }
.bar-amber { background: var(--wait); }
.actions-bar { margin-bottom: 14px; }

.agents-info { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 600; background: white; border: 1px solid var(--border); border-radius: 999px; padding: 6px 13px; }
.banner-info { display: flex; align-items: center; gap: 9px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; border-radius: 10px; padding: 11px 15px; margin-bottom: 16px; font-size: 13px; font-weight: 600; }
.agents-info.busy { color: #92400e; border-color: #fcd34d; background: #fffbeb; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.agents-info.busy .pulse { background: var(--wait); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* ── Mode Call : panneau flottant fixe À DROITE (toutes largeurs) ── */
.queue-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.q-count { opacity: .75; margin-left: 4px; }
.call-main { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 14px; align-items: start; margin-right: 340px; }
.call-left, .call-contacts { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(15,23,42,.05); }
.co-name { font-size: 20px; font-weight: 800; text-decoration: none; }
.co-name:hover { color: var(--accent); }
.co-domain { color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.co-chips { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.co-resume { margin-top: 8px; font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.co-offre { color: var(--muted); font-size: 12.5px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tier-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 10px; }
.tier-banner .tier-code { font-size: 16px; font-weight: 900; letter-spacing: .03em; }
.tier-banner .tier-label { font-size: 12.5px; font-weight: 700; }
.tier-banner .tier-meta { margin-left: auto; font-size: 11.5px; opacity: .85; }
.tier-a1 { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.tier-a2 { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.tier-a3 { background: #fefce8; border-color: #fde68a; color: #854d0e; }
.tier-a { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.tier-b { background: #f8fafc; border-color: #e2e8f0; color: #334155; }
.co-block { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); }
.co-block-title { font-weight: 800; font-size: 12.5px; color: #92400e; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.co-block-ao .co-block-title { color: #b91c1c; }
.co-block-count { background: #f1f5f9; color: #334155; border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.co-marche-line { display: flex; gap: 7px; flex-wrap: wrap; align-items: baseline; font-size: 12px; }
.ao-item { padding: 4px 0; border-top: 1px solid #f1f5f9; }
.ao-item:first-of-type { border-top: 0; }
.ao-objet { font-size: 12.5px; line-height: 1.4; }
.ao-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 2px; }
.co-marche { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--border); font-size: 12px; display: flex; gap: 7px; flex-wrap: wrap; align-items: baseline; }
.co-marche-date { font-weight: 800; color: #92400e; white-space: nowrap; }
.co-marche-objet { flex: 1 1 100%; margin-top: 2px; line-height: 1.45; }
.co-marche-acheteur { color: var(--muted); }
.co-marche-lien { color: var(--accent); font-weight: 600; }
/* ── Fiche entreprise enrichie (Mode Call) ── */
.co-hero { display: flex; gap: 14px; align-items: flex-start; }
.co-avatar { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 14px; background: linear-gradient(135deg, #ff9a7a, #ff6b47); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 19px; letter-spacing: .5px; box-shadow: 0 6px 16px rgba(255,122,89,.28); }
.co-hero-body { flex: 1; min-width: 0; }
.co-hero-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.co-name { font-size: 22px; line-height: 1.2; }
.co-legal { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.co-visit { white-space: nowrap; }
.co-meta-line { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--muted); }
.co-meta-item { display: inline-flex; align-items: center; gap: 4px; background: #f8fafc; border: 1px solid #eef1f6; border-radius: 999px; padding: 2px 9px; }
.co-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 4px; }
.co-stat { background: #f8fafc; border: 1px solid #eef1f6; border-radius: 10px; padding: 9px 10px; }
.co-stat-v { display: block; font-size: 15px; font-weight: 800; letter-spacing: -.2px; }
.co-stat-l { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-top: 2px; }
.co-about { margin-top: 14px; background: #fbfcfe; border: 1px solid #eef1f6; border-radius: 12px; padding: 12px 14px; }
.co-about-title { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 800; margin-bottom: 5px; }
.co-about-text { font-size: 13.5px; line-height: 1.6; }
.co-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.co-tag { font-size: 11px; background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 2px 9px; font-weight: 600; }
.market-card { margin-top: 14px; border: 1px solid #fde2c8; background: linear-gradient(180deg, #fffaf3, #fff); border-radius: 14px; overflow: hidden; }
.market-card-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid #fde2c8; }
.market-icon { font-size: 20px; }
.market-head-text { flex: 1; }
.market-eyebrow { font-size: 13px; font-weight: 800; color: #9a3412; }
.market-sub { font-size: 11.5px; color: #b45309; margin-top: 1px; }
.market-body { padding: 12px 14px; }
.market-date { display: inline-block; font-size: 11px; font-weight: 800; color: #9a3412; background: #ffedd5; border-radius: 999px; padding: 2px 9px; margin-bottom: 6px; }
.market-objet { font-size: 13.5px; line-height: 1.5; font-weight: 600; color: #1f2937; }
.market-buyer { font-size: 12px; color: var(--muted); margin-top: 6px; }
.market-label { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; font-weight: 800; color: #b45309; margin-right: 4px; }
.ao-section { margin-top: 14px; }
.ao-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ao-head-icon { font-size: 16px; }
.ao-head-title { font-size: 12.5px; font-weight: 800; color: #b91c1c; }
.ao-cards { display: grid; gap: 8px; }
.ao-card { border: 1px solid #fee2e2; background: linear-gradient(180deg, #fff7f7, #fff); border-radius: 12px; padding: 10px 12px; }
.ao-card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 5px; }
.ao-deadline { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; background: #fee2e2; color: #991b1b; border-radius: 999px; padding: 2px 8px; }
.ao-deadline.urgent { background: #ef4444; color: #fff; }
.ao-chip { font-size: 10.5px; font-weight: 600; color: #7f1d1d; background: #fff; border: 1px solid #fecaca; border-radius: 999px; padding: 1px 8px; }
.ao-card-objet { font-size: 13px; line-height: 1.45; font-weight: 600; }
.ao-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--muted); }
@media (max-width: 860px) { .co-stats { grid-template-columns: repeat(2, 1fr); } }
.co-links { margin-top: 8px; display: flex; gap: 5px; flex-wrap: wrap; }
.co-links .link-chip { font-size: 11px; padding: 3px 8px; }
.co-phones { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.big-phone { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 9px; cursor: copy; font-family: inherit; }
.big-phone:hover { background: #dbeafe; }
.co-emails { border-top: 1px dashed var(--border); padding-top: 6px; }
.row-email { padding: 5px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.contact-email { font-weight: 600; }
.row-phone-detail { padding: 2px 0 0; }

/* Panneau flottant — TOUJOURS à droite */
.call-action-panel {
  position: fixed; bottom: 18px; right: 18px; top: auto; width: 320px; z-index: 60;
  background: #fff; border-radius: 16px; border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  box-shadow: 0 20px 55px rgba(15,23,42,.20);
  padding: 16px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.ap-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ap-title { font-size: 13px; font-weight: 800; letter-spacing: .3px; }
.ap-pos { background: var(--bg); border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; color: var(--muted); }
.ap-btn { width: 100%; justify-content: center; margin-bottom: 7px; }
.ap-btn:last-child { margin-bottom: 0; }

@media (max-width: 1100px) {
  .call-action-panel { width: 290px; right: 12px; bottom: 12px; }
  .call-main { margin-right: 310px; }
}
@media (max-width: 860px) {
  .call-action-panel { width: 250px; right: 8px; bottom: 8px; padding: 12px; }
  .call-main { margin-right: 268px; }
}
@media (max-width: 720px) {
  .call-action-panel { position: fixed; right: 0; top: auto; bottom: 0; left: 0; width: auto; border-radius: 14px 14px 0 0; max-height: 72vh; }
  .call-main { margin-right: 0; padding-bottom: 320px; }
  .call-main { grid-template-columns: 1fr; }
}

.integrations-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; max-width: 900px; }
.int-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.int-icon { font-size: 26px; }
.int-head h2 { margin: 0; flex: 1; }

@media (max-width: 1080px) {
  .detail-grid { grid-template-columns: 1fr; }
  .form-row { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
}

/* ── Mode Call : script, historique, ajout contact ── */
.call-fold { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 8px; }
.call-fold > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; list-style: none; }
.call-fold > summary::-webkit-details-marker { display: none; }
.call-fold > summary::before { content: "▸ "; }
.call-fold[open] > summary::before { content: "▾ "; }
.fold-body { margin-top: 10px; font-size: 13px; line-height: 1.55; }
.script-goal { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.script-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 7px; }
.script-note { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.script-objections { margin-top: 12px; padding-top: 8px; border-top: 1px dashed var(--border); }
.script-objections ul { padding-left: 20px; margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.add-form form { margin-top: 12px; }
.add-form .btn { margin-top: 4px; }
.call-history { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 10px; }
.call-history h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 8px; }
.hist-item { display: flex; gap: 7px; align-items: baseline; flex-wrap: wrap; padding: 5px 0; border-bottom: 1px solid #f1f2f6; font-size: 12.5px; }
.hist-date { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.hist-badge { padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.hist-note { background: #fff7ed; color: #9a3412; }
.hist-contact { background: #ede9fe; color: #5b21b6; }
.hist-interesse { background: #d1fae5; color: #065f46; }
.hist-rdv { background: #dbeafe; color: #1e40af; }
.hist-pas_interesse { background: #fee2e2; color: #991b1b; }
.hist-pas_repondu { background: #f1f2f6; color: #4b5563; }
.hist-rappel_plus_tard { background: #fef3c7; color: #92400e; }
.hist-contenu { flex: 1 1 100%; color: #475569; }
.tl-contact { background: #ede9fe; }

/* ── Assistant d'appel interactif ── */
.script-assistant { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; }
.sa-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sa-head h3 { font-size: 13px; margin: 0; }
.sa-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.sa-progress { font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.sa-stage { margin-top: 10px; background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.sa-stage-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--accent-dark); }
.sa-hint { font-size: 11px; color: var(--muted); margin: 4px 0 8px; }
.sa-say { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; padding: 10px 12px; }
.sa-label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 800; margin-bottom: 3px; }
.sa-prompt { margin: 0; font-size: 13.5px; line-height: 1.55; }
.sa-copy { margin-top: 6px; }
.sa-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sa-option { text-align: left; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; font-size: 12px; cursor: pointer; color: var(--text); font-family: inherit; }
.sa-option:hover { border-color: var(--accent); background: #fff7f4; }
.sa-reply { margin-top: 10px; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 8px; padding: 10px 12px; }
.sa-reply .sa-label { color: #047857; }
.sa-reply p { margin: 0; font-size: 13px; line-height: 1.55; }
.sa-reply-actions { margin-top: 8px; display: flex; gap: 6px; }
.sa-footer { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.sa-footer a { margin-left: auto; }
.sa-outcome-pulse { animation: saPulse 1s ease 2; }
@keyframes saPulse { 0%,100% { box-shadow: none; } 50% { box-shadow: 0 0 0 3px #a7f3d0; } }

/* ── Écran de connexion ── */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(1200px 600px at 50% 0%, #eef2ff, var(--bg)); }
.login-wrap { width: 100%; display: flex; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 30px 28px 22px; box-shadow: 0 24px 60px rgba(15,23,42,.12); }
.login-brand { font-size: 26px; font-weight: 900; letter-spacing: .5px; color: var(--sidebar); }
.login-brand span { color: var(--accent); }
.login-sub { color: var(--muted); font-size: 13px; margin: 6px 0 18px; }
.login-label { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 12px 0 5px; }
.login-input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; font-size: 14px; background: #fff; }
.login-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,122,89,.15); }
.login-btn { width: 100%; justify-content: center; margin-top: 18px; padding: 11px 14px; font-size: 14px; }
.login-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 9px; padding: 9px 12px; font-size: 12.5px; font-weight: 600; }
.login-foot { text-align: center; color: var(--muted); font-size: 11px; margin-top: 16px; }
