/* ═══ Agents autonomes ═══ */
.pro-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--violet); background: var(--violet-light); border-radius: 99px; padding: 6px 12px; }
.pro-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 18px; align-items: start; }
.btn.full, .btn-ghost.full { width: 100%; }

/* frise des étapes */
.tl { display: grid; gap: 8px; max-height: 460px; overflow-y: auto; }
.tl.tall { max-height: 680px; }
.tl-item { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font-size: 13.5px; animation: slideIn .3s ease-out; }
.tl-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--violet-light); color: var(--violet); font-size: 13px; }
.tl-ic .spinner { width: 14px; height: 14px; border-width: 2px; }
.tl-item.done .tl-ic { background: #d1fae5; color: #047857; }
.tl-item.wait .tl-ic { background: #fef3c7; color: #b45309; }
.tl-item.error .tl-ic { background: #fee2e2; color: #b91c1c; }
.tl-item.tool-emails .tl-ic { background: #e0f2fe; color: #0369a1; }
.tl-item.tool-agenda .tl-ic { background: #ede9fe; color: #6d28d9; }
.tl-item.tool-crm .tl-ic { background: #fce7f3; color: #be185d; }
.tl-item.tool-taches .tl-ic { background: #d1fae5; color: #047857; }
.tl-b b { font-weight: 700; }
.tl-d { color: var(--gray); font-size: 12.5px; margin-top: 2px; }
.tl-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tl-chips .chip { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.chip.ko { background: #fee2e2; color: #b91c1c; }
.tl-src { margin-top: 6px; font-size: 12.5px; }
.tl-src summary { cursor: pointer; color: var(--violet); font-weight: 600; }
.tl-src a { display: block; color: #0369a1; text-decoration: none; padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* prospection */
.pr-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pr-card { animation: slideIn .35s; transition: border-color .3s; }
.pr-card.done { border-color: var(--violet-mid); }
.pr-top { display: flex; gap: 12px; align-items: flex-start; }
.pr-top > div:not(.pr-score) { flex: 1; min-width: 0; }
.pr-top a { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: #0369a1; text-decoration: none; margin-left: 6px; }
.pr-score { width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: radial-gradient(closest-side, white 76%, transparent 78% 100%), conic-gradient(var(--c, var(--violet)) calc(var(--p) * 1%), #e5e7eb 0); }
.pr-score.haute { --c: #10b981; } .pr-score.moyenne { --c: #f59e0b; } .pr-score.basse { --c: #9ca3af; }
.pr-score b { font-family: Sora, sans-serif; font-size: 15px; }
.pr-status .thinking { padding: 14px 0 4px; justify-content: flex-start; }
.pr-body { margin-top: 10px; font-size: 13.5px; display: grid; gap: 8px; }
.pr-sig { list-style: none; display: grid; gap: 4px; }
.pr-sig li { display: flex; gap: 6px; align-items: flex-start; } .pr-sig .ico { color: var(--violet); margin-top: 2px; }
.pr-angle { background: var(--violet-light); border-radius: 8px; padding: 8px 10px; display: flex; gap: 6px; align-items: flex-start; }
.pr-mail summary { cursor: pointer; font-weight: 700; color: var(--violet); display: flex; align-items: center; gap: 6px; }
.pr-mail[open] summary { margin-bottom: 8px; }
.pr-mail .mail-b { border: 1px solid var(--border); border-top: none; border-radius: 0 0 10px 10px; font-size: 13px; }
.pr-mail .mail-h { border-radius: 10px 10px 0 0; border: 1px solid var(--border); }
.pr-li { font-size: 12.5px; color: var(--gray); margin-top: 6px; display: flex; gap: 6px; }

/* analyse de données */
.da-prev .da-scroll { overflow-x: auto; max-height: 230px; }
.da-prev table.data { font-size: 12px; margin: 0; }
.da-prev table.data th, .da-prev table.data td { padding: 5px 8px; white-space: nowrap; }
.da-ask { display: flex; gap: 10px; align-items: center; background: white; border: 1px solid var(--border); border-radius: 12px; padding: 8px 8px 8px 14px; margin-bottom: 16px; box-shadow: var(--shadow); color: var(--violet); }
.da-ask input { flex: 1; border: none; font-size: 14px; }
.da-ask input:focus { outline: none; }
#daOut { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.da-synth { grid-column: 1 / -1; background: linear-gradient(135deg, var(--violet-light), white); }
.da-s3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; font-size: 13.5px; }
.da-s3 h5 { display: flex; gap: 6px; align-items: center; font-size: 13px; margin-bottom: 6px; color: var(--violet); }
.da-s3 .al h5 { color: #b45309; }
.da-s3 ul { margin-left: 18px; display: grid; gap: 5px; }
.da-card { animation: slideIn .35s; }
.da-chart { height: 240px; position: relative; }
.da-txt { font-size: 13.5px; margin-top: 10px; display: flex; gap: 6px; align-items: flex-start; }
.da-txt .ico { color: #f59e0b; margin-top: 2px; }
.da-code { margin-top: 10px; font-size: 12px; }
.da-code summary { cursor: pointer; color: var(--gray); font-weight: 600; display: inline-flex; gap: 5px; align-items: center; }
.da-code pre { background: #0f0b1a; color: #c4b5fd; border-radius: 8px; padding: 10px 12px; overflow-x: auto; margin-top: 6px; font-size: 12px; }

/* assistant de direction */
.dir-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.env-tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); flex-wrap: wrap; background: var(--bg); }
.env-tab { display: inline-flex; align-items: center; gap: 5px; border: none; background: transparent; border-radius: 8px; padding: 6px 9px; font-size: 12.5px; font-weight: 600; color: var(--gray); }
.env-tab span { background: white; border-radius: 99px; padding: 0 6px; font-size: 11px; }
.env-tab.on { background: white; color: var(--violet); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.env-tab.ping { animation: ping 1.2s; }
.env-tab:disabled { opacity: .45; cursor: default; }
.env-tab.ready { color: var(--dark); }
@keyframes ping { 0%, 60% { background: var(--violet); color: white; } }
#drTab { max-height: 470px; overflow-y: auto; }
.env-row { display: grid; gap: 1px; padding: 8px 4px; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.env-row span { color: #374151; } .env-row small { color: var(--gray-light); }
.env-row.lu b::after { content: ' · lu par l\'agent'; color: #047857; font-weight: 500; font-size: 11px; }
.env-row.new, .env-row.sent { background: #ecfdf5; border-radius: 6px; animation: slideIn .3s; }
.ag-day { display: grid; gap: 4px; padding: 6px 0; border-bottom: 1px solid #f3f4f6; font-size: 12.5px; }
.ag-day > span { font-weight: 700; color: var(--gray); font-size: 11.5px; text-transform: uppercase; }
.ag-ev { background: var(--violet-light); border-radius: 6px; padding: 4px 8px; }
.ag-ev.clash { background: #fee2e2; color: #b91c1c; font-weight: 600; }
.ag-ev.new { background: #d1fae5; color: #047857; font-weight: 600; animation: pop .5s; }
.prop { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 13px; animation: slideIn .3s; }
.prop.ok { border-color: #a7f3d0; background: #f0fdf4; } .prop.no { opacity: .55; }
.prop-h { display: flex; gap: 6px; align-items: center; }
.prop-sub { color: var(--gray); margin: 3px 0 6px; }
.prop details summary { cursor: pointer; color: var(--violet); font-weight: 600; font-size: 12.5px; }
.prop .mail-b { padding: 8px 0; font-size: 12.5px; }
.prop-why { font-size: 12px; color: var(--gray); display: flex; gap: 5px; margin: 6px 0; }
.prop-act { display: flex; gap: 6px; }
.prop-st { font-weight: 700; font-size: 12.5px; }
.risk { border-left: 3px solid #f59e0b; background: #fffbeb; border-radius: 0 8px 8px 0; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; animation: slideIn .3s; }
.risk.haute { border-color: #ef4444; background: #fef2f2; }
.prio { margin: 8px 0 0 20px; display: grid; gap: 5px; font-size: 13.5px; font-weight: 600; }
#drSum p { font-size: 13.5px; }

/* appel d'offres */
.ao-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.ao-dce { width: 100%; min-height: 520px; border: 1px solid var(--border); border-radius: 10px; padding: 12px; font-size: 12.5px; line-height: 1.5; resize: vertical; margin-bottom: 12px; font-family: inherit; }
.org { display: grid; gap: 0; }
.org-row { display: flex; justify-content: center; gap: 12px; }
.org-row.four { display: grid; grid-template-columns: repeat(4, 1fr); }
.org-links { height: 18px; position: relative; }
.org-links::before { content: ''; position: absolute; left: 12.5%; right: 12.5%; top: 50%; border-top: 2px dashed var(--border); }
.org.phase2 .org-links:first-of-type::before { border-color: var(--violet-mid); }
.org-node { display: flex; gap: 10px; align-items: center; border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 12px; background: white; min-width: 0; transition: all .3s; }
.org-row:not(.four) .org-node { min-width: 300px; }
.org-node b { display: block; font-size: 13.5px; }
.org-node small { display: block; color: var(--gray); font-size: 11.5px; line-height: 1.3; }
.on-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--bg); color: var(--gray); display: grid; place-items: center; flex-shrink: 0; font-size: 16px; }
.on-st { display: block; font-style: normal; font-size: 11px; font-weight: 700; color: var(--gray-light); margin-top: 3px; }
.org-node.run { border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-light); }
.org-node.run .on-ic { background: var(--violet); color: white; animation: breathe 1.2s infinite; }
.org-node.run .on-st { color: var(--violet); }
.org-node.done { border-color: #a7f3d0; }
.org-node.done .on-ic { background: #d1fae5; color: #047857; }
.org-node.done .on-st { color: #047857; }
.org-node.err { border-color: #fecaca; }
@keyframes breathe { 50% { transform: scale(1.08); } }
.ao-out { margin-top: 18px; padding: 0; overflow: hidden; }
.ao-tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); background: var(--bg); flex-wrap: wrap; }
#aoBody { padding: 20px 22px; }
.ao-sum h3 { font-family: Sora, sans-serif; font-size: 18px; margin: 12px 0 2px; }
.ao-sum h5, #aoBody h5 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--gray); margin: 16px 0 6px; }
.ao-sum ul, #aoBody ul { margin-left: 18px; display: grid; gap: 4px; font-size: 13.5px; }
.ao-go { display: flex; gap: 12px; align-items: center; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; }
.ao-go b { font-family: Sora, sans-serif; font-size: 16px; white-space: nowrap; }
.ao-go.ok { background: #d1fae5; color: #065f46; } .ao-go.ko { background: #fee2e2; color: #991b1b; } .ao-go.warn { background: #fef3c7; color: #92400e; }
.crit { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 60px; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }
.crit .bar { height: 8px; background: #f1f1f4; border-radius: 99px; overflow: hidden; }
.crit .bar i { display: block; height: 100%; background: var(--violet); border-radius: 99px; }
.crit b { text-align: right; }
.memo h4 { font-family: Sora, sans-serif; font-size: 15px; margin: 16px 0 6px; }
.memo h4:first-child { margin-top: 0; }
.memo p { font-size: 14px; line-height: 1.6; color: #374151; }
.gantt { display: grid; gap: 6px; font-size: 12.5px; }
.g-head, .g-row { display: grid; grid-template-columns: 200px 1fr; gap: 10px; align-items: center; }
.g-head { grid-template-columns: 200px repeat(var(--w), 1fr); gap: 0; color: var(--gray-light); font-size: 10.5px; }
.g-head b { text-align: center; font-weight: 600; }
.g-row > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.g-track { position: relative; height: 22px; background: repeating-linear-gradient(90deg, #f7f7fb 0, #f7f7fb calc(100% / var(--w) - 1px), #ececf2 calc(100% / var(--w) - 1px), #ececf2 calc(100% / var(--w))); border-radius: 6px; }
.g-track i { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; animation: grow .6s ease-out; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.g-row.jal .g-track { background: none; height: 34px; }
.g-track em { position: absolute; top: 0; transform: translateX(-50%); color: var(--violet); font-style: normal; text-align: center; font-size: 14px; }
.g-track em small { display: block; font-size: 10px; color: var(--gray); white-space: nowrap; }

/* standard téléphonique */
.ph-grid { display: grid; grid-template-columns: 320px 360px minmax(0, 1fr); gap: 18px; align-items: start; }
.call { border-radius: 30px; padding: 22px 20px 26px; min-height: 560px; background: radial-gradient(400px 260px at 50% 10%, color-mix(in srgb, var(--violet) 55%, transparent), transparent 70%), #111018; color: white; display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: 0 20px 50px rgba(0,0,0,.25); position: sticky; top: 90px; }
.call-top { width: 100%; display: flex; justify-content: space-between; font-size: 12px; color: rgba(255,255,255,.6); font-weight: 600; }
.call-av { width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; font-family: Sora, sans-serif; font-size: 44px; font-weight: 800; margin: 30px 0 10px; position: relative; }
.call-av .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); opacity: 0; }
.call.ringing .call-av .ring { animation: ringo 1.4s infinite; } .call.ringing .call-av .ring.r2 { animation-delay: .7s; }
@keyframes ringo { from { transform: scale(1); opacity: .8; } to { transform: scale(1.7); opacity: 0; } }
.call.ringing .call-av { animation: shake .5s infinite; }
@keyframes shake { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
.call-name { font-family: Sora, sans-serif; font-size: 22px; font-weight: 700; }
.call-num { font-size: 13px; color: rgba(255,255,255,.65); }
.call-num b { color: #86efac; }
.call-st { font-size: 13px; color: rgba(255,255,255,.8); margin-top: 6px; min-height: 18px; }
.eq { display: flex; gap: 4px; align-items: center; height: 44px; margin: 14px 0; opacity: .25; }
.eq i { width: 5px; height: 8px; border-radius: 3px; background: white; }
.call.sp-agent .eq, .call.sp-appelant .eq { opacity: 1; }
.call.sp-agent .eq i { background: color-mix(in srgb, var(--violet) 40%, white); animation: eq .7s ease-in-out infinite; }
.call.sp-appelant .eq i { background: #86efac; animation: eq .6s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .1s !important; } .eq i:nth-child(3) { animation-delay: .25s !important; } .eq i:nth-child(4) { animation-delay: .05s !important; }
.eq i:nth-child(5) { animation-delay: .3s !important; } .eq i:nth-child(6) { animation-delay: .15s !important; } .eq i:nth-child(7) { animation-delay: .2s !important; }
@keyframes eq { 50% { height: 38px; } }
.call-act { margin-top: auto; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; justify-content: center; }
.cbtn { width: 62px; height: 62px; border-radius: 50%; border: none; color: white; font-size: 24px; display: grid; place-items: center; }
.cbtn.green { background: #22c55e; animation: pulse 1.5s infinite; } .cbtn.red { background: #ef4444; }
.ptt { border: 2px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: white; border-radius: 99px; padding: 14px 20px; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; user-select: none; }
.ptt.on { background: #ef4444; border-color: #ef4444; animation: pulse 1s infinite; }
.ptt:disabled { opacity: .4; }
.ph-trans { max-height: 380px; overflow-y: auto; display: grid; gap: 8px; }
.ph-line { font-size: 13.5px; padding: 8px 12px; border-radius: 12px; animation: slideIn .3s; max-width: 92%; }
.ph-line b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
.ph-line.agent { background: var(--violet-light); justify-self: start; } .ph-line.agent b { color: var(--violet); }
.ph-line.appelant { background: #f0fdf4; justify-self: end; } .ph-line.appelant b { color: #047857; }
.ph-type { display: flex; gap: 8px; margin-top: 10px; }
.ph-type input { flex: 1; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.ph-slots { display: flex; flex-wrap: wrap; gap: 5px; }
.ph-slots span { font-size: 11.5px; font-weight: 600; background: #f0fdf4; color: #15803d; border-radius: 6px; padding: 3px 7px; }
.ph-slots span.booked { background: #22c55e; color: white; animation: pop .6s; }
.ph-sms { margin-top: 10px; background: #f0fdf4; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.ph-sms .k { display: flex; gap: 5px; align-items: center; font-size: 11px; font-weight: 700; color: #047857; text-transform: uppercase; margin-bottom: 4px; }

/* accueil : section agents autonomes */
.home-sec { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 40px 0 16px; flex-wrap: wrap; }
.home-sec h2 { font-size: 24px; font-weight: 800; letter-spacing: -.5px; display: flex; align-items: center; gap: 10px; }
.home-sec p { color: var(--gray); font-size: 14.5px; max-width: 620px; }
.home-sec .pro-badge { font-size: 11px; }
.card2.pro { border-color: color-mix(in srgb, var(--violet) 25%, var(--border)); }
.card2.pro .prev { background: linear-gradient(160deg, #1a1030, #0f0b1a); }
.card2.pro .c2-ic { background: var(--violet); color: white; }
.pv-pro { width: 90%; display: grid; gap: 6px; }
.pv-srch { background: white; border-radius: 99px; padding: 5px 10px; font-weight: 600; display: flex; gap: 6px; align-items: center; color: var(--dark); }
.pv-pro .pv-row { background: rgba(255,255,255,.95); }
.pv-sc { width: 22px; height: 22px; border-radius: 50%; background: #d1fae5; color: #047857; font-weight: 800; display: grid; place-items: center; font-size: 10px; flex-shrink: 0; }
.pv-pro b { flex: 1; font-size: 11px; }
.pv-bars { width: 86%; height: 100px; display: flex; align-items: flex-end; gap: 7px; position: relative; }
.pv-bars i { flex: 1; background: linear-gradient(180deg, color-mix(in srgb, var(--violet) 60%, white), var(--violet)); border-radius: 4px 4px 0 0; animation: rise 3s var(--d) infinite; transform-origin: bottom; }
@keyframes rise { 0% { transform: scaleY(.2); } 20%, 100% { transform: scaleY(1); } }
.pv-ins { position: absolute; top: -6px; right: 0; background: #fef3c7; color: #92400e; font-weight: 700; border-radius: 6px; padding: 3px 7px; display: flex; gap: 4px; align-items: center; }
.pv-dir { width: 88%; display: grid; gap: 5px; }
.pv-step { border-radius: 7px; padding: 5px 9px; font-weight: 700; animation: pvIn 5s infinite; }
.pv-step:nth-child(2) { animation-delay: .5s; } .pv-step:nth-child(3) { animation-delay: 1s; } .pv-step:nth-child(4) { animation-delay: 1.5s; }
.pv-step.ok { background: #d1fae5; color: #047857; } .pv-step.wait { background: #fef3c7; color: #92400e; } .pv-step.ko { background: #fee2e2; color: #b91c1c; }
.pv-org { display: grid; justify-items: center; gap: 7px; }
.pv-org > div { display: flex; gap: 5px; }
.pv-org .n { background: rgba(255,255,255,.12); color: white; border-radius: 7px; padding: 4px 8px; font-weight: 700; border: 1px solid rgba(255,255,255,.2); }
.pv-org .n.w { animation: work 2.4s var(--d) infinite; }
.pv-org .n.ok { background: #22c55e; border-color: #22c55e; }
@keyframes work { 30% { background: var(--violet); border-color: var(--violet); } }
.pv-call { display: grid; justify-items: center; gap: 6px; color: white; }
.pv-av { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.15); display: grid; place-items: center; font-size: 20px; }
.pv-eq { display: flex; gap: 3px; align-items: center; height: 26px; }
.pv-eq i { width: 4px; height: 6px; border-radius: 2px; background: #86efac; animation: eq2 .8s var(--d) ease-in-out infinite; }
@keyframes eq2 { 50% { height: 24px; } }
.pv-call span { font-size: 11px; font-weight: 600; opacity: .9; }

@media (max-width: 1250px) {
  .pro-grid, .ao-grid { grid-template-columns: 1fr; }
  .dir-grid, .ph-grid { grid-template-columns: 1fr 1fr; }
  .dir-grid > .panel, .ph-grid > .ph-center { grid-column: 1 / -1; order: -1; }
  .call { position: static; min-height: 440px; }
}
@media (max-width: 760px) {
  .pr-cards, #daOut, .da-s3, .dir-grid, .ph-grid, .org-row.four { grid-template-columns: 1fr; }
  .org-row:not(.four) .org-node { min-width: 0; width: 100%; }
  .g-head, .g-row { grid-template-columns: 110px 1fr; }
  .g-head { grid-template-columns: 110px repeat(var(--w), 1fr); }
}
.grid2.pro { grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; }
@media (max-width: 1100px) { .grid2.pro { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .grid2.pro { grid-template-columns: 1fr; } }
.pro-grid > *, .sys > *, .dir-grid > *, .ao-grid > *, .ph-grid > * { min-width: 0; }
.da-prev, .da-scroll { max-width: 100%; }
.g-track em:nth-child(even) small { transform: translateY(11px); }
.g-row.jal .g-track { height: 44px; }
.ph-type[hidden], #prCrm[hidden], #drSum[hidden], #phSum[hidden] { display: none !important; }
